Jump to content
Sign in to follow this  

passing dynamic commandline switches to compiled script?

Recommended Posts


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


Share this post

Link to post
Share on other sites

Does this help ? http://www.autoitscript.com/forum/index.php?showtopic=59773&view=findpost&p=452254

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
Live for the present,
Dream of the future,
Learn from the past.

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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.