Jump to content

Include .wav in compiled script


Recommended Posts

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

Link to comment
Share on other sites

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

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