It would help to see a more detailed listing of the scripts. That allows us to rule out details--say with how the data is "appended" to stuff and also to recreate the issue if needed.
To post a script to the forum:
- You can upload a screen shot of your script by using the Upload an Image controls located just below Post A Answer.
- You can print a script to a PDF, open the PDF and then select and copy the script as text from the opened PDF to your clipboard for pasting here.
- If You have FileMaker Advanced, you can generate a database design report and copy the script as text from there.
- If you paste a text form of the script, you can use the Script Pretty box in the Known Bugs List database to paste a version that is single spaced and indented for a more professional and easier to read format.
If you use opton 2. PLEASE edit the pasted text by inserting a few returns here and there so that each script step starts a new line.
Here you go:
***SCRIPTS IN FILE X***
Set Field [ X::stuff; X::stuff & "WindowOpenTrigger" ]
Set Variable [ $param; Value:Get ( ScriptParameter ) ]
Set Field [ X::stuff; X::stuff & $param ]
***SCRIPTS IN FILE Y***
Perform Script [ “AppendParamToStuff” from file: “X”; Parameter: "Hello from Y" ]
Open File [ “X” ]
Open File [ “X” ]
Been thinking about this one. It's always worked this way. In fact, this is the trick for forcing open a file where opening it the conventional whay traps the user in a script that can't be aborted and that closes the file or quits FileMaker.
Thanks for looking at this. I still think it's perverse to be able to open a file without triggering OnWindowOpen. Wouldn't the modern way of dealing with the situation you describe be Tools/Debugging Controls/Disable Script Triggers?
Yes, but this technique predates such an option as the ONFirstWindowOpen "trigger" existed before we had script triggers and FileMaker Advanced. I think this happens because the window isn't automatically activated by the perform script call from the other file.
The work around, BTW, is to have your script explicitly call the script you want to have triggered by this method.