Jump to content
Sign in to follow this  
GoogleDude

Adding command line switches to my compiled script?

Recommended Posts

GoogleDude

I was hoping to be able to add command line support/switches to my compiled scipt. How do I go about doing this?

For Exmaple!

If I have a GUI that has two buttons that do different Functions but would like to have a command line such as "myscript.exe /function1" this would do what ever function 1 is defined to do and "myscript.exe /function2" this would be the other function that I predefine. I searched the help a little but wasnt sure just what I would be looking for.

Can anyone please point be in the correct direction?

Thx

GoogleDude

Share this post


Link to post
Share on other sites
Xenobiologist

Hi,

have a look at Command Line Parameters in the help file.

So long,

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites
PsaltyDS

I was hoping to be able to add command line support/switches to my compiled scipt. How do I go about doing this?

For Exmaple!

If I have a GUI that has two buttons that do different Functions but would like to have a command line such as "myscript.exe /function1" this would do what ever function 1 is defined to do and "myscript.exe /function2" this would be the other function that I predefine. I searched the help a little but wasnt sure just what I would be looking for.

Can anyone please point be in the correct direction?

Thx

GoogleDude

Online help file: Command Line Parameters:

If $CmdLine[0] > 0 Then
     Select $CmdLine[1]
          Case "/function1"
               _Function1()
          Case "/function2"
               _Function2()
     EndSelect
EndIf

:)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites
MHz

If you have the full Scite4AutoIt3 package, then you can press "Ctrl+Shift+R" and browse for "cmdline..." for some big incoming $CMDLINE[...] parameter structures. Good for a seriously wicked script.

:)

Share this post


Link to post
Share on other sites
PsaltyDS

If you have the full Scite4AutoIt3 package, then you can press "Ctrl+Shift+R" and browse for "cmdline..." for some big incoming $CMDLINE[...] parameter structures. Good for a seriously wicked script.

:P

OOOOooooooh... New Toy! :)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

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  

×