Sign in to follow this  
Followers 0
GoogleDude

passing dynamic commandline switches to compiled script?

2 posts in this topic

I have a script that has a few different func() in it. the func() have $vars that are used but the vars will be set at runtime when the compiled script is run.

an example is

C:\mycompiledscript.exe /staticswich:dynamicvalue /staticswich:dynamicvalue

the dynamicvalue word would be replaced with what every I want the vars to be set as so they can be used inside the script. If that makes sense.

my code sample Im using to try yo debug it is below.

If $CMDLINE[0] And $CMDLINE[1] = '/filename:' And $CMDLINE[2] = '/emailaddress:' Then
    ; msg command line switches passed for debugging
    MsgBox(48,"",$CMDLINE[1]&" "&" "&$CMDLINE[2])
    ; call what ever function
EndIf
Exit

~GD

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