cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Discussions

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

An interesting question

This JSL is looped once per minute, and it's set to be saved as a local JSL.

I tried two ways, but the effects are different:

1. In a JMP table, click on its saved script to run (the table has already established a script to run this JSL).

2. Directly open this JSL script file and click the run button to run.

The effect of the first method is that during the loop's waiting period, other JSL cannot be run (I have set event response scripts on some columns of this table).

The second method allows the table's event response scripts to run during the loop waiting period.

Why?

Thanks Experts!

3 REPLIES 3
lala
Level IX

回复: An interesting question

 

C:\TT3.jsl

dt=Current Data Table();
 for(k=1,k<=60,k++,
 t1=tick seconds();
 try(Close(d3,nosave)); 
t2=tick seconds();tt=t2-t1;if(tt>60,t3=120-tt,t3=60-tt);Wait(t3);
 ); 

 

 

dt=Open("$SAMPLE_DATA/Big Class.jmp");


dt=Current Data Table();
:age<<Add Column Properties(Set Property("Event Handler",Event Handler(Click(JSL Quote(Function( {thisTable, thisColumn, iRow}, {},  dt=Current Data Table();ab=(Current Data Table()<<get selected rows)[1];gm=Current Data Table()[ab,"age"]; dt<<Select Where(age==gm);d3=dt<<Subset(Output Table("T3"),Selected Rows(1),selected columns(0));try(d3<<Delete Table Property("Source")); );)))));

Current Data Table() << New Script("TT",JSL Quote(  
dt=Current Data Table();
Include("C:\TT3.jsl");
 	
 ),As String(1));

 

2025-10-21_13-30-49.png

jthi
Super User

Re: An interesting question

Not directly answer to your question but have you tried using Schedule()  (and JSL Syntax Reference > JSL Messages > Schedule Messages ) instead of a loop?

-Jarmo
lala
Level IX

Re: An interesting question

Thanks!

There are no displayed records in the log

 

Minor issue: From now on, I can run it using the JSL of the local file.
2025-10-22_19-50-43.png

Recommended Articles