OK!
Not new to AS, and am working on a very simple script (code included below). We are running OS 9.2.2. When this application stays open for an extended period of time (I do not have exact numbers yet) and the Yes button is clicked, the script goes off and does things it is not supposed to. It starts up the browser, brings up a window and then restarts the machine.
Are there any tricks to keeping an script open for extended periods of time?
Thanks!
Login Script
-- Send them to either Finder or login web page -- need to find out which it is
display dialog ¬
"Do you wish to use the Internet?" buttons {"Yes", "No"} ¬
default button "Yes"
-- user clicks a button
set netChoice to button returned of result -- set it as the result
-- if they want to use the internet must authenticate -- with the firewall
if netChoice is "Yes" then
tell application "Internet Explorer"
Activate
OpenURL "http://<ourfirewall.edu/ascript>"
end tell
-- they don't want to use the internet so dump them
-- into the Finder
else
tell application "Finder"
activate
end tell
-- End of if and end of application
end if
I think I’m confused.
This script is saved as a stay open application? If so, I guess I don’t
understand why, or how it is called for subsequent use. Maybe I need
more coffee.
– Rob J
It is saved as stay open. It is in our Mac lab. When a student sits down they select if they want to use the internet or not. If internet then open IE and head to the firewall authen page, if not dump to finder.
From the time I leave in the evening to the time I come in in the morning, I can click yes (use the internet) the script opens IE, brings up the page. Then closes the page and restarts the Mac.
Once restarted the script works just fine.