Jump to content

Recommended Posts

Posted

AutoIt sound functions can help when we need to play mp3 and wav files, but how can I go about playing Windows sounds like Question, Exclamation, OK, and Asterisk?

Posted (edited)

Zedna, thanks much! I'm glad it is possible. But for some reason when I run the above script I hear no sound. But I do hear the sound when I just do the following:

SoundPlay("C:\WINDOWS\media\notify.wav",1)
Edited by Noob
Posted (edited)

Your computer may have it's sound files in a different place.

Thanks, BALA. I'm looking for a solution that would work on any pc. The script by Zedna gave me hope it would be possible, but for some reason it's not working yet.

Edited by Noob
Posted

Zedna, thanks much! I'm glad it is possible. But for some reason when I run the above script I hear no sound. But I do hear the sound when I just do the following:

SoundPlay("C:\WINDOWS\media\notify.wav",1)
Just uncoment line with MsgBox() and check if that file exists.

Also run RegEdit and look at HKEY_CURRENT_USER\AppEvents\Schemes\Apps\.Default\

Note: I tested this on WIN98, so maybe on WINXP it may be somewhere else.

Posted (edited)

Thanks. The location on my machine is the same:

HKEY_CURRENT_USER\AppEvents\Schemes\Apps\.Default\

(and this pc uses the default sound scheme).

I suspect a problem may be that the value for $wav your scrips it getting is %SystemRoot%\media\Windows XP Notify.wav and the following will not play:

SoundPlay("%SystemRoot%\media\Windows XP Notify.wav",1)oÝ÷ Ù»­¶¬v¬jëh×6SoundPlay("C:\WINDOWS\media\Windows XP Notify.wav",1)

So my noob-type question is how I can modify your script to I guess substitute the %SystemRoot% part with @WindowsDir?

EDIT: I'm going to look at the other solution you just posted. Thanks!

Edited by Noob

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