Play beep until dialog box closes?

Get help with using AutoHotkey and its commands and hotkeys
chef423
Posts: 213
Joined: 28 Aug 2016, 12:10
Google: Christopher Smith
GitHub: chef23

Play beep until dialog box closes?

Post by chef423 » 21 Nov 2017, 16:47

Code: Select all

Loop {
	WinWait, Quick Add

	SoundGet, master_mute, , mute ; this will check if volume is muted or therwise
	if ( master_mute == "On" )  
   	SoundSet, +1,, mute ; this will unmute
	SoundSet, 60
	 
	SoundBeep, 1400, 5000  ; Play a higher pitch for half a second
	WinWaitClose, Quick Add
	
	SoundSet, -50,, mute ; this will mute

           }
Return
This plays the sound for 3 seconds, but I want it to continue to sound until 'Quick Add' dialog box is closed.

Any assistance is appreciated.

Nested loop?
Georgie Munteer

Re: Play beep until dialog box closes?

Post by Georgie Munteer » 21 Nov 2017, 17:08

chef423 wrote:

Code: Select all

Loop {
	WinWait, Quick Add

	SoundGet, master_mute, , mute ; this will check if volume is muted or therwise
	if ( master_mute == "On" )  
   	SoundSet, +1,, mute ; this will unmute
	SoundSet, 60
	 
	SoundBeep, 1400, 5000  ; Play a higher pitch for half a second
	WinWaitClose, Quick Add
	
	SoundSet, -50,, mute ; this will mute

           }
Return
This plays the sound for 3 seconds, but I want it to continue to sound until 'Quick Add' dialog box is closed.

Any assistance is appreciated.

Nested loop?
maybe a -1 timer?
chef423
Posts: 213
Joined: 28 Aug 2016, 12:10
Google: Christopher Smith
GitHub: chef23

Re: Play beep until dialog box closes?

Post by chef423 » 21 Nov 2017, 18:08

No luck, I tried 0 as well..
Post Reply

Return to “Ask For Help”