Sign in to follow this  
Followers 0
AcidCorps

Command Line $var

5 posts in this topic

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.

Share this post


Link to post
Share on other sites



I didn't really understand what you want, but I'll give it a try:

Run("Start.exe /Start " & $var)

Share this post


Link to post
Share on other sites

thats what I want the outcome to be but how do I assign the $var from the command line?

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

Awesome thank you

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