how do I stop a running JMP script?
I script has a journal and inter active button and tick-able filed. Very often the script report error at very beginning but I could not stop it running rather than wait. I tried esc button but it does not work.
The only way to stop the processing of a JMP script is to press the ESC key. Unfortunately this is not a perfect solution, and some components of some scripts will not recognize the ESC key. The obvious other option is to startup Task Manager, and shutting down JMP. Other users may be aware of other options.
there is another thread talking about stop the script with button built with script, but I do not know how to integrate it to my script. I guess it is time for JMP giving a over haul to the script editor to make it more user friendly and powerful. I had used Notepad++ to compile other coding, which is free and much better than the jmp script editor, especially in the perspective of find/replace functionality.
I wholeheartedly disagree. While not perfect, it for sure is better than Notepad++, now if we were talking Sublime Text that's another story . There are a lot of helpful tools in the JSL editor. You can do a split view to make editing easier. It has a built in Reformat Script to make everyone's code look the same and follow a standard set of rules (although I wish I had more control of what rules to follow). Hovering over functions or commands will display a tool tip telling you the parameters of the function and what it does. If you can't remember the full name of a function typing a few words and pressing Ctrl+Space will bring up a list of possible functions you are looking for. Probably the biggest problem is there isn't a shortcut (that I know of) to comment/uncomment code and Ctrl+/ doesn't work like most other editors.
As far as stop running JMP script, it's more in the way JMP processes the code than in the editor. JSL runs asynchronously completely. Hitting "ESC" just sends another JSL command which adds it to the queue. Unfortunately it won't process that command until there's a lull in the the current script running. JMP will just keep running a current code as quickly as possible. As a tip, if you want your ESC button to work, just include wait(0) into all your for/while loops.
By "shortcut" you probably mean key sequence and you may already be aware of what follows, but I'll post it anyway. While I'm not aware of a shortcut key sequence to comment/uncomment code, there is a quick way to do this by highlighting the block of code, right-clicking, and then selecting Advanced->Comment/Uncomment Block:
the function I would like to have in jmp script editor are:
1. Advanced find/replace, like supporting regular expression, listing the matches in separated window;
2. Make the error/alert clickable(link to the line of code);
3. Stop button.
4. Script visible while running.
My script has SQL pulling few million of rows data. Maybe that is why it is not stoppable by ESC button.
You can use regular expressions in the find/replace window. 2-4 are available in debug mode. I think the debug mode isn't very user friendly, but it's all available. Also, for 4) if you hover over a variable while a script is running, it will display the variable value in the lower right. In debugger you have a locals window.