Jump to content

Play sound until MsgBox is confirmed


Recommended Posts

Hi there!

I searched for nearly an hour now but i can't find an answer to my question.

I'm searching for a code that allows me to play a sound in loop until a message box is confirmed. I know that it is possible somehow but i just can't figure out how and it drives me mad!

It should work like this:

If something happens then a msgbox should be shown and a sound played in loop until this msgbox is confirmed.

Thx for all your answers.

Link to comment
Share on other sites

I am pretty sure that the msgbox will pause the script until ok is pressed. To do what you want you will have to make your own GUI msgbox.


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Link to comment
Share on other sites

Ok, and how can i do this with my own GUI? I've never created my own GUI with AutoIt...

Get SciTE (Link in sig) install it and check tools>>Koda

solves all your GUI building problems

EDIT:

Of course, if you never made your own GUI before, Searching the helpfile or the online one(Also in sig) will be a great place to get more info

And if you haven't done it yet, check Valuater's "Autoit 1-2-3" Its a sticky in scripts and scraps

Edited by Paulie
Link to comment
Share on other sites

Well, I've solved it like this now:

Func Popup ()
    $mainwindow = GUICreate ( "Problem!!!" )
    GUICtrlCreateLabel ( "some text!!!", 30, 10 )
    $okbutton = GUICtrlCreateButton ( "OK", 70, 50, 60 )
    GUICtrlSetOnEvent ( $okbutton, "OKButton" )
    GUISetState ( @SW_SHOW )

    While 1
        SoundPlay ( "c:\windows\media\whatever.wav", 1 )
    WEnd    
EndFunc

And this works perfectly for me...

Edited by Abierle
Link to comment
Share on other sites

Well, but i've got another concern now.

I want to get a session-id from a homepage. I know how to get to the source-code of the page and i found the session id in the source code. i know the exact url that is in front of the session id and i know that the session is always 12 characters long. Is there a way to get the session id and copy it to a variable?

Link to comment
Share on other sites

The Problem is, that the Session ID is not visible in the address line. It is ONLY visible if you point your mouse on the link or in the source code. So IE.au3 wouldn't help me much since i would also have to search the source code for these 12 characters...

Link to comment
Share on other sites

The Problem is, that the Session ID is not visible in the address line. It is ONLY visible if you point your mouse on the link or in the source code. So IE.au3 wouldn't help me much since i would also have to search the source code for these 12 characters...

Cannot you do a string search of the source code? See StringInStr in the help file.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...