Page 1 of 1
panic!!!!! :(
Posted: Wed May 08, 2013 12:29 pm
by Mariasole
Hello!
Thanks in advance for your kindness!
I've created an infinite loop! Now an "answer" haunts me a thousand times.
Windows XP is my system... there is a key combination "no panic" to escape from this looooop (loop, loop, loop.

).
In short, an alternative to killing the application (and lose everything ...).
Thank you guys!
Baci!
Mariasole
Re: panic!!!!! :(
Posted: Wed May 08, 2013 1:11 pm
by jmburnod
Hi MariaSole,
Difficult to answer without knowledge your loop but on Mac we can sometimes stop it with a command-dot. Maybe ctrl-dot on windows ?
For the next loop you can add in your loop
Code: Select all
if the optionkey is down then exit repeat
I hope you stopped your loop now
Kind regards
Jean-Marc
Re: panic!!!!! :(
Posted: Wed May 08, 2013 2:05 pm
by Mariasole
Thank you Jean-Marc!
The script that start the infinite loop (from a button) is like this:
Code: Select all
on mouseUp
repeat 10000000000000000000000000000000000000000000 time
answer "I'm a loop"
end repeat
end mouseUp
When this loop is running it is impossible to stop.
I have tried using the key combination that I suggest (for the Mac) on Win, but does not work.
I thought that in the development environment there was a
panic button to stop the execution of the program.
It would be helpful for beginners!
Thank you for your kindness Jean-Marc!
Baci!
Mariasole
(PS: I lost my job stopping the loop with ctrl alt del, then kill app from task manager

)
Re: panic!!!!! :(
Posted: Wed May 08, 2013 2:51 pm
by dunbarx
Hi.
That certainly was daring of you. Did you really need a treDecillion loops?
Command-period will not stop this. The answer dialog is blocking, and there is no time to do anything else, like abort. You would have to force quit LiveCode.
You could insert a pause that removes blocking:
on mouseUp
repeat 10000000000000000000000000000000000000000
answer "I'm a loop"
wait 10 with messages
end repeat
end mouseUp
Now command-period will stop the loop. This is a useful trick to know for other times...
Putting a stop like Jean-Marc suggested is also good.
Keep your loop in the trillion range from now on.
Craig Newman
Re: panic!!!!! :(
Posted: Wed May 08, 2013 3:15 pm
by Mariasole
Thank you Craig!
Thanks for the help!
The "treDecillion" number was ironic!
Sorry for the stupid questions

and for my search for an "anti panic button", but I'm really absolute beginner in programming language.
But for this I can be an inspiration!
In fact, if you think about it, I am the person who wants to bring the Live Code "programming for all"!
Thank you Craig and sorry for my horrifying and ramshackle english!
baci!
Mariasole