Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 28 additions & 18 deletions automatic/jack/tools/chocolateyinstall.ahk
Original file line number Diff line number Diff line change
@@ -1,37 +1,47 @@
#NoEnv
; REMOVED: #NoEnv ; No longer used in AHK v2, this is now the default
; #Warn ; Enable warnings to assist with detecting common errors.
#NoTrayIcon
SetTitleMatchMode, 2 ; A windows's title can contain WinTitle anywhere inside it to be a match
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetControlDelay 0
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
SetTitleMatchMode(2) ; A windows's title can contain WinTitle anywhere inside it to be a match
SendMode("Input") ; Recommended for new scripts due to its superior speed and reliability.
SetControlDelay(0)
SetWorkingDir(A_ScriptDir) ; Ensures a consistent starting directory.

winTitle = Setup - JACK2
winTitle := "Setup - JACK2"

; Installing Jack
WinWait, %winTitle%, Welcome to the JACK, 120
ControlClick, &Next, %winTitle%
WinWait(winTitle, "Welcome to the JACK", 120)
ControlClick("&Next", winTitle)

; Readme
;WinWait, %winTitle%, Readme, 10
;ControlClick, &Next, %winTitle%

; License Agreement
WinWait, %winTitle%, License Agreement, 10
Sleep 500
WinWait(winTitle, "License Agreement", 10)
Sleep(500)
;ControlClick, Button4, %winTitle% ; I &agree with the above terms and conditions
ControlClick, TNewRadioButton1, %winTitle% ; I &agree with the above terms and conditions
ControlClick, &Next, %winTitle%
ControlClick("TNewRadioButton1", winTitle) ; I &agree with the above terms and conditions
ControlClick("&Next", winTitle)

; Components
WinWait, %winTitle%, Select Components, 10
Sleep 500
ControlClick, &Next, %winTitle%
WinWait(winTitle, "Select Components", 10)
Sleep(500)
ControlClick("&Next", winTitle)

; Select Start Menu Folder
WinWait, %winTitle%, Select Start Menu Folder, 10
Sleep 500
ControlClick, &Next, %winTitle%
WinWait(winTitle, "Select Start Menu Folder", 10)
Sleep(500)
ControlClick("&Next", winTitle)

; Ready to Install
WinWait(winTitle, "Ready to Install", 10)
Sleep(500)
ControlClick("&Install", winTitle)

; Jack has been successfully installed!
WinWait(winTitle, "Completing the JACK2 Setup Wizard", 30)
ControlClick("&Finish", winTitle)
;ControlClick, &Next >, %winTitle%

; Ready to Install
WinWait, %winTitle%, Ready to Install, 10
Expand Down