Venom4444 Posted April 26, 2010 Posted April 26, 2010 Hi i found this nice script but dont under stand it so good. Can somebidy explain and then my next question is can i use this script on another App.? ; ; ---------------------------------------------------------------------------- ; ; ---------------------------------------------------------------------------- Opt("ExpandEnvStrings", 1) If $CMDLIne[0] = 1 Then If StringInStr($CMDLine[1], '/name:') Then $WinName = StringReplace($CMDLine[1], '/name:', '') While 1 If WinExists($WinName) Then WinActivate($WinName) WinWaitActive ($WinName) WinSetState ($WinName, "", @SW_HIDE) ExitLoop EndIf WEnd Else If StringInStr ($CMDLine[1], '\') Then $WorkingDir = StringReplace($CMDLine[1], "\"&StringRegExpReplace($CMDLine[1], ".*[\\|/]", "", 0), "") $file = ($CMDLine[1]) Run($file, $WorkingDir, @SW_Hide) Else $WorkingDir = '' $file = ($WorkingDir&'\'&$CMDLine[1]) Run($file, $WorkingDir, @SW_Hide) EndIf ;~ If FileExists($CMDLine[1]) Then ;~ Run($file, $WorkingDir, @SW_Hide) ;~ EndIf EndIf EndIf ; ---------------------------------------------------------------------------- ; ; ----------------------------------------------------------------------------
superfletch Posted July 18, 2010 Posted July 18, 2010 Hey there, This is probably a question for the AutoIt forum and not here. As far as I can tell the code shown is aimed at deciphering what happens when you run an autoit exe with a particular switch. eg - myautoitapp.exe /silent or myautoitapp.exe /installpath The idea is you modify the code and embed it into your autoit application to add switch options. Depending on what the app you create does then you could target other apps, but the value would be limited to the switches the other apps supports and OS based things that can affect apps like runas.
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