How to make a window perform a script while in the background
<!-- StartFragment -->
My solution opens for each record that a user wants to look at in "Full View" a new window. So, often there are a bunch of windows open at the same time.
The Full View layout has several tab panels: "View" to read the record, and "Edit" to make changes. When a user opens the Edit panel in one window and then goes to another record in full view and opens the Edit panel there, a script causes that in the first window the panel switches back from Edit to View. So, there is never more than one window open that shows the Edit panel; all others show the View panel.
When a user clicks on the Edit panel's tab this script here runs:
Set Variable [ $WindowEdit ; Value: PatternCount ( WindowNames ; "Full View Edit" ) ]
If [$WindowEdit = 1 ]
Set Window Title [ Current Window ; New Title: "New Edit Window"]
Select Window [ Name: "Full View Edit"; Current file ]
Perform Script [ "Select View Panel" ]
Set Window Title [ Current Window; New Title: "" ]
Select Window [ Name: "New Edit Window"; Current file ]
Set Window Title [ Current Window; New Title: "Full View Edit" ]
Go to object [ ...
So far, so good; the only thing that really doesn't look too good is that for a little moment (that is while the first window is in the front) there is this kind of window flickering. Is it possible to have the script its actual job done (i.e. switching from Edit to View Panel in the first window) while staying in the background?
Mike<!-- EndFragment -->