# Strange "stopped" scripts

1. Firefox and chromium, probably all.
• get a {when I am [stopped v]] block
• put any block using wait under it
• click the stop sign, see it run the beginning of the block only, in the case of say, and only one waiting block, if there are multiple.
• click the script, and see it work properly.
3. Something confusing, but never wait.
4. Act the same as on click of the script

If this is what you're describing, it's deliberate that a WHEN I AM STOPPED script can run only for one display cycle -- one time through a loop, and nothing that requires waiting. This is to prevent sorcerer's-apprentice runaway scripts.

Then how can I make the script:

{when I am [stopped v]]
[digital_write (13) <<true(_)>>]
[wait (.033333) secs]
[digital_write (13) <<(_)false>>]

Looking for an error, probably including jsfunction...

This is to turn off a robot?

yes.
EDIT: found a way, use a JSfunction with invoke.

As Brian has told you, "When I am stopped" has nothing to do with "waits".

And yes, JS is the solution for your request. You only need an asynchronous call. Something like

this.arduino.board.digitalWrite(13, true);
var myself = this;
setTimeout(function(){
myself.arduino.board.digitalWrite(13, false);
}, 33.333);


Joan