Answer the question
In order to leave comments, you need to log in
How to program a button in AutoIT?
Hello.
I'm struggling with installing software in automatic mode.
Wrote a GUI and made 4 buttons in AutoIT
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("BDD", 224, 257, 389, 220)
$Button1 = GUICtrlCreateButton("Установить GIT", 8, 8, 209, 49)
$Button2 = GUICtrlCreateButton("Установить Gradle", 8, 72, 209, 49)
$Button3 = GUICtrlCreateButton("Установить JDK", 8, 136, 209, 49)
$Button4 = GUICtrlCreateButton("Установить IDE", 8, 200, 209, 49)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
Run("D:\SOFT\Git-2.19.0-64-bit.exe")
WinWait("Git 2.19.0 Setup", "GNU General Public License")
WinActivate("Git 2.19.0 Setup", "GNU General Public License")
WinWaitActive("Git 2.19.0 Setup", "GNU General Public License")
ControlClick("Git 2.19.0 Setup", "","[CLASS:TNewButton; INSTANCE:1]")
ControlClick("Git 2.19.0 Setup", "&Next >","[CLASS:TNewButton; INSTANCE:1]", "left",1642192,39,12)
ControlClick("Git 2.19.0 Setup", "&Next >","TNewButton1")
EndSwitch
WEnd
Answer the question
In order to leave comments, you need to log in
solved
WinWaitActive("[CLASS:TNewNotebookPage; INSTANCE:1]", "", 1)
AutoItSetOption('MouseCoordMode', 0)
ControlClick ("Git 2.19.0 Setup", "","TNewButton1" )
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question