Jump to content

Recommended Posts

Posted

Hi,

I have a problem with MsgBox sounds.

No sound is heard when a message appears regardless of which flag I use.

I just installed the latest version of autoit and SciTE, but the problem still exists.

  • Moderators
Posted

Srecko,

Welcome to the AutoIt forums.

There is nothing in the AutoIt function to affect/change the sound - have you checked your Windows sound settings?

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

  Reveal hidden contents

 

Posted

MsgBox does not affect sound in one way or another. If you want a sound to be played, when you call MsgBox you will have to make a separate sound event.

Who lied and told you life would EVER be fair?

Posted (edited)
  On 8/7/2018 at 9:23 PM, benched42 said:

MsgBox does not affect sound in one way or another. If you want a sound to be played, when you call MsgBox you will have to make a separate sound event.

Expand  

Oh, but why get i some sound testing this example:

#include <MsgBoxConstants.au3>

Local $iTimeout = 10

; Display a message box with a nested variable in its text.
MsgBox($MB_SYSTEMMODAL + $MB_ICONWARNING, "Title", "This message box will timeout after " & $iTimeout & " seconds or select the OK button.", $iTimeout)

 

Edited by AutoBert
Posted (edited)
  On 8/7/2018 at 10:20 PM, AutoBert said:

Oh, but why get i some sound testing this example:

#include <MsgBoxConstants.au3>

Local $iTimeout = 10

; Display a message box with a nested variable in its text.
MsgBox($MB_SYSTEMMODAL + $MB_ICONWARNING, "Title", "This message box will timeout after " & $iTimeout & " seconds or select the OK button.", $iTimeout)

 

Expand  

That is because you are calling $MB_ICONWARNING.  Flag 48 produces a warning icon and plays the sound.  Also take note that flag 16 and 64 also plays a sound.  The other flags do not but you can combine the flags to produce the sound.  See examples below.

; Script Start - Add your code below here
MsgBox(65,"","Hello World!") ; Flag 1 (Ok and Cancel) + 64 (Information icon)
MsgBox(20,"","Hello World!") ; Flag 4 (Yes and No) + 16(stop icon)

 

Edited by LisHawj
Code correction
Posted (edited)
  On 8/8/2018 at 7:22 PM, AutoBert said:

and which of these ways:

i used?

I get sounds on all $MB_ICON* flags.

Expand  

I apologize, but I am not sure I understand what is being asked here.  Please clarify your question or statement.

Edited by LisHawj
Posted

I apologize to everyone, it's not a problem in the autoit.
The problem is in my operating system.
I tested on multiple computers and worked on everyone.

Posted (edited)
  On 8/8/2018 at 8:24 PM, Srecko said:

The problem is in my operating system.

Expand  

Then let us know, which system and build version. And can you confirm, that other winapps have same problem with MsgBox?

Edited by AutoBert

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
  • Recently Browsing   0 members

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