I'm writing some Blockly Blocks and would like to alert the user when they do something bad (e.g. try to move a servo beyond its limits). Can I have the code generate a pop up when this happens? Something like
window.alert()
or
window.confirm()
?
Also, how do I accept text input on the terminal side of the Chrome IDE? I know I can input JavaScript functions there, but what about text strings? If not possible, then how do I write my own function that will be recognized there, so the user can type "hello" and it executes the function
hello()
Finally, is there any way to accept a mouse input? e.g.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Hi,
I'm writing some Blockly Blocks and would like to alert the user when they do something bad (e.g. try to move a servo beyond its limits). Can I have the code generate a pop up when this happens? Something like
or
?
Also, how do I accept text input on the terminal side of the Chrome IDE? I know I can input JavaScript functions there, but what about text strings? If not possible, then how do I write my own function that will be recognized there, so the user can type "hello" and it executes the function
Finally, is there any way to accept a mouse input? e.g.
Thanks,
Rehman