Jump to content
Sign in to follow this  
eJan

SoundPlay(Random..

Recommended Posts

eJan

I'm triyng to make script which randomly play wav file, but it doesn't work.

Dim $avArray[6]
$avArray[0] = @ScriptDir & "Wav\001.wav"
$avArray[1] = @ScriptDir & "Wav\002.wav"
$avArray[2] = @ScriptDir & "Wav\003.wav"
$avArray[3] = @ScriptDir & "Wav\004.wav"
$avArray[4] = @ScriptDir & "Wav\005.wav"
$avArray[5] = @ScriptDir & "Wav\006.wav"

$i = 0
Do
    $i = SoundPlay(Random($avArray[0], $avArray[5], 0), 0)
    $i = $i + 1
Until $i = 40

Script and wav files:Wav.rar

Share this post


Link to post
Share on other sites
rambo3889

$avarry[0]=@Scriptdir &\"wav\001.wav"


My Scripts:Radioblog Club Music DownloaderOther stuff:Fun movieIm serious read the help file it helps :PFight 'Till you drop. Never stop, You Cant give up. Til you reach the top Fight! you’re the best in town Fight!

Share this post


Link to post
Share on other sites
rambo3889

This works for me

Dim $avArray[6]
$avArray[0] = @ScriptDir & "\Wav\001.wav"
$avArray[1] = @ScriptDir & "\Wav\002.wav"
$avArray[2] = @ScriptDir & "\Wav\003.wav"
$avArray[3] = @ScriptDir & "\Wav\004.wav"
$avArray[4] = @ScriptDir & "\Wav\005.wav"
$avArray[5] = @ScriptDir & "\Wav\006.wav"

$i = 0
Do
    $random=Random(0,5)
    $i = SoundPlay($avArray[$random], 0)
    $i = $i + 1
Until $i = 40

My Scripts:Radioblog Club Music DownloaderOther stuff:Fun movieIm serious read the help file it helps :PFight 'Till you drop. Never stop, You Cant give up. Til you reach the top Fight! you’re the best in town Fight!

Share this post


Link to post
Share on other sites
eJan

This works for me

For Me too, thanks for quick and effective response!

Share this post


Link to post
Share on other sites
rambo3889

No problem always glad to help


My Scripts:Radioblog Club Music DownloaderOther stuff:Fun movieIm serious read the help file it helps :PFight 'Till you drop. Never stop, You Cant give up. Til you reach the top Fight! you’re the best in town Fight!

Share this post


Link to post
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
Sign in to follow this  

×