Sign in to follow this  
Followers 0
bucky002

Making Sounds Go Right Away

8 posts in this topic

how would i make a sound go right away like if i pushed L a song would play? I know how to make the script, but how do i make the sound play right away without it having to open Itunes, windows media player, etc..? Like it would play in the background right away without much delay and wihtout opening any programs.

Thanks

Share this post


Link to post
Share on other sites



Tips:

SoundPlay

--------------------------------------------------------------------------------

Play a sound file.

SoundPlay ( "filename" [, wait])

Parameters

filename Name of the file to be played (typically a WAV or MP3)

wait [optional] This flag determines if the script should wait for the sound to finish before continuing:

1 = wait until sound has finished

0 = continue script while sound is playing (default)

Return Value

None. (Always returns 1 regardless of success.)

Remarks

Terminating the script will stop the sound (if it is still playing).

Related

SoundSetWaveVolume

HotKeySet

--------------------------------------------------------------------------------

Sets a hotkey that calls a user function.

HotKeySet ( "key" [, "function"])

Parameters

key The key(s) to use as the hotkey. Same format as Send().

function [optional] The name of the function to call when the key is pressed. Leave blank to unset a previous hotkey.

Return Value

Success: Returns 1.

Failure: Returns 0.

#)

Share this post


Link to post
Share on other sites

Thanks I think I get it. I can't do anything yet because I have to wait for SciTe to download on dialup( on a , laptop) since this computer isn't my computer that I usually use I can't go to my other scripts to help me out some cause I sorta forget how to do some stuff. Once I get it done I'll post it up to see how much I missed.

Thanks again

Share this post


Link to post
Share on other sites

What do I put in the wait and function places? This is all I have so far.

HotKeySet( "s" [, "function"] )
SoundPlay( "dc.wav" [, wait] )

What all do I need to do?

Thank you

Share this post


Link to post
Share on other sites

HotKeySet("s","playit")
While 1
sleep(1000)
WEnd
func playit()
SoundPlay("dc.wav")
endfunc

~cdkid


AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide!

Share this post


Link to post
Share on other sites

HotKeySet("s","playit")
While 1
sleep(1000)
WEnd
func playit()
SoundPlay("dc.wav")
endfunc

~cdkid

That worked.

Thank you.

Share this post


Link to post
Share on other sites

How do I get a file to play out of a folder rather than my desktop? Say my folder name was "sounds" and I have my sounds in there, how do I play them from that folder? Last question, how can I hide the program from the bottom rights of my taskbar?

Thanks. I tried searching for this stuff, but didn't find anything maybe I'm just using the wrong keywords.

Share this post


Link to post
Share on other sites

#NoTrayIcon
HotKeySet("{ESC}","die")
HotKeySet("s","playit")
While 1
sleep(1000)
WEnd
func playit()
SoundPlay("c:\sounds\dc.wav")
endfunc
func die()
exit
endfunc

Press ESC to quit it.

~cdkid


AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide!

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  
Followers 0