Sound loop

 
Is there a way to loop a sound till user do something?, I mean a sound loop untill user click ok, if there is a way to know if alert window is open it could be done with that, but i could find any info.
 

Here is a little sample of a way to do it:

Put this "indicator" on a chart. It is weekend right now so "refresh" the chart to make it work, or wait for ticks to come.

Every eight ticks/refreshes (roughly) it will raise an "alert" on screen, and sound on every tick until you delete the message.

 
#include <WinUser32.mqh>
 
 
int start()
{
 
    static bool SoundAlertOn = false;
    static int  loopCount;
    
    if(ObjectFind("SoundLabel") == -1){
        SoundAlertOn = false;
    }
    Comment("Loopcount = ", MathMod(loopCount, 8));
    if(SoundAlertOn == false  &&  MathMod(loopCount, 8) == 0){
        SoundAlertOn = true;
        ObjectCreate("SoundLabel", OBJ_LABEL, 0, 0, 0, 0);
        ObjectSetText("SoundLabel", "DELETE ME TO STOP SOUND", 24, "Arial Bold", Red);
    }
    
    if(SoundAlertOn == true){
        PlaySound("Alert.wav");
    }
    loopCount++;
}
Reason: