ErrorStdOut

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
tcebob
Posts: 21
Joined: 23 Jan 2017, 21:40

ErrorStdOut

27 May 2018, 14:10

Error.jpg
Error.jpg (26.36 KiB) Viewed 1259 times
I'm following a YouTube tutorial and got to this point. The message box comes up but I get an error comment. What does /ErrorStdOut mean?
gregster
Posts: 9054
Joined: 30 Sep 2013, 06:48

Re: ErrorStdOut

27 May 2018, 14:26

This is not showing an error. Scite4AHk only tells you with this that it launched the script with the command line switch /ErrorStdOut (https://autohotkey.com/docs/Scripts.htm#cmd) when run through the editor.

So what does it do?
AHK docs wrote:This allows fancy editors such as TextPad, SciTE, Crimson, and EditPlus to jump to the offending line when a syntax error occurs.
(https://autohotkey.com/docs/commands/_ErrorStdOut.htm)

That means, syntax errors that prevent a script from launching are displayed in the stderr area rather than displaying a dialog. The stderr area is simply the area at the bottom of the editor where you read the term /ErrorStdOut, or

Code: Select all

>"C:\Program Files\AutoHotkey\AutoHotkey.exe" /ErrorStdOut "C:\Users\tcebo\Desktop\New AutoHotkey Script.ahk"
= Use Autohotkey.exe in the specified path to run the specified script and use the command line option /ErrorStdOut
Last edited by gregster on 27 May 2018, 14:44, edited 2 times in total.
gregster
Posts: 9054
Joined: 30 Sep 2013, 06:48

Re: ErrorStdOut

27 May 2018, 14:38

With that said, you still have kind of a syntax error in your script, but that gets ignored, as I believe. But you could try it out ;)

Code: Select all

#SingleInstance [Force]
is wrong. These brackets [ ] stand for optional parameters in the AHK help file and should not actually be included (exceptions in certain contexts, like array syntax, exist). I hope these brackets are not present in the video tutorial. It should read

Code: Select all

#SingleInstance Force
I think your code will act as if the parameter was completely omitted (compare https://autohotkey.com/docs/commands/_S ... stance.htm, also the example section there for the correct syntax), because no valid parameter was found.
(Unfortunately), AHK is (sometimes) quite lenient in these cases.
tcebob
Posts: 21
Joined: 23 Jan 2017, 21:40

Re: ErrorStdOut

27 May 2018, 19:44

Many thanks! I did include the brackets because they appeared in Help.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Aqualest and 198 guests