Beta.7 UX Launcher fails to wait after launching script Topic is solved

Report problems with documented functionality
TAC109
Posts: 1099
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Beta.7 UX Launcher fails to wait after launching script

Post by TAC109 » 07 Aug 2022, 20:42

Code: Select all

@echo off
"Z Bug 2.ahk"
:: "C:\Program Files\AutoHotkey\AutoHotkeyU32.exe" "Z bug 2.ahk"
echo %errorlevel%
pause

Code: Select all

MsgBox
ExitApp 10
(Save the first script as Z Bug 2.cmd and the second as Z Bug 2.ahk both in the same directory.)

Run the Z Bug 2.cmd file as is, in a system where the UX launcher is installed. It will be observed that Z Bug 2.cmd terminates before Z Bug 2.ahk with an errorlevel of 0.

If, in the .cmd file, the second line is commented out and the third line is uncommented so that the launcher is not involved, the Z Bug 2.cmd file waits as expected until the Z Bug 2.ahk has terminated, and shows the correct errorlevel.

A similar problem occurs when a script RunWaits another script and involves the launcher.

Cheers
My scripts:-
XRef - Produces Cross Reference lists for scripts
ReClip - A Text Reformatting and Clip Management utility
ScriptGuard - Protects Compiled Scripts from Decompilation
I also maintain Ahk2Exe

lexikos
Posts: 9560
Joined: 30 Sep 2013, 04:07
Contact:

Re: Beta.7 UX Launcher fails to wait after launching script

Post by lexikos » 07 Aug 2022, 22:27

It is by design that the launcher does not wait if the std handles have not been redirected. In most cases, a script is being launched from Explorer and the launcher process does not need to sit around indefinitely.

lexikos
Posts: 9560
Joined: 30 Sep 2013, 04:07
Contact:

Re: Beta.7 UX Launcher fails to wait after launching script  Topic is solved

Post by lexikos » 26 Nov 2022, 03:51

v2.0-rc.1 changed the behaviour so this should no longer be an issue.

Post Reply

Return to “Bug Reports”