Note: This is an archived post that was originally sent to the Hollywood mailing list on Wed, 02 Jun 2010 06:00:07 -0000
You don't need to poll the variable "Var_StopRunning" permanently (and that's also not recommended anyway). An event, like a mouse click, causes your program to leave its Wait()
-state anyway. Therefore try this:
Code: Select all
Var_StopRuning = 0
until Var_StopRuning = 1
some more code..
It does the same but only checks the "until"-condition when there's indeed an event. Of course, you still need to specify p_LeftmouseFunc() as an event function.
However, if you only want to wait for a mouse click, then just use the command:
There's no need for a loop. It's hidden within that command already
I recommend to read the (very well written) "Hollywood Guide" (located in the Hollywood directory) and especially its tutorial part to get familiar with all the possibilities the language provides to you.