April 29, 200223 yr I have 2 separate programs. I have a "welcome" screen that contains 2 buttons. Each button is a small script that opens one of the programs. Each script is exactly the same except for the name of the file it is supposed to open. Here's the problem: One button works as it should. The other button opens the folder where the file is located, but waits for me to select the file . It makes no difference if it is set to relative path or not. It make no difference if it was the last file selected or not. Appreciate any ideas... Thanks. Jack
April 29, 200223 yr Jack, That not suppose to happen. The folder that contains the file has the same name? try changing the file
April 29, 200223 yr In the script for the button that's not working properly, check that you still have the Specify box checked in the Open step. You may have lost your file reference.
April 29, 200223 yr Author Thanks ZZ and Alison for your suggestions. Everything seems fine... the reference to the file is there, tried changing names etc, all to no avail. ( I always wanted to use that term.) Any other suggestions ? This is driving me beserk ! thanks Jack
April 30, 200223 yr Think I've cracked it. Daniel S (aka d94dsj) suggested doing this when I had a problem trying to recover files. Move the target file further up the directory tree. I just tested a situation with a target file 3 folders deep which woked fine. Then I moved the file several folders further down and had the same problem you describe. HTW4U!
April 30, 200223 yr Author Alison: Thanks for sticking with this. I tried moving it all the way up. I tried putting it the same folder as the program itself. Doesn't help. The strange thing is that the button script for the other program finds that file and works fine. Both of these programs are in separate folders in the same directory. I've changed file names, locations. I must be overlooking something...... Jack
April 30, 200223 yr Just to add my 2 cents worth. You might try deleting the script completely and recreating it. On some rare occasions a script (or script step) becomes corrupted and this is the only solution. -bd
April 30, 200223 yr The only other bottom-of-the-barrel idea I have is that I read somewhere that buttons sometimes misbehave if they have the same name as a field. I'm with Live Oak on this now - recreate the script.
April 30, 200223 yr I've found the Open [] step to be less than reliable. Instead use this system: Create an "open" script in each database that sets the window up the way you want (maximised, layout, status bar, toolbars, zoom level, scroll etc) and ends with Refresh Window [bring to front]. In your welcome scripts, instead of using the Open [] step, use Perform Script [] and externally call the "open" script in each database. The advantage of this is that it *always* works (brings the other database window to the front) whether the file is already opened or not, and the new database window is always reset to the state you want.
May 1, 200223 yr Author To give evryone an update.... Deleted & recreated the script and at the same time deleted the "open" command and then went to the external script. (funny thing- I had the external script all along, but I thought I had to "open" the file before calling the external script.) and Hooray !! it nows works properly. I just don't know who gets the credit........ Thanks all for solving the problem ! jack
May 2, 200223 yr I just step in this discussion and I assume that the "programs" are FileMaker databases which should be opened from anothe database. If so, it is probably better to open them with a script. In eacht to open database you need a script for example "go to layout xxx". Make a script in the main database, define external subscript and refer to the script "go o layout xxx". Hope this is an idea.
Create an account or sign in to comment