Cool generic scripts...

Chipp Walters chipp at chipp.com
Tue Nov 5 00:18:01 EST 2002


Everyone has a bunch of tools they use when developing programs...And I was
wondering if anyone wanted to share some of the stuff they put in *all*
their projects?

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

---------------------
Chipp Walters
Altuit, inc.
http://www.altuit.com
http://www.chipp.com
---------------------




More information about the use-livecode mailing list