Play beep until dialog box closes?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
chef423
Posts: 213
Joined: 28 Aug 2016, 12:10
Contact:

Play beep until dialog box closes?

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?

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
Contact:

Re: Play beep until dialog box closes?

21 Nov 2017, 18:08

No luck, I tried 0 as well..

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Holarctic, jameswrightesq, wpulford and 408 guests