| View previous topic :: View next topic |
| Author |
Message |
Logman
Joined: 19 Feb 2008 Posts: 6
|
Posted: Sat May 10, 2008 6:43 pm Post subject: Using GUI buttons to Pause/Resume |
|
|
Hi,
I have script which is functioning well. It has a couple of automatic loop type processes in it and some hotkeys. At some point I would like to be able to pause and then resume only a certain part of the script whilst the remainder of the script continues to function for the whole time. I want the entire script to start fully functional, and then to pause and resume one particular part of the script (called say, FRED) as I need to. I have created a GUI with a pause button and a seperate resume button to use for this task- my question is, how do I write the part of the script so that only FRED pauses when I hit the pause button, and resumes when I hit the resume button. I have tried all sorts of things but it seems beyond my noobish ways. I'm still stunned I got the script to go in the first place  |
|
| Back to top |
|
 |
sinkfaze
Joined: 19 Mar 2008 Posts: 113
|
Posted: Sat May 10, 2008 7:55 pm Post subject: |
|
|
| Perhaps you could assign the loop to a SetTimer routine, assign the Pause button to turn off the timer for that routine and assign the Resume button to turn the timer back on. |
|
| Back to top |
|
 |
Logman
Joined: 19 Feb 2008 Posts: 6
|
Posted: Sun May 11, 2008 3:37 am Post subject: |
|
|
Ok, thanks, I will look into that. I just wanted to make sure it wasn't impossible before I spent to much time working out how.  |
|
| Back to top |
|
 |
Logman
Joined: 19 Feb 2008 Posts: 6
|
Posted: Sun May 11, 2008 5:18 am Post subject: |
|
|
Thanks very much, got it going  |
|
| Back to top |
|
 |
Peterm353
Joined: 07 Mar 2008 Posts: 2
|
Posted: Sun May 11, 2008 7:51 pm Post subject: |
|
|
I needed to breakl out of a process is it twas getting boring, so I just set a global variable from the gui. Click the Pause button, it sets a variable to 1 (paused).
Then when your loop finds the global variable has changed to 1 it pauses (or whatever you need).
Only drawback it has to check this global variable each time. Might be too slow for what you need.
P |
|
| Back to top |
|
 |
|