lhite Posted March 7, 2007 Share Posted March 7, 2007 i've just started trying to convert some stuff over to Vista and am having problems with some old AutoIt scripts. right off the bat, $CmdLine doesn't seem to want to work. under XP, if i run something like: myscript.au3 "one two three" four i get $CmdLine[0] = 2 and $CmdLine[1] is the string "one two three" (w/out the quotes). exactly as advertised. but under Vista, $CmdLine[0] = 4 and $CmdLine[1] is simply "one". best i can tell Vista is eating the double quotes. and i've tried single quotes, but still $CmdLine returns 4, but then $CmdLine[1] is now "'one". so it doesn't appear to eat the single quotes, but doesn't interpret them the way i want either. Link to comment Share on other sites More sharing options...
MHz Posted March 7, 2007 Share Posted March 7, 2007 Welcome, It is working as expected for me under Vista with using AutoIt v3.2.2.0. Test code For $i = 1 To $CMDLINE[0] MsgBox(0, $i & ' of ' & $CMDLINE[0], $CMDLINE[$i]) Next Test with "one two three" four returns 2 parameters: one two three fourTest with one two three four returns 4 parameters: one two three four Link to comment Share on other sites More sharing options...
lhite Posted March 7, 2007 Author Share Posted March 7, 2007 Welcome,It is working as expected for me under Vista with using AutoIt v3.2.2.0.wow, sure doesn't work for me. that's the same AutoIt version i have -- i ran your exact script and got different results. what in the world could be causing this? how are you running your script? i've tried running from a command window, from a desktop shortcut, and from the START SEARCH box -- all with the same, erroneous results. i'm clueless as to where to even begin trying to debug this. Link to comment Share on other sites More sharing options...
lod3n Posted March 7, 2007 Share Posted March 7, 2007 Does it work any differently when compiled? [font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font] Link to comment Share on other sites More sharing options...
lhite Posted March 7, 2007 Author Share Posted March 7, 2007 Does it work any differently when compiled?bingo! that's the answer! works one way compiled, another way interpreted. thanks -- at least now i know the workaround, although it's going to be a pain..... sheez, i wonder how many other ticking bombs there are in this Vista conversion. fun and games...... not. Link to comment Share on other sites More sharing options...
lod3n Posted March 8, 2007 Share Posted March 8, 2007 You might post about this in Feature Requests. It's probably not a bug per se, but it is a difference between the two OSes. [font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font] 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