Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #NoEnv
- #SingleInstance, Force
- SetBatchLines, -1
- ; ---------------------- PROJECT CODE BELOW ----------------------
- Menu, Tray, Icon, Shell32.dll, 3 ; Custom Icon pulled from Shell32
- Menu, tray, tip, %A_ScriptName% ; Custom traytip
- Gui, GUI_Overlay:New, +ToolWindow +LastFound +AlwaysOnTop -Caption +hwndGUI_Overlay_hwnd
- Gui, Margin, 10, 10
- Gui, Font, s40 q4, Segoe UI Bold
- Gui, Add, Text, w400 Center vTEXT_Timer cWhite, %timerCount% seconds
- Gui, Color, 000000
- WinSet, Transparent, 200
- ; Trigger hotkey
- 2::
- timerCount := 20 ; Change me
- GuiControl, GUI_Overlay:, TEXT_Timer, %timerCount% seconds
- Gui, GUI_Overlay:Show, x20 y20 NoActivate
- SetTimer, Timer_Countdown, 1000
- return
- ; Does the countdown and updating of the timer
- Timer_Countdown:
- if (timerCount == 1) {
- SetTimer, Timer_Countdown, Off
- Gui, Gui_Overlay:Hide
- }
- timerCount--
- GuiControl, GUI_Overlay:, TEXT_Timer, %timerCount% seconds
- return
- Esc::
- ExitApp
Advertisement
Add Comment
Please, Sign In to add comment