Jump to content
Sign in to follow this  

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


Share this post

Link to post
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:


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

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

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


Edited by Mat

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