I am new to AutoHotKey.
I use SciTE4AutoHotKey, need print some log when debugging.
Is there something like ConsoleWrite of AutoIt in AutoHotKey?
Any help will be highly appreciated!
[Resolved] Print to Console
[Resolved] Print to Console
Last edited by birbird on 02 Jul 2015, 03:16, edited 2 times in total.
Re: Print to Console
I could be wrong but I think if you put OutputDebug,[your text here] it will display in the debugger
John H Wilson III 05/29/51 - 03/01/2020. You will be missed.AHK Studio OSDGUI Creator
Donations
Discord
All code is done on a 64 bit Windows 10 PC Running AutoHotkey x32
Donations
Discord
All code is done on a 64 bit Windows 10 PC Running AutoHotkey x32
Re: Print to Console
If you write to stdout (when running the script via SciTE), it will appear in SciTE's output pane:
maestrith: Only if you are debugging (not just running) the script.
Code: Select all
; Method 1
FileAppend line 1`n, *
; Method 2
stdout := FileOpen("*", "w")
stdout.WriteLine("line 2")
stdout.WriteLine("line 3")
Re: Print to Console
Good to knowlexikos wrote:If you write to stdout (when running the script via SciTE), it will appear in SciTE's output pane:maestrith: Only if you are debugging (not just running) the script.Code: Select all
; Method 1 FileAppend line 1`n, * ; Method 2 stdout := FileOpen("*", "w") stdout.WriteLine("line 2") stdout.WriteLine("line 3")
John H Wilson III 05/29/51 - 03/01/2020. You will be missed.AHK Studio OSDGUI Creator
Donations
Discord
All code is done on a 64 bit Windows 10 PC Running AutoHotkey x32
Donations
Discord
All code is done on a 64 bit Windows 10 PC Running AutoHotkey x32
Re: Print to Console
Thanks for your reply. It helps.maestrith wrote:I could be wrong but I think if you put OutputDebug,[your text here] it will display in the debugger
But it can only work under debug mode, printing message in a stream viewer window.
When I say debug, I mean finding problem of the programm.
Just like AutoIt, many other languages can simplely output to the console.
Java: System.out.println
JavaScript: Console.log
ruby: puts
...
I am finding something like that.
Re: Print to Console
Ah, sorry. When I read your original post you had mentioned "debug" so I assumed that you meant you were debugging....I suppose we all know what happens when we assume.
John H Wilson III 05/29/51 - 03/01/2020. You will be missed.AHK Studio OSDGUI Creator
Donations
Discord
All code is done on a 64 bit Windows 10 PC Running AutoHotkey x32
Donations
Discord
All code is done on a 64 bit Windows 10 PC Running AutoHotkey x32
Re: Print to Console
Thanks a lot.lexikos wrote:If you write to stdout (when running the script via SciTE), it will appear in SciTE's output pane:maestrith: Only if you are debugging (not just running) the script.Code: Select all
; Method 1 FileAppend line 1`n, * ; Method 2 stdout := FileOpen("*", "w") stdout.WriteLine("line 2") stdout.WriteLine("line 3")
This is exactly what I want.
Re: Print to Console
It is so kind of you. Thank you so much.maestrith wrote:Ah, sorry. When I read your original post you had mentioned "debug" so I assumed that you meant you were debugging....I suppose we all know what happens when we assume.