Computer Science Canada Pause a loop |
Author: | 9lucky [ Thu Jan 19, 2012 12:21 am ] | ||||
Post subject: | Pause a loop | ||||
What is it you are trying to achieve? Pause a loop while my mouse if in a certain location. What is the problem you are having? I want to pause a loop when my mouse is a in a certain location. Describe what you have tried to solve this problem For example purposes I will use this code:
Obviously it will blink the box that it draws because it is looping and cls is at the top. If I wanted to stop the box from blinking I would have to pause the loop, currently I would do this
This will work fine although when I have a lot of code it can be confusing to read through it all. I was wondering if there mgiht be some sort of command that will pause the loop for me or do something similar to this, if there isn't is there a better way to do it? Please specify what version of Turing you are using 4.1.0.0 |
Author: | Insectoid [ Thu Jan 19, 2012 1:12 am ] |
Post subject: | RE:Pause a loop |
Nope. But you can put that into a function, so that it looks nicer (which essentially creates a 'pause' command). |