#42003/4/13 20:28:01
对不起,我还是不明白,麻烦您把下面的一段话翻译(解释)一下:
You can now specify a calculation icon to be run when the user exits the course file, no matter
what method is used to exit, even if the user closes the file through shortcut keys or close boxes.
The exit calculation icon also works if you call the Quit function. The exit script is executed
before the Presentation window closes. After the exit calculation icon is executed, the file exits
normally.
The exit calculation icon should be placed out of the way, perhaps at the very bottom of your
flowline, so that it is not executed before it’s needed. To indicate which calculation icon is to be
used upon exiting, set the new system variable ExitIcon. If the specified icon is not a calculation
icon, Authorware ignores the assignment. To clear the ExitIcon variable so that the script is not
executed upon exiting, set the variable to zero.
For instance, let’s suppose that you create a calculation icon to do two things whenever the user
exits the lesson file. It writes out the value of a variable called score to a text file and deletes a
temporary file you have created in the lesson. You could create a calculation icon called My Exit
Routine and place it at the bottom of the flowline, placing the following script inside the
calculation icon:
WriteExtFile("c:\\results.txt", score)
DeleteFile("c:\\temp.txt")
During any initialization script at the beginning of the lesson file, be sure to include the following
line:
ExitIcon := IconID@"My Exit Routine"
The Goto, SyncWait, and the SyncPoint functions have no effect if called from within the exit
icon script.
Note: During authoring, hold down the Control key to override execution of the ExitIcon script. This override key is
for authoring convenience only and is not available at runtime.