Jump to content

Recommended Posts

Posted

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

 

 

; ----------------------------------------------------------------------------

;

; ----------------------------------------------------------------------------

  • 2 months later...
Posted

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.

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



  • 134 What is your preferred operating system (PC)

    1. 1. Operating systems:


      • MacOS
      • Windows 10
      • Windows 11
      • Windows Vista
      • ChromeOS
      • Other (reply)

×
×
  • Create New...