| View previous topic :: View next topic |
| Author |
Message |
Pallie
Joined: 05 Jul 2004 Posts: 57 Location: London
|
Posted: Wed Feb 23, 2005 10:52 pm Post subject: echo |
|
|
Hi
Would it be easy/possible to add a feature so that a script could be called from the command prompt and issue output to the command prompt? For example:
| Code: | c:\> sayhello.exe
Hello from autohotkey script
c:\> |
I guess something like
| Code: | | echo, hello from autohotkey script |
So that autohotkey scripts could be used in other script languages in the same way as other command prompt programs can be used in Autohotkey, and their output captured. |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10480
|
Posted: Thu Feb 24, 2005 1:48 am Post subject: |
|
|
Something close to has been added in today's update:
FileAppend:
Specifying an asterisk (*) for Filename causes Text to be sent to standard output (stdout). Such text can be redirected to a file, piped to another EXE, or captured by fancy text editors. For example, the following would be valid if typed at a command prompt:
"%ProgramFiles%\AutoHotkey\AutoHotkey.exe" "My Script.ahk" >"Error Log.txt"
However, text sent to stdout will not appear at the command prompt it was launched from. This can be worked around by downloading a utility such as PipeSplit.exe (8 KB) and using a command line such as the following:
"%ProgramFiles%\AutoHotkey\AutoHotkey.exe" "My Script.ahk" |pipesplit.exe nul |
|
| Back to top |
|
 |
|