Jump to content

Recommended Posts

Posted (edited)

Good day,
I am developing an application installation script - wherein, everything is functioning as it should – with the EXCEPTION of the selection of the closing "Finish" button.

I have tried a number of approaches for selecting this option – all without any success.

Interestingly, I AM ABLE to exit the final  dialog manually - via the [Enter] key - just NOT programmatically!

Can anyone please tell me what I doing wrong here?
Here is the script:

Spoiler
; -----------------------------------------------
#include <AutoItConstants.au3>
; -----------------------------------------------
Opt("MustDeclareVars", 1)
; -----------------------------------------------
Global $iTimeOut = 100
; ---------------------
Global $sSrcAppInstallPathInstRegGR5 = "D:\App_Install\Digital_Audio\2_GR5\Assets\NI_InstReg_GR5.exe"
Global $sSrcAppInstallPathGR5 = "D:\App_Install\Digital_Audio\2_GR5\Assets\GuitarRig5\Setup.exe"
; -----------------------------------------------
Install_SAW()
; -----------------------------------------------
Func Install_SAW()
    Local $sSrcPath1 = $sSrcAppInstallPathInstRegGR5
    Local $sSrcPath2 = $sSrcAppInstallPathGR5
    ; -----------------------------------------------
    ; Navigate through the dialogs
    Run($sSrcPath1)
    WinWaitActive("NI InstReg Guitar Rig 5 Setup")
    Send("{TAB}Sleep($iTimeOut){ENTER}")
    ; ---------------------
    Sleep($iTimeOut)
    Run($sSrcPath2)
    WinWaitActive("Native Instruments Guitar Rig 5 - InstallAware Wizard")
    Send("{ENTER 4}")
    ; ---------------------
    Sleep($iTimeOut)
    Send("{ALTDOWN}")
    Send("a")
    Send("{ALTUP}")
    Send("{ENTER}")
    ; ---------------------
    Sleep($iTimeOut)
    MouseClick($MOUSE_CLICK_LEFT, 776, 490, 1, 0)
    Send("{DOWN 2}{ENTER 2}")
    ; ---------------------
    ; Installation is now executed!
    Sleep($iTimeOut)
    Send("{TAB}{ENTER}{ENTER}")
    ; ---------------------
    ; Finish
    WinWaitActive("Native Instruments Guitar Rig 5 - InstallAware Wizard")
    Send("{ENTER}")
EndFunc   ;==>Install_SAW
; -----------------------------------------------

 

 Interestingly, the final "Finish" dialog is already active! However, attempting both with this line commented out and not - still no success!!!
• A MouseClick($MOUSE_CLICK_LEFT, 776, 490, 1, 0) does not work either!

As always...any assistance in this matter would be greatly appreciated!

Thank you all for your time!

Edited by mr-es335
Posted

Good day,
I discovered that the script is exiting just after...

; Installation is now executed!
    Sleep($iTimeOut)
    Send("{TAB}{ENTER}{ENTER}")

...and before the following is reached..

; Finish
    WinWaitActive("Native Instruments Guitar Rig 5 - InstallAware Wizard")
    Send("{ENTER}")

Thus, how can I ensure that the last 2 lines will be executed?

Posted (edited)

Hello,
So, I discovered that the following "works" - though NOT very elegant!!...

; ---------------------
    ; Installation is now executed!
    Sleep($iTimeOut)
    Send("{TAB}{ENTER}{ENTER}")
    ; ---------------------
    ; Finish
    Sleep(6000) ; Pause the script for 6 seconds!!! Why???
    Send("{ENTER}")


 

 

Edited by mr-es335

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
×
×
  • Create New...