cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • DownloadSemiconductor Toolkit: Tools to create wafer maps, add wafer geometry to graphics, explore die defects & compare wafers.
  • Discovery Summit 2026: Early User Edition - September 23-24.Register. It's free.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
MathStatChem
Level VII

Get selected text in Script Box

Does anyone know of a way with JSL to get the text and the line number(s) of selected text in a Script Box with JSL?  E.g.

MathStatChem_0-1781029877391.png

I want to return "Text 1 , " and {3,4}

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: Get selected text in Script Box

I think you can do it (in basic cases) with combination of (note that cursor line starts from 0 and selection width can be negative)

<< Get Cursor Line;
<< Get Cursor Position;
<< Get Selection Width;
<< Get Line Text;
<< Get Lines;

 

-Jarmo

View solution in original post

3 REPLIES 3
jthi
Super User

Re: Get selected text in Script Box

I think you can do it (in basic cases) with combination of (note that cursor line starts from 0 and selection width can be negative)

<< Get Cursor Line;
<< Get Cursor Position;
<< Get Selection Width;
<< Get Line Text;
<< Get Lines;

 

-Jarmo
MathStatChem
Level VII

Re: Get selected text in Script Box

Thanks.  Alas, this is only in JMP 19 and I only have JMP 18.  

jthi
Super User

Re: Get selected text in Script Box

Yeah, JMP18 is more limited. When I created add-in for JSL Snippets (was "long" before JMP19 released) I had to use workaround in which I inputted specific string into the script box and then I would look for it and replace it with the snippet.

-Jarmo

Recommended Articles