Jump to content

application switces ???


Recommended Posts

hello everybody

can anyone tell me how to detect application switches by autoit , please ?????

coz I need it so much and searched a lot but I didn't find any good result

for example : adobe flash player has a switch : /install , /uninstall

and I found that hardly

so I need you help please

thanks

Link to comment
Share on other sites

AutoIt has a built in way in the form of $CmdLine and $CmdLineRaw, but these can get a bit cumbersome when you have multiple switches with options. To make it easier (mostly just for myself) I wrote a 2 function wrapper If you want to use a slash as the symbol then you'll need to explicitly call the Parse function:

_CmdLine_Parse("/")

But after that you can get whether a parameter is set by using:

If CmdLine("install") Then
    ; Install
ElseIf CmdLine("uninstall") then
    ; Uninstall
EndIf

If you are only going to have a couple of switches then you are better off with a Switch inside a loop though.

Mat

Edited by Mat
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...