cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
Aadit
Level III

Get Script after User Input and Script to String

Hello Guys,

New to jmp scripting. I require assistance

I want to get the script after user specifies the valid information

dt = Open( "$SAMPLE_DATA/semiconductor capability.jmp" );
obj = dt << Variability Chart();
// I want to get Script after User clicks OK How to do that

If i have a string and to run it as script i do this 

dt = Open( "$SAMPLE_DATA/semiconductor capability.jmp" );
theScript = "Variability Chart( Y( :NPN2 ), X( :wafer ) );";
// I run this string as script by following
ww = New Window( "dummy window", <<Script, theScript);
ed = ww[Script Box(1)];
ed << Run();
ww <<CloseWindow();

// But is there a way to assign it to a obj that runs holds output of the script?
like 
obj << that holds the "Variability Chart( Y( :NPN2 ), X( :wafer ) )" as report(which is the string content) 

 Thanks in advance

3 REPLIES 3
txnelson
Super User

Re: Get Script after User Input and Script to String

// This will find the script for a Display Window
vcRpt = Current Report()[Outline Box( 1 )];
vcObj = vcRpt << get scriptable object
theScript = vcObj << get script;

// This will make the script a string
theScript = Char( vcObj << get script );

// this will run the script as a string 
Eval( Parse( theScript ) );

// This will run the Platform, and place it into an object
obj = V List Box( Eval( Parse( theScript ) ) );

// This will display the object
New Window( "Output", obj );
Jim
Aadit
Level III

Re: Get Script after User Input and Script to String

@txnelson But how to get script ... when variability chart selection  window opens then i want to get script after user selects "OK" button in that screen

Aadit_0-1709401383718.png

i want to capture variability chart script after user selects OK in this screen

dt = Open( "$SAMPLE_DATA/semiconductor capability.jmp" );
obj = dt << Variability Chart();
// I want to get Script after User clicks OK How to do that

 

txnelson
Super User

Re: Get Script after User Input and Script to String

I am not aware of anyway to capture the script prior to actually running the platform.  Also, JMP JSL will not pause a script as the user enters the information into the Variability Chart dialog screen.

This snippet of code shows that the line following the call for the Variability Chart is run regardless of the status of the dialog box.

variability chart();

show("code after variability chart invocation")

This is why I suggested that since the Variability Chart dialog box is limited and building your own version of it is very possible in JSL, and it will give you the control you need.

Jim