Try it and see. I believe the On Open script will be performed if the file is not already open. If all else fails, you may want to try using a global field instead of a variable.
thanks for Caring...
My tests reveal that if you call directly to a script on an unopened database that databases 'on open' script will not be activated. - I suppose this is a good and bad thing. but at least I know. - filemaker 'help' is vague about that reality.
I stand corrected. I was sure that I had tried this before and wasn't able to keep the onOpenScript from performing as that was a problem in the issue I was dealing with. Having run a quick test, my results match yours. You can, of course, use perform script to run the "on open" script first, then use a second Perform Script to run the other script you wanted to run.