Replace MsgBox with GUI reminder and countdown

Replace the instant MsgBox and immediate ExitApp with a small always-on-top GUI reminder (AutoHotkey v2). Adds Arabic text label and a countdown button that starts disabled showing "انتظر... (2)", updates to "انتظر... (1)", then enables and becomes "تم / OK"; clicking the button or closing the window exits the script. Also sets font and window options, and uses GUI event handlers for a cleaner user interaction.
This commit is contained in:
2026-03-03 16:13:06 +02:00
parent e5d6f480da
commit 01c1c6cea7

View File

@@ -1,8 +1,24 @@
#Requires AutoHotkey v2.0
; The * makes it trigger instantly
:*:199903::
{
MsgBox "لا تنسى ان تخرج واصل ايراد امس"
ExitApp ; This closes the script entirely
}
MyGui := Gui("+AlwaysOnTop -MinimizeBox", "تذكير")
MyGui.SetFont("s14", "Segoe UI")
MyGui.Add("Text", "w300 Center", "لا تنسى ان تخرج واصل ايراد امس")
MyBtn := MyGui.Add("Button", "w100 h40 x100 yp+40 Disabled", "انتظر... (2)")
MyBtn.OnEvent("Click", (*) => ExitApp())
MyGui.OnEvent("Close", (*) => ExitApp())
MyGui.Show()
Sleep 1000
MyBtn.Text := "انتظر... (1)"
Sleep 1000
MyBtn.Enabled := true
MyBtn.Opt("+Default")
MyBtn.Text := "تم / OK"
}