Permalink
Browse files

Implement changes requested by HotKeyIt

- Bundled script now does not have a trailing newline
- If the compiler is uncompiled, it uses A_AhkPath for /iLib resolving
  • Loading branch information...
1 parent 3345dd4 commit 4f66ec806f76e2915b6733db8dafb0044db9bbd1 @fincs committed Dec 23, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 ScriptParser.ahk
View
4 ScriptParser.ahk
@@ -116,10 +116,12 @@ PreprocessScript(ByRef ScriptText, AhkScript, ExtraFiles, FileList="", FirstScri
Util_Status("Auto-including any functions called from a library...")
ilibfile = %A_Temp%\_ilib.ahk
FileDelete, %ilibfile%
- RunWait, "%A_ScriptDir%\..\AutoHotkey.exe" /iLib "%ilibfile%" "%AhkScript%", %FirstScriptDir%, UseErrorLevel
+ static AhkPath := A_IsCompiled ? A_ScriptDir "\..\AutoHotkey.exe" : A_AhkPath
+ RunWait, "%AhkPath%" /iLib "%ilibfile%" "%AhkScript%", %FirstScriptDir%, UseErrorLevel
IfExist, %ilibfile%
PreprocessScript(ScriptText, ilibfile, ExtraFiles, FileList, FirstScriptDir, Options)
FileDelete, %ilibfile%
+ StringTrimRight, ScriptText, ScriptText, 1 ; remove trailing newline
}
if OldWorkingDir

0 comments on commit 4f66ec8

Please sign in to comment.