cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Learn how to build custom Python data connectors and further customize JMP’s Data Connector Framework with the Python Data Connector Demo, available now in the JMP Marketplace!
  • See how to create experiments to support product design and ID useful product features. Register for June 12 webinar, 2pm US Eastern Time.

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

2 REPLIES 2
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.  

Recommended Articles