Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 8245 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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.

Posted

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

Posted

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!

Posted

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

Posted

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

Posted

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.

Posted

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.

Posted

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

Posted

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.

This topic is 8245 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.