Código: Seleccionar todo
Opt("WinWaitDelay",100)
Opt("WinTitleMatchMode",4)
Opt("WinDetectHiddenText",1)
Opt("MouseCoordMode",0)
#NoTrayIcon
$tiempo = TimerInit()
Do
If "@OSArch=X64" Then
Run("X64.exe /S")
ProcessWaitClose("X64.exe")
Run(@HomeDrive&"\Archivos de Programa\WinRAR\WinRAR.exe")
If WinWaitActive("[CLASS:WinRarWindow]","", 2) Then
Sleep(250)
Send("{CTRLDOWN}s{CTRLUP}")
If WinWaitActive("Configuración") Then
Sleep(250)
MouseMove(397,42)
MouseDown("left")
MouseUp("left")
MouseMove(99,265)
MouseDown("left")
MouseUp("left")
MouseMove(116,173)
MouseDown("left")
MouseUp("left")
MouseMove(115,196)
MouseDown("left")
MouseUp("left")
MouseMove(265,383)
MouseDown("left")
MouseUp("left")
Sleep(250)
ProcessClose("WinRAR.exe")
Exit
EndIf
Else
If WinWaitActive("Configuración") Then
Sleep(250)
MouseMove(397,42)
MouseDown("left")
MouseUp("left")
MouseMove(99,265)
MouseDown("left")
MouseUp("left")
MouseMove(116,173)
MouseDown("left")
MouseUp("left")
MouseMove(115,196)
MouseDown("left")
MouseUp("left")
MouseMove(265,383)
MouseDown("left")
MouseUp("left")
Sleep(250)
ProcessClose("WinRAR.exe")
Exit
EndIf
EndIf
Else
Run("X86.exe /verysilent")
ProcessWaitClose("X86.exe")
Run(@ProgramFilesDir&"\WinRAR\WinRAR.exe")
If WinWaitActive("[CLASS:WinRarWindow]", "", 2) Then
Sleep(250)
Send("{CTRLDOWN}s{CTRLUP}")
If WinActive("Configuración") Then
Sleep(250)
MouseMove(397,42)
MouseDown("left")
MouseUp("left")
MouseMove(99,265)
MouseDown("left")
MouseUp("left")
MouseMove(116,173)
MouseDown("left")
MouseUp("left")
MouseMove(115,196)
MouseDown("left")
MouseUp("left")
MouseMove(265,383)
MouseDown("left")
MouseUp("left")
Sleep(250)
ProcessClose("WinRAR.exe")
Exit
EndIf
Else
If WinActive("Configuración") Then
Sleep(250)
MouseMove(397,42)
MouseDown("left")
MouseUp("left")
MouseMove(99,265)
MouseDown("left")
MouseUp("left")
MouseMove(116,173)
MouseDown("left")
MouseUp("left")
MouseMove(115,196)
MouseDown("left")
MouseUp("left")
MouseMove(265,383)
MouseDown("left")
MouseUp("left")
Sleep(250)
ProcessClose("WinRAR.exe")
Exit
EndIf
EndIf
EndIf
Until TimerDiff($tiempo)>=5000
MsgBox(4096,"Error","Ha habido algún tipo de error en la aplicación al no encontrarse la ventana",5)
ProcessClose("WinRAR.exe")
Exit
Código: Seleccionar todo
If "@OSArch=X64" Then
Código: Seleccionar todo
Else
Código: Seleccionar todo
Run("X86.exe /verysilent")