Command Reference - Action Examples
|
Actions used: |
In this example, we'll get the horizontal and vertical resolution of the user's screen, and store it in a pair of variables called %VerticalRes% and %HorizontalRes%, respectively. We'll also create a string describing the user's resolution in the standard "horizontal x vertical" format.
Here's what the action list looks like:

First, we use a "System - Get Information" action to get the horizontal screen size and store it in a variable called %HorizontalRes%.

Then, we use another "System - Get Information" action to get the vertical screen size and store it in a variable called %VerticalRes%.

Finally, we use a simple "Variable - Set Value" action to put this information into a standard "horizontal x vertical" format (e.g. "800x600") string, which we'll store in a variable called %ScreenRes%. For kicks, we wrote an expression to piece this string together using the "+" operator. (When used with strings, the "+" operator adds the string on the right to the end of the string on the left, otherwise known as concatenation.)

This takes whatever's in %HorizontalRes%, adds " x " to the end of it, and then adds whatever's in %VerticalRes% to the end of that. The result is then stored in our %ScreenRes% variable. Note that the two variables used in the expression (%HorizontalRes% and %VerticalRes%) aren't modified at all by this action.
Note that although we used an expression for this example, the same thing could be done by just writing the variables into the desired string, like so:

Here's a link to the finished example, as an AutoPlay Media Studio 4.0 actions XML file that you can import into an action list:
Getting_the_screen_resolution.zip
(Note: save this file to your hard drive and use a tool like WinZip to extract the XML file)