Jump to content

Splash and Sound


Recommended Posts

I am attempting to try my luck at using a splash screen WITH sound as well.

I have tried this:

SplashImageOn("Your Sound", "C:\My Pictures\money22.jpg", 680, 515, 150, 100)
        SoundPlay("C:\My Sounds\Vintage Cash Register.mp3", 0)
        Sleep(1100)
       SplashOff()

The result I was seeking was to have the pic displayed and the sound played at the same time.

What i get is the pic displayed and when it disappears the sound then plays. Not even close.

I thought I was going in the right direction after reading the help file, but I guess not.

Any direction would be appreciated.

Hobbyist

Link to comment
Share on other sites

#include <Sound.au3>
Local $pic = "C:\Program Files (x86)\AutoIt3\Examples\GUI\logo4.gif"
Local $unused = FileRead($pic) ; just to have the OS ready for it.
Local $aSound = _SoundOpen(@WindowsDir & "\media\tada.wav")
Local $iSoundLen = _SoundLength ( $aSound , 2 )
SplashImageOn(@ScriptName,$pic)
_SoundPlay($aSound,0)
Sleep($iSoundLen)
_SoundClose($aSound)

 

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

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