daslick Posted January 15, 2007 Share Posted January 15, 2007 This is set up at the beginning of my program to find arguments.... dim $args = "", $howrun = "" ;Command line useage! if $CmdLine[0] > 0 Then for $i = 1 to $CmdLine[0] Global $args = $args & " " & $CmdLine[$i] Next Select Case $args = "password" MsgBox(0,"","a") Case $args = "admin" ProcessClose("explorer.exe") Run("explorer.exe") Case $args = "" Case Else if $args = "password" then MsgBox(0,"A","FSA") if $args <> "password" then MsgBox(0,"ASDDAADADAADADAD",$args) $args = FileGetLongName($args, 1) _ra($args) Exit EndSelect EndIf Every time I run it with the arguments 'password' it doesn't msgbox(0,"","a") like it should, but it does MsgBox(0,"ASDDAADADAADADAD",$args) and tells me that $args = "password"... I don't get it. so $args = password but it doesn't? Could some1 help me with this sloppy and, apparently, broken function? Link to comment Share on other sites More sharing options...
BALA Posted January 15, 2007 Share Posted January 15, 2007 (edited) How can $arg <> "password" , wouldn't that mean $arg less than or greater than "password"?Perhaps your'e looking for If NOT $arg = "password" then ;whatever(Sorry if I have that wrong) Edited January 15, 2007 by BALA [font="Comic Sans MS"]BA-LA[/font]http://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com Link to comment Share on other sites More sharing options...
daslick Posted January 15, 2007 Author Share Posted January 15, 2007 that should do the same thing... regardless, "case $args = "password" is not working even though $args = "password" Can some1 please helP? I've rewritten this like 5 times Link to comment Share on other sites More sharing options...
xcal Posted January 15, 2007 Share Posted January 15, 2007 How can $arg <> "password" , wouldn't that mean $arg less than or greater than "password"?You might want to look up operators in the help file. How To Ask Questions The Smart Way Link to comment Share on other sites More sharing options...
BALA Posted January 15, 2007 Share Posted January 15, 2007 (edited) You might want to look up operators in the help file.Yeah, my previous BASIC experience messed me up. Edited January 15, 2007 by BALA [font="Comic Sans MS"]BA-LA[/font]http://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com Link to comment Share on other sites More sharing options...
Developers Jos Posted January 15, 2007 Developers Share Posted January 15, 2007 don't you want something like this ? Your for-next loop really build the content of $CommandLineRaw Dim $args = "", $howrun = "" ;Command line useage! For $i = 1 To $CmdLine[0] $args = $CmdLine[$i] Select Case $args = "password" MsgBox(0, "", "a") Case $args = "admin" ProcessClose("explorer.exe") Run("explorer.exe") Case $args = "" Case Else If $args = "password" Then MsgBox(0, "A", "FSA") If $args <> "password" Then MsgBox(0, "ASDDAADADAADADAD", $args) $args = FileGetLongName($args, 1) _ra ($args) Exit EndSelect Next 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...
Developers Jos Posted January 15, 2007 Developers Share Posted January 15, 2007 Yeah, my previous BASIC experience messed me up.nah ... basic always had the NotEqual <> for as long as I can remember ... and I am pretty sure I am older 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...
BALA Posted January 15, 2007 Share Posted January 15, 2007 nah ... basic always had the NotEqual <> for as long as I can remember ... and I am pretty sure I am older In DarkBASIC and NT Batch Scripting for example it means less than or greater than, but since those are the only other BASIC-ish languages I know, I guess you're probably right. Well now I know, thanks. [font="Comic Sans MS"]BA-LA[/font]http://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com Link to comment Share on other sites More sharing options...
daslick Posted January 15, 2007 Author Share Posted January 15, 2007 Thanks a lot Jbd... I don't quite understand what I did wrong... I do like how u got the arguments though. 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