Name
USING -- load Miniwood library (V11.0)
Synopsis
@USING lib$
Function
This preprocessor command can be used to load the Miniwood library specified by lib$. This preprocessor command is only supported by Miniwood, Hollywood won't recognize it. To write scripts that are compatible with both Hollywood and Miniwood, you can use the @IF preprocessor command to check for Miniwood, e.g.

 
@IF #HW_MINI
@USING "brush"
@ENDIF

The code above will only call @USING if Miniwood is running the script.

All libraries declared via @USING will automatically be linked to the executable when you compile your script into an executable using Miniwood so you should call @USING only for the libraries really needed by your script to ensure your executable will be as small as possible. The order in which you load the libraries doesn't matter.

The string you specify in lib$ can also contain wildcards. If you specify "*" in lib$, all libraries will be loaded. If a library exists in two flavours, i.e. a full and a lite version, the full version will always be loaded in case you specify "*" in lib$.

When passing "*" in lib$, you can also add parentheses to specify libraries that should not be loaded. For example, the following line will load all libraries except transitionfx:

 
@USING "*(transitionfx)"

If you want to exclude multiple libraries, just use a vertical bar character (|) to separate them. The following line will load all libraries except transitionfx, video and moveobject:

 
@USING "*(transitionfx|video|moveobject)"

Also note that you must not specify an absolute path in lib$. Just pass the name of the library.

See Miniwood for details.

Inputs
lib$
library to load
Example
@USING "brush"
@USING "graphics"
@USING "imageio"
LoadBrush(1, "test.png")
SaveBrush(1, "test.jpg", {Format = #IMGFMT_JPEG})
The code above loads the file test.png and saves it as test.jpg. When using Miniwood, this operation needs the libraries brush, graphics and imageio which is why there are three @USING statements in the code above.


@USING "*"
The code above loads all libraries.


@USING "*(transitionfx)"
The code above loads all libraries except transitionfx.


@USING "*(transitionfx|video|moveobject)"
The code above loads all libraries except transitionfx, video and moveobject.

Show TOC