Search the Community
Showing results for tags 'autoi'.
-
I have a problem, I want the function :send key in loop to be activated when the checkbox is selected and when the check box is turned off, the function turns off. I tried and only one checkbox works after selecting the second checkbox is flashing and cant be unchecked. I have looked through the entire forum and there is no such topic anywhere code #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Compile_Both=y #AutoIt3Wrapper_UseX64=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <TrayConstants.au3> #include <MsgBoxConstants.au3> #include<Date.au3> #include <DateTimeConstants.au3> #include <InetConstants.au3> #include <WinAPIFiles.au3> #RequireAdmin Global $Paused HotKeySet("{f9}", "TogglePause") Opt("GUIOnEventMode", 1) $Form1 = GUICreate("test)", 269, 165, 228, 373) Local $Checkbox1 = GUICtrlCreateCheckbox("", 240, 24, 17, 17) GUICtrlSetOnEvent($Checkbox1,"test1") GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit") $Checkbox2 = GUICtrlCreateCheckbox("Checkbox2", 240, 48, 17, 17) GUICtrlSetOnEvent($Checkbox2,"test2") #EndRegion ### END Koda GUI section ### GUISetState(@SW_SHOW) global $start1 = 0 Lglobal $start2=0 While 1 if GUICtrlRead($Checkbox2)= 1 Then Send( "{f1}" ) EndIf if GUICtrlRead($Checkbox1)= 1 Then Send( "{f2}" ) EndIf WEnd Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused = SCRIPT IS NOT RUNNING = you wont get another message if you dont unpause it"',0,0) WEnd ToolTip("") EndFunc Func test1() $start1 =1 EndFunc Func test2() $start2=1 EndFunc Func _Exit() Exit EndFunc