Initializing variables in multiple files

What is the best protocol to open multiple files, initializing file global variables in each file and finally landing on a specific window? This was easy in Pan6, but appears much more difficult in PanX.

If the variables are all global variables (I seldom use global variables) then you can declare them all in the .Initialize of the first file you open. Global variables will be available for any other file that is already open or opens later in the same Panorama session. They will survive even if the file that created them is closed and will remain until Panorama closes. Fileglobal variables must, of course, be declared by the file they belong to and are best declared in that file’s .Initialize procedure (or .PreInitialize procedure).

The second part about landing on a particular window might be more of a challenge since it is hard to control the actual opening order of several files, each with an .Initialize procedure. I would try having each file open the next file at the very end of their .Initialize code so that the final file containing the window you want is opened last. If that is not successful you might have to work out some delayed timer action to go to that window after all the files have opened.