Jump to content

Beep when dialog box pops up


BALA
 Share

Recommended Posts

I was thinking something like this:

MsgBox(64, "Ring! Ring!", "The time is currently: ")
While 1
    If WinExists("Ring! Ring!") = 0 Then
        ExitLoop
    EndIf
    Beep(500, 500)
    Sleep(10)
WEnd

But it waits for the dialog box to close before it starts the beeping. Any ideas?

Edited by BALA
[font="Comic Sans MS"]BA-LA[/font]http://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com
Link to comment
Share on other sites

MsgBox pauses the execution of the script,...

...but if you really want a MsgBox to do what is requested in the OP, you can do it. Offload either the MsgBox of the Beeping to a child script.

TrayTip, ToolTip, SplashScreen, ... would be easier.

[size="1"][font="Arial"].[u].[/u][/font][/size]

Link to comment
Share on other sites

Run(@AutoItExe & ' /AutoIt3ExecuteLine "MsgBox(64, ""Ring! Ring!"", ""The time is currently: "")"')

WinWait("Ring! Ring!")

While 1
    If WinExists("Ring! Ring!") = 0 Then
        ExitLoop
    EndIf
    Beep(500, 500)
    Sleep(10)
WEnd

Edited by herewasplato

[size="1"][font="Arial"].[u].[/u][/font][/size]

Link to comment
Share on other sites

Will this work on a client without AutoIt installed? All my PCs have autoit installed.

Yes. I was pretty sure that it would - so, I uninstalled AutoIt and tested it. It works just fine.

This from the help file under "Running Scripts":

Execute another script file from a compiled AutoIt3 Script File. Then you don't need to fileinstall another copy of AutoIT3.exe in your compiled file.

It is true for execute line as well.

[size="1"][font="Arial"].[u].[/u][/font][/size]

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...