Jump to content

MsgBox sound problem in Windows 10


Recommended Posts

  • Moderators

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:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

1 hour ago, 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.

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
Link to comment
Share on other sites

15 hours ago, 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)

 

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
Link to comment
Share on other sites

30 minutes ago, AutoBert said:

and which of these ways:

i used?

I get sounds on all $MB_ICON* flags.

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

Edited by LisHawj
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...