Sign in to follow this  
Followers 0
Abierle

Play sound until MsgBox is confirmed

10 posts in this topic

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.

Share this post


Link to post
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.



Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

i would probally go wtih 2 programs here :P use a fileinstall, and one with a playsound, and so ull do the fileinstall say into the temp, run it pop the message box up, and simply after the messagbeox put a processkill :nuke: simple way if its just going to pause when the messagebox pops up

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

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

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites

i would say use IE.au3 :P

Share this post


Link to post
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...

Share this post


Link to post
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.

Share this post


Link to post
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
Sign in to follow this  
Followers 0