Developers Jos Posted September 29, 2004 Developers Share Posted September 29, 2004 Hi Tylo,I am trying to use your program with my prefered editor, PSPad, and to let it capture the output of your program I tried to redirect the output to a log file by using the ">" operator. However this does not seem to work as what your program puts in the file is not what it prints in the command window. Is there a way to solve this issue?Cheers,Angel<{POST_SNAPBACK}>Try using : au3check script.au3 > file.log 2>&1 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. Link to comment Share on other sites More sharing options...
Angel Posted September 30, 2004 Share Posted September 30, 2004 Thanks JdeB. This solves the problem on the command line, but it still does not work with my editor. I've to check if I am setting it up incorrectly. By the way, can you explain me what does your solution do? I don't understand the 2>&1 bit. Cheers, Angel Link to comment Share on other sites More sharing options...
Developers Jos Posted September 30, 2004 Developers Share Posted September 30, 2004 Thanks JdeB. This solves the problem on the command line, but it still does not work with my editor. I've to check if I am setting it up incorrectly.By the way, can you explain me what does your solution do? I don't understand the 2>&1 bit.Cheers,Angel<{POST_SNAPBACK}>> is STDOUT2> is STDERR 2>&1 means pipe the STDERR to the STDOUT pipe. 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. Link to comment Share on other sites More sharing options...
tylo Posted October 8, 2004 Author Share Posted October 8, 2004 Version v1.11 Quite a few updates. - added check for first string parameter Opt/ControlSendCommand/Mouse* - improved error message for block structures missing closing keyword (if/select/while...) - prints all output to stdout - not to stderr anymore - prints number of errors/warning as summery. - updated .def file. Download in first post - will update that post later. Have a nice weekend. blub Link to comment Share on other sites More sharing options...
Valik Posted October 8, 2004 Share Posted October 8, 2004 Version v1.11Quite a few updates. - added check for first string parameter Opt/ControlSendCommand/Mouse* - improved error message for block structures missing closing keyword (if/select/while...) - prints all output to stdout - not to stderr anymore - prints number of errors/warning as summery. - updated .def file.Download in first post - will update that post later.Have a nice weekend.<{POST_SNAPBACK}>Changes look good, except 1. I kind of liked the output going to stderr. This made it very easy to automate batch scanning of files. By redirecting output to a file, any file that had a non-zero size had errors. Thats not possible now since the file name and Au3Check version is printed to the same location as the errors.With that said, how about a command line option to strip extraneous information leaving just the errors? Something like /errorsonly, perhaps?Thanks for the other changes, though, they look good. Link to comment Share on other sites More sharing options...
Valik Posted October 8, 2004 Share Posted October 8, 2004 tylo, question and a bug.First the question, what is the number 1 for in this (And all other) lines?%Opt 1 CaretCoordModeSecond, the bug. This feature appears to only match the first parameter, which means ControlCommand() is bugged (it's variable parameter is the 4th). I thought perhaps the number told Au3Check which parameter to match against, but that doesn't appear to be the case. If that were the case, though, then my question would be answered and the bug fixed by just changing all ControlCommand() stuff to a 4. Link to comment Share on other sites More sharing options...
Angel Posted October 8, 2004 Share Posted October 8, 2004 Tylo, thanks for the update. I guess that I am doing something wrong but I still cannot get my editor to use the output of your program. Perhaps another option would be to have an "-out" parameter where you cold specify that you want to program to output the check results to a file instead of to stdout or stderr? That combined to Valik's suggestion would make this easier to use with other editors. Cheers, Angel Link to comment Share on other sites More sharing options...
Valik Posted October 8, 2004 Share Posted October 8, 2004 Angel, it writes to stdout. If the editor captures stdout, then it will capture the text, otherwise, running it as such will send the text to a file: au3check.exe "My Au3 File.au3" > file.txt Link to comment Share on other sites More sharing options...
tylo Posted October 9, 2004 Author Share Posted October 9, 2004 Valik: Alright, I'll put error output back to stderr, and add an -q option (quiet) for errors only output. The 1 in '%Opt 1 CaretCoordMode' should mean what you though - parameter one. Unfortunately, it currently support the first parameter only (I forgot that ContolCommand had its "enum" parameter as second). It is a bit of work to support multiple parameter, as the original intention was. But I'll take another look at it. Anglel: As Valik said, you should be able to redirect with >, but I may add an output to file as well - maybe. blub Link to comment Share on other sites More sharing options...
Valik Posted October 9, 2004 Share Posted October 9, 2004 Valik: Alright, I'll put error output back to stderr, and add an -q option (quiet) for errors only output.The 1 in '%Opt 1 CaretCoordMode' should mean what you though - parameter one. Unfortunately, it currently support the first parameter only (I forgot that ContolCommand had its "enum" parameter as second). It is a bit of work to support multiple parameter, as the original intention was. But I'll take another look at it.Anglel: As Valik said, you should be able to redirect with >, but I may add an output to file as well - maybe.<{POST_SNAPBACK}>Well, leaving it at stdout would be perfectly fine with the -q option. I only felt that one or the other was important, both probably aren't. But its your call on that. I will definitely be using the -q option, though.Thanks for taking a look at the other issue. Link to comment Share on other sites More sharing options...
tylo Posted October 9, 2004 Author Share Posted October 9, 2004 au3check v1.12 : Fixed: checks string values for up to 4 parameters now. Added -q (quiet) option. Note the current limitation of parameters that can be checked. Enough for ControlCommand(). blub Link to comment Share on other sites More sharing options...
Valik Posted October 9, 2004 Share Posted October 9, 2004 au3check v1.12 : Fixed: checks string values for up to 4 parameters now. Added -q (quiet) option.Note the current limitation of parameters that can be checked. Enough for ControlCommand().<{POST_SNAPBACK}>Cool. Thanks for the quick changes. Link to comment Share on other sites More sharing options...
Valik Posted November 27, 2004 Share Posted November 27, 2004 Ugh, new syntax change with optional/default parameters in user functions breaks Au3Check. I hope this is something you can fix, tylo, because I looked at some of the code and I don't know where to begin to support this new feature. Link to comment Share on other sites More sharing options...
tylo Posted November 28, 2004 Author Share Posted November 28, 2004 Ugh, new syntax change with optional/default parameters in user functions breaks Au3Check. I hope this is something you can fix, tylo, because I looked at some of the code and I don't know where to begin to support this new feature.<{POST_SNAPBACK}>Sure, its an easy addition to the yacc code. I assume that only literal numbers, strings and macros can be given as default values, and not for Byref params. parameter : VARIABLE '=' NUMBER { ... } | VARIABLE '=' STRING { ... } | VARIABLE '=' MACRO { ... } | VARIABLE { ... } | K_ByRef VARIABLE { ... } ;I will upload a new version soon. blub Link to comment Share on other sites More sharing options...
Valik Posted November 28, 2004 Share Posted November 28, 2004 Cool, thanks. I didn't know it would be that easy. Also, while you're updating, remember to support the new registry keys Jon has changed to. I had to manually change those myself and recompile. Link to comment Share on other sites More sharing options...
Administrators Jon Posted November 28, 2004 Administrators Share Posted November 28, 2004 Sure, its an easy addition to the yacc code. I assume that only literal numbers, strings and macros can be given as default values, and not for Byref params. parameter : VARIABLE '=' NUMBER { ... } | VARIABLE '=' STRING { ... } | VARIABLE '=' MACRO { ... } | VARIABLE { ... } | K_ByRef VARIABLE { ... } ;I will upload a new version soon.Just strings and numbers at the mo. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
tylo Posted November 29, 2004 Author Share Posted November 29, 2004 (edited) Ok, au3check v1.13 - Accept optional parameters with default values (nums and strings). - Checks that params following optional are also optional. - Changed registry lookup for includes search Did some code "improvements", so lets hope nothing is broken. Edited November 29, 2004 by tylo blub Link to comment Share on other sites More sharing options...
Valik Posted November 29, 2004 Share Posted November 29, 2004 Ok, au3check v1.13 - Accept optional parameters with default values (nums and strings).- Checks that params following optional are also optional. - Changed registry lookup for includes searchDid some code "improvements", so lets hope nothing is broken.<{POST_SNAPBACK}>Thanks tylo. I just recompiled 23 scripts, all of which get Au3Check'd first. I saw no problems as a result of your "improvements". Link to comment Share on other sites More sharing options...
Developers Jos Posted November 29, 2004 Developers Share Posted November 29, 2004 (edited) Ok, au3check v1.13 - Accept optional parameters with default values (nums and strings).- Checks that params following optional are also optional. - Changed registry lookup for includes searchDid some code "improvements", so lets hope nothing is broken.<{POST_SNAPBACK}>Tylo,Had a quick look at the source and saw you only support the NEW registry location in this new version. The tempfix version I included in the latest Scite4AutoIt3 checks the new location first and when that doesn't exist check the old registrykeys for the include info to support the folks using the 3.0.102 version.Thanks, Edited November 29, 2004 by JdeB 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. Link to comment Share on other sites More sharing options...
tylo Posted November 29, 2004 Author Share Posted November 29, 2004 Updated to v1.14: Uses old AutoIt3 registry path if new does not exist. Cheers. blub Link to comment Share on other sites More sharing options...
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