code := "msgbo, this shouldn't compile"
FileAppend, % "#ErrorStdOut`nexitapp`n" code, % A_ScriptDir "\JPGIncTempFile.ahk"
RunWait, %A_AhkPath% /ErrorStdOut "%A_scriptdir%\JPGIncTempFile.ahk" <"%A_scriptdir%\errorlog.txt"
FileRead, errorlog, % A_ScriptDir "\errorlog.txt"
msgbox % errorlog
Stderr
Stderr
I'm going to dynamically modify the code of my running script but I want to check if there are any syntax errors before reloading. Can anyone tell me whats wrong with this?
Re: Stderr
=============================RunWait, %ComSpec% /c start /b /wait "" "%A_AhkPath%" /ErrorStdOut "%A_ScriptDir%\JPGIncTempFile.ahk" 2>"%A_scriptdir%\errorlog.txt",, Hide
btw, why this doesn't work:
RunWait, %ComSpec% /c "%A_AhkPath%" /ErrorStdOut "%A_ScriptDir%\JPGIncTempFile.ahk" 2>"%A_scriptdir%\errorlog.txt",, Hide
Last edited by tmplinshi on 10 Oct 2013, 15:06, edited 1 time in total.
Re: Stderr
I think it is a missing " " to create a great block, we can see red character in documentation, maybe old legacy and confusing with expression
RunWait, %ComSpec% /c ""%A_AhkPath%" /ErrorStdOut "%A_ScriptDir%\JPGIncTempFile.ahk" 2> "%A_scriptdir%\errorlog.txt""
RunWait, %ComSpec% /c ""%A_AhkPath%" /ErrorStdOut "%A_ScriptDir%\JPGIncTempFile.ahk" 2> "%A_scriptdir%\errorlog.txt""
Re: Stderr
Thanks, Zelio! That works.
Who is online
Users browsing this forum: Bing [Bot], bobstoner289, peter_ahk, Spawnova and 360 guests