#NoTrayIcon #pragma compile(Out, CompileItCmd.exe) #pragma compile(Icon, icon.ico) #pragma compile(UPX, false) #pragma compile(Compatibility, win7) #pragma compile(CompanyName, scintilla4evr) #pragma compile(FileDescription, "CompileIt Command Line Utility") #pragma compile(FileVersion, 0.0.1.0) #pragma compile(FileDescription, "CompileIt") #pragma compile(FileVersion, 0.0.1.0) #pragma compile(x64, false) #pragma compile(Console, true) #include If Not @Compiled Then Exit If $CmdLine[0] = 0 Then $address = 'HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AutoIt3Script\Shell\_CompileIt (C)\Command' If Not StringInStr(RegRead($address, ""), @ScriptFullPath) Then If Not IsAdmin() Then Exit ShellExecute(@ScriptFullPath, "", @ScriptDir, "runas") RegWrite($address, '', 'REG_SZ', '"' & @ScriptFullPath & '" "%1"') EndIf Exit ConsoleWrite("Usage: CompileItCmd.exe ""file""") EndIf If $CmdLine[1] = "/help" Then Exit ConsoleWrite("Usage: CompileItCmd.exe ""file""") EndIf $iCITPid = Run(StringFormat('"%s" "%s"', @ScriptDir & "\CompileIt", $CmdLine[1]), @WorkingDir, @SW_HIDE, $STDOUT_CHILD) While ProcessExists($iCITPid) $sRead = StdoutRead($iCITPid) If @extended > 0 Then ConsoleWrite($sRead) EndIf WEnd Exit ShellExecuteWait(StringRegExpReplace($cmdline[1], "\\[^\\]*$", "") & "\__build\build.log")