Cool generic scripts...
Brad Allen
BradAllen at mac.com
Tue Nov 5 07:30:01 EST 2002
Thanks for closeStack/killSockets tip, Chipp. Would using such a
script be adviseable even in stacks which don't manual open sockets,
but which do access URLs such as FTP sites using the a command like:
get URL "ftp://whatever.com" , which presumably both open and close a
socket within that one command?
>
>for instance, I usually put the following in all my stacks:
>
>on closeStack
>
> if exists(stack "revMenubar") or exists(stack "Home") then
> beep
> else
> answer question "Are you sure you want to Quit?" with "No" or "Yes"
> if it is "Yes" then
> killSockets
> quit
> end if
> end if
>
>end closeStack
>
>on killSockets
> put openSockets() into theSocks
> repeat for each line sock in theSocks
> close socket sock
> end repeat
>end killSockets
>
>this checks to see if I'm in RR (stack "revMenubar") or MC (stack "Home").
>Also, I need to trap it in other stacks or else they'll quit the application
>when they close a window.
>
>Any others out there?
>
>-Chipp
More information about the use-livecode
mailing list