I need to return a string like ABCD:1234;DEFG;5678 to the calling environment from a compiled .exe file.
I am using AHK v. 1.1.30.1
I execute the .exe in cmd and wish it to return the value to screen.
I have tried:
return
ExitApp
ExitCode (it whould be possible to return an expression from this)
StrPut
with no success until now. I need it to return the value the same way a .bat file in cmd would return the command "echo ABCD:1234;DEFG;5678"
my compiled ahk file is performing an amount of functionality which results in a string that I need written to screen. Is it possible?
Return string to cmd screen from compiled .exe AHK script Topic is solved
Re: Return string to cmd screen from compiled .exe AHK script
Is there really nobody that can help how to make an .exe compiled ahk file return a string when executed in console?
My AHK .exe file performs some logic and returns the results in the form of a semicolon separated string.
Something like
34223423;23423545;234234
Is it possible to have the .exe file return that when executed in cmd console?
The same way a .bat file returns with "echo 34223423;23423545;234234"
Please help.
Thank you.
My AHK .exe file performs some logic and returns the results in the form of a semicolon separated string.
Something like
34223423;23423545;234234
Is it possible to have the .exe file return that when executed in cmd console?
The same way a .bat file returns with "echo 34223423;23423545;234234"
Please help.
Thank you.
Re: Return string to cmd screen from compiled .exe AHK script
Can check to see if the command console is active through IfWinActive and then input the string.
https://www.autohotkey.com/docs/commands/WinActive.htm
So if console isn't active, it runs however you have it running now.
If console is active, you can send the input as text so you can see the command in the console just like @echo in .bat files.
https://www.autohotkey.com/docs/commands/WinActive.htm
So if console isn't active, it runs however you have it running now.
If console is active, you can send the input as text so you can see the command in the console just like @echo in .bat files.
Re: Return string to cmd screen from compiled .exe AHK script
Perhaps you want this:
To write:
FileAppend with * (stdout) or ** (stderr):
FileAppend - Syntax & Usage | AutoHotkey
https://www.autohotkey.com/docs/commands/FileAppend.htm
To read:
ExecScript example code to receive stdout/stderr:
Run / RunWait - Syntax & Usage | AutoHotkey
https://www.autohotkey.com/docs/commands/Run.htm
To write:
FileAppend with * (stdout) or ** (stderr):
FileAppend - Syntax & Usage | AutoHotkey
https://www.autohotkey.com/docs/commands/FileAppend.htm
To read:
ExecScript example code to receive stdout/stderr:
Run / RunWait - Syntax & Usage | AutoHotkey
https://www.autohotkey.com/docs/commands/Run.htm
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
Re: Return string to cmd screen from compiled .exe AHK script Topic is solved
Thank you all. This did the trick:
Fileappend:
Standard Output (stdout): Specifying an asterisk (*) for Filename causes Text to be sent to standard output (stdout).
Easier than I thought.
Fileappend:
Standard Output (stdout): Specifying an asterisk (*) for Filename causes Text to be sent to standard output (stdout).
Easier than I thought.