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

How can use JSL to stop the other JSL that is currently running and execute this new JSL?

For example, the previous code has been run in a aaa.JSL, it has a long wait

aaa

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

Now run a new JSL:bbb.jsl, how can it stop running aaa.jsl

bbb

Close  Script("aaa");//??

Close(dt,nosave);

Thanks!

1 REPLY 1
txnelson
Super User

Re: How can use JSL to stop the other JSL that is currently running and execute this new JSL?

You can do it by putting in a check that tests to see if a .txt file has changed.  In your second instance of JMP, you can run a simple script that changes the .txt file.

First script

Names Default To Here( 1 );

Save Text File( "$TEMP/flag.txt", "0", replace );

For( i = 1, i <= 100, i++,
	If( Load Text File( "$TEMP/flag.txt" ) == "0",
		Wait( 1 ),
		Throw()
	)
);
Show( i );

Script for second instance of JMP

names default to here(1);
Save Text File( "$TEMP/flag.txt", "1", replace );
Jim