cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar
DMR
DMR
Level V

Referencing the current window

Hi - I need to refer in a small JSL script I've written to "the window from which I'm running this script". In the past I've done that just by referencing "window(0)", but this doesn't appear to work in JMP 14: the window I want to reference seems to have changed to "window(k)" where k is the largest integer for which a window exists. Two questions:

  1. Am I right about this apparent change, and if so, is there a single way I can call "the window from which I'm running this script" that will work in both JMP 13 and JMP 14 without my having to check which version I'm running?
  2. How can I access the list of currently open windows? At the moment I'm just checking them from 1 upwards in sequence to see if each one exists, and stopping when I find one that doesn't - which works fine, but it's a little inelegant. Is there a simple function that just returns a list of them? I couldn't find one, but I might just be looking for the wrong name.

Many thanks

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Referencing the current window

N Items( Window() )

This will give you the count of the open windows.

Window(n) has the following messages available

<<Get Window Title <<Get Picture <<Get HTML <<Get Text <<Set Window Title <<Set Report Title <<Set Dirty <<Select <<Selectable <<Get Annotation <<Delete <<Get RTF <<Get Journal <<Get Script <<Get XML <<Save Picture <<Save Interactive HTML <<Get Window Size <<Get Window ID <<Get Project <<Get Content Size <<Set Content Size <<Set Window Title <<Set Print Headers <<Set Print Footers <<GetOffset <<Get Size <<SetNotStretchable <<Get Min Size <<Set Min Size <<Get Max Size <<Set Max Size <<Get Auto Stretching <<Get Auto Centering <<Set Auto Centering <<Get Row States <<Get Width <<Set Width <<Get Height <<Set Height <<Get Property <<Get Property List <<Get Properties <<Get Property <<Get Property List <<Get Properties
Jim

View solution in original post

2 REPLIES 2
txnelson
Super User

Re: Referencing the current window

N Items( Window() )

This will give you the count of the open windows.

Window(n) has the following messages available

<<Get Window Title <<Get Picture <<Get HTML <<Get Text <<Set Window Title <<Set Report Title <<Set Dirty <<Select <<Selectable <<Get Annotation <<Delete <<Get RTF <<Get Journal <<Get Script <<Get XML <<Save Picture <<Save Interactive HTML <<Get Window Size <<Get Window ID <<Get Project <<Get Content Size <<Set Content Size <<Set Window Title <<Set Print Headers <<Set Print Footers <<GetOffset <<Get Size <<SetNotStretchable <<Get Min Size <<Set Min Size <<Get Max Size <<Set Max Size <<Get Auto Stretching <<Get Auto Centering <<Set Auto Centering <<Get Row States <<Get Width <<Set Width <<Get Height <<Set Height <<Get Property <<Get Property List <<Get Properties <<Get Property <<Get Property List <<Get Properties
Jim
DMR
DMR
Level V

Re: Referencing the current window

Thanks Jim - that'll enable me to tidy up the creation of a list of window names, and incorporating a check on the JMP version number is no big deal, though I was hoping to dispense with it if possible.

 

I'll regard this one as resolved now and move on - many thanks for your help.