Hello,
I would like to ask if there is any way to avoid pause loop when we click on Menu in AutoIt GUI?
* without using _Timer_SetTimer.
[Edit 2021-02-14 20:45] Solved! Big thanks for @MrCreatoR, below solution:
#include <GuiMenu.au3>
; Create GUI.
$hGUI = GUICreate("Autoit GUI", 200, 100)
; Create menu and item.
Local $menu = GUICtrlCreateMenu("&Click here")
GUICtrlCreateMenuItem("none", $menu)
$hMenu = _GUICtrlMenu_GetMenu($hGUI)
_GUICtrlMenu_SetMenuStyle($hMenu, $MNS_MODELESS)
; Crate label to control progress.
Local $label = GUICtrlCreateLabel("Working: ", 60, 30, 160)
; Set start time point script.
Local $startPoint = 0
; Show GUI.
GUISetState(@SW_SHOW)
; Loop until the user exits.
While 1
; Set new time to label.
GUICtrlSetData($label, "Working: " & $startPoint & "%")
; add point
$startPoint += 1
; When point is above 100 reset
If $startPoint >= 100 Then $startPoint = 0
; Listen signal from GUI.
Switch GUIGetMsg()
Case -3
Exit
EndSwitch
WEnd