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

Opening a text file with the run program() command, why does JSL pause?

Hello!

I open a text file with the following command.
Until this text file is closed, JSL is in a waiting state and cannot perform operations later in JSL.

 

2022-09-11_20-39-26.png

2 ACCEPTED SOLUTIONS

Accepted Solutions
Craige_Hales
Super User

Re: Opening a text file with the run program() command, why does JSL pause?

Store the RunProgram object in a variable.

rp = Run Program( executable( "notepad.exe" ) );

If you don't keep the RunProgram object somewhere, JMP deletes the object. When the RunProgram object is deleted, it can't always force the remote program to terminate. It has to wait for the remote program to gracefully end.

 

Craige

View solution in original post

lala
Level VII

Re: Opening a text file with the run program() command, why does JSL pause?

Thank Craige!

Yes, I found other ways

Launch the text file with AHK

AHK

Run C:\1\ABC.txt

 

 

Just run the AHK through JSL and it will work.

run program(executable("I:\00\AHK\AutoHotkey.exe"),options({"D:\`AHK\TXT.ahk"}));

 

View solution in original post

4 REPLIES 4
lala
Level VII

Re: Opening a text file with the run program() command, why does JSL pause?

How does this change the code?

win 7 64BIT

jmp 14

 

Thanks!

 

lala
Level VII

Re: Opening a text file with the run program() command, why does JSL pause?

Run Program( executable( "I:\00\Em64\EmEditor.exe" ), options( {"C:\1\ABC.txt"} ) );
Craige_Hales
Super User

Re: Opening a text file with the run program() command, why does JSL pause?

Store the RunProgram object in a variable.

rp = Run Program( executable( "notepad.exe" ) );

If you don't keep the RunProgram object somewhere, JMP deletes the object. When the RunProgram object is deleted, it can't always force the remote program to terminate. It has to wait for the remote program to gracefully end.

 

Craige
lala
Level VII

Re: Opening a text file with the run program() command, why does JSL pause?

Thank Craige!

Yes, I found other ways

Launch the text file with AHK

AHK

Run C:\1\ABC.txt

 

 

Just run the AHK through JSL and it will work.

run program(executable("I:\00\AHK\AutoHotkey.exe"),options({"D:\`AHK\TXT.ahk"}));