newbie... from BASIC/BASH land...

how do i make a stoppable loop? :?:

repeat
end repeat

works… and can be stopped in script editor… but when running as a compiled script it cant be stopped (quit is greyed out)

what i need is a way to leave the loop running till i click a button on a window of some kind… but not a display hogging dialog (i want it to act like a normal app…)

i have akua sweets installed which seems to allow for creation of applicationish windows but i dont know how to make use of it… in that sense anyway… ive used many of its other functions…

many thanx…

-Mephitus

…also… it would be really nice to have it be able to detect that the computer is shutting down and automatically close… as of now i have to force quit the script… :?

You can use a “idle” handler (save as “stay-open”):

on idle
     --> do something
     return 1 --> repeat every 1 second
end idle

Manually, you can bring the app to the foreground and press cmd+dot (.)
For more info, search the forums for (eg) “stop AND loop”. Good luck! :wink: