Jump to content

Command Line $var


Recommended Posts

Ok I've searched around and can't figure it out, I have the fallowing script which I altered from a different post

select
    case $cmdline[0] = 0 ; check to see if there is a parameter
        msgbox(0, "No Param", "Please specify start or end")
    Case $CmdLine[1] = "Start"
            $CmdLine[2] = $Var
        msgbox(0,"",$var)
    Case $cmdline[1] = 'end' ; if parameter is end
        msgbox(0, "End", "all done")
    Case Else ; if parameter is other
        msgbox(0, "No Param", "Please specify start or end")
EndSelect
Exit

I did something backwords or wrong somewhere

I want it so that start 1 will make the msgbox say "1", start 2 say "2" but I don't want the 1 or 2 to be a $var because I'm going to have an unlimited amount of numbers and letters that can be put in.

I know it's possible I just don't understand basically the short version is I want it so

Start.exe /Start 123

Where 123 is a $var

Please note I cannot read the manual due to corruption on my computer, I've read the online doc and can't figure it out from there.

Link to comment
Share on other sites

If you want to assign the parameter you've passed in cmd line you have to flip your expression:

$CmdLine[2] = $Var
oÝ÷ Ù8^rëyË_¢¹¢±«­¢+Ø(ÀÌØíYÈôÀÌØí
µ1¥¹lÉtoÝ÷ Ø l¢)íç(f§vX§{*.·*^^rëyËb±+Z®×±y+Z®ÝvÜò¢ì×!jx¶©j¶¦z׫¶Òµªír§ëazÌ"µÈ¢jZ®+(«­¢+Ø)
ÍÀÌØí
µ1¥¹lÅtôÅÕ½Ðì½MÑÉÐÅÕ½Ðì(
Edited by Leandro Conca
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...