Kiti Posted July 19, 2008 Share Posted July 19, 2008 Ok, so I right-click my .au3 file, and I click "Compile with options". I go on the "res add files", but I don't really get the format. It says "Filename[section[ResName]]", but what's "Section" and what's "ResName" ? And what should I put at path in my script when I want to play that sound (I don't want to extract it) ? Some concrete examples, please!muttley Think outside the box.My Cool Lego Technic Website -- see walking bipeds and much more!My YouTube account -- see cool physics experimentsMy scripts:Minesweeper bot: Solves advanced level in 1 second (no registry edit), very improved GUI, 4 solving stylesCan't go to the toilet because of your kids closing your unsaved important work? - Make a specific window uncloseableCock Shooter Bot -- 30 headshots out of 30 Link to comment Share on other sites More sharing options...
pete1234 Posted July 19, 2008 Share Posted July 19, 2008 (edited) Something like this should do the trick $SoundFile = @TempDir & "\Sound.wav" FileInstall("Sound.wav", $SoundFile) SoundPlay($SoundFile) Edited July 19, 2008 by pete1234 Link to comment Share on other sites More sharing options...
Kiti Posted July 19, 2008 Author Share Posted July 19, 2008 Something like this should do the trick $SoundFile = @TempDir & "\Sound.wav" FileInstall("Sound.wav", $SoundFile) SoundPlay($SoundFile) Ok, and how can I include the file in the compiled exe? Think outside the box.My Cool Lego Technic Website -- see walking bipeds and much more!My YouTube account -- see cool physics experimentsMy scripts:Minesweeper bot: Solves advanced level in 1 second (no registry edit), very improved GUI, 4 solving stylesCan't go to the toilet because of your kids closing your unsaved important work? - Make a specific window uncloseableCock Shooter Bot -- 30 headshots out of 30 Link to comment Share on other sites More sharing options...
pete1234 Posted July 19, 2008 Share Posted July 19, 2008 FileInstall does it for you. FileInstall -------------------------------------------------------------------------------- Include and install a file with the compiled script. FileInstall ( "source", "dest" [, flag] ) Parameters source The source path of the file to compile. This must be a literal string; it cannot be a variable. dest The destination path of the file with trailing backslash if only the directory is used. This can be a variable. flag [optional] this flag determines whether to overwrite files if they already exist: 0 = (default) do not overwrite existing files 1 = overwrite existing files Return Value Success: Returns 1. Failure: Returns 0. Remarks The FileInstall function is designed to include files into a compiled AutoIt script. These included files can then be "extracted" during execution of the compiled script if the statement is executed. Keep in mind that files such as images can greatly increase the size of a compiled script. The source file must be a string and not a variable so that the compiler can extract the filename to include. The source cannot contain wildcards. When this function is used from a non-compiled script, a copy operation is performed instead (to allow for easy testing pre-compilation). Files maintain their original creation/modification timestamps when installed. Link to comment Share on other sites More sharing options...
Kiti Posted July 19, 2008 Author Share Posted July 19, 2008 Yeey, it works! Thank you very much Pete! muttley Think outside the box.My Cool Lego Technic Website -- see walking bipeds and much more!My YouTube account -- see cool physics experimentsMy scripts:Minesweeper bot: Solves advanced level in 1 second (no registry edit), very improved GUI, 4 solving stylesCan't go to the toilet because of your kids closing your unsaved important work? - Make a specific window uncloseableCock Shooter Bot -- 30 headshots out of 30 Link to comment Share on other sites More sharing options...
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