Execution fonction bouton simultanée
Posté : jeu. 11 janv. 2018 13:25
Bonjour,
J'aurais besoin de savoir quelles sont les technique que je peux employer sur AutoIt pour pouvoir lancer simultanement les actions de plusieurs boutons
Ce code illustre mon besoin :
Merci de votre aide
J'aurais besoin de savoir quelles sont les technique que je peux employer sur AutoIt pour pouvoir lancer simultanement les actions de plusieurs boutons
Ce code illustre mon besoin :
Code : Tout sélectionner
#include <GUIConstantsEx.au3>
#include <MsgBoxConstants.au3>
#include <WindowsConstants.au3>
#include <GuiListView.au3>
#include <Array.au3>
#include <GuiToolTip.au3>
$Frm_Window = GUICreate(" TEST AUTOMATIQUES ", 600, 500, 25, 50, $WS_OVERLAPPEDWINDOW, $WS_EX_ACCEPTFILES)
$Lstv_Test_1 = GUICtrlCreateListView("Col 1|Col 2| Col 3|Col 4 ", 5, 5, 400, 200)
$Lstv_Test_2 = GUICtrlCreateListView("Col 1|Col 2| Col 3|Col 4 ", 5, 5 + 220, 400, 200)
$Button1 = GUICtrlCreateButton("Action 1", 425, 5, 150, 30)
$Button2 = GUICtrlCreateButton("Action 2", 425, 5 + 40, 150, 30)
$Button3 = GUICtrlCreateButton("Action 3", 425, 5 + 40 + 40, 150, 30)
GUISetState(@SW_SHOW)
While 1
$Msg = GUIGetMsg()
Switch $Msg
Case $GUI_EVENT_CLOSE
ExitLoop
Case $Button1
Function_1()
Case $Button2
Function_2()
Case $Button3
Function_3()
EndSwitch
WEnd
Func Function_1()
For $i = 1 To 10
$New_Item = GUICtrlCreateListViewItem(" ceci|est|un|test" & $i, $Lstv_Test_1)
Sleep(1000)
Next
EndFunc ;==>Function_1
Func Function_2()
For $i = 1 To 10
$New_Item = GUICtrlCreateListViewItem(" ceci|est|un|test" & $i, $Lstv_Test_2)
Sleep(1000)
Next
EndFunc ;==>Function_2
Func Function_3()
MsgBox($MB_OK, "test", "ceci est un test")
EndFunc ;==>Function_3
Merci de votre aide