Sign in to follow this  
Followers 0
lhite

Vista $CmdLine

6 posts in this topic

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.

Share this post


Link to post
Share on other sites



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

four

Test with one two three four returns 4 parameters:

one

two

three

four

:whistle:

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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. :whistle:

Share this post


Link to post
Share on other sites

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]

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0