bobheart Posted June 23, 2004 Posted June 23, 2004 Can I make the sound loop with autoit? Generated with AutoBuilder 0.3 Opt("GUICoordMode", 1) Opt("GUINotifyMode", 1) GuiCreate("MyGUI", 392,233,10,10,0x04CF0000) $button_1 = GUISetControl("button", "fire", 20,20, 80,30) GuiShow() While 1 sleep(100) $msg = GuiMsg(0) Select Case $msg = -3 Exit Case $msg = $button_1 SoundPlay("E:\Programss\atmospherelite\fire.wav") ;;; EndSelect WEnd Exit
pekster Posted June 23, 2004 Posted June 23, 2004 I see two methods depending on if you needed the script to continue, or stop. If you need to run other code while your sound repeats, figure out how long the sound you are playing is (either by dividing filesize by bitrate, or just getting the length of the song.) Then, set up an AdLib to play it every X seconds, where X is the length of your song. If you don't need to run other code, just use the optional wait paramater, and put it in a while loop (or for loop if you need it to repeat a specific number of times.) [font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.
cowsmanaut Posted June 24, 2004 Posted June 24, 2004 a loop function that does seamless repeats would be good. This I assume just uses the basic windows API to play the sounds? Or is it a directX function? Having options like loop and play(x) times would work well for GUI's where you may wish to have a small sound that loops (ie music samples, ambient sounds (rain, wind, waterfall) or a sound that is short and can be played a few times. Ie telephone ring, dog bark, etc. moo
tutor2000 Posted June 24, 2004 Posted June 24, 2004 a loop function that does seamless repeats would be good. This I assume just uses the basic windows API to play the sounds? Or is it a directX function? Having options like loop and play(x) times would work well for GUI's where you may wish to have a small sound that loops (ie music samples, ambient sounds (rain, wind, waterfall) or a sound that is short and can be played a few times. Ie telephone ring, dog bark, etc. mooThat can probably be done with autoitx and an htaBy the way no one still knows how to install autoitx using vbscript?Rick
Administrators Jon Posted June 24, 2004 Administrators Posted June 24, 2004 Just use RegSvr32. I can't remember how you run an exe in VBScript but it's in the help file IIRC. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now