Script "Select Window" does not change current window
I'm on Filemaker Pro Advanced version 13.0v5 connecting to a Filemaker database on Windows 2008 R2 Standard running Filemaker Server version 13.0v5 x64.
The following script:
Set Variable [$screenWidth; Value:Get(ScreenWidth)]
Adjust Window [Resize to Fit]
Move/Resize Window [CurrentWindow; Left: 25]
Select Window [Name: "sbStudents"]
Set Variable [$windowWidth; Value: Get(WindowWidth)]
Show Custom Dialog ["Window width"; "Window width: " & $windowWidth]
Does not work as I expect it to. There are two windows open when the script starts, "Sandbox" and "sbSTUDENTS", with "Sandbox" as the current window. "Sandbox" is adjusted and moved to the left as expected.
I expected the Select Window to make "sbStudents" the current window, and the Get(WindowWidth) to return the width of "sbStudents". Instead it returned the width of "Sandbox".
What am I missing?