Enhance the Options parameter of run()
Posted: 18 Dec 2022, 07:38
1, add "Activate" parameter. Many processes don't activate after loading, they just keep blinking in the taskbar. I had to write a function like this instead of run()
2, I don't know which winapi is used by run(), I guess it is CreateProcess().
I am an ahk-h user and I use other software to load ahk.dll. When these dll threads call run() to create threads, it is very different from ahk.exe calling run() to create threads.
I can't set the CREATE_NEW_CONSOLE flag so that the new process doesn't create its own console, but takes over the current software's console.
My software uses a lot of worker processes, and the child processes exit as the parent process exits. I also can't use the work process related flags in run().
I would like Options to support the definition of the "CreateProcess()-dwCreationFlags" parameter, such as run(exe, dir, "max CREATE_NEW_CONSOLE")
or run(exe, dir, "max 0x00000010")
Code: Select all
runshow(pt, dir?, opt?) {
run(pt, dir?, opt?, &pid)
if id := WinWait("ahk_pid " pid, , 1)
WinShow(id), WinActivate(id)
}
I am an ahk-h user and I use other software to load ahk.dll. When these dll threads call run() to create threads, it is very different from ahk.exe calling run() to create threads.
I can't set the CREATE_NEW_CONSOLE flag so that the new process doesn't create its own console, but takes over the current software's console.
My software uses a lot of worker processes, and the child processes exit as the parent process exits. I also can't use the work process related flags in run().
I would like Options to support the definition of the "CreateProcess()-dwCreationFlags" parameter, such as run(exe, dir, "max CREATE_NEW_CONSOLE")
or run(exe, dir, "max 0x00000010")