Background display dialog

I want to have a script that will bring up a display dialog (or something similar with a button) that will just stay open in the back ground while a repeat loop is running. Then when you push the button the repeat loop is interrupted and stopped, and thus the script is done.

the other way this might be feasible is if you hold down a key, the script checks for that key and when down the script is stopped.

Hello snown,

Assuming that you’re running OS/X.3.x, why not try GUI scripting using System Events.

Sincerely,

Variable as the shade

could you give me an example?

thanks