Open it as a text file and store the contents in a variable. Then use the character functions to change it.
The short answer is yes. You can use Load Text File() to get the contents of a .JSL file into a JSL variable and then work on it.
It's an interesting question though and it makes me wonder why you need/want to do this? Can you describe what you're trying to do?
Here's an example - not sure I could live without this
http://www.pega-analytics.co.uk/blog/finding-that-line-of-code/
This is an old thread but I'm going to reply to this anyway, as I occasionally look to see if this feature exists. The only reason I'd want to use another editor is when I'm writing most of my code but not yet ready to test, and I want to use an external editor's feature where a selected word (like a variable name or function) preceded and followed by spaces or some other special characters, automatically highlights all other instances of that text in the file. It's useful for when my scripts turn into spaghetti code and I can quickly see where the other instances of that variable are.
I work on JSL scripts mostly in the JMP script editor. However sometimes Notepad++ comes in very handy.
Notepad++ has features like:
To open a script file into a script window, one can use:
scriptWindow = New Window( "script editor", <<Type( "Script" ), "" );
code= Load Text File(filename);
scriptWindow [Script Box( 1 )] << set text(code)
Afterwards the script editor contains the code of the file filename. But the Script Editor doesn't know the location of filename.
So, include(file2) and open(file2) will not work in the code.
Is it possible to remote control the script editor to "open" the script file? Something like
current window() << open(file)
Plan B: redirect JMP to the correct file path.
I tried it with Set Default Path() and Set File Search Path() but it didn't work.