Valik Posted June 4, 2004 Posted June 4, 2004 (edited) This is all that's necessary to make JdeB's idea found here work.A compiled version can be found http://www.autoitscript.com/fileman/users/Valik/autoit3.exeThis only works with an editor capable of grabbing the data, such as SciTE. The line I used to test with in SciTE was:autoit3dir=C:\Path\To\Modified\File command.go.$(au3)=$(autoit3dir)\autoit3.exe /ErrorStdOut "$(FilePath)"In globaldata.h, globaldata.cpp, add variable:bool g_bStdOut;In Application.cpp: Initialize g_bStdOut to false in AutoIt_App::AutoIt_App() In AutoIt_App::ParseCmdLine() after the if block looking for a /c request, add this:else if (stricmp("/ErrorStdOut", szTemp) == 0) { g_bStdOut = true; if (nNumParams == 1) { pvTemp->ArraySubscriptClear(); // Reset the subscript pvTemp->ArraySubscriptSetNext(1); // Array is 1 element (num params) pvTemp->ArrayDim(); // Dimension array pvTemp->ArraySubscriptClear(); // Reset the subscript pvTemp->ArraySubscriptSetNext(0); // Set subscript we want to access pvElement = pvTemp->ArrayGetRef(); // Get reference to the element *pvElement = 0; // $CmdLines[0] = 0 return; } --nNumParams; // Decrement because we strip the /ErrorStdOut from the command line g_oCmdLine.GetNextParam(szTemp); // skip to the next item }Finally in script.cpp, modify these:In FatalError(int iErr, int nCol):if (g_bStdOut) printf("%s (%d) : ==> %s: \n%s \n%s\n",szInclude, nAutScriptLine, szText, szScriptLine, szOutput2 ); else MessageBox(g_hWnd, szOutput, szTitle, MB_IConstop | MB_OK | MB_SYSTEMMODAL | MB_SETFOREGROUND);And in FatalError(int iErr, const char *szText2):if (g_bStdOut) printf("%s (%d) : ==> %s: \n%s \n%s\n",szInclude, nAutScriptLine, szText, szScriptLine, szText2); else MessageBox(g_hWnd, szOutput, szTitle, MB_IConstop | MB_OK | MB_SYSTEMMODAL | MB_SETFOREGROUND); Edited June 4, 2004 by Valik
Developers Jos Posted June 4, 2004 Developers Posted June 4, 2004 Tested it sucessfully with textpad, Scite and Crimson with the test version i had .... Just tried your version and it looks great !!! SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Valik Posted June 4, 2004 Author Posted June 4, 2004 Forgot to mention, that code works for both versions of ParseCmdLine() so it needs to go into both.
Administrators Jon Posted June 4, 2004 Administrators Posted June 4, 2004 I've added it to my copy, ta. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now