AlienStar Posted January 5, 2011 Share Posted January 5, 2011 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 More sharing options...
AdmiralAlkex Posted January 5, 2011 Share Posted January 5, 2011 Look at the helpfile page "Running Scripts" or look up "Command Line Parameters" in the index .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
Mat Posted January 5, 2011 Share Posted January 5, 2011 (edited) 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 EndIfIf you are only going to have a couple of switches then you are better off with a Switch inside a loop though.Mat Edited January 5, 2011 by Mat AutoIt Project Listing Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now