Thank you for your post.
Unfortunately, I cannot duplicate the problem on my iMac running 10.5.5, but I'm only doing this with three files. In my two sub-files, the scripts steps are:
Enter Browse Mode 
Go to Records/Request/Page [First]
Set Field [<field>; "SUCCESS"]
In the main file, I created a similar script but added the following two script steps:
Perform Script [<opening script> ; <file 2> ]
Perform Script [<opening script> ; <file 3> ]
Both files were opened, and "SUCCESS" was written into the appropriate fields.
Since these are opening scripts, "Open File" script steps also work, too.
If you could give me more specific instructions, I will try and duplicate the problem here.
I don't think the problem is with the number of files. I'm actually running these script steps:
From main_menu.fp7 (the main file) one of the buttons is linked to the orders.fp7 file and the action is defined as follows:
Perform Script [<orders_internal_script> ; <file orders.fp7> ]
Inside orders.fp7 the script ordes_internal_script has the following script steps:
Enter Browse Mode
Go to format [orders]
Show all records
As you can see this script is not the one that is supposed to run when orders.fp7 is opened for the first time. the "upon opening" script is defined as follows:
Enter browse mode
Go to format [parameters]
Define field [username_access] -> "Get (AccountName)"
Define field [date_of_access] -> "Get (CurrentDate)"
This one script should be run everytime orders.fp7 is opened for the first time. With filemaker 9 this is the case (although, as I said, the script will not show up in debugging mode in either version 9 or 10). With filemaker 10 it is not run unless you place an "open file" (orders.fp7) statement somewhere in the scripts.
I think what you tried to do was perfoming the opening script by calling it directly from another script. This is ok but not my case.
Apologies if any of the instructions above are written incorrectly, I'm developing under italian language and guessing their english equivalent.
If you need further information I can send you an empty clone of the database.
Thank you for the additional information.
Here is some additional information from me....
I created a second script in the second file that does:
Enter Browse Mode 
Go to Layout [<same layout> ]
Go to Record/Request/Page [First]
Set Field [<field #2> ; "Called script" ]
In the first file, I changed the reference to the second file.
In FileMaker Pro 10, like you, I did not get any value from the opening script.
In FileMaker Pro 9, I also did not get any value from the opening script. That is, the opening script also did not execute with FileMaker Pro 9.
In order for this to work, I had to add:
Open File [ <file #2> ]
I further investigated the scripts inside the database files and can confirm your findings. Since I only debugged the "upon opening" scripts I was mislead into thinking the problem was there.
However, I figured that the problem is caused by the script step: "Open New Window". In filemaker 9 this seems to call the upon opening script as I tested with two simple files. In FileMaker 10 this does not happen.
If you could try the following simplified procedure I'd be grateful:
In the second file create a script that does:
Enter Browse Mode 
and call this script from the main_menu directly and without any "open file".
What i've seen in FileMaker 9 is that when it comes to New Window it runs the "Upon opening" script. For some reasons in 10 I can't get this behaviour.
Thank you for your time.
Thank you for the additional information. I can see the difference between the two. However, which one is correct?
I have reported the difference to our Development and Software Quality Assurance (Testing) departments, and when I receive a reply, I'll let you know.
In the mean time, use the Open File command to execute the opening file scripts.
That's a good question. In my opinion FileMaker 9 behaviour is the correct one. Obviously because our application was developed and tested around that behaviour. In addition to that, I can see that the upon running script is run only once after the first time we call "New Window" on a script. I guess this is because FileMaker stores a flag of whether the file has been opened directly and if it's the first time it runs the upon running script. Maybe in FileMaker 10 this flag has been removed and New Window does not evaluate that condition. (calling a script from another file does not open that file yet, although you can see it and work with it).
My 2 cents :)
Looking forward to hearing from you once you have got some feedback from development