Select window puts the focus on the window you set up the script to select. you can select the current window--which doesn't do much for your script or you can select the script by name and you can, if you want, restrict the named window to be a window from the current file.
Adjust Window will adjust whatever window currently has the focus so you may need to precede it with Select Window in order to select the window to be adjusted.
And Move/resize window may actually be the script step to use in place of Adjust Window in some cases. It includes a parameter where you name the window to be adjusted so you can use it to adjust a window that does not currently have the focus so long as the newly opened window is not specified to be Modal.
Thanks, Phil for your answer!
Ok, so it is the Adjust Window that seems to be the problem, even with the Select Window script right before it.
Although, since I'm unsure of the new layout height and width (as they could be one of multiple layouts and the layouts could change) I don't really feel the need to use the Move/Resize Window. It does, however, work since you can select the window by name.
I will just leave it how it is, because it seems to work well enough for now.
But HOW is Adjust Window "the problem"?
When I do a Select Window and Adjust Window, it still goes back to the parent window
It brings the Parent Window to the front, puts it in focus, and puts the New Window behind it. The Resize to Fit will then work on the Parent Window instead.
Are you using advanced window options with the GTRR step?
I've used adjust window with re-size to fit with no problem and it did not bring the background window to the front. It was a standard method for resizing a new window in some of the Filemaker 11 starter solutions. What you describe sounds like your "focus" is on the wrong window... Perhaps your select window had the "same file" option specified since your GTRR might be opening to a layout in the other file?
But I wonder what happens if the new window is specified as "modal"....
I didn't use the Advanced Window Options.
I change the GTRR to make it modal, the focus was still brought to the Parent Window. (Since it is modal the New Window was still in front, just did not have the focus.)
I had already deselected/unchecked "Use Current File Only" for the Select Window, but it didn't make a difference.
I might guess it has to do with my FM12, as it has never really liked me since I installed it, unlike other people I know where things work for them. Most likely if I ask someone else to do this change for me, then it might work. Not the first time I had to ask someone to change something because my FM didn't work.
The light bulb went on after I posted my last post. (Been up all night in the ER sitting with a sick wife....)
The Adjust Window script step needs to be executed from a script performed in the external file. Perform script from the first file can perform a script with the adjust window script step in the second file.
Ok, that makes sense.
Thanks for your help!
Sorry about your wife, hope she feels better.