Why does it close the application?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
jaardesign
Posts: 1
Joined: 27 Jul 2017, 15:09

Why does it close the application?

27 Jul 2017, 15:20

Hello, I am using the code below, but after it launches the nodejs command prompt and enters the commands, nodejs closes.
I just want it to leave the nodejs command prompt window open.
Sometimes when I manually launch nodejs after it closes it, i see it paste in the commands. So it might be closing right after it opens.

' Run, nodevars.bat
winactivate, Administrator: Node.js command prompt
WinWaitActive, Administrator: Node.js command prompt
send, cd C:\Users\IBM_ADMIN\Documents\Watson\ChkMissingIntentsFromKMSv1\ChkMissingIntentsFromKMSv1{enter}
send, node ChkMissingIntentsFromKMSv1{enter}
'
Can anyone help?
User avatar
Delta Pythagorean
Posts: 627
Joined: 13 Feb 2017, 13:44
Location: Somewhere in the US
Contact:

Re: Why does it close the application?

27 Jul 2017, 20:41

The program or script (Not AHK itself) could be a single thread execution, there might be an if command in the code that checks for something and since it returned true (Or false, I don't know what the program is checking for) it closed. This can be replicated in many compiled programs in the System32 folder, once you run one of the programs, it shows a CMD prompt, and then it closes then after.

It's safe to say, that AHK has nothing to do with it.

[AHK]......: v2.0.12 | 64-bit
[OS].......: Windows 11 | 23H2 (OS Build: 22621.3296)
[GITHUB]...: github.com/DelPyth
[PAYPAL]...: paypal.me/DelPyth
[DISCORD]..: tophatcat

BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: Why does it close the application?

28 Jul 2017, 02:06

It might make sense to 'translate' nodejs.bat to plain AHK code, so you have better control.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Google [Bot] and 229 guests