How to set up an alarm at strikes at designated interval? Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Raghava Doregowda
Posts: 147
Joined: 06 Nov 2022, 01:48

How to set up an alarm at strikes at designated interval?

20 Feb 2024, 18:26

I wish to make a small alarm that reminds me at intervals like x:42am where x can be 4,5,6,7 so that I can be intimated about the time. Almost like a dialogue box appearing with a small sound near the clock area that doesn't disturb regular operations. How do I do that? The older versions of windows unfortunately do not have timers/alarms built into them.
User avatar
V0RT3X
Posts: 362
Joined: 20 May 2023, 21:59
Contact:

Re: How to set up an alarm at strikes at designated interval?

20 Feb 2024, 19:22

This sounds like it may be close to what you are looking for...
viewtopic.php?f=6&t=53915#p233475
Rohwedder
Posts: 7895
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: How to set up an alarm at strikes at designated interval?  Topic is solved

22 Feb 2024, 05:02

Hallo,
not for Windows 11! Try:

Code: Select all

CT := 4 ; border thickness
Times = 04:42,05:42,06:42,07:42
WinGetPos,, CY,,, ahk_class Shell_TrayWnd
ControlGetPos, CX,, CW, CH, TrayClockWClass1, ahk_class Shell_TrayWnd
Gui, New, +ToolWindow -Caption +LastFound +AlwaysOnTop +E0x20 +HwndRed
Gui, Color, Red
WinSet, Region,% "0-0 "CW "-0 "CW "-"CH " 0-"CH " 0-0 "CT "
-"CT " "CW-CT "-"CT " "CW-CT "-"CH-CT " "CT "-"CH-CT " "CT "-"CT
Gui, Show, x%CX% y%CY% w%CW% h%CH% NA
WinHide,% Red := "ahk_id " Red
SetTimer, Time, 1000
Return
Time:
Time := A_Hour ":" A_Min
Loop,% 20 * ((Time <> OldTime) And InStr(Times, OldTime:=Time)) {
	WinShow,% Red
	WinSet, AlwaysOnTop, On,% Red
	SoundPlay, %A_WinDir%\Media\Windows Navigation Start.wav, 1
	WinSet, AlwaysOnTop, Off,% Red
	WinHide,% Red
	SoundPlay, %A_WinDir%\Media\Windows Navigation Start.wav, 1
}
Return
Ticks and let flashes a red frame around the TrayClock.
Raghava Doregowda
Posts: 147
Joined: 06 Nov 2022, 01:48

Re: How to set up an alarm at strikes at designated interval?

03 May 2024, 20:51

Rohwedder wrote:
22 Feb 2024, 05:02
Hallo,
not for Windows 11! Try:

Code: Select all

CT := 4 ; border thickness
Times = 04:42,05:42,06:42,07:42
WinGetPos,, CY,,, ahk_class Shell_TrayWnd
ControlGetPos, CX,, CW, CH, TrayClockWClass1, ahk_class Shell_TrayWnd
Gui, New, +ToolWindow -Caption +LastFound +AlwaysOnTop +E0x20 +HwndRed
Gui, Color, Red
WinSet, Region,% "0-0 "CW "-0 "CW "-"CH " 0-"CH " 0-0 "CT "
-"CT " "CW-CT "-"CT " "CW-CT "-"CH-CT " "CT "-"CH-CT " "CT "-"CT
Gui, Show, x%CX% y%CY% w%CW% h%CH% NA
WinHide,% Red := "ahk_id " Red
SetTimer, Time, 1000
Return
Time:
Time := A_Hour ":" A_Min
Loop,% 20 * ((Time <> OldTime) And InStr(Times, OldTime:=Time)) {
	WinShow,% Red
	WinSet, AlwaysOnTop, On,% Red
	SoundPlay, %A_WinDir%\Media\Windows Navigation Start.wav, 1
	WinSet, AlwaysOnTop, Off,% Red
	WinHide,% Red
	SoundPlay, %A_WinDir%\Media\Windows Navigation Start.wav, 1
}
Return
Ticks and let flashes a red frame around the TrayClock.
@Rohwedder Thank you so much! I can work with this!

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: No registered users and 108 guests