Introduction

Contents

Welcome to AutoPlay Media Studio 8!

Please select one of the following subjects:

What is AutoPlay?

What's New in 8?

Key Features

Application Ideas

The AutoPlay Model

Changes to AutoPlay Media Studio

Importing AutoPlay Media Studio Projects

Running On Windows Vista or Later

Are you looking for something else? Perhaps you'll find it in one of these categories:

Program Reference

Tips

Scripting Guide

User's Guide

Windows Basics


Introduction

Contents What is AutoPlay?

What is AutoPlay?

AutoPlay Media Studio is the state of the art in CD-autoplay multimedia tools. With its intuitive workflow and drag-and-drop objects, even absolute beginners can quickly achieve impressive results. But despite its world-renown ease of use, AutoPlay Media Studio is a serious development tool. In fact, it's used by thousands of people to create everything from AutoRun/AutoPlay menus and CD business cards, to fully interactive training applications. With AutoPlay, your imagination is your only limit!

What Can I Create With AutoPlay Media Studio?

Quite simply, AutoPlay Media Studio helps you make professional multimedia software. While the product excels at certain tasks like making front-end browsers for CD-ROMs (i.e. AutoRun/AutoPlay menus), that's just the beginning.

Integrating diverse media types such as images, sounds, videos, text, and flash into a single cohesive presentation is what AutoPlay Media Studio does best. In fact, it's been trusted to deliver rock-solid multimedia experiences to millions of people around the world.

  • Multimedia Authoring & Application Development

  • Computer Based Training (CBT) Applications

  • CD-ROM AutoPlay/AutoRun Menu Systems

  • Interactive Marketing Presentations

  • CD Business Cards

  • Much more

Intuitive, Drag and Drop Design

AutoPlay Media Studio has always been known for it's easy-to-use visual design environment. Simply drop high-level, interactive objects (images, video, text etc.) onto pages or dialogs to create instant functionality. Move them into position using your mouse or with the aid of an extensive assortment of alignment tools, guidelines and grids. Once you've got your interface down, it's a snap to attach powerful actions to various events such as mouse clicks and key presses. Whether it’s opening a PDF file, playing a video or showing a web site, the Action wizard makes it easy to choose from the over 865 built-in functions.


What's New in 8?

Introduction

Contents What's New in 8?

You're going to love what we've done in AutoPlay Media Studio 8. Our goal was to improve everything you love about AutoPlay Media Studio, while pushing it fully into the realm of rapid application development (RAD).

While AutoPlay Media Studio's roots are in making beautiful interactive menus and launchers for CD-ROM and DVD-ROM applications, savvy software developers have been using it for years to rapidly prototype and build full-scale graphically rich software applications.

AutoPlay Media Studio 8 takes it to a whole other level, bringing visual WYSIWYG software development to the masses. What would take a professional programmer days or weeks to build using traditional software development tools like C, C++, Java or even Visual Basic can now be created by just about anyone in less time than you'd have ever thought possible.

While AutoPlay Media Studio is still the best tool out there for making autorun/autoplay menus, its true strength in visual programming now shines through. There’s no faster or better software development tool for combining multimedia elements like video, image, sound, music and animation with advanced business logic, database manipulation, text parsing, web interaction, data collection and graphically-rich data visualization.

You'll turn to AutoPlay Media Studio 8 over and over again to quickly create full-featured software applications. It's destined to become an indispensable part of your software development toolbox! Here’s just a taste of some of the features new to AutoPlay Media Studio 8…

NEW! Faster & More Powerful Lua 5.1 Scripting Engine

AutoPlay Media Studio 8's scripting engine is now faster, more powerful and much more extensible. The Lua 5.1 system features a new module system, incremental garbage collection, new mechanism for varargs, new syntax for long strings and comments, mod and length operators, metatables for all types and a fully reentrant parser.

NEW! Support for Lua 5.1 Code Modules

With the new scripting engine upgrade comes compatibility with Lua 5.1 modules. You now have access to a wealth of free Lua code you can download and use in your AutoPlay Media Studio 8 projects. In most cases you simply copy the module files into your project and "require" them in your script. Just some of the useful modules out there include Bit Operation, Date, Canvas Draw, Imaging Tool, GD, Crypto, Colors, Speech, Alien, Social (Twitter), CURL, Regular Expression Parsing and so much more. It’s a whole treasure chest of addons and tools just waiting for you!

NEW! Blu-ray Disc Support

Do your projects contain huge database and video files? AutoPlay Media Studio 8 now includes full support for burning directly to Blu-Ray media (BD-R, BD-RE). The integrated Bluray disc burning allows you to publish your project directly to single layer and dual-layer BD-R and BD-RE media, supporting 25 GB, 50 GB and even 100 GB formats.

NEW! Application Styles / Skinning

AutoPlay Media Studio 8 gives you the freedom to create applications that look exactly the way you want. Perhaps you prefer that your programs to take on the same appearance as the operating system (e.g. Windows XP, Vista, Windows 7 Aero...)? Or do you want them to be entirely customized with completely custom drawn background images, buttons and window shapes? Or perhaps you'd like to simply make use of the hundreds of ready-to-use MSSTYLES themes (like OS/X Tiger and Panther) that you can download on the Internet? In any case, AutoPlay Media Studio makes it possible – and easy!

NEW! Integrated Database Access

It's never been easier to write database applications using AutoPlay Media Studio! Easily connect to a variety of popular local and remote/Internet database systems including MySQL, SQLite3, ODBC, Oracle and PostgreSQL. Execute any SQL statements you desire like CREATE, INSERT and more – even easily retrieve data results using a row-by-row cursor system. Features full integration with our fill-in-the-blanks style Action Wizard, plus intelligent code completion.

NEW! PDF Object

AutoPlay Media Studio now features integrated support for displaying PDF documents right in your application. This highly requested feature also gives you full control over the display and formatting. You can show/hide toolbars, scrollbars and borders. Layout options include "Single Page", "One Column", "Two Columns" and "User Preference". View options include "Fit Page", "Fit Page Width", "Fit Page Height" and "Actual Size".

NEW! PDF Actions

Take control of the PDF object with 18 easy-to-use actions. Fully integrated into the fill-in-the-blanks Action Wizard, you'll be able to easily create dynamic applications to work with PDF files. Actions are provided to Print, Load, Navigate, Zoom, Resize, Hide and much more.

NEW! QuickTime Object

Thanks to the new Apple QuickTime object, your AutoPlay Media Studio applications are now compatible with over 80 video, audio and image formats. Video formats include .MOV, .DV, .M4V, .MP4 and dozens more – including the amazing h.264 format. Audio formats include .AAC, .AIF, .M4A, .MP3, etc. Visual formatting options let you lock an aspect ratio, resize the media to fit the object dimensions or center it within the object area. Border styles include 3D, plain or none.

NEW! QuickTime Actions

The Quicktime object by itself is great - but a Quicktime object plus 22 built-in high-level actions is just plain awesome! Brought together, your AutoPlay Media Studio actions have exceptional control over the QuickTime object. Using simple script commands you can Play, Seek, Set Volume, Load, Mute, View Full Screen, Hide, Show and much more. Your only limit is your imagination.

NEW! xButton Object

If you're trying to create an application that blends in beautifully with the operating system, the new xButton object is just what the doctor ordered. However, that's just the beginning! The new xButton object supports far more customization than was previously possible. Now you can modernize your applications by adding "icon" images to your buttons, plus you can "markup" the text however you desire! This object lets you control the relative placement of button text and button images; choose between normal and toggle styles; adjust fonts and colors; and even markup you text using dozens of XAML tags – including hyperlinks right on your buttons! By default, the xButton styles itself according to whatever operating system it is being run on. If your application is running on Vista, the button looks like a standard Vista button. If you're running it on Windows 7, it looks like Windows 7. However, you can easily override this and choose from many included styles like Flat, Office 2000, Office XP or many different Office 2007 styles. Or hundreds of MSSTYLES themes… The options are endless.

NEW! Checkbox List Object

Checkbox lists are a long awaited addition to AutoPlay Media Studio! We've integrated this feature into the existing Listbox object – you just need to turn it on. Once you do, you can easily present lists of items with corresponding checkboxes. Actions are included to get and set the checkbox state for any listbox item with ease. You'll find dozens of great uses for this one!

NEW! Rolling Code Data Security

AutoPlay Media Studio 8 adds another layer of protection to your applications and scripts. A unique random encryption code is now generated every time you build your project, making "hacking" of your applications much more difficult. As we all know, anyone determined enough can break any protection system given enough time and resources, but the use of rolling codes renders generic attacks ineffective. You can now sleep a little easier!

NEW! Multiple Timers

You're no longer limited to just one timer event per page! You can now set as many "named" timers as you want. Having multiple timers running really opens up the creative possibilities for animations, games, status updates and dozens of other applications.

NEW! Service Actions

Easily control Windows Services using the seven new actions included in AutoPlay Media Studio 8. Everything you need is included, such as Create, Start, Stop, Pause, Delete, Query and Continue.

NEW! FTPWI Actions

AutoPlay Media Studio 8 includes a set of built-in FTP actions, enabling your application to easily download files over the Internet from FTP servers. These new FTP actions make use of the WinINet API to ensure compliance with the RFC 959 File Transfer Protocol specifications. Actions include FTPWI.Download, FTPWI.GetErrorInfo and FTPWI.GetFileSize.

NEW! System Restore Actions

This trio of system restore actions are extremely powerful and essential for any application that might want to make system changes or install software in a failsafe manner. By creating a system restore point using System.SetRestorePoint before making changes to the computer, the user can easily rollback those changes using the operating system's "restore" feature (found on Windows Vista or later). Actions include System.IsSystemRestoreAvailable, System.SetRestorePoint and System.RemoveRestorePoint.

NEW! Dialog.ComboBox Action

Here's an action that'll find a lot of use! The Dialog.ComboBox action is used to pop up a dialog box presenting the user with a drop-down list of items they can choose from. You simply pass in a list of items to select from, choose if you'd like them sorted or not and whether or not to restrict the user to just the items in the list, or allow them to type in their own text response. It's a fast and compact way to get user input, while offering suggestions to them at the same time!

NEW! Balloon Tooltips and Extended Tooltips

In addition to the standard popup tooltips you're used to from previous versions, AutoPlay Media Studio 8 now lets you display Balloon tooltips! It's an extremely attractive option for presenting context sensitive help within your application. It's also much more useful than the old style tooltips, as you can use multiple lines of text to present your instructions. In fact, multi-line tooltips were so useful, we also added the feature to the standard looking popup as "extended" tooltips.

NEW! Modernized Visual Workspace

AutoPlay Media Studio has always looked pretty slick, but that wasn't good enough. The entire project workspace has been overhauled. Selection boxes, toolbars, context menus – everything has been redone using a consistent color palette, light source and 3D perspective. You spend a lot of time working on your projects. Your tools should serve to increase your productivity, rather than distract you. With AutoPlay Media Studio 8, you'll find everything is more logically arranged and attractively presented – so you can get more done.

NEW! Plugin SDK v2

Action Plugins and Object Plugins are one of the best features of AutoPlay Media Studio. They allow 3rd party software developers to extend and expand the product in an extremely integrated and seamless fashion. By simply dropping a plugin into your project, you can easily save yourself hours of work and add significant functionality to your application. The great news is that with AutoPlay Media Studio 8, plugin developers can now fully leverage the advantages of the Lua 5.1 language. The Plugin SDK v2 is available for free download on the indigorose.com website.

Improved! Grid Object

Working with data grids in AutoPlay Media Studio is more useful than ever, especially with the new integrated database features in v8. As always, the grid object allows you to add spreadsheets, grids and list controls to your applications. With over 110 scriptable actions, it is extremely powerful. To help you easily preload data, you can now even specify a CSV (comma separated value) data file at design time.

Improved! Flash Object with ExternalInterface Support

The Adobe Flash object now supports calling and responding to Flash actionscript functions with the addition of the new "Flash.CallFunction" and "Flash.SetReturnValue" actions and new "On FlashCall" event. Access to Flash's external API opens up many new uses for the Flash object and advanced interaction with your AutoPlay Media Studio application such as playing FVL video files using a Flash loader.

Improved! Web Object

The web object now uses the latest Microsoft Internet Explorer SDK. New scrollbar and border options have been added to give you increased visual control over the object - allowing you to better integrate web pages into your AutoPlay Media Studio applications.

NEW! Stack Traceback for Syntax Errors

We've made it easier for you to debug syntax errors in your scripts by providing you with better error reports. Error messages now include additional details about exactly where the problem occurred – right down to the event name and line number!

NEW! Debug Message Logging

Testing and debugging your projects is much easier in AutoPlay Media Studio 8. You can now send all debug message to a human-readable text format log file, to a debug window or simultaneously to both locations. Between the automatic "Trace Mode" logging, "Event Context" information and "Last Error" actions, you've got a formidable collection of tools to help squash those pesky bugs and logic errors!

NEW! Eyedropper Color Picker

Easily match colors thanks to the new eyedropper style color picker. Integrated into all color choosers, simply move your mouse pointer off the dialog and watch it turn into an eyedropper cursor. Click on the color of any pixel on your screen and voila – you've automatically set the color to match.

NEW! Updated Dependency Modules

All of the dependency modules have been updated in AutoPlay Media Studio 8. Dependency Modules make it fast and easy to detect whether or not common 3rd party software applications and technologies are installed on the user's computer. AutoPlay Media Studio 8 can detect the current versions of such products as Microsoft PowerPoint, Adobe Flash, Microsoft Word, Microsoft Excel, Adobe Acrobat, Apple QuickTime, Windows Media Player and more. If the required product is not detected, the user will be alerted to the problem and conveniently directed to the appropriate website for download and installation.

NEW! Windows Object Styles

In order to enable you to create applications that can look and feel exactly like those created using traditional Windows platform SDK development tools, we went through all of our existing objects and updated them. For example, objects like the Checkbox, Radio Button and Progress Bar will now take on the look that users expect to see on their operating system. On Windows 7, they'll look consistent with the standard operating system theme. On Windows XP, they'll look like XP – and so on. The best part though is that they'll also now respond correctly to changes in the application theme or MSSTYLES skin files that are supported in AutoPlay Media Studio 8. It all adds up to a 100% professional look!

NEW! Visually Identify Plugin Actions

The Action Wizard now marks any actions that are contained in Action Plugins with a "plugin" identifier. This makes it much easier to quickly identify what is built-in to AutoPlay Media Studio and what you've added later through 3rd party additions. It's especially handy when you're looking for documentation, help files, samples and technical support.

Improved! Video Object Transport Skins

The Video object has been modernized with a variety of new graphic styles. Choose from attractive new blue, green and gray skins. If you don't find a style you like, it's super easy to create your own video transport skins using Photoshop or any other graphics editor. We've also made the skin format more flexible, removing the constraining height restrictions that may have hampered your creativity in the past.

Improved! Paragraph Object Scrollbar Styles

The Paragraph object in AutoPlay Media Studio 8 has been updated to default to Windows 7 style scrollbars. This will give any of your scrolling textboxes a much more up-to-date visual appearance. Of course, you can still make your own scrollbar styles from scratch (or download shared skins from http://www.autoplaymediastudio.com) or choose from old favorites such as Chrome, Euro, Corporate, Charcoal, Industrial and more.

Improved! Application Startup Dialog

AutoPlay Media Studio 8 is all about helping you get things done faster and easier. Even small things like the startup welcome screen have been improved! The startup screen now gives you fast access to multiple recently used projects, one-click restore of the last used project, or simply creating a new project using a template or blank project. Additionally, an integrated RSS feed keeps you updated on product improvements, updates, bug fixes and news!

Improved! Project Explorer Window

The Project Explorer in AutoPlay Media Studio 8 has been revamped to give you a better overall view of your project. Things like better icons, collapsible Dialog and Page categories and better visual indications for hidden and locked objects will be much appreciated. Additional context-sensitive right-click menus have been added and reworked to present you with only the most appropriate commands for working with objects, pages, dialogs and events.

Improved! Quick Script Snippets

A variety of changes were made to the script editor to help more quickly write your code. Of course the popular Action Wizard, Code Completion and Intellisense are still there to guide you. We've also expanded and reorganized the one-click "Quick Script" feature. Many common programming "snippets" are included, making it super easy to add loops, control structures and other often-used bits of script. Additionally, "object tables" have been moved into their own category in order to help you find what you’re looking for at a glance.

NEW! Centralized Repository for Plugins, Templates and Addons

With all the new possibilities available to AutoPlay Media Studio 8 developers, we've put together a centralized archive to help organize everything. At http://www.autoplaymediastudio.com you'll find an easy-to-navigate repository for everything related to AutoPlay Media Studio. You'll find action plugins, object plugins, application themes, Lua modules, video transport skins, scrollbar skins, MSSTYLES skins, custom .BTN format button files, background images, project templates, example projects, scripts, audio files, tutorials, tools and lots more.

Much More…

Hundreds of other changes have made their way into AutoPlay Media Studio 8. Some visible, some hidden deep within the core… All of them designed to make AutoPlay Media Studio 8 your "go to" tool when you’re on a deadline and need to create graphically rich interactive software applications.


Key Features

Introduction

Contents Key Features

AutoPlay Media Studio makes it easy to create your own interactive multimedia software. Even if you're not a "programmer", you'll be creating professional projects in no time. It's all done in a completely visual, drag-and-drop design environment. From images, text and music to video, drop-down lists and web content, you simply move things into place using your mouse. Then, you can add powerful interactivity with a built-in library of more than 865 easy to use actions.

Whether you're a complete novice or a seasoned programmer used to working with Microsoft Visual Basic, Adobe Director, Microsoft Visual C++ or Delphi, you'll find that AutoPlay Media Studio deserves a place in your toolbox. It's perfect for making autorun CD/DVD's, software installer menus, electronic business cards, training material and just about any other interactive multimedia project you can think of!

Highlights

  • 865+ actions

  • 12 quick actions

  • Customizable dialogs

  • Multiple audio channels

  • Support for action plugins

  • Support for object plugins

  • 21 built-in objects

  • Resizable application-window and object positioning support

  • 2500 pages per project

  • System language detection for multilingual applications

  • On Timer, On FSCommand (Flash), On Key, and On Size events

  • Application version detection (dependencies)

  • Built-in CD/DVD/Blu-Ray burning

Visual Development Environment

Drag-and-Drop Development

Creating professional multimedia software can be both easy and fun, thanks to AutoPlay Media Studio. In fact, with our award winning WYSIWYG (what you see is what you get) visual design environment, anyone can do it! Simply drag and drop your media content (text, photos, videos, Adobe Flash, and much more) onto "pages"or "dialogs" and then add interactivity with over 865 built-in actions. It couldn't be easier!

Interactive Objects

There are 21 different object types to choose from. Objects types include buttons, text labels, paragraph text, rich text, images, videos, Adobe Flash, web browsers, slideshows, hotspots, input fields, list boxes, drop-down lists, radio buttons, checkboxes, progress bars tree controls, grid controls, xButtons, PDF controls, Quicktime videos. Each object includes a variety of events and is fully customizable.

Easy Publishing

AutoPlay Media Studio makes packaging up and distributing your finished project a snap. Whether you'd like to create a single-file executable for distribution by web download or email, or burn it to a CD/DVD/Blu-Ray data disc, it just takes a few clicks. You can even choose to publish to ISO CD/DVD/Blu-Ray images or to a hard drive folder for packing it up with an installer/setup builder.

Professional Templates

Choose from a variety of ready-to-use projects and then modify them to fit your needs. We include examples of software installer menus, electronic business cards, marketing brochures and many others. It's also easy to make your own project templates or to add-in templates made by others.

Easy to Learn

It couldn't be easier to create powerful multimedia applications. We've packed the software with wizards, tutorials, a user's guide, context sensitive help and much more. It's also backed up with world-class technical support options and online discussion groups.

Content Gallery

We've included a ton of great content to get you started including background images, photos, abstracts, panels, bars, bullets, buttons, sound effects and even music files. Simply mix and match to put together a great looking project in no time.

Project Explorer

Get an overview of your project in one place. You can see all of the pages, dialogs, events and objects in your project organized into a tree hierarchy. Double-click any item to edit its properties or right-click for common commands. It's a great way to see how everything is connected.

Properties Pane

The properties pane is a fast way to view and edit all of the attributes of a page, dialog or object. You can interactively edit the object text, font, size, color, tooltip and much more without missing a beat.

Page/Dialog Management

Pages and dialogs are the backbone of AutoPlay Media Studio. Consider that you can have up to 1000 of them in each project and you'll realize the importance of effective page and dialog management. Accessing pages and dialogs is easy in AutoPlay, thanks to the page/dialog tabs on the main window. You can also easily change the order, rename or remove them and more with the click of your mouse.

File Layout System

When you want to add or remove whole folders of files, or fine-tune the structure of a CD/DVD/Blu-Ray project, the File Layout dialog comes in very handy. It's split into two panes, with your computer's file system on the top and your project on the bottom. Select the files you want, click "add" and you're done!

Thumbnail File Browsers

The file browsers in the product support thumbnail view, making it much faster and easier to locate files.

Quick Preview

Click the preview button and try out your project whenever you want. There's no lengthy compiling process to wait for, so you can test changes as you make them.

Undo/Redo

Full support for undo and redo operations make it quick and easy to try out new ideas.

Align and Arrange

A full suite of alignment tools helps make quick work of your layout tasks. Simply select a group of objects and click the desired alignment button to line up their edges on the top, left, right or bottom. You can also easily distribute objects over a given space, make them all the same size, adjust their "z" order, and more.

Group, Pin, Lock & Hide

Professional design tools like object grouping allow you to move and work with multiple objects at once. The lock and pin tools keep you from accidentally moving an object out of place, while the hide and show feature is great for trying out different designs.

Grid and Ruler

Toggle on the grid for easy object placement - the automatic snapping feature makes it quick to use. The ruler is a helpful precision tool assisting you in pixel level placement of your design elements.

Guidelines

Just like in your favorite image editing software, but now in your favorite multimedia development software! Using guidelines, you can set up margins and placement rules to make sure your design looks perfect.

Customizable Toolbars

All of the toolbars and keyboard shortcuts can be reconfigured and customized to your preference. You're not restricted by the default set up- you can lay out your favorite features the way you like to work with them.

Built-in Spelling Checker

Make sure that typos don't creep into your projects. Just about anywhere you can type, you can perform a spell check to ensure error-free text. Dictionaries are available for over a dozen languages including English, French, German, Italian, Spanish, Dutch, Swedish, Danish, Croatian, Czech, Polish and Slovenian.

Professional Features

Customizable Dialogs

Application development has been raised to a new level in AutoPlay Media Studio 8 with the addition of customizable dialogs. Dialogs support the same background settings, objects and events as pages do...but the options don't stop there. Dialogs have features above and beyond pages including custom sizes, multiple windows styles, and even a custom icon. Complemented by both its own "DialogEx" action category containing 21 new actions, as well as 6 additional "Application" actions, you'll surely find this powerful new feature a welcome addition to your design arsenal.

Video, Flash, Web, Images & More

We include a wide variety of interactive objects so that you can create truly impressive projects. Compare it to any other tool (including Adobe Director, Microsoft Visual Basic and Delphi), and you'll see that AutoPlay Media Studio is much easier to use, giving you better results faster.

Multi-Channel Audio Mixing

Your projects can take advantage of the fastest, most advanced sound effect and music handling engine available anywhere! You can play up to 8 channels of audio simultaneously with automatic selection of either hardware or software mixing. Most incredibly, it does not require any version of DirectSound or DirectX to be installed, using them only if available.

Transparency, Shadows and Blending

No competitive tool can match AutoPlay Media Studio when it comes to fast and efficient handling of complex graphics files. With our support for 32-bit PNG images, you gain access to incredible shadow effects, blending options, opacity levels and full alpha channel information. In simple terms, it means that your projects will look better than ever!

Startup Video or Flash Movie

Start your project up with an introductory video or flash animation. It can run full screen and makes an eye catching start to your project. Of course, there are a variety of options for customization including size and background color.

Custom Window Shapes

Forget about being restricted to rectangular windows. With the window mask feature, you can create projects of any size and shape you desire. Select from the included masks like "star", "bubble" and "oval", or make your own.

Background Music

Add a bunch of music files to the play list, and they'll play in the background while your project runs. All of the music is automatically mixed in real-time with mouse-over sound effects and up to 6 other channels, such as audio narration.

Window Styles

Run your project as a standard window, or go for something more extraordinary like bordered, flat or even kiosk mode. Paired with the window mask option, you don't even have to make it rectangular. Talk about eye-catching!

Application Styles / Skinning

AutoPlay Media Studio 8 gives you the freedom to create applications that look exactly the way you want. Perhaps you prefer that your programs to take on the same appearance as the operating system (e.g. Windows XP, Vista, Windows 7 Aero...)? Or do you want them to be entirely customized with completely custom drawn background images, buttons and window shapes? Or perhaps you'd like to simply make use of the hundreds of ready-to-use MSSTYLES themes (like OS/X Tiger and Panther) that you can download on the Internet? In any case, AutoPlay Media Studio makes it possible – and easy!

Automatic Sizing and Positioning of Objects

The Auto-Resize options for each object allow you to control how each side of the object responds to the page or dialog being resized at runtime. This makes it very easy to have resizable applications look right at different sizes.

Custom Icons

Now you can pick your own project icon and have it show up in the window title bar, task bar and as the executable's icon.

Menu Bars

It's now possible to add a standard Windows style menu bar to your project. It's easy to configure and edit, even letting you configure nested items. When a menu item is selected, it fires a project event telling you what was chosen, allowing you to take whatever action you desire.

Resource Stamping

Set your own version resource information and have it stored in the executable. You can now change the company name, product name, copyright notice, trademark information, version identifier and other useful fields.

Automatic Code Signing

Automatically have your applications code signed during publishing. This provides a more secure experience for users and helps make applications Windows Vista or later compliant.

Page Keyword Searching

Specify a list of keywords associated with each page. Then at runtime use the new actions to search for keywords on pages, create an indexed table of keywords, or even show a common dialog to allow the user to perform keyword searches.

Interactive Objects

xButton Object

If you're trying to create an application that blends in beautifully with the operating system, the new xButton object is just what the doctor ordered. However, that's just the beginning! The new xButton object supports far more customization than was previously possible. Now you can modernize your applications by adding "icon" images to your buttons, plus you can "markup" the text however you desire! This object lets you control the relative placement of button text and button images; choose between normal and toggle styles; adjust fonts and colors; and even markup you text using dozens of XAML tags – including hyperlinks right on your buttons! By default, the xButton styles itself according to whatever operating system it is being run on. If your application is running on Vista, the button looks like a standard Vista button. If you're running it on Windows 7, it looks like Windows 7. However, you can easily override this and choose from many included styles like Flat, Office 2000, Office XP or many different Office 2007 styles. Or hundreds of MSSTYLES themes… The options are endless.

PDF Object

The PDF object features integrated support for displaying PDF documents right in your application. This highly requested feature also gives you full control over the display and formatting. You can show/hide toolbars, scrollbars and borders. Layout options include "Single Page", "One Column", "Two Columns" and "User Preference". View options include "Fit Page", "Fit Page Width", "Fit Page Height" and "Actual Size".

QuickTime Object

Thanks to the new Apple QuickTime object, AutoPlay Media Studio applications are now compatible with over 80 video, audio and image formats. Video formats include .MOV, .DV, .M4V, .MP4 and dozens more – including the amazing h.264 format. Audio formats include .AAC, .AIF, .M4A, .MP3, etc. Visual formatting options let you lock an aspect ratio, resize the media to fit the object dimensions or center it within the object area. Border styles include 3D, plain or none.

Button Object

A button responds automatically by changing its appearance when you move the mouse over it or click on it. With multiple image states, text options and a toggle state, buttons are used for many interactive tasks. We include a variety of pre-made button files for you to use, as well as a full featured button editor for making your own.

Text Label Object

Perfect for headlines and single line sentences, text label objects support interactive design-time resizing, custom fonts, sizes, colors, sound effects and more. An advanced anti-alias algorithm eliminates jagged edges and makes all of your text look great - even at large sizes.

Paragraph Object

Use any font, size, color or style of text you want. The software handles the required logic to automatically embed the TrueType fonts you use so your projects look great on any system. Add text effects like bold, italic and underline, set alignment options and pick from a variety of scroll bar skins.

Rich Text Object

The rich text object allows you to display rich text (.rtf) in an object. It supports background transparency as well as design-time and runtime character and paragraph formatting.

Image Object

Display pictures and other graphics in both 256 colors and 16.7 million colors. Supports all the major image file formats, including PNG, JPG, GIF and TIF. Supports interactive resizing, transparency, alpha channel, variable opacity, mouse over and click sounds, tooltip, cursor changes and more. Dynamically reduces and increases image color depth to work on all monitors and display cards.

Video Object

Embed digital video into your pages or dialogs, like AVI, MPEG and WMV. You can make use of the skinable control panel for controlling the video and an extensive action set if you require the video's playback to be controlled internally.

Adobe Flash Object

Play Flash movies right on your page or dialog! It’s even possible for your project to interact directly with the flash SWF file, through the use of FSCommands and variables or Flash's external API. An extremely popular format for animations, videos, demos and many other tasks.

Web Browser Object

The web browser object lets you display a web site right on your page or dialog, just like it would appear in Internet Explorer. Easily create custom web browsers by responding to a comprehensive set of events. It’s an extremely powerful feature!

Slideshow Object

The slideshow object allows you to show a series of images in a set area. It supports automatic resizing and scaling as well as transitions between images.

Hotspot Object

Make any part of your background image “live”. The hotspot objects add flexibility to your projects by making background design elements interactive.

Input Object

Create forms and other information collection systems. Supports single and multi-line input boxes, as well as password masking, custom input masks and a variety of customization options.

List Box Object

Show a scrollable list of information, allowing single or multi-selections including optional checkboxes. For example, you could display a list of song titles (so the user could choose a song to play), or a list of topics (so the user could decide what topic to view next). Includes options for text style, colors, auto-sorting and more.

Combo Box Object

When you want to present a list of options, but need to do it in a compact and efficient manner, this object shows a dropdown list box. You can control the look and feel of the object with properties such as font face, text color, size and background color.

Checkbox Object

The checkbox object wraps the standard Windows checkbox control but takes it to a new level by allowing transparent background and mouse state text color changes.

Radio Button Object

The radio button object is great for quiz and test applications. Radio buttons support transparent backgrounds and changing text color as the mouse passes over them. Radio button selection and grouping is also handled automatically.

Progress Bar Object

Whether you need to show a percentage of a completed task, or a simple indicator gauge to keep your users informed, the progress bar is ideal. You can control the background and bar colors, text, fonts, vertical or horizontal orientation, step size, min and max values, and a variety of styles such as standard or XP look.

Tree Object

The tree object allows you to display a hierarchal list of items on the page in the well known tree format. Items can have checkboxes associated with them, or simply be selectable. The tree object has an extensive action set so you can load and manipulate tree items at run time for full flexibility.

Grid Object

The grid object allows you to add spreadsheets, grids and list controls to your applications containing an extremely flexible action set.

Publishing Options

Publishing Wizard

Once you've got your project ready to go, the Publishing Wizard will package it up and make it ready to distribute. There are a variety of powerful options to choose from, including direct CD/DVD/Blu-Ray burning, single-file executable, ISO image or hard drive folder.

Integrated CD/DVD/Blu-Ray Burning

You can now publish directly to CD-R/CD-RW, DVD±R/DVD±RW or BD-R/BD-RE media. Simply insert a blank disc and the wizard will burn your finished project right to it.

Web/Email Executable

Turn you finished project into a compressed, single-file executable. It's perfect for distribution by web and email.

Hard Drive Folder

Rather do the CD/DVD/Blu-Ray burning yourself? No problem. You can easily output your project to a folder on your hard drive that's ready to package up however you want. It’s a great choice if you are creating a traditional application and want to distribute your application with a professional software installer tool, like Setup Factory.

ISO Image

An advanced option, for people wanting to produce an ISO image for use by a CD/DVD/Blu-Ray replication company or service bureau.

Powerful Interactivity

No Programming Required

You don't need to be a programmer to use AutoPlay Media Studio. It's easy enough for anyone to use. While a full wizard-assisted scripting engine is available for power users, the new Quick Action tab lets new users get up to speed right away. Just fill in the blanks to handle the most popular actions like opening documents, running programs, switching pages and more. It’s really that easy!

Open Any File, Program or Document

Using the built-in actions your project will be able to open any file with an associated viewer application. Whether it is Microsoft PowerPoint (PPT), Adobe Acrobat (PDF), Microsoft Word (DOC) or any other document or program (EXE), it's a snap.

Print Pages/Dialogs at Runtime

The addition of the Page.Print and DialogEx.Print actions allow you to print pages or dialogs at runtime including options for whether or not to show a print dialog and whether to scale the page/dialog to fit the paper.

Event Driven

Events include things like clicking on an object or moving the mouse across a page or dialog. Simply add actions to the appropriate object’s event handler and they'll be performed automatically. This simple system, while easy to work with, is also incredibly powerful!

Page/Dialog Timers

If you want to make things happen on a repeatable schedule, then timers are for you. For example, you can configure a timer to fire every 5 seconds. When it does, you can run an action of your choice like querying a web server, moving an object or playing a sound effect. It’s very powerful and very easy to do.

Integrated Database Access

It's never been easier to write database applications using AutoPlay Media Studio! Easily connect to a variety of popular local and remote/Internet database systems including MySQL, SQLite3, ODBC, Oracle and PostgreSQL. Execute any SQL statements you desire like CREATE, INSERT and more – even easily retrieve data results using a row-by-row cursor system. Features full integration with our fill-in-the-blanks style Action Wizard, plus intelligent code completion.

Flexible Scripting Engine

AutoPlay Media Studio includes the same scripting engine as other Indigo Rose products. Based on the popular "Lua" language, this all-new and incredibly powerful free-form scripting engine gives you unprecedented control over your project. This easy to use language features everything from "for, repeat and while" loops, to "if/else" conditions, functions, variables and associative arrays. Paired with the built-in action library, full mathematical evaluation and Boolean expressions, there is simply nothing you can’t achieve. We've also built in an Action Wizard so even complete novices can create powerful projects that handle the most demanding tasks.

Support for Lua 5.1 Code Modules

With the new scripting engine upgrade comes compatibility with Lua 5.1 modules. You now have access to a wealth of free Lua code you can download and use in your AutoPlay Media Studio 8 projects. In most cases you simply copy the module files into your project and "require" them in your script. Just some of the useful modules out there include Bit Operation, Date, Canvas Draw, Imaging Tool, GD, Crypto, Colors, Speech, Alien, Social (Twitter), CURL, Regular Expression Parsing and so much more. It’s a whole treasure chest of addons and tools just waiting for you!

Comprehensive Action Library

We've included a library of more than 865 powerful yet easy to use actions. There are high-level actions to handle everything from text file editing to system registry changes. You can execute programs, open documents, query drive information, manipulate strings, copy files, enumerate processes, interact with web scripts, display dialog boxes and much more.

Easy to Use Action Wizard

You don't have to be a wizard to create incredible multimedia applications. We've built the wizard into the software! Simply choose the action you want from a categorized list (complete with on-screen interactive help), fill in the requested information fields and the wizard does the rest. You don't have to know anything about scripting or programming — just fill in the blanks, and you're done! Making changes is just as easy. Click on the line you want to change and press the "edit" button to go back to the original form. It's that easy!

Expandable with Action Plugins

Add on modules can extend your projects in infinitely powerful ways, such as adding support for databases, FTP file transfers and CD audio playback. Tight integration with the design environment makes plugins just as easy to use as built-in actions. Plugins are available through Indigo Rose as well as third-party developers thanks to Indigo Rose's freely available plug-in development kit.

Centralized Repository for Plugins, Templates and Addons

With all the new possibilities available to AutoPlay Media Studio 8 developers, we've put together a centralized archive to help organize everything. At http://www.autoplaymediastudio.com you'll find an easy-to-navigate repository for everything related to AutoPlay Media Studio. You'll find action plugins, object plugins, application themes, Lua modules, video transport skins, scrollbar skins, MSSTYLES skins, custom .BTN format button files, background images, project templates, example projects, scripts, audio files, tutorials, tools and lots more.

Trusted by Professionals

Thousands of companies trust Indigo Rose software tools. In fact our products, such as AutoPlay Media Studio, Setup Factory, MSI Factory, TrueUpdate and Visual Patch are used to create, distribute and manage software on millions of customer and client systems around the world. You can trust the people who invented the visual autorun CD development environment to stand by our products with world-class support!


Application Ideas

Introduction

Contents Application Ideas

With AutoPlay Media Studio, your only limitation is your imagination. AutoPlay Media Studio gives you the freedom to easily assemble amazing interactive presentations and full-blown multimedia applications.

To help spark your creativity, we've put together a few ideas for you. There are tons of other ones too! In fact, thousands of developers use AutoPlay Media Studio every day to put together show-stopping AutoPlay/AutoRun CD's and stand-alone multimedia applications.

CD-ROM AutoPlay/AutoRun Menus

It's what we're best known for! AutoPlay Media Studio is the de facto industry standard for professional CD AutoPlay/AutoRun menu applications. In fact, it's been used by thousands of developers to ship millions of CD's to impressed customers and clients. Give your users the option to install software, view documentation, browse the disc, jump to web sites, send email and so much more.

Multimedia Business Cards

Burn your AutoPlay application onto business card size CD-ROM's. The cool look will have customers and clients clamoring to see the contents.

Custom Web Browsers

Putting together a custom web browser is a snap with AutoPlay Media Studio. You'll be able to control every aspect of the browser – an extremely valuable proposition for corporate IT departments. Restrict users to specific sites. Block objectionable material. Wrap it all up with your own logos, graphics and help files.

Brochures

Tell the world about your product or service – in style! Your interactive brochures can feature full-screen video, CD quality audio and anything else you want to add.

Training Guides

Nothing else engages your audience and gets your point across like computer based interactive training. It's ideal for presenting technical details and makes learning both easy and fun.

Custom Audio Players

Fill up a CD with your Ogg Vorbis music files. Put a custom interface on the disc and you're off to the races - complete with custom play lists, track navigation and your own totally hip interface.

Software Samplers

Offer potential customers demo or trial versions of your software products. Bring all of your product information together into one convenient format. You can provide options to install the software demos, view Adobe Flash tutorials, print Adobe PDF documentation and include an embedded web browser for connecting to your online store.

Slideshows

Assemble your digital photos and slides into an easy to navigate application. You'll have a product that is easy to distribute and much more interactive than PowerPoint.

New Product/Service Announcements

Make sure your new product or service gets the recognition it deserves. Combine Acrobat PDF format press releases and brochures with interactive content, PowerPoint slides and Adobe Flash movies for a polished look.

Offline Web Sites

Often times, broadband Internet access may not be available or convenient for sales reps and prospects. Don't let all that valuable information sit idle! With AutoPlay Media Studio, you can store your whole web site on a CD-ROM. You'll be able to create custom web browsers and integrate a variety of rich media types into your application with impressive results.

Sales Presentations

Don't give them a boring a sales presentation! Make it come alive by integrating your product information, demos and multimedia components like video and voice narration. Pull it together with technical documents in PDF or HTML formats and live web links.

Electronic Books

Put your content into an electronic format and use AutoPlay Media Studio to make it friendly and appealing. Organize and present your Adobe Acrobat PDF documents or any other format you like.

Catalogs

Don't waste money on bulky and expensive paper catalogs! Engage your customers with a live and interactive electronic catalog.

Fundraising

Generate enthusiasm and funds for your club, charity or association. You'll be able to show your best side and motivate people to your cause by combining various media types such as sound, video and animation.

Direct Mail Piece

Deliver compelling messages that help increase your response rates. Throw in web site links to drive traffic to your site.

Testimonials

What's more convincing than unsolicited testimonials? Give your customers and clients the chance to tell the world about you. Show off your satisfied customers to your prospects and watch your credibility soar.

Trade Show Handouts

Prospects will remember your handout if they're made with AutoPlay Media Studio. Deliver powerful promotional messages and valuable information in a memorable fashion.

Resumes

Today, you need every advantage you can muster. Show off your computer and design skills with a virtual resume. It's a great way to put your best foot forward.

Annual Reports

Paper reports are boring and expensive. Put them into an interactive electronic format and communicate your financial results more efficiently.

Grand Openings

Advertise your business to the community. Get the word out about your company to other people and businesses with special offers and something to remember you by.

Advertising

Reinforce your advertising message with a memorable AutoPlay CD. Elaborate on the specific benefits of your products or services.

Real Estate Brochure

Highlight the benefits of your property listings. With AutoPlay Media Studio, you can bring together virtual walkthroughs, interior and exterior photographs, special features and much more.

Corporate Profiles

Make your company shine with a multimedia corporate profile CD. Highlight important details about your company and valuable staff members.

Product Branding

Promote your brand and increase awareness. Distinguish yourself from the competition with a snazzy AutoPlay Media Studio presentation.

Financial Statements

Make your numbers come alive with AutoPlay Media Studio. Give them more insight into the details behind the numbers for an engaging presentation. Easily integrate PowerPoint presentations and Excel spreadsheets for the full picture.

Press Releases

With thousands of press releases put out every day, how are you going to get noticed? With an impressive AutoPlay Media Studio press release! Stand out and don't get lost in the crowd.

Special Events

Give your attendees something to keep the event fresh in their minds. Handouts created with AutoPlay Media Studio command attention!

Travel Brochures

Highlight exotic destinations, hotels and resorts with high-res photos and video. This visual and interactive travelogue is perfect for exciting your clients.

Corporate Messages

Foster a positive relationship with customers by communicating important messages with AutoPlay Media Studio. Letters from the President or calls to action by the CEO can be delivered with authority.

Photo Albums

Assemble your photos and multimedia content into an attractive digital album. Showing off your works of art is easy and fun.

Portfolios

Store all of your accomplishments in one digital binder. Keep all of your personal history in a compact and easily updateable format, such as resumes, curriculum vitae, essays, articles, photos, honors, presentations, etc.

Corporate Event Invitations

Impress clients and customers with a unique invitation to your special event. Include maps to the event, photos of staff and links to web information and event details.

Interactive Presentations

Hammer home your point with a truly engaging, interactive presentation. Highlight important details and let your prospects explore at their own pace. Presentations built with AutoPlay Media Studio are always more interesting and effective!

Membership Cards

Give them something they won't want to lose! Turn business card size CD's into distinctive membership pieces that offer virtual tours of member services and facilities.

Music Groups

Showcase your band with music samples, photos and upcoming concert dates.

Concert and Event Tickets

Create truly unique concert or event tickets that work as hip promotional material. After the event, the electronic ticket serves to remind attendees of the event with additional information and multimedia content.

Weddings

Store video and audio records of the couple's big day in an impressive AutoPlay Media Studio application. Makes a great keepsake for the couple as well as guests.

Wedding Invitations

Get inspired! Putting together wedding invitations with AutoPlay Media Studio couldn't be easier. Complete them with music, photos of the couple or even video footage.

Digital Magazines

Publish your newsletters, magazines and articles using the lush graphic capabilities of AutoPlay Media Studio. With embedded web pages, flash animations and links to updated site content, you'll have a dynamic publication that people will love.

Hybrid Music/Application CD's

Create enhanced audio CD's with AutoPlay Media Studio. Dual format discs give your fans more entertainment value and serve as excellent promotional tools.

Theatre Groups

Draw attention to your production or season. Integrate video, Flash animations, show dates, venue maps, web links and cast photos.

Employee Policies

Organize your employee manual in a dynamic fashion. Paper manuals become outdated as soon as you print them. Put all of your current policies into an AutoPlay Media Studio application so they're easy to search, view and update as necessary.


The AutoPlay Model

Introduction

Contents The AutoPlay Model

AutoPlay Media Studio lets you design AutoPlay applications. AutoPlay applications are programs that specialize in bringing different kinds of media together and presenting it all to the user in a highly customized graphic interface.

AutoPlay applications follow a simple model. Each application is made up of individual screens, called pages. Pages are the "surfaces" that the interface is built on. It also contains a feature similar to pages called dialogs.

On these pages and dialogs, you can place objects. The objects let you display text, images, and other media (videos, Flash, HTML) on the page or dialog.

The application, the pages, the dialogs, and the objects can all respond to various events. Events are things that can happen at run time, such as the user clicking on a button object, or a video object reaching the end of the video it's playing.

You can add actions to these events to make your application respond to them. Actions tell your application to do something specific whenever the event they're assigned to occurs. For example, you could start playing an Ogg Vorbis audio file when the user clicks on a "Play Music" button, or load and display a text file when the user clicks on a "More Info" button. With hundreds of actions at your disposal, your instructions can be as simple or as complex as you wish.


Changes to AutoPlay Media Studio

Contents

Please select one of the following subjects:

Changes from 7 to 8

Changes from 6 to 8

Changes from 5 to 8

Changes from 4 to 8

Changes from 3 to 8


Importing AutoPlay Media Studio Projects

Contents

Please select one of the following subjects:

Importing AutoPlay Media Studio 7 Projects

Importing AutoPlay Media Studio 6 Projects

Importing AutoPlay Media Studio 5 Projects

Importing AutoPlay Media Studio 4 Projects

Importing AutoPlay Menu Studio 3 Projects

Note: Autorun MAX! projects can also be opened in AutoPlay Media Studio, however they first must be exported from Autorun MAX! as an *.apz file. You can do this by going to File > Export and selecting AutoPlay Media Studio x.x as the "Save as type."


Running on Windows Vista or Later

Windows Vista

Overview

In general, applications designed for Windows XP are highly compatible with Windows Vista or later given its file, folder and registry virtualization features. Many of Windows XP's existing features have been enhanced and new features added. While there is a high compatibility, new features and the tightening of security require developers to be aware of certain changes that affect both application development and distribution.

Important Vista or Later Features

User Account Control (UAC)

By default, in Windows XP all user accounts were created as local administrators. This meant that many users ran as administrators with full access privileges leaving the security of the system open to attacks. A design goal of the UAC was to prevent applications from being executed without the user's knowledge. While user accounts and restricted tokens have been around in previous versions of Windows, Windows Vista and later contain security protection for the administrator account as well. When an administrator logs in, two different tokens are created. The first token grants all the permissions and privileges of the administrator, while the second token is a restricted token (filtered token), offering virtually the same privileges of a standard user. With UAC (User Account Control) enabled, members of the administrators group run with the same access token as standard users. Only when the user gives approval will the program be granted the full access token.

Note: Features of UAC can be enabled and disabled, so developers should not rely solely on its features for elevation.

Application Manifests

While application manifests are not new to Windows Vista or later, a new section has been added for the UAC to mark applications with a requested execution level. This information notifies the operating system of the privileges that the application requires so it can perform any necessary elevation via consent, or login credentials. All UAC compliant applications should have the requested execution level added to its application manifest. Applications without this manifest information, that are not run elevated or are not detected by Windows Vista or later's installer detection, may be run with file and registry virtualization (see next section). In future releases of Windows, the only way to run an application elevated will to have a signed manifest identifying the required privilege level.

File/Registry Virtualization

In an attempt to provide compatibility for applications that are not UAC compliant (missing requested execution level attribute), Windows Vista or later OSs contain a new virtualization technology for files, folders and the registry. When a non-UAC compliant application tries to write to a protected directory such as Program Files, or a global portion of the registry such as HKEY_LOCAL_MACHINE\Software, the application is provided with a virtualized copy that is stored under the user's profile. Developers are not to rely on this technology being present in the future.

Virtualization (file/registry) is turned OFF for any applications:

  • Containing an application manifest with an appropriate requested execution level.

  • Detected by Windows Vista or later as installation programs resulting in a prompt for elevation/approval.

  • That are run elevated.

  • 64-bit processes (AutoPlay Media Studio applications are always 32-bit).

AutoPlay Media Studio Vista/Windows 7/Windows 8/Windows 8.1/Windows 10 Runtime Features

Several features have been added to aid in running AutoPlay applications on Windows Vista or later. Additional features will be added in future service releases.

  • AutoPlay application manifests containing configurable requested execution level settings. The Requested User Privilege Level setting can be found in Project > Settings, Advanced tab.

  • Support added to the System.GetOSName and System.GetOSVersionInfo actions.

  • New return code for the File.Run action pertaining to elevation being required.

  • Support (and additional table item) added to the System.GetUserInfo action regarding administrator detection.

  • New action System.GetOSProductInfo that can be used to get the product type of Windows Vista/Windows 7/Server 2008/Server 2008 R2/Windows 8/Windows Server 2012/Windows 8.1/Windows Server 2012 R2/Windows 10/Windows Server 10 operating systems.

  • Addition of a "WaitForReturn" parameter and return code support for the Shell.Execute action.

  • Integrated Authenticode Code Signing to allow you to code sign your AutoPlay applications with your certificate. You can find these settings on the Code Signing tab of the "Project Settings" dialog (Project > Settings).

Choosing the appropriate "Requested User Privilege Level" Setting

The Requested User Privilege Level setting specifies which requested execution level to include in the AutoPlay application's manifest for running on Windows Vista or later. When the application is run, the operating system reads this information to identify what privileges the application requires. You can find this setting by choosing Project > Settings and selecting the Advanced tab.

Important Note: The "Requested User Privilege Level" setting is only effective if the user has UAC enabled. Each user's UAC settings can also be configured differently, so you should not rely solely on this feature. When performing administrative tasks, you should always include administrator checks using the System.GetUserInfo action's "IsAdmin" and "IsVistaAdminLimitedToken" table return values. Windows Vista or later operating system detection can also be achieved using the System.GetOSName and System.GetOSVersionInfo actions.

The default setting in AutoPlay Media Studio is "As invoker" and is suitable for generic presentations or menus, where you are certain you do not need access to protected areas of the operating system (file system/registry). This includes access directly by the AutoPlay application, and the launching of external programs that require these permissions (unless they are designed to handle their own permission detection and notification). However, some AutoPlay applications may require access beyond the privileges of a standard user. For these cases, you should be aware of the following information and required changes:

Using "As invoker"

Using the "As invoker" setting means that your application does not require any system access other than the current user's profile areas. Many of these issues exist for previous versions of Windows when running applications as a standard user.

Important information requiring attention:

Running Programs

User Account Control (UAC) On

Problem: File.Run actions will fail for both standard users and Administrator users if Windows Vista or later identifies the target file as requiring elevation. This will happen for files containing marked application manifests requiring elevation, or detected by Windows Vista's installer detection.
Solutions: If the target file contains a proper manifest, and contains its own Administrator detection and notification, or is an install/patch/update that Vista or later will detect with its installer detection feature, use the Shell.Execute action instead. This will allow Vista or later to prompt for approval or login credentials. The second solution is to mark your AutoPlay application as "Require administrator". In addition, you should always perform any required Administrator detection using the System.GetUserInfo action. This will enable you to determine if the user is an administrator running with full privileges, or if they are part of the administrators group, but running with limited privileges.

User Account Control (UAC) Off

When User Account Control (UAC) has been disabled on the system, the permission rules for running programs are the same as they are on other NT based operating systems such as Windows XP. Both the File.Run and Shell.Execute actions will succeed, however the target application will be subject to the privileges of the current user. Again, you should always perform any required Administrator detection using the System.GetUserInfo action and respond appropriately.

File system modifications

Certain locations are only accessible to users with administrative privileges such as: C:\Windows, C:\Windows\System32, Program Files and any files that are part of the Windows Resource Protection (WRP). Windows Vista or later also prevents files from being written to the root of the C:. When UAC is On, both standard user accounts and users that are members of the Administrators group will fail. When UAC is Off, only members of the Administrators group will succeed. This affects actions such as File.Copy, File.Install, System.RegisterActiveX etc.

Registry modifications

Generally standard users only contain write access to locations under HKEY_CURRENT_USER. When UAC is On, both standard user accounts and users that are members of the Administrators group will fail. When UAC is Off, only members of the Administrators group will succeed.

Using "Highest available"

Using the "Highest available" setting means that your AutoPlay application is designed to be run by all users. The application runs with the same access token as the parent process. This means that if the application is run by a member of the Administrators group, their privileges will be elevated to the Administrator's full access token when given their consent. However, this also means that if a standard user ran the application, they would only have their highest privileges, those being a standard user. Therefore all issues mentioned above for "As invoker" would exist using this setting resulting in possible application failure. Again, if your application performs administrator tasks, the "Require administrator" option should be used in addition to the usual administrator detection and conditions.

Using "Require administrator"

Using the "Require administrator" setting means that your AutoPlay application performs tasks that can only be achieved by a member of the Administrators group running with full privileges.

User Account Control (UAC) On

When UAC is enabled, a user who is part of the Administrators group will be presented with a prompt for consent dialog that will then launch the application with a full administrative access token. Standard users will be prompted for credentials of an Administrator. Since UAC can be disabled and have various configurations, you should also perform any required Administrator detection using the System.GetUserInfo action, and respond appropriately.

User Account Control (UAC) Off

When UAC is disabled, the application will launch with the privileges of the current user, without any prompts. It is important to include your own Administrator detection using the System.GetUserInfo action and respond appropriately.

Authenticode Signing

The goal of Authenticode signing is to ensure both the integrity and authenticity of the program. If you plan to run your AutoPlay applications on Windows Vista or later, another point of consideration beyond user experience, is the fact that Windows Vista or later has the ability to prevent any unsigned application from launching with full privileges. This may impact the application's functionality. It is recommended that all executable files be signed when distributed on Windows Vista or later.

Note: For more information, see Authenticode Code Signing.


Copyright Information

Copyright Info

Proprietary Notice

The software described in this document is a proprietary product of Indigo Rose Software Design Corporation and is furnished to the user under a license for use as specified in the license agreement. The software may be used or copied only in accordance with the terms of the agreement.

Information in this document is subject to change without notice and does not represent a commitment on the part of Indigo Rose Software Design Corporation. No part of this document may be reproduced, transmitted, transcribed, stored in any retrieval system, or translated into any language without the express written permission of Indigo Rose Software Design Corporation.

Trademarks

AutoPlay Media Studio and the Indigo Rose logo are trademarks of Indigo Rose Software Design Corporation. All other trademarks and registered trademarks mentioned in this document are the property of their respective owners.

Copyright

Copyright © 2003-2015 Indigo Rose Software Design Corporation.
All Rights Reserved.

FMOD sound and music system is copyright © Firelight Technologies, Pty Ltd. 1994-2015.

LUA is copyright © 2003-2015 Tecgraf, PUC-Rio.

UPX executable compression (http://upx.sf.net) copyright © 1996-2015 Markus Franz Xaver Johannes Oberhumer, copyright © 1996-2015 Laszlo Molnar, copyright © 2000-2015 John F. Reiser. All Rights Reserved.


System Requirements

Overview

Design Environment

The minimum and recommended system requirements for the AutoPlay Media Studio design environment are:

Minimum

Windows XP SP2, Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10 or later
Pentium 4 or greater processor (or equivalent)
256 MB RAM or greater
1024x768 display resolution with 16-bit or higher color depth
150 MB of free hard disk space for installation
Mouse

Run-time Application (Published Project)

The minimum system requirements for the AutoPlay Media Studio run-time executable are:

Minimum

Windows XP or later
Pentium 120 MHz
32 MB RAM

Note: Requirements may vary according to the needs of your project. For example, a faster system may be required to view large videos at high bitrates, or your project may require a specific version of the Flash player, or the presence of a specific video codec.

Minimum for Video Object

DirectX 7 or greater
Internet Explorer 4.0 or newer

Minimum for Flash Object

The Flash object will only work if the Adobe Flash Player control is installed on the user's system. The Flash object's On FlashCall event is only supported in Flash version 8.0 or later.

Minimum for Web Object

The web object will only work if the Internet Explorer ActiveX control is installed on the user's system. It is compatible with version 4.01 or newer of the Internet Explorer control.

Minimum for PDF Object

The PDF object will only work if version 8.0 or newer of the Adobe Reader ActiveX control is installed on the user's system. It is installed with version 8.0 or newer of either the free Adobe Reader application, or one of the Adobe Acrobat professional products.

Minimum for QuickTime Object

The QuickTime object will only work if the QuickTime ActiveX control is installed on the user's system.


How do I...?

List of Questions

How do I:

Add a hyperlink/hotspot object

Add an email link with subject

Add password protection

Adjust volume levels

Apply changes to multiple objects

Ask the user for confirmation before exiting

Auto-save my project

Change the application icon

Change the page size

Change the title bar text

Check for Internet Explorer

Check for Adobe Flash

Check if a particular program is running

Close my application immediately

Compare two strings

Control volume settings at runtime

Copy a file to the hard drive

Create a button that closes the application

Create a custom callback function

Create a file browser

Create a mixed-mode CD

Create a multilingual application

Create a non-rectangular window

Create a single-file executable

Create a table of contents

Create an image map

Create CD-ROM browsing windows

Detect if internet access is available

Detect the end of a flash movie

Detect what operating system (OS) is being used

Detect what version of Internet Explorer is installed

Determine amount of free space on a drive

Determine if a network (LAN) is present

Determine the drive letter of the primary hard drive

Determine the operating system (OS) language

Determine when a video has finished playing

Display a Save As dialog

Display text and/or images with mouseover events

Duplicate Objects

Embed a web browser window

Expire my application after a certain date

Expire my application after a certain number of executions

Expire my application after thirty days

Get system folder paths

Get the registered user of the computer

Hide an object

Hide the application at runtime

Hide the title bar

Inherit page properties

Interact with embedded Flash objects

Interact with embedded web objects

Keep my application always on top

Load and display a text file

Lock objects

Maintain aspect ratios of objects

Make a basic quiz/testing application

Make a document browser

Make a dropdown menu

Make a slideshow

Make a slideshow with audio

Make a thumbnail image browser

Make an image browser

Make an image semi-transparent

Open a Microsoft Word DOC file

Open a Microsoft PowerPoint PPT file

Open a web site in an external browser

Open an Adobe Acrobat PDF file

Open an HTML file in a pop-up window

Pause the background music

Persist data across sessions

Pin objects

Play an Adobe Flash movie

Play a video before my application starts

Play a video using full screen mode

Play a video using the embedded video object

Play an AVI video file

Play background music

Play multiple audio files in sequence

Play multiple video files in sequence

Print a file

Read specific lines from a text file

Reboot the system

Reload image objects at runtime

Remember runtime preferences

Remove unused files from my project

Repeat things at specific intervals

Respond to Key Presses

Restore an object's original size

Round a number down

Round a number up

Round a number up or down

Run a program and wait for it to finish

Run Adobe Acrobat reader directly from the CD-ROM

Run an application after reboot

Run an executable file

Run in full-screen (kiosk) mode

Run my application only once

Send email with subject, body and attachment

Set file attributes for more than one file

Set page transition effects

Show a splash image

Span content across multiple CD-ROM's

Size my application to particular screen dimensions

Submit information to a web site script

Toggle the background music on/off

Use an FSCommand in Swish to Trigger an Action

Use the status dialog window

Use timer events

Work with tables and files

Write text to a file


How do I...?

Answer List of Questions

Add a Hyperlink/Hotspot Object

Adding a hyperlink to a project is useful when you want a user to be able to click on a part of your project for more information. This is accomplished in AutoPlay Media Studio using the On Click event of an object.

Example 1

As an example, let us assume that you want to jump to "Page2" when the user clicks on the phrase "Continue . . ." within a paragraph object. For the purpose of this example, let us also assume that you have the following paragraph in your project:

  1. Use a hotspot object, and place it over the phrase 'Continue . . .' in your paragraph object.

  2. In the hotspot's Quick Action tab, choose 'Show Page' as the action to run, choose 'Specific Page' for the page to show, and choose 'Page 2' for the page name.

Example 2

To have mouseover effects (the text changes color when you mouseover the word 'Continue . . .'), do not use a hotspot, but instead use a second paragraph object containing only the text that the mouseover should change:

  1. Create a paragraph object containing just 'Continue . . .'

  2. Place that object exactly over the phrase 'Continue . . .' in your larger paragraph.

Tip: Use the keyboard arrows to accurately position your second paragraph object.

  3. Set the mouseover color to whatever you want. In the paragraph's Quick Action tab, choose 'Show Page' as the action to run, choose 'Specific Page' for the page to show, and choose 'Page 2' for the page name.

Example 3

To include hyperlinks in a text file without utilizing hotspot or paragraph objects, embed an HTML file in your project using a web object. When a user clicks on a link in this embedded file, your project can call any action you choose:

  1. Create a web object, and load the desired HTML file into it.

  2. See How do I Interact with embedded web objects to set up the navigation in your project, and for an example of a simple HTML file.

Note: This is the best way to include hyperlinks if your text is not static with relation to the page. While paragraph and hotspot objects are stationary, links within an HTML file dynamically move based on the size of the web object at runtime.


How do I...?

Answer List of Questions

Add an Email Link with Subject

AutoPlay Media Studio includes a built in action to open a blank e-mail in the user's default mail program.

As an example, we will create a button that, when clicked, links to your company's e-mail address:

  1. Create a button object.

  2. Insert the following code into the On Click event of the button object:

File.OpenEmail("you@yourdomain.com?subject=Your Subject Here", "SW_SHOWNORMAL");

When the user clicks on the button, their default mail program will open a blank e-mail message to "you@yourdomain.com" with "Your Subject Here" as the subject.


How do I...?

Answer List of Questions

Add Password Protection

There are many instances requiring the user to be prompted for information that must not be visible on the screen, such as a password. In AutoPlay Media Studio this is accomplished by using a Dialog.PasswordInput action.

As an example, we will prompt the user for a password at the start of your program, and compare it to a stored value (thereby limiting access to your program to only those who know the password).

To accomplish this:

  1. Insert the following script in your page's On Show event:

-- the 'correct' password
real_password = "password";

-- prompt the user to enter a password
user_password = Dialog.PasswordInput("Password", "Please enter the password: ", MB_ICONQUESTION);

-- compare the user's password to the 'correct' password.
-- If the user supplies the wrong password, exit the program.
if real_password ~= user_password then
Application.Exit();
end

This script pops up a dialog box requesting the password. Whatever the user types in this dialog box appears as *******. If the correct password is entered, the program runs normally. If any other password is entered, the program will close.

Alternatively, you can have a 'list' of valid passwords. To accomplish this, store your valid passwords in a table:

  1. Insert the following script in your page's On Show event:

--assume the user enters a bad password
correct_password = false;

-- the 'correct' password
real_passwords = {"password", "password2", "3rdPassword"};

-- prompt the user to enter a password
user_password = Dialog.PasswordInput("Password", "Please enter the password: ", MB_ICONQUESTION);

-- compare the user's password to the 'correct' password.
for j in pairs(real_passwords) do
if real_passwords[j] == user_password then
correct_password = true;
end
end

--if the password was bad, exit
if not correct_password then
Application.Exit();
end

Tip: As a slight variation of this technique, you can store your password list in a text file, and when your application is run, populate a table with the contents of that text file. For an example of reading a text file to a table, see How do I read specific lines from a text file.


How do I...?

Answer List of Questions

Adjust Volume Levels

Adjusting the volume of an audio channel is useful when you want to, for example, have non-intrusive music playing in your project. To accomplish this in AutoPlay Media Studio, use the Audio.SetVolume action.

As an example, we will play a soundtrack in the background, and set the volume to be 25% of maximum:

  1. Insert the following code into the On Show event of your page:

Audio.Load(CHANNEL_BACKGROUND, "your_audio_here.ogg", true, true);
Audio.SetVolume(CHANNEL_BACKGROUND, 63); -- sets the volume level to 25% of 255


How do I...?

Answer List of Questions

Apply Changes to Multiple Objects

It is often useful to be able to change the properties for many objects at once. To accomplish this in AutoPlay Media Studio:

  1. Select the first object.

  2. Hold down the Ctrl key.

  3. Select the remaining objects you wish to change.

  4. Release the Ctrl key.

Any properties that are available for all the objects will be visible in the Properties Pane. Make your changes as required.

Tip: When selecting multiple objects, holding down the Shift key on your keyboard functions the same as holding down the Ctrl key.


How do I...?

Answer List of Questions

Ask the User for Confirmation Before Exiting

In AutoPlay Media Studio, it is possible to stop closing your application based on user input, even after the close button has been pressed, or the Application.Exit action has been used. This is useful if, for example, you are worried that the user will accidentally close your application, or if you want to allow the user to save their changes before they exit.

To accomplish this, you must include a function (QueryAllowProjectClose) in your Global Functions (Project > Global Functions) that returns true if the program should close, and false if it should not:

function QueryAllowProjectClose() --this function will be called when the program is exiting
confirmation = Dialog.Message("Are you sure?", "Are you sure that you want to exit?", MB_YESNO, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
if confirmation == 6 then
-- The yes button was pressed, allow program to close (return true)
return true;
else
-- The yes button was NOT pressed, do NOT allow the program to close (Return false)
return false;
end
end

Note: This function is called internally by your application when it is told to exit. If true is returned, your application will exit. If false is returned, your program will not exit.

To use this function, you would use script similar to this:

if QueryAllowProjectClose() then
Application.Exit();
end


How do I...?

Answer List of Questions

Auto-Save My Project

Computer crashes are inevitable, and it seems that computers crash at the worst possible moments. AutoPlay Media Studio has a built in option to save your project at an interval that you choose.

To enable this option:

  1. Choose Edit > Preferences from the menu.

  2. Click on Document.

  3. Enable the Auto Save feature and choose your desired interval between saves.

  4. Click OK.


How do I...?

Answer List of Questions

Change the Application Icon

To change the icon that your application uses:

  1. Choose Project > Settings from the menu.

  2. Select the Custom Icon option and choose the icon to use.

Note: Any custom icon that you choose to use must be in Windows standard .ICO format.

  3. Click OK.


How do I...?

Answer List of Questions

Change the Page Size

In AutoPlay Media Studio, the project size defaults to 630 pixels wide by 425 pixels high. If your project requires different dimensions, change the window size in the Project Settings dialog:

  1. Choose Project > Settings from the menu.

  2. Change the window size width and height to your desired values, and click OK.


How do I...?

Answer List of Questions

Change the Title Bar Text

To change the text that appears in the title bar of your application:

  1. Choose Project > Settings from the menu.

  2. Adjust the title in the Window Title area.

  3. Click OK.


How do I...?

Answer List of Questions

Check For Internet Explorer

AutoPlay Media Studio has an option to check the user's system for various dependencies at runtime, and optionally can require that the dependencies exist before the program can continue. To check for Internet Explorer:

  1. Choose Project > Dependencies from the menu.

  2. Select the dependencies that your project requires (in this case Internet Explorer).

  3. Click OK.


How do I...?

Answer List of Questions

Check For Adobe Flash

AutoPlay Media Studio has an option to check the user's system for various dependencies at runtime, and optionally can require that the dependencies exist before the program can continue. To check for Adobe Flash:

  1. Choose Project > Dependencies from the menu.

  2. Select the dependencies that your project requires (in this case Adobe Flash).

  3. Click OK.


How do I...?

Answer List of Questions

Check if a Particular Program is Running

As an example, let us assume that you want to run your program (autorun.exe) only if there is not another autorun.exe running on the system. To accomplish this, use the Window.EnumerateProcesses action and check every process against the filename autorun.exe.

  1. Insert the following code into the On Show event of your page:

-- Initialize variables
instances_of_file = 0;
file_to_check_for = "autorun.exe"; --have all lowercase
processes = Window.EnumerateProcesses();

-- Step through process table
for j, file_path in pairs(processes) do
-- Split path to get filename
file = String.SplitPath(file_path);
-- compare filename to the file specified in variable initialization
if (String.Lower(file.Filename..file.Extension)) == file_to_check_for then
-- The process matches, increment count by 1.
instances_of_file = instances_of_file + 1;
end
end

-- Check if at least one file matched
if instances_of_file > 0 then
-- There was at least one match, hide this application window, display error, and close.
Window.Hide(Application.GetWndHandle());
Dialog.Message("Error", "Another instance of Autorun.exe is already open.");
Window.Close(Application.GetWndHandle(), CLOSEWND_TERMINATE);
end


How do I...?

Answer List of Questions

Close My Application Immediately

Normally to close your application, you should use the Application.Exit() action. However, if you require your application to terminate immediately, instead of using Application.Exit(), use the following code:

Window.Close(Application.GetWndHandle(), CLOSEWND_TERMINATE);


How do I...?

Answer List of Questions

Compare Two Strings

String comparisons are performed in the same manor as number comparisons. As an example, we will create two strings, and perform an action based on their contents:

  1. Create two variables containing strings:

String1 = "I am String1";
String2 = "I am String2";

  2. Compare the two strings:

if String1 == String2 then
--the two strings are equal
else
--the two strings are not equal
if String1 > String2 then
--String1 is alphabetically larger than String2
elseif String1 < String2 then
--String1 is alphabetically smaller than String2
end
end

Note: if you want to compare the lengths of two strings, you must use the String.Length action:

if String.Length(String1) == String.Length(String2) then
--the two strings are the same length!!
end

Tip: To perform a non-case-sensitive comparison on two strings, use a String.CompareNoCase action.


How do I...?

Answer List of Questions

Control Volume Settings at Run Time

As an example, we will create a project with two buttons: a volume increase button, and a volume decrease button.

  1. Insert the following code into the On Click event of the volume increase button:

audio_channel = CHANNEL_USER1;
Audio.SetVolume(audio_channel, Audio.GetVolume(audio_channel)+20);

  2. Insert the following code into the On Click event of the volume decrease button:

audio_channel = CHANNEL_USER1;
Audio.SetVolume(audio_channel, Audio.GetVolume(audio_channel)-20);


How do I...?

Answer List of Questions

Copy a File to the Hard Drive

It is often useful to copy a file from a CD-ROM (or other media) to the user's computer. In AutoPlay Media Studio, this is accomplished with a File.Copy action.

As an example, we will load a specific font onto the user's computer:

--get the destination directory (in this case, where the fonts are stored)
fonts_dir = Shell.GetFolder(SHF_FONTS);

--copy the file from your cd to the user's font directory
File.Copy(_SourceFolder .. "\\my_font.ttf", fonts_dir..\\"my_font.ttf", false, true, false, true, nil);

--register the font with windows
System.RegisterFont(fonts_dir .. "\\myfont.ttf", "My Font Name", true);


How do I...?

Answer List of Questions

Create a Button that Closes the Application

In AutoPlay Media Studio, to create a button to close your application:

  1. Choose Object > Button from the menu and select a button file to use.

  2. Double click on the button you've just created, and click on the Quick Action tab.

  3. Select Exit/Close as the action to run.

  4. Click OK.


How do I...?

Answer List of Questions

Create a Custom Callback Function

There are instances where you will want to customize the status information displayed to your users when certain actions are performed. To do this, you will have to create a custom callback function.

For an example of a custom callback function, please see the topic Callback Function Examples.


How do I...?

Answer List of Questions

Create a File Browser

In AutoPlay Media Studio it is possible to have a list of files that the user can click on to open.

As an example, we will create a listbox with two movie choices in it. The user will click on one of the files, and click a button to open the file.

  1. Create a listbox object.

  2. Add the movie names as the item text and the path to the movies as the item data.

  3. Create a button.

  4. In the On Click event of the button's script tab, add the following script:

selected = ListBox.GetSelected("ListBox1");
file = ListBox.GetItemData("ListBox1", selected[1]);
File.Open(file, "", SW_SHOWNORMAL)

Note: If you have enabled the Multiple Selection option for your listbox, the example above will only open the first file selected.

Tip: You may wish to add some logic to prevent errors from occurring. One such error is if the user clicks in the listbox but selects nothing. The script above would still fire, but line 2 would fail because selected[1] would be nil. You can use an if statement to check for nil values:

if (selected) then
-- There is at least one item selected, put your actions here
end

That way, nothing occurs unless something is selected (nil related errors are prevented).


How do I...?

Answer List of Questions

Create a Mixed-Mode CD

CD's can be created in mixed mode, meaning that the CD contains both your application for use on a computer, and up to 98 music tracks for use in a standard audio CD player. Mixed-mode CDs are often used to create an "enhanced" audio CD which plays normally in a regular CD player and presents additional multimedia content when placed in a computer's CD-ROM drive.

There are three basic types of mixed-mode CDs:

Data in Track 1

Description:

This form of mixed mode CD places the data track as the first music track on the disk.

Pros:

The CD is recorded as a Mode 1 ROM, therefore it can be played on virtually every CD ROM drive produced.

Cons:

Some CD players will attempt to play the data track. Most new players will skip over the track because it is listed as "data" in the CD's table of contents, but some players will attempt to play the data track as audio, resulting in a very loud noise (like the screech of a fax machine).

This method is typically only used in situations where it is unlikely that the CD will be played in a CD audio player.

Pre-Gap / Track-Zero

Description:

This form of a mixed mode CD hides the data track in the pause before track 1 begins.

Pros:

Older CD players do not typically attempt to play the data track.

Cons:

If the user rewinds the CD into the data track, the data can be played back as audio, resulting in a very loud disconcerting noise.

This type of CD does not conform to the official standard and may not be compatible with some players or operating system software.

CD Extra or Enhanced CD

Description:

This form of a mixed mode CD contains two sessions (a multi-session disk). The first session contains up to 98 audio tracks, and the second session contains the data track. Audio CD players can only 'see' the first session, and thus will not play the data track. Most CD-ROM drives can see both sessions, and will load your AutoPlay application.

Pros:

Even older CD players won't play the data track, so the user's ears and speakers are safe from damage.

This format is the most compatible with both stand-alone CD players and CD-ROM drives.

Cons:

Enhanced CDs are not playable on Photo CD players.

Requires a CD-ROM drive that is able to read multi-session discs.

Conclusion

Our Suggestion:

We suggest that you use the 'Enhanced CD' type, due to its wider scope of compatibility. Virtually any CD-ROM created for Windows 95 or greater supports this format.

The data files will be recognized in Windows Explorer as though there are no audio tracks, because Windows Explorer typically can only see the last session in a multi-session disk. Audio players, on the other hand, typically see only the first session in a multi-session disk. Therefore, both CD-ROMS and stand-alone audio players are able to play the audio tracks.

Burning an Enhanced CD (CD Extra) with Nero:

To burn an Enhanced CD with Nero Burning ROM (6.0 or greater):

  1. Select "CD Extra" and input desired settings.

  2. Add your audio tracks by dragging your audio files to the track window.

  3. Add your data files by dragging them to the folder structure window.


How do I...?

Answer List of Questions

Create a Multilingual Application

To create a project that supports more than one language, create one project for each language you wish to support, and one master project to decide which project to launch.

For your master project, use a System.GetDefaultLangID action to determine what the user's default language is, and launch the appropriate project file.

Another possibility is to determine the language ID in the On Preload event and then jump to a particular page or even to present the user with available choices that branch off into the appropriate section of a single application.


How do I...?

Answer List of Questions

Create a Non-Rectangular Window

If a normal rectangular window is unsuitable for your project, it is possible to create a custom shaped window. To accomplish this in AutoPlay Media Studio first create a transparency mask in an external image editor.

  1. To create a transparency mask, create an image that has the same dimensions as your project.

  2. Now draw the window shape you want. Whatever you want visible make white, whatever you want hidden make black:

  3. Save your image as a png image file.

  4. Once the mask is created, in AutoPlay click Project, then Settings. Click on Custom Mask, and select your image. Now on runtime, your project will take the shape of your mask.

Tip: If your transparency mask image is not the same dimensions as your application window, you can enable the 'Fit to window' option on the Project Settings dialog to stretch/shrink the mask image to the dimensions of your window.


How do I...?

Answer List of Questions

Create a Single-File Executable

Once you have finished creating your application, AutoPlay Media Studio offers the option to publish your project to a single executable. When the user runs this file, it extracts the contents to a temp directory and launches your application. When your application is exited, the temp directory and contents are deleted.

To bundle your project into one executable file:

  1. Choose Publish > Build from the menu.

  2. Select Web/Email executable.

  3. Click Next.

  4. Enter the desired path and filename.

  5. Click Build.

Note: Selecting the password protect option does not affect how the user runs your program. The password protect option generates a random password preventing the user from uncompressing the executable file and gaining access to your raw files.


How do I...?

Answer List of Questions

Create a Table of Contents

One way of navigating through a multi-page application is by utilizing a Table Of Contents page. In AutoPlay Media Studio this is accomplished by creating a page at the beginning of your project with one navigational object (e.g. a button object) for each page you want to link to.

As an example, we will create a project with three pages (one page for the Table Of Contents, and two content pages) where Page1 is the Table of Contents, and Page2 and Page3 are the content pages:

On the first page:

  1. Create two buttons.

  2. On the Quick Action tab of the first button, choose Show Page as the action to run, with Specific Page and Page 1 as the options.

  3. On the Quick Action tab of the second button, choose Show Page as the action to run, with Specific Page and Page 2 as the options.

Note: You may want to create a back button on each of your content pages to return to the Table Of Contents. This is accomplished in the exact same way as above. You simply have to specify which page you wish to 'Show' in the options of the Show Page quick action.


How do I...?

Answer List of Questions

Create an Image Map

Image maps are used to make various locations within one image 'hot', or clickable. To accomplish this in AutoPlay Media Studio:

  1. Create an image in an external image editor. In your project use a hotspot object for each clickable area:

  2. Add an action to each hotspot object's On Click event to accomplish the desired task. For example, to open a web browser, use the action:

File.OpenURL("http://www.indigorose.com/", SW_SHOWNORMAL);


How do I...?

Answer List of Questions

Create CD-ROM Browsing Windows

In AutoPlay Media Studio, it is possible to open a folder on a user's machine, either within your project, or in an external window (the same as double-clicking on a folder on your desktop). It is also possible to open a folder in explore view (the same as using windows explorer).

Opening a folder within your project:

  1. Create a web object, and name it Web1.

  2. Call the action Web.LoadURL:

Web.LoadURL("Web1", "C:\\");

Note: If the user does not have Internet Explorer 4.0 or later as their default browser, the folder view will be html, not windows based.

Opening a folder in an external window:

  1. Call the action File.Open:

File.Open("C:\\", "", SW_SHOWNORMAL);

Opening a folder in an explorer window:

  1. Call the action File.ExploreFolder:

File.ExploreFolder("C:\\", SW_SHOWNORMAL);

Tip: If your project is being run from the user's CD-Rom drive, and you wish to browse the CD-Rom from your autoplay application, use _SourceFolder as the path to browse/open.


How do I...?

Answer List of Questions

Detect if Internet Access is Available

If your application utilizes the Internet in any way within your application, you can check to ensure that the user has internet access before continuing, and if they do not, prompt the user to connect.

To accomplish this in AutoPlay Media Studio:

  1. Enter the following script into an event in your application:

connected = HTTP.TestConnection("http://www.indigorose.com", 20, 80, nil, nil);

if connected then
--Insert your internet related action here
else
Dialog.Message("Internet Error", "You are not connected to the Internet. This application will now exit");
Application.Exit();
end

This script checks if the user is connected to the Internet. If after 20 seconds the program cannot find a valid internet connection, it notifies the user, and exits.


How do I...?

Answer List of Questions

Detect the End of a Flash Movie

In AutoPlay Media Studio it is possible to detect when a flash movie ends by using an FSCommand. This is useful if, for example, you want to navigate to another page once your flash movie ends.

To accomplish this:

  1. In Adobe Flash: Create a Flash movie which contains an FSCommand on the last frame of the timeline:

fscommand("quit", "");

  2. Insert the following code into the On FSCommand event of your flash object:

if e_FSCommand == "quit" then
--Whatever script is here will be performed when your flash movie ends.
end


How do I...?

Answer List of Questions

Detect what Operating System (OS) is Being Used

AutoPlay Media includes an action to detect what OS the user is running:

  1. Add the following script to any event in your application to store the user's OS version in a variable OS_Name:

OS_Name = "OS Name: " .. System.GetOSName();

Note: AutoPlay has another built in function: System.GetOsVersionInfo(), which returns the version information of the user's operating system in a table.


How do I...?

Answer List of Questions

Detect what Version of Internet Explorer is Installed

To detect the version of Internet Explorer that is installed on the user's system:

  1. Enable the Internet Explorer dependency

Note: If you want to detect the version of Internet Explorer, but not require your user to have it installed, set the required version to 0.0.0.0

  2. Insert the following script to the On Show event of your first page:

if _InternetExplorerVer == "0.0.0.0" then
Dialog.Message("Internet Explorer", "Internet Explorer is not installed");
else
Dialog.Message("Internet Explorer", "Internet Explorer version " .. _InternetExplorerVer .. " is installed on this system");
end

Note: The above script will pop up a dialog box at runtime displaying the version of internet explorer that the user's computer currently has installed.


How do I...?

Answer List of Questions

Determine Amount of Free Space on a Drive

When installing software to a user's system, it is useful to ensure that the user's system has enough free space on their hard drive to accommodate the software.

To accomplish this in AutoPlay Media Studio:

  1. Insert the following code into any event in your application:

--space required, in megabytes
space_required = 253

--get free space on the user's system (c:\ drive)
space_available = Drive.GetFreeSpace("C:");

--compare free space available to free space required
if space_required > space_available then
Dialog.Message("","You are "..(space_required - space_available).." MB short");
else
Dialog.Message("","You have "..(space_available - space_required).." MB more than you need");
end

Note: The variable space_required must be set by you. 253 is an arbitrary number.


How do I...?

Answer List of Questions

Determine if a Network (LAN) is Present

In AutoPlay Media Studio, to determine if a user is connected to a LAN:

  1. Insert the following code into any event in your application:

lan = System.GetLANInfo();
lan_exist = true;
for j in pairs(lan) do
if lan[j] == "Unknown" then
lan_exist = false;
end
end

if lan_exist then
Dialog.Message("", "You are connected to a LAN");
else
Dialog.Message("", "You are not connected to a LAN");
end


How do I...?

Answer List of Questions

Determine the Drive Letter of the Primary Hard Drive

To determine the user's main hard drive in AutoPlay Media Studio, use the Drive.Enumerate action, and take note of the first fixed drive (this is the main hard drive):

-- Get a list of all drives in the user's system
drives = Drive.Enumerate();

-- Step through the returned list
for j in pairs(drives) do
-- Get the type of the drive
type = Drive.GetType(drives[j]);

-- Check if the type of drive is fixed
if type == 3 then
-- It is fixed, note the drive letter and break out of the loop
first_hdd = drives[j];
break;
end
end

-- Output result to the user
Dialog.Message("", "The user's main HDD is "..first_hdd);


How do I...?

Answer List of Questions

Determine the Operating System (OS) Language

In AutoPlay Media Studio, to determine what language the user's OS is set to and store it in a variable user_language:

  1. Insert the following code into an event in your application:

user_language = System.GetDefaultLangID;

Note: user_language is a table, and can be referenced by calling user_language.Primary and user_language.Secondary


How do I...?

Answer List of Questions

Determine When a Video has Finished Playing

In AutoPlay Media Studio, it is possible to perform an action once your video has completed playing. Some uses for this include sending the user to your website after the video is finished, or loading up another video.

  1. To launch your website when a video finishes playing, place the following script in the On Finish event of the video object:

File.OpenURL("http://www.indigorose.com/", SW_SHOWNORMAL);


How do I...?

Answer List of Questions

Display a Save As Dialog

A Save As dialog is often presented to allow a user to select a location to save a file to.

To display a Save As dialog using AutoPlay Media Studio:

  1. Create a Dialog.FileBrowse action. Set the FileOpen property to false:

file=Dialog.FileBrowse(false, "Save As", "c:\\", "All Files (*.*)|*.*|", "", "", false, true);

Note: File is a table. In the above example, multiple file select is not allowed. To access the path returned by the FileBrowse action, use file[1] as a variable. This gets the value from the first position of the table.

  2. If you are using the Save As dialog to copy a file from your cd to the user's system, you must use a File.Copy command after the Save As dialog has been displayed:

File.Copy("c:\\example.exe", file[1], false, false, false, false, nil);


How do I...?

Answer List of Questions

Display Text and/or Images with MouseOver Events

Most objects in AutoPlay Media Studio have two events useful for mouseover effects: On Enter and On Leave.

As an example, we will create a button that on mouseover will display an image, and on mouseout will hide the image:

  1. Create an image object

  2. Set its default visible state to false.

  3. Create a button object.

  4. In the On Enter event of the button, enter the following script:

Image.SetVisible("Image1", true);

  4. In the On Leave event of the button, enter the following script:

Image.SetVisible("Image1", false);

Note: When the user's mouse is over the button, the image object will appear. When the user's mouse leaves the button, the Image Object will disappear.

Tip: To make text appear on a mouseover, follow the above steps, but with a paragraph object instead of an Image Object.


How do I...?

Answer List of Questions

Duplicate Objects

To duplicate an Object in AutoPlay Media Studio:

  1. Select the desired object (left click on it once).

  2. Choose Edit > Duplicate from the menu. (You can also press Ctrl+D if you prefer using the keyboard.)

Note: This duplicates the object, including all property settings and all event scripts. All object references duplicated are absolute, not relative.

To duplicate an object using relative references, use "this" instead of the object's name in all scripts. As an example, we will create a button object that on mouseover changes it's text to "mouse", and on mouseout changes it's text to "cat":

  1. Insert the following code into the On Enter event of your button:

Button.SetText(this, "Mouse");

  2. Insert the following code into the On Leave event of your button:

Button.SetText(this, "Cat");

Note: When this object is duplicated, the new object's text will change, and leave the original's text intact.


How do I...?

Answer List of Questions

Embed a Web Browser Window

AutoPlay Media Studio includes a web object to display a website within your application. To add a website to your project:

  1. Choose Object > Web.

  2. In the New Web Object dialog, enter the desired web address in the URL setting and click OK.


How do I...?

Answer List of Questions

Expire my Application After a Certain Date

To make your application expire after a certain date, set a variable in your program to the expiry date, and every time the program is run, check the current date against that value. If your program is expired, it will close.

To accomplish this:

  1. Insert the following code into the On Startup event of your project:

--Input your expiration date here, format YYYYMMDD
--(no spaces, dashes, slashes, etc. just use numbers)
--Below is the date Dec 12, 2003
Expiration_Date = "20031212"

--Get the system date in ISO format
--Date = YYYY-MM-DD
Date = System.GetDate(DATE_FMT_ISO);

--Remove the dashes in the ISO format date
--to reflect the format of our expiry date
--Date == YYYYMMDD
Date = String.Replace(Date, "-", "", false);

--test to see if the application is expired
if Date > Expiration_Date then
--The application has expired
Dialog.Message ("Application Expired!", "Your copy of this application has expired! This program will now exit.");
Application.Exit();
end


How do I...?

Answer List of Questions

Expire my Application After a Certain Number of Executions

To make your application expire after a certain number of executions, store a value in the registry the first time the program is run, and increment it every consecutive time the program is run. Then, every time the program is run, check the stored value.

To accomplish this:

  1. Insert the following code into the On Startup event of your project:

-- Set the number of times allowed
times_allowed = 30;

-- Retrieve the number of times run and convert the value to a number
times_run = Application.LoadValue("My Application", "Has Been Run");
times_run = String.ToNumber(times_run);

-- Calculate the number of allowed run times remaining
times_remaining = (times_allowed - times_run)

-- Check if this is the first time the application has been run
-- Save the new number of times run value
if times_run == 0 then
Application.SaveValue("My Application", "Has Been Run", "1");
else
Application.SaveValue("My Application", "Has Been Run", (times_run + 1));
end

-- Check if the application has been run more times than allowed
if times_run > times_allowed then
Dialog.Message("Trial Period Over", "This software has expired");
Application.Exit();
else
Dialog.Message("Trial Period", "You can run this program "..times_remaining.." more times.");
end


How do I...?

Answer List of Questions

Expire my Application After Thirty Days

To make your application expire after thirty days, store the date the program was first run in the registry, and every consecutive time that the program is run, compare the registry to the expiry date (30 days after your program was first installed).

To accomplish this:

  1. Insert the following code into the On Startup event of your project:

-- Initialize variables
days_left = 30;
date_installed = Application.LoadValue("My Application", "Date Installed");
time_limit = 30; --the length of the trial period, in days

-- Convert string value to number
date_installed = String.ToNumber(date_installed);

-- Was date_installed 0 (non-existent)?
if date_installed == 0 then
-- Value was nonexistent, create it
Application.SaveValue("My Application", "Date Installed", System.GetDate(DATE_FMT_JULIAN));
else
-- Update days_left
days_left = (date_installed + time_limit) - System.GetDate(DATE_FMT_JULIAN);
end

-- Are there days left?
if days_left < 1 then
-- There are not any days left, alert user and exit.
Dialog.Message("Trial Period Over", "This software has expired");
Application.Exit();
else
-- There are days left, alert user how many
Dialog.Message("Trial Period", "You have "..days_left.." days left in your trial period.");
end


How do I...?

Answer List of Questions

Get System Folder Paths

AutoPlay Media Studio includes an action to get the paths to various folders on your computer. To accomplish this, use the action Shell.GetFolder.

As an example, we will get the path to the user's desktop, and store it in a variable path_to_desktop:

  1. Insert the following code into an event in your program:

path_to_desktop = Shell.GetFolder(SHF_DESKTOP);


How do I...?

Answer List of Questions

Get the Registered User of the Computer

To detect the registered user of the system in AutoPlay Media Studio:

  1. Insert the following script in the On Startup event of your project:

user = System.GetUserInfo();

Note: User is a table variable. To display this information on a page in your application, reference:
user.RegOwner – the registered owner of the computer
user.RegOrganization – the registered organization


How do I...?

Answer List of Questions

Hide an Object

There are two instances where you may want to hide an object: From the user at runtime, or from yourself in the design environment.

Hiding an object at runtime is useful if you don't want the user to see an object at the beginning of the application. You may wish to show the object at a later time based on input from the user.

As an example, we will hide a button object (Button1) at runtime:

  1. Insert the following code into your page's On Show event:

Button.SetVisible("Button1", false);

Tip: To show the button object, insert the following code into an event in your application:

Button.SetVisible("Button1", true);

Hiding an object in the design environment is useful when, for example, you are working on a project with many objects, and you wish to reduce clutter.

To hide an object in the design environment:

  1. Select the desired object

  2. Select Edit > Hide from the program menu, or right-click on the object and select "Hide"


How do I...?

Answer List of Questions

Hide the Application at Runtime

AutoPlay Media Studio allows you to create an application that runs in the background (i.e. is not visible to the user on the task bar or in the system tray). To enable this option:

  1. Choose Project > Settings from the menu.

  2. Select the Hidden option.

  3. Click OK.

Tip: To actually hide the application window. use a Window.Hide action.


How do I...?

Answer List of Questions

Hide the Title Bar

To hide the title bar of the AutoPlay application:

  1. Choose Project > Settings from the menu.

  2. Change the style of the window to Flat.

  3. Click OK.


How do I...?

Answer List of Questions

Inherit Page Properties

As an example, let us assume that you are creating a three page project, and you want to use the same background for each of your three pages. The best way to do this is to set page 2 and page 3 to inherit the background from page 1. That way if you change page 1's background, the backgrounds of page 2 and page 3 will change accordingly.

To accomplish this in AutoPlay Media Studio:

  1. Create a project with three pages.

  2. Add a background to Page1 (a solid color, a gradient, or an image).

Note: Page1 can have a solid color, a gradient, or an image as the background.

  3. Switch to Page2.

  4. In the properties pane, change the Inherit Background property of Page2 to Page1.

  5. Switch to Page3.

  6. In the properties pane, change the Inherit Background property of Page3 to Page1.

Note: You can also inherit objects from a page in your project. To inherit all objects from Page1, set the Inherit Objects category of the properties pane (on your desired page) to Page1.


How do I...?

Answer List of Questions

Interact with Embedded Flash Objects

AutoPlay Media Studio is capable of receiving FS_Commands from an embedded Flash movie. You would receive the FS_Command, and then complete an action based on this command, utilizing an if statement.

Please see How do I interact with embedded web objects for a simple example of navigating your project based on input from an outside source.


How do I...?

Answer List of Questions

Interact with Embedded Web Objects

In AutoPlay Media Studio, it is possible to navigate around your project using an embedded html file.

For example, let's assume that you want to have the following HTML file in a web object (let's name the file index.html):

<html>
<body>
<a href="#Page2">Go to Page 2</a>
</body>
</html>

  1. Create a web object on the application page that loads index.html. Name it "Web1".

  2. Insert the following script in the page's On Preload event:

Web.LoadURL("Web1", "AutoPlay\\Docs\\index.html");

The above line resets the web object named Web1 to AutoPlay\Docs\index.html. This is necessary because the URL in a web object will persist across pages, and the On Navigate event is called when the web object appears on the page after a page load; if we don't reset the URL in this web object whenever the page loads, it will still have the #Page2 URL in it, and our script in the On Navigate event (see below) will make the application jump right back to page 2.

  3. Insert the following script in the web object's On Navigate event:

-- search from right to left for a number sign (#)
nPos = String.ReverseFind(e_URL, "#", true);

-- did we find a # ?
if nPos then
-- get everything to the right of the #
strPage = String.Mid(e_URL, nPos + 1, -1);

--[[ jump to the page name that we extracted from
the URL. If there is no page by that name,
the Page.Jump won't do anything. ]]
Page.Jump(strPage);
end

Clicking on a link in this web object will trigger the On Navigate event and put the href string (the link target) into the event variable named e_URL. The String.ReverseFind action looks for the # symbol and, if found, a String.Mid action grabs everything to the right of the # symbol in the string. The resulting string is stored in a variable and then used as the target of a Page.Jump action.

Note: When the user clicks on the link 'Go to Page 2' in our example HTML file, the application will jump to "Page2".


How do I...?

Answer List of Questions

Keep my Application Always on Top

Autoplay Media Studio has a built in option to make your application Always On Top on the user's system. To accomplish this, choose the option in the Project Settings box:

  1. Choose Project > Settings from the menu.

  2. Enable the Always On Top option.

  3. Click OK.


How do I...?

Answer List of Questions

Load and Display a Text File

To display a large amount of text on your page use the TextFile.ReadToString action, and display the results in a paragraph object.

To accomplish this in AutoPlay Media Studio:

  1. Choose Object > Paragraph from the menu.

  2. Insert the following code into any event in your application:

text = TextFile.ReadToString("AutoPlay\\Docs\\large_text.txt");
Paragraph.SetText("Paragraph1", text);


How do I...?

Answer List of Questions

Lock Objects

In AutoPlay Media Studio, it is possible to 'lock' your objects to the page so they cannot be moved around the page, or edited by double clicking them. Locking your objects makes them appear as if they are part of the background. If you double click on a locked object, the Page Properties window is displayed.

Note: You can still edit a locked object from the Objects panel.

To lock an object:

  1. Select the desired object.

  2. Right-click on the object.

  3. Choose Lock.

To Unlock an object:

  1. Select the desired object.

  2. Right-click on the object.

  3. Choose Lock.


How do I...?

Answer List of Questions

Maintain Aspect Ratios of Objects

In AutoPlay's design environment, it is possible to maintain the aspect ratio (the width to height ratio) of your objects while resizing. This is useful, for example, when you wish to resize an image object but do not want the picture to appear squished.

To maintain the aspect ratio of any object in AutoPlay's design environment:

  1. Select your desired object by single clicking on it.

  2. Right click on the object that you just selected.

  3. Click on Keep Aspect.

Note: If Keep Aspect has a checkmark next to it then the option is already enabled.

Note: Even though a label object's right click menu has the Keep Aspect option, it is permanently set to maintain its aspect ratio. It is not possible to turn this option off.

To temporarily maintain the aspect ratio of an object, hold down the Ctrl and Shift keys together while resizing the object. Temporarily maintaining the aspect ratio of an object only applies to resizing an object with the mouse, changing the dimensions in the properties pane with Ctrl and Shift held down will not maintain the aspect ratio.


How do I...?

Answer List of Questions

Make a Basic Quiz/Testing Application

As an example, we will create a two page test, and a third page to display the results:

  1. Create a project with three pages.

  2. Insert the following code in the Global Functions:

--Each of the following tables contains a question, and 4 answers:
Q_01 = {Question="How many legs does a three leg'd dog have?", A1="One", A2="Two", A3="Four", ACorrect="Three"};
Q_02 = {Question="How many legs does a one leg'd cat have?", A1="Three", A2="Two", A3="Four", ACorrect="One"};
Correct={Q1="",Q2=""};

  3. On Page1, create one paragraph object, and four button objects.

  4. In the On Preload event of Page1, insert the following code:

Paragraph.SetText("Paragraph2", Q_01.Question);
Button.SetText("Button1", Q_01.A2);
Button.SetText("Button2", Q_01.A1);
Button.SetText("Button3", Q_01.ACorrect);
Button.SetText("Button4", Q_01.A3);

  5. Insert the following code into the On Click event of Button1:

Correct.Q1 = "InCorrect";
Page.Navigate(PAGE_NEXT);

  6. Insert the following code into the On Click event of Button2:

Correct.Q1 = "InCorrect";
Page.Navigate(PAGE_NEXT);

  7. Insert the following code into the On Click event of Button3:

Correct.Q1 = "Correct";
Page.Navigate(PAGE_NEXT);

  8. Insert the following code into the On Click event of Button4:

Correct.Q1 = "InCorrect";
Page.Navigate(PAGE_NEXT);

  9. On Page2, create one paragraph object, and four button objects.

  10. In the On Preload event of Page2, insert the following code:

Paragraph.SetText("Paragraph2", Q_02.Question);
Button.SetText("Button1", Q_02.A3);
Button.SetText("Button2", Q_02.A2);
Button.SetText("Button3", Q_02.A1);
Button.SetText("Button4", Q_02.ACorrect);

  11. Insert the following code into the On Click event of Button1:

Correct.Q2 = "InCorrect";
Page.Navigate(PAGE_NEXT);

  12. Insert the following code into the On Click event of Button2:

Correct.Q2 = "InCorrect";
Page.Navigate(PAGE_NEXT);

  13. Insert the following code into the On Click event of Button3:

Correct.Q2 = "InCorrect";
Page.Navigate(PAGE_NEXT);

  14. Insert the following code into the On Click event of Button4:

Correct.Q2 = "Correct";
Page.Navigate(PAGE_NEXT);

  15. Create one paragraph object on the last page of your project.

  16. Insert the following code into the On Preload event of the last page:

string_correct="";
correct = 0;
possible = 0;
for j,k in pairs(Correct) do
possible = possible + 1;
if k == "Correct" then
correct = correct + 1;
end
end

Paragraph.SetText("Paragraph2",
"Question 1: " .. Correct.Q1 .. "\r\n" ..
"Question 2: " .. Correct.Q2 .. "\r\n" ..
"You answered correctly " .. correct .. " out of " .. possible .. " possible questions for a score of " .. ((correct/possible)*100) .. "%."
);


How do I...?

Answer List of Questions

Make a Document Browser

As an example, we will create an application that has the user select a folder on his drive, and then populates a listbox object with all of the *.doc files within that directory. The user clicks on a file in the listbox object, and clicks the "Open" button to open the document.

  1. Create a project with one listbox object, and two button objects.

  2. Label Button1 "Load" and Button2 "Open".

  3. Insert the following code into the On Click event for Button1:

--Disable listbox Updating
ListBox.SetUpdate("ListBox1", false);

--Get the desired folder to browse
folder = Dialog.FolderBrowse("Open Folder", "C:\\");

--populate a table with all the .doc files
file = File.Find(folder, "*.doc", false, false, nil);

--do the following for each file:
for j,file_path in pairs(file) do
--add the item to the listbox, with the name visible and path as data
ListBox.AddItem("ListBox1", String.SplitPath(file_path).Filename, file_path);
end

--Allow the listbox to display the updated content
ListBox.SetUpdate("ListBox1", true);

  4. Insert the following code into the On Click event for Button2:

selected = ListBox.GetSelected("ListBox1");
for j,k in pairs(selected) do
File.Open(ListBox.GetItemData("ListBox1", k),"", SW_SHOWNORMAL);
end


Make a drop-down menu

How do I...?

Answer List of Questions

Make a Dropdown Menu

To create a dropdown menu in AutoPlay Media Studio:

  1. Create a project with six label objects, and arrange them as follows:

  2. Insert the following code into the On Click event of Label1:

if visible then
Label.SetVisible("Label2", false);
Label.SetVisible("Label3", false);
Label.SetVisible("Label4", false);
Label.SetVisible("Label5", false);
Label.SetVisible("Label6", false);
visible = false;
else
Label.SetVisible("Label2", true);
Label.SetVisible("Label3", true);
Label.SetVisible("Label4", true);
Label.SetVisible("Label5", true);
Label.SetVisible("Label6", true);
visible = true;
end

  3. Insert the following into your Global Functions:

visible = false;


How do I...?

Answer List of Questions

Make a Slideshow

Tip: AutoPlay Media Studio 8 now contains a SlideShow object that can also be used for this functionality.

The purpose of a slideshow is to display images at a predetermined rate. In AutoPlay Media Studio, this is accomplished by creating a project with one page per image you wish to display.

  1. On every page in your project, create one image object containing the appropriate image.

  2. Create the following action in the On Show event of every page in your project:

Page.StartTimer(5000); --fires the timer once every 5 seconds.

  3. Create the following action in the On Timer event of every page in your project:

Page.Navigate(PAGE_NEXT);

The only page that does not have this action is the last page, because there are no more pages to jump to.

  4. Create the following action in the On Show event of your last page:

Page.StopTimer(); --stops the timer

Note: The On Timer and On Show events are found by right-clicking on a blank space on the page and choosing Actions.


How do I...?

Answer List of Questions

Make a Slideshow with Audio

Tip: AutoPlay Media Studio 8 now contains a SlideShow object that can also be used for this functionality.

As an example, we will create a slideshow with voiceovers for each image. This project will require one audio file for every image, and one page in your project for every image that you want to display. On each page, create one image object which loads the desired image.

  1. Create one page in your project for every image file you wish to display. In this example, we will have three images, and three audio files.

  2. On each page in your project, create an image object which loads the desired image.

  3. Create global variables:

-- will keep track of the audio files
audio_count = 1;

--loads desired audio files into a table
audio = {
"Autoplay\\Audio\\audio_file1.ogg",
"Autoplay\\Audio\\audio_file2.ogg",
"Autoplay\\Audio\\audio_file3.ogg"
};

  4. Create the following action in the On Show event of every page:

Audio.Load(CHANNEL_USER1, audio[audio_count], true, false);

  5. Create the following script in the On Audio event of every page (except your last page):

Input.SetText("Input1", e_State);
if e_State == "Finish" then
audio_count = audio_count + 1;
Page.Navigate(PAGE_NEXT);
end

Note: When run, this application will load the first page and play the audio file. When that audio file is complete, the application will jump to the next page, and launch the audio file. This continues until the last page. Each image is displayed for the length of the audio file.

Tip: If you want to have background music playing in your application, insert the following code into the first page's On Show event (you will load the background music into a different channel than the voiceovers are being loaded into):

Audio.Load(CHANNEL_BACKGROUND, "AutoPlay\\Audio\\background.ogg, true, true);
Audio.SetVolume(CHANNEL_BACKGROUND, (255 * 0.25)); --sets the volume to 25%


How do I...?

Answer List of Questions

Make a Thumbnail Image Browser

The idea behind a thumbnail image is to present the user with a small image that when clicked links to a larger image. To accomplish this in AutoPlay Media Studio, create an image object with the image you wish to use for the thumbnail, and resize it to the desired dimensions. Now create an action that links to the larger image when the thumbnail is clicked.

Here are two examples illustrating how to complete this task:

Example 1

  1. Create a project with two pages. On the first page (Page1) will be your thumbnail, on your second page (Page2) will be your large image.

  2. On each page in your project, create an image object which loads the desired image.

  3. Create an action in your thumbnail image's On Click event that will jump to the second page of your project (containing the large image):

Page.Jump("Page2");

  3. On your second page, you may wish to include a back button that jumps back to the first page. Use the following action for this button's On Click event:

Page.Jump("Page1");

Note: If you wish to have more than one thumbnail, create a new page for every image, and then add their thumbnails to the first page. Then add actions to open each page when the appropriate thumbnail is clicked.

Example 2

  1. Create a project with one page.

  2. Create two image objects on this page: Image1 and Image2. Image1 will be your thumbnail image, Image2 will be your large image. Size the two images accordingly.

  3. Set the visible property of Image2 to false.

  4. Create an On Click action for Image1 that shows Image2 when clicked:

Image.SetVisible("Image2", true);

  5. Create an action for Image2 that hides it when it is clicked (use the On Click event):

Image.SetVisible("Image2", false);


How do I...?

Answer List of Questions

Make an Image Browser

As an example, we will create an application that has the user select a folder on his drive, and then populates a listbox object with all of the *.png and *.jpg files within that directory. The user clicks on a file in the listbox object, and clicks the "Open" button to load the selected image into the image object.

  1. Create a project with two button objects, a listbox object, and an image object.

  2. Label Button1 "Load" and Button2 "Open".

  3. Insert the following code into the On Click event for Button1:

--Disable listbox Updating
ListBox.SetUpdate("ListBox1", false);

--Get the desired folder to browse
folder = Dialog.FolderBrowse("Open Folder", "C:\\");

--populate tables with all the .jpg and .png files
file_jpg = File.Find(folder, "*.jpg", false, false, nil);
file_png = File.Find(folder, "*.png", false, false, nil);

images = {file_jpg, file_png};

--do the following for each file:
for k in pairs(images) do --loops through the different image types
for j,file_path in pairs(images[k]) do --loops through each image file
--add the item to the listbox, with the name visible and path as data
ListBox.AddItem("ListBox1", String.SplitPath(file_path).Filename, file_path);
end
end

--Allow the listbox to display the updated content
ListBox.SetUpdate("ListBox1", true);

  4. Insert the following code into the On Click event for Button2:

selected = ListBox.GetSelected("ListBox1");
for j,k in pairs(selected) do
Image.Load("Image1", ListBox.GetItemData("ListBox1", k));
end


How do I...?

Answer List of Questions

Make an Image Semi-Transparent

In AutoPlay Media Studio, it is possible to make an image object translucent, or "see-through." This is accomplished by lowering the value of the Opacity setting in the properties pane:

  1. Create an image object

  2. In the properties pane, change the Opacity setting to the desired opacity.

Note: The opacity number is a percentage. A value of 100 makes the object fully visible, and a value of 0 makes the object invisible.


How do I...?

Answer List of Questions

Open a Microsoft Word DOC File

To open a Word Document using AutoPlay Media Studio, use the Open Document quick action to call the document. Use the browse button next to the Object to open field to select the DOC file to open.

Note: AutoPlay Media Studio does not have a Word object. To open a Word document on a user's computer, the user must have a program capable of opening the document (i.e. Microsoft Word or Microsoft Word Viewer).

Tip: AutoPlay Media Studio 8 contains the RichText object that can be used to display formatted text.


Open a PowerPoint PPT file

How do I...?

Answer List of Questions

Open a PowerPoint PPT/PPS File

To open a PowerPoint Presentation using AutoPlay Media Studio, use the Open Document quick action to call the document. Use the browse button next to the Object to open field to select the PPT/PPS file to open.

Note: AutoPlay Media Studio does not have a PowerPoint object. To open a PowerPoint presentation on a user's computer, the user must have a program capable of opening the presentation (i.e. Microsoft PowerPoint).


How do I...?

Answer List of Questions

Open a Web Site in an External Browser

AutoPlay Media Studio contains a built in quick action which opens a website in the user's default browser: View Website. This is useful, for example, if you want a button labeled "Company Website" to open your company's website in the user's default browser.

To accomplish this use the View Website quick action:

  1. Create a button object.

  2. Double-click the button object, choose the Quick Action tab, and choose View Website as the action to run.

  3. In the Web site field, type your company's website address.

  4. Click OK.


How do I...?

Answer List of Questions

Open an Adobe Acrobat PDF File

To open a PDF in Adobe Acrobat using AutoPlay Media Studio, use the Open Document quick action to call the document. Use the browse button next to the Object to open field to select the PDF file to open.

Note: AutoPlay Media Studio also has a PDF Object that uses the Adobe Reader ActiveX control that can be used to embed the file in the page.


How do I...?

Answer List of Questions

Open an HTML File in a Pop-Up Window

In AutoPlay Media Studio, it is possible to open an HTML document in the user's default browser. To accomplish this, please see the How Do I topic Open a web site in an external browser.


How do I...?

Answer List of Questions

Pause the Background Music

When there is background music in a presentation, sometimes it is necessary to pause it. In AutoPlay Media Studio this is accomplished by using the Play/Pause Background Music quick action.

This quick action will pause the background music if it is playing, and play the background music if it is paused.


How do I...?

Answer List of Questions

Persist Data Across Sessions

It is often nice to add a personal touch to your Application, such as greeting the user by name whenever your application is run.

As an example, we will create an application that prompts the user for their name the first time it is run, and stores that data in the registry. Every subsequent time that the application is run, it will greet the user with the name that they have inputted:

  1. Place the following code in your Project's On Startup event:

-- Load the last used user name
user = Application.LoadValue("Information", "Name");

-- was there a username stored?
if user == "" then
-- Nope! Prompt the user for their name.
user = "Unknown User";
user = Dialog.Input("Information Requested", "Please enter your full name:", "", MB_ICONQUESTION);
Application.SaveValue("Information", "Name", user);
end

-- Output welcome message
Dialog.Message("Welcome", "Hello "..user..", welcome to my application");

Note: This example prompts the user to enter their full name the first time they run your application, and stores that value in the registry. Every subsequent time that the user runs your application a message will pop up on the screen greeting them by name.


How do I...?

Answer List of Questions

Pin Objects

Once you have created the look of your project, you may want to 'lock' the objects to the page, but still be able to change their properties and edit their actions. This is known as 'pinning' an object to the page.

To Pin an object:

  1. Select the desired object.

  2. Right-click on the object.

  3. Choose Pin.

To Unpin an object:

  1. Select the desired object.

  2. Right-click on the object.

  3. Choose Pin.


How do I...?

Answer List of Questions

Play an Adobe Flash Movie

AutoPlay Media Studio includes a built-in object to include Flash files in your application.

To accomplish this:

  1. Choose Object > Flash from the menu.

  2. Select your Flash movie.

  3. Click OK.

Note: AutoPlay's Flash object makes use of the Adobe Flash plugin (free to download from www.adobe.com). You can configure your application to automatically detect flash on the user's computer, and require that a specified version or later is installed (How to check for Adobe Flash).


How do I...?

Answer List of Questions

Play a Video Before My Application Starts

AutoPlay Media Studio contains an option to add an intro video to your presentation.

To accomplish this:

  1. Choose Project > Startup Movie from the movie.

  2. Enable the Play Startup Movie option.

  3. Add your movie file and configure the project settings.

  4. Click OK.

Note: If you disable the feature Allow Click to Skip, the movie will remain visible until it is complete. If this option is enabled, the user can 'click through' your startup movie and get right to the application


How do I...?

Answer List of Questions

Play a Video Using Full Screen Mode

AutoPlay Media Studio includes an action to play a video in full screen mode.

To accomplish this:

  1. Add the following code to the On Play event of your video object:

Video.SetFullScreen("Video1", true);

  2. Add the following code to the On Finish event of your video object:

Application.Exit();

This script plays your video full screen, and once finished, exits your application.


How do I...?

Answer List of Questions

Play a Video using the Embedded Video Object

AutoPlay Media Studio includes a built in video object. This object is capable of playing any video file that is supported by Windows Media Player (avi, mpg, wmv, etc).

To create a video object:

  1. Choose Object > Video from the menu.

  2. Select your video file.

  3. Click OK.

Note: Some codecs are not automatically downloaded by Windows Media Player. If your video file uses a specialized codec, please make sure to include it with your distribution.


How do I...?

Answer List of Questions

Play an AVI Video File

AutoPlay Media Studio comes standard with a video object capable of playing any movie file that Windows Media Player supports.

To Play an AVI file in AutoPlay Media Studio, create a video object on the desired page:

  1. Choose Object > Video.

  2. Select an AVI file.

  3. Click OK.

Note: If your AVI file consists of non-standard codecs, please be sure to include those with your project, so your users do not experience any runtime problems.


How do I...?

Answer List of Questions

Play Background Music

Playing soft music in the background of your application can serve to set the mood desired for your application.

As an example, we will load background.ogg into the background audio channel of our project:

  1. Insert the following code into the On Show event of the first page in the project:

--loads background.ogg into the background channel, automatically plays, and loops
Audio.Load(CHANNEL_BACKGROUND, "AutoPlay\\Audio\\background.ogg", true, true);

Note: To play one song after another for your background music, please refer to Play multiple audio files in sequence.

An alternative way to add background music to your application is by using the Background Music tab on the Audio Settings dialog. To access this dialog:

  1. Choose Project > Audio.

  2. Click the Add button

  3. Select your audio file

  4. Click OK

Note: Repeat steps 2 and 3 before clicking OK to add more than one audio file.


How do I...?

Answer List of Questions

Play Multiple Audio Files in Sequence

In AutoPlay Media Studio, it is possible to play one audio file after another using the On Audio event.

As an example, we will create a project that when run will load three files into a table, and play them back-to-back until the third song is finished.

To accomplish this:

  1. Insert the following code into your Global Functions (click Project > Global Functions):

-- keep track of the audio files
audio_count = 1;

--loads desired audio files into a table
audio = {
"Autoplay\\Audio\\audio_file1.ogg",
"Autoplay\\Audio\\audio_file2.ogg",
"Autoplay\\Audio\\audio_file3.ogg"
};

  2. Insert the following code into the On Show event of your page:

Audio.Load(CHANNEL_USER1, audio[audio_count], true, false);
Insert the following code into the On Audio event of your page:
if e_State == "Finish" then
audio_count = audio_count + 1;
--ensures a valid file will be loaded
if audio_count < Table.Count(audio)+1 then
Audio.Load(CHANNEL_USER1, audio[audio_count], true, false);
end
end


How do I...?

Answer List of Questions

Play Multiple Video Files in Sequence

In AutoPlay Media Studio, it is possible to play one video after another utilizing the On Finish event.

As an example, we will create a project with one button object and one video object. The user will click on the button, and load multiple videos into a table. The project will then play one video after another until each video has been played.

To accomplish this:

  1. Insert the following code into your global functions (click project > functions):

--table index starts at 1
video_count = 1;

  2. Insert the following code into the On Click event of your load button:

video = Dialog.FileBrowse(true, "Load Videos", "", "", "", "", true, true);
Video.Load("Video1", video[video_count], true, false);

  3. Insert the following code into the On Finish event of your video object:

--Traverses the table
video_count = video_count + 1;

--ensures a valid file will be loaded
if video_count < Table.Count[video]+1 then
--loads the file
Video.Load("Video1", video[video_count], true, false);
end


How do I...?

Answer List of Questions

Print a File

To print a file from your application, use the Print Document quick action. Use the browse button next to the 'Document to print' field to select your file.

Note: This action opens the document you wish to print in the default editor, prints the document, and closes the default editor. This behavior is similar to right clicking on a file in windows explorer and selecting print.


How do I...?

Answer List of Questions

Read Specific Lines from a Text File

To retrieve specific lines from a text file in AutoPlay Media Studio, use the ReadToTable action.

As an example, we will read the file C:\test.txt into a table variable, and output the lines 4 through 10 to a paragraph object:

  1. Insert the following code into an event in your application:

-- Set the beginning and ending text line numbers
beginning_line = 4;
end_line = 10;

-- populate a table with the contents of a text file
tabText = TextFile.ReadToTable("c:\\test.txt");

-- Initialize variable strLinesOfText
strLinesOfText = "";

-- Set the current line number
line = beginning_line;

-- Loop through table until end condition is reached
while line < (end_line + 1) do
-- Append data to variable strLengthOfText
strLinesOfText = strLinesOfText .. "\r\n" .. "Line " .. line .. ": " .. tabText[line] .. "\r\n";
line = line + 1;
end

-- Output to user
Paragraph.SetText("Paragraph1", strLinesOfText);


How do I...?

Answer List of Questions

Reboot the System

To reboot the user's system from your application:

  1. Insert the following action into an event in your application:

System.Reboot();

Note: This action reboots the machine, with no user interaction required, and no warning given.


How do I...?

Answer List of Questions

Reload Image Objects at Runtime

To load an image into your image object at runtime, use the Image.Load action.

As an example, we will load the image example.jpg (from the Images directory of the project's distribution folder) into the image object "Image1":

Image.Load("Image1", "AutoPlay\\Images\\example.jpg");

Note: To load this image at runtime, put the above code into the On Show event of the page containing your image object.


How do I...?

Answer List of Questions

Remember Runtime Preferences

As an example, let us assume that your application asks the user if videos should be visible in the application. But you only want to ask the user the first time they launch the program. On each subsequent launch, you wish to show/hide the video object based on the user's initial preference.

To accomplish this in AutoPlay Media Studio:

  1. Insert the following code into the On Preload event of the page containing the video object:

visible = Application.LoadValue("Application", "Video");
if visible == "" then
visible = Dialog.Message("Visible videos", "Do you want the Video Objects to be visible?", MB_YESNO);
Application.SaveValue("Application", "Video", visible);
end

if String.ToNumber(visible) == 7 then
Video.SetVisible("Video1", false);
end

Note: This script does not give the user a second choice. Once they choose yes/no, that choice is permanent. If you wanted to offer the user a second choice, or the option to change the setting later, include the following code in the On Click event of a button object:

visible = Dialog.Message("Visible videos", "Do you want the Video Objects to be visible?", MB_YESNO);
Application.SaveValue("Application", "Video", visible);


How do I...?

Answer List of Questions

Remove Unused Files from My Project

During the development of an application, inevitably files are included in your distribution that are not used in the end, and therefore are taking up precious space.

In AutoPlay Media Studio, these files can be automatically removed:

  1. Choose Tools > Optimize Resources from the menu.

  2. Select the project folders you want to clean.

  3. Click OK.

This searches out files in your project that your project does not use, and allows you the option of removing any useless files.

Tip: Enable the Confirm deletion option to ensure nothing gets deleted without your knowledge.


How do I...?

Answer List of Questions

Repeat Things at Specific Intervals

When there is an action that should repeat at a predetermined interval, use an On Timer event in AutoPlay Media Studio:

  1. Double-click on the current page.

  2. Choose the Script tab.

  3. Click on the On Timer event tab.

  4. Add your action here.

To begin performing the actions in the On Timer event, use the following action:

Page.StartTimer(5000) --fires On Timer actions once every 5 seconds

This action is typically performed either by the On Click event of an object, or as an action on the On Show event of the page.

Note: The action Page.StartTimer only has to be performed once to start the timer. The actions in the On Timer event will continue to be performed until the StopTimer action is called.

Tip: To stop the timer action from firing, use the action Page.StopTimer();


How do I...?

Answer List of Questions

Respond to Key Presses

In AutoPlay Media Studio, there is an event called On Key. This event is launched whenever a key is pressed. This is useful if you want your application to, for example, play a sound every time the user presses a key.

Another use for this event is to do something only when a specific key is pressed. As an example, consider Internet Explorer. A user types in a URL into the address bar, and when they press enter, the page they requested is loaded.

To accomplish this example in AutoPlay Media Studio:

  1. Create an input object. In it's On Key event, input the following code:

-- e_Key is a built in variable that gets generated by the On Key event.
-- 13 is the virtual key code value for the [Enter] key.

if e_Key == 13 then
-- Load the address that was input by the user:
Web.LoadURL("Web1", Input.GetText("Input1"));
end

Note: This script assumes that you have an input object named "Input1" and a web object named "Web1".

This script reads every key pressed by the user while in the input box. When [enter] is pressed, the script loads the URL.


How do I...?

Answer List of Questions

Restore an Object's Original Size

In AutoPlay's design environment, it is possible to restore an object's original size after it has been modified. This is useful when you want to, for example, reset the size of an image object to the original dimensions of the image file.

To restore an object's original size:

  1. Select your desired object by single clicking on it.

  2. Right click on the object that you just selected.

  3. Click on Restore Size.

Note: This is also useful for sizing a video object to the dimensions of the video file that is loaded.


How do I...?

Answer List of Questions

Round a Number Down

AutoPlay Media Studio includes a built in action to round any number down to the next whole number. To accomplish this, use the Math.Floor action:

your_number = 3.1415;
your_rounded_number = Math.Floor(your_number);

Note: This script will set the variable your_rounded_number to 3.


How do I...?

Answer List of Questions

Round a Number Up

AutoPlay Media Studio includes a built in action to round any number up to the next whole number. To accomplish this, use the Math.Ceil action:

your_number = 3.1415;
your_rounded_number = Math.Ceil(your_number);

Note: This script will set the variable your_rounded_number to 4.


How do I...?

Answer List of Questions

Round a Number Up or Down

If you want all fractions to round up (e.g. 2.1 -> 3.0, 2.5 -> 3.0) then use Math.Ceil. (See Round a number up.)

If you want all fractions to round down (e.g. 2.1 -> 2.0, 2.5 -> 2.0) then use Math.Floor. (See Round a number down.)

If you want anything equal to or above ".5" to round up, and anything below ".5" to round down (e.g. 2.1 -> 2.0, 2.5 -> 3.0), use the following action:

n = 2.5;
rounded = Math.Round(n);


How do I...?

Answer List of Questions

Run a Program and Wait for it to Finish

Using AutoPlay Media Studio, you can launch an executable file, and have your application wait until that executable file exits.

As an example we will run the executable example.exe, and have the application wait until example.exe is closed. This is accomplished by using the File.Run action, and setting the WaitForReturn property to true:

File.Run("c:\\example.exe", "", "", SW_SHOWNORMAL, true);

Note: This action will launch example.exe, and wait until example.exe is terminated.


How do I...?

Answer List of Questions

Run Adobe Acrobat Reader Directly from the CD-ROM

It is much easier to simply require your users to install the Adobe Acrobat Reader themselves from the Adobe website. You can then simply use a File.Open action to view the PDF file. If you require another option, please read the following information, but be aware that Indigo Rose can not provide you with further assistance or legal guidance on implementation details.

  1. Install Acrobat Reader (4.0 or later) onto a PC without Acrobat.

  2. Drag the \Acrobat x.x\ folder and all its contents into your distribution folder. (CD_ROOT)
    *This directory is typically found in your c:\program files\adobe\ directory.

Note: The “Acrobat x.x” folder is not 100% compliant with some of the ISO naming standards, and therefore you may need to rename some of your files/folders.

  3. Create the folder "installer" in the "Acrobat x.x" folder, and copy the Adobe Acrobat installer there.

    The license provisions for Reader demand that you include:
    - The Acrobat Reader installer, exactly as provided by Adobe.
    - The Acrobat Reader Electronic End User License Agreement. (This is a .TXT file that Reader installs into \Acrobat x.x\Reader\)
    - Copyright and other proprietary notices included in Acrobat Reader. (Assuming you copy all the files in \Acrobat x.x\Reader\ folder you should have everything required, except the Acrobat Reader installer).

  4. Use the following action to open your PDF document using the reader on your CD:

path_short = File.GetShortName(_SourceFolder);
File.Run("Acrobat 5.0\\Reader\\AcroRd32.exe", path_short .. "\\AutoPlay\\Docs\\luabook1.pdf", "", SW_SHOWNORMAL, false);

Note: The acrobat reader is not installed on the user's system, it is run from your CD.


How do I...?

Answer List of Questions

Run an Application After Rebooting

As an example, we will create an application with two buttons: Install Acrobat, and Install Application101. The Acrobat install program will require the user to restart their computer once the install completes. To ensure that the application is launched when the user reboots their system, add the following code to the On Click event of the Install Acrobat button:

reboot = Application.LoadValue("Settings", "Reboot");
if reboot == "" then
Shell.CreateShortcut(Shell.GetFolder(SHF_STARTUP_COMMON), "Temporary Shortcut", "Autorun.exe", "", "", "Autorun.exe", 0, SW_SHOWNORMAL);
Application.SaveValue("Settings", "Reboot", "done");
else
Shell.DeleteShortcut(Shell.GetFolder(SHF_STARTUP_COMMON), "Temporary Shortcut");
Application.SaveValue("Settings", "Reboot", "");
end

Note: This script adds a temporary shortcut to the Windows startup folder. When your application is executed on reboot, the temporary shortcut is deleted.


How do I...?

Answer List of Questions

Run an Executable File

AutoPlay Media Studio includes a quick action to launch an executable file. This is useful, for example, when creating a front end for your installer. When the user clicks on a button labeled "Install", your application launches your setup program. This is accomplished in AutoPlay Media Studio by using the Run Program quick action.

You can specify just a file to run as well as command line arguments and a working folder.


Run in full-screen (kiosk) mode

How do I...?

Answer List of Questions

Run in Full Screen (Kiosk) Mode

AutoPlay Media Studio has an option to run your application in a full screen mode. This mode does not resize your project to fullscreen, but rather fills the empty surrounding space with a background color of your choosing.

To enable this option:

  1. Choose Project > Settings from the menu.

  2. Select the Kiosk Mode option.

  3. Select your desired background color.

  4. Click OK.


How do I...?

Answer List of Questions

Run my Application Only Once

To run your application only once (i.e. the first time the user inserts your CD-ROM, and no other time), place the following code in the On Startup event of your project:

--retrieve value from the registry. If the key does not exist, result = ""
result = Application.LoadValue("Application_Name", "First_Time");

--if there was no key, the program has never been run
if result == "" then
Application.SaveValue("Application_Name", "First_Time", "yes");
Dialog.Message("title", "this is the first time this program has run");
else
Application.Exit();
end

Tip: You can also use Window.Close(Application.GetWndHandle(), CLOSEWND_TERMINATE) in place of Application.Exit(). This will close the window before the window draws itself (i.e. the user will see nothing).


How do I...?

Answer List of Questions

Send Email with Subject, Body and Attachment

To send an e-mail with various fields filled in, use the File.OpenEmail action. The following can be filled in:
To, Cc, Bcc, Subject, Body.

  1. To send an email with the following properties:

    To: user@yourdomain.com
    Cc: user2@yourdomain.com
    Bcc: user3@yourdomain.com
    Subject: Your subject here
    Body: Whatever you want as your email body here

    Use the following action:

File.OpenEmail("user@yourdomain.com?CC=user2@yourdomain.com&BCC=user3@yourdomain.com&Subject=Your subject here&Body=Whatever you want as your email body here", SW_SHOWNORMAL);

Note: To send an email with an attachment, you would have to Uuencode the file, and include it in the body of the email message. This is an advanced implementation of the File.OpenEmail action. Indigo Rose can not assist you with implementation details. Be aware that not all email clients will recognize all options.


How do I...?

Answer List of Questions

Set File Attributes For More Than One File

AutoPlay Media Studio has a File.SetAttributes action to set the attributes of a file. If you want to set the attributes of many files at once, you need to perform that action multiple times. An easy way to do this is to store the list of files in a table, and then cycle through that table using a for loop. Each pass through the loop would set the attributes for one of the files.

An easy way to create a table full of file paths is to use the File.Find action. The File.Find action returns a table containing a list of all the files which match a specific pattern.

As an example, let's set all of the .exe files in the root folder of the C: drive to read-only:

  1. Insert the following script into an event in your project:

files_to_change = File.Find("C:\\", "*.exe");

-- loop through the files_to_change table
-- and set each file's attributes one at a time
for index, filename in pairs(files_to_change) do
File.SetAttributes(filename,{ReadOnly=true});
end


How do I...?

Answer List of Questions

Set Page Transition Effects

AutoPlay Media Studio includes a couple of page transitions. Instead of simply jumping from one page to the next, and having one page disappear and the next appear, these transitions make a page jump a little more exciting.

To accomplish this, use page transitions:

  1. In the Properties Pane for the page, change the Transition field from None to the transition that you desire. Now on a page jump or page navigate from that page, the wipe transition will be used.

The transition does not affect some objects, such as web, listbox, etc. To use the transitions on pages containing these objects, do the following:

  1. Take a screen capture of the fully rendered page that you want to transition to.

  2. Insert this screen capture as a large image on the page that you want to transition to.

  3. Set all of the objects' visibility to false, and the image's visibility to true.

  4. In the On Show event of this page, show all of the objects, and hide the image.


How do I...?

Answer List of Questions

Show a Splash Image

To display a splash image using AutoPlay Media Studio:

  1. Insert the following code into any event in your application:

Dialog.SplashImage("AutoPlay\\Images\\splash.jpg", 5, false);

Tip: To display the splash image before your application loads, insert the above code into the On Startup event of the project actions.


How do I...?

Answer List of Questions

Size my Application to Particular Screen Dimensions

The easiest way to ensure that your project plays on everyone's computer is to design it to the lowest common denominator. Every computer system capable of running an AutoPlay generated file can support 640x480 resolution.

Our default project size is compatible with a 640x480 resolution.

If you desire to have a project that makes use of the user's entire screen, no matter what their resolution, the easiest way is to design a separate project for each resolution. Also create one 'master' project that determines the user's resolution (System.GetDisplayInfo), and have it launch the appropriate sized application.

If both of these options are unacceptable, AutoPlay does include actions to resize and reposition objects on your page. Likewise, as of version 8, the application window and objects can be resizable, and whenever the window is resized the On Size project event is fired.


How do I...?

Answer List of Questions

Span Content Across Multiple CD-ROMs

To span content across multiple CD's, you must create a separate application for each CD.

If this is not an option for your project, and there is no way you can fit your project on a single CD, you should consider distributing your project on a DVD.


Submit information to a web site script

How do I...?

Answer List of Questions

Submit Information to a Web Site

AutoPlay Media Studio has a built in function to send data to a website and receive a response:

  • HTTP.Submit

To submit information to a website, use the HTTP.Submit action. Please note that you have to develop a server script to accept whatever information you are sending to the web.

HTTP.Submit takes the response from your server script and stores it in a string.

One possible implementation of this would be as follows:

  1. Develop a script that can accept whatever data you wish to pass to it from AutoPlay, and returns some value.

  2. Use the HTTP.Submit action to submit your data to your script (located on your web server).

  3. Process the returned string.

Note: This is a very involved implementation of AutoPlay Media Studio. You will have to coordinate with your website developer to decide upon an implementation plan.


How do I...?

Answer List of Questions

Toggle the Background Music On/Off

It is possible in AutoPlay Media Studio to have music playing in the background of your application.

In AutoPlay Media Studio this is accomplished by using the Play/Pause Background Music quick action:

  1. Create a button.

  2. Choose Play/Pause Background Music as the quick action for the button.


How do I...?

Answer List of Questions

Use an FSCommand to Trigger an Action

In AutoPlay Media Studio it is possible to trigger an action using a flash FSCommand. This is useful if, for example, you want your application to do something specific at the end of your flash movie.

As an example, we will create a flash movie in Swish that sends an FSCommand when it is finished playing. When the flash movie finishes playing, we will display a dialog message.

In Swish:

  1. In Swish, right click the last frame in the movie and choose FSCommand from the Context Menu. In the Action pane, you will see the FSCommand added.

  2. Click 'FSCommand' to show the command/argument boxes underneath it.

  3. In the command box (the top of the two boxes), type the following as a command: SplashFinished.

  4. Save the movie as a swf file.

In AutoPlay Media Studio:

  1. Create a flash object and load the swf file that you created in Swish.

  2. Add the following Actions to the On FSCommand event (in the script tab):

if (e_FSCommand == "SplashFinished") then
Dialog.Message("Your Title Here", "Your message here");
end

Note: e_FSCommand is a built in variable containing the last FSCommand fired within the Flash object.


How do I...?

Answer List of Questions

Use the Status Dialog

In AutoPlay Media Studio, it is possible to display a status dialog to your user using built in actions. This is useful if, for example, your application uses a loop that takes quite a bit of time to complete.

As an example, we will create a loop that counts to 20,000, and display a status window letting the user know the status of the count:

  1. Create a button object, and add the following code to its On Click event:

--set the minimum and maximum values
minimum_value = 0;
maximum_value = 20000;

--status dialog window settings
StatusDlg.Show(); --show the status dialog window
StatusDlg.SetTitle("Counting from " .. minimum_value .. " to " .. maximum_value); --set the title
StatusDlg.SetMeterRange(minimum_value, maximum_value); --set the range of the meter

--counting loop
loop_control = minimum_value; --set the loop control variable
while loop_control <= maximum_value do --while the loop control variable is less than or equal to the maximum value
StatusDlg.SetMeterPos(loop_control); --set the meter position to the loop control variable
StatusDlg.SetStatusText("Currently Counting . . . (" .. loop_control .. " of " .. maximum_value .. ")"); --set the status text to reflect the current number
loop_control = loop_control + 1; --increment the loop control variable
end

Note: The above code when run will count to 20,000, and display a status dialog showing the progress of the loop.


How do I...?

Answer List of Questions

Use Timer Events

When there is an action that should repeat at a predetermined interval, use an On Timer event in AutoPlay Media Studio:

  1. Double-click on the page surface.

  2. Choose the Script tab.

  3. Click on the On Timer event tab.

  4. Add your action here.

To begin performing the actions in the On Timer event, use the following action:

Page.StartTimer(5000) --fires On Timer actions once every 5 seconds

This action is typically performed either by the On Click event of an object, or as an action on the On Show event of the page.

Note: The action Page.StartTimer only has to be performed once to start the timer. The actions in the On Timer event will continue to be performed until the StopTimer action is called.

Note: To stop the timer action from firing, use the action Page.StopTimer();


How do I...?

Answer List of Questions

Work with Tables and Files

In AutoPlay Media Studio, tables are frequently used when working with files. Specifically, we will look at how the results of a Dialog.FileBrowse action are stored in a table, and how it is possible to work with a text file loaded into a table.

Tables, in their basic form, are simply variables with many rows. The Dialog.FileBrowse action stores one file path per row in a table. When reading a text file into a table, every line in the text file is a separate row in the table.

Example 1

Using the Dialog.FileBrowse action, we will allow the user to browse a folder, and select multiple files. We will open each file with its default application:

-- Present the user with a file browse dialog (with multiple select set to true)
tFiles = Dialog.FileBrowse(true, "Multiple Select", "", "All Files(*.*)|*.*|", "", "", true, true);
-- Ensure that tFiles contains something
if tFiles then
-- Check if the user pressed "Cancel"
if tFiles[1] == "CANCEL" then
-- The user pressed cancel, do nothing
else
-- The user did not press cancel, traverse the table of files.
for nIndex, sFile in pairs(tFiles) do
-- Open file with the default program.
File.Open(sFile, "", SW_SHOWNORMAL);
end
end
end

In the example above, the Dialog.FileBrowse action returns a table containing all the files that were selected. If the cancel button is pressed, the first row in the table (referenced by tFiles[1]) is set to 'CANCEL'. Otherwise, each row in the table contains the path to one file.

Example 2

Using the TextFile actions, we will load the contents of a text file into a table, and insert the text "Line two is the best line ever!!" into the second line of the text file:

-- Present the user with a file browse dialog (with multiple select set to false)
tFiles = Dialog.FileBrowse(true, "Single Select", "", "All Files(*.*)|*.*|", "", "", false, true);

-- Ensure that tFiles contains something
if tFiles then
-- Check if the user pressed "Cancel"
if tFiles[1] ~= "CANCEL" then
-- The user did not press Cancel, continue

-- Read the selected text file to a table
tTextFileContents = TextFile.ReadToTable(tFiles[1]);

-- Insert the text into line (row) two
Table.Insert(tTextFileContents, 2, "Line two is the best line ever!!");

-- Write the altered table back to the text file selected (DON'T append)
TextFile.WriteFromTable(tFiles[1], tTextFileContents, false);
end
end


How do I...?

Answer List of Questions

Write Text to a File

When writing information to a text file, there are two options: the text can be added on to the end of the text file, or the current information in the text file can be overwritten. In AutoPlay Media Studio, this is accomplished by changing the Append value to false in any action that writes to a file.

As an example, we will write "la de da de da" to a text file, overwriting its contents. This is accomplished with the following action:

TextFile.WriteFromString("c:\text.txt", "la de da de da", false);


Scripting Guide

Contents

Introduction

A Quick Example of Scripting in AutoPlay Media Studio

Important Scripting Concepts

Script is Global

Script is Case-Sensitive

Comments

Delimiting Statements

Variables

What are Variables?

Variable Scope

Local Variables

Variable Naming

Reserved Keywords

Types and Values

Number

String

Nil

Boolean

Function

Table

Variable Assignment

Expressions and Operators

Arithmetic Operators

Relational Operators

Logical Operators

The Length Operator

Concatenation

Operator Precedence

Control Structures

If

While

Repeat

For

Tables (Arrays)

Creating Tables

Accessing Table Elements

Numeric Arrays

Associative Arrays

Using For to Enumerate Tables

Copying Tables

Table Functions

Functions

Function Arguments

Returning Values

Returning Multiple Values

Redefining Functions

Putting Functions in Tables

String Manipulation

Concatenating Strings

Comparing Strings

Counting Characters

Finding Strings

Replacing Strings

Extracting Strings

Converting Numeric Strings into Numbers

Other Built-in Functions

Script Functions

dofile

require

type

Actions

Debugging Your Scripts

Error Handling

Syntax Errors

Functional Errors

Debug Actions

Application.GetLastError

Debug.ShowWindow

Debug.Print

Debug.SetTraceMode

Debug.GetEventContext

Dialog.Message

Final Thoughts

Other Resources

Help File

User’s Guide

AutoPlay Media Studio Web Site

Indigo Rose Technical Support

The Lua Web Site


Introduction

One of the powerful features of AutoPlay Media Studio is its scripting engine. This document will introduce you to the new scripting environment and language.

AutoPlay scripting is very simple, with only a handful of concepts to learn. Here is what it looks like:

a = 5;
if a < 10 then
Dialog.Message("Guess what?", "a is less than 10");
end

(Note: this script is only a demonstration. Don’t worry if you don’t understand it yet.)

The example above assigns a value to a variable, tests the contents of that variable, and if the value turns out to be less than 10, uses an AutoPlay action called “Dialog.Message” to display a message to the user.

New programmers and experienced coders alike will find that AutoPlay Media Studio is a powerful, flexible yet simple scripting environment to work in.

A Quick Example of Scripting in AutoPlay Media Studio

Here is a short tutorial showing you how to enter a script into AutoPlay Media Studio and preview the results:

1. Start a new project.

2. Create a new button object.

3. In the Actions category of the properties pane, click on the On Click event. A small edit button should appear next to the word “-- None --” on the right.

4. Click the edit button to open the script editor. Note that it opens directly to the On Click tab.

5. Type in the following text:

Dialog.Message("Title", "Hello World");

It should look like this when you’re done:

6. Click OK to close the script editor.

7. Choose Publish > Preview from the menu.

8. Once the application is running, click on the button that you created.

This will trigger the button’s On Click event, so that the script you entered will be performed. You should see the following dialog appear:

Congratulations! You have just made your first script. Though this is a simple example, it shows you just how easy it is to make something happen in your AutoPlay application. You can use the above method to try out any script you want in AutoPlay Media Studio.


Important Scripting Concepts

There are a few important things that you should know about the AutoPlay Media Studio scripting language in general before we go on.

Script is Global

The scripting engine is global to the runtime environment. That means that all of your events will “know” about other variables and functions declared elsewhere in the product. For example, if you assign “myvar = 10;” in the project’s On Startup event, myvar will still equal 10 when the next event is triggered. There are ways around this global nature (see Variable Scope), but it is generally true of the scripting engine.

Script is Case-Sensitive

The scripting engine is case-sensitive. This means that upper and lower case characters are important for things like keywords, variable names and function names.

For example:

ABC = 10;
aBC = 7;

In the above script, ABC and aBC refer to two different variables, and can hold different values. The lowercase “a” in “aBC” makes it completely different from “ABC” as far as AutoPlay is concerned.

The same principle applies to function names as well. For example:

Dialog.Message("Hi", "Hello World");

...refers to a built-in AutoPlay function. However,

DIALOG.Message("Hi", "Hello World");

...will not be recognized as the built-in function, because DIALOG and Dialog are seen as two completely different names.

Note: It’s entirely possible to have two functions with the same spelling but different capitalization—for example, GreetUser and gREeTUSeR would be seen as two totally different functions. Although it’s definitely possible for such functions to coexist, it’s generally better to give functions completely different names to avoid any confusion.

Comments

You can insert non-executable comments into your scripts to explain and document your code. In a script, any text after two dashes (--) on a line will be ignored. For example:

-- Assign 10 to variable abc
abc = 10;

...or:

abc = 10; -- Assign 10 to abc

Both of the above examples do the exact same thing—the comments do not affect the script in any way.

You can also create multi-line comments by using --[[ and ]]-- on either side of the comment:

--[[ This is
a multi-line
comment ]]--
a = 10;

Nested comments are not supported using [[ string ]]. In these cases you can use the syntax [=[ and ]=]. You can continue to nest these by adding more "=" signs so that each one is paired, for example, [===[...]===].

You should use comments to explain your scripts as much as possible in order to make them easier to understand by yourself and others.

Delimiting Statements

Each unique statement can either be on its own line and/or separated by a semi-colon (;). For example, all of the following scripts are valid:

Script 1:

a = 10
MyVar = a

Script 2:

a = 10; MyVar = a;

Script 3:

a = 10;
MyVar = a;

However, we recommend that you end all statements with a semi-colon (as in scripts 2 and 3 above).


Variables

What are Variables?

Variables are very important to scripting in AutoPlay. Variables are simply “nicknames” or “placeholders” for values that might need to be modified or re-used in the future. For example, the following script assigns the value 10 to a variable called “amount.”

amount = 10;

Note: We say that values are “assigned to” or “stored in” variables. If you picture a variable as a container that can hold a value, assigning a value to a variable is like “placing” that value into a container. You can change this value at any time by assigning a different value to the variable; the new value simply replaces the old one. This ability to hold changeable information is what makes variables so useful.

Here are a couple of examples demonstrating how you can operate on the “amount” variable:

amount = 10;
amount = amount + 20;
Dialog.Message("Value", amount);

This stores 10 in the variable named amount, then adds 20 to that value, and then finally makes a message box appear with the current value (which is now the number 30) in it.

You can also assign one variable to another:

a = 10;
b = a;
Dialog.Message("Value", b);

This will make a message box appear with the number 10 in it. The line “b = a;” assigns the value of “a” (which is 10) to “b.”

Variable Scope

As mentioned earlier in this document, all variables in AutoPlay Media Studio are global by default. This just means that they exist project-wide, and hold their values from one script to the next. In other words, if a value is assigned to a variable in one script, the variable will still hold that value when the next script is executed.

For example, if you enter the script:

foo = 10;

...into the current page’s On Open event, and then enter:

Dialog.Message("The value is:", foo);

...into a button object’s On Click event, the second script will use the value that was assigned to “foo” in the first script. As a result, when the button object is clicked, a message box will appear with the number 10 in it.

Note that the order of execution is important...in order for one script to be able to use the value that was assigned to the variable in another script, that other script has to be executed first. In the above example, the page’s On Open event is triggered before the button’s On Click event, so the value 10 is already assigned to foo when the On Click event’s script is executed.

Local Variables

The global nature of the scripting engine means that a variable will retain its value throughout your entire project. You can, however, make variables that are non-global, by using the special keyword “local.” Putting the word “local” in front of a variable assignment creates a variable that is local to the current script or function.

For example, let’s say you have the following three scripts in the same project:

Script 1:

-- assign 10 to x
x = 10;

Script 2:

local x = 500;
Dialog.Message("Local value of x is:", x);
x = 250; -- this changes the local x, not the global one
Dialog.Message("Local value of x is:", x);

Script 3:

-- display the global value of x
Dialog.Message("Global value of x is:", x);

Let’s assume these three scripts are performed one after the other. The first script gives x the value 10. Since all variables are global by default, x will have this value inside all other scripts, too. The second script makes a local assignment to x, giving it the value of 500—but only inside that script. If anything else inside that script wants to access the value of x, it will see the local value instead of the global one. It’s like the “x” variable has been temporarily replaced by another variable that looks just like it, but has a different value.

(This reminds me of those caper movies, where the bank robbers put a picture in front of the security cameras so the guards won’t see that the vault is being emptied. Only in this case, it’s like the bank robbers create a whole new working vault, just like the original, and then dismantle it when they leave.)

When told to display the contents of x, the first Dialog.Message action inside script #2 will display 500, since that is the local value of x when the action is performed. The next line assigns 250 to the local value of x—note that once you make a local variable, it completely replaces the global variable for the rest of the script.

Finally, the third script displays the global value of x, which is still 10.

Variable Naming

Variable names can be made up of any combination of letters, digits and underscores as long as they do not begin with a number and do not conflict with reserved keywords.

Examples of valid variables names:

a
strName
_My_Variable
data1
data_1_23
index
bReset
nCount

Examples of invalid variable names:

1
1data
%MyValue%
$strData
for
local
_FirstName+LastName_
User Name

Reserved Keywords

The following words are reserved and cannot be used for variable or function names:

and break do else elseif
end false for function if
in local nil not or
repeat return table then true
until while

Types and Values

AutoPlay’s scripting language is dynamically typed. There are no type definitions—instead, each value carries its own type.

What this means is that you don’t have to declare a variable to be of a certain type before using it. For example, in C++, if you want to use a number, you have to first declare the variable’s type and then assign a value to it:

int j;
j = 10;

The above C++ example declares j as an integer, and then assigns 10 to it.

As we have seen, in AutoPlay you can just assign a value to a variable without declaring its type. Variables don’t really have types; instead, it’s the values inside them that are considered to be one type or another. For example:

j = 10;

...this automatically creates the variable named “j” and assigns the value 10 to it. Although this value has a type (it’s a number), the variable itself is still typeless. This means that you can turn around and assign a different type of value to j, like so:

j = "Hello";

This replaces the number 10 that is stored in j with the string “Hello.” The fact that a string is a different type of value doesn’t matter; the variable j doesn’t care what kind of value it holds, it just stores whatever you put in it.

There are six basic data types in AutoPlay: number, string, nil, boolean, function, and table. The sections below will explain each data type in more detail.

Number

A number is exactly that: a numeric value. The number type represents real numbers—specifically, double-precision floating-point values. There is no distinction between integers and floating-point numbers (also known as “fractions”)...all of them are just “numbers.” Here are some examples of valid numbers:

4 4. .4 0.4 4.57e-3 0.3e12

String

A string is simply a sequence of characters. For example, “Joe2” is a string of four characters, starting with a capital “J” and ending with the number “2.” Strings can vary widely in length; a string can contain a single letter, or a single word, or the contents of an entire book.

Strings may contain spaces and even more exotic characters, such as carriage returns and line feeds. In fact, strings may contain any combination of valid 8-bit ASCII characters, including null characters (“\0”). AutoPlay automatically manages string memory, so you never have to worry about allocating or de-allocating memory for strings.

Strings can be used quite intuitively and naturally. They should be delimited by matching single quotes or double quotes. Here are some examples that use strings:

Name = "Joe Blow";
Dialog.Message("Title", "Hello, how are you?");
LastName = 'Blow';

Normally double quotes are used for strings, but single quotes can be useful if you have a string that contains double quotes. Whichever type of quotes you use, you can include the other kind inside the string without escaping it. For example:

doubles = "How's that again?";
singles = 'She said "Talk to the hand," and I was all like "Dude!"';

If we used double quotes for the second line, it would look like this:

escaped = "She said \"Talk to the hand,\" and I was all like \"Dude!\"";

Normally, the scripting engine sees double quotes as marking the beginning or end of a string. In order to include double quotes inside a double-quoted string, you need to escape them with backslashes. This tells the scripting engine that you want to include an actual quote character in the string.

The backslash and quote (\") is known as an escape sequence. An escape sequence is a special sequence of characters that gets converted or “translated” into something else by the script engine. Escape sequences allow you to include things that can’t be typed directly into a string.

The escape sequences that you can use include:

\a - bell
\b - backspace
\f - form feed
\n - newline
\r - carriage return
\t - horizontal tab
\v - vertical tab
\\ - backslash
\" - quotation mark
\' - apostrophe
\[ - left square bracket
\] - right square bracket

So, for example, if you want to represent three lines of text in a single string, you would use the following:

Lines = "Line one.\nLine two.\nLine three";
Dialog.Message("Here is the String", Lines);

This assigns a string to a variable named Lines, and uses the newline escape sequence to start a new line after each sentence. The Dialog.Message function displays the contents of the Lines variable in a message box, like this:

Another common example is when you want to represent a path to a file such as
C:\My Folder\My Data.txt. You just need to remember to escape the backslashes:

MyPath = "C:\\My Folder\\My Data.txt";

Each double-backslash represents a single backslash when used inside a string.

If you know your ASCII table, you can use a backslash character followed by a number with up to three digits to represent any character by its ASCII value. For example, the ASCII value for a newline character is 10, so the following two lines do the exact same thing:

Lines = "Line one.\nLine two.\nLine three";
Lines = "Line one.\10Line two.\10Line three";

However, you will not need to use this format very often, if ever.

You can also define strings on multiple lines by using double square brackets ([[ and ]]). A string between double square brackets does not need any escape characters. The double square brackets lets you type special characters like backslashes, quotes and newlines right into the string. For example:

Lines = [[Line one.
Line two.
Line three.]];

is equivalent to:

Lines = "Line one.\nLine two.\nLine three";

This can be useful if you have preformatted text that you want to use as a string, and you don’t want to have to convert all of the special characters into escape sequences.

The last important thing to know about strings is that the script engine provides automatic conversion between numbers and strings at run time. Whenever a numeric operation is applied to a string, the engine tries to convert the string to a number for the operation. Of course, this will only be successful if the string contains something that can be interpreted as a number.

For example, the following lines are both valid:

a = "10" + 1; -- Result is 11
b = "33" * 2; -- Result is 66

However, the following lines would not give you the same conversion result:

a = "10+1"; -- Result is the string "10+1"
b = "hello" + 1; -- ERROR, can’t convert "hello" to a number

For more information on working with strings, see the topic String Manipulation.

Nil

Nil is a special value type. It basically represents the absence of any other kind of value.

You can assign nil to a variable, just like any other value. Note that this isn’t the same as assigning the letters “nil” to a variable, as in a string. Like other keywords, nil must be left unquoted in order to be recognized. It should also be entered in all lowercase letters.

Nil will always evaluate to false when used in a condition:

a = nil;
if a then
-- Any lines in here
-- will not be executed
end

It can also be used to “delete” a variable:

y = "Joe Blow";
y = nil;

In the example above, “y” will no longer contain a value after the second line.

Boolean

Boolean variable types can have one of two values: true, or false. They can be used in conditions and to perform Boolean logic operations. For example:

boolybooly = true;
if boolybooly then
-- Any script in here will be executed
end

This sets a variable named boolybooly to true, and then uses it in an if statement. Similarly:

a = true;
b = false;
if (a and b) then
-- Any script here will not be executed because
-- true and false is false.
end

This time, the if statement needs both “a” and “b” to be true in order for the lines inside it to be executed. In this case, that won’t happen because “b” has been set to false.

Function

The script engine allows you to define your own functions (or “sub-routines”), which are essentially small pieces of script that can be executed on demand. Each function has a name which is used to identify the function. You can actually use that function name as a special kind of value, in order to store a “reference” to that function in a variable, or to pass it to another function. This kind of reference is of the function type.

For more information on functions, see the topic Functions.

Table

Tables are a very powerful way to store lists of indexed values under one name. Tables are actually associative arrays—that is, they are arrays which can be indexed not only with numbers, but with any kind of value (including strings).

Here are a few quick examples (we cover tables in more detail in the topic Tables (Arrays):

Example 1:

guys = {"Adam", "Brett", "Darryl"};
Dialog.Message("Second Name in the List", guys[2]);

This will display a message box with the word “Brett” in it.

Example 2:

t = {};
t.FirstName = "Michael";
t.LastName = "Jackson";
t.Occupation = "Singer";
Dialog.Message(t.FirstName, t.Occupation);

This will display the following message box:

You can assign tables to other variables as well. For example:

table_one = {};
table_one.FirstName = "Michael";
table_one.LastName = "Jackson";
table_one.Occupation = "Singer";
table_two = table_one;
occupation = table_two.Occupation;
Dialog.Message(b.FirstName, occupation);

Tables can be indexed using array notation (my_table[1]), or by dot notation if not indexed by numbers (my_table.LastName).

Note that when you assign one table to another, as in the following line:

table_two = table_one;

...this doesn’t actually copy table_two into table_one. Instead, table_two and table_one both refer to the same table.

This is because the name of a table actually refers to an address in memory where the data within the table is stored. So when you assign the contents of the variable table_one to the variable table_two, you’re copying the address, and not the actual data. You’re essentially making the two variables “point” to the same table of data.

In order to copy the contents of a table, you need to create a new table and then copy all of the data over one item at a time.

For more information on copying tables, see the topic Tables.

Variable Assignment

Variables can have new values assigned to them by using the assignment operator (=). This includes copying the value of one variable into another. For example:

a = 10;
b = "I am happy";
c = b;

It is interesting to note that the script engine supports multiple assignment:

a, b = 1, 2;

After the script above, the variable “a” contains the number 1 and the variable “b” contains the number 2.

Tables and functions are a bit of a special case: when you use the assignment operator on a table or function, you create an alias that points to the same table or function as the variable being “copied.” Programmers call this copying by reference as opposed to copying by value.


Expressions and Operators

An expression is anything that evaluates to a value. This can include a single value such as “6” or a compound value built with operators such as “1 + 3”. You can use parentheses to “group” expressions and control the order in which they are evaluated. For example, the following lines will all evaluate to the same value:

a = 10;
a = (5 * 1) * 2;
a = 100 / 10;
a = 100 / (2 * 5);

Arithmetic Operators

Arithmetic operators are used to perform mathematical operations on numbers. The following mathematical operators are supported:

+ (addition)
- (subtraction)
* (multiplication)
/ (division)
% (modulo)
^ (exponentiation)
unary - (negation)

Here are some examples:

a = 5 + 2;
b = a * 100;
twentythreepercent = 23 / 100;
neg = -29;
pos = -neg;

Relational Operators

Relational operators allow you to compare how one value relates to another. The following relational operators are supported:

> (greater-than)
< (less-than)
<= (less-than or equal to)
>= (greater than or equal to)
~= (not equal to)
== (equal)

All of the relational operators can be applied to any two numbers or any two strings. All other values can only use the == operator to see if they are equal.

Relational operators return Boolean values (true or false). For example:

10 > 20; -- resolves to false

a = 10;
a > 300; -- false

(3 * 200) > 500; -- true
"Brett" ~= "Lorne" -- true

One important point to mention is that the == and ~= operators test for complete equality, which means that any string comparisons done with those operators are case sensitive. For example:

"Jojoba" == "Jojoba"; -- true
"Wildcat" == "wildcat"; -- false
"I like it a lot" == "I like it a LOT"; -- false

"happy" ~= "HaPPy"; -- true

Logical Operators

Logical operators are used to perform Boolean operations on Boolean values. The following logical operators are supported:

and (only true if both values are true)
or (true if either value is true)
not (returns the opposite of the value)

For example:

a = true;
b = false;
c = a and b; -- false
d = a and nil; -- false
e = not b; -- true

Note that only nil and false are considered to be false, and all other values are true.

For example:

iaminvisible = nil;
if iaminvisible then
-- any lines in here won't happen
-- because iaminvisible is considered false
Dialog.Message("You can't see me!", "I am invisible!!!!");
end

if "Brett" then
-- any lines in here WILL happen, because only nil and false
-- are considered false...anything else, including strings,
-- is considered true
Dialog.Message("What about strings?", "Strings are true.");
end

The Length Operator

The length unary operator # can be used to get the length of a string, for example:

nLength = #"Hey"; -- This results in nLength being 3.

Concatenation

In AutoPlay scripting, the concatenation operator is two periods (..). It is used to combine two or more strings together. You don’t have to put spaces before and after the periods, but you can if you want to.

For example:

name = "Joe".." Blow"; -- assigns "Joe Blow" to name
b = name .. " is number " .. 1; -- assigns "Joe Blow is number 1" to b

Operator Precedence

Operators are said to have precedence, which is a way of describing the rules that determine which operations in a series of expressions get performed first. A simple example would be the expression 1 + 2 * 3. The multiply (*) operator has higher precedence than the add (+) operator, so this expression is equivalent to 1 + (2 * 3). In other words, the expression 2 * 3 is performed first, and then 1 + 6 is performed, resulting in the final value 7.

You can override the natural order of precedence by using parentheses. For instance, the expression (1 + 2) * 3 resolves to 9. The parentheses make the whole sub-expression “1 + 2” the left value of the multiply (*) operator. Essentially, the sub-expression 1 + 2 is evaluated first, and the result is then used in the expression 3 * 3.

Operator precedence follows the following order, from lowest to highest priority:

or and
<     >   <=   >=   ~=   ==
..
+ -
* / %
not # - (unary)
^

Operators are also said to have associativity, which is a way of describing which expressions are performed first when the operators have equal precedence. In the script engine, all binary operators are left associative, which means that whenever two operators have the same precedence, the operation on the left is performed first. The exception is the exponentiation operator (^), which is right-associative.

When in doubt, you can always use explicit parentheses to control precedence. For example:

a + 1 < b/2 + 1

...is the same as:

(a + 1) < ((b/2) + 1)

...and you can use parentheses to change the order of the calculations, too:

a + 1 < b/(2 + 1)

In this last example, instead of 1 being added to half of b, b is divided by 3.


Control Structures

The scripting engine supports the following control structures: if, while, repeat and for.

If

An if statement evaluates its condition and then only executes the “then” part if the condition is true. An if statement is terminated by the “end” keyword. The basic syntax is:

if condition then
do something here
end

For example:

x = 50;
if x > 10 then
Dialog.Message("result", "x is greater than 10");
end

y = 3;
if ((35 * y) < 100) then
Dialog.Message("", "y times 35 is less than 100");
end

In the above script, only the first dialog message would be shown, because the second if condition isn't true...35 times 3 is 105, and 105 is not less than 100.

You can also use else and elseif to add more “branches” to the if statement:

x = 5;
if x > 10 then
Dialog.Message("", "x is greater than 10");
else
Dialog.Message("", "x is less than or equal to 10");
end

In the preceding example, the second dialog message would be shown, because 5 is not greater than 10.

x = 5;
if x == 10 then
Dialog.Message("", "x is exactly 10");
elseif x == 11 then
Dialog.Message("", "x is exactly 11");
elseif x == 12 then
Dialog.Message("", "x is exactly 12");
else
Dialog.Message("", "x is not 10, 11 or 12");
end

In that example, the last dialog message would be shown, because x is not equal to 10, or 11, or 12.

While

The while statement is used to execute the same "block" of script over and over until a condition is met. Like if statements, while statements are terminated with the “end” keyword. The basic syntax is:

while condition do
do something here
end

The condition must be true in order for the actions inside the while statement (the “do something here” part above) to be performed. The while statement will continue to loop as long as this condition is true. Here's how it works:

If the condition is true, all of the actions between the “while” and the corresponding “end” will be performed. When the “end” is reached, the condition will be reevaluated, and if it's still true, the actions between the “while” and the “end” will be performed again. The actions will continue to loop like this until the condition evaluates to false.

For example:

a = 1;
while a < 10 do
a = a + 1;
end

In the preceding example, the “a = a + 1;” line would be performed 9 times.

You can break out of a while loop at any time using the “break” keyword. For example:

count = 1;
while count < 100 do
count = count + 1;
if count == 50 then
break;
end
end

Although the while statement is willing to count from 1 to 99, the if statement would cause this loop to terminate as soon as count reached 50.

Repeat

The repeat statement is similar to the while statement, except that the condition is checked at the end of the structure instead of at the beginning. The basic syntax is:

repeat
do something here
until condition

For example:

i = 1;
repeat
i = i + 1;
until i > 10

This is similar to one of the while loops above, but this time, the loop is performed 10 times. The “i = i + 1;” part gets executed before the condition determines that a is now larger than 10.

You can break out of a repeat loop at any time using the “break” keyword. For example:

count = 1;
repeat
count = count + 1;
if count == 50 then
break;
end
until count > 100

Once again, this would exit from the loop as soon as count was equal to 50.

For

The for statement is used to repeat a block of script a specific number of times. The basic syntax is:

for variable = start,end,step do
do something here
end

The variable can be named anything you want. It is used to “count” the number of trips through the for loop. It begins at the start value you specify, and then changes by the amount in step after each trip through the loop. In other words, the step gets added to the value in the variable after the lines between the for and end are performed. If the result is smaller than or equal to the end value, the loop continues from the beginning.

For example:

-- This loop counts from 1 to 10:
for x = 1, 10 do
Dialog.Message("Number", x);
end

The above example displays 10 dialog messages in a row, counting from 1 to 10.
Note that the step is optional—if you don’t provide a value for the step, it defaults to 1.

Here’s an example that uses a step of “-1” to make the for loop count backwards:

-- This loop counts from 10 down to 1:
for x = 10, 1, -1 do
Dialog.Message("Number", x);
end

That example would display 10 dialog messages in a row, counting back from 10 and going all the way down to 1.

You can break out of a for loop at any time using the “break” keyword. For example:

for i = 1, 100 do
if count == 50 then
break;
end
end

Once again, this would exit from the loop as soon as count was equal to 50.

There is also a variation on the for loop that operates on tables. For more information on that, see Using For to Enumerate Tables.


Tables (Arrays)

Tables are very useful. They can be used to store any type of value, including functions or even other tables.

Creating Tables

There are generally two ways to create a table from scratch. The first way uses curly braces to specify a list of values:

my_table = {"apple","orange","peach"};

associative_table = {fruit="apple", vegetable="carrot"}

The second way is to create a blank table and then add the values one at a time:

my_table = {};
my_table[1] = "apple";
my_table[2] = "orange";
my_table[3] = "peach";

associative_table = {};
associative_table.fruit = "apple";
associative_table.vegetable = "carrot";

Accessing Table Elements

Each “record” of information stored in a table is known as an element. Each element consists of a key, which serves as the index into the table, and a value that is associated with that key.

There are generally two ways to access an element: you can use array notation, or dot notation. Array notation is typically used with numeric arrays, which are simply tables where all of the keys are numbers. Dot notation is typically used with associative arrays, which are tables where the keys are strings.

Here is an example of array notation:

t = { "one", "two", "three"};
Dialog.Message("Element one contains:", t[1]);

Here is an example of dot notation:

t = { first="one", second="two", third="three"};
Dialog.Message("Element 'first' contains:", t.first);

Numeric Arrays

One of the most common uses of tables is as arrays. An array is a collection of values that are indexed by numeric keys. In the scripting engine, numeric arrays are one-based. That is, they start at index 1.

Here are some examples using numeric arrays:

Example 1:

myArray = {255,0,255};
Dialog.Message("First Number", myArray[1]);

This would display a dialog message containing the number “255.”

Example 2:

alphabet = {"a","b","c","d","e","f","g","h","i","j","k",
"l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"};
Dialog.Message("Seventh Letter", alphabet[7]);

This would display a dialog message containing the letter “g.”

Example 3:

myArray = {};
myArray[1] = "Option One";
myArray[2] = "Option Two";
myArray[3] = "Option Three";

This is exactly the same as the following:

myArray = {"Option One", "Option Two", "Option Three"};

Associative Arrays

Associative arrays are the same as numerical arrays except that the indexes can be numbers, strings or even functions.

Here is an example of an associative array that uses a last name as an index and a first name as the value:

arrNames = {Anderson="Jason",
Clemens="Roger",
Contreras="Jose",
Hammond="Chris",
Hitchcock="Alfred"};

Dialog.Message("Anderson's First Name", arrNames.Anderson);

The resulting dialog message would look like this:

Here is an example of a simple employee database that keeps track of employee names and birth dates indexed by employee numbers:

Employees = {}; -- Construct an empty table for the employee numbers

-- store each employee's information in its own table
Employee1 = {Name="Jason Anderson", Birthday="07/02/82"};
Employee2 = {Name="Roger Clemens", Birthday="12/25/79"};

-- store each employee's information table
-- at the appropriate number in the Employees table
Employees[100099] = Employee1;
Employees[137637] = Employee2;

-- now typing "Employees[100099]" is the same as typing "Employee1"
Dialog.Message("Birthday",Employees[100099].Birthday);

The resulting dialog message would look like this:

Using For to Enumerate Tables

There is a special version of the for statement that allows you to quickly and easily enumerate the contents of an array. The syntax is:

for index,value in pairs (table) do
operate on index and value
end

For example:

mytable = {"One","Two","Three"};

-- display a message for every table item
for j,k in pairs(mytable) do
Dialog.Message("Table Item", j .. "=" .. k);
end

The result would be three dialog messages in a row, one for each of the elements in mytable, like so:

Remember the above for statement, because it is a quick and easy way to inspect the values in a table. If you just want the indexes of a table, you can leave out the value part of the for statement:

a = {One=1,Two=2,Three=3};

for k in pairs(a) do
Dialog.Message("Table Index",k);
end

The above script will display three message boxes in a row, with the text “One,” “Three,” and then “Two.”

Whoa there—why aren’t the table elements in order? The reason for this is that internally the scripting engine doesn't store tables as arrays, but in a super-efficient structure known as a hash table. (Don’t worry, I get confused about hash tables too.) The important thing to know is that when you define table elements, they are not necessarily stored in the order that you define or add them, unless you use a numeric array (i.e. a table indexed with numbers from 1 to whatever).

Copying Tables

Copying tables is a bit different from copying other types of values. Unlike variables, you can't just use the assignment operator to copy the contents of one table into another. This is because the name of a table actually refers to an address in memory where the data within the table is stored. If you try to copy one table to another using the assignment operator, you end up copying the address, and not the actual data.

For example, if you wanted to copy a table, and then modify the copy, you might try something like this:

table_one = { mood="Happy", temperature="Warm"
 };

-- create a copy
table_two = table_one;

-- modify the copy
table_two.temperature = "Cold";

Dialog.Message("Table one temperature is:", table_one.temperature);
Dialog.Message("Table two temperature is:", table_two.temperature);

If you ran this script, you would see the following two dialogs:

Wait a minute...changing the “temperature” element in table_two also changed it in table_one. Why would they both change?

The answer is simply because the two are in fact the same table.

Internally, the name of a table just refers to a memory location. When table_one is created, a portion of memory is set aside to hold its contents. The location (or “address”) of this memory is what gets assigned to the variable named table_one.

Assigning table_one to table_two just copies that memory address—not the actual memory itself.

It’s like writing down the address of a library on a piece of paper, and then handing that paper to your friend. You aren’t handing the entire library over, shelves of books and all...only the location where it can be found.

If you wanted to actually copy the library, you would have to create a new building, photocopy each book individually, and then store the photocopies in the new location.

That’s pretty much how it is with tables, too. In order to create a full copy of a table, contents and all, you need to create a new table and then copy over all of the elements, one element at a time.

Luckily, the for statement makes this really easy to do. For example, here’s a modified version of our earlier example, that creates a “true” copy of table_one.

table_one = { mood="Happy", temperature="Warm"
 };

-- create a copy
table_two = {};
for index, value in pairs(table_one) do
table_two[index] = value;
end

-- modify the copy
table_two.temperature = "Cold";

Dialog.Message("Table one temperature is:", table_one.temperature);
Dialog.Message("Table two temperature is:", table_two.temperature);

This time, the dialogs show that modifying table_two doesn’t affect table_one at all:

Table Functions

There are a number of built-in table functions at your disposal, which you can use to do such things as inserting elements into a table, removing elements from a table, and counting the number of elements in a table. For more information on these table functions, please see Program Reference / Actions / Table in the online help.


Functions

By far the coolest and most powerful feature of the scripting engine is functions. You have already seen a lot of functions used throughout this document, such as “Dialog.Message.” Functions are simply portions of script that you can define, name and then call from anywhere else.

Although there are a lot of built-in AutoPlay functions, you can also make your own custom functions to suit your specific needs. In general, functions are defined as follows:

function function_name (arguments)
function script here
return return_value;
end

The first part is the keyword “function.” This tells the scripting engine that what follows is a function definition. The function_name is simply a unique name for your function. The arguments are parameters (or values) that will be passed to the function every time it is called. A function can receive any number of arguments from 0 to infinity (well, not infinity, but don’t get technical on me). The “return” keyword tells the function to return one or more values back to the script that called it.

The easiest way to learn about functions is to look at some examples. In this first example, we will make a simple function that shows a message box. It does not take any arguments and does not return anything.

function HelloWorld()
Dialog.Message("Welcome","Hello World");
end

Notice that if you put the above script into an event and preview your application, nothing happens. Well, that is true and not true. It is true that nothing visible happens but the magic is in what you don’t see. When the event is fired and the function script is executed, the function called “HelloWorld” becomes part of the scripting engine. That means it is now available to the rest of the application in any other script.

This brings up an important point about scripting in AutoPlay Media Studio. When making a function, the function does not get “into” the engine until the script is executed. That means that if you define HelloWorld() in a button’s On Click event, but that event never gets triggered (because the user doesn’t click on the button), the HelloWorld() function will never exist. That is, you will not be able to call it from anywhere else.

That is why, in general, it is best to define your global functions in the global script of the project. (To access the global script, choose Project > Global Functions from the menu.)

Now back to the good stuff. Let’s add a line to actually call the function:

function HelloWorld()
Dialog.Message("Welcome","Hello World");
end

HelloWorld();

The “HelloWorld();” line tells the scripting engine to “go perform the function named HelloWorld.” When that line gets executed, you would see a welcome message with the text “Hello World” in it.

Function Arguments

Let’s take this a bit further and tell the message box which text to display by adding an argument to the function.

function HelloWorld(Message)
Dialog.Message("Welcome", Message);
end

HelloWorld("This is an argument");

Now the message box shows the text that was “passed” to the function.

In the function definition, “Message” is a variable that will automatically receive whatever argument is passed to the function. In the function call, we pass the string “This is an argument” as the first (and only) argument for the HelloWorld function.

Here is an example of using multiple arguments.

function HelloWorld(Title, Message)
Dialog.Message(Title, Message);
end

HelloWorld("This is argument one", "This is argument two");
HelloWorld("Welcome", "Hi there");

This time, the function definition uses two variables, one for each of its two arguments...and each function call passes two strings to the HelloWorld function.

Note that by changing the content of those strings, you can send different arguments to the function, and achieve different results.

Returning Values

The next step is to make the function return values back to the calling script. Here is a function that accepts a number as its single argument, and then returns a string containing all of the numbers from one to that number.

function Count(n)

-- start out with a blank return string
ReturnString = "";

for num = 1,n do
-- add the current number (num) to the end of the return string
ReturnString = ReturnString..num;

-- if this isn't the last number, then add a comma and a space
-- to separate the numbers a bit in the return string
if (num ~= n) then
ReturnString = ReturnString..", ";
end
end

-- return the string that we built
return ReturnString;
end

CountString = Count(10);
Dialog.Message("Count", CountString);

The last two lines of the above script uses the Count function to build a string counting from 1 to 10, stores it in a variable named CountString, and then displays the contents of that variable in a dialog message box.

Returning Multiple Values

You can return multiple values from functions as well:

function SortNumbers(Number1, Number2)
if Number1 <= Number2 then
return Number1, Number2
else
return Number2, Number1
end
end

firstNum, secondNum = SortNumbers(102, 100);
Dialog.Message("Sorted", firstNum ..", ".. secondNum);

The above script creates a function called SortNumbers that takes two arguments and then returns two values. The first value returned is the smaller number, and the second value returned is the larger one. Note that we specified two variables to receive the return values from the function call on the second last line. The last line of the script displays the two numbers in the order they were sorted into by the function.

Redefining Functions

Another interesting thing about functions is that you can override a previous function definition simply by re-defining it.

function HelloWorld()
Dialog.Message("Message","Hello World");
end

function HelloWorld()
Dialog.Message("Message","Hello Earth");
end

HelloWorld();

The script above shows a message box that says “Hello Earth,” and not “Hello World.” That is because the second version of the HelloWorld() function overrides the first one.

Putting Functions in Tables

One really powerful thing about tables is that they can be used to hold functions as well as other values. This is significant because it allows you to make sure that your functions have unique names and are logically grouped. (This is how all of the AutoPlay Media Studio functions are implemented.) Here is an example:

-- Make the functions:
function HelloEarth()
Dialog.Message("Message","Hello Earth");
end

function HelloMoon()
Dialog.Message("Message","Hello Moon");
end

-- Define an empty table:
Hello = {};

-- Assign the functions to the table:
Hello.Earth = HelloEarth;
Hello.Moon = HelloMoon;

-- Now call the functions:
Hello.Earth();
Hello.Moon();

It is also interesting to note that you can define functions right in your table definition:

Hello = {
Earth = function () Dialog.Message("Message","Hello Earth") end,
Moon = function () Dialog.Message("Message","Hello Moon") end };

-- Now call the functions:
Hello.Earth();
Hello.Moon();


String Manipulation

In this section we will briefly cover some of the most common string manipulation techniques, such as string concatenation and comparisons.

(For more information on the string functions available to you in AutoPlay Media Studio, see Program Reference / Actions / String in the online help.)

Concatenating Strings

We have already covered string concatenation, but it is well worth repeating. The string concatenation operator is two periods in a row (..). For example:

FullName = "Bo".." Derek"; -- FullName is now "Bo Derek"

-- You can also concatenate numbers into strings
DaysInYear = 365;
YearString = "There are "..DaysInYear.." days in a year.";

Note that you can put spaces on either side of the dots, or on one side, or not put any spaces at all. For example, the following four lines will accomplish the same thing:

foo = "Hello " .. user_name;
foo = "Hello ".. user_name;
foo = "Hello " ..user_name;
foo = "Hello "..user_name;

Comparing Strings

Next to concatenation, one of the most common things you will want to do with strings is compare one string to another. Depending on what constitutes a “match,” this can either be very simple, or just a bit tricky.

If you want to perform a case-sensitive comparison, then all you have to do is use the equals operator (==). For example:

strOne = "Strongbad";
strTwo = "Strongbad";

if strOne == strTwo then
Dialog.Message("Guess what?", "The two strings are equal!");
else
Dialog.Message("Hmmm", "The two strings are different.");
end

Since the == operator performs a case-sensitive comparison when applied to strings, the above script will display a message box proclaiming that the two strings are equal.

If you want to perform a case-insensitive comparison, then you need to take advantage of either the String.Upper or String.Lower function, to ensure that both strings have the same case before you compare them. The String.Upper function returns an all-uppercase version of the string it is given, and the String.Lower function returns an all-lowercase version. Note that it doesn’t matter which function you use in your comparison, so long as you use the same function on both sides of the == operator in your if statement.

For example:

strOne = "Mooohahahaha";
strTwo = "MOOohaHAHAha";

if String.Upper(strOne) == String.Upper(strTwo) then
Dialog.Message("Guess what?", "The two strings are equal!");
else
Dialog.Message("Hmmm", "The two strings are different.");
end

In the example above, the String.Upper function converts strOne to “MOOOHAHAHAHA” and strTwo to “MOOOHAHAHAHA” and then the if statement compares the results. (Note: the two original strings remain unchanged.) That way, it doesn’t matter what case the original strings had; all that matters is whether the letters are the same.

Counting Characters

If you ever want to know how long a string is, you can easily count the number of characters it contains. Just use the String.Length function, like so:

twister = "If a wood chuck could
 chuck wood, how much would...um...";
num_chars = String.Length(twister);
Dialog.Message("That tongue twister has:", num_chars .. "
 characters!");

...which would produce the following dialog message:

You can also get the length of a string using the length operator #. For example, #"hey" would result in 3.

Finding Strings

Another common thing you’ll want to do with strings is to search for one string within another. This is very simple to do using the String.Find action.

For example:

strSearchIn = "Isn't it a wonderful day outside?";
strSearchFor = "wonder";

-- search for strSearchFor inside strSearchIn
nFoundPos = String.Find(strSearchIn, strSearchFor);

if nFoundPos ~= nil then
-- found it!
Dialog.Message("Search Result", strSearchFor ..
" found at position " .. nFoundPos);
else
-- no luck
Dialog.Message("Search Result", strSearchFor .. " not found!");
end

...would cause the following message to be displayed:

Tip: Try experimenting with different values for strSearchFor and strSearchIn.

Replacing Strings

One of the most powerful things you can do with strings is to perform a search and replace operation on them. The following example shows how you can use the String.Replace action to replace every occurrence of a string with another inside a target string.

strTarget = "There can be only one.
 Only one is allowed!";
strSearchFor = "one";
strReplaceWith = "a dozen";
strNewString = String.Replace(strTarget, strSearchFor, strReplaceWith);
Dialog.Message("After searching and replacing:", strNewString);

-- create a copy of the target string with no spaces in it
strNoSpaces = String.Replace(strTarget, " ", "");
Dialog.Message("After removing spaces:", strNoSpaces);

The above example would display the following two messages:

Extracting Strings

There are three string functions that allow you to “extract” a portion of a string, rather than copying the entire string itself. These functions are String.Left, String.Right, and String.Mid.

String.Left copies a number of characters from the beginning of the string. String.Right does the same, but counting from the right end of the string instead. String.Mid allows you to copy a number of characters starting from any position in the string.

You can use these functions to perform all kinds of advanced operations on strings.

Here’s a basic example showing how they work:

strOriginal = "It really is good to see you again.";

-- copy the first 13 characters into strLeft
strLeft = String.Left(strOriginal, 13);

-- copy the last 18 characters into strRight
strRight = String.Right(strOriginal, 18);

-- create a new string with the two pieces
strNeo = String.Left .. "awesome" .. strRight .. " Whoa.";

-- copy the word "good" into strMiddle
strMiddle = String.Mid(strOriginal, 13, 4);

Converting Numeric Strings into Numbers

There may be times when you have a numeric string, and you need to convert it to a number.

For example, if you have an input field where the user can enter their age, and you read in the text that they typed, you might get a value like “31”. Because they typed it in, though, this value is actually a string consisting of the characters “3” and “1”.

If you tried to compare this value to a number, you would get a syntax error saying that you attempted to compare a number with a string.

For example, the following script:

age = "31";
if age > 18 then
Dialog.Message("", "You're older than 18.");
end

...would produce the following error message:

The problem in this case is the line that compares the contents of the variable “age” with the number 18:

if age > 18 then

This generates an error because age contains a string, and not a number. The script engine doesn’t allow you to compare numbers with strings in this way. It has no way of knowing whether you wanted to treat age as a number, or treat 18 as a string.

The solution is simply to convert the value of age to a number before comparing it. There are two ways to do this. One way is to use the String.ToNumber function.

The String.ToNumber function translates a numeric string into the equivalent number, so it can be used in a numeric comparison.

age = "31";
if String.ToNumber(age) > 18 then
Dialog.Message("", "You're older than 18.");
end

The other way takes advantage of the scripting engine’s ability to convert numbers into strings when it knows what your intentions are. For example, if you’re performing an arithmetic operation (such as adding two numbers), the engine will automatically convert any numeric strings to numbers for you:

age = "26" + 5; -- result is a numeric value

The above example would not generate any errors, because the scripting engine understands that the only way the statement makes sense is if you meant to use the numeric string as a number. As a result, the engine automatically converts the numeric string to a number so it can perform the calculation.

Knowing this, we can convert a numeric string to a number without changing its value by simply adding 0 to it, like so:

age = "31";
if (age + 0) > 18 then
Dialog.Message("", "You're older than 18.");
end

In the preceding example, adding zero to the variable gets the engine to convert the value to a number, and the result is then compared with 18. No more error.


Other Built-in Functions

Script Functions

There are three other built-in functions that may prove useful to you: dofile, require, and type.

dofile

Loads and executes a script file. The contents of the file will be executed as though it was typed directly into the script. The syntax is:

dofile(file_path);

For example, say we typed the following script into a file called MyScript.lua (just a text file containing this script, created with notepad or some other text editor):

Dialog.Message("Hello", "World");

Now we drag and drop the file onto AutoPlay Media Studio’s main window. (This will copy the file into the project's Scripts folder.) A dialog will appear that asks if we want to add a require line to our global script. Click “No” for now. We will explain the require statement later.

Now, wherever we add the following line of script to an event:

dofile(_SourceFolder.."\\AutoPlay\\Scripts\\MyScript.lua");

...that script file will be read in and executed immediately. In this case, you would see a message box with the friendly “hello world” message.

Tip: Use the dofile function to save yourself from having to re-type or re-paste a script into your projects over and over again.

require

Loads and runs a script file into the scripting engine. It is similar to dofile except that it will only load a given file once per session, whereas dofile will re-load and re-run the file each time it is used. The syntax is:

require(file_path);

If the file is located in AutoPlay's Scripts folder, you should not include the file extension.

So, for example, even if you do two requires in a row:

require("foo");
require("foo"); -- this line won't do anything

...only the first one will ever get executed. After that, the scripting engine knows that the file has been loaded and run, and future calls to require that file will have no effect.

Note that as long as you put the .lua file into your project’s Scripts folder, you don't even have to provide a full path to the file. For example:

require("MyScript");

...is the same as:

require(_SourceFolder.."\\AutoPlay\\Scripts\\MyScript.lua");

Since require will only load a given script file once per session, it is best suited for loading scripts that contain only variables and functions. Since variables and functions are global by default, you only need to “load” them once; repeatedly loading the same function definition would just be a waste of time.

This makes the require function a great way to load external script libraries. Every script that needs a function from an external file can safely require() it, and the file will only actually be loaded the first time it’s needed.

type

This function will tell you the type of value contained in a variable. It returns the string name of the variable type. Valid return values are “nil,” “number,” “string,” “boolean,” “table,” “function,” "thread," and "userdata." For example:

a = 989;
strType = type(a); -- sets strType to "number"

a = "Hi there";
strType = type(a); -- sets strType to "string"

The type function is especially useful when writing your own functions that need certain data types in order to operate. For example, the following function uses type() to make sure that both of its arguments are numbers:

-- find the maximum of two numbers
function Max(Number1, Number2)

-- make sure both arguments are numeric
if (type(Number1) ~= "number") or (type(Number2) ~= "number") then
Dialog.Message("Error", "Please enter numbers");
return nil -- we're using nil to indicate an error condition
else
if Number1 >= Number2 then
return Number1;
else
return Number2;
end
end
end

Actions

AutoPlay Media Studio comes with a large number of built-in functions. In the program interface, these built-in functions are commonly referred to as actions. For scripting purposes, actions and functions are essentially the same; however, the term “actions” is generally reserved for those functions that are built into the program and are included in the alphabetical list of actions in the online help. When referring to functions that have been created by other users or yourself, the term “functions” is preferred.


Debugging Your Scripts

Scripting (or any kind of programming) is relatively easy once you get used to it. However, even the best programmers make mistakes, and need to iron the occasional wrinkle out of their code. Being good at debugging scripts will reduce the time to market for your projects and increase the amount of sleep you get at night. Please read this section for tips on using Auto Play Media Studio as smartly and effectively as possible!

This section will explain AutoPlay Media Studio’s error handling methods as well as cover a number of debugging techniques.

Error Handling

All of the built-in AutoPlay Media Studio actions use the same basic error handling techniques. However, this is not necessarily true of any third-party functions, modules, or scripts—even scripts developed by Indigo Rose Corporation that are not built into the product. Although these externally developed scripts can certainly make use of AutoPlay's error handling system, they may not necessarily do so. Therefore, you should always consult a script or module's author or documentation in order to find out how error handling is, well, handled.

There are two kinds of errors that you can have in your scripts when calling AutoPlay Media Studio actions: syntax errors, and functional errors.

Syntax Errors

Syntax errors occur when the syntax (or “grammar”) of a script is incorrect, or a function receives arguments that are not appropriate. Some syntax errors are caught by AutoPlay Media Studio when you build or preview your application.

For example, consider the following script:

foo =

This is incorrect because we have not assigned anything to the variable foo—the script is incomplete. This is a pretty obvious syntax error, and would be caught by the scripting engine at build time (when you build your project).

Another type of syntax error is when you do not pass the correct type or number of arguments to a function. For example, if you try and run this script:

Dialog.Message("Hi There");

...the project will build fine, because there are no obvious syntax errors in the script. As far as the scripting engine can tell, the function call is well formed. The name is valid, the open and closed parentheses match, the quotes are in the right places, and there’s even a terminating semi-colon at the end. Looks good!

However, at run time you would see something like the following:

Looks like it wasn’t so good after all. Note that the message says two arguments are required for the Dialog.Message function. Ah. Our script only provided one argument.

According to the function prototype for Dialog.Message, it looks like the function can actually accept up to five arguments:

Looking closely at the function prototype, we see that the last three arguments have default values which will be used if those arguments are omitted from the function call. The first two arguments—Title and Text—don’t have default values, so they cannot be omitted without generating an error. To make a long story short, it’s okay to call the Dialog.Message action with anywhere from 2 to 5 arguments...but 1 argument isn’t enough.

Fortunately, syntax errors like these are usually caught at build time or when you test your application. The error messages are usually quite clear, making it easy for you to locate and identify the problem.

Functional Errors

Functional errors are those that occur because the functionality of the action itself fails. They occur when an action is given incorrect information, such as the path to a file that doesn’t exist. For example, the following code will produce a functional error:

filecontents = TextFile.ReadToString("this_file_don't exist.txt");

If you put that script into an event right now and try it, you will see that nothing appears to happen. This is because AutoPlay Media Studio’s functional errors are not automatically displayed the way syntax errors are. We leave it up to you to handle (or to not handle) such functional errors yourself.

The reason for this is that there may be times when you don’t care if a function fails. In fact, you may expect it to. For example, the following code tries to remove a folder called C:\My Temp Folder:

Folder.Delete("C:\\My Temp Folder");

However, in this case you don’t care if it really gets deleted, or if the folder didn’t exist in the first place. You just want to make sure that if that particular folder exists, it will be removed. If the folder isn’t there, the Folder.Delete action causes a functional error, because it can’t find the folder you told it to delete...but since the end result is exactly what you wanted, you don’t need to do anything about it. And you certainly don’t want the user to see any error messages.

Conversely, there may be times when it is very important for you to know if an action fails. Say for instance that you want to copy a very important file:

File.Copy("C:\\Temp\\My File.dat","C:\\Temp\\My File.bak");

In this case, you really want to know if it fails and may even want to exit the program or inform the user. This is where the Debug actions come in handy. Read on.

Debug Actions

AutoPlay Media Studio comes with some very useful functions for debugging your applications. This section will look at a number of them.

Application.GetLastError

This is the most important action to use when trying to find out if a problem has occurred. At run time there is always an internal value that stores the status of the last action that was executed. At the start of an action, this value is set to 0 (the number zero). This means that everything is OK. If a functional error occurs inside the action, the value is changed to some non-zero value instead.

This last error value can be accessed at any time by using the Application.GetLastError action.

The syntax is:

last_error_code = Application.GetLastError();

Here is an example that uses this action:

File.Copy("C:\\Temp\\My File.dat","C:\\Temp\\My File.bak");

error_code = Application.GetLastError();
if (error_code ~= 0) then
-- some kind of error has occurred!
Dialog.Message("Error", "File copy error: "..error_code);
Application.Exit();
end

The above script will inform the user that an error occurred and then exit the application. This is not necessarily how all errors should be handled, but it illustrates the point. You can do anything you want when an error occurs, like calling a different function or anything else you can dream up.

The above script has one possible problem. Imagine the user seeing a message like this:

It would be much nicer to actually tell them some information about the exact problem. Well, you are in luck! At run time there is a table called _tblErrorMessages that contains all of the possible error messages, indexed by the error codes. You can easily use the last error number to get an actual error message that will make more sense to the user than a number like “1182.”

For example, here is a modified script to show the actual error string:

File.Copy("C:\\Temp\\My File.dat","C:\\Temp\\My File.bak");

error_code = Application.GetLastError();
if (error_code ~= 0) then
-- some kind of error has occurred!
Dialog.Message("Error", "File copy error: " ..
_tblErrorMessages[error_code]);
Application.Exit();
end

Now the script will produce the following error message:

Much better information!

Just remember that the value of the last error gets reset every time an action is executed. For example, the following script would not produce an error message:

File.Copy("C:\\Temp\\My File.dat","C:\\Temp\\My File.bak");

-- At this point Application.GetLastError() could be non-zero, but...

Dialog.Message("Hi There","Hello World");

-- Oops, now the last error number will be for the Dialog.Message action,
-- and not the File.Copy action. The Dialog.Message action will reset the
-- last error number to 0, and the following lines will not catch any
-- error that happened in the File.Copy action.

error_code = Application.GetLastError();

if (error_code ~= 0) then
-- some kind of error has occurred!
Dialog.Message("Error",
"File copy error: "..
_tblErrorMessages[error_code]);
Application.Exit();
end

Debug.ShowWindow

The AutoPlay Media Studio runtime has the ability to show a debug window that can be used to display debug messages. This window exists throughout the execution of your application, but is only visible when you tell it to be.

The syntax is:

Debug.ShowWindow(show_window);

...where show_window is a Boolean value. If true, the debug window is displayed, if false, the window is hidden. For example:

-- show the debug window
Debug.ShowWindow(true);

If you call this script, the debug window will appear on top of your application, but nothing else will really happen. That’s where the following Debug actions come in.

Debug.Print

This action prints the text of your choosing in the debug window. For example, try the following script:

Debug.ShowWindow(true);

for i = 1, 10 do
Debug.Print("i = " .. i .. "\r\n");
end

The “\r\n” part is actually two escape sequences that are being used to start a new line. (This is technically called a “carriage return/linefeed” pair.) You can use \r\n in the debug window whenever you want to insert a new line.

The above script will produce the following output in the debug window:

You can use this method to print all kinds of information to the debug window. Some typical uses are to print the contents of a variable so you can see what it contains at run time, or to print your own debug messages like “inside outer for loop” or “foo() function started.” Such messages form a trail like bread crumbs that you can trace in order to understand what’s happening behind the scenes in your project. They can be invaluable when trying to debug your scripts or test your latest algorithm.

Debug.SetTraceMode

AutoPlay Media Studio can run in a special “trace” mode at run time that will print information about every line of script that gets executed to the debug window, including the value of Application.GetLastError() if the line involves calling a built-in action. You can turn this trace mode on or off by using the Debug.SetTraceMode action:

Debug.SetTraceMode(turn_on);

...where turn_on is a Boolean value that tells the program whether to turn the trace mode on or off.

Here is an example:

Debug.ShowWindow(true);
Debug.SetTraceMode(true);

for i = 1, 3 do
Dialog.Message("Number", i);
end

File.Copy("C:\\fake_file.ext", "C:\\fake_file.bak");

Running that script will produce the following output in the debug window:

Notice that every line produced by the trace mode starts with “TRACE:” This is so you can tell them apart from any lines you send to the debug window with Debug.Print. The number after the “TRACE:” part is the line number that is currently being executed in the script.

Turning trace mode on is something that you will not likely want to do in your final, distributable application, but it can really help find problems during development. In fact, there is an option in the AutoPlay Media Studio build preferences that allows you to automatically turn on trace mode every time you preview. (Choose Tools > Preferences and click on the Build category. In the Preview section, turn on the option called “Show Debug Window.”) However, even with this option enabled, trace mode will not be turned on in the version that gets built when you publish your project, unless you specifically turn it on in your script.

Debug.GetEventContext

This action is used to get a descriptive string about the event that is currently being executed. This can be useful if you define a function in one place but call it somewhere else, and you want to be able to tell where the function is being called from at any given time. For example, if you execute this script from a button’s On Click event on Page1:

Dialog.Message("Event Context", Debug.GetEventContext());

...you will see something like this:

Dialog.Message

This brings us to good ole’ Dialog.Message. You have seen this action used throughout this document, and for good reason. This is a great action to use throughout your code when you are trying to track down a problem.


Final Thoughts

Hopefully this document has helped you to understand scripting in AutoPlay Media Studio. Once you get the hang of it, it is a really fun, powerful way to get things done.

Other Resources

Here is a list of other places that you can go for help with scripting in AutoPlay Media Studio.

Help File

The AutoPlay Media Studio help file is packed with good reference material for all of the actions and events supported by AutoPlay Media Studio, and for the design environment itself. You can access the help file at any time by choosing Help > AutoPlay Media Studio Help from the menu.

Another useful tip: if you are in the script editor and you want to learn more about an action, simply click on the action and hit the F1 key on your keyboard.

User’s Guide

The user’s guide is a fantastic way to get started with AutoPlay Media Studio. It is written in an easy-to-follow tutorial format, teaching you about events, actions and scripts. You’ll be off and running in no time! The user's guide is part of the help file, which can also be accessed by choosing Help > AutoPlay Media Studio User's Guide from the menu.

AutoPlay Media Studio Web Site

The AutoPlay Media Studio Web site is located at http://www.indigorose.com. Be sure to check out the user forums where you can read questions and answers by fellow users and Indigo Rose staff as well as ask questions of your own.

A quick way to access the online forums is to choose Help > User Forums from the menu.

Indigo Rose Technical Support

If you need help with any scripting concepts or have a mental block to push through, feel free to visit http://www.indigorose.com for available support options. Although we can't write scripts for you or debug your specific scripts, we will be happy to answer any general scripting questions that you have.

The Lua Web Site

AutoPlay’s scripting engine is based on a popular scripting language called Lua. Lua is designed and implemented by a team at Tecgraf, the Computer Graphics Technology Group of PUC-Rio (the Pontifical Catholic University of Rio de Janeiro in Brazil). You can learn more about Lua and its history at the official Lua web site:

http://www.lua.org

This is also where you can find the latest documentation on the Lua language, along with tutorials and a really friendly community of Lua developers.

Note that there may be other built-in functions that exist in Lua and in AutoPlay Media Studio that are not officially supported in AutoPlay. These functions, if any, are documented in the Lua 5.1 Reference Manual.

Only the functions listed in the online help are supported by Indigo Rose Software. Any other “undocumented” functions that you may find in the Lua documentation are not supported. Although these functions may work, you must use them entirely on your own.


Welcome!

Introduction

AutoPlay Media Studio is the state of the art in CD-autoplay multimedia tools. With its intuitive workflow and drag-and-drop objects, even absolute beginners can quickly achieve impressive results. But despite its world-renown ease of use, AutoPlay Media Studio is a serious development tool. In fact, it's used by thousands of people to create everything from AutoRun/AutoPlay menus and CD business cards, to fully interactive training applications. With AutoPlay, your imagination is your only limit!

What Can I Create With AutoPlay Media Studio?

Quite simply, AutoPlay Media Studio helps you make professional multimedia software. While the product excels at certain tasks like making front-end browsers for CD-ROMs (i.e. AutoRun/AutoPlay menus), that's just the beginning.

Integrating diverse media types such as images, sounds, videos, text, and flash into a single cohesive presentation is what AutoPlay Media Studio does best. In fact, it has been trusted to deliver rock-solid multimedia experiences to millions of people around the world. Users just like you have chosen AutoPlay Media Studio for:

• Multimedia Authoring & Application Development

• Computer Based Training (CBT) Applications

• CD-ROM AutoPlay/AutoRun Menu Systems

• Interactive Marketing Presentations

• CD Business Cards

• Much more

Intuitive Drag and Drop Design

AutoPlay Media Studio has always been known for its easy-to-use visual design environment. Simply drop high-level, interactive objects (images, video, text etc.) onto pages to create instant functionality. Move them into position using your mouse or with the aid of an extensive assortment of alignment tools and grids. Once you've got your interface down, it's a snap to attach powerful actions to various events such as mouse clicks and key presses. Whether it’s opening a PDF file, playing a video or showing a web site, the Action wizard makes it easy to choose from the over 865 built-in functions.

About This Guide

This user's guide is intended to walk you through building a sample project: a CD business card for a fictional real estate agent named Ted Sellers. You'll learn the ins and outs of the program interface, and how to perform many common tasks.

The guide is organized into 10 lessons:

Lesson 1: Getting Started
Lesson 2 : Graphics and Text
Lesson 3: Working with Multiple Objects
Lesson 4: Buttons, Actions and Pages
Lesson 5: Status Text
Lesson 6: Scrolling Text
Lesson 7: Video
Lesson 8: Audio
Lesson 9: Publishing
Lesson 10: Scripting Basics

Each lesson begins with a brief overview and a list of the things you will learn in that lesson. The lessons are divided into a number of exercises, which are broken down into individual steps. Each step appears in bolded text, with a number beside it so you don't lose your place. Additional information or explanation for each step is included in the non-bolded text that follows it.

Document Conventions

This user’s guide follows some simple rules for presenting information such as keyboard shortcuts and menu commands.

Keyboard Shortcuts

Keyboard shortcuts are described like this: press Ctrl+V. The "+" means to hold the Ctrl key down while you press the V key.

Menu Commands

Menu commands are described like this: choose File > Open. This means to click on the File menu at the top of the AutoPlay program window, and then click on the Open command in the list that appears.

“File > Open” means click on the File menu, then click on the Open command

Typed-In Text

When you're meant to type something into a text field, it will be presented in italics, like this: type "AutoPlay makes me happy" into the Message setting. This means to type in "AutoPlay makes me happy", including the quotes.

AutoPlay = AutoPlay Media Studio

Throughout this user's guide, the name "AutoPlay" has been used as a short form of "AutoPlay Media Studio." Whenever I refer to "AutoPlay," I'm referring to the actual product.


Lesson 1:

Lesson 1: Getting Started

Every journey begins with a first step. In this lesson, I'll walk you through the creation of a new project, and introduce you to the AutoPlay program interface.

What You'll Learn

In this lesson, you'll learn how to:

• Create a new project

• Make sure you have the latest version of AutoPlay Media Studio

• Recognize the different parts of the program interface

• Customize the workspace

• Load a pre-configured workspace layout

• Take advantage of self-help resources

• Change the project's window title

• Set the page size for the project

How Long Will It Take?

This lesson takes approximately
20 minutes to do.

Starting the Lesson

Since this is the first lesson, there isn't anything you need to do before you get started. So let's dive right in and start learning AutoPlay!

Starting a New Project

Everything has to start somewhere, and in AutoPlay, the design process starts with the creation of a new project.

A project is just the collection of files and settings and everything else that makes up an AutoPlay application. A typical project will consist of several pages, with different objects on each page. Each page, and each object on it, has individual settings that you can edit and adjust to make the application do what you want it to. These settings are all stored in a single file, called the project file.

This file, along with any images, videos, or other files that you add to your project, are collected inside a special folder called the project folder. The project folder contains everything that belongs to the project, including the project file. Each project has its own project folder, which serves as a container for the project.

Throughout this tutorial, you'll be working on a single project. This project will start out simple and then gradually become a fully working example as you learn more of AutoPlay's advanced features.

But before you can start adding cool things to your application, you need a project to work on. So let's open the AutoPlay Media Studio program and start a new blank project.

1) Open AutoPlay.

Use the Start menu to launch the AutoPlay Media Studio program.

Start > All Programs > Indigo Rose Corporation > AutoPlay Media Studio 8

2) When the Welcome dialog appears, click on "Create a New Project."

The Welcome dialog appears whenever you run AutoPlay Media Studio.

It easily lets you create a new project, open an existing one, or restore the last project that you worked on. (Restoring the last project automatically opens the project you had open the last time you ran AutoPlay.)

When you click on "Create a New Project," the Welcome dialog closes and the Create New Project dialog appears.

3) Explore the Create New Project dialog.

The Create New Project dialog lets you name your project and choose what kind of project you'd like to start.

At the top of the Create New Project dialog, there is a scrollable list with a bunch of thumbnail images on it. Each thumbnail image represents a different project template. A project template is a ready-made "starter project" that you can use to get your own project off the ground. As you can see, the project templates come in many different styles and themes.

4) Change the project name to Tutorial.

You want to replace the default text "My Project" with the correct name for this project, so highlight all of the text in the Name your project field and type Tutorial.

This will be the name of the project folder, which is the folder that will be used to keep all of the project's files together, and of the project file, which is the file that contains all of the settings and options that make up your project. (This is the file that you will "open" whenever you want to load this project into AutoPlay.)

Every project needs a name, and that name has to be unique. You can't give two projects the same name (and in fact AutoPlay won't let you).

6) Click on the thumbnail for the Blank Project template.

You'll be starting the tutorial project from scratch, so select the Blank Project template.

Note: To select a template, just click on its thumbnail.

7) Click the "OK" button.

When you click OK, the Create New Project dialog closes, AutoPlay sets up the project folder and project file with the name you chose, and the project is loaded into the design environment.

Note: The AutoPlay Media Studio program interface is also known as the design environment.

Since you selected the Blank Project template, your project consists of a single blank page, with no objects on it or anything. A clean slate for you to build on!

Tip: Once you’re in the design environment, you can start a new project by choosing File > New.

8) Maximize the AutoPlay program window.

The easiest way to work with AutoPlay is with the program window maximized so it covers the whole screen. This way, you have the whole desktop area to work with, and you won't have any other programs or windows in the background to distract you.

To maximize the window, click on the little Maximize button, which is the second button from the right on the AutoPlay title bar (right next to the Close button).

If the maximize button looks like this:

...then you already have the program window maximized. (That button is actually the Restore button, which takes the place of the Maximize button while the window is maximized. If you click the Restore button, the window will return to the size and position it had before you maximized it.)

Making Sure You Have the Latest Version

AutoPlay has the built-in ability to check the Internet to see if there is an update available and the status of your maintenance subscription. Before we start exploring the program interface, let's use this feature to make sure you have the latest version of the program.

1) Choose Help > Check for Update.

The TrueUpdate wizard will open. TrueUpdate is an Internet update technology developed by Indigo Rose Software that makes it easy to add automatic updating capabilities to any piece of software.

2) Click Next to see if there is an update and your maintenance subscription status.

When you click Next, the TrueUpdate wizard will connect to the Indigo Rose website and determine whether a newer version of AutoPlay is available for you to download and the status of your maintenance subscription.

Note: If you are running any Internet firewall software such as ZoneAlarm, it may ask you whether to permit the TrueUpdate Client to connect. You will need to allow the client to connect in order for the update to work.

3) Click Finish to exit.

Click Finish to exit the TrueUpdate wizard.

Learning the Interface

Now that you have AutoPlay started and you've made sure that you're using the latest version, it's time to get comfortable with the program interface itself.

1) Explore the AutoPlay program window.

The AutoPlay program window is divided into a number of different parts.

At the top of the window, just under the title bar, is the program menu. You can click on this program menu to access various commands, settings and tools.

Below the program menu are a number of toolbars. The buttons on these toolbars give you easy access to many of the commands that are available in the program menu.

Tip: You can create your own custom toolbars or edit the existing ones by choosing Tools > Customize.

In the middle of the program window, the surface of the current page is visible in the work area, measured in pixels by a pair of rulers.

At the very bottom of the window, a status bar reflects your interaction with the program and offers a number of informative readouts.

The rest of the program window is made up of individual sub-windows known as panes. Each pane can be docked, tabbed, pinned, resized, dragged, and even made to float on top of the design environment.

Tip: To show/hide panes, use the View menu (View > Panes).

One very useful pane is the properties pane. By default, it's located to the left of the work area, along the left side of the screen. This is where you can see and edit the settings for the currently selected object or page.

The settings on the properties pane are organized into categories. You can expand or collapse these categories by double-clicking on the category heading, or by clicking on the little + or - symbols that appear in the column to the left.

Properties pane

2) Close the properties pane.

You can close a pane by clicking on the little x on its title bar.

3) Choose View > Panes > Properties to open the properties pane again.

All of the panes can be toggled on or off in the View menu. When you choose View > Panes > Properties, the properties pane is restored to the same position it occupied before you closed it.

4) Make the properties pane smaller by dragging its top edge down.

You can resize the panes by dragging their edges. In this case, you want to drag the part "between" the two panes...the little bit of pane above the properties pane and below the project explorer pane. As you begin to drag the edge of a pane, a line will appear to show where the edge will move to when you release the mouse button.

Resizing the properties pane

When panes are docked alongside each other, dragging an edge will resize both panes at the same time—making one taller and the other shorter, for instance. As a matter of fact, when you make the properties pane smaller, you will be making the project pane taller at the same time.

5) Move some of the panes around. Try moving panes to the edge of the screen to dock them, or drag them on top of other panes to combine them in different ways.

You can move panes around by dragging them by their title bars. As you move a pane, an outline shows you the general area where the pane will end up. If you drag the pane near the edge of the screen, or near another pane, the outline will "snap" to show you how the pane can be docked, tabbed, or otherwise combined with the target area.

Docking a pane

Note that when panes are tabbed, dragging the title bar moves all of the tabbed panes at once. You can "tear" a tab away by dragging it away from the others. You can also reorder the tabs by dragging them left and right.

Tip: When you're dragging panes, it's the position of the mouse cursor that determines how the pane's outline snaps into place. For example, to dock a pane below another one, drag the pane so the cursor is near the bottom edge of that pane. To "tab" one pane with another, drag the pane so the cursor is on top of the other pane's title bar.

Docked panes can also be "pinned" or "unpinned." Pinned panes remain open when you're not using them. (All of the panes in the default layout are pinned.) Unpinned panes stay out of the way until you click on them or hover the mouse over them. Whenever you need them they "slide" open, on top of everything else, and then slide closed when you’re done.

Pinned and unpinned panes

You can pin or unpin a pane by clicking the little pin icon on the pane's title bar.

Pinned Unpinned

Panes remember their positions even after you unpin them. If you unpin a pane, and then pin it again, it will return to the position it had before it was unpinned.

Note: Tabbed panes are pinned or unpinned together. If you unpin a pane that is tabbed, all of the other panes that are tabbed with it are unpinned too.

6) Choose View > Layouts >AutoPlay Menu Studio 7.0.

AutoPlay comes with a number of pre-configured workspace layouts that you can access from the View menu. The "AutoPlay Menu Studio 7.0" models the design environment after one of AutoPlay's predecessors.

Tip: You can create your own workspace layouts by arranging the panes to your liking and then choosing View > Panes > Save Layout. Any layouts you save are added to the list in the View menu, and can be selected just like any of the pre-configured layouts.

7) Choose View > Layouts > Restore Default.

This returns the design environment to the default workspace layout, which is the one you will use throughout this tutorial.

Tip: Feel free to make the properties pane a bit wider by dragging their inside edges towards the page surface a little.

8) Choose View > Grid to turn the grid on.

A layout grid appears on the page surface. This grid can be helpful when you want to line up objects visually on the page.

Tip: You can make objects "snap" to the grid as you move them by choosing View > Snap to Grid.

9) Choose View > Grid to turn the grid off.

Choosing View > Grid again toggles the grid back off.

Getting Help

If you still have any questions after you complete all the lessons in this user's guide, there are many self-help resources at your disposal.

Here are some tips on how to quickly access these self-help resources.

1) Press the F1 key.

The online help is only a key press away! AutoPlay Media Studio comes with an extensive online program reference with information on every object, action, and feature in the program.

In fact, whenever possible, pressing F1 will actually bring you directly to the appropriate topic in the online help. This context-sensitive help is an excellent way to answer any questions you may have about a specific dialog or object.

Note: You can also access the online help system by choosing Help > AutoPlay Media Studio Help.

There are three ways to navigate the online help system: you can find the appropriate topic using the table of contents, or with the help of the keyword index, or by searching through the entire help system for a specific word or phrase.

2) Close the online help window and return to the AutoPlay design environment.

To exit from the online help, just click the Close button on the help window's title bar.

3) Choose Help > User Forums.

AutoPlay Media Studio is used by thousands of users worldwide, many of whom enjoy sharing ideas and tips with other users. The online forums can be an excellent resource when you need help with a project or run into a problem that other users may have encountered.

Choosing Help > User Forums opens your default web browser directly to the online user forums at the Indigo Rose website.

4) Close your web browser and return to the AutoPlay design environment.

Exit from your web browser and switch back to the AutoPlay Media Studio program.

Alternatively, you can press Alt+Tab to switch back to AutoPlay while leaving the web browser open in the background.

5) Choose Help > Technical Support.

This takes you to the Indigo Rose support web site, where a variety of online technical support resources are available to you, including a large knowledge base with answers to some common questions.

This is also where you can find information about the support and maintenance plans.

6) Close your web browser and return to the AutoPlay design environment.

When you're done browsing the technical support information, return to the AutoPlay design environment to continue with the lesson.

Setting Preferences

There are a number of preferences that you can configure to adjust the AutoPlay design environment to suit your work style. Let's have a look at some of them.

1) Choose Edit > Preferences.

This will open the Preferences dialog, where all of AutoPlay's preferences can be found.

Build preferences

The preferences are arranged into categories. The categories are listed on the left side of the dialog. When you click on a category, the corresponding preferences appear on the right side of the dialog.

Tip: If this is the first time you've opened the Preferences dialog, the Build category will already be selected. One of the Preview options in this category is worth noting. The Show debug window option allows you to display debug information in a separate window whenever you preview the project. Turning this option on can help you see what's going on "under the hood" during a preview, which can be helpful if you run into any problems while you're testing your project.

2) Click on the Environment category.

The Environment preferences allow you to change the way the design environment looks. For example, you can change the colors that are used when objects are selected, or change the background color of the entire work area. You can even change the color of the "shadow" that appears behind the page surface (or turn it off completely).

Environment preferences

Tip: Turning off the page shadow can make it easier to visually line objects up with the bottom and right edges of the page.

3) Expand the Environment category by double-clicking on it, and then click on the Project Size category.

You can also expand the Environment category by clicking on the little plus symbol to the left of it.

Project Size preferences

The Project Size preferences are where you can set the target media size, which determines the scale of the meter on the Project Size pane.

Project Size pane

If you set this target media size to match the size of the media you're using, you'll have a visual indicator of how much space is left in your project as the project grows in size.

Note that this preference doesn't affect the project in any way; the target media size only affects the size meter on the Project Size pane. It also doesn't matter how big the disc in your burner is…if you want the size meter to match the size of the media you're using, you'll need to change the target media size manually whenever you switch from one media size to another.

4) Feel free to explore some of the other categories. When you’re done, click OK to close the Preferences dialog.

There are many other preferences that you can set, such as the number of undo levels for the program (in the Document category) and what happens when you drag a file onto the page (in the Drag and Drop category). Take some time to look through the categories and familiarize yourself with the different options that are available.

Remember that you can click Help or press F1 to get more information about any of the settings in a specific category.

Modifying the Project Settings

The project settings affect the appearance and behavior of your application at run time.

Note: Each project has a number of settings that can be configured on a per-project basis. These project-wide settings can be accessed from the Project menu.

1) Choose Project > Settings.

This opens the Project Settings dialog.

Project Settings dialog

2) Change the Window Title to Ted Sellers - An Agent You Can Trust.

By default, the window title is the same as the name of the project. This project is going to be a CD business card for a (fake) real estate agent named Ted Sellers, so let's make the title something more appropriate.

To change the window title, replace the text in the Window Title field with Ted Sellers - An Agent You Can Trust.

Note: This text will appear in the application’s title bar when the user runs your application.

3) Make sure the page size is set to "Medium."

Setting the page size to "Medium" sets the Width and Height settings to 630 and 425, respectively. This is a good "safe" size for an application, since it will fit on every common Windows screen resolution from 640x480 and up.

Note: This sets the width and height for all of the pages in your project.

4) Click OK to close the Project Settings dialog.

The rest of the settings are fine, so click OK to close the Project Settings dialog and return to the main program window.

5) Choose Publish > Preview.

AutoPlay's preview feature lets you take a "sneak peek" at your application, without actually building or burning the project. At this point, there isn't much to see, since the project still consists of a single blank page. But the text you entered for the window title does appear in the title bar, and if you could measure the page, you'd find that it is indeed 630 pixels wide by 425 pixels tall.

6) Click the Close button on the title bar to exit the preview.

When you exit the preview, you're returned to the AutoPlay program window.

7) Choose File > Save.

When you save the project, all of the changes that you've made to it are stored in the project file. You can open that project file at any time to continue working on the project.

Lesson 1 Summary

In this lesson, you learned how to:

• Create a new project

• Make sure you have the latest version of AutoPlay Media Studio

• Recognize the different parts of the program interface

• Customize the workspace

• Load a pre-configured workspace layout

• Take advantage of self-help resources

• Change the project's window title

• Set the page size for the project


Lesson 2:

Lesson 2: Graphics and Text

This lesson will introduce you to objects, the basic building blocks that make every AutoPlay application unique. The two easiest objects to use are images and labels. Together, they let you populate your project with graphics and text. Although they're simple to use, they allow you to do some very advanced things, and by the end of this lesson, you'll be well on your way to manipulating these objects like a pro.

Most of the skills you'll learn in this lesson can be applied to all of the objects you'll use in AutoPlay, so pay attention, this is very useful information. For instance, all of the objects in AutoPlay can be resized and repositioned freely, and in this lesson you'll learn how to do that. You'll also learn how to rename objects, and how to quickly create a clone of an existing object by duplicating it...a real time saver that you'll find yourself using time and time again.

What You'll Learn

In this lesson, you'll learn how to:

  • Change the page background

  • Add an image object

  • Resize objects

  • Add label objects

  • Duplicate objects

  • Change the text in a label object

  • Rename objects

  • Use custom font settings

  • Use different text colors

  • Copy a color from one object to another

  • Match an objects normal, highlight and click colors

  • Save the project

  • Preview the project

How Long Will It Take?

This lesson takes approximately 45 minutes to do.

Starting the Lesson

If you're continuing from Lesson 1, you should still have AutoPlay running with the Tutorial project open. If so, you're ready to move on to the next exercise: Choosing a Page Background.

Otherwise, you'll need to open the project file that you saved at the end of Lesson 1.

1) Open the Tutorial.autoplay file that you saved in Lesson 1.

When you save a project, AutoPlay automatically creates a project folder for it inside your My Documents\AutoPlay Media Studio 8\Projects folder. This project folder is where everything that belongs to the project is stored, including the project file, which contains all of the settings used in the project.

The project folder and the project file always have the same name that you gave to the project when it was created. The project files name ends with a .autoplay file extension.

Since you named this project Tutorial in Lesson 1, the name of the project folder will be Tutorial, and the name of the project file will be Tutorial.autoplay. So, the path to the project file should be something like:

...\My Documents\AutoPlay Media Studio 8\Projects\Tutorial\Tutorial.autoplay

To open the project, you just need to open that project file.

Choosing a Page Background

Each project is made up of one or more pages. A page in AutoPlay is very much like a page in a book. Just like in a book, each page can have different items on it, such as different photographs and text.

Of course, in AutoPlay, theres a lot more that you can put on a page, from text and graphics to interactive buttons and full-motion video. (You'll see the different kinds of objects you can put on a page as you go through the lessons in this users guide.) But for now, lets just focus on the page surface itself.

1) Click on the page surface.

The page surface is shown in the middle of the work area. (Its the big white rectangle.)

When you click on the page surface, the pages settings are displayed in the properties pane.

The properties pane

In the properties pane, you can see that this page is named Page1, and that its background style is set to Solid.

Tip: You can click on the page surface at any time to select the page and see its settings in the properties pane.

Since a big white rectangle is a bit boring for this project, lets make the page more interesting to look at.

2) In the properties pane, set UseCustomSettings to true.

The surface of the page is also called the page background. When you start a blank project, it has a single, blank page, and the background is the default background color for windows applications. By default the UseCustomSettings value is false. Click the dropdown and select true so we can customize the page's background settings.

3) In the properties pane, set the Background Color to Pale Blue (#99CCFF).

To set the background color to Pale Blue, click on the BackgroundColor setting in the properties pane, and then click the select button to bring up a color chooser.

Click the Select button to choose a background color

On the color chooser, hold your mouse over one of the color squares until the name of the color appears. (If you hold your mouse over a color square for a second or two, the name of the color will appear in a tooltip.) Now move your mouse around and look at the names of the other colors. Try to find the color named Pale Blue. (It should be the third color from the right on the bottom row.) Click on the color named Pale Blue to make it the new background color.

You can also set the color by editing the hexadecimal value directly. A quick way to do this is to double-click on the name of the text field (in this case, the BackgroundColor part itself), type in #99ccff and press Enter.

Note: Double-clicking on the name of a text field automatically highlights all of the text in the field for you. Whenever text is highlighted, anything you type instantly replaces the highlighted text.

Tip: When typing in hexadecimal color values, you don't have to use capital letters. AutoPlay will automatically capitalize the letters for you.

Hexadecimal...?

Hexadecimal color values aren't as complicated as they look. They're just a compact way of describing colors.

Each color is made up of three values: one for the amount of red in the color, one for the amount of green, and one for the amount of blue. (Computers make different colors by mixing red, green and blue light together on the screen.)

If you've used any graphics tools like PhotoShop (or even MS Paint, for that matter), you're probably used to setting the RGB value for a color using numbers between 0 and 255. The hexadecimal color #99CCFF is just a compact way of saying: set Red to 153, Green to 204, and Blue to 255.

Each pair of digits in the color represents either red, green or blue, in this pattern: #RRGGBB. (Two digits for red, then two digits for green, and then two digits for blue.) So what do the letters like FF and CC mean? Well, that's just hexadecimal, which is a compact way of writing numbers. Hexadecimal (or hex for short) extends the regular decimal numbers (0-9) with six extra digits (A-F). So, if you were counting to 18 in hexadecimal, you would go: 0...9, A, B, C, D, E, F, 10,11,12. Understanding hexadecimal is a bit technical, but all you need to know to make hexadecimal color values is that letters are bigger than numbers. (A0 is bigger than 99, DB is bigger than D7, etc.) In #RRGGBB notation, bigger values mean more of that color. FF is the biggest value you can have, so #FF0000 means 100% red, 0% green, 0% blue. #FFFFFF is white (100% red, green and blue), and #000000 is black (no red, green or blue light at all).

As for the number sign (#) in front, it simply indicates that hexadecimal numbers are being used, kind of like how a dollar sign ($) lets you know that $5.24 means five dollars and 24 cents.

4) Change the background style from Solid Color to Gradient, and set the gradient color to Tan (#FFCC99).

To change the pages background style, click on the BackgroundStyle setting in the properties pane, then click the select button and choose Gradient from the list.

To change the gradient color, click on the GradientColor setting, and then click the select button to bring up the color chooser. Find the color square named Tanit should be the second color from the left on the bottom row and click on it.

The page background should now be a gradient between the background color at the top (Pale Blue), and the gradient color at the bottom (Tan). A gradient is just a smooth blend from one color to another. So, the page surface blends smoothly from Pale Blue at the top, to Tan at the bottom. (I like to call this Desert Sunrise.)

Using a gradient is an easy way to create a simple, attractive background for the page.

5) Change the background style from Gradient to Image.

Setting the background style to Image lets you specify an image for the page background. This does exactly what it sounds like: the image is stretched over the page surface, and any objects that you put on the page will appear on top of the image. (Well select a background image in a moment.)

Note that the background color changes from a gradient to a single color, specifically the BackgroundColor setting. This is the color that any uncovered parts of the page will have if the image style is set to Actual size and the image is smaller than page.

6) Click on the BackgroundImage setting, and then click the browse button. When the Select File dialog opens, click the Gallery button.

Selecting an image is done using the Select File dialog. To open the Select File dialog, click on the BackgroundImage setting, and then click the browse button.

When you click this button, a Select File dialog opens so you can browse for a file. Clicking the Gallery button on the left side of this dialog gives you access to the complete library of files that came with AutoPlay.

Click the Gallery button

Note: There are five buttons on the left side of the Select File dialog: My Pictures, Gallery, My Project, My Documents, and My Computer. The My Project button is for files that you've already added to your project; the Gallery button is where you'll find the files that came with AutoPlay; and the other three buttons let you bring in files from other locations on your computer.

7) Try navigating in the Select File dialog. When you find an image that you like, click OK to select it as the background image.

Because AutoPlay knows that you're looking for a page background, when you click the Gallery button on the Select File dialog, it automatically takes you inside the Backgrounds folder.

Although you will find many nice backgrounds in that folder, you can navigate to another folder in the Select File dialog if you want.

Navigating in the Select File dialog is just like browsing for files in Windows. To move back up or out of a folder, click the move up button at the top of the dialog.

The Move Up button

If you moved up to the parent Images folder, you would see the Backgrounds folder, along with two other folders in the AutoPlay image gallery.

The Backgrounds folder and its siblings as seen from their parent folder

To reach the files in the Backgrounds folder again, just double-click on it. When you double-click on a folder, you essentially go into that folder, revealing the folders contents (which can include files or even other folders).

As you can see, the gallery is full of useful images, including several high-quality abstract images that make excellent backgrounds. (Which is great for those of us whose artistic talent goes about as far as Desert Sunrise.)

Once you find an image that you like, click OK to select it as the background image. The Select File dialog will close, and the image will appear on the page as the background.

Note: The image you select automatically gets copied to your projects Images folder.

8) Choose View > Panes > Gallery Browser, and then choose View > Panes > Resource Preview.

In the default window layout, the Gallery and Preview panes are not displayed. To show the Gallery pane, choose View > Panes > Gallery Browser. (There will be a check mark next to Gallery Browser in the View > Panes submenu when the Gallery pane is visible.) Next, make the Preview pane visible by choosing View > Panes > Resource Preview.

9) Switch the Gallery pane to use the List view.

As in Windows folders, the gallery pane has a number of different views you can use to look at the files it contains. You can switch views by right-clicking on an empty spot within the pane, and choosing a different item from the View menu.

Different view options

Most of the screenshots throughout this users guide were taken using the List view. AutoPlay Media Studio uses the Thumbnail view by default.

Don't worry if your panes don't look like the ones in this users guide, you can switch to the List view everywhere if you'd like, but the other views provide the same basic functionality. Which view setting you use is entirely up to you.

10) On the Gallery pane, click on the Images button, and navigate into the Backgrounds folder.

The Gallery pane lets you browse the library of files that came with AutoPlay. This library is organized into different sections, each one accessible with a button at the top of the pane. Make sure you're viewing the Images section of the Gallery pane; if not, click on the Images button at the top to switch to it.

Click on the Images button at the top of the Gallery pane to browse for images

Navigating in the Gallery pane is just like navigating in the Select File dialog, or in Windows. To reach the files inside the Backgrounds folder, just double-click on it.

The Gallery pane gives you another convenient way to change the page background. Lets use it to change the background to a different image.

11) Locate the file named 630B1151.jpg, and drag it onto the page surface. When asked if you want to set it as your page background,
click Yes.

To make the 630B1151.jpg file the background image for the page, you can drag it from the Gallery pane onto the page surface.

Note: To drag the file, click on it with the mouse, and, keeping the left mouse button held down, move the mouse so the mouse pointer is over the page surface. (A little + symbol will appear next to the mouse pointer to show that you're dragging something.) When you let go of the left mouse button, the file will be dropped onto whatever is under the mouse pointer, in this case, the page surface.

Whenever you drag and drop an image that is larger than 75% of the page size, AutoPlay asks you if you want the image to be used as the page background. (An image that big would cover most of the page anyway.)

Click Yes to add the image as a page background

If you answer Yes, the pages Image setting will automatically be set to use that image as the background. (If you answer No, the image will be dropped onto the page as an image object.)

Tip: You can change the % size threshold and turn this feature on or off by choosing Edit > Preferences and adjusting the settings in the Drag and Drop category.

12) Double-click on the page surface to open the Page Properties dialog.

Another way to access page settings is by double-clicking on the page surface. Double-clicking on a page (or object) in AutoPlay opens a dialog with all of the settings on it.

The Page Properties dialog contains all of the settings that are available in the properties pane. As you can see, the changes that you made in the properties pane are reflected on the Page Properties dialog.

Page Properties dialog

Some people prefer double-clicking to make their changes, while others prefer to use the properties pane; the double-click dialogs are a bit easier to use in some cases, whereas the properties pane can be quicker at other times, such as when editing multiple objects at once. Feel free to use whichever method you prefer. (Most of us here at Indigo Rose use both.)

In this users guide, I've focused more on the properties pane, since as a relatively new interface it requires a bit more explanation...the double-click dialogs are more familiar to most users and should be self-explanatory.

13) Click Cancel to close the Page Properties dialog.

Clicking the Cancel button closes the dialog and cancels any changes you've made while it was open. (In this case you didn't make any changes, so it doesn't really matter whether you click Cancel or OK, but it doesn't hurt to be careful.)

Adding Image Objects

As nice as that background is, our project will be pretty boring if that's all there is to look at. Since a pictures worth a thousand words, lets start off by adding an image object to the page.

Image Object?

In AutoPlay, anything that you can place on the page is called an object. So, when you add an image to the page, we say that you're adding an image object. As you'll see in a moment, each object in AutoPlay has its own settings and properties, such as the objects width, height, and position on the page.

Take a photograph for example. On its own, its just an image of something. But in AutoPlay, the image takes on specific settings, for example, it might be the image at exactly 123 pixels wide by 300 pixels tall, positioned 200 pixels from the left edge of the page, and 100 pixels from the top. If you think of the image as the actual photograph itself, the object is the photograph along with all of its settings.

1) Choose Object > Image. In the Select File dialog, click the Gallery button, and select the "A-001.png" file and click OK.

Choosing Object > Image automatically brings up the Select File dialog so you can choose an image to display in the image object.

Tip: The Select File dialog automatically opens to the same folder you were in the last time you browsed for a particular type of file (such as an image, or a video).

Clicking the Gallery button takes you directly to the gallery folder that is most convenient for the type of file you are adding. In this case, because you're adding an image object, the Gallery button takes you to the Gallery\Images\Elements folder which is where the file you want to add is located.

The Gallery\Images\Elements folder

When you select the A-001.png file and click OK, that image file is copied into your project folders Images subfolder. The path to this newly copied file is what will appear in the File setting on the Image Properties dialog.

Note that the original file isn't referenced directly. When you select a file, AutoPlay makes a copy of it and puts the copy in the project folder, leaving the original untouched.

3) Click OK on the Select File dialog to finish adding the image object.

Once you click OK, the little pointed peak image is added to the page.

Note: When you add an object using the Object menu, the object is automatically positioned in the upper left corner of the page.

If you look closely, you'll see that the image is surrounded by a blue rectangle with a bunch of little white squares on it. This blue rectangle is the objects bounding box.

The bounding box appears whenever an object is selected. It shows you the actual size and position of the object. (As you can see, when you add a new image object, it gets selected for you automatically.)

Note: The bounding box is only visible at design time, when you're working on the project.

Another thing you'll notice when an object is selected is that its settings appear in the properties pane.

If you look in the properties pane, you can see that this object is named Image1, and the path to the image file is AutoPlay\Images\A-001.png.

Tip: If you cant see all of the text in a setting, hover the mouse over the setting for a moment and a tooltip will appear to reveal the entire contents.

Does the File path seem a bit odd to you?

You're probably used to seeing paths in Windows that start with a drive letter, like C:\Temp or D:\Program Files\Blah blah blah. So why doesn't this image object have that kind of path? Well, it's actually quite simple. Instead of showing you the full path, like you normally see in Windows, AutoPlay shows you only the part of the path that is relevant to the project. In this case, its the part of the path inside the projects CD_ROOT folder. This makes the path shorter and easier to read. This kind of partial path is what's known as a relative path.

Feel free to take a look at some of the other properties this image object has.

4) Click on the page surface to deselect the image object.

Clicking anywhere outside the selected objects bounding box deselects the object. Basically, it just selects something else, in this case, the page.

(You can tell that the page is selected because the page settings appear in the properties pane.)

5) Click on the image object to select it again.

When you select the image object, its bounding box reappears, and its settings appear in the properties pane again.

Note: To select an object, just click on it.

In addition, the objects current position and size are displayed on the status bar.

The numbers on the status bar indicate the current X,Y coordinates of the top left corner of the objects bounding box, and the current width and height of the objects bounding box, in pixels.

6) Drag the image object to the middle of the page.

Moving an object is easy: just use the mouse to drag it where you want.

Note: To drag an object, first position the mouse pointer over the object. Then, grab onto the object by pressing (and holding) the left mouse button. Keep holding the left mouse button down while you drag the object by moving the mouse.

As you start dragging the object, a dotted rectangle will appear...this rectangle represents the object, and allows you to see where the object will be placed when you release the mouse button. (The object doesn't actually move until the end of the drag operation.)

Once you've positioned the dotted rectangle where you want the object to go, let go of the object by releasing the mouse button. As soon as you release the mouse button, the object moves to its new position.

As you move the object, the position readout changes on the status bar.

The numbers indicate where the top left corner of the objects bounding box will be when you let go of the mouse button.

Tip: Heres a neat trick: try holding the ctrl and shift keys down (together) before you start moving the image object. When the ctrl and shift keys are held down, an object can only move vertically or horizontally, whichever direction the object is moved in first. So, if you hold Ctrl+Shift and then start moving an object to the right, the object will only move left or right until you let go of those keys. (The same goes for moving it up or down.)

Tip: You can also move objects around using the cursor keys. (Graphic artists commonly refer to this as nudging the object.) This can be helpful when you want to fine-tune an objects position.

7) Make sure the object is selected, and then press the Delete key to remove it.

Don't worry, well add the image object back in the next step. But I wanted to show you how to remove an object from the page.

Note that this removes the object from the page along with all its settings, but doesn't actually delete the image file. As you'll see in the next step, a copy of the original image is still in your projects Images folder.

8) Choose View > Panes > Project Browser to open the Project pane. Using the Project pane, navigate into the Images folder, locate the "A-001.png" file, and drag it onto the page surface.

The Project pane

Once an image has been added to your project, it becomes even easier to add it a second time. This is because adding an image to your project creates a local copy of that file inside your projects Images folder.

Note: Every time you start a new project, AutoPlay automatically creates a project folder for you. Immediately inside the project folder are two things: the project file, where all the projects settings are stored; and a folder called CD_ROOT. The CD_ROOT folder is where all of your project files are organized. When you burn your project onto a compact disc, its the contents of the CD_ROOT folder that are placed on the CD. (In other words, everything below the projects CD_ROOT folder will end up on the CD when you publish your application.)

In order to keep things neat and tidy, the files that you add to your project are stored under CD_ROOT in a folder called AutoPlay. This folder is further divided into a number of subfolders. Images are kept in a subfolder called Images, Videos are kept in a subfolder called Videos, and so on.

Every project has a complete set of these subfolders, which you can access by using the Project pane. Most of the time, these subfolders are all you will ever see; while you're working on the project, you're working in the CD_ROOT folder. (You won't see the CD_ROOT folder itself unless you look for it in Windows.)

Heres how it works: whenever you add an image to your project, its copied into your projects Images folder first. Then the project uses that copy instead of the original. (Which is why the File setting is always a path like "AutoPlay\Images\redshoes.jpg" even if you added the file from "C:\My Documents\Graphics\Pictures" of clown feet.)

This is done so you're always working with a local copy of the file - one that wont be affected by any changes you (or someone else) might later make to the original. It also means that your project wont mind in the least if the original file is ever moved or misplaced. This makes your project much more robust. (So, if someone ever comes along and decides that a nice person like you doesn't need all those pictures of clown feet in the My Documents folder, AutoPlay's got you covered.)

Now, most of the time you don't have to worry about this - not even one iota. You just browse for the file you want, and let AutoPlay take care of things like copying files and making your project reliable. But, its good information to know, because it helps you understand why its so easy to add the same image to your project a second time around.

Note: If you aren't comfortable with files, folders and subfolders, just think of the Project pane as the place where you can see all the files that you've added to your project. The folders just divide the pane into different sections to keep your project files organized.

Since there are three image files that you've added to the project so far, you should see three files in the Images folder: the two images you used for the page background (including 630B1151.jpg), and A-001.png.

When you drag A-001.png onto the page, an image object is created automatically.

9) Resize the object by dragging one of the little white circles on the bounding box. Try holding the ctrl and shift keys down while you resize the object to maintain its current aspect ratio.

The little white circles on an objects bounding box are called resize handles.

The resize handles appear on the bounding box whenever an object can be resized with the mouse. To resize the object, just drag one of the resize handles and make the bounding box bigger or smaller.

If you hold the ctrl and shift keys down (together) while you resize the object, the current aspect ratio will be maintained. What this means is that the width and height will both increase or decrease proportionally in order to keep the shape of the object the same. You can see this by watching the dotted rectangle that appears when you drag the resize handle. Normally, the dotted rectangle follows the mouse pointer exactly. When you hold the ctrl and shift keys down, however, the dotted rectangle maintains its overall shape as it increases or decreases in size.

Tip: You can also right-click on an object and choose Keep Aspect to make it always maintain its aspect ratio, even if you resize it without holding the ctrl and shift keys down.

As you resize the object, the size readout changes on the status bar.

The numbers indicate what the width and height of the objects bounding box will be when you let go of the mouse button.

Tip: You can abort a resize operation (in the middle of dragging) by pressing the Esc key.

10) Make sure the image object is selected. In the Position category of the properties pane, set the Left and Top settings to 372 and 112. Set the Width and Height settings to 108 and 18.

You can set the position and size of an object directly by typing values right into the appropriate fields on the properties pane.

Tip: You can also reset an object to its original size by right-clicking on it and choosing Restore Size.

Adding Label Objects

Some information is easier to present with words than with pictures. (For instance, it would be pretty hard to draw your name or email address.) Luckily, label objects make it easy to put text on the page.

1) Choose Object > Label to add a new label object. Double-click the object to display the Label Properties dialog, type in Ted Sellers and click OK.

Choosing Object > Label automatically adds a label object to the top-left corner of the page. Double click the new label object to bring up the Label Properties dialog so you can configure the new label object.

Label Properties

Note that the contents of the Text setting are automatically selected for you. This makes it easy for you to change the objects text right away. When you type in Ted Sellers, it instantly replaces the default text.

When you click OK, the label objects properties are updated.

2) Make the label object bigger by dragging one of its resize handles.

When you resize a label object, the text inside it gets bigger or smaller. In fact, resizing a label objects bounding box is just another way of setting the objects font size.

There are two things to remember about resizing label objects. First, label objects always maintain their aspect ratio as you resize them. (You probably noticed this as you were resizing the object.) This is because changing the font size changes the width and height of the text at the same time.

Second, the size of the label object may not always match the size you set it to. The bounding box might end up a tiny bit larger or smaller as the text snaps to the nearest font size. You wont always be able to get a label object to fit perfectly to a specific width and height in pixels...but AutoPlay will get the text as close as it possibly can.

Tip: When resizing label objects, try not to think in terms of pixels; instead, think in terms of points, as in a 12 point font. Or better yet, just resize the object until it looks the way you want it to, and forget about pixels and points altogether.

3) Shrink the label object back down to its original size.

To make the label object smaller, just drag the same resize handle back to where it was before, more or less. (Don't worry about getting it exactly the same size; the point of this step is just to avoid having a big text object getting in your way during the next couple of exercises.)

4) Click the New Label Object button to add another label object. Double-click on the new object, type R E A L T Y L T D . into the Text field, and click OK.

You can also add an object by clicking the New Label Object button on the toolbar.

Clicking the New Label Object button is just like choosing Object > Label from the menu. It automatically adds a new label object to the top-left corner of the page. Since you already had a label object there, the result might look a bit jumbled, with one label object on top of the other. Don't worry about that for now; well move the new object in the next step.

Double-click the new object to bring up its Label Properties dialog. For now, we just want to change the default text to R E A L T Y L T D . (without the quotes). Note that we've put a space between each letter in order to spread the letters out a bit, and we've put two spaces between the words REALTY and LTD. to make them look like separate words.

Once you click OK, the text on the object is updated.

5) Drag the new label object down so you can see it by itself.

Moving the new object over makes it easier to see what's going on.

6) Right-click on the page surface and choose Label from the right-click menu.

You can also add an object by right-clicking on the page surface and choosing the object type from the right-click menu.

Note: The right-click menu is said to be context sensitive in that it displays different items according to what you right-clicked on. For example, right-clicking on the page surface will present a different menu than if you right-clicked on an object.

This time, the object isn't added in the upper left corner...instead, it appears at the location where you right-clicked on the page.

Note: When you add an object with the right-click menu, it gets positioned where you right-clicked on the page.

Were going to use this object to display Teds email address, but for now the default text is okay.

Duplicating Objects

A really quick way to add an object is to make a duplicate of an existing object. Duplicating is just like copying and pasting in Windows, only its combined into a single step.

1) Make sure the Label3 object is selected, and choose Edit > Duplicate.

When you duplicate an object, all of the originals settings are copied into the new object. The only things that change are the new objects name and position. In order to make it easier to keep track of everything, the new object is positioned a little bit down and to the right of the original. That way, you can see that the duplication was successful.

The new object is also automatically selected for you.

2) Press Ctrl+D to duplicate the new object (Label4), this time using the keyboard instead of the menu.

Duplicating objects is something you'll do pretty often, so it pays to learn the hotkey for the menu command.

Note: Most of the menu commands you can perform in AutoPlay have hotkeys assigned to them. If you look at the Edit > Duplicate command in the menu, you can see that the hotkey (Ctrl+D) is listed on the right. This makes it easy to remember what the hotkey is for duplicating an object, if you ever forget, just look in the menu.

Because the new object is automatically selected for you, you can create a chain of label objects very quickly by selecting an object and pressing Ctrl+D a few times.

Since the new objects start off with the same settings as the original, this is a great way to add a bunch of similar objects. Just set up the first object the way you want it, and duplicate it a few times.

Of course, you can do the same by repeatedly choosing Edit > Duplicate from the menu, but I find it much faster to press the Ctrl+D hotkey.

Changing Text

Now its time to put some real text in those three new label objects. First, though, lets spread them apart a bit so they're easier to work with.

1) Spread the three new label objects apart by dragging Label5 down, and then dragging Label4 down so its between Label3 and Label5.

Basically, just drag the bottom one down, and then position the middle one between them, so the objects don't overlap any more. More or less like this:

Separating the label objects will make it easier to select them in the next few steps, and to see what's going on. Plus, it might make them happy. (Label objects probably don't like being crammed together any more than you or I would.)

2) Click on the Label3 object to select it. In the properties pane, change the Text setting to ted@sellersrealty.com.

Well use this label object to display Teds email address.

Note: Don't worry if you don't click on the right label object at first. You might have to click on more than one label object to find the one named Label3. (Of the three objects with New Label on them, it should be the one closest to the top of the page.)

To change the text that is displayed in the label object, highlight the contents of the Text setting in the properties pane, and type in the text that you want it to display.

Tip: A quick way to highlight all of the text in a setting is to double-click on the left-hand column of the properties pane.

In this case, highlight the words New Label and type in ted@sellersrealty.com instead.

Note: Whenever text is highlighted, anything you type instantly replaces the highlighted text.

As you type in the new text, the objects bounding box automatically resizes to fit.

3) Double-click on the Label4 object and type (540) 555-3524 when the Properties dialog appears.

Well use the Label4 object to display Teds phone number.

4) Select the Label5 object, click on the Text setting, and then click the edit button. When the Edit Text dialog opens, delete the existing text (New Label) and type in the following three lines:

123 Fakereal Avenue
Realfake, VA
United States 12341

When you're done, click OK to close the Edit Text dialog.

Label objects are actually able to hold multiple lines of text. You can't just press Enter to insert a new line when you're typing stuff into the properties pane, though - there, pressing Enter means I'm done typing, keep the changes I just made. To get around this, AutoPlay gives you access to the Edit Text dialog, where pressing Enter starts a new line, just like it would in a text editor like Notepad.

Once you click on the edit button, the Edit Text dialog will open, showing you the single line of text that the label object started out with.

You want to replace that text with Teds fictional mailing address, so highlight all of the text and press the Delete key to remove it.

Tip: You can also click anywhere on the text and use the keyboard to edit it, just like you would edit something in Notepad: using the cursor keys to move around, and the Backspace and Delete keys to delete one character at a time.

As you type in Teds mailing address, make sure you press Enter at the end of each line.

Note: Pressing Enter actually inserts a newline into the text. A newline is a special character that basically marks the position where a new line of text should begin. The newline itself is invisible, but you can see its effects on the Edit Text dialog.

You may notice some red squiggles under the words Fakereal and Realfake. These red squiggles are the spell checkers way of alerting you that those words aren't in its dictionary. We don't care if they aren't, since the whole address is fake, but if you wanted to, you could click the spell check button to step through all such flagged words and choose from a number of suggested spellings.

When you're done typing the fake mailing address in, click the OK button on the Edit Text dialog. The text will be inserted into the label object, which will automatically resize to fit all of the text.

Note: If you look in the properties pane, you might notice that the Text setting actually contains the text that you typed into the Edit Text dialog. If you're wondering how AutoPlay manages to stuff 3 lines of text onto a single line in the properties pane, try clicking on the text field and then scrolling to the right with the cursor keys. As you scroll through the text, look for a backwards slash followed by the letter n, like this: \n. Those two letters are a special code that represents the newline character in places where you cant just press Enter to start a new line. You can actually edit the text in a label object right in the properties pane, by typing \n wherever you want a new line to appear. Of course, its a lot easier to just edit the text with the Edit Text dialog.

5) Change the Label5 objects Alignment setting from Left to Right.

When you change the Alignment setting, the objects text lines up along the right side of the bounding box.

Note: Although you can set the Alignment for any label object, the effects of changing a label objects Alignment setting will only be visible if there is more than one line of text in the object, and the lines aren't all the same length.

Tip: You can center the text in a label object, too. Just for fun, try setting the Alignment to Center to see how it looks.

6) Change the Label5 objects Alignment back to Left again.

For this project, we want the mailing address to be left-aligned.

Tip: Two other objects that support multi-line text are the paragraph object and the rich text object. In fact, paragraph and rich text objects are often a better choice when you need to display multiple lines of text on the page. Although I've chosen to use label objects in this lesson for demonstrative purposes, you could easily substitute paragraph objects or rich text objects to achieve these effects in your own projects.

Naming Objects

As you added the objects in this lesson, they were automatically given names based on the object type, along with a number to make the name unique - names like Image1 and Label4.

You've probably already noticed the pattern: as you added more objects of the same type, the numbers got bigger. When you added a second label object, it was automatically named Label2. When you duplicated that object to create a third label object, it was named Label3. And so on.

In fact, as you add more objects of the same type, the numbers just keep increasing. The more objects you add to a page, the bigger the numbers get. (Until one day you end up with an object named Label91238912381923 and you realize you have no life.)

This is done so that every object starts out with a unique name. AutoPlay uses the object names to distinguish one object from another, so they have to be unique.

Actually, consider that object naming rule #1: in AutoPlay, every object on the page has to have a unique name.

Okay.

But that doesn't mean you have to stick with the names that AutoPlay gives your objects. In fact, after a while, remembering which object is which can get a bit difficult if they all have names like Image9, Label6 and Label22.

Luckily, its easy to change the name of an object to anything you want. To illustrate the point, lets rename three of our label objects to make them a bit more memorable.

1) Click on the object named Label3. In the properties pane, change the Name to Email Address.

Since this label object contains Ted Sellers fake email address, it makes sense to give the object a name that reflects that.

To change the objects name, just edit the text in the Name field so it contains Email Address instead of Label3.

Note that its perfectly fine to include spaces in object names. Of course, you don't have to use spaces...we could have named this object Email, Address or label_email or even JimBob for that matter.

Tip: For some good advice on choosing names for objects, see Naming Objects.

2) Rename the Label4 object to Phone and the Label5 object to Mailing Address.

You can rename these other objects the same way: just click on the object, and change the text in the Name field.

Or, you can change the name by double-clicking on the object (to open the Properties dialog), clicking on the Attributes tab, and then changing the Name setting there.

Note: Just because you can rename objects, doesn't mean you have to. For example, our page only has one image object on it, so we don't really need to give it a special name. (It shouldn't be too hard to remember which object Image1 refers to.)

Changing Font Settings

Every label object contains text, but that doesn't mean they all have to look the same. AutoPlay gives you full control over several font settings.

1) Click on the Label1 object (the one with Ted Sellers on it). In the properties pane, click on the Font setting, and then click the edit button to bring up the Font dialog.

The Font dialog is where you can adjust all the font-related settings for the currently selected object.

2) In the Font dialog, change the font to Tahoma, the font style to Bold, and the size to 36. Leave the other settings the same. Click OK when you're done.

The first setting on the left side of the Font dialog lets you specify the font family you want to use. To switch to a different font, you can either type the name of the font into the text field, or select it from the list below.

To find Tahoma quickly in the list, select a name in the list (it doesn't matter which one), and press the T key. The list will jump to the first font that begins with the letter T. Tahoma shouldn't be too far away. When you find it, just click on it in the list to select it.

Similarly, to set the font style to Bold, just click on the word Bold in the list of font styles. To set the size to 36, either type in 36 in the Size field, or click on the number 36 in the list.

When you click OK, the label object will automatically use the new font settings.

Tip: You can also set some of the font settings in the properties pane.

3) Change the Orientation from 0 to 270.

Changing the orientation changes the direction that the text is written in.

To illustrate this, well turn the Ted Sellers label on its side and make its text read from the top down, so it would read normally (from left to right) if you tilted your head 90 degrees to the right.

To do this, click on the Orientation setting in the Properties Pane, click the select button, and then choose 270 from the list. This will orient the text 270 degrees counter-clockwise, so that it is written vertically from the top down.

Pretty neat, eh?

4) Change the orientation back to 0.

Setting the label objects orientation back to 0 will return it to normal, so it reads from left to right without any head tilting. (This assumes you're not lying on your side or hanging upside down, but you get the picture.)

5) In the properties pane, set FontFamily back to Arial, and change FontSize to 23.

You can also change some font settings without opening the Font dialog, by using the four individual font settings in the properties pane.

These settings provide a quick way to change the most common font settings right from the properties pane. (As you'll see in lesson 3, these settings are especially helpful when working with multiple objects.)

Changing the FontFamily setting is equivalent to choosing the font. In fact, what we normally consider the name of a font is technically referred to as the fonts family. Arial, Times New Roman, Garamond...each of these refer to a different font family. The reason they're called families is because they encompass all of the different variations within that font...such as Bold, Italic, etc. Each font is actually made up of a collection of different sub-fonts, one for each of the various styles within the family. The Arial family comprises Arial Bold, Arial Italic, Arial Bold Italic, and so on.

To change the FontFamily setting, just click on it, then click the select button and choose Arial from the list. (The same trick applies to this list - you can press the a key to jump to the first font name that begins with the letter A.)

To change the FontSize setting, either edit the text in the field to replace 36 with 23, or click the little up/down arrows to change the size one point at a time.

6) Select the Email Address label object. In the properties pane, set the FontBold setting to true.

To change the FontBold setting, you could click on the setting, click the select button, and then choose true from the list. But theres an even easier way to change a true-or-false setting like this one: just double-click on the word false.

Tip: If a setting offers you a list of values to choose from, you can double-click on the current value to advance to the next item in the list.

If the current value is the last item in the list, it just goes back to the beginning. Since the FontBold setting only gives you two options to choose from - namely, true and false - double-clicking on the value goes from false back to true.

Tip: You can toggle a setting between true and false by double-clicking on it.

7) Double-click on the Label2 object (the one with R E A L T Y L T D . on it). On the Label Properties dialog, click Font to open the Font dialog. Set the font style to Bold and the size to 12, and click OK.

You can also change the font settings by double-clicking on the object to open the Label Properties dialog, and then clicking the Font button to open the Font dialog.

To change the font style, just select Bold from the list. To set the font size, either highlight the original size (16) and type in 12, or just select 12 from the list.

Clicking OK on the Font dialog will accept these changes and close the Font dialog.

Note: The Font dialog appears on top of the Label Properties dialog, and it must be closed before you can exit from the Label Properties dialog. Because the Font dialog is smaller, part of the Label Properties dialog will be visible behind the Font dialog. A common mistake is to click on the wrong dialogs OK button. Luckily, the Font dialog wont let you sneak around it like that. If you click the wrong OK button, the Font dialogs title bar will flash (and you might hear your computers alert sound). If this happens, just click the other OK button.

8) Click OK to close the Label Properties dialog.

Clicking OK on the Label Properties dialog will accept the changes that you made to the object (i.e. the changes that you made to the Font settings) and close the Label Properties dialog.

Why are there different ways to change the font settings?

AutoPlay is designed to be as intuitive and flexible as possible. Having more than one way to perform a task allows you to pick the method that you like best, or that is most convenient at the time.

Some people only use the properties pane, while others only use the double-click dialogs. And some just use whatever they feel like using at the time.

Feel free to use whichever method you prefer when you're working with AutoPlay. Its your program...use it the way that makes sense for you.

Changing Text Colors

Label objects don't have to be black and white. Far from it! AutoPlay lets you set four different colors for each label object - one for each of the three different states that a label object can be in, as well as a disabled color.

What's this about three different states?

Well, each object is able to display three different colors in response to what the user does with the mouse. Normally, when the mouse pointer is not over the label object, the Normal color is used for the text. If the user positions the mouse pointer over the label object, the Highlight color is used instead. And if the user clicks on the object, the Down color is used.

These three different situations - normal, highlighting and clicking, are the three states that the label object can be in.

So why three states? Well, it turns out that label objects can be made to do something when the users clicks on them, or moves the mouse onto (or off of) them. By using different colors for the three states, you can provide visual cues for the user to help them see that those label objects are interactive.

In other words, the three colors let you make label objects that look and act like hyperlinks, similar to the links you're used to seeing on web pages.

This is probably a lot easier to understand if you can see it in action, so lets turn one of our label objects into that kind of interactive label.

Note: There is actually a fourth state, too, for when the object has been purposefully disabled. This allows you to grey out an object to make it look unclickable when it has ceased to be interactive. You usually don't need to use this state, though, unless you're building a more complex application.

1) Click on the Email Address label object to select it. Make sure the Colors category is open in the properties pane.

If the Colors category is closed, it will look like this:

To open it, either double-click on the category heading, or click once on the little + symbol to the left of it.

Once the category is open, it will look like this:

2) Double-click on the Normal color and type #bad5eb.

Double-clicking on a color setting highlights all of the text in it, so that what you type replaces the existing value. In this case, you want to change the default value of #000000, which is the hexadecimal color value for black, to #BAD5EB, which is the hexadecimal color value for a light blue-grey that looks good against the pages background image.

Note: When typing in hexadecimal color values, you don't have to use capital letters. AutoPlay will automatically capitalize the letters for you.

When you set the Normal color, you should see the label objects text change from black to light blue-grey.

3) To change the Highlight color, first click the select button to open the color chooser, then click on More Colors... at the bottom.

In order to make our label object look like a hyperlink, we want the highlight color to be a lighter version of the normal color. That way, the user will see the text highlight when they move the mouse over it. The color chooser doesn't have the color we want, though, so we need to go one step further. That's where the More Colors... link comes in.

Clicking on More Colors... at the bottom of the color chooser opens the Colors dialog.

4) On the Colors dialog, select the light blue color one position up and to the right from the white color in the center (its hexadecimal value is CCECFF). Click OK when you're done.

The Colors dialog has two tabs: Standard, and Custom. The Standard tab, which is selected by default, has a broader selection of the standard Windows colors for you to pick from. In this case, you want to select the color that is immediately up and to the right from the color in the center.

When you're done changing the color, click OK to close the Colors dialog. The color you selected will show up in the properties pane as the objects new Highlight color. You won't be able to see the real effect of changing the Highlight color, though, until you actually see the project running.

Note: The text color will change to the Highlight color when the user moves the mouse onto the object. Since the objects size and shape are determined by its bounding box, this means the color will change when the mouse pointer crosses over the edge of the bounding box (like crossing the border into the objects territory).

5) To change the Click color, open the Colors dialog (by clicking on More Colors... at the bottom of the color chooser), and click on the Custom tab.

If you cant find the color you want on the Standard tab, you can switch to the Custom tab to create a custom color from scratch.

The Custom tab lets you select a color from a limitless palette, either by clicking on the color map, or by setting the Hue/Saturation/Luminosity or Red/Green/Blue values directly. If you've used any photo editing tools, you're probably already familiar with this interface, or have used one like it.

For the Click color, we want a color that is similar to the Highlight color, but a little bit lighter. Theres a really easy way to do this using the custom tab, but first we have to prime it with the Highlight color. (Right now, the Custom tab is showing the settings for the current Click color, which is black. Starting from scratch like this would make it harder to pick a color that is similar to the Highlight color.)

6) Click on the Standard tab, and click on the same color that you selected in step 4. Then click on the Custom tab again.

Going back to the Standard tab and selecting the same light blue-grey color that you selected in step 4 will set the Click color to that color. This doesn't actually change the objects Down setting...at least, not until you click OK and accept the changes. But it gives us a better starting point to create a similar color for the labels Click state.

When you return to the Custom tab, you'll see the color settings for that light blue-grey color.

7) Drag the luminosity slider up a bit to make the color brighter.

The luminosity slider is the vertical bar with the little triangle next to it, just to the right of the big color map. You can drag the triangle up and down to change the colors luminosity, without changing its saturation or hue.

Pick a color that is noticeably brighter than the Highlight color. (I set the luminosity to about 239, which resulted in a color whose red, green and blue values were 224, 243, and 255, respectively.)

8) Click OK to finish setting the Click color.

When you click OK, the Colors dialog closes, and the color you created shows up in the properties pane as the objects new Click color. Once again, you wont be able to see any other effects of this change to the object until you see the project running.

Note: The text color will change to the Click color when the user clicks inside the objects bounding box.

Watch out for those crooked fonts...

Some italic or cursive fonts can pose a bit of a problem for the label object. For various technical reasons, a font that leans to the right a lot can sometimes end up with the last letter extending past the right edge of the labels bounding box. When this happens, the part that falls outside the bounding box wont change colors along with the rest of the text-only the text inside the labels bounding box responds to mouse-overs and clicks.

This is very rare, but if it ever happens, theres a simple solution: just add a few spaces to the end of the text, so the bounding box is big enough for the last letter to fit.

Copying Colors

Copying a color from one object to another is something you'll do fairly often. Luckily, AutoPlay gives you two really fast ways to duplicate a color.

To demonstrate this, lets make our Phone and Mailing Address label objects use the same color as the Email Address objects Normal color.

1) Click on the Email Address label object. In the properties pane, click on the Normal color setting, and click the select button to bring up the color chooser.

The first way to give two color settings the same value only works if you used the Colors dialog to set the first color. This is because the color chooser actually keeps track of the last eight colors you added with the Colors dialog and makes it easy for you to select them again.

In the previous exercise, you used the Colors dialog to set the Highlight and Click colors for the Email Address label object. Whenever you choose a color using the Colors dialog, a new color square is added to the bottom row of the color chooser.

As you can see, there are two such color squares on the bottom row of the color chooser: one from when you chose the Highlight color, and one from when you chose the Click color.

There is no color square for the Normal color, though, because it wasn't set using the Colors dialog. That color was changed by typing the hexadecimal color value directly into the Normal setting. Only colors that are set using the Colors dialog will show up on the color chooser.

In order to create a color square for the Normal color, we need to set it again using the Colors dialog.

2) Click on More Colors... at the bottom. On the Colors dialog, click on the Custom tab, and click OK.

When you switch to the Custom tab, the color settings contain the values that describe the current color.

Since the Email Address label objects Normal color is already set to the color we want, all you have to do is click OK on the Colors dialog, and you'll effectively "re-set" the Normal setting to the same color - only this time, in a way that will result in a new color square being added to the color chooser.

3) Click on the Phone label object. In the properties pane, click on the Normal setting, and click the select button. A third color square has been added to the bottom row of the color chooser. Click on that square to select the same color you chose in step 2.

When you re-selected the Normal color using the Colors dialog in step 2, a new color square was added to the bottom of the color chooser.

This new color square will be available in all color choosers until you exit AutoPlay. So, if you want to use the same color somewhere else - in another label object, for instance - you just have to click on that new color square.

Clicking on the color square sets the Normal color for the Phone label object to the same color you chose for the Email Address label object.

Note: As you continue to select colors using the Colors dialog, additional color squares will be added to the bottom row of the color chooser. The color chooser will only remember as many colors as it can fit on the bottom row, however. If you select enough colors, the color chooser will forget the older ones in favor of the new ones. In other words, the color chooser can only show the last eight custom colors that you picked.

The other way to duplicate a color is to copy and paste the hexadecimal value from one setting to another.

4) Double-click on the Normal color setting and press Ctrl+C.

When you double-click on a color setting, all of the text in its text field is highlighted for you. In this case, the text is the hexadecimal value that describes the Normal color.

Pressing Ctrl+C copies this text into the clipboard so you can paste it somewhere else.

5) Click on the Mailing Address label object. In the properties pane, double-click on the Normal color setting and press Ctrl+V.

Once again, when you double-click on the Normal color setting, its hexadecimal value is highlighted. Pressing Ctrl+V pastes the text from the clipboard into the text field, replacing the highlighted text.

Note: This time, instead of copying the hexadecimal text into the clipboard, you're replacing it with the value that you copied from the other label object.

Tip: Unlike the new color square on the color chooser, which only works for colors that you've selected with the Colors dialog, you can always copy and paste the hexadecimal value between two colors.

6) Press Enter, or just click somewhere else.

To accept the change that you made to the Normal setting, you can either press the Enter key, or click away from the Normal setting. (In other words, click on another setting, or another object, or on the page surface.)

Tip: If you wanted to cancel the change, you could press Esc instead.

Matching Colors

Unlike the Email Address object, we don't want these labels to appear interactive, so we need to make all three state colors the same. Otherwise, the text colors will change when the user moves the mouse over the labels or clicks on them, which will give the wrong impression.

To make all three colors the same, you could just copy the hexadecimal color value from one of the states and then paste it into the other two - just like copying a color from one object to another. But there's an even easier way to make the colors match: just use the Match Normal button on the objects double-click dialog.

1) Double-click on the Phone label object.

Double-clicking on the label object opens the Label Properties dialog. There are four color choosers on the Settings tab which allow you to set each of the four state colors, just like you can in the properties pane.

Next to the Highlight and Click colors is the Match Normal button.

2) Click the Match Normal button.

Clicking the Match Normal button makes the Highlight and Click colors both match the Normal color.

3) Click OK to accept the changes.

Clicking OK closes the dialog and locks in the new Highlight and Click colors.

4) Do the same for the Mailing Address label objects.

Double-click on each Mailing Address label object and make its Highlight and Click colors match its Normal color, too.

While were at it, lets change the color of our first two label objects as well.

5) Double-click on the Label1 object to open the Label Properties dialog. Set the Normal color to white, and then click the Match Normal button to make the Highlight and Click colors match.

The Label1 object is the one with Ted Sellers on it. In the next lesson, were going to use it with Label2 and the image object to create a little logo. Since its going to be used as part of a logo, we don't want it to appear interactive, so the Normal, Highlight and Click colors should all be the same.

6) Do the same for the Label2 object.

The Label2 object is the one with R E A L T Y L T D . on it.

Adding a Slogan

Remember when I mentioned that duplicating an object was a good way to add a similar object to the page? Essentially, you use an existing object as a starting point to create a new one. Lets take advantage of that trick to add another label object with the same color settings as our Mailing Address label object.

Well use this label object to display Teds slogan: Building communities one home at a time.

1) Select the Mailing Address label object and press Ctrl+D.

Pressing Ctrl+D creates a duplicate of the Mailing Address object, and automatically selects the new object.

2) Drag the new object over to the left corner of the page.

Moving it away from the Mailing Address label object will make it easier to see what's going on.

3) In the properties pane, change the new objects name to Slogan.

Were starting to accumulate a fair number of objects. We might as well give this object a name so the list in the object browser doesn't get too confusing.

4) Click on the Text setting, and click the edit button. When the Edit Text dialog appears, replace the mailing address with the following text:

"Building communities
one home at a time"

Clicking the edit button in the Text setting opens the Edit Text dialog. When the dialog appears, all of the text in it is already highlighted for you. To replace the text, you just have to type in the new text.

5) Click OK to close the Edit Text dialog.

When you're done changing the text, click OK to close the Edit Text dialog. The new text should appear in the label object immediately.

6) Set the font Size to 9, and the Alignment to Center.

We want the text in the label object to be centered, and we don't want it to be very big.

7) In the Position category, set Left to 46 and Top to 358.

This positions the object down near the bottom left corner of the page.

Note: This will place the slogan below the four button objects well be adding in Lesson 4.

That's it...we don't have to bother changing any of the colors, because all of those settings were already made for us simply by duplicating the object.

Saving the Project

If you've been using computers for a while, you know that its important to save your work from time to time. If you haven't, take my word for it: save your project, and save it often!

(In a perfect world, computers would never crash, and kids would never think the power button was really fun to play with.)

So, before we finish off this lesson, lets take a moment to save the project.

1) Choose File > Save.

Note: When you save the project, all of the changes that you've made to the project are stored on your hard drive, in a project-specific file known as the project file.

Congratulations! You've just protected yourself from having to redo everything in the event that a computer glitch (or four-year-old) causes your computer to spontaneously shut down.

As you can see, there isn't much to it. Feel free to save the project as often as you want. Generally, the more often you save the project, the better.

Tip: You can also save the project by pressing the Ctrl+S hotkey.

Previewing

Now that we've added some text and graphics, lets see how our project would look from the users perspective. AutoPlay's preview feature makes it easy to take a quick look at how your application will look and operate when its done, without actually building or burning the project.

1) Choose Publish > Preview.

When you choose Publish > Preview, your application starts up, just like it would if you built the project and ran it.

Previewing doesn't make any changes your project, so feel free to preview your project at any time.

Tip: You can also preview your project by pressing the F5 key, or by clicking the Preview button on the toolbar.

2) Move your mouse over the Email Address label object, and click on it. Observe how the text color changes as you interact with the object.

The Email Address label object is the one with ted@sellersrealty.com on it. As you move the mouse over this object, the text color changes from the Normal color (light blue-grey) to the Highlight color (a lighter shade of blue). When you click on the object, the text color changes from the Highlight color to the Click color (an even lighter shade of blue).

As you can see, all you need to do to make a label object appear interactive is set the Normal, Highlight and Click colors to different colors.

Note: In Lesson 4, well show you how to make this label object actually send an email when its clicked.

3) Move your mouse over the Ted Sellers label object and click on it.

Since you made all three of the Ted Sellers label objects colors the same, it doesn't visibly respond to mouse-overs or clicks at all.

4) Click the close button on the title bar to exit the preview.

When you exit the preview, you're returned to the AutoPlay program window.

Tip: You can also press Alt-F4 to exit from a preview.

Lesson 2 Summary

In this lesson, you learned how to:

  • Change the page background

  • Add an image object

  • Resize

  • Add label objects

  • Duplicate objects

  • Change the text in a label object

  • Rename objects

  • Use custom font settings

  • Use different text colors

  • Copy a color from one object to another

  • Match an objects normal, highlight and click colors

  • Save the project

  • Preview the project


Lesson 3:

Lesson 3: Working with Multiple Objects

There are all sorts of things you can do with multiple objects, like move them all at once, line them up, group them together, or even change some of their properties in one fell swoop.

This is something you'll do a lot, and as you'll see in this lesson, it's really easy once you know how.

What You'll Learn

In this lesson, you'll learn how to:

  • Select multiple objects

  • Move more than one object at a time

  • Change the settings of several objects at once

  • Align objects to each other

  • Align objects to the page

  • Arrange objects in the z-order

  • Remove unused files from the project

  • Group objects together

  • Pin objects (so they can't be moved or resized)

  • Distribute objects evenly

  • Lock objects (so they stay out of your way)

How Long Will It Take?

This lesson takes approximately
35 minutes to do.

Starting the Lesson

If you're continuing from Lesson 2, you should still have AutoPlay running with the Tutorial project open. If so, you're ready to move on to the next exercise: Selecting Multiple Objects.

Otherwise, you'll need to open the project file that you saved at the end of Lesson 2.

1) Open the Tutorial.autoplay file that you saved in Lesson 2.

When you save a project, AutoPlay automatically creates a project folder for it inside your "My Documents\AutoPlay Media Studio 8\Projects" folder. This project folder is where everything that belongs to the project is stored including the project file, which contains all of the settings used in the project.

The project folder and the project file always have the same name that you gave to the project when it was created. The project file's name ends with a ".autoplay" file extension.

Since you named this project "Tutorial" in Lesson 1, the name of the project folder will be Tutorial, and the name of the project file will be Tutorial.autoplay. So, the path to the project file should be something like:

...\My Documents\AutoPlay Media Studio 8\Projects\Tutorial\Tutorial.autoplay

To open the project, you just need to open that project file.

Selecting Multiple Objects

The first step to doing anything with multiple objects is to select the objects you want to work with.

Note: If you're used to selecting multiple files in Windows, you probably already know how to select multiple objects in AutoPlay. Just like in Windows, you either ctrl-click, shift-click, or drag-select. The only difference is that when you're working with objects in AutoPlay, ctrl-clicking and shift-clicking both do the same thing.

1) Click on the Email Address label object to select it.

When you click on the label object, the bounding box appears, and its settings show up in the properties pane.

Before you move on to the next step, notice the way the object's bounding box looks, and take a quick peak at the properties pane to see the number of settings that are visible. (Both of those things will change when you have more than one object selected.)

2) Hold the Ctrl key down and click on the Phone label object. (This is known as ctrl-clicking.)

Ctrl-clicking (pronounced "control-clicking") adds an object to the current selection. In this case, the current selection consists of a single label object named Email Address.

Note: This is just like ctrl-clicking in Windows to select multiple files or folders.

When you ctrl-click on the Phone label object, it becomes selected in addition to the Email Address label object. The end result is that both objects are selected.

One of the objects has a normal bounding box, with solid edges and little white resize handles. But the other object has a bounding box made up of blue dashes, with no resize handles on it at all.

The object with the normal bounding box is called the dominant object. The dominant object is used as a point of reference when you align and resize objects using the tools in the Align menu. (We'll use those tools a bit later in this lesson.)

The other object is just part of the current selection. The dashed-line bounding box means that the object is selected but not dominant. As for the missing resize handles, you can only ever resize one object at a time with the mouse. When you have more than one object selected, the dominant object is the only one you're allowed to resize. So, the resize handles only appear on the dominant object.

Most of the settings are still listed on the properties pane, but some of them are blank, with no values in them at all. And the Name setting, which used to be at the top of the properties pane, isn't even there any more.

If a setting is blank, it means that the setting has different values between the selected objects. A setting will only show a value if all of the selected objects have that same value for the setting.

For example, because our two label objects have different text in them, the Text setting is blank. But, since they both have the same Alignment setting, the value of the Alignment setting is visible.

The Name setting is missing because you can't give the same name to more than one object at once. (As you'll see in this lesson, you can actually use the properties pane to change the settings for multiple objects.)

Tip: Feel free to shift-click instead if you prefer. When you're working with objects in AutoPlay, shift-clicking and ctrl-clicking are exactly the same.

3) Ctrl-click on the Mailing Address label objects.

The Mailing Address label objects are added to the selection. Notice that now the last object clicked has the solid bounding box, and the object that was dominant before the Phone label object has a dashed-line bounding box instead.

Note: When you add an object to the selection, it becomes the dominant object. (The dominant object is always the last object you clicked on.)

4) Ctrl-click on the image object to add it to the selection.

When you add the image object to the selection, most of the settings will disappear from the properties pane. This is because there are two different kinds of objects selected-namely, label objects and image objects.

Whenever there are multiple objects selected, the properties pane only shows the settings that all of those objects have in common. In this case, you only see the settings that exist in both label objects and image objects.

In fact, all that's left are a handful of settings in the various categories which exist across all of the selected objects.

5) Ctrl-click on the image object again to remove it from the selection.

If you ctrl-click on an object that is already selected, it is removed from the current selection. This is also known as "deselecting" the object.

6) Click on the page surface to deselect all of the objects.

Clicking on the page surface deselects any objects that are currently selected, and selects the page instead. (You can tell the page is selected because the page settings appear in the properties pane.)

7) Click on the page surface and, while holding down the mouse button, drag a rectangle around the Email Address, Phone and Mailing Address label objects.

This is known as drag selecting. It basically involves drawing a temporary "box" around the objects that you want to select, by dragging the mouse from one point to another while the left mouse button is held down.

Note: To drag select a bunch of objects, position the mouse pointer somewhere on the page surface near the objects. (Don't position it on an object, or you'll just end up moving that object instead.) Click the left mouse button and, while holding it down, begin to move the mouse. A temporary drag-select rectangle will appear to outline the selection area. "Stretch" this rectangle by dragging the mouse until the selection area includes all of the items you want to select, then let go of the mouse button. When you release the mouse button, any items within (or touching) the selection area will be selected, and the drag-select rectangle will disappear.

When you drag-select objects, the object that is closest to the mouse pointer when you release the mouse button becomes the dominant object. So, if you started dragging from above the Email Address label object, and ended up with the mouse pointer just below the Mailing Address label object, the Mailing Address label object would be the dominant object.

Tip: If you already have a bunch of objects selected, you can add more objects to the selection by drag-selecting them with the ctrl key (or shift key) held down. Holding the ctrl or shift keys down while drag-selecting adds objects to the current selection.

Moving Multiple Objects

When you have multiple objects selected, you can move them easily by dragging them with the mouse.

1) Drag the label objects to somewhere else on the page.

Moving multiple objects is just like moving a single object. When you drag one, all the other selected objects come with it.

So, just click on one of the selected objects, and, while holding down the mouse button, drag the objects where you want them to go.

Note: When multiple objects are selected, they all move together.

2) Choose Edit > Undo.

When you choose Edit > Undo, the last change that was made to the project is undone. In this case, the three label objects jump back to where they were before you moved them.

Tip: An even faster way to undo the last change is by pressing Ctrl+Z.

3) Choose Edit > Redo.

When you choose Edit > Redo, the last change that you undid is redone. Its kind of like undoing the undo.

Tip: You can also redo the last thing that you undid by pressing Ctrl+Y.

4) Choose Edit > Undo again.

If you're wondering what all this undoing and redoing has to do with moving objects, well, there is a point to it.

Moving objects and then undoing the move can be a very useful technique. You often wont know exactly where you want your objects to go until you've moved them around a bit. Knowing that you can just undo the move if you don't like where the objects end up frees you to try different ideas. (Sure, you could just move the objects back by hand, but using undo gets them back to that same exact spot a lot faster.)

It also doesn't hurt to know how to go back a step if you happen to make a mistake, like moving the wrong object by accident.

As for undoing and redoing, this can be helpful when you're trying to decide between two different positions. Just move the objects from one place to another, and then use the undo and redo commands to go back and forth between the two options. Do the objects look better over here, or over there? Hmmm...here...no, definitely there.

This kind of undo/redo dance lets you do a quick before-and-after comparison for any change that you make to the project.

Aligning Objects

When multiple objects are selected, a number of alignment tools become available. You can use these tools to line the objects up horizontally, vertically, or both.

1) With the three label objects still selected, click on the first Mailing Address object to make it dominant.

When you have multiple objects selected, clicking on one of them makes it the dominant object. There can only be one dominant object at a time, so if the object you click on isn't already the dominant object, it becomes the dominant object instead of the one that was dominant before.

Note: The dominant object is the one with the normal bounding box.

2) Choose Align > Center Horizontal.

When you choose Align > Center Horizontal, all of the selected objects are centered horizontally with the dominant object.

In other words, the objects line up so that the horizontal midpoint of each object is in line with the horizontal midpoint of the dominant object.

Notice that the dominant object didn't move, but the other ones did. The dominant object serves as the anchor for any alignment operations that you perform.

3) Click on the Email Address label object, then choose Align > Left.

Clicking on the Email Address label object makes it the dominant object, so when you choose Align > Left, the Email Address label object stays put, and the other objects are aligned to it.

Note: The key to performing object alignments is knowing what the objects will line up with. Luckily, its quite simple: the objects are always aligned to the dominant object.

4) Drag these three label objects over to the left side of the page.

Don't worry about positioning them carefully; we just want to get them out of the way for a while.

Note: You can drag objects onto the work area, but only the objects (or parts) that are located on the page will be visible in the finished application. If any objects extend onto the work area, a warning will occur when you preview or build the project.

5) Click on Label1 (the one with Ted Sellers on it).

When you click on Label1, it becomes the only selected object. The other objects aren't selected any more, because you didn't ctrl-click on Label1 to add it to the selection - you only clicked on it to select it.

Clicking on an object that isn't selected deselects any objects that currently are. Its essentially like saying I want to select this object now, and only this one.

6) Shift-click on Label2 (the one with R E A L T Y L T D . on it).

Remember: when you're working with objects in AutoPlay, shift-clicking is exactly the same as ctrl-clicking. (You can use whichever key you prefer.)

Tip: When selecting multiple objects, use the last-clicked object is dominant rule to your advantage. Plan the order you ctrl-click on stuff so that the object you want to align to is the last one you click on.

7) Right-click on the Ted Sellers label object and choose Align > Center Horizontal.

When you have multiple objects selected, right-clicking on one of the objects makes it the dominant object. It also opens the right-click menu.

As you can see, right-clicking on an object gives you easy access to the same alignment tools that are in the Align menu.

Tip: The right-click menu is a very fast way to access the alignment tools.

Now that you have these two label objects selected, lets use them with the image object to create a simple logo.

8) Choose View > Toolbars > Alignment to make the Alignment toolbar visible.

All of the alignment tools are available on a toolbar, which we have appropriately named the Alignment toolbar. (Don't look at me, I wanted to name it George.)

You can use the Alignment toolbar to access the same alignment features that are available in the Align menu.

Tip: When I'm working with the alignment toolbar, I like to drag it down so it floats over the top part of the work area. That way, its closer to the objects, and doesn't take up as much vertical space in the design environment.

8) Drag the two label objects just below the image object. Position the objects so they look like the image below. Use the alignment tools to center the label objects horizontally with the image object.

You'll probably need to move the two label objects individually in order to bring them closer together. Try to position the objects without moving the image object at all.

Tip: Feel free to play around with the alignment tools before moving on to the next exercise. They're a lot of fun to use, and being familiar with them makes it a lot easier to design attractive layouts.

Aligning Objects to the Page

In addition to lining objects up with each other, you can also align them to the page surface itself.

Our goal for this exercise will be to try moving our newly created logo to the exact center of the page.

1) Select the three objects that make up the logo.

In other words, select the image object along with Label1 and Label2.

Tip: You can use the drag-select method to select all three objects at once.

2) Choose Align > To Page/Dialog, or click the Align to Page/Dialog button.

Choosing Align > To Page/Dialog makes the objects align to the page surface, instead of to the dominant object. It essentially makes the page surface act like the dominant object, so you can use the alignment tools to align objects to the page.

Note: The To Page/Dialog menu item acts as a toggle. If you choose Align > To Page/Dialog twice, it toggles the feature on, then off again.

Clicking the Align to Page/Dialog button does the same thing.

Tip: If the alignment toolbar isn't visible, you can choose View > Toolbars > Alignment to make it visible.

You can tell which mode the alignment tools are in by looking at the Align to Page/Dialog button on the Alignment toolbar. If the button has a blue border around it, then Align to Page/Dialog mode is on.

Without the Alignment toolbar, you'll have to check the Align menu in order to know whether Align to Page/Dialog mode is on, which is why I like to make the Alignment toolbar visible whenever I plan on aligning any objects to the page.

3) Click the Align Center Horizontal button.

All three objects should now be centered horizontally on the page. Notice that they only moved horizontally, and didn't move up or down at all.

3) Click the Align Center Vertical button.

Whoa! The objects are centered vertically on the page all right...but now they're overlapping, with one object on top of the other.

This isn't exactly what we wanted, but if you think about it, it makes sense. We had three objects selected, and we told AutoPlay to center them vertically on the page. So that's exactly what it did. Each one was centered on the page, independently.

If you wanted the three objects to keep their positions relative to one another, and be centered vertically as a single unit, you'd have to group them first. Well try that a bit later in this lesson, but for now, lets take advantage of the situation to cover another useful skill: arranging objects.

Arranging Objects

While we have these three objects overlapping, lets perform a quick experiment to illustrate a point.

As you can see, objects are drawn on top of each other. When objects overlap, the object in front essentially hides any objects that are behind it. (Depending on the object, you might be able to see other objects through the one that's on top. For example, our label objects don't hide each other very much, because label objects are fully transparent except for the text.) So what if you want a different object to be in front? Easy: just arrange the objects.

Arranging objects involves changing their positions in something called the z-order. The z-order is what determines which objects will be closer to the user, and which objects will be closer to the page.

Its called the z-order because it deals with how objects are arranged along a pages z axis.

In AutoPlay, changing the z-order involves moving individual objects along the z axis - either forward (further from the page) or back (closer to the page).

Note: Some object types are unable to appear behind other kinds of objects. For example, if you try to place a label object in front of a video object, it wont work; the video object will still show up in front. This is because the video object exists in its own little mini-window that floats on top of the page surface.

Z-Order = Draw Order

Objects are actually drawn onto the page one at a time. (It looks like they're all just instantly there because your computer can draw objects very quickly.) The z-order is what determines the order that the objects will be drawn in. The ones at the back are drawn first, and the ones at the front are drawn last, right over the others.

Some objects, like video and web objects, are drawn onto a separate window surface that is permanently suspended above the page and all of the normal objects on it. We call these objects windowed objects. Windowed objects always appear in front of non-windowed objects, regardless of where they are in the z-order.

1) Press Ctrl+Z to undo the last change.

Pressing Ctrl+Z undoes the last change that you made to the project, which in this case was to center the three objects vertically on the page.

Note: This is the same as choosing Edit > Undo.

By default, AutoPlay remembers the last 10 changes that were made, so at any given moment you should be able to step back like this up to 10 times in a row.

Tip: You can give AutoPlay a longer undo memory by choosing Edit > Preferences, clicking on the Document category, and setting Undo/Redo Levels to a higher value.

2) Choose File > Save to save the project.

Saving the project is important, because it creates a point that you can come back to if you make a mistake or want to undo your changes. (Well actually use this feature later in the lesson, to return the project to the state its in right at this very moment.)

3) Right-click on the page surface and choose Image. In the File Select dialog select the Icon-003.png file, and click OK.

Choosing Image from the right-click menu opens the Select File dialog, allowing you to select an image file.

In this case, we want to temporarily add another image file to demonstrate how the arrange tools work. A good image for this purpose is Icon-003.png, located in the Gallery\Images\Elements folder. (Some of our image files have such romantic names.)

Since you're selecting a file for an image object, the Select File dialog automatically starts at the last location where you browsed for an image file. Unless you've browsed to a different location since we added the first image object in Lesson 2, the Select File dialog should open directly to the Gallery\Images\Elements folder. Simply click on the Icon-003.png file, and click OK. The new image object will appear on the page.

4) Use the new image object to completely cover the logo.

Using the mouse, resize the image object so its big enough to cover the entire logo. Then drag it on top of the logo, so it covers all three of the logos objects.

Tip: You can resize the object proportionally by holding the Shift and Ctrl keys down while dragging one of its resize handles.

5) Right-click on the image object and choose Arrange > Send to Back.

Abracadabra! The logo objects reappear.

Choosing Arrange > Send to Back moved the new image object to the very back of the z-order, putting it at the bottom of the stack of objects on the page. (Note that this includes all of the objects on the page, and not just the four objects that happen to be overlapping.)

You can actually see the z-order in the Project Explorer. The objects in the project explorer tree are listed according to the z-order, with the front object at the top of the tree, and the back object at the bottom of the tree. When you sent the image object to the back of the z-order, it was moved to the bottom of the tree.

Tip: The other commands in the Arrange menu let you move an object forward or back by one position in the z-order stack, or send it straight to the front of the pile.

6) Choose Edit > Select > Next Object Above.

Choosing Edit > Select > Next Object Above selects the object that is one level higher in the z-order, in other words, the object that is one step further from the page.

Note: If you look at the project explorer, you can see which object you have selected and what position it occupies in the z-order.

7) Press Shift+Tab.

You can also select the next object higher in the z-order by pressing Shift+Tab.

Tip: You can cycle through all of the objects on the page by pressing Tab and Shift+Tab. Pressing Tab selects one level forward in the z-order, and pressing Shift-Tab selects one level back.

You should now have the Label1 object selected (the one with Ted Sellers on it).

8) Right-click on the Label1 object and choose Arrange > Send to Back.

Poof! The Label1 object is sent to the back of the z-order, and disappears behind the Image2 object.

Note that the Label1 objects bounding box is still visible:

The bounding box is still visible because the Label1 object is still selected. When an object is selected, its bounding box is displayed in the foreground, on top of any objects that happen to be in the way. This gives you the same access to the object as when its on top, you can resize the label object by resizing the bounding box, or move it around by dragging it with the mouse, just like you would if it wasn't hidden.

9) Make the Label1 object larger by resizing its bounding box.

If you make the Label1 object large enough, it will become visible beyond the edge of the Image2 object.

Because the bounding box appears in the foreground, you can resize or reposition an object when its selected, even if you cant see the object itself.

10) Click on the Image2 object, and choose Edit > Arrange > Bring Forward.

You have to click outside the Label1 objects bounding box in order to select the image object. Once an object is selected, clicking anywhere inside its bounding box wont deselect it, even if another object is in front.

When you bring the Image2 object forward one step in the z-order, the Image1 object disappears behind it. The only object from the logo that is still visible on top of the Image2 object is the Label2 object with R E A L T Y L T D . on it.

In the project explorer, the image objects name has moved one position higher in the list.

11) In the project explorer, drag the Image2 object above the Label2 object.

You can also arrange objects by dragging their names up or down in the project explorer. This is especially useful when you have many objects and you want to move one of them to a specific position in the z-order.

Tip: You can also arrange objects using four buttons on the Align toolbar.

12) Click on Label1 in the project explorer.

Clicking on the name of an object in the project explorer selects the object, even if theres another object in front of it.

Note: You can use the project explorer to select objects that are hidden behind other objects on the page.

13) Double-click on Image2 in the project explorer. On the Settings tab, set the Opacity to 50, and click OK.

Double-clicking on an objects name in the project explorer opens the Properties dialog for that object. Its just like double-clicking on the object itself.

Changing the objects opacity from 100 to 50 makes it 50% opaque (or, conversely, 50% translucent). In other words, it makes the object partially transparent.

Tip: The Opacity setting can be used to produce all kinds of neat effects. AutoPlay even lets you change an image objects opacity dynamically at run time! (This can be done by using the Image.SetOpacity action which lets you set opacity on the fly.)

Getting Rid of Leftovers

No, this isn't an exercise in how to hide last nights overdone pot roast. Instead, its a quick mention of a very handy tool that's built into AutoPlay: the resource optimizer.

If you're anything like me, you probably have to try a bunch of different files before you find the one that fits your project. You might add one image, decide it doesn't look quite right (chartreuse is so passé this year), and then go through five or six others until you find one that you're happy with (they say orange is the new blue).

Remember how AutoPlay keeps a local cache of everything, by automatically copying any files that you use into the project folder? Well, those files are left behind even after you delete the objects that caused them to be copied in the first place. After a while, those leftover files can begin to add up.

Which isn't a problem, exactly...your project will continue to work fine, even with those extra files inside it. They'll never actually break your project. However, they do take up space...and when you're trying to fit every last bit of data onto a CD, or if you're building a single-file executable that's going to be downloaded by half a kazillion people, it can truly pay to trim off any excess fat.

The resource optimizer is an easy way to get rid of all the files that have been left behind. Its like a hypersonic push broom sweeping through your project, clearing away the debris of the design process.

Our tutorial project hasn't been around long enough to accumulate much in the way of unused resources, but we do have at least one file that we aren't using any more. Or, we will once we delete the only object that uses it.

1) Select the Image2 object and press the Delete key.

You can select the Image2 object any way you want - click on it, use the project explorer, cycle through the objects on the page by pressing Tab, etc. The important thing is to make sure its the only object that is selected, and then press the Delete key to remove it from the project. Bye-bye Image2!

2) Click on the Project pane, and navigate into the Images folder.

The Project pane should be tabbed with the Gallery and pane on the right side of the design environment. Clicking on the Project panes tab switches to that pane.

The Project pane is like a window into the project folder. Within it you'll find all of the files that have been added to your project, neatly organized into sensible categories. All of the image files that are added to the project end up in the Images folder. Once you navigate into that folder, you should see the Icon-003.png file (along with all the other image files that have been used so far).

Note that deleting the Image2 object, which was the only object in the project that used that file, didn't delete the file from the Images folder. Once a file has been added to the project, its up to you to remove it. Of course, this is where the resource optimizer comes in.

3) Choose Tools > Optimize Resources. When the Remove Unused Resources dialog appears, make sure the Confirm deletion option is enabled. Click OK to begin the optimization process.

The Remove Unused Resources dialog lets you configure exactly which folders you want AutoPlay to search through - just in case there are some folders in the project that you don't want optimized.

Note: The Docs folder isn't searched by default, because that's where you normally put any external files that you want to distribute with your project. If you decide to optimize the Docs folder, be careful not to delete any files that you wanted to keep.

Its a good idea to leave the Confirm deletion option enabled, so you'll have a chance to override AutoPlay's choices before the files actually do get deleted.

As soon as you click OK, the resource optimizer will begin scanning the project directories, looking for files that aren't referenced anywhere in the project.

4) When the Confirm Delete dialog appears, verify the list of files that AutoPlay wants to delete, and click OK to delete them.

The resource optimizer is very, very fast, so the Confirm Delete dialog will appear almost instantly.

Clicking OK will delete all of the files in the list that have check marks next to them. Make sure you examine the list carefully - once a file is deleted, you cant get it back.

5) Observe that the file has been removed from the Project pane.

As you can see, the Icon-003.png was successfully removed in the previous step.

Tip: Use the resource optimizer to clean up any unnecessary files before publishing your project.

Now that we've covered optimizing and arranging, lets get things back to the way they were before we set off on this little detour.

6) Choose File > Revert to go back to the last save point.

When asked to confirm that you want to proceed, click Yes.

You should end up with the image object and the two label objects back where they were before you centered them vertically on the page.

Choosing File > Revert puts everything in the project back to the way it was the last time you saved the project. This includes all of the object settings and project settings that were saved with the project.

However, it does not include any changes to the files that your project references. In other words, if the files themselves are deleted or modified, choosing File > Revert will not undo those changes.

If you delete a file that your project used the last time it was saved, choosing File > Revert will not restore the file. It will restore any settings that refer to that file, but not the file itself. (If any objects need to display that file, they would display a placeholder message instead, alerting you that the file is not there.)

Tip: The File > Revert feature allows you to undo any number of changes, regardless of the current Undo/Redo level.

Grouping Objects

Now, what if you wanted to center the logo in the middle of the page, without having any of its objects overlap? In order to do that, you need to group the three objects together. Grouping the objects will allow them to be aligned as though they were a single object.

Objects that are grouped maintain their positions relative to one another when you use the alignment tools on them. They essentially act as though they were a single object, allowing you to align them as a group.

1) Select the three objects in the logo, and choose Edit > Group to group them together.

When you group the objects together, their bounding boxes turn green instead of blue. This is just to let you know that the objects are part of a group. (If it wasn't for the green bounding boxes, it would be impossible to tell they were grouped just by looking at them.)

Note: You can ungroup objects by selecting a group and choosing Edit > Ungroup.

2) Click on the page surface to deselect the objects, then click on one of the objects in the logo to select the group.

Grouping objects makes it easy to access them all at once. That might seem a bit obvious, but its a really useful feature that can save you a lot of time. When you click on an object that is part of a group, all of the objects in the group are selected automatically.

Tip: If you find yourself always wanting to select and work on a particular bunch of objects, just group em. You can always ungroup them later if you want to work on them individually again.

3) Make sure you're working in Align to Page/Dialog mode.

When you're working in Align to Page/Dialog mode, the Align to Page/Dialog button will be highlighted, like this:

If it isn't, either click on the button, or choose Align > To Page/Dialog to toggle the feature back on.

4) Right-click on one of the objects and choose Align > Center Vertical.

Voila! This time, the whole group is centered on the page, with the three objects maintaining their positions relative to one another.

Whenever you align a group to the page (or to other objects, for that matter), the entire group is positioned as though it were a single object.

Note: A group is just a bunch of objects that are always selected together, and that maintain their positions relative to one another when you use the alignment tools on them. Its almost like the group becomes a single object.

5) Click on Label1 in the project explorer. In the Position category of the properties pane, set Left to 346 and Top to 121.

In the default workspace layout, the project explorer is on the left side of the design environment, above the properties pane. The project explorer contains a list of all the pages, objects, etc. on the current page. You can use the project explorer to select objects by name.

When you click on Label1 in the project explorer, the Label1 object is selected by itself. This is because the project explorer lets you select individual objects even if they're part of a group.

This can be helpful when you want to change the settings of a single object within a group. By selecting the object in the project explorer, you can make the changes without having to ungroup the objects and then group them back together again when you're done.

Note: Selecting a grouped object in the project explorer doesn't remove that object from the group...it just selects the object on its own, without selecting the other objects in the group.

Note that the Label1 objects bounding box is still green to remind you that it does belong to a group, even if the other objects in the group are not selected.

6) Click on Image1 in the project explorer. In the Position category of the properties pane, set Left to 375 and Top to 102.

Once again, using the project explorer to select the object by itself lets you change its position without affecting the other objects in the group.

7) Click on Label2 in the project explorer. In the Position category of the properties pane, set Left to 358 and Top to 156.

While were at it, we might as well move the Label2 object as well.

Changing the Left and Top values is the only way to move a grouped object without moving the other objects in the group. Even if you selected the object in the project explorer, moving the object with the mouse would move the entire group.

8) Click on the Image1 object (on the page).

When you click on the image object, the whole group is selected again.

Note: Clicking on a grouped object on the page selects all of the objects in the group.

Pinning Objects

Once you have objects placed where you want them, sometimes its nice to pin them so they cant be moved or resized accidentally.

1) Right-click on one of the grouped objects and choose Pin.

This fixes the position and size of the three objects in the group. Note that when you pin an object, its bounding box turns red.

Pinned objects are surrounded by red bounding boxes by default

Note that the bounding box for the dominant object doesn't have any resize handles on it any more, since you cant resize pinned objects with the mouse.

2) Try to move the objects.

You might need both hands on the mouse to get them to move...

Heh, just kidding. You cant move or resize objects when they're pinned.

To unpin the objects, you would either right-click on one of them and choose Pin again, or choose Edit > Unpin to unpin all of the selected objects on the page at once.

For now, though, just keep the objects pinned so you don't have to worry about moving them by accident.

Distributing Objects

Distributing objects just means adjusting their positions so that they're spread out evenly between two points, or across the page. Its an incredibly useful technique for getting things placed neatly, with equal distances between the objects.

1) Make sure the Align to Page/Dialog mode is off.

When Align to Page/Dialog mode is on, the Align to Page/Dialog button appears selected, like this:

You want the button to be unselected, like this, instead:

If you need to toggle it off, just click the button, or choose Align > To Page/Dialog.

You can also check the Align to Page/Dialog mode by looking at the icon in the Align menu.

2) Drag the Email Address label object up to the top of the page.

You may notice that the object snaps into place as you move it near the upper left corner of the page. This is because AutoPlay's snap-to-page feature is enabled by default. (You can toggle this feature on or off by choosing View > Snap to Page/Dialog.) The snap-to-page feature causes objects to automatically line up with the page edge when you move them within a few pixels of it.

Tip: You can hold the Shift key while moving objects to suppress snapping.

The Email Address, Phone, and Mailing Address label objects should be positioned vertically, with the Mailing Address and Phone label objects close together, and the Email Address label object off by itself.

Don't worry about lining things up carefully; you'll use the alignment tools to take care of that later. (Its actually easier to see what's going on if the objects aren't lined up so well.)

3) Select the Email Address, Phone, and Mailing Address label objects. When you have all three objects selected, choose Align > Distribute Vertical.

To select the three objects together, either drag-select them, or just click on one and then ctrl-click on the other two.

Tip: You can also select multiple objects by clicking and ctrl-clicking on their names in the Object Browser pane (View > Panes > Object browser).

Choosing Align > Distribute Vertical distributes the three objects evenly between the top and bottom ones, so there is an equal distance between all three of them.

In this case, the top and bottom objects stay put, and the Phone object (the one in the middle) moves up so its placed exactly in between.

4) Move the bottom object up so its right underneath the middle one.

In other words, move the Mailing Address label object right up under the Phone label object.

Note: You'll need to select the object on its own in order to move it.

5) Select all three objects and choose Align > Distribute Vertical again.

Once again, the middle object moves so the selected objects are spaced evenly apart.

6) In the properties pane, change the FontSize to 11.

When you have multiple objects selected, you can change a setting for all of them at once just by editing it in the properties pane. Since all three of the label objects are set to use a 16-point font size, the value 16 is visible in the FontSize setting.

When you change this value from 16 to 11, all three label objects will switch to using an 11-point font size. (You will actually see the text in the label objects get smaller.)

Note: Any changes that you make in the properties pane are applied to all of the objects that are selected.

7) Select the Email Address object by itself and use the properties pane to increase its font size to 13.

We want the email address to stand out a bit from the other label objects. Making the email address a bit bigger should do the trick.

8) Move the three label objects closer together, and then drag them down below the logo. Use the alignment tools to get the label objects spaced evenly apart and aligned along their left sides.

Start off by eyeballing it, moving the objects closer together and dragging them down to the lower right side of the page, using the above image as a guide.

Once you have the objects more or less in place, select all three label objects and use Align > Left to align them along their left edges. Then use Align > Distribute Vertical to even things up.

Locking Objects

Earlier I showed you how to pin objects so they cant be moved or resized accidentally. Pinning objects prevents the objects from being moved or resized with the mouse, but still lets you access their properties and align other objects to them.

Sometimes, though, it would be nicer if the objects would just get out of the way. For example, if you have a large object on the page with other objects on top of it, or lots of objects in close proximity, it can be difficult to drag select specific objects without accidentally selecting some you don't want to. You could ctrl-click on all the objects that you want to select, one at a time, but it would be better if you could just drag select the objects you're working on and have any finished objects be ignored.

This is where locking objects comes in. When you lock an object, it becomes completely unselectable. Its like the object becomes part of the background. you can click on it or even drag-select around it, but it wont become selected at all. Its almost like it isn't there.

Note: Locking an object has no effect on how the object behaves at run time. The user will still be able to interact with the object the same way, whether its locked or not. It only affects how the object behaves while you're working on the project.

If you're wondering how you would ever get the object back, don't worry...you can unlock an object by right-clicking on it and choosing Unlock from the right-click menu.

To illustrate this, lets lock all of the objects on the page, except for one label object that you will be working with in another lesson.

1) Press Ctrl+A to select all of the objects on the page.

When you press Ctrl+A, all of the objects on the page are selected.

Note: This is the same as choosing Edit > Select > All.

2) Choose Edit > Lock.

All of the objects become locked. Since locked objects cant be selected, their bounding boxes disappear.

3) Try to select one of the objects.

Go ahead. Bet you cant select any.

No, really...you can't. Locked objects don't respond to left mouse button clicks at all. You cant even select them using the project explorer.

Its like the objects aren't even there. But they still are, of course...they're just locked.

4) Right-click on the Email Address label object and choose Unlock to unlock it.

When you right-click on a locked object, a menu appears enabled so you can unlock it. Note that the object also contains a locked icon in the Project Explorer to indicate it is currently locked.

Choosing Unlock from this menu toggles the objects locked status off - in other words, it unlocks the object. It also automatically selects the object for you, so you can see that it has been unlocked.

Tip: You can unlock all of the locked objects on a page at once by choosing Edit > Unlock All.

5) Choose File > Save to save the project.

Be sure to save the project so the work you've done in this lesson isn't lost.

Lesson 3 Summary

In this lesson, you learned how to:

  • Select multiple objects

  • Move more than one object at a time

  • Change the settings of several objects at once

  • Align objects to each other

  • Align objects to the page

  • Arrange objects in the z-order

  • Remove unused files from the project

  • Group objects together

  • Pin objects (so they cant be moved or resized)

  • Distribute objects evenly

  • Lock objects (so they stay out of your way)


Lesson 4:

Lesson 4: Buttons, Actions and Pages

This lesson is all about interactivity. Interactivity is important-it lifts your AutoPlay application above the limitations of mere pamphlets and traditional business cards that dwell in the lowly realm of paper. Interactivity makes your application seem alive and responsive, and lets it actually perform important tasks for the user, just like any other Windows program.

There are several ways to make your applications interactive, but the three most important tools at your disposal are buttons, actions and pages. Buttons are one of the coolest features of AutoPlay. They look great, are easy to use, and instantly give your application a truly professional polish. Actions, and the events that you add them to, let you make your application do stuff. Pages are the surfaces that you put buttons and other objects on. And since your imagination shouldn't have to fit on one page, we'll show you how to add more pages to your project.

What You'll Learn

In this lesson, you'll learn how to:

  • Add interactive buttons

  • Match the width and height of several objects at once

  • Change the appearance of the button text

  • Duplicate multiple objects

  • Add simple actions like Application.Exit and File.Open

  • Add a blank page to the project

  • Duplicate an existing page

  • Add navigation buttons using Page.Jump actions

  • Copy objects from one page to another

  • Send email with a Quick Action

How Long Will It Take?

This lesson takes approximately
30 minutes to do.

Starting the Lesson

If you're continuing from Lesson 3, you should still have AutoPlay running with the Tutorial project open. If so, you're ready to move on to the next exercise: Adding Buttons.

Otherwise, you'll need to open the project file that you saved at the end of Lesson 3.

1) Open the Tutorial.autoplay file that you saved in Lesson 3.

When you save a project, AutoPlay automatically creates a project folder for it inside your "My Documents\AutoPlay Media Studio 8\Projects" folder. This project folder is where everything that belongs to the project is stored including the project file, which contains all of the settings used in the project.

The project folder and the project file always have the same name that you gave to the project when it was created. The project files name ends with a ".autoplay" file extension.

Since you named this project "Tutorial" in Lesson 1, the name of the project folder will be Tutorial, and the name of the project file will be Tutorial.autoplay. So, the path to the project file should be something like:

...\My Documents\AutoPlay Media Studio 8\Projects\Tutorial\Tutorial.autoplay

To open the project, you just need to open that project file.

Adding Buttons

Buttons are special interactive objects. They respond automatically to the user by changing their appearance when you move the mouse over them or click on them. In fact, each button has four different appearances, or "states," built into it: Up, Down, Highlight, and Disabled.

There's a different image for each state built right into the button file. By switching between these images, a button can appear animated and interactive-glowing when the user moves the mouse over it, for instance, and appearing pushed in when the user clicks on it. With full support for alpha transparency and variable opacity, buttons can even come with built-in drop shadow effects and have smooth, rounded edges.

Buttons are a great place to put actions, since they usually look like something you would want to click on. And to help the user know what the buttons will do, each button can have custom text on it, just like a label object. The text can even change color in each of the different states, so it fits in with each states appearance perfectly.

Buttons come in all shapes, sizes and colors. The professionally-designed buttons that come with AutoPlay resize well and even look great when they're stacked on top of each other, thanks to the built-in drop shadows which give our buttons a nice, three-dimensional appearance.

In short, buttons rock.

Tip: If you need more buttons, you can purchase add-on packs from Indigo Rose. Or just build your own buttons using the AutoPlay Media Studio Button Maker, which you can access by choosing Tools > Button Maker.

1) Choose Object > Button to add a new button object. When the Select File dialog appears, click the Gallery button.

Choosing Object > Button opens the Select File dialog so you can select a button file to add.

Tip: You can also add a button object by clicking the New Button Object button.

2) Select the 0001-windows-7.btn file and click OK.

To select the 0001-windows-7.btn file, just find it in the list of button files and click on it. (You may have to scroll the list to find it. As you're scrolling, have a look at the other buttons that are included. There are a lot of cool buttons in there.)

When you click OK on the Select File dialog, the dialog closes and the button is added to the project. Like all objects that you add in this way, it starts out positioned in the upper left corner.

3) Resize the button so its 160 pixels wide and 45 pixels tall. Position it 14 pixels from the left of the page, and 89 pixels from the top.

To resize the button object, you can either drag the resize handles, or set the width and height directly in the Position category of the properties pane.

To position the object, either move it into place by dragging it, or edit its Top and Left settings directly.

Tip: If you prefer the drag method, you can use the position and size readouts on the status bar to set the object's size and position precisely.

Now let's change the text to something that better describes what this button does. (Or in this case, what the buttons going to do, once we add an action to it later in this lesson.)

4) In the properties pane, change the Text setting to Ted Sellers Online.

The Text setting is found inside the Object category. This should be the first category at the top of the properties pane.

Note: If the Object category isn't visible, then the button object isn't selected - in that case, click once on the button object to select it.

To change the text that is displayed on the button object, highlight the contents of the Text setting and type the new text in. (In this case type in the words Ted Sellers Online.)

Tip: A quick way to select all of the text in a setting is to double-click on the name of the setting in the left-hand column of the properties pane. In this case, that means double-clicking on the word Text itself. Whenever text in a field is highlighted, anything you type will instantly replace the highlighted text.

When you're done typing the new text in, press Enter.

Note: Don't worry if the text is to big to fit on the button...we'll change the buttons font size in a moment.

(Later in this lesson, well add an action to this button to make it open Teds website.)

5) Use the Project pane to add another 0001-windows-7.btn button.

In Lesson 2, you opened the Project pane by choosing View > Panes > Project Browser. It should still be tabbed on the right side of your screen, together with the Gallery pane. In that case, all you need to do is click on the Project panes tab to bring it to the front.

If the Project pane isn't visible anywhere on your screen, choosing View > Panes > Project Browser will toggle it on. (There will be a check mark next to Project Browser in the View > Panes menu when the Project pane is visible. If that check mark is already there, it means the Project pane is actually somewhere on the screen already.)

Double-click on the Buttons folder

Double-click on the Buttons folder in the Project pane. This will show you a list of all the button files that have been added to your project so far. Since you've only added one kind of button, there should only be one item in this list: the 0001-windows-7.btn file that you added earlier.

Selecting the button file

Note: This was explained more fully in Lesson 2, but here are the basics to refresh your memory. Every project you create has its own folder, called the project folder. Each project folder is divided into subfolders. When you add a button file to your project, a copy of the file is placed inside the Buttons subfolder. You can use the Project pane to navigate to this subfolder.

When you click on the 0001-windows-7.btn file on the Project pane, a fully working preview of the button appears on the Preview pane. (If the Preview pane isn't visible, use the View > Panes > Resource Preview menu item to toggle it back on.)

You can use the Preview pane to see how the button will respond to the mouse in your completed application.

Trying it out in the Preview pane

Move the mouse over the button in the preview area. See how it changes its appearance slightly? This is the buttons highlight state. (Buttons become highlighted when you move the mouse over them.)

Click on the button in the preview area, and it changes its appearance again. This time, you're seeing the buttons down state. (Buttons are typically pressed down when you left-click on them.)

Move the mouse away from the button in the preview area, and it returns to normal. This is the buttons up state.

Note: The Preview pane allows you to try a button before you add it to your project.

To add the button to the page, just drag the 0001-windows-7.btn file from the Project pane onto the page. A new button object will be placed at the spot where you drop the file. Move the new button object to just below the first one.

Tip: You can also drag a button directly from the Preview pane.

6) In the properties pane, set this buttons text to About Ted Sellers.

When you change the Text setting, About Ted Sellers appears on the button object. (Later on, we'll make this button jump to another page that has information about Ted on it.)

Matching the Width and Height

The new button object that you added doesn't have the same width and height as the first one. This is because the new object still has its default width and height - it hasn't been resized yet like you resized the Ted Sellers Online button.

You could resize the About Ted Sellers object the same way you resized the Ted Sellers Online button, but theres an even faster way to do it. Using the alignment tools, you can get one object (or many objects!) to match another objects width or height in no time flat.

1) Select both buttons. Click on the Ted Sellers Online button to make it the dominant object in the selection.

The first step in matching an objects width or height is to select the objects that you want sized the same, with the object that is already sized correctly as the dominant object. We want the size of the new About Ted Sellers button to match the size of the Ted Sellers Online button, so the Ted Sellers Online button needs to be the dominant object.

2) Choose Align > Make Same Width.

This makes the About Ted Sellers button the same width as the Ted Sellers Online button...

3) Choose Align > Make Same Height.

...and now the About Ted Sellers button is the same height as the Ted Sellers Online button, too.

Tip: You can also just choose Align > Make Same Size to match the width and height together in one step.

Changing Text Settings

Much like label objects, button objects give you a great deal of control over the appearance of the text that appears on them. You can change the font family and size, make the text bold or italic, and also change the color.

In fact, each button has a different text color for each state the button can assume. This allows the text color to change as the appearance of the button changes. Not only does this contribute to the interactive appearance of the object - making the text brighten as the mouse moves over the button, for example - but it allows the text color to be adjusted to complement the changing color of the button itself. (Black text on a blue button would disappear if the buttons down appearance was also black.)

Lets change the text settings on these buttons a bit so the text will change color when the user interacts with the button.

1) With both objects still selected, change the font size to 12, and the font family to Arial.

The default font size of 9 points is a bit small for these buttons. To change the size, change the FontSize setting from 9 to 12.

Changing the font size for both buttons at once

To change the font family, just click on the Family setting, click the select button, and select Arial from the list.

Note that, since two button objects are selected, the properties pane only shows the settings that can be changed for both objects at once.

2) Change the Highlight color for both objects to Blue (#0000FF).

This is the text color that will be used for the buttons Highlight state, which is shown when the mouse pointer moves over the button.

You wont be able to see this effect until you actually see the project running, though; while you're working on the project, the button is always in its Normal state, so the words Ted Sellers Online will still be black.

3) Change the Click color for both objects to Light Blue (#3366FF).

This text color will be used when the button is in its Click state, which is shown when the left mouse button is clicked on the object.

4) Choose Publish > Preview. When your application opens, move the mouse over the buttons and click on them.

Hey, it works! Each button changes its appearance and text color as you interact with it. Pretty cool, huh?

Note: If you have your computer speakers turned up, you may hear sound effects as you move the mouse over the buttons and click on them. I'll show you how to change these default sounds in Lesson 8. In the meantime, don't be freaked out by the beeps and clicks. (If you hear voices, though, you have my permission to be as freaked out as you want to.)

5) Exit from the preview.

To exit from the preview application, either click the close button on the applications title bar, or press Alt-F4 while the application is selected.

When you exit from the application, you should be returned to the AutoPlay design environment. If not, use Alt-Tab to bring AutoPlay back to the foreground.

Duplicating Objects

Once you have a couple objects set up the way you want, its easy to add more objects with the same exact settings. Just duplicate em!

1) Select both button objects, and either choose Edit > Duplicate, or press Ctrl+D.

Both objects are duplicated instantly. Welcome to button cloning! Note that you can easily duplicate multiple objects at once.

The new button objects have the same settings as the originals, with only two exceptions: the names are different (because they have to be), and they're positioned a bit down and to the right (so its easier to see the new objects).

You can't see the object names in the properties pane at the moment - object names are hidden when you have multiple objects selected. But they are different.

Note also that the new button objects are selected, and the originals aren't. This makes it easy to move the new objects somewhere else - you don't have to bother with deselecting the old ones first.

Tip: When you need to add lots of similar objects, you can keep pressing Ctrl+D to add more and more clones to the page.

2) Move the new buttons below the two originals.

Just drag the two objects down together so the four buttons form a sort of column on the page.

3) Change the text of the third button to Video Presentation.

Before you change the text on the third button, you need to deselect the other button first. Otherwise, you'll end up changing the text on both buttons.

To deselect the other (fourth) button, just ctrl-click on it. This will remove it from the current selection, leaving only the third button selected. Or, if you prefer, you can click on the page surface to deselect everything, and then click on the third button (Button3) to re-select it alone.

Once you have Button3 selected by itself, change the Text setting from Ted Sellers Online to Video Presentation by double-clicking on it and changing the text field.

This button will be used to jump to a page with a short video on it. (Well add the action to perform this magic later.)

4) Double-click on the bottom button, type Exit, and click OK.

Double-clicking on a button object opens the Button Properties dialog and automatically highlights all of the text in the Text setting for you.

When you type in the word Exit, it replaces the existing text.

Tip: A quick way to change the text in a button object is to double-click on it, type in the new text, and click OK.

As you've probably guessed, this button will be used to exit the application.

Lining Them Up

Before we add any actions to these buttons, lets line them up nicely on the left side of the page.

1) Make sure the top button (Button1) is still positioned at 14, 89.

To confirm an objects position, just select it (by clicking on it) and either look at the position readout on the status bar, or look at the Left and Top settings in the Position category of the properties pane.

Note: 14, 89 is shorthand for 14 pixels from the left, and 89 pixels from the top.

2) Move the bottom button (Button4) to 14, 270.

To move the Button4 button object, either drag it into place (using the position readout on the status bar as a guide), or set its Left and Top settings to 14 and 270, respectively.

3) Select all four buttons. Right-click on the top button object (Button1) and choose Align > Left.

Right-clicking on the top button object will make it the dominant object. When you choose Align > Left, all four buttons are lined up with that object.

4) Right-click on the top button object and choose Align > Distribute Vertical.

When you choose Align > Distribute Vertical, the two middle objects will be repositioned so there is an equal distance between all four of the objects.

Adding Simple Actions

Now lets make the buttons do something.

In AutoPlay, getting an object to do something means adding an action to one of the events that the object can respond to.

Events are just things that can happen when your application is running. For example, most objects have an On Click event, which is triggered when the left mouse button is clicked on that object. To make something happen when the object is clicked, you simply add an action to its On Click event.

Actions are just commands that tell the application to do something. There are actions to do all sorts of things, like changing the text in a label object, running external program files, telling a video object to start playing, or jumping to another page.

Quick Actions are special easy-to-use actions that take care of simple tasks without any scripting. For example, most objects let you configure a single Quick Action that will be performed when the object is clicked. Adding a Quick Action is an easy way to make something happen when you click on an object.

Every object has its own events, and each event can have its own actions. The actions that you add to an objects event are only performed when that specific event is triggered - in other words, events are object specific. This means that your application can do completely different things when the user clicks on different objects. For example, you could make clicking on one object start playing an audio file, while clicking on another object makes the application jump to another page. Each click would trigger the specific objects On Click event, causing that events list of actions to be performed.

1) Click on the page surface, then click on the Exit button (Button4).

In order to add an action to the Exit button, you need to have that button object selected by itself. Clicking on the page surface deselects all of the objects, so you can select the Exit button object on its own.

2) Make sure the Actions category is open in the properties pane.

The Actions category is the last category in the properties pane. When you have an object selected, all of the places where actions can be defined for the object are listed in this category.

Tip: You might need to scroll to the bottom of the properties pane in order to see all of the items in the Actions category.

These places generally correspond to the events that the object can detect and that you can respond to. (The lone exception is the Quick Action, which is essentially a simpler version of the On Click event.)

It looks like this button object has five places where actions can be defined:

  • Quick Action, which is where you can choose from a list of the most common responses to a mouse click on the object and "program" it using a streamlined configuration interface

  • On Click, which is triggered when you click on the button

  • On Right-Click, which is triggered when you right-click on the button

  • On Enter, which is triggered when the mouse moves onto the button (when the mouse pointer enters into the objects space)

  • On Leave, which is triggered when the mouse moves off of the button (when the mouse pointer leaves the objects space)

Note: Any transparent parts of the object are ignored as far as On Enter and On Leave are concerned. The mouse has to actually enter or leave a non-transparent part of the button for the event to be triggered.

Right now, all six items have -- None -- next to them, which indicates that no actions will be performed when these events are triggered for this object.

3) Click on the On Click setting, then click the edit button to bring up the script editor.

Clicking the edit button opens the script editor.

The script editor is where you can add actions to each of the objects events. There are four tabs on the script editor - one for each of the events that this button object can respond to.

Note: There is always one tab on the script editor for each event an object can respond to. If you select an object that has five events, there will be five tabs in the script editor.

When you click the edit button in the properties pane, you're automatically taken to the corresponding tab on the script editor. For instance, since you clicked the edit button for the On Click setting, the script editor opened directly to the On Click tab. If you had clicked on the On Leave setting instead, and then clicked the edit button, the script editor would have opened to the On Leave tab.

4) Click the Add Action button. When the New Action wizard appears, switch to the Application category and then click on the action called Application.Exit.

The New Action wizard will walk you through the process of adding an action to the script editor. The first step is to choose a category using the drop-down list. (In this case, it isn't really necessary, since the action we want to add is already visible in the default All Actions category. But it doesn't hurt to become familiar with the way the wizard works.)

When you choose the Application category from the drop-down list, all of the actions in that category will appear in the list below.

To select an action from the list, just click on it.

When you select an action in the list, a short description appears in the area below the list. In this description, the name of the action will appear in blue.

Click the action name to access action-specific help

You can click on this blue text to get more information about the action from the online help. (Go ahead and click on the blue Application.Exit to see the online help topic for this action. When you're done, just close the online help window and return to the AutoPlay design environment.)

5) Click Next to advance to step 3 in the action wizard.

Some actions have one or more settings that you can configure in step 3 of the action wizard. When that is the case, you can click the Next button to advance to step 3, where you can customize the action.

In this case, the Application.Exit action allows you to specify a return code that will be returned by your AutoPlay application after it exits. (This allows you to pass information back to the program or batch file that launched the application, for example if an error occurred you could return an error code so the batch file could proceed accordingly.)

For our purposes, the default return code of 0 is fine. (This is the standard return code that programs use to indicate that everything's okay.)

6) Click Finish to add the Application.Exit action to the On Click event, and then click OK to close the script editor.

Clicking Finish on the New Action wizard will close the wizard and add the action to the script editor.

When you click OK on the script editor, the script editor will close, and the On Click setting in the properties pane will have 1 Line next to it. The properties pane always shows how many lines of script there are in each of the selected objects events.

7) Choose Publish > Preview. When the application opens, click on the Exit button to close it.

It works! Clicking on the Exit button triggers that objects On Click event, which causes the On Click script to be performed. Since you put an Application.Exit action in the script for that event, the application closes.

Note: The Application.Exit action causes an immediate exit from the application.

8) Select the Ted Sellers Online button and add a File.OpenURL action to its On Click event. Set the actions URL parameter to "http://www.autoplaystudio.com" and leave the WindowMode parameter set to SW_SHOWNORMAL.

Adding a File.OpenURL action to the Ted Sellers Online button object (the one named Button1) is a lot like adding an Application.Exit action to the Exit button object. Just select the button object, click on the On Click setting, and click the edit button to bring up the script editor.

When the script editor opens, click the Add Action button to open the New Action wizard. Choose the File category from the drop-down list to see the list of File actions, and then click on File.OpenURL.

Once you have the File.OpenURL action selected, click Next to move on to step 3 of the New Action wizard. This is where you can configure the actions parameters.

Parameters are just values that get passed to an action. They tell the action the information it needs to know in order to do what we want it to do. For instance, in the case of our File.OpenURL action, the action needs to know what URL we want it to open. So, the first parameter lets you specify the URL of a website.

Since Ted doesn't actually have a website, well use the AutoPlay Media Studio website for this parameter, just for testing purposes. To do that, simply double-click on the URL setting and type "http://www.indigorose.com/ams" into the text field. (Feel free to substitute another websites URL if you want.) When the action is performed, it will open the users default web browser and navigate to this URL.

Note: Make sure you include the quotes! Text strings need to be quoted in action parameters.

The other parameter, WindowMode, lets you specify how the users default web browser should open up - either normally, minimized, or maximized. Its set to SW_SHOWNORMAL by default, which is fine for our purposes.

Constants

SW_SHOWNORMAL is a constant. A constant is just a name that represents a value, essentially becoming an alias for that value. Constants are often used to represent numeric values in parameters. Its easier to remember what effect SW_MAXIMIZE has than it is to remember what happens when you pass the number 3 to the action.

Tip: The File.OpenURL action can also be used to open local HTML files. Just click on the URL parameter, click the browse button, and use the Select File dialog to select a file. The file will be copied into your projects Docs folder and accessed from there. (Note that if the local html file has any links to other local html files, you will need to copy those files into the Docs folder on your own, or the links wont work.)

Once you've set the actions parameters, click Finish to close the New Action wizard. The File.OpenURL action will appear in the list on the script editor. Note that the parameters you provided are listed between parentheses after the actions name, in the same order they appeared in on the New Action wizard, separated by a comma.

Finally, click OK to close the script editor.

9) Choose Publish > Preview. When the application opens, click on the Ted Sellers Online button to open the URL you specified in step 8. When you're done browsing that website, close the web browser, and then click on the Exit button object to close the application.

The File.OpenURL action opens whatever URL that you specify in the program that is registered as the default web browser on the users system. In most cases, this will be some version of Internet Explorer or Mozilla Firefox, but it could also be Netscape Communicator, or even Opera. The important thing is that it will open the website in the web browser that the user is familiar with.

Note that the preview application remains running in the background while you browse the website. The File.OpenURL action is an excellent way to let someone visit a web page without losing their place in your application.

Adding Pages

The other two buttons are going to jump to other pages in the application, so lets start off by adding those pages.

1) Choose Page > Add to add a new blank page.

When you choose Page > Add, a new page is added to the project.

You can see that a new page has been added by looking at the top of the work area, where a second page tab has appeared.

When you add a new page, it is automatically selected, so the new pages name also appears in the properties pane. This new pages name is Page 2. (The first page was named Page1, and the new page gets the next available number.)

2) In the properties pane, change this page's name to About Ted.

To change the page name, just highlight the text in the Name setting and type in the new text.

(Remember to press Enter when you're done to confirm the change to the Name setting.)

When you edit the Name setting, the name of the page also changes on the page tab.

Tip: You can click on the page tabs to switch between pages.

3) On the Project pane, navigate to the Images folder, and locate the file named 630B1151.jpg. Drag this image file onto the page surface. When asked if you want to set this image as your page background, click Yes.

If you remember from Lesson 2, whenever you add an image to your project, a copy of the image file is kept in the projects Images folder. You can access these cached images by using the Project pane.

Since the Project pane remembers where it was the last time you used it, it should still be in the Buttons folder. (We navigated to the Buttons folder earlier in this lesson.) You'll need to navigate out of that folder, and then navigate into the Images folder.

Remember that you can navigate out of a folder by double-clicking on the special up folder (the one with two dots next to it). This moves you up one level in the folder hierarchy.

Once you're in the Images folder, all of the image files that you've used in the project will be listed on the Project pane. This includes the file named 630B1151.jpg which you used for the background image on Page1. To use this image as the background image for the new About Ted page, just drag it onto the page surface. When asked if you want to set this image as your page background, click Yes.

Tip: If you don't want to be asked this question in the future, click on the Don't ask me again checkbox. If you do that, the same answer will automatically be used in the future - either Yes or No, depending on which button you click.

4) Choose Page > Duplicate to add another page just like this one.

Like duplicating objects, you can duplicate the current page. When you duplicate a page, all of its settings and objects are duplicated as well. The only thing that is different on the new page is its name.

Note: If you're wondering why the new page is called Page2, and not Page3, its because AutoPlay always gives new pages (and objects) the smallest available number when it names them. So, when you renamed Page2 to About Ted, the name Page2 became available again.

Tip: You can also duplicate a page by right-clicking on the page tab and choosing Duplicate.

5) In the properties pane rename Page2 to Video.

In the properties pane, rename Page2 to Video.

Tip: You can also change a pages name by double-clicking on the page surface and editing the Name setting on the Page Properties dialog.

Adding Navigation Buttons

Now that we have three pages in the project, we need a way for the user to go from one page to another - in other words, to navigate the application. This is incredibly easy to do: you just add a Page.Jump action to whatever event you want to use as the trigger for the change.

For this project, well use button objects to trigger the page changes - specifically, the On Click events of two buttons on Page1, and of one button each on the About Ted and Video pages.

Note: You don't need to use buttons for this...you could use label objects instead, or paragraph objects, or any combination of objects that have On Click events. For this example, though, well use buttons because they're cool.

Heres how its going to work: on Page1, were going to make the About Ted Sellers button (Button2) jump to the page named About Ted, and the Video Presentation button (Button3) jump to the page named Video.

On the About Ted page, well add a button that will jump back to Page1, and well add one on the Video page, too.

Lets start with the two buttons on Page1.

1) In the project explorer, click on the icon for Page1.

When you click on the Page1 icon, Page1 reappears in the work area. Clicking on a page in the project explorer switches to that page, just like clicking on the page tab.

2) Double-click on the About Ted Sellers button (Button2). Click on the Script tab to switch to the script editor, and click on the On Click tab.

Double-clicking on a button object opens the Button Properties dialog.

Each Button Properties dialog has four tabs: a Settings tab, for object-specific settings; an Attributes tab, for settings that most objects have in common; a Quick Action tab, where you can specify a single simple action that will be performed when the object is clicked; and a Script tab.

The Script tab is, in fact, where the script editor is located.

Note: The script editor is just another way of saying the Script tab on the Properties dialog. One refers to what it is, and the other refers to where it is.

Since button objects can respond to five different events, there are five tabs on the script editor (or, depending on how you want to look at it, five tabs on the Script tab). Clicking on the On Click tab displays the action script for the objects On Click event, which at the moment is empty.

Note: This is the exact same place you are taken to when you click on the On Click event in the properties pane and then click the edit button.

3) Click the Add Action button, choose the Page category, select the Page.Jump action, and click Next. Set the PageName parameter to "About Ted", and click OK.

The Page.Jump action will cause the application to close the current page and open another one. You just need to tell the action which page you want it to open, which you do by setting the PageName parameter.

An easy way to change the PageName parameter to "About Ted" is to click on the PageName field, and then click the select button to bring up a list of all the page names in the project. (Note that since page names are text strings, and string parameters must be quoted, all of the page names in the drop-down list are quoted for you.) Choose "About Ted" from the list, and you're done.

You can also just type "About Ted" into the PageName field if you want.

Once you click Finish, the wizard will close and the action will appear on the script editor.

4) Click OK to close the script editor.

Clicking OK closes the script editor and confirms the changes that you've made in it.

In the properties pane, 1 Line will appear next to the On Click event, to indicate the number of lines that are currently in that events action script.

5) Drag the Video page icon from the project explorer onto the Video Presentation button object (Button3). When asked if you want to add an action to that objects On Click event, click Yes.

This time, we've taken advantage of the drag and drop assistant to add the page jump for us. When you drag a page icon from the page manager and drop it on an object that has an On Click event (like a button or a label), AutoPlay asks if you want to add an action to that event to jump to the page you dragged.

When you click yes, AutoPlay adds the following Page.Jump action to the objects On Click event:

-- Added by the Drag and Drop Assistant
Page.Jump("Video");

6) Double-click on the Video Presentation button object (Button3). When the script editor opens, click on the On Click tab, and confirm that the Page.Jump action was added.

Double-clicking on the button object will open the Button Properties dialog to the same tab that you used last time you had the dialog open. In this case, it was the Script tab, home of your friendly neighborhood script editor.

On the On Click events tab, you can see the action that the drag and drop assistant added for you.

7) Click OK to close the script editor.

That takes care of the two navigation buttons on Page1. Now we just need a way to get back to Page1 from the other two pages. Instead of adding a new button to each page, and having to set up their highlight and click colors from scratch, lets copy one of the buttons from Page1 for a bit of a head start.

Copying Objects

You'll often find yourself wanting to use the same object on more than one page, or set up a new object on one page that is just like an object on another page. In order to copy an object from one page to another, you need to copy it into the clipboard, and then paste it back into the project.

Note: You can make copies of objects on the same page by duplicating them, but if you want to duplicate an object to another page, you need to copy and paste it.

Tip: You can also move an object from one page to another by cutting it instead of copying it. To cut an object, just press Ctrl-X, or choose Edit > Cut. Cutting an object is just like copying one, except that the original object doesn't remain behind - its removed.

1) Make sure the Video Presentation button object is still selected, and press Ctrl+C to copy the object into the clipboard.

When you press Ctrl+C, the currently selected item is copied into the clipboard. (The clipboard is just the place in your computers memory where Windows puts stuff while you copy and paste them.) You can copy and paste objects, just like copying and pasting text in a word processor.

Tip: You can also copy the currently selected object by choosing Edit > Copy.

2) Switch to the About Ted page. Click on the page surface, and press Ctrl+V to paste the object onto the page.

To switch to the About Ted page, just click on its page tab at the top of the work area.

When you press Ctrl+V, a new (copied) button object appears on the page, in the same position as the original. All of the settings are carried over from the original. In this case, since there are no other button objects on this page, even the objects name is copied. (Just like the original, the new button objects name is also Button3.)

Remember the first rule of object naming? No two objects can have the same name, on the same page. When you copy and paste an object, AutoPlay first checks to see if that name is already taken by another object on the page; if it isn't, then it lets the object keep the same name as the original. If the name is already in use on the page, then the object is given a new name, just like it would if you added it from scratch.

Tip: You can also paste an object from the clipboard by choosing Edit > Paste.

3) In the properties pane, change the button objects Text to Back. Set the Width to 114 and the Left setting to 55.

This button is going to be used to go back to Page1, the main table of contents page of our application. We want to leave enough room for the other stuff were going to put on this page, so we've made the button small and put it on the left side.

4) Use the alignment tools to center the object vertically on the page.

To center the object on the page, first make sure you're in Align to Page mode. Then, right-click on the object and select Align > Center Vertical.

5) In the objects On Click event, change the Page.Jump actions PageName parameter from "Video" to "Page1".

This object already has a Page.Jump action on its On Click event, but its currently configured to jump to the Video page. (The action was copied along with the objects other settings.) Since our Back button is already on the Video page, we need to modify the action so it will jump somewhere else. In this case, we want the action to jump back to Page1.

Open the script editor and access the objects On Click event. (There are two ways to do this: you can either double-click on the object, click on the Script tab, and click on the On Click tab...or, you can click on the On Click setting in the properties pane, and then click the edit button.)

You should see the existing Page.Jump action.

You could remove the existing action and then add a new one, but since you'd end up adding another Page.Jump action anyway, you might as well just edit the existing action. (Only the parameter needs to change.)

To edit the action, just double-click on it. Double-clicking on the action opens the Action Properties dialog, where you can modify the actions current parameters.
Click on the PageName parameter, click the select button, and choose Page1 from the drop-down list.

Tip: You can also just edit the actions text directly.

Changing the PageName parameter from "Video" to "Page1"

Finally, click OK to finish editing the action, and then click OK to close the script editor and confirm the change.

Tip: Theres another action you could use to jump back to Page1: a Page.Navigate action with the JumpType parameter set to PAGE_FIRST would jump to the first page listed in the project explorer...which in this case happens to be Page1.

6) Right-click on the object and choose Pin.

Pinning the object prevents it from being moved or resized, so you wont have to worry about moving it by accident. (We already have it right where we want it.)

When you pin the object, its bounding box changes from blue to red (so you can tell that its pinned), and the resize handles disappear.

Of course, if you ever change your mind, you can always just unpin the object and move it somewhere else.

Tip: You can also pin an object by selecting it and pressing Ctrl+P.

7) Copy the button object from this page to the Video page.

To copy the object, just select it (it should already be selected), press Ctrl+C, switch to the Video page (by clicking on its page tab), and press Ctrl+V.

The new object will end up in the same position as the original, with all of the same settings - including the Page.Jump action. Since the original object was pinned, the new object is pinned as well.

Note: You can copy and paste objects when they're pinned.

That's it for this page. You don't even have to adjust the objects Page.Jump action, since its already configured to go to Page1, which is what we want the Back button on this page to do as well.

Trying It Out

Now that we have all this cool navigation built into the project, lets see how it works.

Of course, before we test anything, we should save the project just in case anything goes wrong.

1) Save the project.

Saving the project should be second nature to you by now, so go ahead and choose File> Save, or press Ctrl+S, or click the Save button on the Standard toolbar.

It doesn't matter which method you use. Heck, if you're really cautious, use all three, and then write Saved in triplicate in your work log. (Or scribble it on your napkin at lunch. Then fold the napkin and giggle...but not too loudly, or someone will think you're odd. Believe me, I know.)

2) Choose Publish > Preview and try out the buttons.

Now its time to see these actions in action!

Tip: If you're feeling impatient, choosing Publish > Preview may be too slow. You need results now! In that case, just press the F5 key on your keyboard.

When the application appears, try clicking on the About Ted Sellers button. The application jumps to the About Ted page, with the lonely little Back button on the left. Click on the Back button, and you're instantly taken back to Page1.

The same thing happens if you click on the Video Presentation button. Note that although the Video page looks exactly like the About Ted page, you're actually going to two different pages. (In lessons 6 and 7, well add some objects to those pages so they don't look the same any more.)

When you're done navigating the application, return to Page1 and click on the Exit button. (Or, just press Alt+F4 to exit the application.)

Sending Email

Before we move on to the next lesson, theres one more action we need to add: our Email Address label object needs an action to make it actually send an email.

1) Switch to Page1, and double-click on the Email Address label object. Add a quick action to send an email to ted@sellersrealty.com".

A quick action is a simpler alternative to placing script on an objects On Click event. To add a quick action, double-click the object you want to add it to (in this case, the Email Address label object). When the Properties dialog appears, click on the Quick Action tab, and select Send Email from the Action to run drop-down list.

Notice that when you select Send Email, the properties specific to that quick action are displayed below. Change the Email address property to ted@sellersrealty.com. Be sure to leave the Exit after action option unchecked.

Tip: You can automatically fill in the emails subject field, too. Just put "?subject=" (without quotes) after the email address, followed by the text that you want in the subject line. For example:

"ted@sellersrealty.com?subject=Please send me real estate market info"

...would send an email to ted@sellersrealty.com with Please send me real estate market info as the subject line.

If you're a web monkey like me, you're probably thinking that this is just like a mailto: link in HTML. If so, you're right...and yes, that means you can specify the default body text, and everything else that you can do in a regular mailto: link, too.

2) Click on the Attributes tab. In the Feedback category, change the Cursor setting from Arrow to Hand.

You can use the Cursor setting to change the type of cursor that will be used when the mouse moves over an object in your application.

By default, label objects have their Cursor setting set to Arrow, which is the same type of cursor that appears when the mouse is over the page surface. Changing it to Hand helps show that the object is clickable. (The Hand cursor is the one that is used for button objects. Its also the cursor that appears when you hover over hyperlinks in a web browser.)

Note: Cursor is just another name for the mouse pointer.

Once you've changed the Cursor setting, click Ok to close the Properties dialog.

3) Save the project, and then press F5. When the preview application appears, move the mouse over the Email Address label object.

See how the mouse pointer changes from the arrow to the hand? That's the Cursor setting at work.

Note: You should always save your work after you've made a change that you want to keep.

4) Click on the Email Address label object.

If your system is properly configured, this will start a new email message using your default email program.

Notice how the email address that we supplied is already entered into the To: field. To send this message, you would just need to fill in the subject, type in your message, and click Send.

Since ted@sellersrealty.com isn't a real email address, you don't want to actually send this message, so just close the email (cancel it).

Finally, click on the Exit button to exit from the preview application, and return to the AutoPlay design environment.

Lesson 4 Summary

In this lesson, you learned how to:

  • Add interactive buttons

  • Match the width and height of several objects at once

  • Change the appearance of the button text

  • Duplicate multiple objects

  • Add simple actions like Application.Exit and File.Open

  • Add a blank page to the project

  • Duplicate an existing page

  • Add navigation buttons using Page.Jump actions

  • Copy objects from one page to another

  • Send email with a Quick Action


Lesson 5:

Lesson 5: Status Text

Status text is text that appears when you move the mouse over an object, and then disappears when you move the mouse off of the object. It's a nice way to add a bit more description or instruction to interactive objects.

What You'll Learn

In this lesson, you'll learn how to:

• Add a paragraph object

• Turn off the paragraph object's vertical scroll bar

• Add actions to make the text dynamic, so it changes in response to events

• Add actions to the page's On Show and On Preload events

• Move an action from one event to another

How Long Will It Take?

This lesson takes approximately
20 minutes to do.

Starting the Lesson

If you're continuing from Lesson 4, you should still have AutoPlay running with the Tutorial project open. If so, you're ready to move on to the next exercise: Adding a Paragraph Object.

Otherwise, you'll need to open the project file that you saved at the end of Lesson 4.

1) Open the Tutorial.autoplay file that you saved in Lesson 4.

When you save a project, AutoPlay automatically creates a project folder for it inside your "My Documents\AutoPlay Media Studio 8\Projects" folder. This project folder is where everything that belongs to the project is stored—including the project file, which contains all of the settings used in the project.

The project folder and the project file always have the same name that you gave to the project when it was created. The project file's name ends with a ".autoplay" file extension.

Since you named this project "Tutorial" in Lesson 1, the name of the project folder will be Tutorial, and the name of the project file will be Tutorial.autoplay. So, the path to the project file should be something like:

...\My Documents\AutoPlay Media Studio 8\Projects\Tutorial\Tutorial.autoplay

To open the project, you just need to open that project file.

Adding a Paragraph Object

Paragraph objects are similar to label objects, but they have a few important differences:

• The font size doesn't change when you resize the bounding box...instead, the bounding box determines the area that the text can be displayed in.

• The object's dimensions stay the same even if you change the text with an action at run time.

• You can set a background color for the object.

• You can put a border around the object.

• You can display scrolling text in it, complete with scroll bars.

Paragraph objects are ideally suited for displaying status text. They allow you to specify an area that the text will appear in, and guarantee that the text will never extend beyond it. And, because the bounding box remains constant, you can center the text horizontally within the area, and the center point won' shift when the text changes.

Tip: As you'll see in Lesson 6, the paragraph object's optional scroll bars make it perfect for displaying lots of text, too.

1) Choose Object > Paragraph and click OK.

The new paragraph object appears in the upper left corner of the page. Note the default text , which serves as a reminder that paragraph objects are made for presenting long passages of text.

Tip: You can also add a paragraph object by right-clicking on the page surface and choosing Paragraph from the right-click menu.

2) In the properties pane, change the object's name to Status Text.

This object is going to be the target of some Paragraph.SetText actions, so we might as well give the object a more meaningful name. Since it's going to be displaying status text, we might as well call it that. (If we were going to have more than one object with status text on the screen, we would need to be even more descriptive in the name, like "Status Text Top" or "Navigation Status" or something. But we're only going to need one status text display, so we can get away with calling it "Status Text.")

3) Drag one of the resize handles to make the object bigger.

When you make the object's bounding box bigger, the text reflows to take advantage of the new space. Note that the text wraps around when it reaches the edge of the bounding box, just like a paragraph. (That’s why it’s called a paragraph object.)

Unlike a label object, when you resize a paragraph object, the text size doesn't change. Only the size of the bounding box changes. The text just adapts to the new shape.

4) Resize the paragraph object so its width is 200 pixels and its height is 60 pixels (200 x 60).

The easiest way to resize the object to a specific size is to change the Width and Height settings in the Position category of the properties pane. In this case, just set the Width to 200, and the Height to 60.

You can also just resize the object with the mouse until you get the dimensions right, but I find doing it that way takes longer.

Notice that once again the font size doesn't change when you make the paragraph object smaller; only the bounding box gets smaller.

Since the bounding box is now too small for all of the text to fit, a scroll bar appears on the right side of the paragraph object. (It wasn't there before, because the object's vertical scroll bar is set to Auto. When it's set to Auto, the scroll bar only appears if there isn't enough room in the object for all of the text.)

5) In the Scrollbars category of the properties pane, change the Vertical setting from "Auto" to "Off."

The Vertical setting controls the vertical scroll bar.

When you turn off the vertical scroll bar, the text is essentially "chopped off" at the bottom edge of the paragraph object's bounding box. (The object is sized too small to fit all of the text, so it just displays as much of the text as it can.)

6) Set the object’s Top to 15.

Select the paragraph object by itself, and set its Top setting (in the Position category) to 15.

7) Set the object's font to 14 point Arial, bold and italic.

An easy way to do this is to change the FontSize to 14, and then double-click on FontBold and FontItalic to set them both to true.

Note that the bounding box stays the same size when you change the paragraph object's font size. (If this were a label object, the bounding box would have grown to accommodate the larger text.)

8) Change the object’s alignment to "Center."

Now each line is centered horizontally inside the bounding box.

9) Set the Normal, Down and Highlight colors to #FFFFCC.

We don't want the text to change color on mouse-overs and clicks, so the Normal, Down and Highlight colors need to be the same.

There are two really quick ways to change the colors to #FFFFCC: you can double-click on the object, set the Normal color using the Standard tab of the Colors dialog, and then click Match Normal; or, you can type the hexadecimal into the properties pane, copy it into the clipboard, and paste it into the other two color settings.

For the first method, you double-click on the object, click on the Normal color chooser, click on More Colors, and select the color immediately down and to the left from the center. Click OK to close the Colors dialog, then click Match Normal, and click OK to close the Paragraph Properties dialog.

For the second method, you double-click on the Normal color setting in the properties pane to highlight the hexadecimal text. Then type in #ffffcc, double-click on the text that you just entered, and press Ctrl+C to copy it into the clipboard. Then double-click on the Highlight color value, and press Ctrl+V to paste the text that you copied. Do the same for the Click color, and then press Enter (or just click on another setting), and you’re done.

Tip: Both of these methods are a lot easier to do than they are to describe. If they sound kind of complicated, they really aren't. Changing colors like this is something you'll do pretty often, so it pays to learn faster ways to do it. Try each method out and see which one you like best.

Making the Text Dynamic

Now for the fun part. We're going to make the text in our paragraph object change as the mouse moves over the interactive objects on the page. To do this, we'll give those objects On Enter and On Leave actions. (Which is another way of saying that we'll add some actions to their On Enter and On Leave events.)

1) Click on the paragraph object and double-click on the left column of the Text field in the Properties pane. Press the Delete key to erase the text, then press Enter to accept the change.

We want the paragraph object to start out empty when you first launch the application. The easiest way to do this is to just delete the text from the paragraph object, so that it is empty to begin with.

A quick way to highlight all of the text in a setting on the properties pane is to double-click on the name of the setting, in the left column of the properties pane. When you double-click on the name of a setting, all of the text in the setting is selected.

Once you have the text selected, pressing the Delete key deletes it. Pressing Enter makes the change permanent.

Tip: If you edit the text in a field by mistake, and you haven't pressed Enter yet (or deselected the setting by clicking somewhere else), you can cancel the change by pressing Esc.

Another quick way to delete the text is to double-click on the object and switch to the Settings tab. (Double-clicking on the object opens the Paragraph Properties dialog and automatically highlights all of the text in the Text field for you.) Then press Delete to erase the highlighted text, and click OK to confirm the change and close the dialog.

2) Select the "Ted Sellers Online" button object (Button1), and add a Paragraph.SetText action to its On Enter event. Set the action’s ObjectName parameter to "Status Text" and its Text parameter to "Visit our\nWeb site".

The On Enter event will be triggered whenever the mouse moves onto the button object, "entering" its space.

Tip: If you click on the On Enter setting in the properties pane, and then click on the edit button, you are taken directly to the On Enter event in the script editor.

A quick way to add the Paragraph.SetText action is to click the Add Action button, and then type the letters par on the keyboard. As you type in these letters, the category drop-down will skip ahead to the first category that matches what you typed. Once the Paragraph category is shown, click on the Paragraph.SetText action in the list, and click Next to advance to the second page of the New Action wizard.

The ObjectName parameter lets you specify the name of the object that you want this action to operate on. In this case, we want to change the text in the paragraph object named "Status Text."

The Text parameter lets you specify the text that will be displayed in the object. In this case, we want to display a message indicating what the "Ted Sellers Online" button is for.

The "\n" inside the message represents a newline character. It basically means to start a new line, just like pressing Enter in a text editor. (This is known as an escape sequence. An escape sequence is a special "code" that represents a character that can't just be typed into a string normally. In this case, the code \n represents the invisible character you type by pressing the Enter key.)

Note: Remember to click Finish on the New Action wizard and then click OK on the script editor to finish adding the action.

3) Choose Publish > Preview. When the application opens, move the mouse over the "Ted Sellers Online" button a few times.

When you move the mouse onto the "Ted Sellers Online" button the first time, the text in the paragraph object changes. This is the Paragraph.SetText action at work.

Note that the text in the paragraph object doesn't have any quotes around it. The quotes that you placed around the text in the action's parameters aren't included in the text when it's displayed; they are only there to tell the action that you're giving it a string.

Note: In computer lingo, a "string" is a sequence of characters, including text and anything else that can be typed. Referring to a sequence of letters and symbols as a "string" supposedly dates back to the late 1800s, when compositors would "string together" letters as part of the printing process. (In fact, it's said that they were actually paid by the foot, and not by the word.)

When you move the mouse off the button, the text remains. This is because there’s nothing telling AutoPlay to change the text when the mouse moves off the object.

If we want the text to disappear when you move the mouse off the button, we need to add an action to the object's On Leave event.

4) Exit the preview. Add a Paragraph.SetText action to the "Ted Sellers Online" button's On Leave event. In the action's parameters, set ObjectName to "Status Text" and Text to "".

The On Leave event is triggered whenever the mouse moves off of the button object, "leaving" its space.

Setting the Text parameter to "" tells the Paragraph.SetText action to replace the text in the paragraph object with "nothing." This is what programmers call an empty string. You can use an empty string like "" whenever you want to clear the text out of an object with an action.

5) Choose Publish > Preview, and try out the "Ted Sellers Online" button again.

Voila! Now the text disappears when you move the mouse off of the object.

6) Exit the preview, and add On Enter and On Leave actions to the other interactive objects.

Use the following text for the On Enter events: "Learn more\nabout Ted" for the About Ted Sellers button (Button2), "Watch a video presentation" for the Video Presentation button (Button3), "Exit from this business card" for the Exit button (Button4), and "Email Ted" for the ted@sellersrealty.com label object (Email Address).

Use an empty string ("") for all of the On Leave events.

Tip: When you add an action to an On Enter event, you can switch right to the On Leave tab of the script editor to add an action to the object's On Leave event too. You don't have to actually exit the script editor and re-open it to assign an action to both events.

7) Preview the project, and try out the status text by moving the mouse over the interactive objects.

When you move your mouse over the interactive objects, the text in the paragraph object should appear and disappear.

8) Click on the "About Ted Sellers" button. When the About Ted page appears, click on the Back button to return to Page1.

This is interesting—when you return to Page1, the "Learn more about Ted" text is still showing in the paragraph object. But the mouse isn't even on the About Ted Sellers button any more.

To understand why this happens, you just need to walk through the series of events.

First things first: when you moved the mouse over the About Ted Sellers button, this triggered the object's On Enter event. That event has a Paragraph.SetText action, which changed the text in the paragraph object to "Learn more\nabout Ted."

Then, you clicked on the About Ted Sellers button, triggering the object's On Click event...which set off the Page.Jump action, sending you to the About Ted page.

On the About Ted page, you clicked on the Back button, which triggered that object's On Click event. That event's Page.Jump action sent you back to Page1.

When you returned to Page1, the paragraph object was still showing the "Learn more about Ted" text, because that's the last thing it was told to display. The paragraph object was never told to display the empty string, because the About Ted Sellers button's On Leave event was never triggered. The Page.Jump action took you to the other page before the mouse had a chance to move off the button object and trigger its On Leave event.

Note: Objects always maintain their settings until they're changed by an action...even if you jump to another page and come back.

9) Exit the preview.

Before moving on to the next exercise, exit the application and return to the AutoPlay design environment.

Adding Page Actions

In order to clear out the paragraph object when you return from another page, we need to add an action to one of the page's events.

There are three page events that we could use to clear out the paragraph object: On Preload, On Show, or On Close (there are more events on the page, but these are really the only ones that apply).

• On Preload is triggered after the page has been "created" in memory, but before it is actually displayed on the screen.

• On Show is triggered right after the page appears on the screen.

• On Close is triggered when the page is closed.

Let's try using the On Show event first.

1) Click on the page surface. Add a Paragraph.SetText action to the On Show event. In the action's parameters, set ObjectName to "Status Text" and set Text to "".

We want the Paragraph.SetText action to clear out the paragraph object named "Status Text" every time this page is shown. Setting the paragraph object's text to "" will replace any existing text in it with an empty string, i.e. nothing.

2) Preview the project. Watch the paragraph object as you navigate to and from the About Ted page.

When you return to the first page, see how the text in the paragraph object is visible for a split second before it disappears? (If you have a really fast computer, the effect might not be that noticeable, so watch carefully.) This is because the On Show event isn't triggered until after the page is displayed. As a result, you may see the paragraph object with the old text in it before the Paragraph.SetText action has a chance to change it.

This works, but it doesn't look very professional. It would be better if we could clear out the paragraph object before the page was shown. An easy way to do that is to put the Paragraph.SetText action on the page's On Preload event instead. That way, the paragraph object is cleared before the page is displayed.

3) Exit the preview, click on the page surface, and move the action from the On Show event to the On Preload event.

The easiest way to move an action from one event to another is to cut and paste it.

To cut and paste the Paragraph.SetText action, click on the On Show setting, and then click on the edit button. When the script editor appears, select the line of text that contains the action. This is just like selecting a line of text in a text editor, or in Word. You can use the mouse to highlight all of the text, or you can use the keyboard, or any combination of the two.

Tip: An easy way to select a line of text is to position the cursor at the start of the line, and then press Shift+Down. (Hold the shift key, and press the cursor down key.) This will select the entire line, including the newline character at the end.

Once you have the whole line selected, press Ctrl+X to cut the text. It will be removed from the script editor, and placed in the Windows clipboard.

Note: You can use this same technique to remove an action from the script editor. Since actions are just text, all you have to do is select the text and delete it, and the action is "gone."

To paste the action, just click on the On Preload tab, and then press Ctrl+V. The text will be copied from the Windows clipboard and inserted into the script editor.

Finally, click OK to close the script editor and accept the changes you have made to the events.

4) Preview the project. Navigate to and from the About Ted page.

Now when you go to another page and come back, the paragraph object is already cleared out when you get there. No more flickering!

5) Exit the preview. When you return to the design environment, right-click on the paragraph object and choose Lock.

We aren't going to have to make any more changes to the paragraph object, so you might as well lock it; that way you don't have to worry about selecting it by accident whenever you're working with the other objects on this page.

Locking an object is a good way to get it "out of the way." Once it's locked, you can left-click on it, and even drag-select around it, and AutoPlay will act like the object wasn't even there.

This is especially helpful since the object doesn't have any text in it. With no text inside it, the object is completely invisible unless you select it. (You can see an invisible object when it's selected, because the bounding box gives it away.) Being invisible makes it more likely that you'll click on the object by mistake. So lock it.

Tip: If you ever need to work on the object again, just right-click on it and choose Lock again to unlock it.

6) Save the project.

Now that you have the navigation buttons working the way you want them to, it's a really good time to save the project.

Note: Never forget this important step! You will avoid future heartache by saving the project whenever you make any changes that you want to keep. So, choose File > Save, press Ctrl+S, or click the Save button...whatever method you prefer.

That's it! Job well done.

Lesson 5 Summary

In this lesson, you learned how to:

• Add a paragraph object

• Turn off the paragraph object's vertical scroll bar

• Add actions to make the text dynamic, so it changes in response to events

• Add actions to the page's On Show and On Preload events

• Move an action from one event to another


Lesson 6:

Lesson 6: Scrolling Text

Scrolling text is just text that can be scrolled, either vertically, horizontally, or in both directions. In AutoPlay, scrolling text can be displayed by using a paragraph object, which has built-in support for vertical and horizontal scroll bars.

Scrolling text is useful whenever you want to display more text than you can fit in a given space. For example, if you need to display a long license agreement, or the contents of a readme.txt file, or an article on cubicle horticulture penned by your favorite geek auteur.

What You'll Learn

In this lesson, you'll learn how to:

• Add a panel image to serve as a backdrop and border for some text

• Replace the text in a paragraph object by shift-dragging a text file

• Add a scrollable paragraph object

• Use a custom scroll bar style

How Long Will It Take?

This lesson takes approximately
15 minutes to do.

Starting the Lesson

If you're continuing from Lesson 5, you should still have AutoPlay running with the Tutorial project open. If so, you're ready to move on to the next exercise: Adding a Video Object.

Otherwise, you'll need to open the project file that you saved at the end of Lesson 5.

1) Open the Tutorial.autoplay file that you saved in Lesson 5.

When you save a project, AutoPlay automatically creates a project folder for it inside your "My Documents\AutoPlay Media Studio 8\Projects" folder. This project folder is where everything that belongs to the project is stored—including the project file, which contains all of the settings used in the project.

The project folder and the project file always have the same name that you gave to the project when it was created. The project file's name ends with a ".autoplay" file extension.

Since you named this project "Tutorial" in Lesson 1, the name of the project folder will be Tutorial, and the name of the project file will be Tutorial.autoplay. So, the path to the project file should be something like:

...\My Documents\AutoPlay Media Studio 8\Projects\Tutorial\Tutorial.autoplay

To open the project, you just need to open that project file.

Adding a Panel Image

A panel image is just an image object that you put behind another object to achieve some kind of custom background or picture frame effect. Although you can use any image for this purpose, AutoPlay comes with a number of images that were designed to do just that.

Panel images are especially helpful at providing a sort of "mini-background" behind a bunch of text, to make the text easier to read than it would be on the page background itself. (This comes in handy for those times when you're using a really wild image for the page background.) They can also be used to provide a fancy border to "section off" an area of the page.

Note: The paragraph object has an optional border and background color, which can serve the same purpose as a panel image in many cases. For really cool, professional borders and backgrounds, though, a panel image is the way to go.

1) Switch to the About Ted page.

We're going to add the panel image and the paragraph object to the About Ted page, so before you do anything else, click on the "About Ted" page tab at the top of the work area.

2) Switch to the Gallery pane and click the Images button.

The Gallery pane is tabbed with the Project pane on the right side of the AutoPlay program window. You can switch between these tabbed panes by clicking on the appropriate tab.

Note: Earlier we made the Gallery and Project panes visible. If they are not visible, you can make them visible by using the View > Panes submenu.

The Gallery pane lets you browse the library of files that came with AutoPlay. This library is organized into different sections, each one accessible with a button at the top of the pane. Clicking on the Images button at the top of the pane displays the gallery's image collection.

Like the Gallery tab on the Select File dialog, the Gallery pane remembers the last folder you accessed for each file type it contains. The last time you used the Gallery pane to add an image was in Lesson 2, when you used it to drag a background onto the page. Unless you've navigated somewhere else with it since then, the Gallery should still be "in" the Backgrounds folder.

To navigate to the Elements folder, you need to first move "up" one level by double-clicking on the up folder.

Once you've moved up one level, you can proceed to navigate into the Elements folder.

Note: Navigating in the Gallery pane is just like navigating in the Select File dialog, or in Windows. To reach the files inside a folder, just double-click on it.

3) Preview some of the images in the Elements folder by clicking on the filenames.

As you can see, panel images come in a lot of different shapes, colors and textures.

4) Select the Panel-026.png file and drag it onto the page.

When you're picking an image to serve as a background for text, look for one that has a smooth texture, since "busy" patterns will make it harder to distinguish the letters. You want to pick one with colors that will contrast well with the color of the text. In this case, we'll be using white text, so we don't want to pick anything too bright; white text on a bright background would be difficult or even impossible to read.

A good candidate for this project would be Panel-026.png. It has a solid black background in the middle that will contrast nicely with white text, and a nice shiny blue "frame" around it that will look good against the page background we're using.

It also has a subtle "shine" effect around the edges of the frame. In order to achieve this lighting effect, the image was made a little bit larger than the frame on all sides. In fact, the image was sized to fit perfectly on a page that is 425 pixels tall—just like the pages in our project. This makes it really easy to position the image on our page.

5) Use the alignment tools to center the image object vertically on the page and align it with the right edge of the page.

First, make sure Align to Page/Dialog mode is on. (An easy way to do this is to right-click on the image, and choose Align. If Align to Page/Dialog mode is on, the To Page/Dialog item will have a box around it.) Then, right-click on the object and choose Align > Center Vertical. Finally, right-click on the object and choose Align > Right.

Voila! The image is now positioned perfectly on the right side of the page.

Tip: If View > Snap to Page/Dialog is on, you can also just drag the object into place with the mouse, and it will "snap" into place as you approach the top right corner of the page.

6) Right-click on the image object and choose Pin.

Pinning the image object will make it easier to work "around" the object without moving it by accident. (We'll be placing a paragraph object right on top of the image object.)

Tip: You can also pin an object by selecting it and pressing Ctrl+P.

Adding a Scrollable Paragraph Object

The paragraph object has the built-in ability to display text that is longer or wider than the object itself, with scroll bars to let the user slide the "hidden" parts into view.

In fact, all you need to do to make a paragraph object scrollable is to put more text in it than it has room to display. (By default, new paragraph objects have their vertical scroll bar set to "Auto," which means they will automatically display a vertical scroll bar if the text is long enough.)

There are two basic kinds of scroll bars: vertical, and horizontal. (Vertical scroll bars let you scroll text up and down, while horizontal scroll bars let you scroll text left and right.)

Vertical scroll bars are useful when you're displaying long text documents—in fact, they let you put as much text in a paragraph object as you want. The size of the paragraph object just determines how many lines of text the user can see at any given time.

Horizontal scroll bars are useful when you're displaying text with very long lines, and you don't want the text to "wrap" at the right edge of the paragraph object. Instead, the user can drag the horizontal scroll bar left and right to see all of the text on a line. Although most people find this disconcerting, it can be useful for text that isn't meant to wrap, such as text arranged in fixed-width columns, or program code samples.

Note: Most users don't like having to scroll text horizontally. You should avoid using horizontal scroll bars unless you have a good reason to.

1) Press Ctrl+3 to add a new paragraph object. Double-click on the new object, set its Normal color to white, and click the Match Normal button.

We want the paragraph object to have white text, and we don't want the color to change whenever the user moves the mouse over it, so we need to make sure the Highlight and Click colors both match the Normal color.

2) Change the Vertical scroll bar setting to "On" and click OK.

After you click OK, the paragraph object that was added in the upper left corner of the page will reflect the new settings. Notice that the sample text is in fact white, and the object has a vertical scroll bar.

Forcing the vertical scroll bar on regardless of the object's size will make it easier to position the object in the next step, since the scroll bar affects the amount of room the text has, which in turn can affect where you want to place the object to "center" it on top of the panel image.

3) Position the paragraph object over the panel image and resize it so it fills most of the black space inside the frame.

You want the paragraph object to be smaller than the panel image, so it will fit inside the blue frame that is built into the image.

Now let's load some text into the paragraph object.

4) In the properties pane, click on the Text setting, and then click the edit button.

When you click on the edit button, the Edit Text dialog appears.

At the bottom of the Edit Text dialog, there are four buttons: Load, Save, Print and Spelling.

• The Load button lets you import text from any text file on your system.

• The Save button lets you save the current contents of the Edit Text dialog to a text file.

• The Print button lets you print the current contents of the dialog.

• The Spelling button interactively checks the spelling of the text, letting you choose from a number of suggested spellings for any misspelled words.

We could use the Load button to load a text file into the paragraph object, but since the file we want to load is in AutoPlay's gallery, there's an even easier way.

5) Click Cancel to exit the Edit Text dialog, and click the Docs button at the top of the Gallery pane.

Clicking the Docs button displays the sample document files that are shipped with AutoPlay. The file we want to load into the paragraph object is TedSellers.txt.

6) While holding the Shift key, drag the TedSellers.txt file onto the paragraph object.

Normally, when you drag a text file onto the page, a new paragraph object is created for you automatically—with the entire contents of the text file inside it.

That's pretty darn cool. In fact, we could have used that method to create the paragraph object in the first place.

However, if you hold the Shift key down as you drag a text file onto a paragraph object, you'll replace the text in the paragraph object with the text from the file.

Which you have to admit, is also pretty nifty.

When you drag the TedSellers.txt file onto the paragraph object with the Shift key held down, the contents of the TedSellers.txt file are instantly loaded into the paragraph object.

Tip: There are all sorts of little time-saving tricks like this built into AutoPlay. If you want to slip a few more of them up your sleeve—you know, just in case—see the Drag and Drop Assistant.

7) In the properties pane, change the ScrollbarStyle setting from "Standard" to "Chrome."

The paragraph object allows you to choose between a standard, Windows-style scroll bar, or a custom scroll bar style, like the cool Chrome one that comes with AutoPlay.

8) Try some of the other scroll styles, and select one that looks good with the panel image you chose.

Go ahead and pick whichever scroll bar style looks best to you. (I chose Corporate, since it looks good with the dark background of the panel image we're using.)

Each scroll bar style is actually just an image file with different "scroll bar parts" arranged in a row. Each individual part of the scroll bar is represented by a different section of the image. AutoPlay extracts the parts from this image, and then uses them to build the scroll bar.

The Corporate scroll bar skin

This kind of image file containing different interface parts is usually referred to as a skin file. Indeed, the scroll bar styles are similar to the skin files used by other "skinnable" programs, like Winamp.

Note: AutoPlay's scroll bar images are located in the Plugins\Scrollbars subfolder, inside the folder where AutoPlay was installed. You can add more styles to the list of available scroll styles by copying compatible images into that folder.

Tip: You can also build your own scroll bar skins for AutoPlay using a paint program. The easiest way is to use one of the existing scroll bar images as a template. Simply make a copy of an existing skin file, and then modify the copy, replacing each section of the image with your own corresponding scroll bar part.

Trying It Out

Now that we have everything set up the way we want, let's see some scrolling text in action.

1) Save the project.

It’s always a good idea to save the project before you preview it.

2) Preview the project. When the preview application opens, click on the About Ted Sellers button to go to the About Ted page. Try scrolling the text in the paragraph object up and down.

Pretty cool, isn't it!

3) Exit the preview.

That's it for this lesson.

Lesson 6 Summary

In this lesson, you learned how to:

• Add a panel image to serve as a backdrop and border for some text

• Add a scrollable paragraph object

• Replace the text in a paragraph object by shift-dragging a text file

• Use a custom scroll bar style


Lesson 7:

Lesson 7: Video

If a picture's worth a thousand words, how many words is a video worth?

In this lesson, I'll show you how to add a video to your project, cover some of the basic video settings, and teach you how to control a video using a handful of simple actions.

What You'll Learn

In this lesson, you'll learn how to:

• Add a panel image to frame a video

• Add an attractive text banner to the page

• Add a video object

• Customize the video object's built-in control panel

• Make your own video controls from scratch

• Control the video with a few simple actions

How Long Will It Take?

This lesson takes approximately
25 minutes to do.

Starting the Lesson

If you're continuing from Lesson 6, you should still have AutoPlay running with the Tutorial project open. If so, you're ready to move on to the next exercise: Adding a Text Banner.

Otherwise, you'll need to open the project file that you saved at the end of Lesson 6.

1) Open the Tutorial.autoplay file that you saved in Lesson 6.

When you save a project, AutoPlay automatically creates a project folder for it inside your "My Documents\AutoPlay Media Studio 8\Projects" folder. This project folder is where everything that belongs to the project is stored—including the project file, which contains all of the settings used in the project.

The project folder and the project file always have the same name that you gave to the project when it was created. The project file’s name ends with a ".autoplay" file extension.

Since you named this project "Tutorial" in Lesson 1, the name of the project folder will be Tutorial, and the name of the project file will be Tutorial.autoplay. So, the path to the project file should be something like:

...\My Documents\AutoPlay Media Studio 8\Projects\Tutorial\Tutorial.autoplay

To open the project, you just need to open that project file.

Adding a Panel Image

As you saw in the previous lesson, a panel image is just an image object that you put behind another object to achieve some kind of custom background or picture frame effect. Let's use another panel image to provide a "frame" for our video object.

1) Switch to the Video page.

First things first. We're going to add this panel image to the Video page, so click on the "Video" page tab at the top of the work area.

2) Click the Images button on the Gallery pane.

Clicking the Images button at the top of the Gallery pane displays the collection of images the gallery.

Since you used the Gallery pane to add an image from the Panels folder in the previous lesson, the Images section of the Gallery pane should already be displaying the contents of the Panels folder.

3) Select the Panel-027.png file and drag it onto the page.

The Panel-027.png file is similar to the Panel-026.png panel image that we used in Lesson 6, but its frame is designed to fit around a standard 320x240 video.

4) Use the alignment tools to center the image object vertically on the page and align it with the right edge of the page.

Make sure Align to Page/Dialog mode is on. (An easy way to do this is to right-click on the image, and choose Align. If Align to Page/Dialog mode is on, the To Page/Dialog item will have a box around it.)

Then, right-click on the object and choose Align > Center Vertical.

Finally, right-click on the object and choose Align > Right.

Voila! The image is now positioned perfectly on the right side of the page.

5) Right-click on the image object and choose Pin.

Pinning the image object will make it easier to work "around" the object without moving it by accident.

Tip: You can also pin an object by selecting it and pressing Ctrl+P.

Adding a Text Banner

The video we're going to add is a short presentation about a new home design called the "Magnolia." To help introduce the video, let's place an attractive text banner across the top of the page.

In order to make the text stand out, we'll use a paragraph object with white text on a blue background.

1) Right-click on the page surface and choose Paragraph.

Make sure you right-click on the actual page surface, and not on part of the panel image. (If you select the panel image by mistake, try right-clicking further to the left.)

Choosing Paragraph from the right-click menu will add a paragraph object to the page.

2) Double-click on the new paragraph object to open the Paragraph Properties dialog. Change the object's text to Magnolia.

When you double-click a paragraph object, all of the text in the Text setting is automatically highlighted for you, so you should be able to just type the text right in.

Note: You want this text to replace the existing default text, so make sure the old text is highlighted before you type the new text in.

3) Set the Normal color to white, and click the Match Normal button.

We want the paragraph object to have white text, and we don't want the object to appear interactive, so we need to make sure the Highlight and Click colors both match the Normal color.

4) Click OK to close the Paragraph Properties dialog.

When you click OK, the Paragraph Properties dialog closes and the new paragraph object appears where you right-clicked on the page.

5) In the properties pane, change the Alignment setting from "Left" to "Center."

A quick way to change this setting is to double-click it.

Double-clicking the Alignment setting advances it to the next item in its list.

Since paragraph objects start out with their Alignment set to "Left" by default, double-clicking on the Alignment setting switches it to "Center." (If you double-clicked again, it would change from "Center" to "Right.")

This is a quick way to change settings that give you two or three options to choose from.

6) Change the FontFamily to Georgia, FontSize to 20, and FontItalic to "true." Leave FontBold set to "false."

We want the paragraph object to use an italicized, unbolded, 20-point Georgia font.

7) Set BorderStyle to "Solid" and BackgroundStyle to "Solid." Leave the BorderColor black (#000000), and set BackgroundColor to #5987C0.

In order to see the object's background color, you need to set its BackgroundStyle setting to "Solid." Setting BorderStyle to "Solid" adds a thin black border around the object.

Note: The border color is already set to black so it doesn't need to be changed.

To set the object's background color, double-click on the BackgroundColor setting, type #5987c0, and press Enter.

8) In the Scrollbars category, set Vertical to "Off."

We don't want the paragraph object to have a vertical scroll bar. Although we'll be making the paragraph object larger than the text inside it, which should prevent the scroll bar from appearing even if it's set to "Auto," it doesn't hurt to turn the scroll bar off just to be sure.

9) Set Left to 255, Top to 17, Width to 345 and Height to 44.

This will place the paragraph object above the panel image, near the top of the page.

10) Right-click on the paragraph object and choose Lock.

Locking the object will keep it out of your way for the rest of this lesson.

Adding a Video Object

AutoPlay's video object lets you display full-motion video right on the page. You can use it to show all sorts of media files, from training videos and product previews, to home movies and music videos.

Tip: You can also use a File.Open or File.Run action to display a video in an external viewer program. Of course, displaying a video right on the page results in a more seamless user experience.

Note: Video objects will always appear on top of other kinds of objects, no matter how you arrange the objects on the page (i.e. regardless of the z-order). There are technical reasons why this is so, but suffice it to say that it has to do with the way videos are drawn on the screen.

1) Choose Object > Video. When the Select File dialog appears, click the Gallery button.

Choosing Object > Video opens the Select File dialog. Clicking the Gallery button allows you to access a small sample video that comes with AutoPlay.

2) Select the Magnolia.mpg file, and click OK.

After you click OK, the new video object appears in the upper left corner of the page. A single frame from the video appears in the object, so that as you work on the project you can have a general idea of what it's going to look like when it starts.

(In this case, the frame happens to be black, since the Magnolia.mpg video begins with a fade from black.)

Notice the standard video controls at the bottom of the video object. This is the object’s control panel. On the control panel, there is a play/pause button, a stop button, a position slider, and an elapsed time readout.

Note: The play button toggles between play and pause: it switches to the pause button when the video is playing, and then switches back to the play button when the video is paused.

3) In the properties pane, change the ControlStyle setting from "AMS-Gray" to "AMS-Blue."

The ControlStyle setting lets you select from a list of control panel styles. You can use this setting to change the appearance of the built-in video controls, or to hide the control panel completely.

Each style in the list corresponds to a skin file located in the Plugins\Transports subfolder, inside the folder where AutoPlay was installed.

A skin file is just an image with different "control panel parts" arranged in a row. Each individual part of the control panel is represented by a different section of the image. AutoPlay extracts the parts from this image, and then uses them to build the control panel.

The AMS-Blue control panel skin

Tip: You can build your own control panel skins for AutoPlay using a paint program. The easiest way is to use one of the existing images as a template. Simply make a copy of an existing skin file, and then modify the copy, replacing each section of the image with your own corresponding control panel part.

4) Try changing the settings inside the Control Panel category.

The Control Panel category has six settings inside it: ControlStyle, Time, PanelColor, TextColor, ControlButtons, and Slider. You can use these settings to show or hide the different parts of the control panel and adjust what they look like.

Note: The control panel, and the controls on it, are all completely optional. You can choose to hide the whole control panel, or hide any of the individual parts.

Experiment with these settings to see some of the different control configurations you can come up with.

5) In the Special category, check that AutoStart is set to "True," and that Loop and Border are both set to "False."

The AutoStart setting controls whether the video will begin playing automatically whenever the page it's on is shown. We want the video to start playing as soon as the user jumps to the Video page, so make sure this is set to "True."

The Loop setting controls whether the video will automatically restart from the beginning when it reaches the end. In this case, we just want the video to stop when it reaches the end, so leave it set to "False."

The Border setting controls whether the video object will have a black border around it. You can turn it on if you want, but I think this video looks fine without a border.

In short: make sure all these settings are set to their default values. (Okay, I'll admit it...this step was just an excuse to point out what those settings do.)

6) In the Object category, make sure VideoScalingMode is set to "Maintain Aspect."

Video Scaling Mode controls whether the video will maintain its original aspect ratio, or will "stretch" to fill the size and shape of the bounding box. Stretching the video usually makes it look much worse, but it can be helpful if you really don't want any black bars around the video, and don't want to resize the object to make the black bars go away. (It's usually better to keep Scaling Mode set to "Maintain Aspect," and just adjust the size of the video object instead to eliminate any black bars.)

Tip: Preserving the original aspect ratio is important for image files and videos, which often look distorted if they're stretched disproportionately. An easy way to preserve an object's aspect ratio is to right-click on the object and choose Keep Aspect. (If you need to, you can restore the object's original aspect ratio by right-clicking on it and choosing Restore Size.)

7) In the Position category, set Width to 320, and Height to 240. Position the object so it fits just inside the frame of our panel image. Once it’s in place, press Ctrl+P to pin the object.

The left, right, and bottom sides of the video object will probably need to overlap the frame of the panel image by just a smidgeon. But that's okay.

Tip: A trick for setting the object's position precisely is to drag it more or less into place with the mouse, and then move it in tiny increments with the cursor keys. By moving the object back and forth across the inside edge of the frame, one pixel at a time, you can see the exact position where the top of the object matches the top of the black background on the panel image.

If you'd rather just set the object’s position directly, set Left to 268, and Top to 93.

Once it's in place, pressing Ctrl+P will pin it so that it can't be moved or resized any more.

Note: You don't have to pin the object, but this is something I like to do when I have an object where I want it. I find it easier to work around objects if I don't have to worry about moving them by accident.

8) Choose Page > Preview to preview the current page.

Choosing Page > Preview temporarily builds and displays the current page, so you can see how it will look and work when it is seen as part of the application.

Tip: You can also preview a page by right-clicking on its page tab and choosing Preview.

Note that the video starts playing automatically as soon as the page is shown. This is because the video object's AutoStart setting is set to "True." (The same thing will happen each time the users navigate to this page in the full application.)

Previewing the page is often faster than previewing the whole project, because AutoPlay doesn't have to build the whole project—it only has to build one page. More importantly, you don't have to navigate all the way from the start page just to get to the page that you want to test. (Which also means you can try out a page before you've added any Page.Jump actions to get to it from the start page.)

9) With the preview application selected, press Alt+F4.

Pressing Alt+F4 when the preview application is selected (i.e. when it's the "foreground application" in Windows) immediately closes the application.

You can use this method of exiting from the preview when your application doesn't have a title bar.

Of course, since your application does have a title bar, you can also exit from the page preview by clicking the Close button.

Adding Custom Video Controls

In addition to the built-in video controls on the video object's control panel, you can use AutoPlay's video actions to provide your own "homemade" video controls.

1) Select the video object. In the properties pane, set ControlStyle to "None."

Changing the ControlStyle setting from "Basic Blue" to "None" removes the control panel from the object completely.

2) Select the "Back" button object (Button3) and press Ctrl+D to duplicate it. Press Ctrl+P to unpin the new object, and move it down below the video object.

Now, we could just add a new button object, and set it up to be like the other buttons in the project, but using the Back button as a template is much easier. This way, we don't have to set the object's Normal, Click and Highlight colors—they're already set for us.

Note that the new object's name is Button1, since 1 is the first number that isn't used in a button object's name on this page.

Wait a minute...isn't this the second button that you've added to this page? Indeed it is! But since the name "Button1" hasn't been taken yet, it gets used first. Remember how the "Back" button carried its name over when you copied and pasted it in lesson 4? Since that button's name is Button3, this leaves the first two default names "open" for new button objects to use on this page.

3) In the properties pane, change the object’s Width to 55 and its Height to 27. Change the font Family to Verdana, and the font Size to 6. Set Bold and Italic both to "True." Change the object’s Text to PLAY.

This is going to be our play button. Setting the font to 6-point Verdana makes the text small enough to fit on a very small button, without being too hard to read. (Making the text use only capital letters helps get the most visibility out of such a small font.)

4) In the properties pane, set YOffset to 1.

The YOffset setting allows you to fine-tune the vertical position of the text on the button object. It specifies the number of pixels that the text should be offset vertically from its default position.

Sometimes, changing an object's size or font settings will cause the text to be rendered off-center. In this case, the text was being drawn a little bit too high with the default offset of 0. Setting the Y offset to 1 moves the text down by one pixel, so that everything is in its right place on the object again.

5) Click on the PLAY button, and press Ctrl+D to duplicate it. Change the new object's Text to PAUSE.

This will give you an exact copy of the play button.

Tip: You can replace the button image that is shown in a button object by dragging a new image onto it with the Shift key held down.

6) Click on the PAUSE button, and press Ctrl+D to duplicate it. Change the new object’s Text to STOP.

Once again, you want to duplicate the object and end up with a similar STOP button.

You should now have a total of three little button objects: one with the word PLAY on it, another with the word PAUSE on it, and a third with the word STOP.

Note that the name of the third button—the one with the word STOP on it—is not Button3, but Button4. This is because the name "Button3" was already taken by the Back button. So, AutoPlay skipped ahead to the next available default name for a button object on this page, which in this case was "Button4."

7) Turn off Align to Page/Dialog mode.

Make sure Align to Page/Dialog mode is turned off. (An easy way to check this is to right-click on an object, and choose Align. If Align to Page/Dialog mode is on, the To Page/Dialog item will have a box around it.)

If Align to Page/Dialog mode is on, choose Align > To Page/Dialog to turn it off.

8) Drag the STOP button to the right a bit. Select all three button objects, make the PLAY button dominant, and choose Align > Top, followed by Align > Distribute Horizontal.

The goal is the get the three objects lined up horizontally and distributed evenly, with PLAY on the left and STOP on the right, like this:

9) Group the three button objects together and center them beneath the video object.

Select all three button objects, and press Ctrl+G to group them. Then center the group horizontally beneath the video object.

You should end up with the PLAY, PAUSE and STOP buttons in a row below the video object, like this:

Tip: You aren't limited to buttons with text on them, either. If you'd rather have buttons with iconic symbols for things like play, pause and stop, you can easily create your own buttons using the AutoPlay Media Studio Button Maker, which you can access by choosing Tools > Button Maker.

10) Ungroup the button objects and pin them.

Now that you have the buttons where you want them, ungroup the objects by selecting one of them and pressing Ctrl+Shift+G, and then pin them by pressing Ctrl+P.

Ungrouping the objects will make it easier to select them independently in the next exercise. Pinning the objects will prevent them from being repositioned by accident.

Taking Control of the Video with Actions

Now that we have our PLAY, PAUSE and STOP buttons laid out on the page, let's make them actually play, pause and stop the video.

To do that, we just need to add an action to each button.

1) Click on the page surface to deselect the objects.

Clicking on the page surface deselects the objects, so that none of the objects on the page are selected. (Make sure you click somewhere on the page surface where there isn't an object. If you select an object by accident, just click again somewhere else.)

2) Double-click on the PLAY button, and click on the Script tab.

Double-clicking on an object opens up the Properties dialog for that object. Clicking on the Script tab switches to the script editor so you can edit the object's actions.

3) In the script editor, click on the On Click tab. Replace the Page.Jump action with a Video.Play action. Set the Video.Play action's ObjectName parameter to "Video1".

Note that this button object already has a Page.Jump action assigned to its On Click event. (The action was copied over from the Back button when you duplicated that object.) We're going to replace this Page.Jump action with a Video.Play action.

Replacing the action is easy enough—just remove the old action, and add another one in its place. To remove the old action, simply highlight all of its text on the script editor, and press the delete key.

Note: As you've probably noticed, actions are just text instructions that get interpreted by AutoPlay. You can edit these instructions directly, just as you would edit text in a Word document.

Once you've gotten rid of the old action, you can click the Add Action button to add a new Video.Play action in its place. (When the New Action wizard appears, select the Video category, then select the Video.Play action, and then click Next to advance to the wizard's second page where you can customize the action.)

The Video.Play action takes a single parameter, called ObjectName, which tells the action which video object to play. Since there is only one video object on the page, the ObjectName parameter should already be set to "Video1" for you.

Once you have the action configured, click Finish to add it to the script. Then click OK to close the script editor and accept these changes that you've made to the object's On Click event.

Tip: Since actions are just text, you could also add this action by typing Video.Play("Video1"); directly into the script editor.

4) Double-click on the PAUSE button, and click on the Script tab.

AutoPlay actually remembers the tab that you were on the last time you double-clicked on an object, but it does so on a per-object basis. When you double-click on an object for the first time (like this PAUSE button), it always defaults to showing you the Settings tab.

Once you've visited another tab on the Properties dialog for any particular object, though, the next time you double-click on that object you'll be taken right to that tab.

Of course, that doesn't help us when we're double-clicking on a "fresh" object like the PAUSE button. Since this particular object hasn't been double-clicked before, you still need to click on the Script tab to switch to the PAUSE button's script editor.

5) In the script editor, click on the On Click tab, and replace the Page.Jump action with a Video.Pause action. Set the ObjectName parameter to "Video1".

This object also has a Page.Jump action on its On Click event. Once again, simply delete the existing action's text, and then click the Add Action button to insert a Video.Pause action in its place.

6) Double-click on the STOP button, and click on the Script tab. In the script editor, click on the On Click tab, and delete the existing action's text. Then type:

Video.Stop("Video1");

...into the script editor, right where the old action used to be.

Since actions are just text, you can also add an action by typing it directly into the script editor.

Note: This is what most people generally think of as "programming," but it really isn't that difficult. In fact, as you're about to see, AutoPlay makes programming a lot easier than you might think.

As you type the first few letters of the word "Video" into the script editor, a black tooltip will appear nearby with the word "Video" on it. This is the script editor's autocomplete feature at work. Whenever you type something that the script editor recognizes as a keyword, it will display its best guess at what you are typing in one of those little black tooltips.

Whenever one of those little black tooltips is visible, you can press the Tab key to automatically type the rest of the word. For example, you can type Vi into the script editor, press Tab, and the script editor will fill in the rest of the word "Video" for you.

There's more editor magic, too. When you type the period after the word Video, the script editor recognizes what you've typed as the beginning of an action name, and presents you with a drop-down list of all the actions that begin with "Video." If you like, you can choose one of the actions from that list—in this case, scrolling down to the bottom and choosing the word "Stop"—and then press either Tab or Enter to automatically type that word out for you.

You don't have to use the drop-down list, though...you can continue typing the rest of the action yourself if you want. (For short action names like Video.Stop, it's probably faster to do it that way.)

Tip: The period in an action name is either pronounced "dot," as in "Video-dot-Stop," or it isn't pronounced at all, as in "Video Stop."

Once you've typed something that the script editor recognizes as the name of an action, a little bit of Quick Help appears near the bottom of the window.

This is essentially a "blueprint" for the action, listing the names of the action's parameters and indicating what type of value is expected for each one. In the case of our Video.Stop action, the Quick Help looks like this:

Video.Stop(string ObjectName)

...which indicates that the action takes a single parameter called ObjectName, and that this parameter needs to be a string.

Strings need to be quoted, and the name of the video object that we want to stop is Video1, so the full action needs to be typed exactly like this:

Video.Stop("Video1");

Note: The semi-colon at the end of the line tells AutoPlay where the end of the statement is. It acts as a terminator. (No relation to Arnold, though.) Although technically it's optional—AutoPlay can usually figure out where the end of the statement is on its own—it's a good idea to get in the habit of including it, to avoid any potential confusion.

Once you've typed that text onto the script editor, you can click OK to confirm the changes that you've made to the object's On Click event.

And that's it! You've just added an action, programmer-style.

6) Save the project.

Always save the project! As much fun as it was to add these video controls, there's no point having to do it all over again if something unexpected happens. (Is that the rumble of thunder I hear off in the distance...?)

7) Choose Page > Preview Page and try out the custom video controls. When you’re done trying it out, exit the preview.

That's it for this lesson.

Lesson 7 Summary

In this lesson, you learned how to:

• Add a panel image to frame a video

• Add an attractive text banner to the page

• Add a video object

• Customize the video object's built-in control panel

• Make your own video controls from scratch

• Control the video with a few simple actions


Lesson 8:

Lesson 8: Audio

Audio is an important part of any multimedia application. Sound effects help make interactive objects like buttons "come alive," and provide useful cues to the user to help them recognize which objects are interactive. Background music can help set the right mood or enhance the emotional impact of your work. And in many cases, audio is an integral part of the application, whether it's in the form of music that you're distributing with an AutoPlay CD, or training materials presented in the form of spoken instructions.

In this lesson, you'll learn the basics of working with audio files, so you can make your applications sing...or talk...or maybe even inspire your users to get up and dance.

What You'll Learn

In this lesson, you'll learn how to:

• Change the default object sounds for your project

• Set object-specific sound effects

• Add background music

• Pause the background audio while a page is shown

• Load and play an audio file

How Long Will It Take?

This lesson takes approximately
35 minutes to do.

Starting the Lesson

If you're continuing from Lesson 7, you should still have AutoPlay running with the Tutorial project open. If so, you're ready to move on to the next exercise: Changing the Default Object Sounds.

Otherwise, you'll need to open the project file that you saved at the end of Lesson 7.

1) Open the Tutorial.autoplay file that you saved in Lesson 7.

When you save a project, AutoPlay automatically creates a project folder for it inside your "My Documents\AutoPlay Media Studio 8\Projects" folder. This project folder is where everything that belongs to the project is stored—including the project file, which contains all of the settings used in the project.

The project folder and the project file always have the same name that you gave to the project when it was created. The project file's name ends with a ".autoplay" file extension.

Since you named this project "Tutorial" in Lesson 1, the name of the project folder will be Tutorial, and the name of the project file will be Tutorial.autoplay. So, the path to the project file should be something like:

...\My Documents\AutoPlay Media Studio 8\Projects\Tutorial\Tutorial.autoplay

To open the project, you just need to open that project file.

Changing the Default Object Sounds

With the exception of the Flash, PDF, RichText, input, listbox, web, progress, combobox, tree and grid objects, all of the objects in AutoPlay can trigger two kinds of sound effects: one for when the user moves the mouse over them (a "highlight" sound), and another for when the user clicks on them (a "click" sound). For each object's sound effect, you have the option of playing either no sound at all, a custom sound specific to that object, or a standard sound defined in the project settings.

The standard sound makes it easy to change the sound effects for all of the objects in your project at once, without having to go to each object and change its sound settings individually.

In order to demonstrate how the default object sounds work, let's temporarily change the standard highlight sound for all objects in the project.

1) Choose Project > Audio. When the Audio Settings dialog opens, click on the Sound Effects tab.

The Sound Effects tab is where you can choose the default highlight and click sound for all objects in the project—or at least, for all of the objects in the project that have their highlight or click sound set to "Standard." Any changes that you make on this tab will immediately affect the whole project.

2) Click the browse button next to the Highlight setting. When the Select File dialog opens, click the Gallery button, and navigate into the Sound Effects folder.

AutoPlay comes with a number of sample sound effects that you can use in your projects. These sound effects are all in Ogg Vorbis format. Ogg Vorbis is an open-source audio compression format similar to MP3, but capable of greater sound quality and even smaller file sizes. Unlike other audio formats, Ogg Vorbis is patent and license free, making it an excellent choice for the distribution of digital audio.

Note: The MP3 codec is licensed by Fraunhofer IIS-A. If you generate revenue using music in MP3 format, you are responsible for paying them a percentage of each sale.

Ogg Vorbis files end in .ogg.

3) Click on some of the sound files to preview them. When you find one that you like, click OK to select it as the new standard highlight sound.

There's a "Play audio while browsing" option at the bottom of the Select File dialog that appears when you're browsing for audio files. It's turned on by default, so when you click on a sound file, it will automatically begin playing in the background. (You can turn the option off if you prefer to browse in silence.)

Note: Make sure you have your computer speakers turned on. If you don't have computer speakers, just hum something catchy, close your eyes and pick a file at random.

4) Click OK on the Audio Settings dialog to accept the change. Preview the project and move your mouse over the buttons to hear the new highlight sounds. Exit the preview when you're done.

To preview the project, press F5. When the application opens, move your mouse over the buttons. The sound you picked as the default highlight sound should play when you move the mouse over each of the button objects.

All buttons have their highlight sound set to "Standard" by default. When you changed the standard highlight sound for the project, you changed the highlight sounds for all of the buttons in the project at once.

When you're ready to exit the preview, just click on the Exit button.

5) Switch to Page1 and click on the Email Address label object. In the Sounds category of the properties pane, set HighlightSound to "Standard" instead of "None."

This will make the Email Address object play the standard highlight sound whenever the mouse moves over it. Since we're using this label as an interactive object, like the buttons on the page, making it play the same highlight sound will help the user identify the label as something they can click on.

Note: The Email Address label object is the one with "ted@sellersrealty.com" on it.

6) Choose Project > Audio, and change the standard highlight sound back to High1.ogg.

To change the highlight sound back to High1.ogg, choose Project > Audio and click on the Sound Effects tab. Click the highlight setting's browse button, and use the Select File dialog to select the High1.ogg file. Click OK on the Select File dialog, then click OK on the Audio Settings dialog, and you're done.

7) Preview the project and move your mouse over the objects on the page to hear the highlight sound. Exit the preview when you’re done.

The highlight sounds have all been changed back to the original highlight sound. And since you set the Email Address label object's highlight sound to "Standard," it now has the same highlight sound as well.

Aren't you glad you didn't have to change the sound for all objects in the project one object at a time? And this tutorial is fairly small...imagine working on a hundred-page project with thousands of buttons in it. This feature may not seem that exciting at first glance, but in the long run it can be a real time saver.

Tip: It's a good idea to use the default object sounds wherever possible, because it makes it much easier to change the sounds throughout your project later.

Setting Object-Specific Sound Effects

You aren't always going to want every object to use the same sound. Some objects were just made to sound different. Luckily, AutoPlay lets you specify a custom sound for each object's sound setting. In fact, if you wanted, every object in your project could have a unique sound.

Let's give the Email Address label object a custom click sound.

1) Click on the Email Address label object.

The Email Address label object still needs a sound effect for when the user clicks on it. We could use the standard click sound if we wanted, but since clicking on this object does something a bit different, let's make the click sound a bit different as well.

(When the user clicks on this object, the File.OpenEmail action starts a new message in the user's regular email program. Since this happens "outside" of the application—like clicking on a web link that opens a pop-up page in another window—we'll reflect the difference by giving the object a different kind of click sound.)

2) In the Sounds category of the properties pane, change ClickSound from "None" to "Custom."

By default, label objects are configured to make no sound at all. When you set the ClickSound setting to "Custom," the object will use whatever file you specify in the ClickFile setting.

3) Click on the ClickFile setting, and then click the browse button. When the Select File dialog appears, click the Gallery button, and navigate into the Sound Effects folder.

Clicking on the browse button opens the Select File dialog so you can select the audio file that you want to use for the object's click sound.

The Sound Effects folder should be where you were browsing the last time you selected an audio file, so you shouldn't have to do anything to navigate into it. If you followed the past few steps, you're already there.

Note: The Select File dialog always opens up at the same place you navigated to the last time you selected that kind of file.

4) Select the Rabble.ogg file, and click OK.

This will give the Email Address label object a "pop" sound when you click on it.

The files in the Sound Effects folder have such cool names

Adding Background Music

AutoPlay makes it really easy to add a list of songs and have them play in the background. Like a soundtrack in a movie, background music can enhance the mood and add atmosphere and emotion to your application.

1) Choose Project > Audio. When the Audio Settings dialog opens, click on the Background Music tab.

The Background Music tab is where you can put together a list of songs that will be played in sequence while the user is browsing your application.

The songs can be played back sequentially, in the order that they are listed, or you can choose to have them play back at random.

You can also specify the volume at which the background audio will play, and whether the whole list should repeat—which is to say, whether the background music should start over from the beginning when the last track has been played.

2) Click the Add button. When the Select File dialog appears, click the Gallery button, and navigate into the "Music" folder.

The first time you click the Add button on the Background Music tab, the Select File dialog automatically takes you to the Music folder. (From that point on, it remembers what folder you were in the last time you selected a background music audio file.)

3) Select the file named "Acoustic Folk (short).ogg" and click OK.

As you add songs to the list, they are automatically copied into your project's Audio folder, so that they will be included when you publish the project to a folder or burn it to a CD. This song will end up in the project folder as "CD_ROOT\AutoPlay\Audio\
Acoustic Folk (short).ogg."

4) Add some more songs to the list.

You can add all of the sample songs if you want, or just pick and choose the ones you like.

Feel free to add some favorite songs to the mix from your own collection, too.

Note: The songs will be played back in the same order that they appear in on the list.

Once a song has been added, you can change its position or remove it by using the buttons beneath the list.

Tip: You can also rearrange the songs by dragging them up or down with the mouse.

Three sample tunes from the gallery

5) Press F5 to preview the project. Try jumping back and forth between the pages.

The background music starts up as soon as the application starts, and keeps playing until it closes. Note that jumping to another page doesn't interrupt the music at all...it just keeps on playing, smooth as always.

Even jumping to the video page doesn't stop the background music. When the video starts playing, its audio plays over top of the background music. The video has its own soundtrack, but it just gets mixed together with the background music of the application.

It sounds pretty bad, because the video's audio track and the background music were definitely not meant to be played at the same time. But we can fix that by pausing the background music while the user is on the video page.

6) Exit the preview.

Just click the Exit button or press Alt+F5 to close the application and return to the AutoPlay design environment.

Pausing the Background Audio

There are times when you'll want the background music to stop playing. For instance, if you have a video object that has its own soundtrack, you probably don't want it to clash with the background music, so you'll want to pause the background music while the video is being shown.

In our case, the video is shown while the user is on the Video page, so we need to turn the music off when they reach that page, and turn it back on when they leave it. This is easy to do with a pair of Audio.TogglePlay actions.

Tip: You can use this same technique to add a toggle button so the user can turn the music on or off—just in case their taste in music is a bit too different from yours.

1) Switch to the Video page.

Before you can add any actions to the Video page's events, you need to switch to the page. To do that, just click on the Video page's tab.

2) Add an Audio.TogglePlay action to the page's On Show event. In the action's parameters, set Channel to CHANNEL_BACKGROUND. Leave the script editor open.

The Audio.TogglePlay action toggles an audio channel's playback between playing and paused. If there is currently audio playing in that channel, the action will pause it; if the audio in that channel is currently paused, the action will un-pause it.

To add the action, double-click on the page surface, and click on the Script tab. In the script editor, click on the On Show tab, and then click the Add Action button to bring up the New Action wizard. Change the category to "Audio," select Audio.TogglePlay from the list, and click Next to edit the action’s parameters.

In the action parameters, you can specify the channel that you want the action to toggle. In this case, we want to toggle the playback of the background audio channel, so you need to change the Channel setting to CHANNEL_BACKGROUND.

Once you have the action configured, click Finish to close the wizard. The Audio.TogglePlay action will appear in the script editor.

Note: Don't close the script editor just yet; you need to add an action to the On Close event as well.

The On Show event is triggered whenever the page opens. The background music will still be playing when the user leaves Page1, so this action should pause the music when the user arrives at the Video page.

3) Copy the Audio.TogglePlay action to the page's On Close event.

We want to add another Audio.TogglePlay action to the On Close event for this page, to toggle the background music back on when the user jumps back to the main page. It needs to be just like the action you added to the On Show event, because we want the two actions to balance each other out—one to turn the audio off, and one to turn it back on again.

You could click on the On Close tab and then add another action the same way you did in step 2. But since we want this action to have the same parameters as the first one, you might as well save yourself a bit of time and just copy the text from one tab to the other.

To do so, just select the whole line of text and press Ctrl+C to copy it into the clipboard. Then, click on the On Close tab, and press Ctrl+V to paste the text onto it.

Note that this won't affect the action that you added to the On Show tab at all—the actions you add to one tab stay the same when you switch to another one. You're just making a change to both events at the same time.

Once you've configured the action for the On Close event, click OK to close the script editor and confirm your changes.

In the properties pane, both events should now show "1 Line" next to them.

4) Preview the project, and click on the "Video Presentation" button to jump to the Video page.

Now the background music stops when you arrive at the Video page, and the video's audio plays all by itself.

This is because the Audio.TogglePlay action is pausing the background channel on the page's On Show event.

5) Click on the Back button to return to the main page.

When you click on the Back button, the background music starts playing again, right where it left off. This time it's the Audio.TogglePlay action on the page's On Close event that is toggling the background audio channel back on.

6) Exit the preview.

That's it for this preview, so click on the Exit button (or press Alt+F4) to exit the application and return to the AutoPlay design environment.

Loading and Playing an Audio File

Now that you know how to pause the background music, let's tackle playing an audio file in response to an event. For example, you might want to start playing an audio file when the user clicks on a button, or when the user jumps to a specific page.

For this exercise, we'll play a different audio file while the user is on the About Ted page.

1) Switch to the About Ted page. Double-click on the page surface, and click on the Script tab. In the script editor, click on the On Show tab, and add an Audio.Pause action to pause the background audio channel.

Before we start playing a different song, we need to pause the background music. Although we could use an Audio.TogglePlay action to do it, like we did on the Video page, let's use an Audio.Pause action this time.

To add the action, just click on the Add Action button, select the Audio.Pause action from the list, and click Next to get to the action's parameters. Set the Channel parameter to CHANNEL_BACKGROUND, and click Finish.

That will pause the background music. Now we need an action to play a different audio file.

2) Click the Add Action button to add a second action to the On Show tab. When the New Action wizard appears, choose the "Audio" category. Select the Audio.Play action from the list, and click Next.

If you were looking through the list of audio actions, and you wanted to play an audio file, you might head straight for Audio.Play. But when you clicked Next to customize the action, you wouldn't see any way to specify an audio file. All you would find is a single parameter letting you select the audio channel that you want to play.

This is because the Audio.Play action is used to start playing a file that has already been loaded into an audio channel.

In fact, the Audio.Play action assumes that you've already loaded an audio file into a channel using an Audio.Load action.

Luckily, the Audio.Load action gives you a way to do both at the same time.

3) Click Back to go back to the first page of the New Action wizard. Select the Audio.Load action instead, and click Next. Leave the Channel parameter set to CHANNEL_NARRATION, and set the PlayAutomatic and Loop parameters both to true.

The Audio.Load action certainly has more parameters to play with.

We want the audio file to play in a different channel than the background music, so leave the Channel set to CHANNEL_NARRATION. The name implies that this channel is for "spoken" audio, but that's only one use for it. You're free to use the channel for other forms of audio, which is exactly what we're going to do.

Note: We don't want to use the background audio channel for this, because it's already occupied by a song from the Background Music tab...and we only want to replace that music "locally" on the About Ted page—not everywhere. Since we're only after a temporary change, we need to leave the background audio channel alone.

Setting PlayAutomatic to true tells the action to begin playing the file automatically as soon as it's loaded. Since we don't know how long the user will remain on this page, we want the file to keep playing in the background until the page closes. This means that we need the file to loop when it reaches the end, so make sure Loop is set to true as well.

Note: Don't close the wizard yet—you still need to tell the action which audio file to load.

4) Click on the Filename setting, and then click the browse button. When the Select File dialog appears, click the Gallery button, and select a song from the Music folder.

When you click on the browse button, the Select File dialog appears so you can select an audio file. This is the file that the action will load.

Tip: If you'd rather use your own music, click one of the other buttons and look for an audio file somewhere on your system.

Once you select an audio file, AutoPlay will copy it to your project's Audio folder and put the appropriate path into the Filename parameter for you. It also automatically escapes all of the backslashes in the path.

Inside a string like the Filename parameter, a backslash character is used to indicate an escape sequence. For instance, in strings a newline is represented by the sequence \n. Those two characters are the escape sequence that represents the invisible character you type by pressing the Enter key.

Given that a backslash indicates the beginning of an escape sequence, we need some way to represent a normal, actual backslash in a string. As you can see, this is done by using a pair of backslashes. In fact, \\ is an escape sequence that represents a single (normal) backslash.

This may seem a little bit complicated, but don't worry...you can always use the browse button to select a file, and AutoPlay will handle all the double-backslashes for you. But if you ever want to edit a string directly, just remember that you need two backslashes (\\) to represent a regular backslash in a string.

5) Click Finish to close the New Action wizard.

When you close the wizard, the second action will appear on the script editor, just below the first one. The end result should look like this:

{Of course, the filename may be different if you chose a different file.)

6) Switch to the On Close tab, and on the first two lines, type:

Audio.Stop(CHANNEL_NARRATION);
Audio.Play(CHANNEL_BACKGROUND);

Remember to press Enter at the end of each line.

This will add two actions to the On Close event: an Audio.Stop action, to stop the song that is playing in the "narration" channel; and an Audio.Play action, to start playing the background music again.

Note: You could also add these actions by clicking the Add Action button and using the New Action wizard. If you feel more comfortable doing it that way, you can...there's nothing wrong with using the wizard. One way isn't any "better" than the other. In fact, I tend to use both methods myself...typing in the actions that I've become familiar with, and using the wizard to add actions that I'm not so sure about.

We need the Audio.Stop action to stop playing the song that we loaded with the Audio.Load action on the On Show event. We need the Audio.Play action to start playing the "normal" background music that we paused with the Audio.Pause action on the On Show event. The whole progression will go something like this:

Step 1: Page opens
Step 2: Audio.Pause -- pauses the background music
Step 3: Audio.Load -- loads our page-specific song

Step 4: Page closes
Step 5: Audio.Stop -- stops our page-specific song
Step 6: Audio.Play -- unpauses the background music

7) Click OK to confirm your changes.

Clicking OK on the script editor will finish adding the four actions to the two page events, confirming all of the changes that you've made. The properties pane will show that there are "2 Lines" of action script for both the On Show and On Close events.

You now have two actions on the On Show event (Audio.Pause and Audio.Load), and two actions on the On Close event (Audio.Stop and Audio.Play).

8) Preview the project, and go to the About Ted page.

As soon as you jump to the About Ted page, the background music will pause, and the audio file that you selected in step 3 will begin playing in its place. This is the result of the two actions on the page's On Show event, firing one after the other in sequence.

9) Click on the Back button to return to the main page.

As you leave the About Ted page, the audio file that you selected in step 3 will stop playing, and the original background music will continue where it left off. This time, it's the two actions you added to the On Close event at work.

10) Exit the preview and save the project.

When you're done previewing the project, exit the application and return to the AutoPlay design environment.

That's it for this lesson! Be sure to save your changes before moving on.

Lesson 8 Summary

In this lesson, you learned how to:

• Change the default object sounds for your project

• Set object-specific sound effects

• Add background music

• Pause the background audio while a page is shown

• Load and play an audio file


Lesson 9:

Lesson 9: Publishing

This lesson will walk you through the final stage of AutoPlay project development: building and publishing your AutoPlay application.

What You'll Learn

In this lesson, you'll learn how to:

• Build to a folder on your hard drive

• Build a compressed executable

• Burn a CD-R, CD-RW, DVD±R, DVD±RW or BD-R/RE

How Long Will It Take?

This lesson takes approximately
10 minutes to do.

Starting the Lesson

If you're continuing from Lesson 8, you should still have AutoPlay running with the Tutorial project open. If so, you're ready to move on to the next exercise: Building to a Folder.

Otherwise, you'll need to open the project file that you saved at the end of Lesson 8.

1) Open the Tutorial.autoplay file that you saved in Lesson 8.

When you save a project, AutoPlay automatically creates a project folder for it inside your "My Documents\AutoPlay Media Studio 8\Projects" folder. This project folder is where everything that belongs to the project is stored—including the project file, which contains all of the settings used in the project.

The project folder and the project file always have the same name that you gave to the project when it was created. The project file's name ends with a ".autoplay" file extension.

Since you named this project "Tutorial" in Lesson 1, the name of the project folder will be Tutorial, and the name of the project file will be Tutorial.autoplay. So, the path to the project file should be something like:

...\My Documents\AutoPlay Media Studio 8\Projects\Tutorial\Tutorial.autoplay

To open the project, you just need to open that project file.

Building to a Folder

The fastest publishing method is to build the project to a folder on your hard drive.

When you publish your project to a folder, AutoPlay uses the settings in the project file to generate an executable for your application. It then copies this executable—along with the entire contents of your project's CD_ROOT folder—to the output folder of your choice.

The only difference between building to a folder, and burning a CD, is where your application ends up. Building to a folder is essentially like preparing the contents of a CD in a folder before burning it.

Note: When you choose Publish > Build, a "Publish Warning" dialog may be shown. See Running on Windows Vista or Later for more information.

1) Choose Publish > Build to open the Publish wizard.

The first page of the Publish wizard lets you choose how you want to publish your AutoPlay application. The option you select on this page determines (a) what options are available when you click Next, and (b) what the end result of the build process will be.

2) Select the Hard Drive Folder option, and click Next.

You're going to publish the project to a folder on your hard drive, so select the Hard Drive Folder option.

Clicking Next will bring you to the second page of the wizard where you can specify the output folder.

Tip: Even if you're planning to burn your project to a CD, it's a good idea to build it to a folder at least once first. That way, you can test your application without wasting a CD-R, or having to wait for a slow CD-RW burn. Once you've made sure that everything works the way you intended, you can either re-publish the project using a different method, or burn the contents of the output folder using an external CD burning program.

3) In the Output Folder field, type C:\AutoPlay Output.

The output folder is simply the location where you want the application to be built. You can use any folder for this purpose, but it's best to create a new folder, since any existing files will be deleted before the application is built.

Warning! Any files in the output folder will be deleted during the build process! Be very careful not to use a folder that contains any files or subfolders you want to keep.

You can also select an output folder by clicking the browse button.

Tip: The output folder you choose doesn't have to be on a local hard drive; you could easily direct the output to a folder on a shared network drive, or even to some other form of storage, such as a USB memory key. The only requirement is that there is enough room on the device for your AutoPlay application.

4) Click Build and wait for the build process to end.

AutoPlay will build the project and inform you when your application is ready. Since the project is fairly small, and the build process is very fast, you shouldn't have to wait too long. (On a fast system it shouldn't take more than five or six seconds.)

5) Click Close to exit the Publish wizard. When the output folder opens, double-click on the autorun.exe file to launch your application.

When you close the Publish wizard, AutoPlay will automatically open the output folder for you.

The contents of this folder are exactly what you would see on the root of the CD or DVD if you had burned your project to a disc instead of building it to a folder.

In fact, everything here is built and ready to go. You could select everything in the output folder, drag it into your CD burning software, and burn it onto a CD. Or you could use a tool like Setup Factory to package it up into an installer, so it can be installed on the user's hard drive like any other application. What you do with the project at this point is entirely up to you!

Of course, before you distribute your project, you should always test it thoroughly. To launch it, just double-click on the Autorun.exe file.

6) Exit from the application and return to AutoPlay Media Studio.

Once you've had a chance to try your application out, close the application and return to the AutoPlay design environment.

Now let's try building the project to a compressed executable.

Building a Compressed Executable

For smaller projects, building a compressed executable is a great way to make the application portable. The entire project will be compressed into a single executable file, with all of the project's contents inside it. When you double-click on this file to launch it, the contents will be extracted to a temporary location on the local hard drive, and the application will run from there. The whole process is very seamless and automatic.

You can even choose to encrypt the contents, to prevent anyone from accessing them without launching the application.

Although you can technically build a compressed executable for a project of any size, it's better to reserve this method for smaller projects. The larger the project is, the longer it takes for the data to be extracted when the user launches your application. (The contents must be extracted each time the application is started.)

Tip: If the application is going to be used repeatedly, or is relatively large, you may want to use a professional development tool like Setup Factory to create a traditional installer for it. That way, the contents can be unpacked once (at install time) and then accessed like any other program, reducing launch times significantly.

1) Press F7 to open the Publish wizard.

Pressing F7 opens the Publish wizard, just like choosing Publish > Build from the program menu.

2) Select the Web/Email Executable option, and click Next.

This time, you're going to publish the project as a single executable file.

Clicking Next will bring you to the second page of the wizard where you can specify a path and filename for the executable file.

3) In the Filename field, type C:\Temp\TedSellers.exe. Leave the other settings at their default values.

The Filename field lets you specify the full path and filename of the executable file that AutoPlay will build for you. By default, it will be set to build the application in your My Documents\AutoPlay Media Studio 8\Output folder, with the same name as the project file (but ending with .exe).

To change this setting, you can either type a new path into the field, or you can select a folder and filename by clicking the browse button.

Setting a path and filename for the compressed executable

The Progress Window settings on this dialog let you configure the small popup "Loading" message that appears while the application is extracting the project data onto the local hard drive. For example, you could change the message from "Loading" to "Please wait..." or make it so it doesn't appear at all.

The "Encrypt data segment" option tells AutoPlay to encrypt all of the project data that it stores in the compressed executable. This adds a small layer of security to the application, so that users can't extract the project files directly from the executable using an external zip utility like WinZip.

4) Click Build and wait for the build process to end.

AutoPlay will build the project and inform you when your application is ready. This build process is almost as fast as the hard drive folder option, so you shouldn't have to wait too long.

5) Click Close to exit the Publish wizard. When the C:\Temp folder opens, double-click on the TedSellers.exe file to launch your application.

When you close the Publish wizard, AutoPlay will automatically open the C:\Temp folder for you. Inside that folder, you should see an executable file called TedSellers.exe.

The entire application is contained within that file. When you double-click on it, the "Loading" message will appear as the contents are automatically extracted to a temporary folder on the hard drive, and then the application will run the same as before.

Note: When you build a compressed executable, there is only one file to distribute.

6) Exit from the application and return to AutoPlay Media Studio.

Once you've had a chance to try your application out, close the application and return to the AutoPlay design environment.

Note: A little bit of magic happens behind the scenes after you click the Exit button. As your application exits, it removes the files that it extracted to the temporary folder when you launched it. You don't have to worry about the files being left "exposed" in the user's temp folder, or about taking up space on the user's hard drive. Like any well-behaved program, your AutoPlay application cleans up after itself.

Burning a CD, DVD or Blu-Ray

With its built-in burning engine, AutoPlay Media Studio makes publishing your project to a CD-R, CD-RW, DVD±R, DVD±RW, or BD-R/RE a piece of cake.

For this exercise, I'll describe the steps for burning a compact disc, so you don't have to keep reading "CD-R, CD-RW, DVD±R, DVD±RW or BD-R/RE" over and over. But the same principles apply for burning to DVD±R, DVD±RW and BD-R/RE.

Note: You will need a CD-R or CD-RW drive and a blank CD-R or CD-RW disc in order to complete this exercise.

1) Insert a blank recordable CD or CD-RW into your CD writer, and press F7 to open the Publish wizard.

Pressing F7 opens the Publish wizard, just like choosing Publish > Build from the program menu.

Note: We recommend using a CD-RW disc so you can reuse it afterwards.

2) Select the 'Burn data CD/DVD/Blu-Ray" option, and click Next.

This time, you're going to burn the project to a recordable CD.

Clicking Next will bring you to the second page of the wizard where you can specify the burn options.

3) Select your CD writer drive from the drop-down list, and change the volume identifier to something appropriate, like Ted Sellers CD.

The "CD/DVD/Blu-Ray writer drive" drop-down list is provided in case you have multiple CD/DVD/Blu-Ray drives in your system. Select the drive that you will be using to burn the CD.

The "Volume identifier" field lets you specify the name of the CD as it will appear in the My Computer folder in Windows.

4) Click Burn and wait for the burn process to end.

If you're using a CD-RW disc, a warning dialog will appear to ask if you’re sure you want to do so. You aren't burning a "master" disc to send to a duplication service, so just click Yes.

If the CD-RW isn't empty, another dialog will appear asking if you want to erase the disc. If you're sure that there isn't anything on this disc that you wanted to keep, then click OK and AutoPlay will erase the disc for you before burning the project. (If you put the wrong disc in by mistake, just eject it and replace it with a blank one.)

Once the burn is completed, the drive should automatically eject the CD.

5) Click Close to exit the Publish wizard. Close the CD tray to reinsert the disc back in the drive.

After you insert the CD in the drive, you should hear it spin up as the drive begins to read the contents. The drive will look in the root folder of the CD for a file named autorun.inf which tells it the name of a program to load when the CD is inserted.

Note: AutoPlay automatically creates the autorun.inf file for you when the "Enable AutoPlay feature" option is turned on.

Your AutoPlay application should start up automatically. (If it doesn't, then the autorun feature is disabled on your computer. You will need to either re-enable it, or open the CD in My Computer and then double-click on the autorun.exe file yourself.)

6) Exit from the application and return to AutoPlay Media Studio.

Once you've had a chance to try your application out, close the application and return to the AutoPlay design environment.

That's it! You've just published your AutoPlay project to a CD.

You now know everything you need to know to build and publish a project just like this one.

Tip: In the next lesson, we'll start a new project so you can try out some of AutoPlay's scripting abilities.

Lesson 9 Summary

In this lesson, you learned how to:

• Build to a folder on your hard drive

• Build a compressed executable

• Burn a CD-R, CD-RW, DVD±R, DVD±RW or BD-R/RE


Lesson 10:

Lesson 10: Scripting Basics

This lesson will teach you some of the basics of scripting in AutoPlay. Although you can accomplish a lot in AutoPlay without any knowledge of scripting at all, even a little bit of scripting practice can make a big difference. You can accomplish far more in a project with a little bit of scripting than you ever could without it. Scripting opens the door to all sorts of advanced techniques, from actions that are only performed when specific conditions are met, to functions that you can define, name and then call from anywhere else.

What You'll Learn

In this lesson, you'll learn how to:

• Display a message

• Use a variable

• Add an if statement

• Test numeric values

• Set a button object's text

• Concatenate strings

• Compare strings

• Use a for loop

• Create functions

How Long Will It Take?

This lesson takes approximately
30 minutes to do.

Starting the Lesson

For this lesson, we're going to create a new project from scratch. If you're continuing from Lesson 9, you should still have AutoPlay running with the Tutorial project open.

If not, you'll need to open AutoPlay Media Studio first.

1) If you have AutoPlay running with the Tutorial project open, choose
File > New.

Choosing File > New will open the Create New Project dialog.

Once it opens, move on to step 3.

2) Or, if you don't have AutoPlay running, use the Start menu to launch the AutoPlay Media Studio program. When the Welcome dialog appears, click on "Create a new project."

You'll find AutoPlay Media Studio under:

Start > Programs > Indigo Rose Corporation > AutoPlay Media Studio 8

Once the program launches and the Welcome dialog appears, click on the "Create a new project" option. This will open the Create New Project dialog.

3) Name your project Lesson 10.

You want to replace the default text with a unique name for this project, so highlight all of the text in the Name your project field and type Lesson 10.

This name will be used for the project folder and the project file.

4) Select the Blank Project and click OK.

When you click OK, the Create New Project dialog closes, AutoPlay sets up the Lesson 10 project folder and project file, and the new blank project is loaded into the design environment.

You're now ready to learn some basic scripting.

Displaying a Message

Okay, first things first. Before we get to any of the fancy stuff, let's make a script that does something really simple, like displaying a message to the user.

First, though, we need a place to put our script. For convenience, let's use a button object's On Click event.

1) Add a button object to the page.

One quick way to add a button object is to right-click on the page and choose Button from the right-click menu. Then just select the button you want to use from the list of button files on the Select File dialog, and click OK.

Note: It doesn't matter what button you choose, so pick whichever one you like.

2) Double-click on the button object, click on the Script tab, and click on the On Click event tab.

You want to add an action to the object's On Click event, so open the object's Properties dialog, switch to the Script tab, and make sure you're editing the script for the On Click event.

3) On the first line, type:

Dialog.Message("Every day I wake up and say...", "Hello World!");

This script consists of a single Dialog.Message action which passes "Every day I wake up and say..." as the string to display in the title bar, and "Hello World!" as the string to display on the dialog. The script should look like this when you're done:

Note: Although this script only has a single action, scripts can be much longer. In fact, there's no limit to how long scripts can be.

4) Click OK to close the Properties dialog. Press F5 to preview the project. When the preview application appears, click on the button to see the message.

Clicking on the button triggers its On Click event and performs any script that has been added to it. In this case, the script consists of a single call to the Dialog.Message action, which displays the following message:

5) Click OK to close the dialog message box, and exit from the preview.

Click OK on the message to close it, and then exit from the preview and return to the design environment.

Tip: You can exit from the preview by pressing Alt-F4.

Using a Variable

One of the most powerful features of scripting is the ability to make use of variables. Variables are essentially just "nicknames" or "placeholders" for values that may need to be modified or re-used in the future. Each variable is given a name that you can use to access its current value in your script.

Note: We say that values are "assigned to" or "stored in" variables. If you picture a variable as a container that can hold a value, assigning a value to a variable is like "placing" that value into a container.

You place a value into a variable by assigning the value to it with an equals sign. For example, the following script assigns the value 10 to a variable called "amount."

amount = 10;

You can change this value at any time by assigning a different value to the variable. (The new value simply replaces the old one.) For example, the following script assigns 45 to the amount variable, replacing the number 10:

amount = 45;

...and the following script assigns the string "Woohoo!" to the variable, replacing the number 45:

amount = "Woohoo!";

Note that you can easily replace a numeric value with a string in a variable. Having a number or a string in a variable doesn't "lock" it into only accepting that type of value—variables don't care what kind of data they hold.

This ability to hold changeable information is what makes variables so useful.

1) Double-click on the button object. In the On Click script, replace the "Hello World!" string with a variable named strMsg.

Just edit the script on the button object's On Click event so that it looks like this instead:

Dialog.Message("Every day I wake up and say...", strMsg);

This will make the Dialog.Message action display the current value of the strMsg variable when it is performed. Before we try it out, though, we need to assign a value to that variable somewhere.

Note: A common practice among programmers is to give their variables names with prefixes that help them remember what the variables are supposed to contain. One such prefix is "str," which is used to indicate a variable that contains a string. Other common prefixes are "n" for a numeric value (e.g. nCount, nTotal) and "b" for a Boolean true/false value (e.g. bLoaded, bReadyToStart).

2) Click OK to close the Properties dialog.

Once you've modified the On Click script, click OK to accept your changes and close the Properties dialog.

3) Double-click on the page and click on the Script tab. On the first line of the On Preload script, type:

strMsg = "Hello World!";

The script should look like this when you’re done:

This will assign the string "Hello World!" to the variable named strMsg during the page's On Preload event. The On Preload event is triggered as soon as the page has been created in memory, just before it actually appears on the screen. This makes it a good place to put any initialization script, such as setting up default values or preparing variables that will be used once the page is shown.

4) Press F5 to preview the project. When the preview opens, click on the button to see the message.

The Dialog.Message action displays the message box, just like before.

Note that the variable's name, strMsg, is nowhere to be found...instead, the value that is currently in the variable is displayed. In this case, it's the value that was assigned to the variable in the page's On Preload event.

5) Exit the preview. In the page's On Preload script, change the value that is assigned to the strMsg variable to "Good Morning!".

Double-click on the page, and edit the script in the On Preload event so it looks like this instead:

strMsg = "Good Morning!";

6) Press F5 to preview the project. When the preview opens, click on the button to see the message.

This time, the message looks like this:

As you can see, you've just changed the message without even touching the Dialog.Message action.

Now imagine if you had such Dialog.Message actions on fifty pages throughout your project, and you decided you wanted to change the text. With variables and a little planning, such changes are a piece of cake.

Adding an If Statement

The if statement gives your scripts the ability to make decisions, and do one thing or another in different circumstances.

Each if statement consists of a condition (or "test"), followed by a block of script that will only be performed if the condition is found to be true.

The basic syntax is:

if condition then
do something here
end

For example:

if age < 18 then
Dialog.Message("Sorry!", "You must be 18 to access this CD.");
Application.Exit();
end

The above script checks to see if the value in a variable named "age" is less than 18. If it is, it puts up a message saying "You must be 18 to access this CD," and then immediately exits from the application.

For example, if we set age to 17 first:

age = 17;
if age < 18 then
Dialog.Message("Sorry!", "You must be 18 to access this CD.");
Application.Exit();
end

...the block of script between the "then" and "end" keywords will be performed, because 17 is less than 18. In this case, we say that the if statement's condition "passed."

However, if we set age to 20:

age = 20;
if age < 18 then
Dialog.Message("Sorry!", "You must be 18 to access this CD.");
Application.Exit();
end

...the block of script between the "then" and the "end" isn't performed, because 20 isn't less than 18. This time, we say that the if statement's condition "failed."

Note: An if statement's condition can be any expression that evaluates to true or false.

Let's modify the script on our button object's On Click event to only display the message if it is "Hello world!".

1) Double-click on the button object. Edit the On Click script to add an if statement, like this:

if strMsg == "Hello World!" then
Dialog.Message("Every day I wake up and say...", strMsg);
end

Use a tab character to indent the original "Dialog.Message..." line to the right a little. (It's good practice to indent any lines inside an if statement in order to help make the logic easier to follow.) To insert a tab character at the start of the line, place the cursor to the left of the "D" and press the Tab key.

Tip: You can indent one or more lines at once by highlighting them and pressing Tab to increase the indent (to the right), or Shift+Tab to decrease the indent (to the left).

The script should look like this when it's done:

The double equals compares for equality, so this if statement's condition will only be true if strMsg contains "Hello World!" with the exact same capitalization and spelling.

Tip: An easy way to add an if statement on the script editor is to highlight the line of text that you want to put "inside" the if, click the Add Code button, and then choose Quick Scripts > "if statement" from the menu. An if statement "template" will be added around the line that you highlighted. You can then edit the template to fit your needs.

2) Press F5 to preview the project. When the preview opens, click on the button to trigger the script.

This time, nothing happens, because strMsg is still set to "Good Morning!" in the On Preload event. "Good Morning!" doesn't equal "Hello World!" so the if condition fails, and the block of code between the "then" and "end" keywords is skipped entirely.

3) Exit from the preview. Edit the button object’s On Click script to change the == to ~=, like this:

if strMsg ~= "Hello World!" then
Dialog.Message("Every day I wake up and say...", strMsg);
end

The script should look like this when it's done:

The tilde equals (~=) compares for inequality, so this if statement's condition will only be true if strMsg contains anything but "Hello World!" with the exact same capitalization and spelling.

4) Preview the project. When the preview opens, click on the button.

This time, because strMsg contains "Good Morning!", which is definitely not equal to "Hello World!", the message will appear.

The == and ~= operators are fine when you want to check strings for an exact match. But what if you’re not sure of the capitalization? What if the variable contains a string that the user typed in, and you don't care if they capitalized everything correctly?

One solution is to use an old programmer's trick: just convert the contents of the unknown string to all lowercase (or all uppercase), and do the same to the string you want to match.

Let's modify our script to ask the user for a message, and then display what they typed, but only if they typed the words "hello world" followed by an exclamation mark.

5) Exit from the preview. Edit the button object's On Click script to look like this:

strMsg = Dialog.Input("", "Enter your message:");
if String.Upper(strMsg) == "HELLO WORLD!" then
Dialog.Message("Every day I wake up and say...", strMsg);
else
Dialog.Message("Um...", "You didn't type Hello World!");
end

The first line uses a Dialog.Input action to pop up a message dialog with an input field that the user can type into. Whatever the user types is then assigned to the strMsg variable.

Note: This new value replaces the value that was assigned to strMsg in the page's On Preload event.

In the if statement's condition, we use a String.Upper action to convert the contents of strMsg to all uppercase characters, and then compare that to "HELLO WORLD!".

We've added an "else" keyword after the first Dialog.Message action. It basically divides the if statement into two parts: the "then" part, that only happens if the condition is true; and the "else" part, that only happens if the condition is false. In this case, the else part uses a Dialog.Message action to tell the user that they didn't type the right message.

6) Preview the project. Try clicking on the button and typing different messages into the input field.

Depending on what you type, you'll either see the "hello world!" message, or "You didn't type Hello World!".

Note that if you type some variation of "hello world!", such as "hello world!", or "hEllO WorlD!", the capitalization that you type will be preserved in the message that appears. Even though we used a String.Upper action to convert the message string to all uppercase letters in the if statement’s condition, the actual contents of the variable remain unchanged.

When the String.Upper action converts a value to all uppercase letters, it doesn't change the value in the variable...it just retrieves it, converts it, and passes it along.

7) Exit the preview.

Now you know how to compare two strings without being picky about capitalization. Programmers call this a case-insensitive comparison, whereas a comparison that only matches perfect capitalization is considered case-sensitive.

Tip: You can also use a String.CompareNoCase action to perform a case-insensitive comparison.

Testing a Numeric Value

Another common use of the if statement is to test a numeric value to see if it has reached a certain amount. To demonstrate this, let's create another button that displays a message after you click on it 5 times.

1) Add another button object to the page.

It doesn't matter what button you choose, or where you put the button on the page. We just need something to click on, so we can trigger an On Click event and perform some actions.

2) Add the following script to the button object's On Click event:

nClicks = nClicks + 1;
Button.SetText(this, "Click count: " .. nClicks);
if nClicks > 4 then
Dialog.Message("Hooray!", "You clicked " .. nClicks .. " times.");
end

Double-click on the new button you added, then click on the Script tab and type the above script into the On Click event.

It should look like this when you're done:

The first line adds 1 to the current value contained in a variable named nClicks. (We'll add some script to the page's On Preload event in the next step, to set this variable to 0 when the page loads.)

The second line uses a Button.SetText action to change the button object's text to "Click count: n", where n is the current value of nClicks.

The Button.SetText action takes two parameters. The first parameter is a string containing the name of the object that you want it to operate on. In this case, we used the special variable this, which contains the name of the object that the On Click event was triggered on. This is essentially the same as using the name of the object, like so:

Button.SetText("Button2", "Click count: " .. nClicks);

The Button.SetText action’s second parameter is a string containing the text that you want to display in the button object. We used the concatenation operator to join the current value of nClicks to the end of the string "Click count: ". Note that this string has a space at the end of it, so there will be a space between the colon and the value of nClicks. (The resulting string just looks better that way.)

The concatenation operator consists of two periods, or dots (..). In fact, it's often referred to as the "dot-dot" operator. It is used to join two strings together to form a new, combined string. It's kind of like string glue.

Note: Technically, the value inside nClicks isn't a string—it's a number. That doesn't really matter, though. When you're doing concatenation, AutoPlay will automatically convert a number into the equivalent string, as required.

The rest of the script is just an if statement that tests whether the value of nClicks is greater than 4, and displays a message when that's true. (A couple more concatenation operators are used in the Dialog.Message action, to create the string for its second parameter. Note that you can easily include the contents of a variable in the "middle" of a string as well.)

Once you're done editing the button's On Click script, click OK to close the script editor.

3) Add the following line to the page's On Preload event:

nClicks = 0;

We need to initialize nClicks before the button is clicked, so that our script in the button's On Click event will start counting up from 0. Note that we can't just set nClicks to 0 in the button's On Click event, or it would be reset to zero every time the button was clicked.

To add the line to the page's On Preload event, just double-click on the page surface, then click on the On Preload tab of the Script editor, and add the nClicks line to the existing script. Once you're done, it should like something like this:

It doesn't matter if you put the nClicks = 0; line before or after the existing line...the order of the individual lines in this script isn't important.

4) Preview the project, and click on the button object 5 times.

Each time you click on the button, its text will change to show how many times you've clicked on it so far. After you've clicked on the button 5 times, it will also display a message telling you how many times you've clicked.

5) Exit the preview.

There you go. You've just created a pretty sophisticated little program.

Tip: If you feel adventurous, see if you can modify the script to stop announcing the number of clicks once you've clicked 10 times.

Here's a hint: you'll need to use a logical operator like "or" and "and" to test more than one thing at once in the if statement's condition. For example, you could make the test only be true between 3 and 7 by using a condition like this:

if (nCount > 2) and (nCount < 8) then
    -- only true if greater than 2 and less than 8
end

The second line in the above script is a comment. (It doesn't actually do anything.) Everything on a line after two dashes (--) is completely ignored by AutoPlay. You can use such comments wherever you'd like to add "internal" notes to your scripts.

Using a For Loop

Sometimes it's helpful to be able to repeat a bunch of actions several times, without having to type them over and over and over again. One way to accomplish this is by using a for loop.

The basic syntax of the for loop is:

for variable = start, end, step do
do something here
end

For example:

for n = 10, 100, 10 do
Dialog.Message("", n);
end

The above script simply counts from 10 to 100, going up by 10 at a time, displaying the current value of the variable n in a dialog message box. This accomplishes the same thing as typing:

Dialog.Message("", 10);
Dialog.Message("", 20);
Dialog.Message("", 30);
Dialog.Message("", 40);
Dialog.Message("", 50);
Dialog.Message("", 60);
Dialog.Message("", 70);
Dialog.Message("", 80);
Dialog.Message("", 90);
Dialog.Message("", 100);

Obviously, the for loop makes repeating similar actions much easier.

Let's use a simple for loop to add all of the digits between 1 and 100, and display the result.

1) Add a button object to the page. Add the following script to this button object’s On Click event:

n = 0;
for i = 1, 100 do
n = n + i;
end
Dialog.Message("", "The sum of all the digits is: " .. n);

The script should look like this when you're done:

The first line creates a variable called n and sets it to 0. The next line tells the for loop to count from 1 to 100, storing the current "count" at each step in a variable named i.

During each "pass" through the loop, the script between the "do" and the "end" will be performed. In this case, it consists of a single line that adds the current values of n and i together, and then stores the result back into n. In other words, it adds i to the current value of n.

This for loop is the same as typing out:

n = n + 1;
n = n + 2;
n = n + 3;
n = n + 4;

...all the way up to 100.

The last line of our script just displays the result of the calculation to the user in a dialog message box.

Tip: You can use the Add Code button to insert an example for loop, complete with comments explaining the syntax. You can then edit the example to fit your own needs.

2) Preview the project, and click on the button object.

When you click on the button object, the for loop will blaze through the calculation 100 times, and then the Dialog.Message action will display the result.

It all happens very fast.

3) Exit the preview.

You probably won't find yourself using for loops as often as you'll use if statements, but it's definitely worth knowing how to use them. When you need to repeat steps, they can save you a lot of effort.

Of course, when it comes to saving you effort, the real champions are functions.

Creating Functions

A function is just a portion of script that you can define, name and then call from somewhere else.

You can use functions to avoid repeating the same script in different places, essentially creating your own custom "actions"—complete with parameters and return values if you want.

In general, functions are defined like this:

function function_name (arguments)
function script here
return return_value;
end

The "function" keyword tells AutoPlay that what follows is a function definition. The function_name is simply a unique name for the function. The arguments part is the list of parameters that can be passed to the function when it is called. It's essentially a list of variable names that will receive the values that are passed. (The resulting variables are local to the function, and only have meaning within it.) A function can as many arguments as you want (even none at all).

The "return" keyword tells the function to return one or more values back to the script that called it.

The easiest way to learn about functions is to try some examples, so let's dive right in.

1) Choose Project > Global Functions.

This opens the Global Functions dialog.

The Global Functions dialog is a convenient place to put any functions or variables that you want to make available throughout your project. Any script that you add on this dialog will be performed when your application is launched, right before the project's On Startup event is triggered.

2) Add the following script:

function SayHello(name)
Dialog.Message("", "Hello " .. name);
end

When you're done, click OK to close the dialog.

This script defines a function named SayHello that takes a single argument (which we've called "name") and displays a simple message.

Note that this only defines the function. When this script is performed, it will "load" the function into memory, but it won't actually display the message until the function is called.

It should look like this when you're done:

Once you've entered the function definition, click OK to close the Global Functions dialog.

3) Add a button to the page, and add this script to its On Click event:

SayHello("Mr. Anderson");

This script calls the SayHello function that we defined on the Global Functions dialog, passing the string "Mr. Anderson" as the value for the function's "name" parameter.

4) Preview the project and click on the button object.

When you click on the button object, the script on the object's On Click event calls the SayHello function, which then displays its message.

Note that the SayHello function was able to use the string that we passed to it in the message it displayed.

5) Exit the preview. Choose Project > Global Functions, and add the following script below the SayHello function:

function GetName()
local name = Dialog.Input("", "What is your name:");
return name;
end

When you're done, click OK to close the dialog.

The end result should look like this:

This script defines a function called GetName that does not take any parameters. The first line inside the function uses a Dialog.Input action to display a message dialog with an input field on it asking the user to type in their name. The value returned from this action (i.e. the text that the user entered) is then stored in a local variable called name.

The "local" keyword makes the variable only exist inside this function. It's essentially like saying, "for the rest of this function, whenever I use 'name' I'm referring to a temporary local variable, even if there's a global 'name' variable which may happen to exist." Using local variables inside functions is a good idea—it prevents you from changing the value of a global variable without meaning to. Of course, there are times when you want to change the value of a global variable, in which case you just won't use the "local" keyword the first time you assign anything to the variable.

The second line inside the function returns the current value of the local "name" variable to the script that called the function.

Tip: We could actually make this function's script fit on a single line, by getting rid of the variable completely. Instead of storing the return value from the Dialog.Input action in a variable, and then returning the contents of that variable, we could just put those two statements together, like so:

function GetName()
    return Dialog.Input("", "What is your name:");
end

This would make the GetName function return the value that was returned from the Dialog.Input action, without storing it in a variable first.

6) Edit the script in the button object's On Click event so it looks like this instead:

strName = GetName();
SayHello(strName);

It should look like this when you're done:

The first line calls our GetName function to ask the user for their name, and then stores the value returned from GetName in a variable called strName.

The second line passes the value in strName to our SayHello function.

7) Preview the project. Try out the script by clicking on the button object.

When you click on the button object, an input dialog will appear, asking you to enter your name.

After you type in your name and click OK (or press Enter), a second dialog box will appear, greeting you by the name you entered.

Pretty neat, huh?

8) Exit the preview. Edit the script in that same button object's On Click event so it looks like this:

SayHello(GetName());

This version of the script does away with the strName variable altogether. Instead, it uses the return value from our GetName function as the argument for the SayHello function.

In other words, it passes the GetName function's return value directly to the SayHello function.

Whenever a function returns a value, you can use a call to the function in the same way you would use the value, or a variable containing the value. This allows you to use the return value from a function without having to come up with a unique name for a temporary variable.

9) Preview the project, and try out the script again. When you're done, exit the preview.

The script should work exactly the same as before: you'll be asked for your name, and then greeted with it.

This is just a simple example, but it should give you an idea of what an incredibly powerful feature functions are. With them, you can condense large pieces of script into simple function calls that are much easier to type and give you a single, central location to make changes to that script. They also let you create flexible "subroutines" that accept different parameters and return results, just like the built-in AutoPlay actions.

And despite all that power, they are really quite simple to use.

Where to Go from Here

Well, that’s the last lesson. I hope you've enjoyed learning about AutoPlay, and have found this user's guide both useful and helpful.

Feel free to join your fellow AutoPlay Media Studio users in our online forums, where assistance and camaraderie abound. You can join in the fun by choosing Help > User Forums right from the AutoPlay program menu.

While you're at it, be sure to check out the online program reference and the helpful list of "How do I...?" questions as well.

There is a lot more that you can learn about this product, if you ever find the need or desire to. Chances are, if there's something you want to do with AutoPlay, there's at least one way to do it, and probably more.

As one of our wisest users once said, AutoPlay is easy to learn, but difficult to master.

Lesson 10 Summary

In this lesson, you learned how to:

• Display a message

• Use a variable

• Add an if statement

• Test numeric values

• Set a button object’s text

• Concatenate strings

• Compare strings

• Use a for loop

• Create functions


Actions - Overview

Actions

Overview Alphabetical List Error Codes

What are actions?

Actions are the commands that your AutoPlay application can perform at run time. Each action is a discrete instruction that tells the application to do something—whether it's to pause a video, open an external document, or jump to another page.

In other words, actions are what make your application do stuff.

And there's a lot of stuff your applications can do! (Just have a look at the alphabetical list of actions.)

When do actions happen?

Actions are always triggered by events. An event is something that occurs at run time while the user is using your application. This includes things like moving the mouse over an object (an "On Enter" event), clicking on an object (an "On Click" event) or jumping to a different page (an "On Show" event).

Where do I find these events?

When you select an object, you can see the events that the object supports on the properties pane, in the Actions category.

The events will also appear as tabs on the script editor, which you can access by double-clicking on the object, and then clicking on the Script tab.

Different objects support different events. For example, each button object has four events listed on the properties pane: On Click, On Right-Click, On Enter, and On Leave. By adding actions to the On Click event, you can make your application do something whenever the user clicks on that particular button object.

The whole project, other objects, and each individual page and dialogs all have their own events as well.

How do I add an action?

To add an action, simply click on the event (in the properties pane) that you want to add the action to, and then click the edit button to open the script editor.

You can also access the script editor by double-clicking on an object, page or dialog surface, and then clicking on the Script tab.

Once the script editor is open, you can either type in the action directly, or click on the Add Action button to walk through the process using the New Action wizard.

How do I edit an action?

Once you've added an action, you can edit its text the same way you would edit a paragraph in Word.

Or, you can double-click the line that the action is on, to edit it using the Action Properties dialog.


Overview

Quick Action

Overview

None

Show Page

Show Dialog

Close Dialog

Run Program

Open Document

Print Document

Send Email

View Website

Explore Folder

Play Multimedia

Play/Pause Background Music

Exit/Close


Close Dialog

Quick Action

Overview Close Dialog

Closes the currently displayed dialog in your project.

Properties

None.

Tip: To send a specific return code, use a DialogEx.Close action on the object's Script tab.


Exit/Close

Quick Action

Overview Exit/Close

This action will exit the application.

Properties

None.

Tip: To send a specific return code, use an Application.Exit action on the object's Script tab.


Explore Folder

Quick Action

Overview Explore Folder

Explores a folder on the CD-ROM.

Note: This is the same as right-clicking on a folder in Windows and choosing "Explore."

Properties

Folder:

The path to the folder on the CD-ROM that will be explored. Click the Browse button to select a folder.

Tip: You can clear the current text from the field by right-clicking in the field and selecting Clear Text.

Run Mode

The window mode you want to use. Choose from Normal, Minimized and Maximized.

Exit after action

Exit the application after this action is performed.


None

Quick Action

Overview None

No Action will be performed.


Open Document

Quick Action

Overview Open Document

Opens a document file with its default viewer application.

Properties

Document to open:

The path to the document file you want to open. Click the Browse button to select a file currently part of your project, or select a file from your system.

Tip: You can clear the current text from the field by right-clicking in the field and selecting Clear Text.

Run Mode

The window mode you want to use. Choose from Normal, Minimized and Maximized.

Exit after action

Exit the application after this action is performed.


Play Multimedia

Quick Action

Overview Play Multimedia

Play a multimedia file such as an AVI, MPG, audio format or any other multimedia type whose player supports the Play shell command.

Note: The user must have an appropriate viewer on their system to see, or hear the multimedia file properly.

Properties

File to play:

The path to the multimedia file you want to play. Click the Browse button to select a file currently part of your project, or select a file from your system.

Tip: You can clear the current text from the field by right-clicking in the field and selecting Clear Text.

Exit after action

Exit the application after this action is performed.


Play/Pause Background Music

Quick Action

Overview Play/Pause Background Music

Toggles the play state of the background audio track between playing and paused.

Note: Background audio can be configured by going to Project > Audio and choosing the Background Music tab.

Properties

None.


Print Document

Quick Action

Overview Print Document

Prints a document on the user's default printer. This is the same as selecting "print" from the right-click context menu of the file you wish to print.

Note: The associated viewer application for the file type must support the "print" verb in order for this to work.

Properties

Document to print:

The path to the document file you want to print. Click the Browse button to select a file currently part of your project, or select a file from your system.

Tip: You can clear the current text from the field by right-clicking in the field and selecting Clear Text.

Exit after action

Exit the application after this action is performed.


Run Program

Quick Action

Overview Run Program

Runs an executable program.

Properties

File to run:

The path to the executable program you want to run. Click the Browse button to select a file currently part of your project, or select a file from your system.

Tip: You can clear the current text from the field by right-clicking in the field and selecting Clear Text.

Command line arguments:

The command line arguments you want to pass to the executable program.

Working folder:

The working folder to set for the executable program.

Note: This sets the current directory for the operation to something other than the folder that the file is in. Normally, you can just leave it blank.

Run Mode

The window mode you want to use. Choose from Normal, Minimized and Maximized.

Exit after action

Exit the application after this action is performed.


Send Email

Quick Action

Overview Send Email

Opens the user's default email client with an email address in the "To" field.

Properties

Email address:

The email address that will appear in the "To" field.

Tip: You can automatically fill in the subject field, too. Just type "?subject=" (without quotes) after the email address, followed by the text that you want in the subject line. For example:

"joe@exampledomain.com?subject=Help"

Exit after action

Exit the application after this action is performed.


Show Dialog

Quick Action

Overview Show Dialog

Show a specific dialog in your project.

Tip: To retrieve a specific return code, use the DialogEx.Show and DialogEx.Close actions on the object's Script tab.

Note: You cannot navigate pages when a dialog is visible, nor can you show more than one instance of the same dialog at one time. You can however show a dialog from a dialog.

Properties

Dialog name:

The name of the dialog you want to show. You can choose the dialog name from the dropdown.


Show Page

Quick Action

Overview Show Page

Show a specific page in your project.

Note: You cannot navigate pages when a dialog is visible.

Properties

Page to show:

The page you want to show. Choose from the following:

First

Show the first page in your project according to the order of the page tabs.

Previous

Show the previous page in your project according to the order of the page tabs.

Next

Show the next page in your project according to the order of the page tabs.

Last

Show the last page in your project according to the order of the page tabs.

Back (History)

Navigate one page backward in the user's navigation history (the page the user was on before the current page).

Forward (History)

Navigate one page forward in the user's navigation history. (For this type to work, the user must have used Back (History) before they can go forward in the navigation history.)

Specific Page

Show a specific page in your project.

Page name:

The name of the page you want to show if you chose Specific Page as the page to show. You can choose the page name from the dropdown.


View Website

Quick Action

Overview View Website

Opens a web-based URL in the user's default Web browser.

Properties

Web site:

The URL for the web page. For example, http://www.indigorose.com.

Exit after action

Exit the application after this action is performed.


Script Editor - Overview

Script Editor

Overview Interface Special Features Events

The script editor is a dialog where you can add actions or scripts to events.

You can use its interface to add actions by either typing them in or by clicking the Add Action button.

By adding actions to different events, you can control when the actions are performed.

Tip: An easy way to access the script editor is to double-click on the object, page, or dialog surface and then click on the Script tab.


Script Editor - Interface

Script Editor

Overview Interface Special Features Events

Event Tabs

There is one tab for every event that the project, page, dialog or object supports. Each event represents something that can happen at run time. When an event is triggered, the script on the corresponding tab will be performed.

Event variables:

The variables that are automatically set whenever the current event is triggered. (See event variables.)

Code Window

The area where you can either type in your actions, or add them through the action wizard.

Note: Once an action has been added to the code window, you can double-click it to show it's properties in the Action Properties dialog. This feature can be enabled or disabled by clicking the Advanced button on the script editor.

Quick help:

When the cursor is on an action in the code window, it's action definition will be displayed in this field.

Action Help

When the cursor is on an action in the code window, it's online help will be opened.

Add Action

Adds a new action to the current event through the action wizard.

Add Code

Displays a variety of code templates you can add to the code window.

Edit

Edit the action's properties after it has been added to the code window. When the cursor is on an action in the code window, the Edit button will display it's properties dialog where you can modify it's settings.

Bookmarks

Create and manage bookmarks in the code window so you can easily jump to specific spots in your code.

Macros

Allows you to record and play macros so you can replicate frequent code scripts in the script editor.

Advanced

Advanced options that are available in the script editor:

Syntax Checker

This option checks the current script to make sure it is syntactically correct. It does not check for logical or other programming errors, simply syntax.

Note: You can turn on automatic syntax checking from Edit > Preferences on the Script Editor page.

Double-click Edit

Allow double-clicking on actions in the code window to edit their properties (Properties dialog will be displayed).

Note: If Double-click Edit is unchecked, double-clicking any text in the action editor simply selects the text, as in most other text editors. This option can also be set in Edit > Preferences on the Script Editor page.

Show Whitespace

If checked, any whitespace in the code window will be identified by special characters.

Import Registry Values...

Opens the Import Registry Key/Values dialog where you can import keys or values from the Registry on your development system.

Import .REG Files...

Opens a file browse dialog where you can select a .REG file that you would like to recreate using Registry actions.

Import...

Imports a script file (*.lua) and displays its contents in the code window.

Export...

Exports the current script in the code window as a script file (*.lua).

Print...

Prints the action script currently in the code window.

Global Functions...

Opens the global functions dialog.

Editor Settings...

Opens the Window Properties dialog where you can customize the Globals dialog's settings.


Script Editor - Special Features

Script Editor

Overview Interface Special Features Events

Autocomplete

Autocomplete is the script editor's ability to automatically complete keywords for you when you press Tab.

As you type the first few letters of a keyword into the script editor, a black tooltip will appear nearby with the word on it. This is the script editor's autocomplete feature at work. Whenever you type something that the script editor recognizes as a keyword, it will display its best guess at what you are typing in one of those little black tooltips. Whenever one of those little black tooltips is visible, you can press the Tab key to automatically type the rest of the word. Or, if you prefer, just keep on typing!

Autocomplete Dropdown

Another feature of the autocomplete is the ability to display a dropdown of options that can be automatically completed.

If you press Ctrl + Space while your cursor is in the code window, a drop-down list will be displayed containing the names of all of the actions, constants and global variables. You can choose one of list items and then press Tab or Enter to automatically type it out for you.

Note: This dropdown cannot be accessed if your cursor is inside a set of quotes (a string).

The autocomplete dropdown is also available for completing action names after the category has been typed. For example, when you type a period after the word Video, the script editor recognizes what you've typed as the beginning of an action name, and presents you with a drop-down list of all the actions that begin with "Video." If you like, you can choose one of the actions from that list and then press either Tab or Enter to automatically type that word out for you. You don't have to use the drop-down list, though...you can continue typing the rest of the action yourself if you want.

Tip: Once you've typed something that the script editor recognizes as the name of an action, a little bit of Quick Help appears near the bottom of the window listing the names of the action's parameters and indicating what type of value is expected for each one.

Right-Click Insert

If your project contains many different objects, pages and files, its often difficult to remember the exact name or spelling that was used. The following options are available when right clicking in the code window and selecting Insert:

Object Reference

Displays a list of all of the object names that can be accessed on that page. You can highlight the object name and click OK (or double-click the object name) to automatically type it in the code window at the current cursor position.

Page/Dialog Reference

Displays a list of all of the page and dialog names in your project. You can highlight the page or dialog name and click OK (or double-click the page/dialog name) to automatically type it in the code window at the current cursor position.

File Reference

Opens the Select File dialog where you can browse for a file you want to reference. The selected file will be added to your project's resources (if not already), and its file path will automatically be typed in the code window at the current cursor position.

Menu Handler...

Opens an Insert dialog where you can select the menu ID item you would like to reference.

Right-Click Property Tables

If you use the Get/SetProperties actions for objects, this will allow you to easily create a table template containing all of the available properties for the selected object.

Search and Replace

Sometimes its useful to be able to search for specific text in the code window and replace it if needed. The following options are available when you right-click in the code window and select Advanced:

Find

Opens a Find dialog where you can specify a string of text you would like to search for in the code window.

Note: The Mark All option of the Find requires the "Show left margin" setting to be enabled in order to display the locations the string was found. You can find the "Show left margin" option on the Misc tab of the Editor Settings.

Replace

Opens the Find & Replace dialog where you can specify the string of text you would like to search for in the code window and the string you would like to replace it with.

Action Properties

Once an action has been added to the code window, you can double-click it to show it's properties in the Action Properties dialog. This feature can be enabled or disabled by clicking the Advanced button on the script editor.


Script Editor - Events

Script Editor

Overview Interface Special Features Events

Each event represents something that can happen at run time. When an event is triggered, any script that was added to it will be performed.

Note: Some events contain special event variables that are local to the event and contain more information about the event.

Here are all of the possible events in AutoPlay Media Studio:

On Audio

On Cell Changed

On Check

On Char

On Click

On Close

On Double-Click

On EditLabel

On Enter

On Error

On Expanded

On Finish

On Finished

On FlashCall

On Focus

On FSCommand

On Hyperlink

On Key

On Leave

On Link

On Loaded

On Menu

On Mouse Button

On Mouse Button Down

On Mouse Button Up

On Mouse Move

On Mouse Wheel

On Movie End

On Navigate

On Pause

On Play

On Preload

On Rate Change

On Right-Click

On Show

On Size

On Select

On Selection Changed

On Shutdown

On Slide Changed

On Startup

On Stop

On Timer

On Audio

The actions that will be performed whenever an audio channel's state changes on the page or dialog. For example, if a channel's audio is paused, this event will be triggered.

The following event variables are automatically set whenever this event is triggered:

e_Channel

(number) The audio channel whose state has changed. One of the following channel values will be returned:

CONSTANT | VALUE | DESCRIPTION
CHANNEL_BACKGROUND | 5 | Background audio channel.
CHANNEL_EFFECTS | 0 | Effects channel (used for mouse over, down, and click sounds).
CHANNEL_NARRATION | 6 | Narration channel (used for voice overs).
CHANNEL_USER1 | 1 | User channel 1.
CHANNEL_USER2 | 2 | User channel 2.
CHANNEL_USER3 | 3 | User channel 3.
CHANNEL_USER4 | 4 | User channel 4.
CHANNEL_ALL | -3 | All audio channels.

e_State

(string) The state that the audio channel has changed to. One of the following states will be returned:

VALUE | TYPE | DESCRIPTION
Finish | string | The audio channel's track reached it's end.
Pause | string | The audio channel was paused using the Audio.Pause action.
Play | string | The audio channel was played using the Audio.Play action
Stop | string | The audio channel was stopped using the Audio.Stop action.

On Cell Changed

The actions that will be performed whenever the text of a cell changes for any reason in a grid object. This may result from the user editing cell text or from text being pasted in or even from the text changing in response to an action such as Grid.SetCellText.

e_Row

(number) The row (0-based) of the cell that changed.

e_Column

(number) The column (0-based) of the cell that changed.

e_OldText

(number) The text that was in the cell before it was changed.

e_NewText

(number) The new text of the cell.

On Char

The actions that will be performed whenever the cursor is inside an input object and receives the WM_CHAR windows message. This event will occur after the input object's On Key event is fired, but will not necessarily be fired after each key stroke. This event is similar to the On Key event, except instead of being fired each time a key is pressed, On Char is fired when a keystroke (or a combination of keystrokes) translates to a character.

The following event variables are automatically set whenever this event is triggered:

e_Char

(number) The character code of the key that was pressed.

e_Modifiers

(table) A table containing three boolean values that describe which modifier keys were held down while the key was pressed. A modifier key is a key that can be held down while another key is pressed, to "modify" it.

There are three true/false values in the table, one for each type of modifier key on the keyboard: shift, ctrl, and alt. You can access these values as e_Modifiers.shift, e_Modifiers.ctrl, and e_Modifiers.alt.

On Check

The actions that will be performed whenever an item is checked/unchecked in a tree or listbox object.

ListBox - Note that clicking on an unselected checkbox in the list will trigger an On Select event before the On Check event is fired. This is the normal behaviour for checklist box controls in Windows. Specifically, clicking on a checkbox in the list toggles the check for all selected items. If the item is currently unselected, it is selected first, then the checkbox is toggled.

ListBox - Note: If the item is already selected, there will be no On Select event first. Do not depend on there being an On Select every time you toggle a check box.

The following event variables are automatically set whenever this event is triggered: (only available for the tree object).

e_NodeIndex

(string) The index of the node being checked/unchecked.

e_Checked

(boolean) True if the node has been checked, false if it has been unchecked.

On Click

The actions that will be performed when the user clicks on this object.

On Close

The actions that will be performed whenever the page or dialog is closed.

Tip: If you need to prevent the user from closing the dialog or want to add a confirmation message, you can use the built-in function QueryAllowDialogClose.

On Double-Click

The actions that will be performed when the user double-clicks within the bounds of this object.

On EditLabel

The actions that will be performed whenever an item's label is changed in the tree object.

The following event variables are automatically set whenever this event is triggered:

e_NodeIndex

(string) The index of the node being edited.

e_NewText

(string) The text that has just been set.

e_OldText

(string) The text that existed previously before the user edited the current node.

On Enter

The actions that will be performed when the mouse moves onto this object ("enters" the object's territory).

On Error

The actions that will be performed when an error occurs in a QuickTime object.

The following event variables are automatically set whenever this event is triggered:

e_ErrorCode

(number) The numeric code of the error that has occurred.

e_ErrorOrigin

(number) Where the error originated from:

CONSTANT | VALUE | DESCRIPTION
qtErrorEventOriginControl | 0 | An error occurred in the QTControl area of the QuickTime ActiveX control.
qtErrorEventOriginMovie | 1 | An error occurred in the QTMovie area of the QuickTime ActiveX control.
qtErrorEventOriginQuickTime | 2 | An error occurred in the QTQuickTime area of the QuickTime ActiveX control.

On Expanded

The actions that will be performed whenever an item is expanded/collapsed in the tree object.

e_NodeIndex

(string) The index of the node being expanded/collapsed.

e_Expanded

(boolean) True if the node has been expanded, false if it has been collapsed.

On Finish

The actions that will be performed whenever the video reaches the end in a video object.

On Finished

The actions that will be performed whenever the slideshow reaches the end in a slideshow object.

Note: If the Loop setting is selected, this event will not be fired.

On FlashCall

The actions that will be performed whenever an exposed Flash actionscript function is called using the control's external API (ExternalInterface class) causing it to dispatch its FlashCall event. You can respond to Flash actionscript function calls using the Flash.SetReturnValue action, or call Flash actionscript functions using the Flash.CallFunction action.

Flash's external API offers additional functionality compared to fscommand() by allowing any number of arguments to be passed as well as various data types.

Note: This event is only available in Flash version 8.0 or later.

e_FlashCall

(string) An XML formatted string containing the function request from the Flash file's actionscript code. This string can be parsed using the available XML actions.

On Focus

Note: This event is available for input objects, listbox objects, combobox objects, richtext objects, and tree objects in your project.

The actions that will be performed whenever the object is given focus. For example, it will be given focus if the user clicks inside the object.

On FSCommand

The actions that will be performed whenever an fscommand() function is performed in the Flash file's internal actionscript code.

Note: "fscommand()" is the name of a Flash actionscript function that allows a .swf file to send a message or "command" to the application that is playing it. Whenever a Flash file calls the fscommand() function, AutoPlay responds by performing the action that you assigned to the On FSCommand event.

Tip: The Flash fscommand() function passes a command in the form of a short text string. You can use AutoPlay's own scripting abilities to differentiate between fscommand() calls that pass different command strings. In fact, your Flash file can use the fscommand() function to send any number of custom commands to your AutoPlay application, and you can make your application respond to each command in any way you want.

The following event variables are automatically set whenever this event is triggered:

e_FSCommand

(string) A string containing the last FSCommand fired within the Flash object.

e_FSArgs

(string) A string containing the arguments of the last FSCommand fired within the Flash object.

On Hyperlink

The actions that will be performed when the user clicks on a hyperlink in a markup enabled xButton object.

The following event variable is automatically set whenever this event is triggered:

e_Hyperlink

(string) A string containing the hyperlink text that the user clicked on an xButton object. This is the text surrounded by Hyperlink tags in its markup text. For example, "Link Text" would be returned if the markup text contained <Hyperlink>Link Text</Hyperlink>.

On Key

Note: This event is available for the input object, listbox object, combobox object, tree object, richtext object and each page or dialog in your project.

On the input object, these are the actions that will be performed whenever the cursor is inside the input object and the user presses a key.

On the listbox object, these are the actions that will be performed whenever the listbox object has focus and the user presses a key.

On the combobox object, these are the actions that will be performed whenever the combobox object has focus and the user presses a key.

On the tree object, these are the actions that will be performed whenever the combobox object has focus and the user presses a key.

On the richtext object, these are the actions that will be performed whenever the richtext object has focus and the user presses a key.

On a page, these are the actions that will be performed whenever the application window has focus and the user presses a key.

On a dialog, these are the actions that will be performed whenever the dialog window has focus and the user presses a key.

The following event variables are automatically set whenever this event is triggered:

e_Key

(number) The virtual key code of the key that was pressed.

e_Modifiers

(table) A table containing three boolean values that describe which modifier keys were held down while the key was pressed. A modifier key is a key that can be held down while another key is pressed, to "modify" it.

There are three true/false values in the table, one for each type of modifier key on the keyboard: shift, ctrl, and alt. You can access these values as e_Modifiers.shift, e_Modifiers.ctrl, and e_Modifiers.alt.

On Leave

The actions that will be performed when the mouse moves off of this object ("leaves" the object's territory).

On Link

Note: This event is available for richtext objects in your project.

The actions that will be performed when the user clicks on a link in a richtext object.

Note: To use this event, you must have the Auto-detect URL feature enabled.

The following event variables are automatically set whenever this event is triggered:

e_Min

(number) The 1-based character index where the link's text begins.

e_Max

(number) The 1-based character index where the link's text ends.

e_Link

(string) The text of the link that was clicked.

On Loaded

The actions that will be performed whenever the URL being navigated to has finished loading.

The following event variables are automatically set whenever this event is triggered:

e_URL

(string) A string containing the URL that has finished loading.

On Menu

The actions that will be performed when the user interacts with the menu bar.

The following event variables are automatically set whenever this event is triggered:

e_ID

(number) The item ID of the menu item currently being interacted with.

e_ItemInfo

(table) Extended information about the currently selected menu item.

KEY | TYPE | DESCRIPTION
Text | string | The text of the menu item currently being interacted with.
ID | number | The item ID of the menu item currently being interacted with.
IconID | number | The 0-based icon index from the Image List specified on the Menu Bar for the menu item.
Enabled | boolean | True if the current menu item is enabled, false if it is not.
Checked | boolean | True if the current menu item is checked, false if it is not.

On Mouse Button

The actions that will be performed when a mouse button is clicked within the bounds of your application.

The following event variables are automatically set whenever this event is triggered:

e_Type

(number) A number containing the type of mouse-button click that occurred:

CONSTANT | VALUE | DESCRIPTION
LEFT_BUTTON_DOWN | 0 | Left mouse button has been pressed.
LEFT_BUTTON_UP | 1 | Left mouse button has been released.
RIGHT_BUTTON_DOWN | 2 | Right mouse button has been pressed.
RIGHT_BUTTON_UP | 3 | Right mouse button has been released.

e_X

(number) The horizontal position of the mouse cursor, in pixels, from the left side of the page or dialog.

e_Y

(number) The vertical position of the mouse cursor, in pixels, from the right side of the page or dialog.

On Mouse Button Down

The actions that will be performed when the cursor is over a QuickTime object and a mouse button is pressed down.

The following event variables are automatically set whenever this event is triggered:

e_Button

(number) The index of the button that was pressed:

CONSTANT | VALUE | DESCRIPTION
BUTTON_LEFT | 1 | Left mouse button.
BUTTON_RIGHT | 2 | Right mouse button.
BUTTON_MIDDLE | 3 | Middle mouse button.

e_Modifiers

(table) A table containing three boolean values that describe which modifier keys were held down while the mouse button was pressed. A modifier key is a key that can be held down while button is pressed, to "modify" it.

There are three true/false values in the table, one for each type of modifier key on the keyboard: shift, ctrl, and alt. You can access these values as e_Modifiers.shift, e_Modifiers.ctrl, and e_Modifiers.alt.

e_XObject

(number) The horizontal position of the mouse cursor when the mouse button was pressed, relative to the top left of the object.

e_YObject

(number) The vertical position of the mouse cursor when the mouse button was pressed, relative to the top left of the object.

e_X

(number) The horizontal position of the mouse cursor when the mouse button was pressed, relative to the top left of the page.

e_Y

(number) The vertical position of the mouse cursor when the mouse button was pressed, relative to the top left of the page.

On Mouse Button Up

The actions that will be performed when the cursor is over a QuickTime object and a mouse button is released.

The following event variables are automatically set whenever this event is triggered:

e_Button

(number) The index of the button that was pressed:

CONSTANT | VALUE | DESCRIPTION
BUTTON_LEFT | 1 | Left mouse button.
BUTTON_RIGHT | 2 | Right mouse button.
BUTTON_MIDDLE | 3 | Middle mouse button.

e_Modifiers

(table) A table containing three boolean values that describe which modifier keys were held down while the mouse button was pressed. A modifier key is a key that can be held down while button is pressed, to "modify" it.

There are three true/false values in the table, one for each type of modifier key on the keyboard: shift, ctrl, and alt. You can access these values as e_Modifiers.shift, e_Modifiers.ctrl, and e_Modifiers.alt.

e_XObject

(number) The horizontal position of the mouse cursor when the mouse button was pressed, relative to the top left of the object.

e_YObject

(number) The vertical position of the mouse cursor when the mouse button was pressed, relative to the top left of the object.

e_X

(number) The horizontal position of the mouse cursor when the mouse button was pressed, relative to the top left of the page.

e_Y

(number) The vertical position of the mouse cursor when the mouse button was pressed, relative to the top left of the page.

On Mouse Move

The actions that will be performed when the mouse moves within the bounds of your application or a QuickTime object.

e_X

(number) The horizontal position of the mouse cursor, in pixels, from the left side of the page or dialog.

e_Y

(number) The vertical position of the mouse cursor, in pixels, from the right side of the page or dialog.

The following additional event variables are automatically set whenever this event is triggered for a QuickTime object:

e_Button

(number) The index of the button that was pressed:

CONSTANT | VALUE | DESCRIPTION
BUTTON_LEFT | 1 | Left mouse button.
BUTTON_RIGHT | 2 | Right mouse button.
BUTTON_MIDDLE | 3 | Middle mouse button.

e_Modifiers

(table) A table containing three boolean values that describe which modifier keys were held down while the mouse button was pressed. A modifier key is a key that can be held down while button is pressed, to "modify" it.

There are three true/false values in the table, one for each type of modifier key on the keyboard: shift, ctrl, and alt. You can access these values as e_Modifiers.shift, e_Modifiers.ctrl, and e_Modifiers.alt.

e_XObject

(number) The horizontal position of the mouse cursor when the mouse button was pressed, relative to the top left of the object.

e_YObject

(number) The vertical position of the mouse cursor when the mouse button was pressed, relative to the top left of the object.

On Mouse Wheel

The actions that will be performed when the mouse wheel is rotated while a page or dialog has focus.

The following event variables are automatically set whenever this event is triggered:

e_Flags

(table) A table containing five boolean values that describe which modifier keys or buttons were held down when the mouse wheel event was fired.

There are five true/false values in the table: shift key, ctrl key, left mouse button, middle mouse button, and right mouse button. You can access these values as e_Flags.shift, e_Flags.ctrl, e_Flags.LButton, e_Flags.MButton, and e_Flags.RButton.

e_Delta

(number) The distance that the mouse wheel was rotated. A negative value indicates that the mouse wheel was rotated backward towards the user, and a positive value indicates that the mouse wheel was rotated forward away from the user. This can be altered by the user via their mouse software. This value will usually be 120 or -120, however may be multiples or divisions of 120 depending upon the mouse vendor.

e_X

(number) The horizontal position of the mouse cursor, in pixels, from the left side of the page or dialog.

e_Y

(number) The vertical position of the mouse cursor, in pixels, from the top of the page or dialog.

On Movie End

The actions that will be performed when the media file has finished playing in a QuickTime object.

On Navigate

The actions that will be performed whenever the URL changes (when it starts to navigate to a new page) in the web object.

The following event variables are automatically set whenever this event is triggered:

e_URL

(string) A string containing the URL that is being navigated to.

On Pause

The actions that will be performed whenever the video is paused in a video object, or slideshow is paused in a slideshow object.

On Play

The actions that will be performed whenever the video starts to play in a video object, or slideshow starts in a slideshow object.

On Preload

The actions that will be performed right after the page or dialog is created in memory, before the page or dialog (or any of the objects on it) is shown.

You can use this event to set the initial visibility of each object on the page or dialog. Simply show or hide the objects according to whether they should start out visible or hidden. (By doing so before the page or dialog is displayed, you can avoid any visible "flickering" as the objects are hidden or shown.)

Note: Some actions (especially object-related actions) may not work properly on this event because it occurs before any of the page's objects are "created." If an action doesn't work at On Preload, try it at On Show instead.

On Rate Change

The actions that will be performed when the play rate of the media file within a QuickTime object has changed.

The following event variables are automatically set whenever this event is triggered:

e_Rate

(number) The new rate of the media file.

On Right-Click

The actions that will be performed when the user right-clicks this object.

On Select

The actions that will be performed when the user selects or deselects items in a listbox or combobox.

The following event variables are automatically set whenever this event is triggered through a combobox object:

e_Selection:

(number) The index of the comboxbox item that is being selected. (The first item in the list has an index of 1.)

On Selection Changed

Note: This event is available for richtext and grid objects in your project.

The actions that will be performed when the selection changes in a richtext object.

The following event variables are automatically set whenever this event is triggered:

e_Min

(number) The 1-based character index of the start of the selection.

e_Max

(number) The 1-based character index of the end of the selection.

The actions that will be performed whenever the selection of cells in a grid object changes.

The following event variables are automatically set whenever this event is triggered:

e_Row

(number) The row (0-based) of the cell that now has focus.

e_Column

(number) The column (0-based) of the cell that now has focus.

On Show

The actions that will be performed whenever the page or dialog is opened (after the page or dialog is shown and the objects have been drawn).

On Shutdown

The actions that will be performed whenever your AutoPlay application closes. The AutoPlay application can either be closed using the Application.Exit action or if the user clicked close button on the application title bar.

Tip: If you need to prevent the user from closing the application or want to add a confirmation message, you can use the built-in function QueryAllowProjectClose().

On Slide Changed

The actions that will be performed each time the slide changes in the slideshow object.

The following event variables are automatically set whenever this event is triggered:

e_Index

(number) The 1-based index of the slide that was changed to in the slideshow (currently shown).

e_FilePath

(string) The full path to the image file that was changed to in the slideshow (currently shown).

On Size

The actions that will be performed whenever the page or dialog changes size. For example, if the user maximizes the application's window, these actions will fire.

The following event variables are automatically set whenever this event is triggered:

e_WindowWidth

(number) The width, in pixels, of the entire application window, including the border and title bar.

e_WindowHeight

(number) The height, in pixels, of the entire application window, including the border and title bar.

e_PageWidth

(number) The width of the current page.

e_PageHeight

(number) The height of the current page.

e_DialogWidth

(number) The width of the current dialog.

e_DialogHeight

(number) The height of the current dialog.

e_Type

(number) The type of resize that has occurred. Choose from:

CONSTANT | VALUE | DESCRIPTION
SIZE_RESTORED | 0 | The application was either restored from being maximized or minimized or was resized normally.
SIZE_MINIMIZED | 1 | The application was minimized to the taskbar.
SIZE_MAXIMIZED | 2 | The application was maximized.

Tip: To make your project resizable, enable the resizable option on the Appearance tab of the Project Settings dialog (Project > Settings). Dialogs have their own resizable setting located on the Attributes tab of its properties dialog.

On Startup

The actions that will be performed right after the user launches your AutoPlay application, before any pages or dialogs are initialized and shown.

Note: that some actions (especially object-related actions) may not work properly on this event because it occurs before any objects in the project are "created."

On Stop

The actions that will be performed whenever the video is stopped in a video object.

On Timer

The actions that will be performed whenever a page or dialog timer fires. You can start a page timer using a Page.StartTimer action, or a dialog timer using the DialogEx.StartTimer action.

The following event variable is automatically set whenever this event is triggered:

e_ID

(number) The numeric ID of the page or dialog timer that has fired. This is the same ID that was passed to the Page.StartTimer or DialogEx.StartTimer action that created the timer. When using multiple timers, you can differentiate between them using if/elseif statements.


Alphabetical List

Actions

Overview Alphabetical List Error Codes

Application

Application.Exit

Application.ExitScript

Application.GetCurrentDialog

Application.GetCurrentPage

Application.GetDialogProperties

Application.GetDialogs

Application.GetDialogScript

Application.GetLastError

Application.GetMenu

Application.GetPageProperties

Application.GetPages

Application.GetPageScript

Application.GetWndHandle

Application.LoadActionPlugin

Application.LoadScript

Application.LoadValue

Application.MakeKeywordIndex

Application.Minimize

Application.Restore

Application.RunScriptFile

Application.SaveValue

Application.SearchKeywords

Application.SetDialogProperties

Application.SetDialogScript

Application.SetLastError

Application.SetMenu

Application.SetMenuBarActive

Application.SetPageProperties

Application.SetPageScript

Application.SetRedraw

Application.SetSysTrayIcon

Application.SetSysTrayTooltip

Application.ShowPopupMenu

Application.Sleep

Audio

Audio.GetCurrentPos

Audio.GetFilename

Audio.GetLength

Audio.GetOggTags

Audio.GetVolume

Audio.IsLooping

Audio.Load

Audio.Pause

Audio.Play

Audio.Seek

Audio.SetLooping

Audio.SetVolume

Audio.Stop

Audio.ToggleMute

Audio.TogglePlay

Button

Button.GetPos

Button.GetProperties

Button.GetSize

Button.GetState

Button.GetText

Button.IsEnabled

Button.IsVisible

Button.SetEnabled

Button.SetPos

Button.SetProperties

Button.SetSize

Button.SetState

Button.SetText

Button.SetVisible

CHECKBOX

CheckBox.GetChecked

CheckBox.GetPos

CheckBox.GetProperties

CheckBox.GetSize

CheckBox.GetText

CheckBox.IsEnabled

CheckBox.IsVisible

CheckBox.SetChecked

CheckBox.SetEnabled

CheckBox.SetPos

CheckBox.SetProperties

CheckBox.SetSize

CheckBox.SetText

CheckBox.SetVisible

COMBOBOX

ComboBox.AddItem

ComboBox.DeleteItem

ComboBox.FindItem

ComboBox.GetCount

ComboBox.GetItemData

ComboBox.GetItemText

ComboBox.GetPos

Combobox.GetProperties

ComboBox.GetSelected

ComboBox.GetSize

ComboBox.GetText

ComboBox.InsertItem

ComboBox.IsEnabled

ComboBox.IsVisible

ComboBox.ResetContent

ComboBox.SetEnabled

ComboBox.SetItemData

ComboBox.SetItemText

ComboBox.SetPos

Combobox.SetProperties

ComboBox.SetSelected

ComboBox.SetSize

ComboBox.SetText

ComboBox.SetUpdate

ComboBox.SetVisible

CRYPTO

Crypto.Base64DecodeFromFile

Crypto.Base64DecodeFromString

Crypto.Base64EncodeToFile

Crypto.Base64EncodeToString

Crypto.BlowfishDecrypt

Crypto.BlowfishDecryptString

Crypto.BlowfishEncrypt

Crypto.BlowfishEncryptString

Crypto.MD5DigestFromFile

Crypto.MD5DigestFromString

Crypto.Rot13

DATABASE

Database Actions

Debug

Debug.Clear

Debug.GetEventContext

Debug.GetTraceMode

Debug.Print

Debug.SendToFile

Debug.SetTraceMode

Debug.ShowWindow

Dialog

Dialog.ComboBox

Dialog.FileBrowse

Dialog.FolderBrowse

Dialog.Input

Dialog.MaskedInput

Dialog.Message

Dialog.PageSearch

Dialog.PasswordInput

Dialog.SplashFlash

Dialog.SplashImage

Dialog.SplashVideo

Dialog.TimedMessage

DIALOGEX

DialogEx.ClickObject

DialogEx.Close

DialogEx.CreateObject

DialogEx.DeleteObject

DialogEx.EnumerateObjects

DialogEx.GetFocus

DialogEx.GetObjectScript

DialogEx.GetObjectType

DialogEx.GetRadioValue

DialogEx.GetSize

DialogEx.GetWndHandle

DialogEx.Print

DialogEx.Redraw

DialogEx.SetFocus

DialogEx.SetObjectScript

DialogEx.SetObjectZOrder

DialogEx.SetRadioValue

DialogEx.SetRedraw

DialogEx.Show

DialogEx.StartTimer

DialogEx.StopTimer

DLL

DLL.CallFunction

DRIVE

Drive.Eject

Drive.Enumerate

Drive.GetFreeSpace

Drive.GetInformation

Drive.GetSize

Drive.GetType

Drive.GetUsedSpace

File

File.Copy

File.Delete

File.DeleteOnReboot

File.DoesExist

File.ExploreFolder

File.Find

File.GetAttributes

File.GetCRC

File.GetDefaultViewer

File.GetShortName

File.GetSize

File.GetVersionInfo

File.Install

File.IsInUse

File.Move

File.MoveOnReboot

File.Open

File.OpenEmail

File.OpenURL

File.Print

File.Rename

File.Run

File.RunAs

File.RunOnReboot

File.SetAttributes

File.SetPermissions

Flash

Flash.CallFunction

Flash.GetFilename

Flash.GetFlashVariable

Flash.GetPos

Flash.GetProperties

Flash.GetSize

Flash.GetState

Flash.IsEnabled

Flash.IsVisible

Flash.Load

Flash.Play

Flash.Seek

Flash.SetEnabled

Flash.SetFlashVariable

Flash.SetPos

Flash.SetProperties

Flash.SetReturnValue

Flash.SetSize

Flash.SetVisible

Flash.Stop

FOLDER

Folder.Create

Folder.Delete

Folder.DeleteTree

Folder.DoesExist

Folder.Find

Folder.GetCurrent

Folder.Rename

Folder.SetCurrent

FTPWI

FTPWI.Download

FTPWI.GetErrorInfo

FTPWI.GetFileSize

GRID

Grid.AutoSize

Grid.AutoSizeColumn

Grid.AutoSizeColumns

Grid.AutoSizeRow

Grid.AutoSizeRows

Grid.DeleteAllItems

Grid.DeleteColumn

Grid.DeleteNonFixedRows

Grid.DeleteRow

Grid.EditCopy

Grid.EditCut

Grid.EditPaste

Grid.EnsureVisible

Grid.ExpandColumnsToFit

Grid.ExpandLastColumn

Grid.ExpandRowsToFit

Grid.ExpandToFit

Grid.GetCellColors

Grid.GetCellState

Grid.GetCellText

Grid.GetColumnCount

Grid.GetColumnHiding

Grid.GetColumnResize

Grid.GetColumnWidth

Grid.GetDragAndDrop

Grid.GetEditable

Grid.GetFixedColumnCount

Grid.GetFixedColumnSelection

Grid.GetFixedRowCount

Grid.GetFixedRowSelection

Grid.GetFocusCell

Grid.GetFrameFocusCell

Grid.GetGridColors

Grid.GetGridLines

Grid.GetHeaderSort

Grid.GetListMode

Grid.GetModified

Grid.GetNextItem

Grid.GetPos

Grid.GetProperties

Grid.GetRowCount

Grid.GetRowHeight

Grid.GetRowHiding

Grid.GetRowResize

Grid.GetSelectable

Grid.GetSelectedCount

Grid.GetSingleColumnSelection

Grid.GetSingleRowSelection

Grid.GetSize

Grid.GetSortAscending

Grid.GetSortColumn

Grid.GetTabEnabled

Grid.GetToolTipsEnabled

Grid.GetTrackFocusCell

Grid.GetUnhideColumn

Grid.GetUnhideRow

Grid.InsertColumn

Grid.InsertRow

Grid.IsCellEditable

Grid.IsCellFixed

Grid.IsCellSelected

Grid.IsCellValid

Grid.IsCellVisible

Grid.IsEnabled

Grid.IsVisible

Grid.LoadFromFile

Grid.MakeColorRGB

Grid.Print

Grid.RedrawCell

Grid.RedrawColumn

Grid.RedrawRow

Grid.Refresh

Grid.SaveToFile

Grid.SelectAll

Grid.SetCellColors

Grid.SetCellFont

Grid.SetCellText

Grid.SetColumnCount

Grid.SetColumnHiding

Grid.SetColumnResize

Grid.SetColumnWidth

Grid.SetDragAndDrop

Grid.SetEditable

Grid.SetEnabled

Grid.SetFixedColumnCount

Grid.SetFixedColumnSelection

Grid.SetFixedRowCount

Grid.SetFixedRowSelection

Grid.SetFocusCell

Grid.SetFrameFocusCell

Grid.SetGridColors

Grid.SetGridLines

Grid.SetHeaderSort

Grid.SetListMode

Grid.SetModified

Grid.SetPos

Grid.SetProperties

Grid.SetRedraw

Grid.SetRowCount

Grid.SetRowHeight

Grid.SetRowHiding

Grid.SetRowResize

Grid.SetSelectable

Grid.SetSelectedRange

Grid.SetSingleColumnSelection

Grid.SetSingleRowSelection

Grid.SetSize

Grid.SetSortAscending

Grid.SetTabEnabled

Grid.SetToolTipsEnabled

Grid.SetTrackFocusCell

Grid.SetUnhideColumn

Grid.SetUnhideRow

Grid.SetVisible

Grid.SortTextItems

HOTSPOT

Hotspot.GetPos

Hotspot.GetProperties

Hotspot.GetSize

Hotspot.IsEnabled

Hotspot.SetEnabled

Hotspot.SetPos

Hotspot.SetProperties

Hotspot.SetSize

HTTP

HTTP.Download

HTTP.DownloadSecure

HTTP.GetConnectionState

HTTP.GetFileSize

HTTP.GetFileSizeSecure

HTTP.GetHTTPErrorInfo

HTTP.Submit

HTTP.SubmitSecure

HTTP.TestConnection

Image

Image.GetFileInfo

Image.GetFilename

Image.GetOpacity

Image.GetPos

Image.GetProperties

Image.GetSize

Image.IsEnabled

Image.IsVisible

Image.Load

Image.SetEnabled

Image.SetOpacity

Image.SetPos

Image.SetProperties

Image.SetSize

Image.SetVisible

INIFILE

INIFile.DeleteSection

INIFile.DeleteValue

INIFile.GetSectionNames

INIFile.GetValue

INIFile.GetValueNames

INIFile.SetValue

INPUT

Input.CanUndo

Input.Copy

Input.Cut

Input.Delete

Input.GetPos

Input.GetProperties

Input.GetSelection

Input.GetSize

Input.GetText

Input.IsEnabled

Input.IsVisible

Input.Paste

Input.ScrollLines

Input.ScrollToLine

Input.SetEnabled

Input.SetPos

Input.SetProperties

Input.SetSelection

Input.SetSize

Input.SetText

Input.SetVisible

Input.Undo

Label

Label.GetPos

Label.GetProperties

Label.GetSize

Label.GetText

Label.IsEnabled

Label.IsVisible

Label.SetEnabled

Label.SetPos

Label.SetProperties

Label.SetSize

Label.SetText

Label.SetVisible

Listbox

ListBox.AddItem

ListBox.DeleteItem

ListBox.DeselectItem

ListBox.FindItem

ListBox.GetChecked

ListBox.GetCheckedCount

ListBox.GetCount

ListBox.GetItemCheck

ListBox.GetItemData

ListBox.GetItemText

ListBox.GetPos

ListBox.GetProperties

ListBox.GetSelected

ListBox.GetSelectedCount

ListBox.GetSize

ListBox.GetType

ListBox.InsertItem

ListBox.IsEnabled

ListBox.IsItemSelected

ListBox.IsVisible

ListBox.SelectItem

ListBox.SetEnabled

ListBox.SetItemCheck

ListBox.SetItemData

ListBox.SetItemText

ListBox.SetPos

ListBox.SetProperties

ListBox.SetSize

ListBox.SetType

ListBox.SetUpdate

ListBox.SetVisible

Math

Math.Abs

Math.Acos

Math.Asin

Math.Atan

Math.Atan2

Math.Ceil

Math.Cos

Math.Deg

Math.Exp

Math.Floor

Math.Frexp

Math.HexColorToNumber

Math.HexToNumber

Math.Ldexp

Math.Log

Math.Log10

Math.Max

Math.Min

Math.Mod

Math.Pow

Math.Rad

Math.Random

Math.RandomSeed

Math.RGBToNumber

Math.Round

Math.Sin

Math.Sqrt

Math.Tan

MSI

MSI.ApplyPatch

MSI.CloseHandle

MSI.ConfigureFeature

MSI.ConfigureProduct

MSI.ConfigureProductEx

MSI.EnableLog

MSI.EnumClients

MSI.EnumComponents

MSI.EnumFeatures

MSI.EnumPatches

MSI.EnumProducts

MSI.EnumRelatedProducts

MSI.GetComponentPath

MSI.GetFeatureInfo

MSI.GetFeatureUsage

MSI.GetFileVersion

MSI.GetMSIVersion

MSI.GetPatchInfo

MSI.GetProductCode

MSI.GetProductInfo

MSI.GetProductProperty

MSI.GetShortcutTarget

MSI.GetUserInfo

MSI.InstallMissingComponent

MSI.InstallMissingFile

MSI.InstallProduct

MSI.LocateComponent

MSI.OpenPackage

MSI.OpenProduct

MSI.QueryFeatureState

MSI.QueryProductState

MSI.ReinstallFeature

MSI.ReinstallProduct

MSI.RunMsiexec

MSI.SetInternalUI

MSI.VerifyPackage

Page

Page.ClickObject

Page.CreateObject

Page.DeleteObject

Page.EnumerateObjects

Page.GetFocus

Page.GetObjectScript

Page.GetObjectType

Page.GetRadioValue

Page.GetSize

Page.Jump

Page.Navigate

Page.Print

Page.Redraw

Page.SetFocus

Page.SetObjectScript

Page.SetObjectZOrder

Page.SetRadioValue

Page.StartTimer

Page.StopTimer

Paragraph

Paragraph.GetPos

Paragraph.GetProperties

Paragraph.GetScrollPos

Paragraph.GetScrollRange

Paragraph.GetSize

Paragraph.GetText

Paragraph.IsEnabled

Paragraph.IsVisible

Paragraph.SetEnabled

Paragraph.SetPos

Paragraph.SetProperties

Paragraph.SetScrollPos

Paragraph.SetSize

Paragraph.SetText

Paragraph.SetVisible

PDF

PDF.GetFile

PDF.GetPos

PDF.GetProperties

PDF.GetSize

PDF.GoToPage

PDF.IsEnabled

PDF.IsVisible

PDF.LoadFile

PDF.Navigate

PDF.Print

PDF.PrintWithDialog

PDF.SetEnabled

PDF.SetNamedDest

PDF.SetPos

PDF.SetProperties

PDF.SetSize

PDF.SetVisible

PDF.SetZoomScroll

Plugin

Plugin.GetPos

Plugin.GetSize

Plugin.IsEnabled

Plugin.IsVisible

Plugin.SetEnabled

Plugin.SetPos

Plugin.SetSize

Plugin.SetVisible

PROGRESS

Progress.GetCurrentPos

Progress.GetPos

Progress.GetProperties

Progress.GetRange

Progress.GetSize

Progress.GetText

Progress.IsEnabled

Progress.IsVisible

Progress.SetCurrentPos

Progress.SetEnabled

Progress.SetPos

Progress.SetProperties

Progress.SetRange

Progress.SetSize

Progress.SetStep

Progress.SetText

Progress.SetVisible

Progress.StepIt

quicktime

QuickTime.GetCurrentPos

QuickTime.GetFile

QuickTime.GetFullScreen

QuickTime.GetLength

QuickTime.GetMute

QuickTime.GetPos

QuickTime.GetProperties

QuickTime.GetSize

QuickTime.GetVolume

QuickTime.IsEnabled

QuickTime.IsVisible

QuickTime.LoadFile

QuickTime.Pause

QuickTime.Play

QuickTime.Seek

QuickTime.SetEnabled

QuickTime.SetFullScreen

QuickTime.SetMute

QuickTime.SetPos

QuickTime.SetProperties

QuickTime.SetSize

QuickTime.SetVisible

QuickTime.SetVolume

RADIOBUTTON

RadioButton.GetChecked

RadioButton.GetPos

RadioButton.GetProperties

RadioButton.GetSize

RadioButton.GetText

RadioButton.IsEnabled

RadioButton.IsVisible

RadioButton.SetChecked

RadioButton.SetEnabled

RadioButton.SetPos

RadioButton.SetProperties

RadioButton.SetSize

RadioButton.SetText

RadioButton.SetVisible

REGISTRY

Registry.CreateKey

Registry.DeleteKey

Registry.DeleteValue

Registry.DoesKeyExist

Registry.GetAccess

Registry.GetKeyNames

Registry.GetValue

Registry.GetValueNames

Registry.GetValueType

Registry.SetValue

RichText

RichText.CanPaste

RichText.CanUndo

RichText.Copy

RichText.Cut

RichText.Delete

RichText.EmptyUndoBuffer

RichText.FindText

RichText.GetLine

RichText.GetParagraphFormat

RichText.GetPos

RichText.GetProperties

RichText.GetSelection

RichText.GetSelectionFormat

RichText.GetSize

RichText.GetText

RichText.GetTextLength

RichText.IsEnabled

RichText.IsVisible

RichText.LoadFromFile

RichText.Paste

RichText.SaveToFile

RichText.ScrollLines

RichText.ScrollToLine

RichText.SetEnabled

RichText.SetParagraphFormat

RichText.SetPos

RichText.SetProperties

RichText.SetSelection

RichText.SetSelectionFormat

RichText.SetSize

RichText.SetText

RichText.SetVisible

RichText.Undo

SERVICE

Service.Continue

Service.Create

Service.Delete

Service.Pause

Service.Query

Service.Start

Service.Stop

SHELL

Shell.CreateShortcut

Shell.DeleteShortcut

Shell.Execute

Shell.GetFolder

SLIDESHOW

SlideShow.AddSlide

SlideShow.DeleteSlide

SlideShow.FillFromFolder

SlideShow.GetCurrentSlide

SlideShow.GetImagePath

SlideShow.GetPos

SlideShow.GetProperties

SlideShow.GetSize

SlideShow.GetSlideCount

SlideShow.GoToSlide

SlideShow.IsEnabled

SlideShow.IsVisible

SlideShow.Navigate

SlideShow.Pause

SlideShow.Play

SlideShow.SetEnabled

SlideShow.SetPos

SlideShow.SetProperties

SlideShow.SetSize

SlideShow.SetVisible

Statusdlg

StatusDlg.GetAutoSize

StatusDlg.GetMeterPos

StatusDlg.Hide

StatusDlg.IsCancelled

StatusDlg.SetAutoSize

StatusDlg.SetCancelled

StatusDlg.SetMessage

StatusDlg.SetMeterPos

StatusDlg.SetMeterRange

StatusDlg.SetStatusText

StatusDlg.SetTitle

StatusDlg.Show

StatusDlg.ShowCancelButton

StatusDlg.ShowProgressMeter

StRING

String.AbbreviateFilePath

String.Asc

String.Char

String.Compare

String.CompareFileVersions

String.CompareNoCase

String.Concat

String.Find

String.GetFormattedSize

String.Left

String.Length

String.Lower

String.MakePath

String.Mid

String.Repeat

String.Replace

String.ReverseFind

String.Right

String.SplitPath

String.ToNumber

String.TrimLeft

String.TrimRight

String.Upper

SYSTEM

System.EnumerateProcesses

System.GetDate

System.GetDefaultLangID

System.GetDisplayInfo

System.GetLANInfo

System.GetMemoryInfo

System.GetMousePosition

System.GetOSName

System.GetOSProductInfo

System.GetOSVersionInfo

System.GetTime

System.GetUserInfo

System.GetUserSID

System.Is64BitOS

System.IsSystemRestoreAvailable

System.IsKeyDown

System.Reboot

System.RegisterActiveX

System.RegisterFont

System.RegisterTypeLib

System.RemoveRestorePoint

System.SetRestorePoint

System.TerminateProcess

System.UnregisterActiveX

System.UnregisterFont

TABLE

Table.Concat

Table.Count

Table.Insert

Table.Remove

Table.Sort

textfile

TextFile.ReadToString

TextFile.ReadToTable

TextFile.WriteFromString

TextFile.WriteFromTable

TREE

Tree.CollapseNode

Tree.EnsureVisible

Tree.ExpandNode

Tree.FindNodeByData

Tree.FindNodeByText

Tree.GetChildCount

Tree.GetChildren

Tree.GetNode

Tree.GetPos

Tree.GetProperties

Tree.GetSelectedNode

Tree.GetSize

Tree.InsertNode

Tree.IsEnabled

Tree.IsVisible

Tree.RemoveNode

Tree.SetEnabled

Tree.SetNode

Tree.SetPos

Tree.SetProperties

Tree.SetSelectedNode

Tree.SetSize

Tree.SetVisible

Video

Video.GetCurrentPos

Video.GetFilename

Video.GetLength

Video.GetPos

Video.GetProperties

Video.GetSize

Video.GetState

Video.GetVolume

Video.IsEnabled

Video.IsFullScreen

Video.IsVisible

Video.Load

Video.Pause

Video.Play

Video.Seek

Video.SetEnabled

Video.SetFullScreen

Video.SetPos

Video.SetProperties

Video.SetSize

Video.SetVisible

Video.SetVolume

Video.Stop

Web

Web.Back

Web.Forward

Web.GetPos

Web.GetProperties

Web.GetSize

Web.GetURL

Web.IsEnabled

Web.IsSilent

Web.IsVisible

Web.LoadHTML

Web.LoadURL

Web.Print

Web.Refresh

Web.SetEnabled

Web.SetPos

Web.SetProperties

Web.SetSilent

Web.SetSize

Web.SetVisible

Web.Stop

Window

Window.Close

Window.EnumerateProcesses

Window.EnumerateTitles

Window.GetPos

Window.GetSize

Window.Hide

Window.Maximize

Window.Minimize

Window.Restore

Window.SetMask

Window.SetOrder

Window.SetPos

Window.SetSize

Window.SetText

Window.Show

xButton

xButton.GetImage

xButton.GetPos

xButton.GetProperties

xButton.GetSize

xButton.GetState

xButton.GetText

xButton.IsEnabled

xButton.IsVisible

xButton.SetEnabled

xButton.SetImage

xButton.SetPos

xButton.SetProperties

xButton.SetSize

xButton.SetState

xButton.SetText

xButton.SetVisible

XML

XML.Count

XML.GetAttribute

XML.GetAttributeNames

XML.GetElementNames

XML.GetElementXML

XML.GetValue

XML.GetXML

XML.InsertXML

XML.Load

XML.RemoveAttribute

XML.RemoveElement

XML.Save

XML.SetAttribute

XML.SetValue

XML.SetXML

zip

Zip.Add

Zip.Extract

Zip.GetContents


Application.Exit

Overview Examples

Application.Exit (

number ReturnCode = 0 )

Description

Exits the application.

Note: This action also exits the script on the current event, so any action script occurring after it will not be executed.

Note: This action is the same as pressing the close button on the application title bar.

Tip: Use this action to exit an application that doesn't have a close button (i.e. one without a title bar).

Parameters

ReturnCode

(number) The optional return code you want to set for the AutoPlay application's process.

Returns

Nothing.

See also: Related Actions


Application.ExitScript

Application.ExitScript (

)

Description

Breaks out of the current block of script being executed.

Parameters

None.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Application.GetCurrentDialog

string Application.GetCurrentDialog (

)

Description

Returns the name of the current dialog in the application.

Parameters

None.

Returns

(string) The name of the current dialog. If an error occurs, a blank string "" will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Application.GetCurrentPage

string Application.GetCurrentPage (

)

Description

Returns the name of the current page in the application.

Parameters

None.

Returns

(string) The name of the current page. If an error occurs, a blank string "" will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Application.GetDialogProperties

table Application.GetDialogProperties (

string DialogName )

Description

Returns a table containing the properties of the specified dialog.

Parameters

DialogName

(string) The name of the dialog whose properties you want.

Returns

(table) A table containing the dialog's properties indexed by the following keys. If the dialog doesn't exist or an error occurs, nil is returned.

KEY | TYPE | DESCRIPTION
DialogTitle | string | The window title of the dialog.
Movable | boolean | True if the dialog is set to be movable, or false if it is not.
AlwaysOnTop | boolean | True if the dialog window is set to always appear on top of all other windows, or false if it is not.
Width | number | The width of the dialog surface, in pixels.
Height | number | The height of the dialog surface, in pixels.
DialogStyle | number | The window style of the dialog: DIALOG_STYLE_STANDARD (0), DIALOG_STYLE_BORDERED (1), DIALOG_STYLE_FLAT (2), DIALOG_STYLE_CUSTOM_MASK (3).
Resizable | boolean | True if the dialog is set to be resizable, or false if it is not.
MinWidth | number | The minimum dialog width to use if Resizable is set to true.
MinHeight | number | The minimum dialog height to use if Resizable is set to true.
UseCustomIcon | boolean | True if a custom icon is set to be shown in the top left corner of the dialog, or false if it is not.
CustomIcon | string | The path to the custom icon to show if UseCustomIcon is true, and DialogStyle is set to DIALOG_STYLE_STANDARD.
UseCustomSettings | boolean | True if custom colors are being used, or false if the default background color for windows applications is being used. Note: If you skin your application, the default color will come from your skin file.
BackgroundType | number | The type of background: BG_SOLID (0), BG_GRADIENT (1), BG_IMAGE (2)
BackgroundColor | number | The numeric value of the background color.
GradientColorTop | number | The numeric value of the gradient top color. Only applicable if BackgroundType = BG_GRADIENT.
ImageFilename | string | The path to the image file to be used for the background image if BackgroundType = BG_IMAGE.
ImageStretchMode | number | The type of image stretching to be performed if BackgroundType = BG_IMAGE. Choose from BG_IMAGE_FITPAGE (0), BG_IMAGE_TILE (1), BG_IMAGE_ACTUALSIZE (2).
CustomMask | string | The path to the file that is being used as the window mask when DialogStyle is set to DIALOG_STYLE_CUSTOM_MASK.
FitCustomMaskToWindow | boolean | True if the mask file is set to resize to match the dimensions of the dialog, false if it is not.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Application.GetDialogs

table Application.GetDialogs (

)

Description

Returns a table containing the names of all of the dialogs in the application.

Parameters

None.

Returns

(table) A table containing the names of all of the dialogs in the application. If an error occurs, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Application.GetDialogScript

string Application.GetDialogScript (

string DialogName,

string EventName )

Description

Returns a string containing the script from a dialog's event.

Parameters

DialogName

(string) The name of the dialog whose script you want to get.

EventName

(string) The name of the event whose script you want as it appears in the script editor dialog. For example "On Show".

Returns

(string) The dialog's script for the specified event. If an error occurs, an empty string ("") is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Application.GetLastError

number Application.GetLastError (

)

Description

Returns the last error code.

Tip: Use this to check whether an error occurred while performing the last action.

Parameters

None.

Returns

(number) The error code for the last action that was performed. (0 if the action succeeded, a number greater than 0 if the action failed.)

See Error Codes for the complete list of error codes.

Note: All of the error code messages are stored in a table called _tblErrorMessages and can be accessed by their error code index. For example, accessing the table index _tblErrorMessages[1000] will access the error code string "The specified file could not be found."

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Application.GetMenu

table Application.GetMenu (

)

Description

Returns a numerically indexed table containing the current menu structure of the application's menu bar.

Parameters

None.

Returns

(table) A numerically indexed table of menu item tables, or nil if an error occurs. Each position of the table will contain the following keys:

KEY | TYPE | DESCRIPTION
ID | number | The numeric ID of the menu item. Note: If a menu item contains any submenu items, its ID will be -1. If a menu item is a separator, its ID will be 0.
Text | string | The text of the menu item. Note that a separator item's Text is set to "---".
IconID | number | The 0-based icon index from the Image List specified on the Menu Bar for the menu item.
Enabled | boolean | Whether the menu item is enabled.
Checked | boolean | Whether the menu item is checked.
SubMenu | table | A numerically indexed table of menu item tables if child elements exist, or nil if no child elements exist.

You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Application.GetPageProperties

table Application.GetPageProperties (

string PageName )

Description

Returns a table containing the properties of the specified page.

Parameters

PageName

(string) The name of the page whose properties you want.

Returns

(table) A table containing the page's properties indexed by the following keys. If the page doesn't exist or an error occurs, nil is returned.

KEY | TYPE | DESCRIPTION
UseCustomSettings | boolean | True if custom colors are being used, or false if the default background color for windows applications is being used. Note: If you skin your application, the default color will come from your skin file.
BackgroundType | number | The type of background: BG_SOLID (0), BG_GRADIENT (1), BG_IMAGE (2)
BackgroundColor | number | The numeric value of the background color.
GradientColorTop | number | The numeric value of the gradient top color. Only applicable if BackgroundType = BG_GRADIENT.
ImageFilename | string | The path to the image file to be used for the background image if BackgroundType = BG_IMAGE.
ImageStretchMode | number | The type of image stretching to be performed if BackgroundType = BG_IMAGE. Choose from BG_IMAGE_FITPAGE (0), BG_IMAGE_TILE (1), BG_IMAGE_ACTUALSIZE (2).
Description | string | The page's description value.
Keywords | table | A one-based numerically indexed list of keywords for the page.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Application.GetPages

table Application.GetPages (

)

Description

Returns a table containing the names of all of the pages in the application.

Parameters

None.

Returns

(table) A table containing the names of all of the pages in the application. If an error occurs, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Application.GetPageScript

string Application.GetPageScript (

string PageName,

string EventName )

Description

Returns a string containing the script from a page's event.

Parameters

PageName

(string) The name of the page whose script you want to get.

EventName

(string) The name of the event whose script you want as it appears in the script editor dialog. For example "On Show".

Returns

(string) The page's script for the specified event. If an error occurs, an empty string ("") is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Application.GetWndHandle

number Application.GetWndHandle (

)

Description

Returns the numeric window handle for the application window.

Parameters

None.

Returns

(number) The numeric window handle for the application. If an error occurs, -1 will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Application.LoadActionPlugin

Application.LoadActionPlugin (

string Filename )

Description

Loads an action plugin file (.lmd).

Note: Normally you would choose Project > Plugins to add an action plugin. This action is only intended to handle special situations where you need more control over when the plugin is loaded.

Action plugins allow you to extend the functionality of AutoPlay with new actions. Refer to the action plugin's documentation for information on what features it adds and how to use them.

Parameters

Filename

(string) The path to the action plugin file (.lmd).

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Application.LoadScript

Application.LoadScript (

string Filename )

Description

Loads and executes an external script file (.lua) if it hasn't been loaded already.

A script file is simply a text file containing AutoPlay script.

Note: The contents of the script file will only be executed once per session, no matter how many times it is loaded.

Parameters

Filename

(string) The path to the external script file (.lua). Click the browse button to select a file.

Note: Script files may also be referenced by the filename alone if they are located in the project's AutoPlay\Scripts folder.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Application.LoadValue

string Application.LoadValue (

string Section,

string Key )

Description

Loads a value that was saved with the Application.SaveValue action.

Parameters

Section

(string) The name of the "section" that the value was saved in.

Key

(string) The name of the "key" that identifies the value.

Returns

(string) The value that was loaded. If an error occurs, a blank string "" will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Application.MakeKeywordIndex

table Application.MakeKeywordIndex (

boolean SortPages = true )

Description

Scans all pages in the project for keywords defined in each page's Keywords field and returns a table that is indexed by keyword.

Parameters

SortPages

(boolean) Whether to sort the list of pages where each keyword is found, or keep the pages in the same order as in the project.

VALUE | DESCRIPTION
true | Sort the pages. (Default)
false | Don't sort the pages.

Returns

(table) A table indexed by unique keywords. The value of each entry is a (one-based) numerically indexed table of pages that the keyword is found on. If no keywords were found, nil is returned.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Application.Minimize

Application.Minimize (

)

Description

Minimizes the application's window to the task bar.

Note: This action is the same as pressing the minimize button on the title bar.

Parameters

None.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Application.Restore

Application.Restore (

)

Description

Restores the application's window to the size and position it had before it was minimized.

Note: This action is the same as pressing the restore button on the title bar.

Parameters

None.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Application.RunScriptFile

Application.RunScriptFile (

string Filename )

Description

Executes the contents of an external script file (.lua).

A script file is simply a text file containing AutoPlay script.

Parameters

Filename

(string) The path to the external script file (.lua). Click the browse button to select a file.

Note: Script files may also be referenced by the filename alone if they are located in the project's AutoPlay\Scripts folder.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Application.SaveValue

Application.SaveValue (

string Section,

string Key,

string Value )

Description

Saves a value to the user's system so it can be retrieved later with an Application.LoadValue action.

Parameters

Section

(string) The name of the "section" that the value will be saved in.

Note: If the section doesn't exist it will be created automatically.

Key

(string) The name of the "key" that will identify the value.

Note: If a key by that name already exists, the new value will overwrite the old one.

Value

(string) The value to save.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Application.SearchKeywords

table Application.SearchKeywords (

string SearchFor,

boolean AllowPartialMatch = true,

boolean CaseSensitive = true )

Description

Searches all keywords in all pages in the project and returns a table of search results.

Parameters

SearchFor

(string) The text you want to search the keywords for.

AllowPartialMatch

(boolean) Whether to find keywords that contain the search text as a substring, or to only return keywords that match the search text exactly.

VALUE | DESCRIPTION
true | Allow a partial match. (Default)
false | Don't allow a partial match.

CaseSensitive

(boolean) Whether the search is case-sensitive.

VALUE | DESCRIPTION
true | The search is case-sensitive. (Default)
false | The search is not case-sensitive.

Returns

(table) A table indexed by page name. The value of each entry is a (one-based) numerically indexed table of matching keywords found on that page. If no entries were found, nil is returned.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Application.SetDialogProperties

Application.SetDialogProperties (

string DialogName,

table Properties )

Description

Sets the properties of a dialog.

Parameters

DialogName

(string) The name of the dialog whose properties you want to modify.

Properties

(table) A table containing the properties you want to modify, indexed by name.

KEY | TYPE | DESCRIPTION
DialogTitle | string | The window title of the dialog.
Movable | boolean | True if the dialog should be movable, or false if it should not. Note: This value can only be set if the dialog is not currently visible. If the dialog is already visible, this setting will be reflected the next time the dialog is shown.
AlwaysOnTop | boolean | True if the dialog window should always appear on top of all other windows, or false if it should not.
Width | number | The width of the dialog surface, in pixels. You cannot set a width less than the value defined in MinWidth.
Height | number | The height of the dialog surface, in pixels. You cannot set a height less than the value defined in MinHeight.
DialogStyle | number | The window style to set for the dialog: DIALOG_STYLE_STANDARD (0), DIALOG_STYLE_BORDERED (1), DIALOG_STYLE_FLAT (2), DIALOG_STYLE_CUSTOM_MASK (3).
Resizable | boolean | True if the dialog should be resizable, or false if it should not.
MinWidth | number | The minimum dialog width to set if Resizable is set to true. If Width is less than this value, it will also be set.
MinHeight | number | The minimum dialog height to set if Resizable is set to true. If Height is less than this value, it will also be set.
UseCustomIcon | boolean | True if a custom icon should be shown in the top left corner of the dialog, or false if it should not.
CustomIcon | string | The path to the custom icon to show if UseCustomIcon is true, and DialogStyle is set to DIALOG_STYLE_STANDARD.
UseCustomSettings | boolean | True if the dialog background should use custom colors or false if the default background color for windows applications should be used. Note: If you skin your application, the default color will come from your skin file.
BackgroundType | number | The type of background: BG_SOLID (0), BG_GRADIENT (1), BG_IMAGE (2)
BackgroundColor | number | The numeric value of the background color.
GradientColorTop | number | The numeric value of the gradient top color. Only applicable if BackgroundType = BG_GRADIENT.
ImageFilename | string | The path to the image file to be used for the background image if BackgroundType = BG_IMAGE.
ImageStretchMode | number | The type of image stretching to be performed if BackgroundType = BG_IMAGE. Choose from BG_IMAGE_FITPAGE (0), BG_IMAGE_TILE (1), BG_IMAGE_ACTUALSIZE (2).
CustomMask | string | The path to the file to be used as the window mask when DialogStyle is set to DIALOG_STYLE_CUSTOM_MASK. You can pass an empty string ("") to clear the window mask.
FitCustomMaskToWindow | boolean | True to resize the mask file to match the dimensions of the dialog, false to not.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Application.SetDialogScript

Application.SetDialogScript (

string DialogName,

string EventName,

string Script )

Description

Sets the script on a dialog's event.

Parameters

DialogName

(string) The name of the dialog whose script you want to set.

EventName

(string) The name of the event whose script you want to set, as it appears in the script editor dialog. For example "On Show".

Script

(string) The script to assign to the specified dialog's event.

Note: The script specified in this argument will replace any script existing in the event. If you want to append to the event (instead of replacing the script), you must first perform an Application.GetDialogScript action.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Application.SetLastError

Application.SetLastError (

number ErrorCode )

Description

Changes the last error code.

Parameters

ErrorCode

(number) A numeric code indicating the error code you wish to set.

See Error Codes for the complete list of error codes.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Application.SetMenu

Application.SetMenu (

table Menu )

Description

Sets the application's menu contents.

Note: "Show menu bar" setting must be checked on the Menu Bar dialog in order for this action to work.

Parameters

Menu

(table) A table of menu information, indexed by the following keys:

KEY | TYPE | DESCRIPTION
ID | number | The numeric ID of the menu item.
Text | string | The text of the menu item. Use & before a letter to specify a mnemonic. Note that to create a separator item, set the item's Text to "---". In this case the ID, Checked, Enabled and SubTable items are ignored. Separator items will never fire an On Menu event.
IconID | number | The 0-based icon index from the Image List specified on the Menu Bar to use for the menu item.
Enabled | boolean | Whether the menu item is enabled.
Checked | boolean | Whether the menu item is checked.
SubMenu | table | A numerically indexed table of menu item tables. This creates a pop-up menu for this item. Note that if a SubTable is specified this menu item will never fire the On Menu event. Instead it's sub-items will fire the event.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Application.SetMenuBarActive

Application.SetMenuBarActive (

boolean Activate = true )

Description

Controls whether or not the application menu bar is active. This action is useful if you would like to prevent the user from accessing the menu while performing actions.

Parameters

Activate

(boolean) Whether to make the application menu bar active:

VALUE | DESCRIPTION
true | Allow the user to access the application menu bar. (Default)
false | Don't allow the user to access the application menu bar.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Application.SetPageProperties

Application.SetPageProperties (

string PageName,

table Properties )

Description

Sets the properties of a page.

Parameters

PageName

(string) The name of the page whose properties you want to modify.

Properties

(table) A table containing the properties you want to modify, indexed by name.

KEY | TYPE | DESCRIPTION
UseCustomSettings | boolean | True if the page background should use custom colors or false if the default background color for windows applications should be used. Note: If you skin your application, the default color will come from your skin file.
BackgroundType | number | The type of background: BG_SOLID (0), BG_GRADIENT (1), BG_IMAGE (2)
GradientColorTop | number | The numeric value of the gradient top color. Only applicable if BackgroundType = BG_GRADIENT.
BackgroundColor | number | The numeric value of the background color.
ImageFilename | string | The full (or relative to resource folder) path and filename of the image file to be used for the background image if BackgroundType = BG_IMAGE.
ImageStretchMode | number | The type of image stretching to be performed if BackgroundType = BG_IMAGE. Choose from BG_IMAGE_FITPAGE (0), BG_IMAGE_TILE (1), BG_IMAGE_ACTUALSIZE (2).
Description | string | The page's description value.
Keywords | table | A one-based numerically indexed list of keywords for the page.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Application.SetPageScript

Application.SetPageScript (

string PageName,

string EventName,

string Script )

Description

Sets the script on a page's event.

Parameters

PageName

(string) The name of the page whose script you want to set.

EventName

(string) The name of the event whose script you want to set, as it appears in the script editor dialog. For example "On Show".

Script

(string) The script to assign to the specified page's event.

Note: The script specified in this argument will replace any script existing in the event. If you want to append to the event (instead of replacing the script), you must first perform an Application.GetPageScript action.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Application.SetRedraw

Application.SetRedraw (

boolean Redraw = true )

Description

Controls the redrawing of all objects in the application. This action is useful if you are performing a series of actions that cause redrawing on the page. Using this action, you can force all changes to appear at once rather than having the page redraw itself multiple times.

Parameters

Redraw

(boolean) Whether to make the application redraw objects in the application:

VALUE | DESCRIPTION
true | Redraw objects. (Default)
false | Don't redraw objects.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Application.SetSysTrayIcon

boolean Application.SetSysTrayIcon (

string IconPath,

number IconIndex = 0 )

Description

Sets the application's system tray icon using an icon file or executable, or reverts back to the original application icon.

Note: This action requires that you specify that the application contains a system tray icon. This setting can be configured on the Appearance tab of Project > Settings in the Taskbar area.

Parameters

IconPath

(string) The full path to a file containing the icon you want to use. The most common types are icon files (.ico) and executables (.exe). If no icon path is specified, the system tray icon will revert back to its original application icon.

IconIndex

(number) The zero-based index describing which icon to use in the executable file. For example, an icon index of 2 means it will use the third icon in the file. For .ico files, leave this value 0.

Returns

(boolean) True if the action was successful, and false if it failed. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Application.SetSysTrayTooltip

boolean Application.SetSysTrayTooltip (

string TooltipText,

boolean Show = false )

Description

Sets the application's system tray icon tooltip text and optionally shows it.

Note: This action requires that you specify that the application contains a system tray icon. This setting can be configured on the Appearance tab of Project > Settings in the Taskbar area.

Parameters

TooltipText

(string) The tooltip text to display for the system tray icon.

Show

(boolean) Whether to immediately show the new tooltip text, or wait until the user accesses it.

VALUE | DESCRIPTION
true | Show the new tooltip text immediately. This means that the system tray icon will gain focus and the tooltip will be shown.
false | Set the new tooltip text, but don't show the tooltip window until the user accesses it. (Default)

Returns

(boolean) True if the action was successful, and false if it failed. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Application.ShowPopupMenu

number Application.ShowPopupMenu (

number X,

number Y,

table Menu,

number HAlign = TPM_LEFTALIGN,

number VAlign = TPM_TOPALIGN,

boolean WaitForReturn = true,

boolean ClientCoordinates = true )

Description

Displays a popup (context) menu and returns the ID of the menu item clicked.

Tip: If you would like to show a popup menu when the user right-clicks on your application's system tray icon, see the built-in global function g_OnSystemTrayMenu.

Parameters

X

(number) The X coordinate in pixels.

Y

(number) The Y coordinate in pixels.

Menu

(table) A table of menu information, indexed by the following keys:

KEY | TYPE | DESCRIPTION
ID | number | The numeric ID of the menu item.
Text | string | The text of the menu item. Use & before a letter to specify a mneumonic. Note that to create a separator item, set the item's Text to "---". In this case the ID, Checked, Enabled and SubTable items are ignored. Separator items will never fire an On Menu event.
Enabled | boolean | Whether the menu item is enabled.
Checked | boolean | Whether the menu item is checked.
IconID | number | The 0-based icon index from the Image List specified on the Menu Bar to use for the menu item. The Use image list checkbox must be checked for the icons to be available.
SubTable | table | A numerically indexed table of menu item tables. This creates a pop-up menu for this item. Note that if a SubTable is specified this menu item will never fire the On Menu event. Instead it's sub-items will fire the event.

HAlign

(number) The horizontal alignment of the menu relative to X. Choose from the following constants:

CONSTANT | VALUE | DESCRIPTION
TPM_LEFTALIGN | 0 | Left-align the menu.
TPM_CENTERALIGN | 4 | Center-align the menu.
TPM_RIGHTALIGN | 8 | Right-align the menu.

VAlign

(number) The vertical alignment of the menu relative to X. Choose from the following constants:

CONSTANT | VALUE | DESCRIPTION
PM_TOPALIGN | 0 | Top-align the menu.
TPM_VCENTERALIGN | 16 | Center-align the menu.
TPM_BOTTOMALIGN | 32 | Bottom-align the menu.

WaitForReturn

(boolean) Whether to wait for the context menu to be dismissed. If set to true, the return value of Application.ShowPopupMenu will be the ID of the selected menu command or 0 if the menu is cancelled. If false, the menu command will fire to the On Menu event of the Project and Page when an item is selected.

Note: If set to false, g_OnUpdateMenuEnabled and g_OnUpdateMenuCheck will also be called when an item in the menu is selected. As well, if WaitForReturn is set to false, the menu commands that are used in the popup menu MUST be represented on the main menu bar as well.

ClientCoordinates

(boolean) True if the X and Y values should be relative to the top-left corner of the page, false if the X and Y values should be relative to the top-left corner of the user's screen.

Returns

(number) The ID of the menu item clicked. If an error occurs, -1 will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Application.Sleep

Application.Sleep (

number Time )

Description

Causes the application to sleep for a desired period of time.

Note: While sleeping, the application will not respond to mouse movements, clicks, or key presses.

Parameters

Time

(number) The time to sleep, in milliseconds.

Tip: 1000 milliseconds = 1 second

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Audio.GetCurrentPos

number Audio.GetCurrentPos (

number Channel )

Description

Retrieves the current time position of an audio channel, in seconds.

Parameters

Channel

(number) The audio channel to get the current time of:

CONSTANT | VALUE | DESCRIPTION
CHANNEL_BACKGROUND | 5 | Background audio channel.
CHANNEL_EFFECTS | 0 | Effects channel (used for mouse over, down, and click sounds).
CHANNEL_NARRATION | 6 | Narration channel (used for voice overs).
CHANNEL_USER1 | 1 | User channel 1.
CHANNEL_USER2 | 2 | User channel 2.
CHANNEL_USER3 | 3 | User channel 3.
CHANNEL_USER4 | 4 | User channel 4.

Returns

(number) The current position of the audio in seconds. If an error occurs, -1 will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Audio.GetFilename

string Audio.GetFilename (

number Channel )

Description

Returns the path to the file that is loaded in an audio channel.

Parameters

Channel

(number) The audio channel to get the filename of:

CONSTANT | VALUE | DESCRIPTION
CHANNEL_BACKGROUND | 5 | Background audio channel.
CHANNEL_EFFECTS | 0 | Effects channel (used for mouse over, down, and click sounds).
CHANNEL_NARRATION | 6 | Narration channel (used for voice overs).
CHANNEL_USER1 | 1 | User channel 1.
CHANNEL_USER2 | 2 | User channel 2.
CHANNEL_USER3 | 3 | User channel 3.
CHANNEL_USER4 | 4 | User channel 4.

Returns

(string) The path to the audio file. If an error occurs, a blank string "" will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Audio.GetLength

number Audio.GetLength (

number Channel )

Description

Retrieves the length (in seconds) of the audio track in a channel.

Parameters

Channel

(number) The audio channel whose track you want the length of:

CONSTANT | VALUE | DESCRIPTION
CHANNEL_BACKGROUND | 5 | Background audio channel.
CHANNEL_EFFECTS | 0 | Effects channel (used for mouse over, down, and click sounds).
CHANNEL_NARRATION | 6 | Narration channel (used for voice overs).
CHANNEL_USER1 | 1 | User channel 1.
CHANNEL_USER2 | 2 | User channel 2.
CHANNEL_USER3 | 3 | User channel 3.
CHANNEL_USER4 | 4 | User channel 4.

Returns

(number) The length of the audio track in seconds. If an error occurs, -1 will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Audio.GetOggTags

table Audio.GetOggTags (

number Channel )

Description

Returns a table containing the tags from an Ogg Vorbis file that is currently loaded in an audio channel.

Parameters

Channel

(number) The audio channel whose Ogg Vorbis tags you want:

CONSTANT | VALUE | DESCRIPTION
CHANNEL_BACKGROUND | 5 | Background audio channel.
CHANNEL_EFFECTS | 0 | Effects channel (used for mouse over, down, and click sounds).
CHANNEL_NARRATION | 6 | Narration channel (used for voice overs).
CHANNEL_USER1 | 1 | User channel 1.
CHANNEL_USER2 | 2 | User channel 2.
CHANNEL_USER3 | 3 | User channel 3.
CHANNEL_USER4 | 4 | User channel 4.

Returns

(table) A table containing the Ogg tags, indexed by the following categories:

KEY

TYPE

DESCRIPTION

TITLE

string

The title of the Ogg track (from the Ogg tag). If the information cannot be found, an empty string will be returned.

VERSION

string

The version of the track (eg. remix info). If the information cannot be found, an empty string will be returned.

ALBUM

string

The album name (from the Ogg tag). If the information cannot be found, an empty string will be returned.

TRACKNUMBER

number

The album track for the current song (from the Ogg tag).

ARTIST

string

The artist of the track. If the information cannot be found, an empty string will be returned.

PERFORMER

string

The performer of the track (often this is the same as the artist). If the information cannot be found, an empty string will be returned.

COPYRIGHT

string

The copyright information (e.g., "2001 Nobody's Band"). If the information cannot be found, an empty string will be returned.

LICENSE

string

The license information (eg.,"All Rights Reserved"). If the information cannot be found, an empty string will be returned.

ORGANIZATION

string

The name of the organization producing the track. If the information cannot be found, an empty string will be returned.

DESCRIPTION

string

A short description of the contents. If the information cannot be found, an empty string will be returned.

GENRE

string

A short text indication of music genre. If the information cannot be found, an empty string will be returned.

DATE

string

The date the track was recorded. If the information cannot be found, an empty string will be returned.

LOCATION

string

The location where the track was recorded. If the information cannot be found, an empty string will be returned.

CONTACT

string

Contact information for the creators or distributors of the track. If the information cannot be found, an empty string will be returned.

ISRC

string

ISRC (International Standard Recording Code) number for the track. For more information on the ISRC, see http://www.ifpi.org/site-content/online/isrc_intro.html. If the information cannot be found, an empty string will be returned.

RAWTAGS

string

A comma separated list of all the tags in the comment field. (The reason for this is because you can have anything in the comments.) It will look something like this:

"TITLE=Roxy,ENGINEER=Jack Coolguy,BUBBLEBOY=No One Is Here". It does not have to contain the standard tags on the tags that were actually in the Comment field.

If an error occurs, nil is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Audio.GetVolume

number Audio.GetVolume (

number Channel )

Description

Retrieves the current volume of an audio channel. The volume is represented as a number between 0 and 255.

Parameters

Channel

(number) The audio channel to get the volume of:

CONSTANT | VALUE | DESCRIPTION
CHANNEL_BACKGROUND | 5 | Background audio channel.
CHANNEL_EFFECTS | 0 | Effects channel (used for mouse over, down, and click sounds).
CHANNEL_NARRATION | 6 | Narration channel (used for voice overs).
CHANNEL_USER1 | 1 | User channel 1.
CHANNEL_USER2 | 2 | User channel 2.
CHANNEL_USER3 | 3 | User channel 3.
CHANNEL_USER4 | 4 | User channel 4.

Returns

(number) The current volume level of the channel. The returned value is a number between 0 and 255. If an error occurs, -1 will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Audio.IsLooping

boolean Audio.IsLooping (

number Channel )

Description

Returns true if an audio channel is set to loop when it reaches the end.

Parameters

Channel

(number) The audio channel to inspect:

CONSTANT | VALUE | DESCRIPTION
CHANNEL_BACKGROUND | 5 | Background audio channel.
CHANNEL_EFFECTS | 0 | Effects channel (used for mouse over, down, and click sounds).
CHANNEL_NARRATION | 6 | Narration channel (used for voice overs).
CHANNEL_USER1 | 1 | User channel 1.
CHANNEL_USER2 | 2 | User channel 2.
CHANNEL_USER3 | 3 | User channel 3.
CHANNEL_USER4 | 4 | User channel 4.

Returns

(boolean) True if the audio channel will loop, or false if it won't. If an error occurs, false will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Audio.Load

Audio.Load (

number Channel,

string Filename,

boolean PlayAutomatic = false,

boolean Loop = false )

Description

Loads an audio file into an audio channel.

Parameters

Channel

(number) The audio channel to load the file into:

CONSTANT | VALUE | DESCRIPTION
CHANNEL_BACKGROUND | 5 | Background audio channel.
CHANNEL_EFFECTS | 0 | Effects channel (used for mouse over, down, and click sounds).
CHANNEL_NARRATION | 6 | Narration channel (used for voice overs).
CHANNEL_USER1 | 1 | User channel 1.
CHANNEL_USER2 | 2 | User channel 2.
CHANNEL_USER3 | 3 | User channel 3.
CHANNEL_USER4 | 4 | User channel 4.

Filename

(string) The path to the audio file. Click the browse button to select a file. You can also stream an audio file from a web address, for example, http://www.indigorose.com/songs/myfile.ogg

Note: The following audio formats are supported in AutoPlay Media Studio: .wav, .raw, .ogg.

PlayAutomatic

(boolean) Whether to automatically start playing the audio file after it loads:

VALUE | DESCRIPTION
true | Automatically start playing the file.
false | Don't play the file until told to do so. (Default)

Loop

(boolean) Whether to make the audio file loop when it reaches the end:

Note: Looping only works using local files, and will not work with an audio file from a web address.

VALUE | DESCRIPTION
true | Loop.
false | Don't loop. (Default)

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Audio.Pause

Audio.Pause (

number Channel )

Description

Pauses an audio channel's playback.

Parameters

Channel

(number) The audio channel to pause:

CONSTANT | VALUE | DESCRIPTION
CHANNEL_BACKGROUND | 5 | Background audio channel.
CHANNEL_EFFECTS | 0 | Effects channel (used for mouse over, down, and click sounds).
CHANNEL_NARRATION | 6 | Narration channel (used for voice overs).
CHANNEL_USER1 | 1 | User channel 1.
CHANNEL_USER2 | 2 | User channel 2.
CHANNEL_USER3 | 3 | User channel 3.
CHANNEL_USER4 | 4 | User channel 4.
CHANNEL_ALL | -3 | All audio channels.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Audio.Play

Audio.Play (

number Channel )

Description

Plays the audio currently loaded in the channel.

Parameters

Channel

(number) The audio channel to play:

CONSTANT | VALUE | DESCRIPTION
CHANNEL_BACKGROUND | 5 | Background audio channel.
CHANNEL_EFFECTS | 0 | Effects channel (used for mouse over, down, and click sounds).
CHANNEL_NARRATION | 6 | Narration channel (used for voice overs).
CHANNEL_USER1 | 1 | User channel 1.
CHANNEL_USER2 | 2 | User channel 2.
CHANNEL_USER3 | 3 | User channel 3.
CHANNEL_USER4 | 4 | User channel 4.
CHANNEL_ALL | -3 | All audio channels.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Audio.Seek

Audio.Seek (

number Channel,

number SeekType,

number SeekTime = 0 )

Description

Seeks to a time position in an audio file.

Parameters

Channel

(number) The audio channel to seek in:

CONSTANT | VALUE | DESCRIPTION
CHANNEL_BACKGROUND | 5 | Background audio channel.
CHANNEL_EFFECTS | 0 | Effects channel (used for mouse over, down, and click sounds).
CHANNEL_NARRATION | 6 | Narration channel (used for voice overs).
CHANNEL_USER1 | 1 | User channel 1.
CHANNEL_USER2 | 2 | User channel 2.
CHANNEL_USER3 | 3 | User channel 3.
CHANNEL_USER4 | 4 | User channel 4.

SeekType

(number) The seek type to use:

CONSTANT | VALUE | DESCRIPTION
SEEK_BEGINNING | 0 | Beginning.
SEEK_END | 1 | End.
SEEK_FORWARD | 2 | Forward.
SEEK_BACKWARD | 3 | Backward.
SEEK_SPECIFIC | 4 | Specific time.

SeekTime

(number) The time in seconds to seek to (or seek by). Defaults to 0.

Note: Only used if SeekType is 2, 3 or 4.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Audio.SetLooping

Audio.SetLooping (

number Channel,

boolean Looping = true )

Description

Turns looping on or off for an audio channel.

Note: When looping is turned on, any audio file that plays in that channel will restart automatically when it reaches the end.

Note: Looping only works using local files, and will not work with an audio file from a web address.

Parameters

Channel

(number) The audio channel to change:

CONSTANT | VALUE | DESCRIPTION
CHANNEL_BACKGROUND | 5 | Background audio channel.
CHANNEL_EFFECTS | 0 | Effects channel (used for mouse over, down, and click sounds).
CHANNEL_NARRATION | 6 | Narration channel (used for voice overs).
CHANNEL_USER1 | 1 | User channel 1.
CHANNEL_USER2 | 2 | User channel 2.
CHANNEL_USER3 | 3 | User channel 3.
CHANNEL_USER4 | 4 | User channel 4.
CHANNEL_ALL | -3 | All audio channels.

Looping

(boolean) Whether to make the audio file loop when it reaches the end:

Note: Looping only works using local files, and will not work with an audio file from a web address.

VALUE | DESCRIPTION
true | Loop. (Default)
false | Don't loop.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Audio.SetVolume

Audio.SetVolume (

number Channel,

number Volume )

Description

Sets the volume level of an audio channel.

Parameters

Channel

(number) The audio channel to set the volume for:

CONSTANT | VALUE | DESCRIPTION
CHANNEL_BACKGROUND | 5 | Background audio channel.
CHANNEL_EFFECTS | 0 | Effects channel (used for mouse over, down, and click sounds).
CHANNEL_NARRATION | 6 | Narration channel (used for voice overs).
CHANNEL_USER1 | 1 | User channel 1.
CHANNEL_USER2 | 2 | User channel 2.
CHANNEL_USER3 | 3 | User channel 3.
CHANNEL_USER4 | 4 | User channel 4.
CHANNEL_ALL | -3 | All audio channels.

Volume

(number) The volume level represented by a number between 0 and 255. The value 255 is the loudest.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Audio.Stop

Audio.Stop (

number Channel )

Description

Stops playing an audio channel.

Parameters

Channel

(number) The audio channel to stop:

CONSTANT | VALUE | DESCRIPTION
CHANNEL_BACKGROUND | 5 | Background audio channel.
CHANNEL_EFFECTS | 0 | Effects channel (used for mouse over, down, and click sounds).
CHANNEL_NARRATION | 6 | Narration channel (used for voice overs).
CHANNEL_USER1 | 1 | User channel 1.
CHANNEL_USER2 | 2 | User channel 2.
CHANNEL_USER3 | 3 | User channel 3.
CHANNEL_USER4 | 4 | User channel 4.
CHANNEL_ALL | -3 | All audio channels.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Audio.ToggleMute

Audio.ToggleMute (

number Channel )

Description

Toggles the sound on or off for the specified audio channels.

Parameters

Channel

(number) The audio channel to toggle:

CONSTANT | VALUE | DESCRIPTION
CHANNEL_BACKGROUND | 5 | Background audio channel.
CHANNEL_EFFECTS | 0 | Effects channel (used for mouse over, down, and click sounds).
CHANNEL_NARRATION | 6 | Narration channel (used for voice overs).
CHANNEL_USER1 | 1 | User channel 1.
CHANNEL_USER2 | 2 | User channel 2.
CHANNEL_USER3 | 3 | User channel 3.
CHANNEL_USER4 | 4 | User channel 4.
CHANNEL_ALL | -3 | All audio channels.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Audio.TogglePlay

Audio.TogglePlay (

number Channel )

Description

Toggles an audio channel's playback between playing and paused.

Parameters

Channel

(number) The audio channel to play or pause:

CONSTANT | VALUE | DESCRIPTION
CHANNEL_BACKGROUND | 5 | Background audio channel.
CHANNEL_EFFECTS | 0 | Effects channel (used for mouse over, down, and click sounds).
CHANNEL_NARRATION | 6 | Narration channel (used for voice overs).
CHANNEL_USER1 | 1 | User channel 1.
CHANNEL_USER2 | 2 | User channel 2.
CHANNEL_USER3 | 3 | User channel 3.
CHANNEL_USER4 | 4 | User channel 4.
CHANNEL_ALL | -3 | All audio channels.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Button.GetPos

table Button.GetPos (

string ObjectName )

Description

Returns the X and Y page or dialog coordinates of a button object in pixels. This coordinate refers to the upper left hand corner of the object's bounding box relative to the page or dialog.

Note: The upper left hand corner of a page or dialog has X and Y coordinates of 0.

Parameters

ObjectName

(string) The name of the button object.

Returns

(table) A table containing the object's current coordinates, indexed by values X and Y. If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Button.GetProperties

table Button.GetProperties (

string ObjectName )

Description

Returns a table containing the properties of a button object.

Parameters

ObjectName

(string) The name of the button object.

Returns

(table) A table containing the button's properties, indexed by the following keys:

KEY

TYPE

DESCRIPTION

ButtonFile

string

The currently loaded .btn file.

Text

string

The text displayed on the button object.

ObjectName

string

The name of the button object.

FontName

string

The font name.

FontSize

number

The font size (in points).

FontStrikeout

boolean

True if the font is set to strikeout, false if it is not.

FontUnderline

boolean

True if the font is set to underline, false if it is not.

FontAntiAlias

boolean

True if the font is set to anti alias, false if it is not.

FontItalic

boolean

True if the font is set to italic, false if it is not.

FontWeight

number

The weight of the font (how 'dark' the text will appear):

CONSTANT | VALUE | DESCRIPTION
FW_DONTCARE | 0 | Font weight not specified.
FW_THIN | 100 | Font weight 'thin'.
FW_EXTRALIGHT | 200 | Font weight 'extra-light'.
FW_LIGHT | 300 | Font weight 'light'.
FW_NORMAL | 400 | Font weight 'normal'.
FW_MEDIUM | 500 | Font weight 'medium'.
FW_SEMIBOLD | 600 | Font weight 'semi-bold'.
FW_BOLD | 700 | Font weight 'bold'.
FW_EXTRABOLD | 800 | Font weight 'extra bold'.
FW_HEAVY | 900 | Font weight 'heavy'.

FontScript

number

The character set in use by the button object:

CONSTANT | VALUE | DESCRIPTION
ANSI_CHARSET | 0 | ANSI character set.
BALTIC_CHARSET | 186 | Baltic character set.
CHINESEBIG5_CHARSET | 136 | Chinese character set.
DEFAULT_CHARSET | 1 | Default character set.
EASTEUROPE_CHARSET | 238 | Eastern European character set.
GB2312_CHARSET | 134 | GB2312 character set.
GREEK_CHARSET | 161 | Greek character set.
HANGUL_CHARSET | 129 | Hangul character set.
MAC_CHARSET | 77 | MAC character set.
OEM_CHARSET | 255 | OEM character set.
RUSSIAN_CHARSET | 204 | Russian character set.
SHIFTJIS_CHARSET | 128 | Shiftjis character set.
SYMBOL_CHARSET | 2 | Symbol character set.
TURKISH_CHARSET | 162 | Turkish character set.

XOffset

number

The horizontal offset of the text with respect to the button object.

YOffset

number

The vertical offset of the text with respect to the button object.

LeftMargin

number

The size of the left margin (in pixels) to leave around the text.

RightMargin

number

The size of the right margin (in pixels) to leave around the text.

Alignment

number

The text alignment:

CONSTANT | VALUE | DESCRIPTION
ALIGN_LEFT | 0 | Text is left aligned.
ALIGN_CENTER | 1 | Text is center aligned.
ALIGN_RIGHT | 2 | Text is right aligned.

Style

number

The style of the button object:

CONSTANT | VALUE | DESCRIPTION
BTNSTYLE_STANDARD | 0 | Button is a standard button.
BTNSTYLE_TOGGLE | 1 | Button is a toggle button.

ToggleState

number

The current state of the button object.

CONSTANT | VALUE | DESCRIPTION
BTN_UP | 0 | Button is in its up state.
BTN_DOWN | 1 | Button is in its down state.

ColorNormal

number

The 'normal' color of the button's text.

ColorHighlight

number

The 'highlight' color of the button's text.

ColorDisabled

number

The 'disabled' color of the button's text.

ColorDown

number

The 'down' color of the button's text.

Enabled

boolean

True if the button object is enabled, false if it is not.

Visible

boolean

True if the button object is visible, false if it is not.

X

number

The horizontal position (in pixels) of the top left corner of the button object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has an X value of 0

Y

number

The vertical position (in pixels) of the top left corner of the button object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has a Y value of 0

Width

number

The width (in pixels) of the button object.

Height

number

The height (in pixels) of the button object.

TooltipText

string

The mouseover tooltip of the button object.

Cursor

number

The mouse cursor that will be displayed when the mouse is over the button object:

CONSTANT | VALUE | DESCRIPTION
CURSOR_ARROW | 0 | Standard mouse arrow cursor.
CURSOR_HAND | 1 | Hand cursor.
CURSOR_BLACK_ARROW | 2 | Black arrow cursor.
CURSOR_CROSSHAIR | 3 | Crosshair cursor.
CURSOR_EXPLORE | 4 | Explore cursor.
CURSOR_HELP | 5 | Help cursor.
CURSOR_MAGNIFY | 6 | Magnify cursor.
CURSOR_MEDIA | 7 | Media cursor.
CURSOR_MONEY | 8 | Money cursor.
CURSOR_NOTEPAD | 9 | Notepad cursor.
CURSOR_PENCIL | 10 | Pencil cursor.
CURSOR_PRINTER | 11 | Printer cursor.
CURSOR_SPEAKER | 12 | Speaker cursor.
CURSOR_UP_ARROW | 13 | Up arrow cursor.

ResizeLeft

boolean

True if the left side of the object will move when the application is resized, false if it is not.

ResizeRight

boolean

True if the right side of the object will move when the application is resized, false if it is not.

ResizeTop

boolean

True if the top of the object will move when the application is resized, false if it is not.

ResizeBottom

boolean

True if the bottom of the object will move when the application is resized, false if it is not.

HighlightSound

number

The type of sound that will be played when the mouse moves over the button object.

CONSTANT | VALUE | DESCRIPTION
SND_NONE | 0 | No highlight sound.
SND_STANDARD | 1 | Standard highlight sound.
SND_CUSTOM | 2 | Custom highlight sound.

HighlightSoundFile

string

The path to the button object's custom highlight sound file. If the button object does not use a custom sound, this value will be an empty string ("").

ClickSound

number

The type of sound that will be played when the mouse clicks the button object.

CONSTANT | VALUE | DESCRIPTION
SND_NONE | 0 | No click sound.
SND_STANDARD | 1 | Standard click sound.
SND_CUSTOM | 2 | Custom click sound.

ClickSoundFile

string

The path to the button object's custom click sound file. If the button object does not use a custom sound, this value will be an empty string ("").

If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Button.GetSize

table Button.GetSize (

string ObjectName )

Description

Returns the pixel dimensions of a button object.

Parameters

ObjectName

(string) The name of the button object.

Returns

(table) A table containing the object's pixel dimensions, indexed by values "Width" and "Height." If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Button.GetState

number Button.GetState (

string ObjectName )

Description

Returns the up/down state of a button object.

Note: This action is only effective on toggle buttons. You can change a button's type (standard or toggle) by changing the Style setting in the button's properties. Standard buttons will always return the "up" state.

Parameters

ObjectName

(string) The name of the button object.

Returns

(number) The current state of the button:

CONSTANT | VALUE | DESCRIPTION
BTN_UP | 0 | Button is up (normal).
BTN_DOWN | 1 | Button is down (pressed).

If an error occurs, -1 will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Button.GetText

string Button.GetText (

string ObjectName )

Description

Returns the text displayed on a button object.

Parameters

ObjectName

(string) The name of the button object.

Returns

(string) The text that is currently displayed on the button object. If an error occurs, a blank string "" will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Button.IsEnabled

boolean Button.IsEnabled (

string ObjectName )

Description

Returns true if a specific button object is enabled, or false if it's disabled.

Note: When a button is disabled, it takes on a disabled appearance (if it has one) and doesn't respond to user interaction.

Parameters

ObjectName

(string) The name of the button object.

Returns

(boolean) True if the button is enabled, false if it is disabled. If an error occurs, false will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Button.IsVisible

boolean Button.IsVisible (

string ObjectName )

Description

Returns true if a specific button object is visible, or false if it isn't.

Parameters

ObjectName

(string) The name of the button object.

Returns

(boolean) True if the button is visible, false if it's invisible. If an error occurs, false will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Button.SetEnabled

Button.SetEnabled (

string ObjectName,

boolean Enabled = true )

Description

Sets the enabled/disabled state of a button object.

Note: When a button is disabled, it takes on a disabled appearance (if it has one) and doesn't respond to the user at all.

Parameters

ObjectName

(string) The name of the button object.

Enabled

(boolean) Whether to make the button object enabled or disabled:

VALUE | DESCRIPTION
true | Enabled. (Default)
false | Disabled.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Button.SetPos

Button.SetPos (

string ObjectName,

number X,

number Y )

Description

Sets the X and Y pixel coordinates of a button object relative to the page or dialog.

Parameters

ObjectName

(string) The name of the button object.

X

(number) The new X pixel coordinate (horizontal position) to set for the button object. This is the X coordinate of the upper left hand corner of the object's bounding box relative to the page or dialog.

Y

(number) The new Y pixel coordinate (vertical position) to set for the button object. This is the Y coordinate of the upper left hand corner of the object's bounding box relative to the page or dialog.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Button.SetProperties

Button.SetProperties (

string ObjectName,

table Properties )

Description

Sets the properties of a button object.

Parameters

ObjectName

(string) The name of the button object.

Properties

(table) A table containing the button object's properties indexed by the following keys:

KEY

TYPE

DESCRIPTION

ButtonFile

string

The button file to load.

Text

string

The text to display on the button object.

FontName

string

The font name.

FontSize

number

The font size (in points).

FontStrikeout

boolean

True if the font should be set to strikeout, false if it should not be.

FontUnderline

boolean

True if the font should be set to underline, false if it should not be.

FontAntiAlias

boolean

True if the font should be set to anti alias, false if it should not be.

FontItalic

boolean

True if the font should be set to italic, false if it should not be..

FontWeight

number

The weight of the font (how 'dark' the text will appear):

CONSTANT | VALUE | DESCRIPTION
FW_DONTCARE | 0 | Font weight not specified.
FW_THIN | 100 | Font weight 'thin'.
FW_EXTRALIGHT | 200 | Font weight 'extra-light'.
FW_LIGHT | 300 | Font weight 'light'.
FW_NORMAL | 400 | Font weight 'normal'.
FW_MEDIUM | 500 | Font weight 'medium'.
FW_SEMIBOLD | 600 | Font weight 'semi-bold'.
FW_BOLD | 700 | Font weight 'bold'.
FW_EXTRABOLD | 800 | Font weight 'extra bold'.
FW_HEAVY | 900 | Font weight 'heavy'.

FontScript

number

The character set to use in the button object:

CONSTANT | VALUE | DESCRIPTION
ANSI_CHARSET | 0 | ANSI character set.
BALTIC_CHARSET | 186 | Baltic character set.
CHINESEBIG5_CHARSET | 136 | Chinese character set.
DEFAULT_CHARSET | 1 | Default character set.
EASTEUROPE_CHARSET | 238 | Eastern European character set.
GB2312_CHARSET | 134 | GB2312 character set.
GREEK_CHARSET | 161 | Greek character set.
HANGUL_CHARSET | 129 | Hangul character set.
MAC_CHARSET | 77 | MAC character set.
OEM_CHARSET | 255 | OEM character set.
RUSSIAN_CHARSET | 204 | Russian character set.
SHIFTJIS_CHARSET | 128 | Shiftjis character set.
SYMBOL_CHARSET | 2 | Symbol character set.
TURKISH_CHARSET | 162 | Turkish character set.

XOffset

number

The horizontal offset of the text with respect to the button object.

YOffset

number

The vertical offset of the text with respect to the button object.

LeftMargin

number

The size of the left margin (in pixels) to leave around the text.

RightMargin

number

The size of the right margin (in pixels) to leave around the text.

Alignment

number

The text alignment:

CONSTANT | VALUE | DESCRIPTION
ALIGN_LEFT | 0 | Text is left aligned.
ALIGN_CENTER | 1 | Text is center aligned.
ALIGN_RIGHT | 2 | Text is right aligned.

Style

number

The style of the button object:

CONSTANT | VALUE | DESCRIPTION
BTNSTYLE_STANDARD | 0 | Button is a standard button.
BTNSTYLE_TOGGLE | 1 | Button is a toggle button.

ToggleState

number

The current state of the button object.

CONSTANT | VALUE | DESCRIPTION
BTN_UP | 0 | Button is in its up state.
BTN_DOWN | 1 | Button is in its down state.

ColorNormal

number

The 'normal' color of the button's text.

ColorHighlight

number

The 'highlight' color of the button's text.

ColorDisabled

number

The 'disabled' color of the button's text.

ColorDown

number

The 'down' color of the button's text.

Enabled

boolean

True if the button object should be enabled, false if it should not be.

Visible

boolean

True if the button object should be visible, false if it should not be.

X

number

The horizontal position (in pixels) of the top left corner of the button object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has an X value of 0

Y

number

The vertical position (in pixels) of the top left corner of the button object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has a Y value of 0

Width

number

The width (in pixels) of the button object.

Height

number

The height (in pixels) of the button object.

TooltipText

string

The mouseover tooltip of the button object. Tip: If you want a "&" character in the text, you must enter "&&&".

Cursor

number

The mouse cursor that will be displayed when the mouse is over the button object:

CONSTANT | VALUE | DESCRIPTION
CURSOR_ARROW | 0 | Standard mouse arrow cursor.
CURSOR_HAND | 1 | Hand cursor.
CURSOR_BLACK_ARROW | 2 | Black arrow cursor.
CURSOR_CROSSHAIR | 3 | Crosshair cursor.
CURSOR_EXPLORE | 4 | Explore cursor.
CURSOR_HELP | 5 | Help cursor.
CURSOR_MAGNIFY | 6 | Magnify cursor.
CURSOR_MEDIA | 7 | Media cursor.
CURSOR_MONEY | 8 | Money cursor.
CURSOR_NOTEPAD | 9 | Notepad cursor.
CURSOR_PENCIL | 10 | Pencil cursor.
CURSOR_PRINTER | 11 | Printer cursor.
CURSOR_SPEAKER | 12 | Speaker cursor.
CURSOR_UP_ARROW | 13 | Up arrow cursor.

ResizeLeft

boolean

True if the left side of the object should move when the application is resized, false if it should not.

ResizeRight

boolean

True if the right side of the object should move when the application is resized, false if it should not.

ResizeTop

boolean

True if the top of the object should move when the application is resized, false if it should not.

ResizeBottom

boolean

True if the bottom of the object should move when the application is resized, false if it should not.

HighlightSound

number

The type of sound that will be played when the mouse moves over the button object.

CONSTANT | VALUE | DESCRIPTION
SND_NONE | 0 | No highlight sound.
SND_STANDARD | 1 | Standard highlight sound.
SND_CUSTOM | 2 | Custom highlight sound.

HighlightSoundFile

string

The path to the button object's custom highlight sound file. If the button object does not use a custom sound, this value will be an empty string ("").

Note: For this to take effect, HighlightSound must be set to SND_CUSTOM.

ClickSound

number

The type of sound that will be played when the mouse clicks the button object.

CONSTANT | VALUE | DESCRIPTION
SND_NONE | 0 | No click sound.
SND_STANDARD | 1 | Standard click sound.
SND_CUSTOM | 2 | Custom click sound.

ClickSoundFile

string

The path to the button object's custom click sound file. If the button object does not use a custom sound, this value will be an empty string ("").

Note: For this to take effect, ClickSound must be set to SND_CUSTOM.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Button.SetSize

Button.SetSize (

string ObjectName,

number Width,

number Height )

Description

Sets the size of a button object.

Parameters

ObjectName

(string) The name of the button object.

Width

(number) The new width of the button object in pixels.

Height

(number) The new height of the button object in pixels.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Button.SetState

Button.SetState (

string ObjectName,

number State = BTN_UP )

Description

Sets the up/down state of a button object.

Note: This action is only effective on toggle buttons. You can change a button's type (standard or toggle) by changing the Style setting in the button's properties.

Parameters

ObjectName

(string) The name of the button object.

State

(number) The new state of the button:

CONSTANT | VALUE | DESCRIPTION
BTN_UP | 0 | Button is up (normal). (default)
BTN_DOWN | 1 | Button is down (pressed).

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Button.SetText

Button.SetText (

string ObjectName,

string Text )

Description

Sets the text displayed on a button object.

Parameters

ObjectName

(string) The name of the button object to set.

Text

(string) The text to display.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Button.SetVisible

Button.SetVisible (

string ObjectName,

boolean Visible = true )

Description

Sets the visibility of a button object.

Parameters

ObjectName

(string) The name of the button object.

Visible

(boolean) Whether to make the button visible or invisible:

VALUE | DESCRIPTION
true | Visible. (Default)
false | Invisible.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


ComboBox.AddItem

number ComboBox.AddItem (

string ObjectName,

string Text,

string Data = "" )

Description

Adds an item to a combobox object. If the combobox is not sorted, it will be added to the end of the list.

Parameters

ObjectName

(string) The name of the combobox object.

Text

(string) The item text to display.

Data

(string) The optional item data to associate with the item text. (The default is an empty string "".)

Returns

(number) The index (line number) where the item was added. If an error occurs, -1 is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


ComboBox.DeleteItem

ComboBox.DeleteItem (

string ObjectName,

number Item )

Description

Removes an item from a combobox object.

Parameters

ObjectName

(string) The name of the combobox object.

Item

(number)The index (line number) of the item to remove from the combobox object. The first item in the list has an index of 1. You can use an index of -1 to remove the last item in the list.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


ComboBox.FindItem

number ComboBox.FindItem (

string ObjectName,

number StartAfter,

number SearchType,

string SearchText )

Description

Searches through the items in a combobox object for a specific string and returns the index (line number) where it was found.

Parameters

ObjectName

(string) The name of the combobox object.

StartAfter

(number) The index (line number) to start searching after. The search will begin in the next item in the list. You can use an index of -1 (or variable LB_ALLITEMS) to search all combobox items.

SearchType

(number) The type of search to perform:

CONSTANT | VALUE | DESCRIPTION
LB_BYTEXT | 0 | Search only the item text. (Default)
LB_BYDATA | 1 | Search only the associated item data.
LB_BYTEXTDATA | 2 | Search both the item text and item data.

SearchText

(string) The string of text to search for in the combobox object. You can use the * and ? wildcards to search for substrings.

Returns

(number) The index (line number) of the combobox item where the search text was found. If no items are found, or an error occurs, -1 is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


ComboBox.GetCount

number ComboBox.GetCount (

string ObjectName )

Description

Returns the number of items in a specific combobox object.

Parameters

ObjectName

(string) The name of the combobox object.

Returns

(number) The number of items in the specified combobox object. If there are no items, 0 is returned. If an error occurs, -1 is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


ComboBox.GetItemData

string ComboBox.GetItemData (

string ObjectName,

number Index )

Description

Returns the item data associated to a specific item in a combobox object.

Parameters

ObjectName

(string) The name of the combobox object.

Index

(number) The index (line number) whose item data you want. You can use an index of -1 to access the last item in the list.

Returns

(string) The item data associated to the specified combobox item. If the item does not contain any item data, an empty string ("") is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


ComboBox.GetItemText

string ComboBox.GetItemText (

string ObjectName,

number Index )

Description

Returns the item text associated to a specific item in a combobox object.

Parameters

ObjectName

(string) The name of the combobox object.

Index

(number) The index (line number) whose item text you want. You can use an index of -1 to access the last item in the list.

Returns

(string) The item text of the specified item in the combobox. If the specified item has no item text or an error occurs, an empty string ("") is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


ComboBox.GetPos

table ComboBox.GetPos (

string ObjectName )

Description

Returns the X and Y page or dialog coordinates of a combobox object in pixels. This coordinate refers to the upper left hand corner of the object's bounding box relative to the page or dialog.

Note: The upper left hand corner of a page or dialog has X and Y coordinates of 0.

Parameters

ObjectName

(string) The name of the combobox object.

Returns

(table) A table containing the object's current coordinates, indexed by values X and Y. If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


ComboBox.GetProperties

table ComboBox.GetProperties (

string ObjectName )

Description

Returns a table containing the properties of a combobox object.

Parameters

ObjectName

(string) The name of the combobox object.

Returns

(table) A table containing the combobox object's properties, indexed by the following keys:

KEY

TYPE

DESCRIPTION

ObjectName

string

The name of the combobox object.

ComboStyle

number

The style of the combobox object:

CONSTANT | VALUE | DESCRIPTION
DROPDOWN_LIST | 0 | A dropdown list. The user cannot type into it.
DROPDOWN_EDIT | 1 | A dropdown list that the user can type into.

Sort

boolean

True if the items in the combobox will be sorted, false if they will not be.

LinesToDisplay

number

The number of lines being displayed in the dropdown list.

FontName

string

The font name.

FontSize

number

The font size (in points).

FontStrikeout

boolean

True if the font is set to strikeout, false if it is not.

FontUnderline

boolean

True if the font is set to underline, false if it is not.

FontAntiAlias

boolean

True if the font is set to anti alias, false if it is not.

FontItalic

boolean

True if the font is set to italic, false if it is not.

FontWeight

number

The weight of the font (how 'dark' the text will appear):

CONSTANT | VALUE | DESCRIPTION
FW_DONTCARE | 0 | Font weight not specified.
FW_THIN | 100 | Font weight 'thin'.
FW_EXTRALIGHT | 200 | Font weight 'extra-light'.
FW_LIGHT | 300 | Font weight 'light'.
FW_NORMAL | 400 | Font weight 'normal'.
FW_MEDIUM | 500 | Font weight 'medium'.
FW_SEMIBOLD | 600 | Font weight 'semi-bold'.
FW_BOLD | 700 | Font weight 'bold'.
FW_EXTRABOLD | 800 | Font weight 'extra bold'.
FW_HEAVY | 900 | Font weight 'heavy'.

FontScript

number

The character set in use by the combobox object:

CONSTANT | VALUE | DESCRIPTION
ANSI_CHARSET | 0 | ANSI character set.
BALTIC_CHARSET | 186 | Baltic character set.
CHINESEBIG5_CHARSET | 136 | Chinese character set.
DEFAULT_CHARSET | 1 | Default character set.
EASTEUROPE_CHARSET | 238 | Eastern European character set.
GB2312_CHARSET | 134 | GB2312 character set.
GREEK_CHARSET | 161 | Greek character set.
HANGUL_CHARSET | 129 | Hangul character set.
MAC_CHARSET | 77 | MAC character set.
OEM_CHARSET | 255 | OEM character set.
RUSSIAN_CHARSET | 204 | Russian character set.
SHIFTJIS_CHARSET | 128 | Shiftjis character set.
SYMBOL_CHARSET | 2 | Symbol character set.
TURKISH_CHARSET | 162 | Turkish character set.

BackgroundColor

number

The color of the combobox object's background.

TextColor

number

The color of the text in the combobox object.

ReadOrder

number

How text will be displayed in the combobox object:

CONSTANT | VALUE | DESCRIPTION
READ_STANDARD | 0 | Display the characters left to right.
READ_RIGHT_TO_LEFT | 1 | Display the characters right to left.

Enabled

boolean

True if the combobox object is enabled, false if it is not.

Visible

boolean

True if the combobox object is visible, false if it is not.

X

number

The horizontal position (in pixels) of the top left corner of the combobox object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has an X value of 0

Y

number

The vertical position (in pixels) of the top left corner of the combobox object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has a Y value of 0

Width

number

The width (in pixels) of the combobox object.

Height

number

The height (in pixels) of the combobox object.

Note: This is determined by the font size used in the combobox object, and cannot be specified directly using Combobox.SetProperties.

TooltipText

string

The mouseover tooltip of the combobox object.

ResizeLeft

boolean

True if the left side of the object will move when the application is resized, false if it is not.

ResizeRight

boolean

True if the right side of the object will move when the application is resized, false if it is not.

ResizeTop

boolean

True if the top of the object will move when the application is resized, false if it is not.

ResizeBottom

boolean

True if the bottom of the object will move when the application is resized, false if it is not.

WindowHandle

number

The integer value that represents the object's window. (Commonly referred to as an hWnd.)

If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


ComboBox.GetSelected

number ComboBox.GetSelected (

string ObjectName )

Description

Returns the index of the selected combobox item.

Parameters

ObjectName

(string) The name of the combobox object.

Returns

(number) The index (line number) of the selected combobox item. If no items are currently selected or an error occurs, -1 is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


ComboBox.GetSize

table ComboBox.GetSize (

string ObjectName )

Description

Returns the pixel dimensions of a combobox object.

Parameters

ObjectName

(string) The name of the combobox object.

Returns

(table) A table containing the object's pixel dimensions, indexed by values "Width" and "Height." If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


ComboBox.GetText

string ComboBox.GetText (

string ObjectName )

Description

Returns the text currently displayed in the combobox object.

Parameters

ObjectName

(string) The name of the combobox object.

Returns

(string) The text currently displayed in the specified combobox object. If no text is currently displayed in the combobox or an error occurs, an empty string ("") is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


ComboBox.InsertItem

number ComboBox.InsertItem (

string ObjectName,

number Index,

string Text,

string Data = "" )

Description

Inserts a new item into a combobox object at a specific index. (Note: The item's inserted position will persist even if sorting is enabled.)

Parameters

ObjectName

(string) The name of the combobox object.

Index

(number) The index (line number) to insert the new item. Use an index of -1 to insert at the end of the list.

Text

(string) The item text to display.

Data

(string) The optional item data to associate with the item text. (The default is an empty string "".)

Returns

(number) The index (line number) where the item was inserted. If an error occurs, -1 is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


ComboBox.IsEnabled

boolean ComboBox.IsEnabled (

string ObjectName )

Description

Returns true if a specific combobox object is enabled, or false if it's disabled.

Note: When a combobox is disabled it doesn't respond to user interaction.

Parameters

ObjectName

(string) The name of the combobox object.

Returns

(boolean) True if the combobox is enabled, false if it is disabled. If an error occurs, false will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


ComboBox.IsVisible

boolean ComboBox.IsVisible (

string ObjectName )

Description

Returns true if a specific combobox object is visible, or false if it isn't.

Parameters

ObjectName

(string) The name of the combobox object.

Returns

(boolean) True if the combobox is visible, false if it's invisible. If an error occurs, false will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


ComboBox.ResetContent

ComboBox.ResetContent (

string ObjectName )

Description

Removes all items from the specified combobox object.

Parameters

ObjectName

(string) The name of the combobox object.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


ComboBox.SetEnabled

ComboBox.SetEnabled (

string ObjectName,

boolean Enabled = true )

Description

Sets the enabled/disabled state of a combobox object.

Note: When a combobox is disabled, it takes on a disabled appearance (if it has one) and doesn't respond to the user at all.

Parameters

ObjectName

(string) The name of the combobox object.

Enabled

(boolean) Whether to make the combobox object enabled or disabled:

VALUE | DESCRIPTION
true | Enabled. (Default)
false | Disabled.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


ComboBox.SetItemData

ComboBox.SetItemData (

string ObjectName,

number Index,

string Data )

Description

Sets the text of a combobox item's associated data.

Parameters

ObjectName

(string) The name of the combobox object.

Index

(number) The index (line number) whose item data you want to set. Use an index of -1 to access the last item in the list.

Data

(string) The associated item data string to set.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


ComboBox.SetItemText

ComboBox.SetItemText (

string ObjectName,

number Index,

string Text )

Description

Sets the item text for a specific item in a combobox object.

Parameters

ObjectName

(string) The name of the combobox object.

Index

(number) The index (line number) whose item data you want to set. Use an index of -1 to access the last item in the list.

Text

(string) The text to display for the combobox item.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


ComboBox.SetPos

ComboBox.SetPos (

string ObjectName,

number X,

number Y )

Description

Sets the X and Y pixel coordinates of a combobox object relative to the page or dialog.

Parameters

ObjectName

(string) The name of the combobox object.

X

(number) The new X pixel coordinate (horizontal position) to set for the combobox object. This is the X coordinate of the upper left hand corner of the object's bounding box relative to the page or dialog.

Y

(number) The new Y pixel coordinate (vertical position) to set for the combobox object. This is the Y coordinate of the upper left hand corner of the object's bounding box relative to the page or dialog.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


ComboBox.SetProperties

ComboBox.SetProperties (

string ObjectName,

table Properties )

Description

Sets the properties of a combobox object.

Parameters

ObjectName

(string) The name of the combobox object.

Properties

(table) A table containing the combobox object's properties indexed by the following keys:

KEY

TYPE

DESCRIPTION

ComboStyle

number

The style of the combobox object:

CONSTANT | VALUE | DESCRIPTION
DROPDOWN_LIST | 0 | A dropdown list. The user cannot type into it.
DROPDOWN_EDIT | 1 | A dropdown list that the user can type into.

Sort

boolean

True if the items in the combobox should be sorted, false if they should not be.

LinesToDisplay

number

The number of lines to be displayed in the dropdown list.

FontName

string

The font name.

FontSize

number

The font size (in points).

FontStrikeout

boolean

True if the font should be set to strikeout, false if it should not be.

FontUnderline

boolean

True if the font should be set to underline, false if it should not be.

FontAntiAlias

boolean

True if the font should be set to anti alias, false if it should not be.

FontItalic

boolean

True if the font should be set to italic, false if it should not be.

FontWeight

number

The weight of the font (how 'dark' the text will appear):

CONSTANT | VALUE | DESCRIPTION
FW_DONTCARE | 0 | Font weight not specified.
FW_THIN | 100 | Font weight 'thin'.
FW_EXTRALIGHT | 200 | Font weight 'extra-light'.
FW_LIGHT | 300 | Font weight 'light'.
FW_NORMAL | 400 | Font weight 'normal'.
FW_MEDIUM | 500 | Font weight 'medium'.
FW_SEMIBOLD | 600 | Font weight 'semi-bold'.
FW_BOLD | 700 | Font weight 'bold'.
FW_EXTRABOLD | 800 | Font weight 'extra bold'.
FW_HEAVY | 900 | Font weight 'heavy'.

FontScript

number

The character set in use by the combobox object:

CONSTANT | VALUE | DESCRIPTION
ANSI_CHARSET | 0 | ANSI character set.
BALTIC_CHARSET | 186 | Baltic character set.
CHINESEBIG5_CHARSET | 136 | Chinese character set.
DEFAULT_CHARSET | 1 | Default character set.
EASTEUROPE_CHARSET | 238 | Eastern European character set.
GB2312_CHARSET | 134 | GB2312 character set.
GREEK_CHARSET | 161 | Greek character set.
HANGUL_CHARSET | 129 | Hangul character set.
MAC_CHARSET | 77 | MAC character set.
OEM_CHARSET | 255 | OEM character set.
RUSSIAN_CHARSET | 204 | Russian character set.
SHIFTJIS_CHARSET | 128 | Shiftjis character set.
SYMBOL_CHARSET | 2 | Symbol character set.
TURKISH_CHARSET | 162 | Turkish character set.

BackgroundColor

number

The color of the combobox object's background.

TextColor

number

The color of the text in the combobox object.

ReadOrder

number

How text should be displayed in the combobox object:

CONSTANT | VALUE | DESCRIPTION
READ_STANDARD | 0 | Display the characters left to right.
READ_RIGHT_TO_LEFT | 1 | Display the characters right to left.

Enabled

boolean

True if the combobox object is enabled, false if it is not.

Visible

boolean

True if the combobox object is visible, false if it is not.

X

number

The horizontal position (in pixels) of the top left corner of the combobox object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has an X value of 0

Y

number

The vertical position (in pixels) of the top left corner of the combobox object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has a Y value of 0

Width

number

The width (in pixels) of the combobox object.

ResizeLeft

boolean

True if the left side of the object should move when the application is resized, false if it should not.

ResizeRight

boolean

True if the right side of the object should move when the application is resized, false if it should not.

ResizeTop

boolean

True if the top of the object should move when the application is resized, false if it should not.

ResizeBottom

boolean

True if the bottom of the object should move when the application is resized, false if it should not.

TooltipText

string

The mouseover tooltip of the combobox object. Tip: If you want a "&" character in the text, you must enter "&&&".

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


ComboBox.SetSelected

ComboBox.SetSelected (

string ObjectName,

number Index )

Description

Selects the specified item in the combobox object. This action can also be used to unselect items. To clear the selection, you can use -1 as the index.

Parameters

ObjectName

(string) The name of the combobox object.

Index

(number) The index (line number) that will be selected. You can use -1 to clear the selection.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


ComboBox.SetSize

ComboBox.SetSize (

string ObjectName,

number Width )

Description

Sets the size of a combobox object.

Parameters

ObjectName

(string) The name of the combobox object.

Width

(number) The new width of the combobox object in pixels.

Tip: The height of the combobox object is dependant on the text font size; it cannot be explicitly set. To change the height of the combobox object, use Combobox.SetProperties to adjust the text font size.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


ComboBox.SetText

ComboBox.SetText (

string ObjectName,

string Text )

Description

Sets the displayed text in the combobox object. This action only works if your combobox is set as the Dropdown Edit style (instead of Dropdown List).

Parameters

ObjectName

(string) The name of the combobox object.

Text

(string) The text to display in the combobox.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


ComboBox.SetUpdate

ComboBox.SetUpdate (

string ObjectName,

boolean Enabled = true )

Description

Sets the enabled/disabled update state of a combobox object. The update state controls whether or not the combobox object will be redrawn to reflect any changes that have been made. When a combobox object's update state is disabled, any actions to modify it will not be visible to the user until this action is called to enable the update state.

Parameters

ObjectName

(string) The name of the combobox object.

Enabled

(string) The item text to display.

VALUE | DESCRIPTION
true | Enabled. (Default)
false | Disabled.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


ComboBox.SetVisible

ComboBox.SetVisible (

string ObjectName,

boolean Visible = true )

Description

Sets the visibility of a combobox object.

Parameters

ObjectName

(string) The name of the combobox object.

Visible

(boolean) Whether to make the combobox visible or invisible:

VALUE | DESCRIPTION
true | Visible. (Default)
false | Invisible.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


CheckBox.GetChecked

boolean CheckBox.GetChecked (

string ObjectName )

Description

Returns true if a specific checkbox object is checked, or false if it's unchecked.

Parameters

ObjectName

(string) The name of the checkbox object.

Returns

(boolean) True if the checkbox object is checked, false if it is unchecked. If an error occurs, false will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


CheckBox.GetPos

table CheckBox.GetPos (

string ObjectName )

Description

Returns the X and Y page or dialog coordinates of a checkbox object in pixels. This coordinate refers to the upper left hand corner of the object's bounding box relative to the page or dialog.

Note: The upper left hand corner of a page or dialog has X and Y coordinates of 0.

Parameters

ObjectName

(string) The name of the checkbox object.

Returns

(table) A table containing the object's current coordinates, indexed by values X and Y. If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


CheckBox.GetProperties

table CheckBox.GetProperties (

string ObjectName )

Description

Returns a table containing the properties of a checkbox object.

Parameters

ObjectName

(string) The name of the checkbox object.

Returns

(table) A table containing the checkbox object's properties, indexed by the following keys:

KEY

TYPE

DESCRIPTION

ObjectName

string

The name of the checkbox object.

Checked

boolean

True if the checkbox is checked, false if it is unchecked.

Text

string

The text displayed in the checkbox object.

FontName

string

The font name.

FontSize

number

The font size (in points).

FontStrikeout

boolean

True if the font is set to strikeout, false if it is not.

FontUnderline

boolean

True if the font is set to underline, false if it is not.

FontAntiAlias

boolean

True if the font is set to anti-alias, false if it is not.

FontItalic

boolean

True if the font is set to italic, false if it is not.

FontWeight

number

The weight of the font (how 'dark' the text will appear):

CONSTANT | VALUE | DESCRIPTION
FW_DONTCARE | 0 | Font weight not specified.
FW_THIN | 100 | Font weight 'thin'.
FW_EXTRALIGHT | 200 | Font weight 'extra-light'.
FW_LIGHT | 300 | Font weight 'light'.
FW_NORMAL | 400 | Font weight 'normal'.
FW_MEDIUM | 500 | Font weight 'medium'.
FW_SEMIBOLD | 600 | Font weight 'semi-bold'.
FW_BOLD | 700 | Font weight 'bold'.
FW_EXTRABOLD | 800 | Font weight 'extra bold'.
FW_HEAVY | 900 | Font weight 'heavy'.

FontScript

number

The character set in use by the radiobutton object:

CONSTANT | VALUE | DESCRIPTION
ANSI_CHARSET | 0 | ANSI character set.
BALTIC_CHARSET | 186 | Baltic character set.
CHINESEBIG5_CHARSET | 136 | Chinese character set.
DEFAULT_CHARSET | 1 | Default character set.
EASTEUROPE_CHARSET | 238 | Eastern European character set.
GB2312_CHARSET | 134 | GB2312 character set.
GREEK_CHARSET | 161 | Greek character set.
HANGUL_CHARSET | 129 | Hangul character set.
MAC_CHARSET | 77 | MAC character set.
OEM_CHARSET | 255 | OEM character set.
RUSSIAN_CHARSET | 204 | Russian character set.
SHIFTJIS_CHARSET | 128 | Shiftjis character set.
SYMBOL_CHARSET | 2 | Symbol character set.
TURKISH_CHARSET | 162 | Turkish character set.

TextAlignment

number

The alignment of the checkbox text:

CONSTANT | VALUE | DESCRIPTION
ALIGN_LEFT | 0 | Text is left aligned.
ALIGN_CENTER | 1 | Text is center aligned.
ALIGN_RIGHT | 2 | Text is right aligned.

ButtonAlignment

number

The alignment of the button on the object:

CONSTANT | VALUE | DESCRIPTION
BTN_ALIGN_LEFT | 0 | Button is to the left of the text.
BTN_ALIGN_RIGHT | 1 | Button is to the right of the text.

ReadOrder

number

How text will be displayed in the checkbox object:

CONSTANT | VALUE | DESCRIPTION
READ_STANDARD | 0 | Display the characters left to right.
READ_RIGHT_TO_LEFT | 1 | Display the characters right to left.

ColorNormal

number

The 'normal' color of the object's text.

ColorHighlight

number

The 'highlight' color of the object's text.

ColorDisabled

number

The 'disabled' color of the object's text.

ColorDown

number

The 'down' color of the object's text.

Enabled

boolean

True if the checkbox object is enabled, false if it is not.

Visible

boolean

True if the checkbox object is visible, false if it is not.

X

number

The horizontal position (in pixels) of the top left corner of the object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has an X value of 0

Y

number

The vertical position (in pixels) of the top left corner of the object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has a Y value of 0

Width

number

The width (in pixels) of the checkbox object.

Height

number

The height (in pixels) of the checkbox object.

TooltipText

string

The mouseover tooltip of the checkbox object.

Cursor

number

The mouse cursor that will be displayed when the mouse is over the checkbox object:

CONSTANT | VALUE | DESCRIPTION
CURSOR_ARROW | 0 | Standard mouse arrow cursor.
CURSOR_HAND | 1 | Hand cursor.
CURSOR_BLACK_ARROW | 2 | Black arrow cursor.
CURSOR_CROSSHAIR | 3 | Crosshair cursor.
CURSOR_EXPLORE | 4 | Explore cursor.
CURSOR_HELP | 5 | Help cursor.
CURSOR_MAGNIFY | 6 | Magnify cursor.
CURSOR_MEDIA | 7 | Media cursor.
CURSOR_MONEY | 8 | Money cursor.
CURSOR_NOTEPAD | 9 | Notepad cursor.
CURSOR_PENCIL | 10 | Pencil cursor.
CURSOR_PRINTER | 11 | Printer cursor.
CURSOR_SPEAKER | 12 | Speaker cursor.
CURSOR_UP_ARROW | 13 | Up arrow cursor.

ResizeLeft

boolean

True if the left side of the object will move when the application is resized, false if it is not.

ResizeRight

boolean

True if the right side of the object will move when the application is resized, false if it is not.

ResizeTop

boolean

True if the top of the object will move when the application is resized, false if it is not.

ResizeBottom

boolean

True if the bottom of the object will move when the application is resized, false if it is not.

HighlightSound

number

The type of sound that will be played when the mouse moves over the checkbox object.

CONSTANT | VALUE | DESCRIPTION
SND_NONE | 0 | No highlight sound.
SND_STANDARD | 1 | Standard highlight sound.
SND_CUSTOM | 2 | Custom highlight sound.

HighlightSoundFile

string

The path to the checkbox object's custom highlight sound file. If the checkbox object does not use a custom sound, this value will be an empty string ("").

ClickSound

number

The type of sound that will be played when the mouse clicks the checkbox object.

CONSTANT | VALUE | DESCRIPTION
SND_NONE | 0 | No highlight sound.
SND_STANDARD | 1 | Standard highlight sound.
SND_CUSTOM | 2 | Custom highlight sound.

ClickSoundFile

string

The path to the checkbox object's custom click sound file. If the checkbox object does not use a custom sound, this value will be an empty string ("").

If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


CheckBox.GetSize

table CheckBox.GetSize (

string ObjectName )

Description

Returns the pixel dimensions of a checkbox object.

Parameters

ObjectName

(string) The name of the checkbox object.

Returns

(table) A table containing the object's pixel dimensions, indexed by values "Width" and "Height". If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


CheckBox.GetText

string CheckBox.GetText (

string ObjectName )

Description

Returns the text currently displayed on the checkbox object.

Parameters

ObjectName

(string) The name of the checkbox object.

Returns

(string) The text currently displayed on the checkbox object. If no text is displayed or an error occurs, an empty string ("") is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


CheckBox.IsEnabled

boolean CheckBox.IsEnabled (

string ObjectName )

Description

Returns true if a specific checkbox object is enabled, or false if it's disabled.

Note: When a checkbox object is disabled, it doesn't respond to the user at all.

Parameters

ObjectName

(string) The name of the checkbox object.

Returns

(boolean) True if the checkbox object is enabled, false if it is disabled. If an error occurs, false will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


CheckBox.IsVisible

boolean CheckBox.IsVisible (

string ObjectName )

Description

Returns true if a specific checkbox object is visible, and false if it isn't.

Parameters

ObjectName

(string) The name of the checkbox object.

Returns

(boolean) True if the checkbox object is visible, false if it's invisible. If an error occurs, false will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


CheckBox.SetChecked

CheckBox.SetChecked (

string ObjectName,

boolean Checked = true )

Description

Sets the checked/unchecked state of a checkbox object.

Parameters

ObjectName

(string) The name of the checkbox object.

Checked

(boolean) Whether to make the checkbox object checked or unchecked:

VALUE | DESCRIPTION
true | Checked. (Default)
false | Unchecked.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


CheckBox.SetEnabled

CheckBox.SetEnabled (

string ObjectName,

boolean Enabled = true )

Description

Sets the enabled/disabled state of a checkbox object.

Parameters

ObjectName

(string) The name of the checkbox object.

Enabled

(boolean) Whether to make the checkbox object enabled or disabled:

VALUE | DESCRIPTION
true | Enabled. (Default)
false | Disabled.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


CheckBox.SetPos

CheckBox.SetPos (

string ObjectName,

number X,

number Y )

Description

Sets the X and Y pixel coordinates of a checkbox object relative to the page or dialog.

Parameters

ObjectName

(string) The name of the checkbox object.

X

(number) The new X pixel coordinate (horizontal position) to set for the checkbox object. This is the X coordinate of the upper left hand corner of the object's bounding box relative to the page or dialog.

Y

(number) The new Y pixel coordinate (vertical position) to set for the checkbox object. This is the Y coordinate of the upper left hand corner of the object's bounding box relative to the page or dialog.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


CheckBox.SetProperties

CheckBox.SetProperties (

string ObjectName,

table Properties )

Description

Sets the properties of a checkbox object.

Parameters

ObjectName

(string) The name of the checkbox object.

Properties

(table) A table containing the checkbox object's properties indexed by the following keys:

KEY

TYPE

DESCRIPTION

Checked

boolean

True if the checkbox should be checked, false if it should be unchecked.

Text

string

The text to be displayed in the checkbox object.

FontName

string

The font name.

FontSize

number

The font size (in points).

FontStrikeout

boolean

True if the font should be set to strikeout, false if it should not be.

FontUnderline

boolean

True if the font should be set to underline, false if it should not be.

FontAntiAlias

boolean

True if the font should be set to anti alias, false if it should not be.

FontItalic

boolean

True if the font should be set to italic, false if it should not be.

FontWeight

number

The weight of the font (how 'dark' the text will appear):

CONSTANT | VALUE | DESCRIPTION
FW_DONTCARE | 0 | Font weight not specified.
FW_THIN | 100 | Font weight 'thin'.
FW_EXTRALIGHT | 200 | Font weight 'extra-light'.
FW_LIGHT | 300 | Font weight 'light'.
FW_NORMAL | 400 | Font weight 'normal'.
FW_MEDIUM | 500 | Font weight 'medium'.
FW_SEMIBOLD | 600 | Font weight 'semi-bold'.
FW_BOLD | 700 | Font weight 'bold'.
FW_EXTRABOLD | 800 | Font weight 'extra bold'.
FW_HEAVY | 900 | Font weight 'heavy'.

FontScript

number

The character set in use by the radiobutton object:

CONSTANT | VALUE | DESCRIPTION
ANSI_CHARSET | 0 | ANSI character set.
BALTIC_CHARSET | 186 | Baltic character set.
CHINESEBIG5_CHARSET | 136 | Chinese character set.
DEFAULT_CHARSET | 1 | Default character set.
EASTEUROPE_CHARSET | 238 | Eastern European character set.
GB2312_CHARSET | 134 | GB2312 character set.
GREEK_CHARSET | 161 | Greek character set.
HANGUL_CHARSET | 129 | Hangul character set.
MAC_CHARSET | 77 | MAC character set.
OEM_CHARSET | 255 | OEM character set.
RUSSIAN_CHARSET | 204 | Russian character set.
SHIFTJIS_CHARSET | 128 | Shiftjis character set.
SYMBOL_CHARSET | 2 | Symbol character set.
TURKISH_CHARSET | 162 | Turkish character set.

TextAlignment

number

The alignment of the text in the checkbox object. Choose from:

CONSTANT | VALUE | DESCRIPTION
ALIGN_LEFT | 0 | Text is left aligned.
ALIGN_CENTER | 1 | Text is center aligned.
ALIGN_RIGHT | 2 | Text is right aligned.

ButtonAlignment

number

The alignment of the button in the checkbox object:

CONSTANT | VALUE | DESCRIPTION
BTN_ALIGN_LEFT | 0 | Button is to the left of the text.
BTN_ALIGN_RIGHT | 1 | Button is to the right of the text.

ReadOrder

number

How text should be displayed in the checkbox object:

CONSTANT | VALUE | DESCRIPTION
READ_STANDARD | 0 | Display the characters left to right.
READ_RIGHT_TO_LEFT | 1 | Display the characters right to left.

ColorNormal

number

The 'normal' color of the checkbox object's text.

ColorHighlight

number

The 'highlight' color of the checkbox object's text.

ColorDisabled

number

The 'disabled' color of the checkbox object's text.

ColorDown

number

The 'down' color of the checkbox object's text.

Enabled

boolean

True if the checkbox object should be enabled, false if it should not be.

Visible

boolean

True if the checkbox object should be visible, false if it should not be.

X

number

The horizontal position (in pixels) of the top left corner of the checkbox object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has an X value of 0

Y

number

The vertical position (in pixels) of the top left corner of the checkbox object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has a Y value of 0

Width

number

The width (in pixels) of the checkbox object.

Height

number

The height (in pixels) of the checkbox object.

TooltipText

string

The mouseover tooltip of the checkbox object. Tip: If you want a "&" character in the text, you must enter "&&&".

Cursor

number

The mouse cursor that should be displayed when the mouse is over the checkbox object:

CONSTANT | VALUE | DESCRIPTION
CURSOR_ARROW | 0 | Standard mouse arrow cursor.
CURSOR_HAND | 1 | Hand cursor.
CURSOR_BLACK_ARROW | 2 | Black arrow cursor.
CURSOR_CROSSHAIR | 3 | Crosshair cursor.
CURSOR_EXPLORE | 4 | Explore cursor.
CURSOR_HELP | 5 | Help cursor.
CURSOR_MAGNIFY | 6 | Magnify cursor.
CURSOR_MEDIA | 7 | Media cursor.
CURSOR_MONEY | 8 | Money cursor.
CURSOR_NOTEPAD | 9 | Notepad cursor.
CURSOR_PENCIL | 10 | Pencil cursor.
CURSOR_PRINTER | 11 | Printer cursor.
CURSOR_SPEAKER | 12 | Speaker cursor.
CURSOR_UP_ARROW | 13 | Up arrow cursor.

ResizeLeft

boolean

True if the left side of the object should move when the application is resized, false if it should not.

ResizeRight

boolean

True if the right side of the object should move when the application is resized, false if it should not.

ResizeTop

boolean

True if the top of the object should move when the application is resized, false if it should not.

ResizeBottom

boolean

True if the bottom of the object should move when the application is resized, false if it should not.

HighlightSound

number

The type of sound that should be played when the mouse moves over the object.

CONSTANT | VALUE | DESCRIPTION
SND_NONE | 0 | No highlight sound.
SND_STANDARD | 1 | Standard highlight sound.
SND_CUSTOM | 2 | Custom highlight sound.

HighlightSoundFile

string

The path to the object's custom highlight sound file.

ClickSound

number

The type of sound that should be played when the mouse clicks the object.

CONSTANT | VALUE | DESCRIPTION
SND_NONE | 0 | No click sound.
SND_STANDARD | 1 | Standard click sound.
SND_CUSTOM | 2 | Custom click sound.

ClickSoundFile

string

The path to the object's custom click sound file.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


CheckBox.SetSize

CheckBox.SetSize (

string ObjectName,

number Width,

number Height )

Description

Sets the size of a checkbox object.

Parameters

ObjectName

(string) The name of the checkbox object.

Width

(number) The new width of the checkbox object in pixels.

Height

(number) The new height of the checkbox object in pixels.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


CheckBox.SetText

CheckBox.SetText (

string ObjectName,

string Text )

Description

Sets the text currently displayed on the checkbox object.

Parameters

ObjectName

(string) The name of the checkbox object.

Text

(string) The text you want to display on the checkbox object.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


CheckBox.SetVisible

CheckBox.SetVisible (

string ObjectName,

boolean Visible = true )

Description

Sets the visibility of a checkbox object.

Parameters

ObjectName

(string) The name of the checkbox object.

Visible

(boolean) Whether to make the checkbox object visible or invisible:

VALUE | DESCRIPTION
true | Visible. (Default)
false | Invisible.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Crypto.Base64DecodeFromFile

Crypto.Base64DecodeFromFile (

string Source,

string Destination )

Description

Decodes a base64-encoded text file and stores the result as a binary file.

Note: Base64 encoding is the process of encoding arbitrary data as plain ASCII text. One common use for this type of encoding is sending files through email. It is one of the techniques employed by the MIME standard to send data other than plain ASCII text.

Parameters

Source

(string) The full path to the base64-encoded text file that you want to decode.

Destination

(string) The full path and filename for the decoded binary file.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Crypto.Base64DecodeFromString

Crypto.Base64DecodeFromString (

string Text,

string Filename )

Description

Decodes a base64-encoded string and stores the result as a binary file.

Note: Base64 encoding is the process of encoding arbitrary data as plain ASCII text. One common use for this type of encoding is sending files through email. It is one of the techniques employed by the MIME standard to send data other than plain ASCII text.

Parameters

Text

(string) The base64-encoded text that you want to decode.

Filename

(string) The full path and filename for the decoded binary file.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Crypto.Base64EncodeToFile

Crypto.Base64EncodeToFile (

string Source,

string Destination,

number LineLen = 76 )

Description

Stores the contents of a binary file as a base64-encoded text file.

Note: Base64 encoding is the process of encoding arbitrary data as plain ASCII text. One common use for this type of encoding is sending files through email. It is one of the techniques employed by the MIME standard to send data other than plain ASCII text.

Parameters

Source

(string) The full path to the file that you want to encode.

Destination

(string) The full path and filename for the base64-encoded file.

LineLen

(number) The maximum line length for the base64-encoded text, in columns. (Use 0 for no line breaks.) The default value is 76.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Crypto.Base64EncodeToString

string Crypto.Base64EncodeToString (

string Source,

number LineLen = 76 )

Description

Returns the contents of a binary file as a base64-encoded string.

Note: Base64 encoding is the process of encoding arbitrary data as plain ASCII text. One common use for this type of encoding is sending files through email. It is one of the techniques employed by the MIME standard to send data other than plain ASCII text.

Parameters

Source

(string) The full path to the file that you want to encode.

LineLen

(number) The maximum line length for the base64-encoded text, in columns. (Use 0 for no line breaks.) The default value is 76.

Returns

(string) The contents of the specified binary file as a base64-encoded string. If the data cannot be encoded or some other error occurs, an empty string ("") is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Crypto.BlowfishDecrypt

Crypto.BlowfishDecrypt (

string Source,

string Destination,

string Key )

Description

Creates a decrypted copy of a blowfish-encrypted file.

Parameters

Source

(string) The full path to the file that you want to decrypt.

Destination

(string) The full path and filename for the decrypted file.

Key

(string) The secret key that the data was encrypted with.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Crypto.BlowfishDecryptString

string Crypto.BlowfishDecryptString (

string Text,

string Key )

Description

Decrypts a string that was encrypted using the Crypto.BlowfishEncryptString action. (Decodes a base64-encoded string and decrypts the blowfish-encrypted data.)

Tip: You do not have to Base64Decode the string first, simply pass this action any string encoded using Crypto.BlowfishEncryptString.

Note: Base64 encoding is the process of encoding arbitrary data as plain ASCII text. One common use for this type of encoding is sending files through email. It is one of the techniques employed by the MIME standard to send data other than plain ASCII text.

Parameters

Text

(string) The string that you want to decrypt.

Key

(string) The secret key that the data was encrypted with.

Returns

(string) The decrypted version of a string that was encrypted with a Crypto.BlowfishEncryptString action. If the data cannot be decrypted or some other error occurs, an empty string ("") is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Crypto.BlowfishEncrypt

Crypto.BlowfishEncrypt (

string Source,

string Destination,

string Key )

Description

Creates a blowfish-encrypted copy of a file.

Parameters

Source

(string) The full path to the file that you want to encrypt.

Destination

(string) The full path and filename for the blowfish-encrypted file.

Key

(string) The secret key to encrypt the data with.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Crypto.BlowfishEncryptString

string Crypto.BlowfishEncryptString (

string Text,

string Key,

number LineLen = 0 )

Description

Blowfish encrypts a string and returns a base64-encoded string containing the encrypted data.

Note: Base64 encoding is the process of encoding arbitrary data as plain ASCII text. One common use for this type of encoding is sending files through email. It is one of the techniques employed by the MIME standard to send data other than plain ASCII text.

Parameters

Text

(string) The string that you want to encrypt.

Key

(string) The secret key to encrypt the data with.

LineLen

(number) The maximum line length for the base64-encoded text, in columns. (Use 0 for no line breaks.) The default value is 0.

Returns

(string) A base64-encoded string containing the encrypted data. If the data cannot be encrypted or some other error occurs, an empty string ("") is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Crypto.MD5DigestFromFile

string Crypto.MD5DigestFromFile (

string Filename )

Description

Creates an MD5 message digest for a given file.

Parameters

Filename

(string) The full path to the file whose MD5 digest you want to calculate.

Note: The file can be of any type (binary or ascii).

Returns

(string) The message digest that was calculated for the file. If the message digest cannot be calculated or some other error occurs, an empty string ("") is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Crypto.MD5DigestFromString

string Crypto.MD5DigestFromString (

string Text )

Description

Creates an MD5 message digest for a given text string.

An MD5 message digest is a 128-bit "fingerprint" or digital signature, represented by a string of 32 hex digits. Every unique string of text is guaranteed to produce a unique message digest. More importantly, it is virtually impossible to determine the original string from the digest. In other words, the MD5 calculation only works in one direction. This makes it extremely useful for storing passwords.

Instead of storing a password in plain text, you should store its MD5 digest instead. When the user enters a password, calculate the MD5 digest for the text that they entered, and compare that to the MD5 digest that was stored. If it is identical to the stored digest, then the user entered the correct password.

Since there is no way to get from the digest back to the original password, it doesn't matter if anyone sees the digest.

Note: MD5 isn't a substitute for secure passwords. Using an insecure password like "sneeze" or "equine" can still leave your application open to so-called "dictionary attacks," where the hacker simply tries the MD5 digest for every word in the dictionary. Be sure to use secure passwords like "sationicat59" or "b$fer@fe!23."

Tip: A good way to defeat dictionary attacks when using user-supplied passwords is to append a non-alphabetic string to all passwords. For example, simply append "$!%" to the end of any password before generating the MD5 digest. This way, even a really bad password like "password" will be relatively safe from dictionary attacks.

Parameters

Text

(string) The text to create the message digest for.

Returns

(string) The message digest that was calculated for the given text. If the message digest cannot be calculated or some other error occurs, an empty string ("") is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Crypto.Rot13

string Crypto.Rot13 (

string Text )

Description

Applies a simple Ceaser-cypher ("rot13") encryption to the text.

The simple encryption replaces each English letter with the one 13 places forward or back along the alphabet, so that "Indigo Rose is cool!" becomes "Vaqvtb Ebfr vf pbby!" In other words, it "rotates" the alphabet ahead 13 characters. Most Usenet news reading and posting programs include a rot13 feature to hide text from plain sight so the user must choose to view it. (For example, to hide "spoilers" -- information that gives away some secret that readers might not want to know if they haven't already read the book, played the game, etc.)

A nice feature of rot13 is that the same action is used to encrypt and decrypt the text.

Parameters

Text

(string) The text that you want to encrypt (or decrypt).

Returns

(string) The encrypted (or decrypted) text. If the text cannot be encrypted (or decrypted) or some other error occurs, an empty string ("") is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Debug.Clear

Debug.Clear (

)

Description

Clears the contents of the debug window.

Parameters

None.

Returns

Nothing.


Debug.GetEventContext

string Debug.GetEventContext (

)

Description

Returns a string describing the current event context, e.g. "Page 4 -> Label 2 -> On Click".

Parameters

None.

Returns

(string) A string describing the current event context.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Debug.GetTraceMode

boolean Debug.GetTraceMode (

)

Description

Returns the current debug trace mode.

Parameters

None.

Returns

(boolean) True if trace mode is on, false if trace mode is off.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Debug.Print

Debug.Print (

string Text )

Description

Appends text to the bottom of the debug window.

Parameters

Text

(string) The text to add to the debug window.

Returns

Nothing.


Debug.SendToFile

number Debug.SendToFile (

string Filename,

boolean Overwrite = true )

Description

This action will cause all debug output to be written to the specified file. To turn off the logging simply pass a blank string as the filename.

Note: If the Debug dialog is visible and you are logging information to a file, debug output will be sent to both the dialog and the file.

Parameters

Filename

(string) The full path to the file where the debug output will be written to.

Overwrite

(boolean) Whether the debug information will overwrite Filename, if it exists, or append to it.

Returns

(number) Returns one of the following numeric codes:

CONSTANT | VALUE | DESCRIPTION
FE_NONE | 0 | No error occurred.
FE_GENERIC | 1 | An unspecified error occurred.
FE_FILE_NOT_FOUND | 2 | The file could not be found.
FE_BAD_PATH | 3 | All or part of the path is invalid.
FE_TOO_MANY_OPEN_FILES | 4 | The permitted number of open files was exceeded.
FE_ACCESS_DENIED | 5 | The file could not be accessed.
FE_INVALID_FILE | 6 | There was an attempt to use an invalid file handle.
FE_REMOVE_CURRENT_DIR | 7 | The current working directory cannot be removed.
FE_DIRECTORY_FULL | 8 | There are no more directory entries.
FE_BAD_SEEK | 9 | There was an error trying to set the file pointer.
FE_HARD_IO | 10 | There was a hardware error.
FE_SHARING_VIOLATION | 11 | SHARE.EXE was not loaded, or a shared region was locked.
FE_LOCK_VIOLATION | 12 | There was an attempt to lock a region that was already locked.
FE_DISK_FULL | 13 | The disk is full.
FE_END_OF_FILE | 14 | The end of file was reached.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Debug.SetTraceMode

Debug.SetTraceMode (

boolean Enable = true )

Description

Turns debug trace mode on or off.

When trace mode is on, every line of code will be traced out to the debug window, and the last error code will be printed after each action is performed.

Parameters

Enable

(boolean) Whether to turn trace mode on or off:

VALUE | DESCRIPTION
true | Turn trace mode on. (Default)
false | Turn trace mode off.

Returns

Nothing.


Debug.ShowWindow

Debug.ShowWindow (

boolean Show )

Description

Shows or hides the debug window.

Parameters

Show

(boolean) Whether to show or hide the debug window:

VALUE | DESCRIPTION
true | Show the window. (default)
false | Hide the window.

Returns

Nothing.


Dialog.ComboBox

string Dialog.ComboBox (

string Title,

string Prompt,

table Items,

string DefaultItem,

boolean SortItems = false,

boolean Editable = false,

number Icon = MB_ICONQUESTION )

Description

Presents a dialog box with a combo box control on it.

Parameters

Title

(string) The text to be displayed on the title bar of the dialog.

Prompt

(string) The text that will appear above the combo box.

Items

(table) A numerically indexed table containing the list of items that should be available in the combo box.

DefaultItem

(string) The default item that should be selected in the combo box. Use an empty string ("") for nothing to be selected.

SortItems

(boolean) Whether the items in the drop-down area should be sorted or not:

VALUE | DESCRIPTION
true | Sort the items in the drop down.
false | Don't sort the items. (Default)

Editable

(boolean) Whether the combo box text should be editable or if the user has to choose an item from the list:

VALUE | DESCRIPTION
true | The combo box text should be editable.
false | The user must choose an item from the list. (Default)

Icon

(number) The icon to display on the dialog:

CONSTANT | VALUE | DESCRIPTION
MB_ICONNONE | 0 | None.
MB_ICONSTOP | 16 | Stop.
MB_ICONQUESTION | 32 | Question. (Default)
MB_ICONEXCLAMATION | 48 | Exclamation.
MB_ICONINFORMATION | 64 | Information.

Returns

(string) The item that was selected from the combo box or the text that was entered if the field was editable, if the OK button is pressed. It will return "CANCEL" if the Cancel button is pressed. If an error occurs, a blank string "" will be returned. You can use Application.GetLastError to determine whether this action failed, and why.


Dialog.FileBrowse

table Dialog.FileBrowse (

boolean FileOpen,

string Title,

string DefaultFolder,

string FileFilters = "All Files (*.*)|*.*|",

string Filename = "",

string FileExtension = "",

boolean MultipleSelect = false,

boolean FileMustExist = false )

Description

Presents a file browse dialog to the user to collect the paths to one or more files.

Parameters

FileOpen

(boolean) Whether to make the dialog a "file open" dialog:

VALUE | DESCRIPTION
true | Dialog will be a " file open" dialog.
false | Dialog will be a "file save" dialog.

Title

(string) The text to be displayed on the dialog title bar.

DefaultFolder

(string) The default folder to browse.

Tip: You can click the browse button to select a folder.

FileFilters

(string) The file type filters that will be used in the browse. Defaults to "All Files (*.*)|*.*|". These filters control which file types will be visible in the file browse dialog. For example, if you want to filter only executables, you could have "Executables (*.exe)|*.exe|". "Executables (*.exe)" is the description that will appear in the "Files of type" field on the dialog and can be any text you want. "|*.exe|" represents the file filter that will be used internally.

You can also include multiple filters that can be selected. For example, "Executables (*.exe)|*.exe|Text Files (*.txt)|*.txt|". The second filter will be available on the dialog from the drop down in the "Files of type" field.

You also have the ability to specify more than one pattern for a filter by separating the patterns with semicolons. For example, "Pictures (.png, .jpg, .tif)|*.png;*.jpg;*.tif|".

Filename

(string) The file name that initially appears in the file name edit box.

FileExtension

(string) The default file extension. This will be appended to the filename in the file name edit box if the user does not supply an extension.

Note: Only used if the user types the name in.

MultipleSelect

(boolean) Whether to allow multiple selection of files:

VALUE | DESCRIPTION
true | Allow multiple selection.
false | Don't. (Default)

FileMustExist

(boolean) Whether to make sure that the file name in the edit field of the dialog exists when the user clicks "Open" or "Save."

VALUE | DESCRIPTION
true | The file must exist.
false | The file doesn't have to exist. (Default)

Returns

(table) A table containing the list of paths to the files that were selected. Each individual path can be accessed at it's table index. If the user cancels the operation (presses the cancel button), the string "CANCEL" will be returned in the table (tb[1] = "CANCEL"). If an error occurs, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Dialog.FolderBrowse

string Dialog.FolderBrowse (

string Prompt,

string DefaultFolder )

Description

Presents a folder browse dialog to the user to collect the path to a folder.

Parameters

Prompt

(string) The message text on the dialog.

DefaultFolder

(string) The default folder to browse.

Tip: You can click the browse button to select a folder.

Returns

(string) The path to the folder that was selected with the folder browse dialog. If the user cancels the operation (presses the cancel button), the string "CANCEL" will be returned. If an error occurs, a blank string "" will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Dialog.Input

string Dialog.Input (

string Title,

string Prompt,

string DefaultText = "",

number Icon = MB_ICONQUESTION )

Description

Presents an input dialog to collect information from the user.

Parameters

Title

(string) The text to be displayed on the title bar of the dialog.

Prompt

(string) The text that will appear above the edit field.

DefaultText

(string) The default text to display in the edit field. Defaults to an empty string (no text).

Icon

(number) The icon to display on the dialog:

CONSTANT | VALUE | DESCRIPTION
MB_ICONNONE | 0 | None.
MB_ICONSTOP | 16 | Stop.
MB_ICONQUESTION | 32 | Question. (Default)
MB_ICONEXCLAMATION | 48 | Exclamation.
MB_ICONINFORMATION | 64 | Information.

Returns

(string) The text that was in the edit field if the OK button is pressed, or "CANCEL" if the Cancel button is pressed. If an error occurs, a blank string "" will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Dialog.MaskedInput

table Dialog.MaskedInput (

string Title = "",

string Prompt,

string Mask,

string DefaultText = "",

number Icon = MB_ICONQUESTION,

string PlaceHolder = " " )

Description

Presents an input dialog to collect information from the user in a specific format.

Parameters

Title

(string) The text to be displayed in the title bar of the dialog.

Prompt

(string) The text to be displayed above the edit field.

Mask

(string) The input mask to be used to control input into the edit field.

DefaultText

(string) The default text to display in the edit field. Defaults to an empty string (no text).

Icon

(number) The icon to display on the dialog:

CONSTANT | VALUE | DESCRIPTION
MB_ICONNONE | 0 | None.
MB_ICONSTOP | 16 | Stop.
MB_ICONQUESTION | 32 | Question. (Default)
MB_ICONEXCLAMATION | 48 | Exclamation.
MB_ICONINFORMATION | 64 | Information.

PlaceHolder

(string) Text used as a placeholder for the input mask. This can be used as sample input until the user fills the input mask. For example, if you used the telephone number input mask, you could include a sample digit as the placeholder such as 9. At runtime it would appear as (999) 999-9999 until the user replaced these digits with their own. The default is a blank space.

Returns

(table) A table containing the user input text, indexed by the following keys:

KEY | TYPE | DESCRIPTION
Displayed | string | The text as displayed (including literals from the input mask).
Data | string | The data entered (not including literals from the input mask).

If the user presses the "Cancel" button on the dialog or an error occurs, nil is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Dialog.Message

number Dialog.Message (

string Title,

string Text,

number Type = MB_OK,

number Icon = MB_ICONINFORMATION,

number DefaultButton = MB_DEFBUTTON1 )

Description

Presents a dialog to the user with an informative message on it.

Parameters

Title

(string) The text that will appear in the dialog title bar.

Text

(string) The text that will appear on the dialog.

Type

(number) The type of dialog to display:

CONSTANT | VALUE | DESCRIPTION
MB_OK | 0 | OK (Default)
MB_OKCANCEL | 1 | OK | Cancel
MB_ABORTRETRYIGNORE | 2 | Abort | Retry | Ignore
MB_YESNOCANCEL | 3 | Yes | No | Cancel
MB_YESNO | 4 | Yes | No
MB_RETRYCANCEL | 5 | Retry | Cancel

Icon

(number) The icon to display on the dialog:

CONSTANT | VALUE | DESCRIPTION
MB_ICONNONE | 0 | None.
MB_ICONSTOP | 16 | Stop.
MB_ICONQUESTION | 32 | Question.
MB_ICONEXCLAMATION | 48 | Exclamation.
MB_ICONINFORMATION | 64 | Information. (Default)

DefaultButton

(number) The button that will get the focus by default:

CONSTANT | VALUE | DESCRIPTION
MB_DEFBUTTON1 | 0 | The first button from the left. (Default)
MB_DEFBUTTON2 | 256 | The second button from the left.
MB_DEFBUTTON3 | 512 | The third button from the left.

Returns

(number) The numeric constant for the button that was pressed:

CONSTANT | VALUE | DESCRIPTION
IDOK | 1 | The OK button.
IDCANCEL | 2 | The Cancel button.
IDABORT | 3 | The Abort button.
IDRETRY | 4 | The Retry button.
IDIGNORE | 5 | The Ignore button.
IDYES | 6 | The Yes button.
IDNO | 7 | The No button.

If an error occurs, IDCANCEL (value 2) will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Dialog.PageSearch

Dialog.PageSearch (

table DialogText = nil )

Description

Presents a dialog that allows the user to search for pages by keyword. Keywords can be defined on each page in your project. Search results shown to the user is a list of page descriptions (if present), or page names.

Parameters

DialogText

(table) A table containing the text to display on the dialog controls instead of the default English text. If this table is nil, the English defaults are used. If the table is specified, only those indexes that are specified are used. This allows partial translation or text changes. The table may contain one or more of the following values:

KEY | TYPE | DESCRIPTION
DialogTitle | string | The dialog title text.
SearchForLabel | string | The "Search for:" label.
AllowPartialMatches | string | The text of the "Allow partial matches" checkbox.
AllowPartialMatchesCheckbox | boolean | Default value for the "Allow partial matches" checkbox. (true=checked, false=unchecked)
CaseSensitive | string | The text for the "Case sensitive" checkbox.
CaseSensitiveCheckbox | boolean | Default value for the "Case sensitive" checkbox. (true=checked, false=unchecked)
SearchButton | string | The text for the search button.
ResultsGroup | string | The text for the "Results (Double-click to jump to page)" group box.
CancelButton | string | The text for the cancel button.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Dialog.PasswordInput

string Dialog.PasswordInput (

string Title,

string Prompt,

number Icon = MB_ICONNONE )

Description

Presents a "hidden input" dialog to collect a password from the user.

Note: Whatever the user types into this dialog will be hidden by asterisks, like this: *******

Parameters

Title

(string) The dialog title.

Prompt

(string) The text that will appear above the edit field.

Icon

(number) The icon to display on the dialog:

CONSTANT | VALUE | DESCRIPTION
MB_ICONNONE | 0 | None. (Default)
MB_ICONSTOP | 16 | Stop.
MB_ICONQUESTION | 32 | Question.
MB_ICONEXCLAMATION | 48 | Exclamation.
MB_ICONINFORMATION | 64 | Information.

Returns

(string) The text that was typed into the edit field if the OK button is pressed, or "CANCEL" if the Cancel button is pressed. If an error occurs, a blank string "" will be returned. You can use Application.GetLastError to determine whether this action failed, and why.


Dialog.SplashFlash

Dialog.SplashFlash (

string FlashFile,

number Time = 0,

boolean AllowClickToSkip = true )

Description

Displays a splash dialog containing a Flash movie.

Parameters

FlashFile

(string) The path to the Flash file (.swf). Click the browse button to select a file.

Time

(number) The amount of time to display the dialog (in seconds). If Time=0 the Flash movie window will only close automatically if the Flash movie fires the FSCommand "quit". The word "quit" is case insensitive. For example, fscommand ("quit").

AllowClickToSkip

(boolean) Whether the user can close the splash screen by clicking on it:

VALUE | DESCRIPTION
true | Allow the user to click on the dialog to close it. (Default)
false | Prevent the user from closing the dialog.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Dialog.SplashImage

Dialog.SplashImage (

string MediaFile,

number Time,

boolean AllowClickToSkip = true )

Description

Displays a splash dialog containing an image.

Parameters

MediaFile

(string) The path to the image file. Click the browse button to select a file.

Time

(number) The amount of time to display the dialog (in seconds).

AllowClickToSkip

(boolean) Whether the user can close the splash screen by clicking on it:

VALUE | DESCRIPTION
true | Allow the user to click on the dialog to close it. (Default)
false | Prevent the user from closing the dialog.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Dialog.SplashVideo

Dialog.SplashVideo (

string VideoFile,

number Time = 0,

boolean AllowClickToSkip = true )

Description

Displays a splash dialog containing a video.

Parameters

VideoFile

(string) The path to the video file. Click the browse button to select a file.

Time

(number) The amount of time to display the dialog (in seconds). If Time=0 the dialog will be shown for the duration of the video file.

AllowClickToSkip

(boolean) Whether the user can close the splash screen by clicking on it:

VALUE | DESCRIPTION
true | Allow the user to click on the dialog to close it. (Default)
false | Prevent the user from closing the dialog.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Dialog.TimedMessage

Dialog.TimedMessage (

string Title,

string Text,

number Time,

number Icon = MB_ICONINFORMATION )

Description

Presents a timed dialog to the user with an informative message on it.

Parameters

Title

(string) The text to be displayed on the title bar of the dialog.

Text

(string) The text to be displayed on the dialog.

Time

(number) The amount of time to make the dialog visible, in milliseconds.

Icon

(number) The icon to display on the dialog:

CONSTANT | VALUE | DESCRIPTION
MB_ICONNONE | 0 | None.
MB_ICONSTOP | 16 | Stop.
MB_ICONQUESTION | 32 | Question.
MB_ICONEXCLAMATION | 48 | Exclamation.
MB_ICONINFORMATION | 64 | Information. (Default)

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


DialogEx.ClickObject

DialogEx.ClickObject (

string ObjectName )

Description

Fires the On Click event of the specified object on the current dialog. This will cause any actions on the object's On Click event to be executed.

Parameters

ObjectName

(string) The name of the object.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


DialogEx.Close

boolean DialogEx.Close (

number ReturnCode )

Description

Closes the current dialog with a specific return code.

Note: If the user closed the dialog using the close button on the window, IDCANCEL (2) will be returned.

Note: You cannot close a dialog while a status dialog is visible.

Tip: Dialogs can be shown using the DialogEx.Show action.

Tip: If you need to prevent the user from closing the dialog or want to add a confirmation message, you can use the built-in function QueryAllowDialogClose.

Parameters

ReturnCode

(number) The value to return from the dialog. This is the value that will be returned by the DialogEx.Show action.

Returns

(boolean) True if the dialog was closed successfully, or false if it was not. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


DialogEx.CreateObject

DialogEx.CreateObject (

number ObjectType,

string ObjectName,

table Properties )

Description

Creates an object on the current dialog.

Parameters

ObjectType

(number) The type of object to create:

CONSTANT | VALUE | DESCRIPTION
OBJECT_BUTTON | 0 | Button object.
OBJECT_LABEL | 1 | Label object.
OBJECT_PARAGRAPH | 2 | Paragraph object.
OBJECT_IMAGE | 3 | Image object.
OBJECT_FLASH | 4 | Flash object.
OBJECT_VIDEO | 5 | Video object.
OBJECT_WEB | 6 | Web object.
OBJECT_INPUT | 7 | Input object.
OBJECT_HOTSPOT | 8 | Hotspot object.
OBJECT_LISTBOX | 9 | Listbox object.
OBJECT_COMBOBOX | 10 | Combobox object.
OBJECT_PROGRESS | 11 | Progress object.
OBJECT_TREE | 12 | Tree object.
OBJECT_RADIOBUTTON | 13 | RadioButton object.
OBJECT_RICHTEXT | 14 | RichText object.
OBJECT_CHECKBOX | 15 | CheckBox object.
OBJECT_SLIDESHOW | 16 | SlideShow object.
OBJECT_GRID | 17 | Grid object.
OBJECT_PDF | 18 | PDF object.
OBJECT_QUICKTIME | 19 | QuickTime object.
OBJECT_XBUTTON | 20 | xButton object.

ObjectName

(string) The name of the object.

Note: This name must not be the name of another object on the dialog. If an object on the dialog already exists with the name passed, an error will occur.

Properties

(table) A table of properties you want to set for the object. The contents of this table depends on which object type was specified:

Note: Clicking on the links below will take you to the properties table in each object's SetProperties action.

  • Button

  • Image

  • Label (Height and Width cannot be specified when creating a label object with this action)

  • Paragraph

  • Video

  • QuickTime

  • Flash

  • SlideShow

  • PDF

  • Web

  • xButton

  • CheckBox

  • RadioButton

  • Input

  • ComboBox

  • ListBox

  • Tree

  • Grid

  • Progress

  • RichText

  • Hotspot

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


DialogEx.DeleteObject

DialogEx.DeleteObject (

string ObjectName )

Description

Deletes an object from the current dialog.

Parameters

ObjectName

(string) The name of the object.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


DialogEx.EnumerateObjects

table DialogEx.EnumerateObjects (

)

Description

Returns a table containing the names of all of the objects on the current dialog.

Parameters

None.

Returns

(table) A table containing each object name found on the current dialog. If there are no objects on the dialog, or the action fails, nil is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


DialogEx.GetFocus

string DialogEx.GetFocus (

)

Description

Returns the name of the object that currently has focus on the current dialog.

Parameters

None.

Returns

(string) The name of the object that currently has focus. If no object has focus or an error occurs, a blank string "" is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


DialogEx.GetObjectScript

string DialogEx.GetObjectScript (

string ObjectName,

string EventName )

Description

Returns a string containing the script from an object's event on the current dialog.

Parameters

ObjectName

(string) The name of the object whose script you want to get.

EventName

(string) The name of the event whose script you want as it appears in the script editor dialog. For example "On Click".

Returns

(string) The object's script for the specified event. If an error occurs, an empty string ("") is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


DialogEx.GetObjectType

number DialogEx.GetObjectType (

string ObjectName )

Description

Returns the "type" of a given object on the current dialog.

Parameters

ObjectName

(string) The name of the object.

Returns

(number) One of the following values representing the "type" of the object:

CONSTANT | VALUE | DESCRIPTION
OBJECT_BUTTON | 0 | Button object.
OBJECT_LABEL | 1 | Label object.
OBJECT_PARAGRAPH | 2 | Paragraph object.
OBJECT_IMAGE | 3 | Image object.
OBJECT_FLASH | 4 | Flash object.
OBJECT_VIDEO | 5 | Video object.
OBJECT_WEB | 6 | Web object.
OBJECT_INPUT | 7 | Input object.
OBJECT_HOTSPOT | 8 | Hotspot object.
OBJECT_LISTBOX | 9 | Listbox object.
OBJECT_COMBOBOX | 10 | Combobox object.
OBJECT_PROGRESS | 11 | Progress object.
OBJECT_TREE | 12 | Tree object.
OBJECT_RADIOBUTTON | 13 | RadioButton object.
OBJECT_RICHTEXT | 14 | RichText object.
OBJECT_CHECKBOX | 15 | CheckBox object.
OBJECT_SLIDESHOW | 16 | Slideshow object.
OBJECT_GRID | 17 | Grid object.
OBJECT_PDF | 18 | PDF object.
OBJECT_QUICKTIME | 19 | QuickTime object.
OBJECT_XBUTTON | 20 | xButton object.
OBJECT_PLUGIN | 40 | Plugin object.

If no object can be found with the name you provided, or any other error occurs, -1 is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


DialogEx.GetRadioValue

string DialogEx.GetRadioValue (

string GroupID = "",

number Type = RADIOGROUP_VALUE )

Description

Gets the radiobutton value, object name, or text of the selected radio button on the current dialog.

Tip: You can select a radio button on a dialog by text, value or object name using the DialogEx.SetRadioValue action.

Parameters

GroupID

(string) The ID of the group whose selected radiobutton you want. When an empty string is passed, this is the default radiobutton group of the dialog.

Type

(number) The type of value you want from the selected radiobutton:

CONSTANT | VALUE | DESCRIPTION
RADIOGROUP_VALUE | 0 | Get the radiobutton value. (Default)
RADIOGROUP_OBJECTNAME | 1 | Get the radiobutton object's name.
RADIOGROUP_TEXT | 2 | Get the radiobutton's text.

Returns

(string) The chosen Type data of the currently selected radiobutton object on the dialog. If no object is selected, or an error occurs, an empty string is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


DialogEx.GetSize

table DialogEx.GetSize (

)

Description

Returns table containing the current dialog's pixel dimensions.

Parameters

None.

Returns

(table) A table containing the current dialog's pixel dimensions, indexed by values "Width" and "Height". If an error occurs, nil is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


DialogEx.GetWndHandle

number DialogEx.GetWndHandle (

)

Description

Returns the numeric window handle for the current dialog window.

Parameters

None.

Returns

(number) The numeric window handle for the current dialog window. If an error occurs, -1 will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


DialogEx.Print

DialogEx.Print (

boolean ShowPrintDialog = true,

boolean ScaleToFit = true )

Description

Prints the current dialog.

Note: Some types of objects have troubles printing with certain printer drivers. The Video object will not display when printed.

Parameters

ShowPrintDialog

(boolean) Whether to show the common print dialog before printing.

VALUE | DESCRIPTION
true | Show the common print dialog before printing. (Default)
false | Use defaults such as default printer, letter sized paper and choose the best between portrait and landscape.

ScaleToFit

(boolean) Whether to scale the dialog to fill as much of the printed page as possible while preserving the aspect ratio of the dialog.

VALUE | DESCRIPTION
true | Scale the dialog to fill the printed page. (Default)
false | Print the dialog at a 1:1 ratio.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


DialogEx.Redraw

DialogEx.Redraw (

)

Description

Causes the current dialog to redraw itself.

Note: This will also redraw all of the objects on the current dialog.

Parameters

None.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


DialogEx.SetFocus

DialogEx.SetFocus (

string ObjectName )

Description

Sets focus to an object on the current dialog.

Note: Focus can only be set for Flash, xButton, CheckBox, RadioButton, Input, ComboBox, ListBox, Tree, Grid, and RichText objects. It may also apply to various types of plugin objects that support focus.

Parameters

ObjectName

(string) The name of the object.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


DialogEx.SetObjectScript

DialogEx.SetObjectScript (

string ObjectName,

string EventName,

string Script )

Description

Sets the script on an object's event on the current dialog.

Note: This action applies to objects on the current dialog only. To set script for an object on dialog 2, your application must be displaying dialog 2.

Parameters

ObjectName

(string) The name of the object whose script you want to set.

EventName

(string) The name of the event whose script you want to set, as it appears in the script editor dialog. For example "On Click".

Script

(string) The script to assign to the specified object's event.

Note: The script specified in this argument will replace any script existing in the event. If you want to append to the event (instead of replacing the script), you must first perform a DialogEx.GetObjectScript action.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


DialogEx.SetObjectZOrder

DialogEx.SetObjectZOrder (

string ObjectName,

number Position,

string ReferenceObject = "" )

Description

Sets the z-position of an object on the current dialog.

Parameters

ObjectName

(string) The name of the object.

Position

(number) The z-order position the object should take:

CONSTANT | VALUE | DESCRIPTION
ZORDER_FRONT | 0 | Move the object to the front of the z-order.
ZORDER_BACK | 1 | Move the object to the back of the z-order.
ZORDER_FORWARD | 2 | Move the object forward one position in the z-order.
ZORDER_BACKWARD | 3 | Move the object backward one position in the z-order.
ZORDER_INSERT_BEFORE | 4 | Move the object into the z-order position in front of the object specified in ReferenceObject.
ZORDER_INSERT_BEHIND | 5 | Move the object into the z-order position behind the object specified in ReferenceObject.

ReferenceObject

(string) If Position is set to ZORDER_INSERT_BEFORE or ZORDER_INSERT_BEHIND, this is the object that the object specified in ObjectName will be positioned next to. ReferenceObject is an empty string ("") by default.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


DialogEx.SetRadioValue

DialogEx.SetRadioValue (

string Value,

string GroupID = "",

number Type = RADIOGROUP_VALUE )

Description

Selects a radio button item in a group by value, object name or radio button text on the current dialog.

Tip: You can get the selected radio button on the dialog using the DialogEx.GetRadioValue action.

Parameters

Value

(string) The radio button that should be selected in the group. This value will be interpreted according to the Type parameter.

GroupID

(string) The ID of the group whose radio button you want to select. When an empty string is passed, this is the default radiobutton group of the dialog.

Type

(number) The type of value that you are specifying in the Value parameter:

CONSTANT | VALUE | DESCRIPTION
RADIOGROUP_VALUE | 0 | Select by radiobutton value. (Default)
RADIOGROUP_OBJECTNAME | 1 | Select by radiobutton object's name.
RADIOGROUP_TEXT | 2 | Select by radiobutton's text.

Returns

Nothing.


DialogEx.SetRedraw

DialogEx.SetRedraw (

boolean Redraw = true )

Description

Controls the redrawing of all objects on the current dialog. This action is useful if you are performing a series of actions that cause redrawing on the dialog. Using this action, you can force all changes to appear at once rather than having the dialog redraw itself multiple times.

Parameters

Redraw

(boolean) Whether to make the application redraw objects on the dialog:

VALUE | DESCRIPTION
true | Redraw objects. (Default)
false | Don't redraw objects.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


DialogEx.Show

number DialogEx.Show (

string DialogName,

boolean ParentCoordinates = true,

number X = nil,

number Y = nil )

Description

Shows a specific dialog in your application at an optional position.

Note: You can show a dialog from a dialog, however you cannot show another instance of a dialog if it is already visible.

Note: You cannot show a dialog while a status dialog is visible.

Tip: You can use the DialogEx.Close action to close the current dialog.

Parameters

DialogName

(string) The name of the dialog to show.

ParentCoordinates

(boolean) Whether the dialog position should be relative to the parent window (application or another dialog) or the screen. If X and Y are set to nil, this setting is ignored and the dialog will be centered on the screen.

VALUE | DESCRIPTION
true | Position the dialog relative to the parent window (application or dialog). (Default)
false | Position the dialog relative to the screen.

X

(number) The optional pixel coordinate (horizontal position) to set for the dialog window. This is the X coordinate of the upper left hand corner of the dialog relative to the screen or parent window, based on the value specified in ParentCoordinates. Set to nil to center the dialog.

Y

(number) The optional Y pixel coordinate (vertical position) to set for the dialog window. This is the Y coordinate of the upper left hand corner of the dialog relative to the screen or parent window, based on the value specified in ParentCoordinates. Set to nil to center the dialog.

Returns

(number) The result of the dialog that is passed to the DialogEx.Close action, or IDCANCEL (2) if the user chose to close the dialog using the close button (X on the title bar) on the window. If an error occurs, -1 is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


DialogEx.StartTimer

DialogEx.StartTimer (

number Interval = 1000,

number ID = 10 )

Description

Starts a dialog timer.

Note: Once started, the dialog timer will continually trigger the dialog's On Timer event on the interval that you specify. You can find the On Timer event tab in the script editor.

Parameters

Interval

(number) The timer interval in milliseconds.

ID

(number) The ID of the dialog timer to start.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


DialogEx.StopTimer

DialogEx.StopTimer (

number ID = 10 )

Description

Stops a dialog timer.

In other words, this action stops the On Timer event from being triggered by the dialog timer that was started with a DialogEx.StartTimer action using the same timer ID. Other dialog timers will continue to run until they are stopped.

Parameters

ID

(number) The ID of the dialog timer to stop.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


DLL.CallFunction

string DLL.CallFunction (

string Filename,

string FunctionName,

string Parameters = "",

number ReturnType = 0,

number CallConvention = 0 )

Description

Calls a function in a dynamically linked library (DLL). It can be used to extend AutoPlay's functionality with your own functions.

Warning: Calling DLLs is a fairly advanced thing to do and writing DLLs is best done with C or C++. We have tried to provide a large range of functionality with AutoPlay, so there aren't many reasons to use external DLL calls. Make sure that you know exactly what parameters the DLL function you are calling takes. Providing too many or not enough parameters can corrupt the application's memory so please do so at your own risk.

Parameters

Filename

(string) The path to the DLL file.

FunctionName

(string) The name of the function within the DLL.

Parameters

(string) The comma-separated list of parameters that you want to pass to the function.

Note: Place double-quotes around any parameters that you want passed as NULL-terminated string pointers. Only ANSI strings are supported, not Unicode. Parameters without quotes are passed as LONG integers.

All parameters are one-way only—they can be passed into the DLL function, but they cannot be evaluated after the function has been called. (In other words, these parameters are pass-by-value, not pass-by-reference.)

ReturnType

(number) The type of value returned from the function:

CONSTANT | VALUE | DESCRIPTION
DLL_RETURN_TYPE_INTEGER | 0 | AutoPlay will interpret the function's return value as a 16-bit integer (int).
DLL_RETURN_TYPE_LONG | 1 | AutoPlay will interpret the function's return value as a 32-bit integer (long).
DLL_RETURN_TYPE_STRING | 2 | AutoPlay will interpret the function's return value as a NULL-terminated string.

Note: If the function doesn't return a value (the function returns void), use DLL_RETURN_TYPE_LONG.

CallConvention

(number) The calling convention that AutoPlay will use when calling the DLL function:

CONSTANT | VALUE | DESCRIPTION
DLL_CALL_CDECL | 0 | Call the DLL function using the __cdecl calling convention.
DLL_CALL_STDCALL | 1 | Call the DLL function using the __stdcall calling convention.

Returns

(string) The value that was returned from the DLL function as a result of the function call. If an error occurs, a blank string "" is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Drive.Eject

Drive.Eject (

string Drive )

Description

Ejects a CD or DVD-ROM drive when given a valid drive letter.

Parameters

Drive

(string) The drive to eject. The first character of the string will be the drive letter used. Therefore "E", "E:"," E:\" and "E:\Myfile.txt" are all valid values if you want to eject the E: drive.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Drive.Enumerate

table Drive.Enumerate (

)

Description

Returns a numerically indexed table containing all of the drives on the user's system.

Parameters

None.

Returns

(table) A numerically indexed table containing the drive letters of all of the drives on the user's system. The stored values will be in a format such as A:\. If an error occurs, nil is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Drive.GetFreeSpace

number Drive.GetFreeSpace (

string Drive )

Description

Gets the amount of free disk space of a specific drive and returns it's numeric size in Megabytes.

Parameters

Drive

(string) The drive to query for disk space. The first character of the string will be the drive letter used. Therefore "C", "C:"," C:\" and "C:\Myfile.txt" are all valid Drive values.

Returns

(number) The amount of free disk space in Megabytes. If the specified drive is not valid or any other error occurs, -1 is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Drive.GetInformation

table Drive.GetInformation (

string Drive )

Description

Returns a table of information about a given drive.

Parameters

Drive

(string) The drive whose information you want. The drive must be in the format "C:" or "C:\".

Returns

(table) A table containing the specified drive's information, indexed by the following keys:

Note: If the target drive is a CD-ROM drive or floppy drive, there must be a disk in the drive for this action to work. If there is no disk in the drive, nil is returned.

KEY | TYPE | DESCRIPTION
Label | string | The volume label of the drive. You can access this value using tb.Label.
FileSystem | string | The type of file system on the drive. For example, "FAT32", "NTFS", etc. You can access this value using tb.FileSystem.
SerialNumber | number | The drive's serial number. You can access this value using tb.SerialNumber.
DisplayName | string | The description of the drive as it appears in Windows Explorer's My Computer view. You can access this value using tb.DisplayName.

If an error occurs, nil is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Drive.GetSize

number Drive.GetSize (

string Drive )

Description

Gets the disk size of a specific hard drive and returns it's numeric size in Megabytes.

Parameters

Drive

(string) The drive whose size you want. The first character of the string will be the drive letter used. Therefore "C", "C:"," C:\" and "C:\Myfile.txt" are all valid Drive values.

Returns

(number) The size of the drive in Megabytes. If the specified drive is not valid or any other error occurs, -1 is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Drive.GetType

number Drive.GetType (

string Drive )

Description

Gets the type of a specific drive.

Parameters

Drive

(string) The drive whose type you want. The first character of the string will be the drive letter used. Therefore "C", "C:"," C:\" and "C:\Myfile.txt" are all valid Drive values.

Returns

(number) The type of drive detected:

CONSTANT | VALUE | DESCRIPTION
DRIVE_UNKNOWN | 0 | The type cannot be determined.
DRIVE_NO_ROOT_DIR | 1 | The drive is either invalid or the drive does not exist.
DRIVE_REMOVABLE | 2 | The drive is a removable drive.
DRIVE_FIXED | 3 | The drive is a non-removable (fixed) drive.
DRIVE_REMOTE | 4 | The drive is a remote network drive.
DRIVE_CDROM | 5 | The drive is a CD-ROM or DVD-ROM drive.
DRIVE_RAMDISK | 6 | The drive is a RAM disk.

If an error occurs, -1 is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Drive.GetUsedSpace

number Drive.GetUsedSpace (

string Drive )

Description

Gets the amount of used disk space of a specific drive and returns it's numeric size in Megabytes.

Parameters

Drive

(string) The drive to query for used disk space. The first character of the string will be the drive letter used. Therefore "C", "C:"," C:\" and "C:\Myfile.txt" are all valid Drive values.

Returns

(number) The amount of used disk space in Megabytes. If the specified drive is not valid or any other error occurs, -1 is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


File.Copy

File.Copy (

string Source,

string Destination,

boolean Recurse = true,

boolean Overwrite = true,

boolean AbortOnFail = false,

boolean IncludeHiddenFiles = true,

function CallbackFunction = nil )

Description

Copies a file to another location.

Parameters

Source

(string) The path to the file that you want to copy. You can use the * and ? wildcards in this field to copy multiple files.

Destination

(string) The path to the destination folder or file that you want to copy to.

Warning: Any folders in the destination path must already exist when performing this action, or an error will result.

Tip: You can use a Folder.Create action to create a destination folder if necessary.

Recurse

(boolean) Whether to recurse through subfolders when a wildcard is used in the Source parameter:

VALUE | DESCRIPTION
true | Recurse. (Default)
false | Don't recurse.

Overwrite

(boolean) Whether to overwrite any files in the destination folder if they have the same names as the files being copied:

VALUE | DESCRIPTION
true | Copy the source files right over the destination files. (Default)
false | Don't copy a file if another file with the same name already exists in the destination folder.

AbortOnFail

(boolean) Whether to abort the copy operation if an error occurs:

VALUE | DESCRIPTION
true | Stop copying as soon as the first error occurs.
false | Continue copying files even if some files fail to copy. (Default)

IncludeHiddenFiles

(boolean) Whether to copy files that have the "hidden" or "system" attributes set:

VALUE | DESCRIPTION
true | Copy files even if they have the "hidden" or "system" attributes set.
false | Don't copy any files that have the "hidden" or "system" attributes set. (Default)

CallbackFunction

(function) The name of a function that will be called whenever progress is made in the copy operation. (You can use this callback function to display the progress of the copy operation in your own custom way.)

Note: If CallbackFunction is set to nil, then the progress information will be sent to the built-in status dialog, assuming it is currently visible. (You can show or hide the status dialog with a StatusDlg.Show or StatusDlg.Hide action.)

The callback function must be able to receive the following parameters:

Source

(string) The source path of the file being copied.

Destination

(string) The destination path for file being copied.

Copied

(number) The number of bytes copied so far.

Total

(number) The total bytes that will be copied.

FileCopied

(number) The number of bytes of the current file copied so far.

FileTotal

(number) The current file's total bytes that will be copied.

The callback function should return a boolean value (true or false) indicating whether the copy operation should continue:

VALUE | DESCRIPTION
true | Continue with the copy operation.
false | Stop the copy operation as soon as possible.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


File.Delete

File.Delete (

string Source,

boolean Recurse = false,

boolean AbortOnFail = false,

boolean IncludeHiddenFiles = true,

function CallbackFunction = nil )

Description

Deletes a file.

Parameters

Source

(string) The path to the file that you want to delete. You can use the * and ? wildcards in this field to delete multiple files.

Recurse

(boolean) Whether to recurse through subfolders when a wildcard is used in the Source parameter:

VALUE | DESCRIPTION
true | Recurse. (Default)
false | Don't recurse.

AbortOnFail

(boolean) Whether to abort the delete operation if an error occurs:

VALUE | DESCRIPTION
true | Stop deleting as soon as the first error occurs.
false | Continue deleting files even if some files fail to be deleted. (Default)

IncludeHiddenFiles

(boolean) Whether to delete files that have the "hidden" or "system" attributes set:

VALUE | DESCRIPTION
true | Delete files even if they have the "hidden" or "system" attributes set.
false | Don't delete any files that have the "hidden" or "system" attributes set. (Default)

CallbackFunction

(function) The name of a function that will be called whenever progress is made in the delete operation. (You can use this callback function to display the progress of the delete operation in your own custom way.)

Note: If CallbackFunction is set to nil, then the progress information will be sent to the built-in status dialog, assuming it is currently visible. (You can show or hide the status dialog with a StatusDlg.Show or StatusDlg.Hide action.)

The callback function must be able to receive the following parameters:

Source

(string) The source path of the file being deleted.

Deleted

(number) The number of bytes deleted so far.

Total

(number) The total bytes that will be deleted.

The callback function should return a boolean value (true or false) indicating whether the delete operation should continue:

VALUE | DESCRIPTION
true | Continue with the delete operation.
false | Stop the delete operation as soon as possible.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


File.DeleteOnReboot

File.DeleteOnReboot (

string Filename )

Description

Deletes a file on the next system reboot.

Parameters

Filename

(string) The path to the file to delete on the next reboot.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


File.DoesExist

boolean File.DoesExist (

string Filename )

Description

Returns true if a file exists at a specific location or false if it does not.

Parameters

Filename

(string) The path to the file.

Returns

(boolean) True if the file exists at the specified location, false if it doesn't or if an error occurs. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


File.ExploreFolder

File.ExploreFolder (

string Path,

number WindowMode = SW_SHOWNORMAL )

Description

Explores a folder on the user's system.

Note: This is the same as right-clicking on a folder in Windows and choosing Explore.

Parameters

Path

(string) The path to the folder that will be explored.

WindowMode

(number) The window mode to use:

CONSTANT | VALUE | DESCRIPTION
SW_SHOWNORMAL | 1 | Normal. (Default)
SW_MAXIMIZE | 3 | Maximized.
SW_MINIMIZE | 6 | Minimized.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


File.Find

table File.Find (

string Folder,

string Filename,

boolean Recurse = false,

boolean IncludeFolders = false,

function CallbackFunction = nil,

function FileFoundCallbackFunction = nil )

Description

Searches for files on the local system.

Parameters

Folder

(string) The path to the folder that you want to search in.

Filename

(string) The name of the file that you want to search for. You can use the * and ? wildcards in this field to search for files that match a specific pattern.

Recurse

(boolean) Whether to recurse through subfolders during the search:

VALUE | DESCRIPTION
true | Recurse.
false | Don't recurse. (Default)

IncludeFolders

(boolean) Whether to include (in the result) all folder paths that were encountered during the file search.

CallbackFunction

(function) The name of a function that will be called whenever progress is made in the find operation. (You can use this callback function to display the progress of the find operation in your own custom way.)

Note: If CallbackFunction is set to nil, then the progress information will be sent to the built-in status dialog, assuming it is currently visible. (You can show or hide the status dialog with a StatusDlg.Show or StatusDlg.Hide action.)

The callback function must be able to receive the following parameters:

CurrentPath

(string) The current path being searched.

The callback function should return a boolean value (true or false) indicating whether the find operation should continue:

VALUE | DESCRIPTION
true | Continue with the find operation.
false | Stop the find operation as soon as possible.

FileFoundCallbackFunction

(function) The name of a function that will be called whenever a file is found that matches the search criteria. You can use this function to exit the search operation based on the file that was found; for example, if you wanted to exit the search after the first file was found.

The callback function must be able to receive the following parameters:

FoundPath

(string) The path to the file that was found.

The callback function should return a boolean value (true or false) indicating whether the find operation should continue:

VALUE | DESCRIPTION
true | Continue with the find operation.
false | Stop the find operation as soon as possible.

Returns

(table) A table containing the paths to all of the files that were found. If no files were found or an error occurs, nil is returned. You can use Application.GetLastError to determine whether this action failed, and why.

Note: If IncludeFolders is true, the result will always include the folders that were encountered during the search.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


File.GetAttributes

table File.GetAttributes (

string Filename )

Description

Returns a table containing all of the attributes for a specific file.

Parameters

Filename

(string) The path to the file.

Returns

(table) A table containing the file attributes indexed by name. If the file does not exist or an error occurs, this action returns nil.

If the file exists, the following attributes will be stored in the table:

KEY | TYPE | DESCRIPTION
CreationDate | string | The date the file was created (Monday, May 26, 2003).
CreationDateISO | string | The date the file was created, in ISO format (2003-05-26T16:57:52).
AccessDate | string | The last date the file was accessed (Wednesday, June 18, 2003).
AccessDateISO | string | The last date the file was accessed, in ISO format (2003-06-18T15:11:44).
WriteDate | string | The last date the file was written to (Wednedsay, June 18, 2003).
WriteDateISO | string | The last date the file was written to, in ISO format (2003-06-18T14:55:05).
Directory | boolean | True if the directory attribute is set.
Archived | boolean | True if the archive file attribute is set.
ReadOnly | boolean | True if the read-only file attribute is set.
Compressed | boolean | True if the compressed file attribute is set.
System | boolean | True if the system file attribute is set.
Hidden | boolean | True if the hidden file attribute is set.
Temporary | boolean | True if the temporary file attribute is set.
Normal | boolean | True if none of the boolean attributes are set.

You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


File.GetCRC

number File.GetCRC (

string Filename )

Description

Returns the CRC value for a specific file.

Parameters

Filename

(string) The full path to the file.

Returns

(number) The numeric CRC value for the given file. If this action fails, -1 is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


File.GetDefaultViewer

string File.GetDefaultViewer (

string FileExtension )

Description

Returns the path to the default viewer application associated with a specific file extension.

Parameters

FileExtension

(string) The file extension (e.g. ".jpg" or ".txt").

Note: You can include or omit the dot (.) in the file extension. For example, ".pdf" and "pdf" will both work fine.

Returns

(string) The path to the default viewer application. If this action fails, a blank string "" is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


File.GetShortName

string File.GetShortName (

string Filename )

Description

Gets the "8.3" version of the full path to an existing file.

Note: If the file does not exist, this action will fail and an empty string will be returned.

Parameters

Filename

(string) The full path to the file.

Returns

(string) The "8.3" version of the given file path. If this action fails, a blank string "" is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


File.GetSize

number File.GetSize (

string Filename )

Description

Returns the size of a file in bytes.

Parameters

Filename

(string) The full path to the file.

Returns

(number) The size of the given file in bytes. If this action fails, -1 is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


File.GetVersionInfo

table File.GetVersionInfo (

string Filename )

Description

Returns a table containing the all of the version information for a specific file.

Note: Some files may not have any version information. Program executables and DLLs generally do, though.

Parameters

Filename

(string) The path to the file.

Returns

(table) A table containing the file version information indexed by name. If the version information could not be retrieved (for example, the file wasn't found), nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

If the file exists (and has version information in it), the following information will be stored in the table:

KEY | TYPE | DESCRIPTION
FileVersion | string | The file version, as it appears on the Version tab when you right-click on a file and choose Properties. ("6.0.0.1"). If this information cannot be determined, a blank string is returned.
ProductVersion | string | The version number for the product with which the file is distributed. ("1.0.0.6") If this information cannot be determined, a blank string is returned.
CompanyName | string | The company that produced the file. ("Super Dooper Inc.") If this information cannot be determined, a blank string is returned.
FileDescription | string | A short string describing the file. ("Doopernator program file for XP.") If this information cannot be determined, a blank string is returned.
InternalName | string | The internal name of the file, if one exists. ("Doopernator") If this information cannot be determined, a blank string is returned.
ProductName | string | The name of the product with which the file is distributed. ("Doopernator XP") If this information cannot be determined, a blank string is returned.
LegalCopyright | string | All copyright notices that apply to the file. ("Copyright (C) 2015 Super Dooper Inc.") If this information cannot be determined, a blank string is returned.
LegalTrademarks | string | All trademarks and registered trademarks that apply to the file. ("Doopernator is a registered trademark of Super Dooper Inc., so you better not try calling anything Doopernator or our lawyers will hunt you down like terriers chasing a baleful of mice.") If this information cannot be determined, a blank string is returned.
Comments | string | Additional information. ("For more information, visit www.doopernator.com.") If this information cannot be determined, a blank string is returned.
OriginalFilename | string | The original name of the file, not including a path. This lets an application determine whether a file has been renamed by the user. ("Doopernator.exe") If this information cannot be determined, a blank string is returned.
PrivateBuild | string | Information about the file if it's a private or "internal" version. ("Built by BIGDOG on SUPER22.") If this information cannot be determined, a blank string is returned.
SpecialBuild | string | How this version of the file differs from the standard version if it's a special build. ("Built to test the doopernator optimizer code on PCs running service pack 1 with DirectX 9.1.") If this information cannot be determined, a blank string is returned.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


File.Install

boolean File.Install (

string Filename,

string Destination,

number Overwrite = 0,

boolean CreateBackup = false,

boolean SharedSystem = false,

function ProgressCallbackFunction = nil,

function OverwriteCallbackFunction = nil )

Description

Installs a file onto the user's system.

Note: This is just like copying the file, but with a few more options.

Parameters

Filename

(string) The path to the file that you want to install.

Destination

(string) The full path and filename of the destination that you want to install to.

Overwrite

(number) Whether to overwrite a file in the destination folder if it has the same name as the file being installed:

CONSTANT | VALUE | DESCRIPTION
FILE_INSTALL_SAMEOLDER | 0 | Only overwrite the existing file if it's older than the file being installed, or if both files are the same age. (Default)
FILE_INSTALL_OLDER | 1 | Only overwrite the existing file if it's older than the file being installed.
FILE_INSTALL_ALWAYS | 2 | Always install the file, even if the existing file is newer.
FILE_INSTALL_NEVER | 3 | Never install the file, even if the existing file is older.
FILE_INSTALL_ASK | 4 | Ask the user if the existing file should be overwritten.
FILE_INSTALL_CALLBACK | 6 | Call the OverwriteCallbackFunction to handle the overwriting of the file in a custom way.

Warning: It is generally not a good idea to choose FILE_INSTALL_ALWAYS unless you are certain that this is what you want to do. Also, do not choose FILE_INSTALL_ASK unless you are confident that the user will have the knowledge to make such a decision. FILE_INSTALL_SAMEOLDER is generally the safest choice.

CreateBackup

(boolean) Whether to create a backup of the existing file (if there is one) during the installation:

VALUE | DESCRIPTION
true | Any existing file will be renamed to filename.bak. If filename.bak already exists, the file will be renamed to filename.bk1 instead, or filename.bk2, or filename.bk3, etc. The new file will only be installed after the existing one has been backed up.
false | Don't backup the existing file. (Default)

SharedSystem

(boolean) Whether the file is a system file that may be shared by multiple programs:

VALUE | DESCRIPTION
true | Keep a usage count for the file during installation and uninstallation to make sure it isn't removed when it's still needed.
false | The file isn't going to be shared, so don't keep a usage count. (Default)

ProgressCallbackFunction

(function) The name of a function that will be called whenever progress is made in the install operation. (You can use this callback function to display the progress of the install operation in your own custom way.)

Note: If ProgressCallbackFunction is set to nil, then the progress information will be sent to the built-in status dialog, assuming it is currently visible. (You can show or hide the status dialog with a StatusDlg.Show or StatusDlg.Hide action.)

The callback function must be able to receive the following parameters:

Source

(string) The source path of the file being installed.

Destination

(string) The destination path for file being installed.

Copied

(number) The number of bytes installed so far.

Total

(number) The total bytes that will be installed.

The callback function should return a boolean value (true or false) indicating whether the install operation should continue:

VALUE | DESCRIPTION
true | Continue with the install operation.
false | Stop the install operation as soon as possible.

OverwriteCallbackFunction

(function) The name of a function that will be called whenever an overwrite decision must be made. (You can use this callback function to handle the overwrite operation in your own custom way.)

Note: If OverwriteCallbackFunction is set to nil, then the FILE_INSTALL_SAMEOLDER overwrite option will be used.

The callback function must be able to receive the following parameters:

Source

(string) The source path of the file to install.

Destination

(string) The destination path for file being installed.

The callback function should return a boolean value (true or false) indicating whether or not to overwrite the file:

VALUE | DESCRIPTION
true | Overwrite the file.
false | Do not overwrite the file.

Returns

(boolean) True if the file was installed, or false if it wasn't or if an error occurs. You can use Application.GetLastError to determine whether this action failed, and why.


File.IsInUse

boolean File.IsInUse (

string Filename )

Description

Returns true if a file is in use at a specific location or false if it is not. If a file is in use it cannot be copied over or deleted.

Parameters

Filename

(string) The path to the file.

Returns

(boolean) True if the file is in use, or false if it is not, or if an error occurs. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


File.Move

File.Move (

string Source,

string Destination,

boolean Recurse = true,

boolean Overwrite = true,

boolean AbortOnFail = false,

boolean IncludeHiddenFiles = true,

function CallbackFunction = nil )

Description

Moves a file to another location.

Parameters

Source

(string) The path to the file that you want to move. You can use the * and ? wildcards in this field to move multiple files.

Destination

(string) The path to the destination folder or file that you want to move to.

Warning: Any folders in the destination path must already exist when performing this action, or an error will result.

Tip: You can use a Folder.Create action to create a destination folder if necessary.

Recurse

(boolean) Whether to recurse through subfolders when a wildcard is used in the Source parameter:

VALUE | DESCRIPTION
true | Recurse. (Default)
false | Don't recurse.

Overwrite

(boolean) Whether to overwrite any files in the destination folder if they have the same names as the files being moved:

VALUE | DESCRIPTION
true | Move the source files right over the destination files. (Default)
false | Don't move a file if another file with the same name already exists in the destination folder.

AbortOnFail

(boolean) Whether to abort the move operation if an error occurs:

VALUE | DESCRIPTION
true | Stop moving as soon as the first error occurs.
false | Continue moving files even if some files fail to move. (Default)

IncludeHiddenFiles

(boolean) Whether to move files that have the "hidden" or "system" attributes set:

VALUE | DESCRIPTION
true | Move files even if they have the "hidden" or "system" attributes set.
false | Don't move any files that have the "hidden" or "system" attributes set. (Default)

CallbackFunction

(function) The name of a function that will be called whenever progress is made in the move operation. (You can use this callback function to display the progress of the move operation in your own custom way.)

Note: If CallbackFunction is set to nil, then the progress information will be sent to the built-in status dialog, assuming it is currently visible. (You can show or hide the status dialog with a StatusDlg.Show or StatusDlg.Hide action.)

The callback function must be able to receive the following parameters:

Source

(string) The source path of the file being copied.

Destination

(string) The destination path for file being copied.

Copied

(number) The number of bytes copied so far.

Total

(number) The total bytes that will be copied.

FileCopied

(number) The number of bytes of the current file moved so far.

FileTotal

(number) The current file's total bytes that will be moved.

The callback function should return a boolean value (true or false) indicating whether the move application should continue:

VALUE | DESCRIPTION
true | Continue with the move operation.
false | Stop the move operation as soon as possible.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


File.MoveOnReboot

File.MoveOnReboot (

string Source,

string Destination )

Description

Moves a file from one location to another on the next system reboot.

Parameters

Source

(string) The full path to the file you want to move.

Destination

(string) The full destination path. This is the location you want the file moved to.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


File.Open

File.Open (

string Filename,

string WorkingFolder = "",

number WindowMode = SW_SHOWNORMAL )

Description

Opens a document file with its default viewer application.

Note: If this action fails with the "open" shell verb, it drops through and tries the default shell verb for the file type.

Parameters

Filename

(string) The path to the document. Click the browse button to select a file.

WorkingFolder

(string) The working folder to set for the document.

Note: This sets the current directory for the operation to something other than the folder that the file is in. Normally, you can just leave it blank.

WindowMode

(number) The window mode to use:

CONSTANT | VALUE | DESCRIPTION
SW_SHOWNORMAL | 1 | Normal. (Default)
SW_MAXIMIZE | 3 | Maximized.
SW_MINIMIZE | 6 | Minimized.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


File.OpenEmail

File.OpenEmail (

string EmailAddress,

number WindowMode = SW_SHOWNORMAL )

Description

Opens the user's default email client with an email address in the "To" field.

Note: If this action fails with the "open" shell verb, it will drop through and try using the default shell verb to open the email message.

Parameters

EmailAddress

(string) The email address that will appear in the "To" field.

Tip: You can automatically fill in the subject field, too. Just type "?subject=" (without quotes) after the email address, followed by the text that you want in the subject line. For example:

"joe@exampledomain.com?subject=Help"

WindowMode

(number) The window mode to use:

CONSTANT | VALUE | DESCRIPTION
SW_SHOWNORMAL | 1 | Normal. (Default)
SW_MAXIMIZE | 3 | Maximized.
SW_MINIMIZE | 6 | Minimized.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


File.OpenURL

File.OpenURL (

string URL,

number WindowMode = SW_SHOWNORMAL )

Description

Opens a local file or web-based URL in the user's default Web browser.

Note: This action uses the default shell verb for the URL.

Parameters

URL

(string) The URL for the web page, or the path to the local file. Click the browse button if you would like to select a local file.

Note: The "http://" prefix is optional, but it's generally a good idea to include it so the page will be located faster.

WindowMode

(number) The window mode to use:

CONSTANT | VALUE | DESCRIPTION
SW_SHOWNORMAL | 1 | Normal. (Default)
SW_MAXIMIZE | 3 | Maximized.
SW_MINIMIZE | 6 | Minimized.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


File.Print

File.Print (

string Filename )

Description

Prints a document on the user's default printer. This is the same as selecting "print" from the right-click context menu of the file you wish to print.

Note: The associated viewer application for the file type must support the "print" verb in order for this to work.

Parameters

Filename

(string) The path to the document.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


File.Rename

File.Rename (

string OldName,

string NewName )

Description

Renames a file on the user's system.

Parameters

OldName

(string) The full path to the file you want to rename.

NewName

(string) The full path including the new name for the file.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


File.Run

number File.Run (

string Filename,

string Args = "",

string WorkingFolder = "",

number WindowMode = SW_SHOWNORMAL,

boolean WaitForReturn = false )

Description

Runs an executable.

Note: If you are distributing on Windows Vista or later and have used a requested execution level other than "Require administrator," you should use the Shell.Execute action instead.

Parameters

Filename

(string) The path to the executable (.exe) file.

Args

(string) The command line arguments to pass to the executable.

WorkingFolder

(string) The working folder to set for the executable file.

Note: This sets the current directory for the operation to something other than the folder that the file is in. Normally, you can just leave it blank.

WindowMode

(number) The window mode to use:

CONSTANT | VALUE | DESCRIPTION
SW_SHOWNORMAL | 1 | Normal. (Default)
SW_MAXIMIZE | 3 | Maximized.
SW_MINIMIZE | 6 | Minimized.
SW_HIDE | 0 | Hide.

WaitForReturn

(boolean) Whether the application will wait until the executable has exited before continuing:

VALUE | DESCRIPTION
true | Wait.
false | Don't wait. (Default)

Returns

(number) The process return code if the WaitForReturn parameter is set to true. If WaitForReturn is set to false 0 is returned. You can use Application.GetLastError to determine whether this action failed, and why.

Note: On Windows Vista or later, if this action fails due to requiring elevation, error code 1045 is returned.

Note: If the specified process has not terminated, the termination status returned is STILL_ACTIVE. If the process has terminated, the termination status returned may be one of the following:

The exit value specified in the ExitProcess or TerminateProcess function.
The return value from the main or WinMain function of the process.
The exception value for an unhandled exception that caused the process to terminate.


File.RunAs

number File.RunAs (

string Filename,

string Args = "",

string WorkingFolder = "",

number WindowMode = SW_SHOWNORMAL,

boolean WaitForReturn = false,

string UserName = "",

string Password = "",

string Domain = "",

number LogonFlag = LOGON_NO_OPTION,

table CreationOptions = nil,

table ExtendedErrorInfo = nil )

Description

Runs an executable as a different user.

Parameters

Filename

(string) The path to the executable (.exe) file.

Args

(string) The command line arguments to pass to the executable.

WorkingFolder

(string) The working folder to set for the executable file.

Note: This sets the current directory for the operation to something other than the folder that the file is in. Normally, you can just leave it blank.

WindowMode

(number) The window mode to use:

CONSTANT | VALUE | DESCRIPTION
SW_SHOWNORMAL | 1 | Normal. (Default)
SW_MAXIMIZE | 3 | Maximized.
SW_MINIMIZE | 6 | Minimized.
SW_HIDE | 0 | Hide.

WaitForReturn

(boolean) Whether the application will wait until the executable has exited before continuing:

VALUE | DESCRIPTION
true | Wait.
false | Don't wait. (Default)

Note: This parameter must be set to true if you want to receive a process return code.

UserName

(string) The username that will be used to run the file. You must use the UPN format, (eg. user@DNS_domain_name) if you are logging onto a network domain and you don't specify a Domain parameter.

Password

(string) The password for the specified user name.

Domain

(string) The domain or server that contains an account database for the specified user. If you do not specify a domain, the UserName parameter must be in UPN format (eg. user@DNS_domain_name) if you are logging onto a network domain.

LogonFlag

(number) The logon flag to use. Choose from:

CONSTANT

VALUE

DESCRIPTION

LOGON_NO_OPTION

0

Do not logon with any profile. (Default)

LOGON_WITH_PROFILE

1

Log on, then load the user profile in the HKEY_USERS registry key. Loading the profile can be time-consuming, so it is best to use this value only if you must access the information in the HKEY_CURRENT_USER registry key.

LOGON_NETCREDENTIALS_ONLY

2

Log on, but use the specified credentials on the network only. This value can be used to create a process that uses a different set of credentials locally than it does remotely. This is useful in inter-domain scenarios where there is no trust relationship.

Note: The system does not validate the specified credentials. Therefore, the process can start, but it may not have access to network resources.

CreationOptions

(table) A table containing the creation options by name that control how the process is created. In the table, a value of true turns an option on, and a value of false turns the option off. If nil is passed, DefaultErrorMode, NewConsole and NewProcessGroup are set to true by default.

The following options can be set or unset in the table:

KEY | TYPE | DESCRIPTION
DefaultErrorMode | boolean | The new process does not inherit the error mode of the calling process. Instead, it gives the new process the current default error mode. You can pass false to inherit the error mode of the calling process, eg. {DefaultErrorMode=false}
NewConsole | boolean | Whether or not the new process has a new console, instead of inheriting the parent's console. eg. {NewConsole=false}
NewProcessGroup | boolean | Whether or not the new process is the root process of a new process group. The process group includes all processes that are descendants of this root process. eg. {NewProcessGroup=false}
SeparateWOWVDM | boolean | Note: This flag is only valid starting a 16-bit Windows-based application. Whether or not the new process runs in a private Virtual DOS Machine (VDM). By default, all 16-bit Windows-based applications run in a single, shared VDM. The advantage of running separately is that a crash only terminates the single VDM; any other programs running in distinct VDMs continue to function normally. Also, 16-bit Windows-based applications that run in separate VDMs have separate input queues, which means that if one application stops responding momentarily, applications in separate VDMs continue to receive input. eg. {SeparateWOWVDM=true}
Suspended | boolean | Whether or not the primary thread of the new process is created in a suspended state. eg.{Suspended=true}
UnicodeEnvironment | boolean | Whether or not the environment block uses Unicode characters. Otherwise, the environment block uses ANSI characters. eg. {UnicodeEnvironment=true}

ExtendedErrorInfo

(table) A table that will be filled with extended error information indexed by the following keys:

KEY | TYPE | DESCRIPTION
ErrorCode | number | The Windows error code.
ErrorMsg | string | The Windows error message.

Note: Since this parameter requires a table, you must first create the table before the action is called, for example, TableName={};

Returns

(number) The process return code if the WaitForReturn parameter is set to true. If WaitForReturn is set to false 0 is returned. You can use Application.GetLastError to determine whether this action failed, and why.

Note: The termination status returned may be one of the following:

The exit value specified in the ExitProcess or TerminateProcess function.
The return value from the main or WinMain function of the process.
The exception value for an unhandled exception that caused the process to terminate.


File.RunOnReboot

File.RunOnReboot (

string Filename,

string Args = "" )

Description

Runs an executable the next time the system is rebooted.

Parameters

Filename

(string) The path to the executable (.exe) file.

Args

(string) The command line arguments to pass to the executable.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


File.SetAttributes

File.SetAttributes (

string Filename,

table Attributes )

Description

Sets the attributes of a file.

Parameters

Filename

(string) The path to the file.

Attributes

(table) A table containing the file attributes that you want to modify, indexed by name. In the table, a value of true turns an attribute on, and a value of false turns the attribute off.

The following attributes can be set or unset in the table:

KEY | TYPE | DESCRIPTION
Archived | boolean | Sets or unsets the archive file attribute.
ReadOnly | boolean | Sets or unsets the read-only file attribute.
Compressed | boolean | Sets or unsets the compressed file attribute.
System | boolean | Sets or unsets the system file attribute.
Hidden | boolean | Sets or unsets the hidden file attribute.
Temporary | boolean | Sets or unsets the temporary file attribute.
Normal | boolean | When used alone (when it is the only attribute in the table), setting Normal to true will unset all of the other attributes. Otherwise, it is simply ignored.

Note: If there are any other keys in the table, they will be ignored.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


File.SetPermissions

number File.SetPermissions (

string Filename,

string UserSID = SID_EVERYBODY,

number AccessMode = SET_ACCESS,

number Permissions = ALL_PERMISSIONS,

number Inheritance = SUB_CONTAINERS_AND_OBJECTS_INHERIT )

Description

Sets the permissions of a file or folder.

Parameters

Filename

(string) The full path to the file or folder whose permissions will be set.

UserSID

(string) The SID of the user or group whose permissions will be altered. You may use any valid string or choose from the following built-in SID constants:

Tip: You can also use the System.GetUserSID action to get the SID value from a username on the local computer.

CONSTANT | VALUE | DESCRIPTION
SID_NULL | "S-1-0" | A NULL authority.
SID_NOBODY | "S-1-0-0" | Nobody.
SID_EVERYBODY | "S-1-1-0" | Everyone, a group that contains all users except for anonymous users on all systems greater than or equal to Windows XP SP2.
SID_CREATOR_AUTHORITY | "S-1-3" | An identifier authority representing the creator authority.
SID_CREATOR_OWNER | "S-1-3-0" | The current owner of the file object.
SID_NETWORK | "S-1-5-2" | A group containing all users that have logged on using a network connection.
SID_AUTHENTICATED_USERS | "S-1-5-11" | A group containing all users that were authenticated when they logged on.
SID_ADMINISTRATORS | "S-1-5-32-544" | The built-in administrators group.
SID_USERS | "S-1-5-32-545" | The built-in users group.
SID_GUESTS | "S-1-5-32-546" | The built-in guests group.
SID_POWER_USERS | "S-1-5-32-547" | The built-in power users group.
SID_LAUNCH_USER_USER | "LaunchUser" | The user who launched the setup. This is the same user whose information is used to populate the launch user variables.

AccessMode

(number) Controls how the permissions will be applied. Choose from:

Note: This value can also be any of the available access modes available in the ACCESS_MODE enumeration: http://msdn.microsoft.com/en-us/library/aa374899(VS.85).aspx

CONSTANT | VALUE | DESCRIPTION
NOT_USED_ACCESS | 0 | Not used.
GRANT_ACCESS | 1 | Combines the new permissions with the existing permissions for the user or group.
SET_ACCESS | 2 | Set the permissions for the user or group overriding any existing information.
DENY_ACCESS | 3 | Deny the user the permissions specified, this will not override any existing denied rights.
REVOKE_ACCESS | 4 | Remove any existing privileges for the user or group.

Permissions

(number) The permissions that will be used by the actions. Choose from one of the following or specify your own valid value:

Note: Please see: http://msdn.microsoft.com/en-us/library/aa446627%28VS.85%29.aspx for more information.

CONSTANT | VALUE | DESCRIPTION
READ_PERMISSIONS | 1179785 | Read permissions.
WRITE_PERMISSIONS | 1179926 | Write permissions.
EXECUTE_PERMISSIONS | 538050697 | Read and Execute permissions.
ALL_PERMISSIONS | 268435456 | Full control permissions.
MODIFY_PERMISSIONS | 1245631 | Modify (includes Read, Write, and Execute) permissions.
READ_WRITE_PERMISSIONS | 1180063 | Read and Write permissions.
READ_WRITE_EXECUTE_PERMISSIONS | 538050975 | Read, Write, and Execute permissions.

Inheritance

(number) The inheritance rules for the permissions that will be applied. Choose from, or specify a valid value:

Note: Please see: http://msdn.microsoft.com/en-us/library/aa446627%28VS.85%29.aspx for more information.

CONSTANT | VALUE | DESCRIPTION
NO_INHERITANCE | 0 | The permissions are not inheritable.
SUB_OBJECTS_ONLY_INHERIT | 1 | Only non-container objects within the file object will inherit the permissions.
SUB_CONTAINERS_ONLY_INHERIT | 2 | Only container objects within the file object will inherit the permissions.
SUB_CONTAINERS_AND_OBJECTS_INHERIT | 3 | Both objects and containers that are contained by the file object will inherit the permissions.
INHERIT_NO_PROPAGATE | 4 | Meaning to be determined by Microsoft.
INHERIT_ONLY | 8 | Meaning to be determined by Microsoft.

Returns

(number) Returns 0 if successful. If this action fails, a non-zero error code will be returned defined in the Microsoft's WinError.h header file. For more information on the possible error codes please see: http://msdn.microsoft.com/en-us/library/ms819772.aspx.


Flash.CallFunction

string Flash.CallFunction (

string ObjectName,

string XMLRequest )

Description

Calls a Flash actionscript function using Flash's external API (ExternalInterface class) and returns an XML formatted string result.

Note: This action requires Flash version 8.0 or later to be installed on the target system.

Parameters

ObjectName

(string) The name of the Flash object.

XMLRequest

(string) The XML formatted string containing the Flash actionscript function to call. See Flash's actionscript documentation for more information.

Example: "<invoke name=\"functionName\" returntype=\"xml\"><arguments><string>My sample argument</string></arguments></invoke>"

Returns

(string) The XML formatted string returned from the Flash actionscript function. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Flash.GetFilename

string Flash.GetFilename (

string ObjectName )

Description

Returns the path to the file that is currently loaded in a Flash object.

Parameters

ObjectName

(string) The name of the Flash object.

Returns

(string) The path to the file currently loaded into the Flash object. If an error occurs, a blank string "" will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Flash.GetFlashVariable

string Flash.GetFlashVariable (

string ObjectName,

string FlashVariable )

Description

Returns the value of a Flash variable in a Flash object's actionscript code.

Parameters

ObjectName

(string) The name of the Flash object.

FlashVariable

(string) The name of the variable (in the Flash object's actionscript code).

Returns

(string) The value of the variable within the Flash object. If an error occurs, a blank string "" will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Flash.GetPos

table Flash.GetPos (

string ObjectName )

Description

Returns the X and Y page or dialog coordinates of a Flash object in pixels. This coordinate refers to the upper left hand corner of the object's bounding box relative to the page or dialog.

Note: The upper left hand corner of a page or dialog has X and Y coordinates of 0.

Parameters

ObjectName

(string) The name of the Flash object.

Returns

(table) A table containing the object's current coordinates, indexed by values X and Y. If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Flash.GetProperties

table Flash.GetProperties (

string ObjectName )

Description

Returns a table containing the properties of a flash object.

Parameters

ObjectName

(string) The name of the flash object.

Returns

(table) A table containing the flash object's properties, indexed by the following keys:

KEY

TYPE

DESCRIPTION

ObjectName

string

The name of the flash object.

FlashFile

string

The currently loaded flash file.

Alignment

number

How the flash movie is aligned to the flash object:

CONSTANT | VALUE | DESCRIPTION
ALIGN_DEFAULT | 0 | Default.
ALIGN_TOP | 1 | Align the flash movie to the top of the flash object.
ALIGN_LEFT | 2 | Align the flash movie to the left of the flash object.
ALIGN_BOTTOM | 3 | Align the flash movie to the bottom of the flash object.
ALIGN_RIGHT | 4 | Align the flash movie to the right of the flash object.
ALIGN_TOP_LEFT | 5 | Align the flash movie to the top-left of the flash object.
ALIGN_TOP_RIGHT | 6 | Align the flash movie to the top-right of the flash object.
ALIGN_BOTTOM_LEFT | 7 | Align the flash movie to the bottom-left of the flash object.
ALIGN_BOTTOM_RIGHT | 8 | Align the flash movie to the bottom-right of the flash object.

Menu

number

The right-click context menu:

CONSTANT | VALUE | DESCRIPTION
MENU_STANDARD | 0 | Standard context menu.
MENU_FULL | 1 | Full context menu.

Quality

number

The quality that the current flash movie is displayed at:

CONSTANT | VALUE | DESCRIPTION
QUALITY_LOW | 0 | Gives priority to playback speed over appearance. Anti-aliasing is turned off.
QUALITY_HIGH | 1 | Gives priority to appearance over playback speed. Anti-aliasing is turned on.
QUALITY_AUTO_LOW | 2 | Emphasizes speed at first, but improves appearance whenever possible. Playback begins with anti-aliasing turned off; if the Player determines that the system can handle it, it turns anti-aliasing on.
QUALITY_AUTO_HIGH | 3 | Emphasizes speed and appearance equally at first, but sacrifices appearance for the sake of speed if necessary. Playback begins with anti-aliasing turned on, but it will be turned off if the frame rate drops below an acceptable level.

ScalingMode

number

The style of the flash object:

CONSTANT | VALUE | DESCRIPTION
SHOW_ALL | 0 | The entire movie is visible in the area defined by the object's bounding box without distortion, while maintaining the original aspect ratio of the movie. Borders may appear on two sides of the movie.
NO_BORDER | 1 | The movie is scaled to fill the area defined by the object's bounding box without distortion, while maintaining the original aspect ratio of the movie. Any part of the movie that falls outside the area defined by the object's bounding box is cropped.
EXACT_FIT | 2 | The movie is resized to fill the area defined by the object's bounding box, ignoring the movie's original aspect ratio. The movie may appear distorted as a result.

OverrideBackground

boolean

True if the color specified in BGOverrideColor should override the background of the flash movie, false if it should not.

BGOverrideColor

number

The color being used to replace the flash background with if OverrideBackground is set to true.

DeviceFont

boolean

If true, the flash object will substitute installed system fonts for any fonts used in the Flash movie. Any text whose fonts are substituted will appear aliased (rough) regardless of the Quality setting. If the necessary fonts are not installed, the text will be rendered in the normal anti-aliased (smooth) way.

AutoStart

boolean

True if the flash movie will automatically begin to play as soon as the page or dialog is opened, false if it is not.

Loop

boolean

True if the movie will loop, false if it will not.

Enabled

boolean

True if the flash object is enabled, false if it is not.

Visible

boolean

True if the flash object is visible, false if it is not.

X

number

The horizontal position (in pixels) of the top left corner of the flash object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has an X value of 0

Y

number

The vertical position (in pixels) of the top left corner of the flash object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has a Y value of 0

Width

number

The width (in pixels) of the flash object.

Height

number

The height (in pixels) of the flash object.

TooltipText

string

The mouseover tooltip of the flash object.

ResizeLeft

boolean

True if the left side of the object will move when the application is resized, false if it is not.

ResizeRight

boolean

True if the right side of the object will move when the application is resized, false if it is not.

ResizeTop

boolean

True if the top of the object will move when the application is resized, false if it is not.

ResizeBottom

boolean

True if the bottom of the object will move when the application is resized, false if it is not.

WindowHandle

number

The integer value that represents the object's window. (Commonly referred to as an hWnd.)

If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Flash.GetSize

table Flash.GetSize (

string ObjectName )

Description

Returns the pixel dimensions of a Flash object.

Parameters

ObjectName

(string) The name of the Flash object.

Returns

(table) A table containing the object's pixel dimensions, indexed by values "Width" and "Height". If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Flash.GetState

number Flash.GetState (

string ObjectName )

Description

Returns the current state of a Flash object.

Parameters

ObjectName

(string) The name of the Flash object.

Returns

(number) The current state of the Flash object:

CONSTANT | VALUE | DESCRIPTION
FLASH_LOADING | 0 | Loading.
FLASH_UNINITIALIZED | 1 | Uninitialized.
FLASH_LOADED | 2 | Loaded.
FLASH_INTERACTIVE | 3 | Interactive.
FLASH_COMPLETE | 4 | Complete.

If an error occurs, -1 will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Flash.IsEnabled

boolean Flash.IsEnabled (

string ObjectName )

Description

Returns true if a specific Flash object is enabled, or false if it's disabled.

Note: When a Flash object is disabled, it doesn't respond to user interaction at all.

Parameters

ObjectName

(string) The name of the Flash object.

Returns

(boolean) True if the Flash object is enabled, false if it is disabled. If an error occurs, false will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Flash.IsVisible

boolean Flash.IsVisible (

string ObjectName )

Description

Returns true if a specific Flash object is visible, and false if it isn't.

Parameters

ObjectName

(string) The name of the Flash object.

Returns

(boolean) True if the Flash object is visible, false if it's invisible. If an error occurs, false will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Flash.Load

Flash.Load (

string ObjectName,

string Filename,

boolean PlayAutomatic = false,

boolean Loop = false )

Description

Loads a Flash file into a Flash object.

Parameters

ObjectName

(string) The name of the Flash object.

Filename

(string) The path to the Flash file. Click the browse button to select a file.

PlayAutomatic

(boolean) Whether to automatically start playing the Flash file after it loads:

VALUE | DESCRIPTION
true | Automatically start playing the file.
false | Don't play the file until told to do so. (Default)

Loop

(boolean) Whether to make the Flash file loop when it reaches the end:

VALUE | DESCRIPTION
true | Loop.
false | Don't loop. (Default)

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Flash.Play

Flash.Play (

string ObjectName )

Description

Plays the Flash file currently loaded in a Flash object.

Parameters

ObjectName

(string) The name of the Flash object.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Flash.Seek

Flash.Seek (

string ObjectName,

number SeekType = SEEK_BEGINNING,

number SeekFrame = 0 )

Description

Seeks to a position in a Flash file in a Flash object.

Parameters

ObjectName

(string) The name of the Flash object.

SeekType

(number) The seek type to use:

CONSTANT | VALUE | DESCRIPTION
SEEK_BEGINNING | 0 | Beginning. (Default)
SEEK_END | 1 | End.
SEEK_FORWARD | 2 | Forward.
SEEK_BACKWARD | 3 | Backward.
SEEK_SPECIFIC | 4 | Specific time.

SeekFrame

(number) The frame to seek to (or the number of frames to seek by). Defaults to 0.

Note: Only used if SeekType is 2, 3, or 4.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Flash.SetEnabled

Flash.SetEnabled (

string ObjectName,

boolean Enabled = true )

Description

Sets the enabled/disabled state of a Flash object.

Note: When a Flash object is disabled, it doesn't respond to the user at all.

Parameters

ObjectName

(string) The name of the Flash object.

Enabled

(boolean) Whether to make the Flash object enabled or disabled:

VALUE | DESCRIPTION
true | Enabled. (Default)
false | Disabled.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Flash.SetFlashVariable

Flash.SetFlashVariable (

string ObjectName,

string FlashVariable,

string Value )

Description

Sets the value of a Flash variable in a Flash object's actionscript code.

Parameters

ObjectName

(string) The name of the Flash object.

FlashVariable

(string) The name of the variable (in the Flash object's actionscript code) you wish to set.

Value

(string) The value to assign.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Flash.SetPos

Flash.SetPos (

string ObjectName,

number X,

number Y )

Description

Sets the X and Y pixel coordinates of a Flash object relative to the page or dialog.

Parameters

ObjectName

(string) The name of the Flash object.

X

(number) The new X pixel coordinate (horizontal position) to set for the Flash object. This is the X coordinate of the upper left hand corner of the object's bounding box relative to the page or dialog.

Y

(number) The new Y pixel coordinate (vertical position) to set for the Flash object. This is the Y coordinate of the upper left hand corner of the object's bounding box relative to the page or dialog.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Flash.SetProperties

Flash.SetProperties (

string ObjectName,

table Properties )

Description

Sets the properties of a flash object.

Parameters

ObjectName

(string) The name of the flash object.

Properties

(table) A table containing the flash object's properties indexed by the following keys:

KEY

TYPE

DESCRIPTION

FlashFile

string

The flash file to load.

Alignment

number

How the flash movie should be aligned to the flash object:

CONSTANT | VALUE | DESCRIPTION
ALIGN_DEFAULT | 0 | Default.
ALIGN_TOP | 1 | Align the flash movie to the top of the flash object.
ALIGN_LEFT | 2 | Align the flash movie to the left of the flash object.
ALIGN_BOTTOM | 3 | Align the flash movie to the bottom of the flash object.
ALIGN_RIGHT | 4 | Align the flash movie to the right of the flash object.
ALIGN_TOP_LEFT | 5 | Align the flash movie to the top-left of the flash object.
ALIGN_TOP_RIGHT | 6 | Align the flash movie to the top-right of the flash object.
ALIGN_BOTTOM_LEFT | 7 | Align the flash movie to the bottom-left of the flash object.
ALIGN_BOTTOM_RIGHT | 8 | Align the flash movie to the bottom-right of the flash object.

Menu

number

The right-click context menu:

CONSTANT | VALUE | DESCRIPTION
MENU_STANDARD | 0 | Standard context menu.
MENU_FULL | 1 | Full context menu.

Quality

number

The quality that the current flash movie is displayed at:

CONSTANT | VALUE | DESCRIPTION
QUALITY_LOW | 0 | Gives priority to playback speed over appearance. Anti-aliasing is turned off.
QUALITY_HIGH | 1 | Gives priority to appearance over playback speed. Anti-aliasing is turned on.
QUALITY_AUTO_LOW | 2 | Emphasizes speed at first, but improves appearance whenever possible. Playback begins with anti-aliasing turned off; if the Player determines that the system can handle it, it turns anti-aliasing on.
QUALITY_AUTO_HIGH | 3 | Emphasizes speed and appearance equally at first, but sacrifices appearance for the sake of speed if necessary. Playback begins with anti-aliasing turned on, but it will be turned off if the frame rate drops below an acceptable level.

ScalingMode

number

The style of the flash object:

CONSTANT | VALUE | DESCRIPTION
SHOW_ALL | 0 | Makes the entire movie visible in the area defined by the object's bounding box without distortion, while maintaining the original aspect ratio of the movie. Borders may appear on two sides of the movie.
NO_BORDER | 1 | Scales the movie to fill the area defined by the object's bounding box without distortion, while maintaining the original aspect ratio of the movie. Any part of the movie that falls outside the area defined by the object's bounding box will be cropped.
EXACT_FIT | 2 | Resizes the movie to fill the area defined by the object's bounding box, ignoring the movie's original aspect ratio. The movie may appear distorted as a result.

OverrideBackground

boolean

Set to true to override the background color of the Flash file (.swf). This allows you to replace the background color in your Flash file with something more appropriate.

BGOverrideColor

number

The color to use to replace the flash background with if OverrideBackground is set to true.

DeviceFont

boolean

Set to true to substitute installed system fonts for any fonts used in the Flash movie. Any text whose fonts are substituted will appear aliased (rough) regardless of the Quality setting. If the necessary fonts are not installed, the text will be rendered in the normal anti-aliased (smooth) way.

AutoStart

boolean

Set to true to start playing the Flash movie automatically (as soon as the page or dialog is opened).

Loop

boolean

Set to true to automatically begin playing the movie from the beginning again whenever the Flash movie reaches the end.

Enabled

boolean

True if the flash object should be enabled, false if it should not be.

Visible

boolean

True if the flash object should be visible, false if it should not be.

X

number

The horizontal position (in pixels) of the top left corner of the flash object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has an X value of 0

Y

number

The vertical position (in pixels) of the top left corner of the flash object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has a Y value of 0

Width

number

The width (in pixels) of the flash object.

Height

number

The height (in pixels) of the flash object.

ResizeLeft

boolean

True if the left side of the object should move when the application is resized, false if it should not.

ResizeRight

boolean

True if the right side of the object should move when the application is resized, false if it should not.

ResizeTop

boolean

True if the top of the object should move when the application is resized, false if it should not.

ResizeBottom

boolean

True if the bottom of the object should move when the application is resized, false if it should not.

TooltipText

string

The mouseover tooltip of the flash object. Tip: If you want a "&" character in the text, you must enter "&&&".

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Flash.SetReturnValue

Flash.SetReturnValue (

string ObjectName,

string XMLReturnValue )

Description

Returns an XML formatted string as the result of a Flash object's actionscript function call through Flash's external API (ExternalInterface class). This action is normally used on the Flash object's On FlashCall event.

Note: This action requires Flash version 8.0 or later to be installed on the target system.

Parameters

ObjectName

(string) The name of the Flash object.

XMLReturnValue

(string) The XML formatted string containing the result to return. See Flash's actionscript documentation for more information on available data types and formatting.

Example: "<string>Sample string to return</string>"

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Flash.SetSize

Flash.SetSize (

string ObjectName,

number Width,

number Height )

Description

Sets the size of a Flash object.

Parameters

ObjectName

(string) The name of the Flash object.

Width

(number) The new width of the Flash object in pixels.

Height

(number) The new height of the Flash object in pixels.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Flash.SetVisible

Flash.SetVisible (

string ObjectName,

boolean Visible = true )

Description

Sets the visibility of a Flash object.

Note: This action simply controls the visibility of the object and does not affect its play state. For example, if you hide an object while it is playing, it will continue to play even though it's not visible.

Parameters

ObjectName

(string) The name of the Flash object.

Visible

(boolean) Whether to make the Flash object visible or invisible:

VALUE | DESCRIPTION
true | Visible. (Default)
false | Invisible.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Flash.Stop

Flash.Stop (

string ObjectName )

Description

Stops playing the Flash file in a Flash object.

Parameters

ObjectName

(string) The name of the Flash object.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Folder.Create

Folder.Create (

string Folder )

Description

Creates a new folder on the user's system.

Parameters

Folder

(string) The path to the folder.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Folder.Delete

Folder.Delete (

string Folder )

Description

Deletes a folder from the user's system.

Note: The folder must be empty to be deleted.

Parameters

Folder

(string) The path to the folder.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Folder.DeleteTree

Folder.DeleteTree (

string FolderName,

function CallbackFunction = nil )

Description

Deletes a folder and all of its contents (files and subfolders) from the user's system.

Parameters

FolderName

(string) The path to the folder.

CallbackFunction

(function) The name of a function that will be called whenever progress is made in the delete operation. (You can use this callback function to display the progress of the delete operation in your own custom way.)

Note: If CallbackFunction is set to nil, then the progress information will be sent to the built-in status dialog, assuming it is currently visible. (You can show or hide the status dialog with a StatusDlg.Show or StatusDlg.Hide action.)

The callback function must be able to receive the following parameters:

Source

(string) The source path of the file being deleted.

Deleted

(number) The number of files deleted so far.

Total

(number) The total number of files that will be deleted.

The callback function should return a boolean value (true or false) indicating whether the delete operation should continue:

VALUE | DESCRIPTION
true | Continue with the delete operation.
false | Stop the delete operation as soon as possible.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Folder.DoesExist

boolean Folder.DoesExist (

string Folder )

Description

Returns true if a specific folder exists and false if it doesn't.

Parameters

Folder

(string) The path to the folder.

Returns

(boolean) True if the folder exists, false if it doesn't or an error occurs. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Folder.Find

table Folder.Find (

string StartFolder,

string Folder,

boolean Recurse = false,

function CallbackFunction = nil )

Description

Searches for folders on the local system.

Parameters

StartFolder

(string) The path to the folder that you want to search in.

Folder

(string) The name of the folder that you want to search for. You can use the * and ? wildcards in this field to search for folders that match a specific pattern.

Recurse

(boolean) Whether to recurse through subfolders during the search:

VALUE | DESCRIPTION
true | Recurse.
false | Don't recurse. (Default)

CallbackFunction

(function) The name of a function that will be called whenever progress is made in the find operation. (You can use this callback function to display the progress of the find operation in your own custom way.)

Note: If CallbackFunction is set to nil, then the progress information will be sent to the built-in status dialog, assuming it is currently visible. (You can show or hide the status dialog with a StatusDlg.Show or StatusDlg.Hide action.)

The callback function must be able to receive the following parameters:

CurrentPath

(string) The current path being searched.

The callback function should return a boolean value (true or false) indicating whether the find operation should continue:

VALUE | DESCRIPTION
true | Continue with the find operation.
false | Stop the find operation as soon as possible.

Returns

(table) A table containing the paths to all of the folders that were found. If no folders were found or the action fails, nil is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Folder.GetCurrent

string Folder.GetCurrent (

)

Description

Returns the "current folder" (working directory) for the application.

Parameters

None.

Returns

(string) The path to the "current folder" (working directory) for the application. If the current folder cannot be determined, a blank string "" is returned.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Folder.Rename

Folder.Rename (

string OldName,

string NewName )

Description

Renames a folder on the user's system.

Parameters

OldName

(string) The path to the folder you want to rename.

NewName

(string) The new path to the folder. This must include the full path and folder name.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Folder.SetCurrent

Folder.SetCurrent (

string Folder )

Description

Sets the application's "current folder" (working directory).

Parameters

Folder

(string) The path to the folder.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


FTPWI.Download

FTPWI.Download (

string URL,

string Filename,

string Username = "anonymous",

string Password = "guest@",

number Mode = MODE_BINARY,

number Timeout = 20,

number Port = 21,

boolean PassiveMode = true,

function CallbackFunction = nil )

Description

Downloads a file from an FTP site using FTP (file transfer protocol).

Parameters

URL

(string) The full ftp address to the file you want to download. For example, ftp://ftp.myftpsite.com/updates/myfile.txt.

Filename

(string) The destination path and filename of the file you want to download. For example, C:\\MyFolder\\patch.zip.

Username

(string) The name to use to log into the FTP site. The default for anonymous FTP is "anonymous".

Password

(string) The password for the FTP site that goes with the FTP Username. For anonymous FTP, use your email address or the password default "guest@".

Mode

(number) The mode you want to use to save the file. Choose from:

CONSTANT | VALUE | DESCRIPTION
MODE_BINARY | 0 | Save the file exactly as downloaded. (Default)
MODE_TEXT | 1 | Convert the file from Unix to Windows text mode, if necessary.

Timeout

(number) The maximum time in seconds that the action will wait for a response after attempting to connect. The default value is 20.

Note: Timeout values are interpreted in multiple ways during client server communication. As a result the actual timeout used by the connection may differ from the value specified.

Port

(number) The port to connect to. In most cases the default value of 21 is standard for FTP.

PassiveMode

(boolean) Use passive/firewall mode when downloading the file. Passive mode (also known as "firewall mode") is required whenever you need to transfer files to or from an FTP server from behind a firewall. Passing the default value true enables passive mode and passing false disables it.

Normally, your computer makes a connection to an FTP server, and the FTP server responds by opening a connection back to your computer. This return connection won't work if your computer can't be reached directly from the Internet. In passive mode, both connections are made from your computer, so the FTP server doesn't have to do any connecting—it just waits passively for your computer to make both of the connections to it.

Most servers support passive mode connections, so it's generally best to leave this setting enabled.

CallbackFunction

(function) The name of a function that will be called whenever progress is made in the download operation. (You can use this callback function to display the progress of the download in your own custom way.)

Note: If CallbackFunction is set to nil, then the progress information will be sent to the built-in status dialog, assuming it is currently visible. (You can show or hide the status dialog with a StatusDlg.Show or StatusDlg.Hide action.)

The callback function must be able to receive the following parameters:

BytesRead

(number) The number of bytes that have been downloaded so far.

FileSize

(number) The file size in bytes or 0 if the file size could not be retrieved from the server.

TransferRate

(number) The current transfer rate in Kilobytes per second.

SecondsLeft

(number) The estimated number of seconds left in the download.

SecondsLeftFormat

(string) The estimated number of seconds left formatted as a string in the form of: ""MM:SS".

Message

(string) Either a blank string ("") or an information message being sent by the server, such as "Resolving host name" or "Connecting to Server."

Note: If this parameter is not a blank string, it means that it is in a busy state, either before the download has begun, or at the end of the download. In this case all other parameters will be ignored.

The callback function should return a boolean value (true or false) indicating whether the download should continue:

VALUE | DESCRIPTION
true | Continue with the file download.
false | Stop the file download as soon as possible.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


FTPWI.GetErrorInfo

table FTPWI.GetErrorInfo (

)

Description

Retrieves FTP specific information about the last error that occurred.

For example, if you perform an FTPWI.Download and an error occurs, you can use this action to retrieve FTP information about that error.

Parameters

None.

Returns

(table) A table containing the FTP error information indexed by the following keys:

KEY | TYPE | DESCRIPTION
Number | number | The WinInet error code.
Message | string | The WinInet error string associated with the error code.

You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the action editor, you can use this field to specify a variable that the return value will be stored in.


FTPWI.GetFileSize

number FTPWI.GetFileSize (

string URL,

string Username = "anonymous",

string Password = "guest@",

number Mode = MODE_BINARY,

number Timeout = 20,

number Port = 21,

boolean PassiveMode = true,

function CallbackFunction = nil )

Description

Gets the size of a file (in bytes) located on an FTP site.

Parameters

URL

(string) The full ftp address to the file you want the size of. For example, ftp://ftp.myftpsite.com/updates/myfile.txt.

Username

(string) The name to use to log into the FTP site. The default for anonymous FTP is "anonymous".

Password

(string) The password for the FTP site that goes with the FTP Username. For anonymous FTP, use your email address or the password default "guest@".

Mode

(number) The mode you want to use to access the file. Choose from:

CONSTANT | VALUE | DESCRIPTION
MODE_BINARY | 0 | Save the file exactly as downloaded. (Default)
MODE_TEXT | 1 | Convert the file from Unix to Windows text mode, if necessary.

Note: This parameter is mainly present for consistency between FTPWI actions.

Timeout

(number) The maximum time in seconds that the action will wait for a response after attempting to connect. The default value is 20.

Note: Timeout values are interpreted in multiple ways during client server communication. As a result the actual timeout used by the connection may differ from the value specified.

Port

(number) The port to connect to. In most cases the default value of 21 is standard for FTP.

PassiveMode

(boolean) Use passive/firewall mode when accessing the file. Passive mode (also known as "firewall mode") is required whenever you need to transfer files to or from an FTP server from behind a firewall. Passing the default value true enables passive mode and passing false disables it.

Normally, your computer makes a connection to an FTP server, and the FTP server responds by opening a connection back to your computer. This return connection won't work if your computer can't be reached directly from the Internet. In passive mode, both connections are made from your computer, so the FTP server doesn't have to do any connecting—it just waits passively for your computer to make both of the connections to it.

Most servers support passive mode connections, so it's generally best to leave this setting enabled.

CallbackFunction

(function) The name of a function that will be called whenever progress is made in the download operation. (You can use this callback function to display the progress of the download in your own custom way.)

Note: If CallbackFunction is set to nil, then the progress information will be sent to the built-in status dialog, assuming it is currently visible. (You can show or hide the status dialog with a StatusDlg.Show or StatusDlg.Hide action.)

The callback function must be able to receive the following parameter:

Message

(string) Either a blank string ("") or an information message being sent by the server, such as "Resolving host name" or "Connecting to Server."

The callback function should return a boolean value (true or false) indicating whether the file access should continue:

VALUE | DESCRIPTION
true | Continue with the file access.
false | Stop the file access as soon as possible.

Returns

(number) The size of the file on the FTP site (in bytes). If the file's size could not be retrieved, -1 is returned. You can use Application.GetLastError to determine whether this action failed, and why.


Grid.AutoSize

Grid.AutoSize (

string ObjectName,

number ResizeMode = GVS_DEFAULT,

boolean Redraw = true )

Description

Automatically sizes all rows and columns in the specified grid object.

Parameters

ObjectName

(string) The name of the grid object.

ResizeMode

(number) The auto resize mode. Choose from:

CONSTANT | VALUE | DESCRIPTION
GVS_DEFAULT | 0 | Use the default behavior which is to make all rows and columns as small as they can be while still accommodating all of their text. (Default)
GVS_HEADER | 1 | Make all rows and columns resize according to the size of the largest text in any cell of the row or column.
GVS_DATA | 2 | Make all rows and columns resize according to the size of the largest text in any cell of the row or column.
GVS_BOTH | 3 | Mixes both GVS_HEADER and GVS_DATA using whichever is the largest in the row or column.

Redraw

(boolean) Whether the grid should be automatically redrawn after the operation. Usually you will want to set this to true. However there may be times when you want to perform a lot of grid actions and delay the redraw until later. This is an optional argument. If omitted it will default to true.

VALUE | DESCRIPTION
true | Automatically redraw the grid after the operation. (Default)
false | Delay the redraw until later.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Grid.AutoSizeColumn

Grid.AutoSizeColumn (

string ObjectName,

number Column,

number ResizeMode = GVS_DEFAULT,

boolean ResetScroll = true,

boolean Redraw = true )

Description

Automatically sizes a single column in a grid object.

Parameters

ObjectName

(string) The name of the grid object.

Column

(number) The column (0-based) to autosize.

ResizeMode

(number) The auto resize mode. Choose from:

CONSTANT | VALUE | DESCRIPTION
GVS_DEFAULT | 0 | Use the default behavior which is to make the column as small as it can be while still accommodating all of its text. (Default)
GVS_HEADER | 1 | Make the column resize according to the size of the text in the header cell.
GVS_DATA | 2 | Make the column resize to the widest non-header cell in the column.
GVS_BOTH | 3 | Mixes both GVS_HEADER and GVS_DATA using whichever is the widest in the column.

ResetScroll

(boolean) Whether the scrollbars should be reset. This is an optional argument. Choose from:

VALUE | DESCRIPTION
true | Reset the scrollbars. (Default)
false | Don't reset the scrollbars..

Redraw

(boolean) Whether the grid should be automatically redrawn after the operation. Usually you will want to set this to true. However there may be times when you want to perform a lot of grid actions and delay the redraw until later. This is an optional argument. If omitted it will default to true.

VALUE | DESCRIPTION
true | Automatically redraw the grid after the operation. (Default)
false | Delay the redraw until later.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Grid.AutoSizeColumns

Grid.AutoSizeColumns (

string ObjectName,

number ResizeMode = GVS_DEFAULT,

boolean Redraw = true )

Description

Automatically sizes all columns in a grid object

Parameters

ObjectName

(string) The name of the grid object.

ResizeMode

(number) The auto resize mode. Choose from:

CONSTANT | VALUE | DESCRIPTION
GVS_DEFAULT | 0 | Use the default behavior which is to make each column as small as it can be while still accommodating all of its text. (Default)
GVS_HEADER | 1 | Make each column resize according to the size of the text in the header cell.
GVS_DATA | 2 | Make each column resize to the widest non-header cell in the column.
GVS_BOTH | 3 | Mixes both GVS_HEADER and GVS_DATA using whichever is the widest in each column.

Redraw

(boolean) Whether the grid should be automatically redrawn after the operation. Usually you will want to set this to true. However there may be times when you want to perform a lot of grid actions and delay the redraw until later. This is an optional argument. If omitted it will default to true.

VALUE | DESCRIPTION
true | Automatically redraw the grid after the operation. (Default)
false | Delay the redraw until later.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Grid.AutoSizeRow

Grid.AutoSizeRow (

string ObjectName,

number Row,

boolean ResetScroll = true,

boolean Redraw = true )

Description

Automatically sizes a single row in a grid object.

Parameters

ObjectName

(string) The name of the grid object.

Row

(number) The row (0-based) to autosize.

ResetScroll

(boolean) Whether the scrollbars should be reset. This is an optional argument. Choose from:

VALUE | DESCRIPTION
true | Reset the scrollbars. (Default)
false | Don't reset the scrollbars..

Redraw

(boolean) Whether the grid should be automatically redrawn after the operation. Usually you will want to set this to true. However there may be times when you want to perform a lot of grid actions and delay the redraw until later. This is an optional argument. If omitted it will default to true.

VALUE | DESCRIPTION
true | Automatically redraw the grid after the operation. (Default)
false | Delay the redraw until later.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Grid.AutoSizeRows

Grid.AutoSizeRows (

string ObjectName,

boolean Redraw = true )

Description

Automatically sizes all rows in a grid object.

Parameters

ObjectName

(string) The name of the grid object.

Redraw

(boolean) Whether the grid should be automatically redrawn after the operation. Usually you will want to set this to true. However there may be times when you want to perform a lot of grid actions and delay the redraw until later. This is an optional argument. If omitted it will default to true.

VALUE | DESCRIPTION
true | Automatically redraw the grid after the operation. (Default)
false | Delay the redraw until later.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Grid.DeleteAllItems

Grid.DeleteAllItems (

string ObjectName )

Description

Deletes all cells from a grid object.

Parameters

ObjectName

(string) The name of the grid object.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Grid.DeleteColumn

Grid.DeleteColumn (

string ObjectName,

number Column,

boolean Redraw = true )

Description

Deletes a column from a grid object.

Parameters

ObjectName

(string) The name of the grid object.

Column

(number) The (zero-based) index of the column to delete.

Redraw

(boolean) Whether the grid should be automatically redrawn after the operation. Usually you will want to set this to true. However there may be times when you want to perform a lot of grid actions and delay the redraw until later. This is an optional argument. If omitted it will default to true.

VALUE | DESCRIPTION
true | Automatically redraw the grid after the operation. (Default)
false | Delay the redraw until later.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Grid.DeleteNonFixedRows

Grid.DeleteNonFixedRows (

string ObjectName,

boolean Redraw = true )

Description

Deletes all non-fixed rows from a grid object.

Parameters

ObjectName

(string) The name of the grid object.

Redraw

(boolean) Whether the grid should be automatically redrawn after the operation. Usually you will want to set this to true. However there may be times when you want to perform a lot of grid actions and delay the redraw until later. This is an optional argument. If omitted it will default to true.

VALUE | DESCRIPTION
true | Automatically redraw the grid after the operation. (Default)
false | Delay the redraw until later.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Grid.DeleteRow

Grid.DeleteRow (

string ObjectName,

number Row,

boolean Redraw = true )

Description

Deletes a row from a grid object.

Parameters

ObjectName

(string) The name of the grid object.

Row

(number) The (zero-based) index of the row to delete.

Redraw

(boolean) Whether the grid should be automatically redrawn after the operation. Usually you will want to set this to true. However there may be times when you want to perform a lot of grid actions and delay the redraw until later. This is an optional argument. If omitted it will default to true.

VALUE | DESCRIPTION
true | Automatically redraw the grid after the operation. (Default)
false | Delay the redraw until later.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Grid.EditCopy

Grid.EditCopy (

string ObjectName )

Description

Copies the currently selected cells to the clipboard. This action is mapped to the Ctrl+C keystroke. Cells are copies in plain text, tab-delimited format. This allows the text to be pasted easily into a text editor or a spreadsheet program like Excel.

Parameters

ObjectName

(string) The name of the grid object.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Grid.EditCut

Grid.EditCut (

string ObjectName )

Description

Cuts the currently selected cells to the clipboard. This deletes the cell's contents. This action is mapped to the Ctrl+X keystroke. Cells are copies in plain text, tab-delimited format. This allows the text to be pasted easily into a text editor or a spreadsheet program like Excel.

Parameters

ObjectName

(string) The name of the grid object.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Grid.EditPaste

Grid.EditPaste (

string ObjectName )

Description

Pastes the contents of the clipboard to the grid object (if the data format on the clipboard is compatible.) This action is mapped to the Ctrl+V keystroke.

Parameters

ObjectName

(string) The name of the grid object.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Grid.EnsureVisible

Grid.EnsureVisible (

string ObjectName,

number Row = 0,

number Column = 0 )

Description

Ensures that the specified cell is visible in a grid object. It will scroll the specified cell into view if necessary.

Parameters

ObjectName

(string) The name of the grid object.

Row

(number) The (zero-based) index of the row.

Column

(number) The (zero-based) index of the column.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Grid.ExpandColumnsToFit

Grid.ExpandColumnsToFit (

string ObjectName,

boolean ExpandFixed = true,

boolean Redraw = true )

Description

Expands (or reduces) all columns to fit into the grid window area of a grid object.

Parameters

ObjectName

(string) The name of the grid object.

ExpandFixed

(boolean) Whether the fixed columns are expanded. This is an optional argument. Choose from:

VALUE | DESCRIPTION
true | Expand fixed columns. (Default)
false | Don't expand fixed columns.

Redraw

(boolean) Whether the grid should be automatically redrawn after the operation. Usually you will want to set this to true. However there may be times when you want to perform a lot of grid actions and delay the redraw until later. This is an optional argument. If omitted it will default to true.

VALUE | DESCRIPTION
true | Automatically redraw the grid after the operation. (Default)
false | Delay the redraw until later.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Grid.ExpandLastColumn

Grid.ExpandLastColumn (

string ObjectName,

boolean Redraw = true )

Description

Expands (or reduces) the last (right-most) column to fill the grid window area in a grid object.

Parameters

ObjectName

(string) The name of the grid object.

Redraw

(boolean) Whether the grid should be automatically redrawn after the operation. Usually you will want to set this to true. However there may be times when you want to perform a lot of grid actions and delay the redraw until later. This is an optional argument. If omitted it will default to true.

VALUE | DESCRIPTION
true | Automatically redraw the grid after the operation. (Default)
false | Delay the redraw until later.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Grid.ExpandRowsToFit

Grid.ExpandRowsToFit (

string ObjectName,

boolean ExpandFixed = true,

boolean Redraw = true )

Description

Expands (or reduces) all rows to fit into the grid window area of a grid object.

Parameters

ObjectName

(string) The name of the grid object.

ExpandFixed

(boolean) Whether the fixed rows are expanded. This is an optional argument. Choose from:

VALUE | DESCRIPTION
true | Expand fixed rows. (Default)
false | Don't expand fixed rows.

Redraw

(boolean) Whether the grid should be automatically redrawn after the operation. Usually you will want to set this to true. However there may be times when you want to perform a lot of grid actions and delay the redraw until later. This is an optional argument. If omitted it will default to true.

VALUE | DESCRIPTION
true | Automatically redraw the grid after the operation. (Default)
false | Delay the redraw until later.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Grid.ExpandToFit

Grid.ExpandToFit (

string ObjectName,

boolean ExpandFixed = true,

boolean Redraw = true )

Description

Expands (or reduces) all rows and columns to fit into the grid window area of a grid object.

Parameters

ObjectName

(string) The name of the grid object.

ExpandFixed

(boolean) Whether the fixed rows and columns are expanded. This is an optional argument. Choose from:

VALUE | DESCRIPTION
true | Expand fixed rows and fixed columns. (Default)
false | Don't expand fixed rows and fixed columns.

Redraw

(boolean) Whether the grid should be automatically redrawn after the operation. Usually you will want to set this to true. However there may be times when you want to perform a lot of grid actions and delay the redraw until later. This is an optional argument. If omitted it will default to true.

VALUE | DESCRIPTION
true | Automatically redraw the grid after the operation. (Default)
false | Delay the redraw until later.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Grid.GetCellColors

table Grid.GetCellColors (

string ObjectName,

number Row,

number Column )

Description

Gets the background and text colors of a cell as a table with indexes Background and Text.

Parameters

ObjectName

(string) The name of the grid object.

Row

(number) The (zero-based) index of the row.

Column

(number) The (zero-based) index of the column.

Returns

(table) A table indexed by the following values. If the object cannot be found or an error occurs, nil will be returned.

KEY | TYPE | DESCRIPTION
Background | number | The color value of the cell's background. If this value is GRID_CLR_DEFAULT (4278190080) then the cell is set to the default color for cells according to the user's Windows color scheme.
Text | number | The color value of the cell's text. If this value is GRID_CLR_DEFAULT (4278190080) then the cell is set to the default color for cells according to the user's Windows color scheme.

You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Grid.GetCellState

table Grid.GetCellState (

string ObjectName,

number Row,

number Column )

Description

Gets a cell's state properties.

Parameters

ObjectName

(string) The name of the grid object.

Row

(number) The (zero-based) index of the row.

Column

(number) The (zero-based) index of the column.

Returns

(table) A table indexed by the following values. If the object cannot be found or an error occurs, nil will be returned.

KEY | TYPE | DESCRIPTION
Focused | boolean | True if the cell has focus, false if it does not.
Selected | boolean | True if the cell is selected, false if it is not.
DropHighlighted | boolean | True if the cell is drop highlighted, false if it is not.
ReadOnly | boolean | True if the cell is read-only, false if it is not.
Fixed | boolean | True if the cell is fixed, false if it is not.
FixedRow | boolean | True if the cell is part of a fixed row, false if it is not.
FixedCol | boolean | True if the cell is part of a fixed column, false if it is not.
Modified | boolean | True if the cell has been modified, false if it has not.

You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Grid.GetCellText

string Grid.GetCellText (

string ObjectName,

number Row,

number Column )

Description

Gets the text of a cell in a grid object.

Parameters

ObjectName

(string) The name of the grid object.

Row

(number) The (zero-based) index of the row.

Column

(number) The (zero-based) index of the column.

Returns

(string) The text of the specified cell. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Grid.GetColumnCount

number Grid.GetColumnCount (

string ObjectName )

Description

Gets the number of columns in the grid.

Parameters

ObjectName

(string) The name of the grid object.

Returns

(number) The number of columns in the grid object. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Grid.GetColumnHiding

boolean Grid.GetColumnHiding (

string ObjectName )

Description

Gets whether or not columns can be contracted to 0 width via the mouse in a grid object.

Parameters

ObjectName

(string) The name of the grid object.

Returns

(boolean) Returns true if columns can be hidden by the user, or false if they cannot. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Grid.GetColumnResize

boolean Grid.GetColumnResize (

string ObjectName )

Description

Gets whether or not columns can be resized by the user in a grid object.

Parameters

ObjectName

(string) The name of the grid object.

Returns

(boolean) Returns true if columns can be resized by the user, or false if they cannot. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Grid.GetColumnWidth

number Grid.GetColumnWidth (

string ObjectName,

number Column )

Description

Gets the width in pixels of a column in a grid object.

Parameters

ObjectName

(string) The name of the grid object.

Column

(number) The (zero-based) index of the column.

Returns

(number) The width of the specified column in pixels. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Grid.GetDragAndDrop

boolean Grid.GetDragAndDrop (

string ObjectName )

Description

Gets whether cells can be dragged and dropped by the user in a grid object.

Parameters

ObjectName

(string) The name of the grid object.

Returns

(boolean) Returns true if can be dragged and dropped by the user, or false if they cannot. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Grid.GetEditable

boolean Grid.GetEditable (

string ObjectName )

Description

Gets whether the grid is editable by the user in a grid object.

Parameters

ObjectName

(string) The name of the grid object.

Returns

(boolean) Returns true if the grid is editable, or false if it is not. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Grid.GetFixedColumnCount

number Grid.GetFixedColumnCount (

string ObjectName )

Description

Gets the number of fixed columns in a grid object.

Parameters

ObjectName

(string) The name of the grid object.

Returns

(number) The number of fixed columns in the grid object. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Grid.GetFixedColumnSelection

boolean Grid.GetFixedColumnSelection (

string ObjectName )

Description

Gets whether or not clicking on a fixed column selects the cells underneath it in a grid object.

Parameters

ObjectName

(string) The name of the grid object.

Returns

(boolean) Returns true if clicking on a fixed column selects the cells underneath it, or false if it doesn't. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Grid.GetFixedRowCount

number Grid.GetFixedRowCount (

string ObjectName )

Description

Gets the number of fixed rows in a grid object.

Parameters

ObjectName

(string) The name of the grid object.

Returns

(number) The number of fixed rows in the grid object. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Grid.GetFixedRowSelection

boolean Grid.GetFixedRowSelection (

string ObjectName )

Description

Gets whether or not clicking on a fixed row selects the cells beside it in a grid object.

Parameters

ObjectName

(string) The name of the grid object.

Returns

(boolean) Returns true if clicking on a fixed row selects the cells beside it, or false if it doesn't. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Grid.GetFocusCell

table Grid.GetFocusCell (

string ObjectName )

Description

Returns a table that contains the row and column index of the cell that currently has the input focus in a grid object.

Parameters

ObjectName

(string) The name of the grid object.

Returns

(table) A table indexed by the following values. If an error occurs, nil will be returned. If no cell currently has focus, then Row and Column are both returned as -1.

KEY | TYPE | DESCRIPTION
Row | number | The (zero-based) index of the row.
Column | number | The (zero-based) index of the column.

You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Grid.GetFrameFocusCell

boolean Grid.GetFrameFocusCell (

string ObjectName )

Description

Returns whether or not the focus cell is highlighted with a framed border in a grid object.

Parameters

ObjectName

(string) The name of the grid object.

Returns

(boolean) Returns true if the focus cell is highlighted with a framed border, or false if it isn't. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Grid.GetGridColors

table Grid.GetGridColors (

string ObjectName )

Description

Returns the background, grid line, and tooltip colors of a grid object.

Parameters

ObjectName

(string) The name of the grid object.

Returns

(table) A table indexed by the following values. If an error occurs, nil will be returned.

KEY | TYPE | DESCRIPTION
GridBackground | number | The color value of the grid's background. If this value is GRID_CLR_DEFAULT (4278190080) then the grid is set to the default color according to the user's Windows color scheme.
GridLines | number | The color value of the grid's lines. If this value is GRID_CLR_DEFAULT (4278190080) then the grid lines are set to the default color according to the user's Windows color scheme.
TooltipBackground | number | The color value of the grid tooltip's background. If this value is GRID_CLR_DEFAULT (4278190080) then the tooltip background is set to the default color according to the user's Windows color scheme.
TooltipText | number | The color value of the grid tooltip's text. If this value is GRID_CLR_DEFAULT (4278190080) then the tooltip text is set to the default color according to the user's Windows color scheme.

You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Grid.GetGridLines

number Grid.GetGridLines (

string ObjectName )

Description

Returns whether or not the grid lines are displayed in a grid object.

Parameters

ObjectName

(string) The name of the grid object.

Returns

(number) A number that tells you which grid lines are displayed in the grid. It will be one of the following values:

CONSTANT | VALUE | DESCRIPTION
GVL_NONE | 0 | None.
GVL_HORZ | 1 | Horizontal lines.
GVL_VERT | 2 | Vertical lines.
GVL_BOTH | 3 | Both.

You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Grid.GetHeaderSort

boolean Grid.GetHeaderSort (

string ObjectName )

Description

Returns whether or not rows are sorted on column header clicks when in list mode in a grid object.

Parameters

ObjectName

(string) The name of the grid object.

Returns

(boolean) Returns true if rows are sorted on column header clicks, or false if they aren't. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Grid.GetListMode

boolean Grid.GetListMode (

string ObjectName )

Description

Returns whether or not the grid is in list mode. When the grid is in list mode, full row selection is enabled and clicking on the column header will can sort the grid by rows according to the Grid.GetHeaderSort value.

Parameters

ObjectName

(string) The name of the grid object.

Returns

(boolean) Returns true if the grid is in list mode, or false if it is not. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Grid.GetModified

boolean Grid.GetModified (

string ObjectName,

number Row = -1,

number Column = -1 )

Description

Returns the modified flag for a cell, or if -1, -1 is passed in for row and column, it returns the status for the entire grid. That is, whether the cell or grid has been modified since it was created or the last call to Grid.SetModified.

Parameters

ObjectName

(string) The name of the grid object.

Row

(number) The (zero-based) index of the row. Pass -1 for row and column to get the modified value of the whole grid.

Column

(number) The (zero-based) index of the column. Pass -1 for row and column to get the modified value of the whole grid.

Returns

(boolean) Returns true if the cell or grid has been modified, or false if it has not. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Grid.GetNextItem

table Grid.GetNextItem (

string ObjectName,

number Row,

number Column,

number SearchType,

number SearchDirection )

Description

Searches for a cell that has the specified properties and that bears the specified relationship to a given item.

Parameters

ObjectName

(string) The name of the grid object.

Row

(number) The (zero-based) index of the row to start searching at.

Column

(number) The (zero-based) index of the column to start searching at.

SearchType

(number) The search type. Choose from:

CONSTANT | VALUE | DESCRIPTION
GVNI_FOCUSED | 1 | Search for focus cell.
GVNI_SELECTED | 2 | Search for selected cell.
GVNI_DROPHILITED | 4 | Search for drop hilighted cells.
GVNI_READONLY | 8 | Search for read-only cells.
GVNI_FIXED | 16 | Search for fixed cells.
GVNI_MODIFIED | 32 | Search for modified cells.

SearchDirection

(number) The direction of the search relative to the specified row and column. Choose from:

CONSTANT | VALUE | DESCRIPTION
GVNI_ABOVE | 256 | Search above initial cell.
GVNI_BELOW | 512 | Search all cells below initial cell.
GVNI_TOLEFT | 1024 | Search all cells to the left of the initial cell.
GVNI_TORIGHT | 2048 | Search all cells to the right of the initial cell.
GVNI_ALL | 3584 | Search all cells in the grid starting from the initial cell.
GVNI_AREA | 2560 | Search all cells below and to the right of the initial cell.

Returns

(table) A table is indexed by "Row" and "Column" to specify the found cell's location. If an error occurs, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Grid.GetPos

table Grid.GetPos (

string ObjectName )

Description

Returns the X and Y page or dialog coordinates of a grid object in pixels. This coordinate refers to the upper left hand corner of the object's bounding box relative to the page or dialog.

Note: The upper left hand corner of a page or dialog has X and Y coordinates of 0.

Parameters

ObjectName

(string) The name of the grid object.

Returns

(table) A table containing the object's current coordinates, indexed by values X and Y. If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Grid.GetProperties

table Grid.GetProperties (

string ObjectName )

Description

Returns a table containing the properties of a grid object.

Parameters

ObjectName

(string) The name of the grid object.

Returns

(table) A table containing the grid object's properties, indexed by the following keys:

KEY

TYPE

DESCRIPTION

ObjectName

string

The name of the grid object.

Rows

number

The number of rows in the grid object.

Columns

number

The number of columns in the grid object.

FixedRows

number

The number of fixed rows in the grid object.

FixedColumns

number

The number of fixed columns in the grid object.

TextColor

number

The color value of the text. If this value is GRID_CLR_DEFAULT (4278190080) then it is set to the default color according to the user's Windows color scheme.

TextBackgroundColor

number

The color value of the background. If this value is GRID_CLR_DEFAULT (4278190080) then it is set to the default color according to the user's Windows color scheme.

FixedTextColor

number

The color value of fixed text. If this value is GRID_CLR_DEFAULT (4278190080) then it is set to the default color according to the user's Windows color scheme.

FixedBackgroundColor

number

The color value of the fixed background. If this value is GRID_CLR_DEFAULT (4278190080) then it is set to the default color according to the user's Windows color scheme.

GridLineColor

number

The color value of the grid's lines. If this value is GRID_CLR_DEFAULT (4278190080) then it is set to the default color according to the user's Windows color scheme.

GridBackgroundColor

number

The color value of the grid's background. If this value is GRID_CLR_DEFAULT (4278190080) then it is set to the default color according to the user's Windows color scheme.

TitleTipBackgroundColor

number

The color value of the grid tooltip's background. If this value is GRID_CLR_DEFAULT (4278190080) then it is set to the default color according to the user's Windows color scheme.

TitleTipTextColor

number

The color value of the grid tooltip's text. If this value is GRID_CLR_DEFAULT (4278190080) then it is set to the default color according to the user's Windows color scheme.

Editable

boolean

True if the grid is editable by the user, or false if it is not.

Selectable

boolean

True if the user can select grid cells with the mouse or keyboard, or false if they cannot.

CellDragAndDrop

boolean

True if cells can be dragged and dropped by the user, or false if they cannot.

ResizableRows

boolean

True if rows can be resized by the user, or false if they cannot.

ResizableColumns

boolean

True if columns can be resized by the user, or false if they cannot.

GridLines

number

A number that tells you which grid lines are displayed in the grid:

CONSTANT | VALUE | DESCRIPTION
GVL_NONE | 0 | None.
GVL_HORZ | 1 | Horizontal lines.
GVL_VERT | 2 | Vertical lines.
GVL_BOTH | 3 | Both.

FontName

string

The font name.

FontSize

number

The font size (in points).

FontStrikeout

boolean

True if the font is set to strikeout, false if it is not.

FontUnderline

boolean

True if the font is set to underline, false if it is not.

FontAntiAlias

boolean

True if the font is set to anti alias, false if it is not.

FontItalic

boolean

True if the font is set to italic, false if it is not.

FontWeight

number

The weight of the font (how 'dark' the text will appear):

CONSTANT | VALUE | DESCRIPTION
FW_DONTCARE | 0 | Font weight not specified.
FW_THIN | 100 | Font weight 'thin'.
FW_EXTRALIGHT | 200 | Font weight 'extra-light'.
FW_LIGHT | 300 | Font weight 'light'.
FW_NORMAL | 400 | Font weight 'normal'.
FW_MEDIUM | 500 | Font weight 'medium'.
FW_SEMIBOLD | 600 | Font weight 'semi-bold'.
FW_BOLD | 700 | Font weight 'bold'.
FW_EXTRABOLD | 800 | Font weight 'extra bold'.
FW_HEAVY | 900 | Font weight 'heavy'.

FontScript

number

The character set in use by the grid object:

CONSTANT | VALUE | DESCRIPTION
ANSI_CHARSET | 0 | ANSI character set.
BALTIC_CHARSET | 186 | Baltic character set.
CHINESEBIG5_CHARSET | 136 | Chinese character set.
DEFAULT_CHARSET | 1 | Default character set.
EASTEUROPE_CHARSET | 238 | Eastern European character set.
GB2312_CHARSET | 134 | GB2312 character set.
GREEK_CHARSET | 161 | Greek character set.
HANGUL_CHARSET | 129 | Hangul character set.
MAC_CHARSET | 77 | MAC character set.
OEM_CHARSET | 255 | OEM character set.
RUSSIAN_CHARSET | 204 | Russian character set.
SHIFTJIS_CHARSET | 128 | Shiftjis character set.
SYMBOL_CHARSET | 2 | Symbol character set.
TURKISH_CHARSET | 162 | Turkish character set.

Enabled

boolean

True if the grid object is enabled, false if it is not.

Visible

boolean

True if the grid object is visible, false if it is not.

X

number

The horizontal position (in pixels) of the top left corner of the grid object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has an X value of 0

Y

number

The vertical position (in pixels) of the top left corner of the grid object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has a Y value of 0

Width

number

The width (in pixels) of the grid object.

Height

number

The height (in pixels) of the grid object.

TooltipText

string

The mouseover tooltip of the grid object.

ResizeLeft

boolean

True if the left side of the object will move when the application is resized, false if it is not.

ResizeRight

boolean

True if the right side of the object will move when the application is resized, false if it is not.

ResizeTop

boolean

True if the top of the object will move when the application is resized, false if it is not.

ResizeBottom

boolean

True if the bottom of the object will move when the application is resized, false if it is not.

WindowHandle

number

The integer value that represents the object's window. (Commonly referred to as an hWnd.)

If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Grid.GetRowCount

number Grid.GetRowCount (

string ObjectName )

Description

Gets the number of rows in a grid object.

Parameters

ObjectName

(string) The name of the grid object.

Returns

(number) The number of rows in the grid object. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Grid.GetRowHeight

number Grid.GetRowHeight (

string ObjectName,

number Row )

Description

Returns the height in pixels of a row in a grid object.

Parameters

ObjectName

(string) The name of the grid object.

Row

(number) The (zero-based) index of the row.

Returns

(number) The height of the specified row in pixels. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Grid.GetRowHiding

boolean Grid.GetRowHiding (

string ObjectName )

Description

Gets whether or not rows can be contracted to 0 height via the mouse in a grid object.

Parameters

ObjectName

(string) The name of the grid object.

Returns

(boolean) Returns true if rows can be hidden by the user, or false if they cannot. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Grid.GetRowResize

boolean Grid.GetRowResize (

string ObjectName )

Description

Gets whether or not rows can be resized by the user in a grid object.

Parameters

ObjectName

(string) The name of the grid object.

Returns

(boolean) Returns true if rows can be resized by the user, or false if they cannot. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Grid.GetSelectable

boolean Grid.GetSelectable (

string ObjectName )

Description

Gets whether or not the user can select grid cells with the mouse or keyboard in a grid object.

Parameters

ObjectName

(string) The name of the grid object.

Returns

(boolean) Returns true if the user can select grid cells, or false if they cannot. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Grid.GetSelectedCount

number Grid.GetSelectedCount (

string ObjectName )

Description

Gets the number of cells that are currently selected in a grid object.

Parameters

ObjectName

(string) The name of the grid object.

Returns

(number) The number of cells that are currently selected in the grid object. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Grid.GetSingleColumnSelection

boolean Grid.GetSingleColumnSelection (

string ObjectName )

Description

Get whether or not the grid object is in single column selection mode.

Parameters

ObjectName

(string) The name of the grid object.

Returns

(boolean) Returns true if the grid is in single column selection mode, or false if it is not. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Grid.GetSingleRowSelection

boolean Grid.GetSingleRowSelection (

string ObjectName )

Description

Get whether or not the grid object is in single row selection mode.

Parameters

ObjectName

(string) The name of the grid object.

Returns

(boolean) Returns true if the grid is in single row selection mode, or false if it is not. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Grid.GetSize

table Grid.GetSize (

string ObjectName )

Description

Returns the pixel dimensions of a grid object.

Parameters

ObjectName

(string) The name of the grid object.

Returns

(table) A table containing the object's pixel dimensions, indexed by values "Width" and "Height". If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Grid.GetSortAscending

boolean Grid.GetSortAscending (

string ObjectName )

Description

Gets whether or not the current sort column is sorted ascending in a grid object.

Parameters

ObjectName

(string) The name of the grid object.

Returns

(boolean) Returns true if the current sort column is sorted ascending, or false if it is not. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Grid.GetSortColumn

number Grid.GetSortColumn (

string ObjectName )

Description

Gets the index of the currently sorted column in a grid object.

Parameters

ObjectName

(string) The name of the grid object.

Returns

(number) The (zero-based) index of the currently sorted column in the grid. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Grid.GetTabEnabled

boolean Grid.GetTabEnabled (

string ObjectName )

Description

Gets whether or not the Tab key is used to move the cell selection in a grid object.

Parameters

ObjectName

(string) The name of the grid object.

Returns

(boolean) Returns true if the Tab key is used to move the cell selection, or false if it is not. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Grid.GetToolTipsEnabled

boolean Grid.GetToolTipsEnabled (

string ObjectName )

Description

Gets whether or not tooltips will be displayed for cells that cannot contain all of their text in a grid object.

Parameters

ObjectName

(string) The name of the grid object.

Returns

(boolean) Returns true if tooltips are enabled, or false if they are not. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Grid.GetTrackFocusCell

boolean Grid.GetTrackFocusCell (

string ObjectName )

Description

Gets whether or not the fixed cells on the same row/column as the current focus cell are highlighted with a sunken border in a grid object.

Parameters

ObjectName

(string) The name of the grid object.

Returns

(boolean) Returns true if the fixed cells on the same row/column as the current focus cell are highlighted with a sunken border, or false if they are not. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Grid.GetUnhideColumn

boolean Grid.GetUnhideColumn (

string ObjectName )

Description

Gets whether or not 0 width columns can be resized by the user via mouse in a grid object.

Parameters

ObjectName

(string) The name of the grid object.

Returns

(boolean) Returns true if columns can be un-hidden, or false if they cannot. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Grid.GetUnhideRow

boolean Grid.GetUnhideRow (

string ObjectName )

Description

Gets whether or not 0 height rows can be resized by the user via mouse in a grid object..

Parameters

ObjectName

(string) The name of the grid object.

Returns

(boolean) Returns true if rows can be un-hidden, or false if they cannot. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Grid.InsertColumn

number Grid.InsertColumn (

string ObjectName,

number InsertPosition,

boolean Redraw = true )

Description

Inserts a column into a grid object and returns the index of the inserted column.

Parameters

ObjectName

(string) The name of the grid object.

InsertPosition

(number) The zero-based position where the column should be inserted. Use -1 to add a column as the last column.

Redraw

(boolean) Whether the grid should be automatically redrawn after the operation. Usually you will want to set this to true. However there may be times when you want to perform a lot of grid actions and delay the redraw until later. This is an optional argument. If omitted it will default to true.

VALUE | DESCRIPTION
true | Automatically redraw the grid after the operation. (Default)
false | Delay the redraw until later.

Returns

(number) The zero-based index of the newly inserted column. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Grid.InsertRow

number Grid.InsertRow (

string ObjectName,

number InsertPosition,

boolean Redraw = true )

Description

Inserts a row into a grid object and returns the index of the inserted row.

Parameters

ObjectName

(string) The name of the grid object.

InsertPosition

(number) The zero-based position where the row should be inserted. Use -1 to add a row as the last row.

Redraw

(boolean) Whether the grid should be automatically redrawn after the operation. Usually you will want to set this to true. However there may be times when you want to perform a lot of grid actions and delay the redraw until later. This is an optional argument. If omitted it will default to true.

VALUE | DESCRIPTION
true | Automatically redraw the grid after the operation. (Default)
false | Delay the redraw until later.

Returns

(number) The zero-based index of the newly inserted row. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Grid.IsCellEditable

boolean Grid.IsCellEditable (

string ObjectName,

number Row,

number Column )

Description

Returns whether or not a specified cell is editable.

Parameters

ObjectName

(string) The name of the grid object.

Row

(number) The zero-based index of the cell's row.

Column

(number) The zero-based index of the cell's column.

Returns

(boolean) Returns true if the specified cell is editable, or false if it is not. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Grid.IsCellFixed

boolean Grid.IsCellFixed (

string ObjectName,

number Row,

number Column )

Description

Returns whether or not a specified cell is a fixed cell.

Parameters

ObjectName

(string) The name of the grid object.

Row

(number) The zero-based index of the cell's row.

Column

(number) The zero-based index of the cell's column.

Returns

(boolean) Returns true if the specified cell is a fixed cell, or false if it is not. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Grid.IsCellSelected

boolean Grid.IsCellSelected (

string ObjectName,

number Row,

number Column )

Description

Returns whether or not a specified cell is selected.

Parameters

ObjectName

(string) The name of the grid object.

Row

(number) The zero-based index of the cell's row.

Column

(number) The zero-based index of the cell's column.

Returns

(boolean) Returns true if the specified cell is selected, or false if it is not. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Grid.IsCellValid

boolean Grid.IsCellValid (

string ObjectName,

number Row,

number Column )

Description

Returns whether or not a specified cell is valid. That is whether or not the cell at the row and column exists. This is a useful way to test for a cell's validity before calling other actions that affect the cell.

Parameters

ObjectName

(string) The name of the grid object.

Row

(number) The zero-based index of the cell's row.

Column

(number) The zero-based index of the cell's column.

Returns

(boolean) Returns true if the specified cell is valid, or false if it is not. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Grid.IsCellVisible

boolean Grid.IsCellVisible (

string ObjectName,

number Row,

number Column )

Description

Returns whether or not a specified cell is visible in a grid object.

Parameters

ObjectName

(string) The name of the grid object.

Row

(number) The zero-based index of the cell's row.

Column

(number) The zero-based index of the cell's column.

Returns

(boolean) Returns true if the specified cell is visible, or false if it is not. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Grid.IsEnabled

boolean Grid.IsEnabled (

string ObjectName )

Description

Returns true if a specific grid object is enabled, or false if it's disabled.

Note: When a grid object is disabled, it doesn't respond to the user at all.

Parameters

ObjectName

(string) The name of the grid object.

Returns

(boolean) True if the grid object is enabled, false if it is disabled. If an error occurs, false will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Grid.IsVisible

boolean Grid.IsVisible (

string ObjectName )

Description

Returns true if a specific grid object is visible, and false if it isn't.

Parameters

ObjectName

(string) The name of the grid object.

Returns

(boolean) True if the grid object is visible, false if it's invisible. If an error occurs, false will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Grid.LoadFromFile

boolean Grid.LoadFromFile (

string ObjectName,

string FullPath,

string SeparatorCharacter = ",",

boolean AutoSize = true )

Description

Loads items from a file into a grid object using a specified delimiter.

Parameters

ObjectName

(string) The name of the grid object.

FullPath

(string) The full path to a file containing items separated by the specified delimiter.

SeparatorCharacter

(string) The delimiter to use to separate the grid items.

AutoSize

(boolean) Whether the grid should auto-size rows and columns after loading the file.

Returns

(boolean) Returns true if the load was successful, or false if it was not. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Grid.MakeColorRGB

number Grid.MakeColorRGB (

number Red,

number Green,

number Blue )

Description

Makes a color value from red, green and blue components. This is a helper function provided as a convenience. It does not directly affect the grid object.

Parameters

Red

(number) The red component (0-255).

Green

(number) The green component (0-255).

Blue

(number) The blue component (0-255).

Returns

(number) Returns a number that can be used as color value for actions that use colors. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Grid.Print

Grid.Print (

string ObjectName,

boolean WYSIWYG = false,

boolean ShadedPrintOut = true,

table MarginInfo = nil )

Description

Prints the contents of the grid object.

Parameters

ObjectName

(string) The name of the grid object.

WYSIWYG

(boolean) Whether to print in WYSIWYG mode or size-to-width mode. This is an optional argument and if omitted will default to false.

VALUE | DESCRIPTION
true | Print in WYSIWYG mode.
false | Print in size-to-width mode. (Default)

ShadedPrintOut

(boolean) Whether or not to print with shaded cells. This is an optional argument and if omitted will default to true.

VALUE | DESCRIPTION
true | Print with shaded cells. (Default)
false | Do not print with shaded cells.

MarginInfo

(table) A table of margin information for the print. Pass nil to use the default margin settings. This is an optional argument and if omitted will default to nil. All values are optional. If omitted, the default will be used. All values are numbers and are in character units. That is the average size of a character in the Grid object.

KEY | TYPE | DESCRIPTION
HeaderHeight | number | The size of the header.
FooterHeight | number | The size of the footer.
LeftMargin | number | The left margin.
RightMargin | number | The right margin.
TopMargin | number | The top margin.
BottomMargin | number | The bottom margin.
Gap | number | The gap between the header and column headings.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Grid.RedrawCell

Grid.RedrawCell (

string ObjectName,

number Row,

number Column )

Description

Refreshes (redraws) a specified cell in a grid object.

Parameters

ObjectName

(string) The name of the grid object.

Row

(number) The zero-based index of the cell's row.

Column

(number) The zero-based index of the cell's column.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Grid.RedrawColumn

Grid.RedrawColumn (

string ObjectName,

number Column )

Description

Refreshes (redraws) a specified column in a grid object.

Parameters

ObjectName

(string) The name of the grid object.

Column

(number) The zero-based index of the column.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Grid.RedrawRow

Grid.RedrawRow (

string ObjectName,

number Row )

Description

Refreshes (redraws) a specified row in a grid object.

Parameters

ObjectName

(string) The name of the grid object.

Row

(number) The zero-based index of the row.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Grid.Refresh

Grid.Refresh (

string ObjectName )

Description

Refreshes (redraws) the entire grid object and its contents.

Parameters

ObjectName

(string) The name of the grid object.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Grid.SaveToFile

boolean Grid.SaveToFile (

string ObjectName,

string FullPath,

string SeparatorCharacter = "," )

Description

Saves items from a grid object to a file using a specified delimiter.

Parameters

ObjectName

(string) The name of the grid object.

FullPath

(string) The full path to a file to save the grid items to, separated by the specified delimiter.

SeparatorCharacter

(string) The delimiter to use to separate the grid items.

Returns

(boolean) Returns true if the save was successful, or false if it was not. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Grid.SelectAll

Grid.SelectAll (

string ObjectName )

Description

Selects all non-fixed cells in a grid object.

Parameters

ObjectName

(string) The name of the grid object.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Grid.SetCellColors

Grid.SetCellColors (

string ObjectName,

number Row,

number Column,

table Colors,

boolean Redraw = true )

Description

Sets the background, and text colors of a cell in a grid object.

Parameters

ObjectName

(string) The name of the grid object.

Row

(number) The zero-based index of the cell's row.

Column

(number) The zero-based index of the cell's column.

Colors

(table) A table of numerical color values. Indexes (all optional) are Background and Text. Use GRID_CLR_DEFAULT (4278190080) to set the color back to the default system color for a cell. You can use the Grid.MakeColorRGB action to help make colors.

Redraw

(boolean) Whether the grid should be automatically redrawn after the operation. Usually you will want to set this to true. However there may be times when you want to perform a lot of grid actions and delay the redraw until later. This is an optional argument. If omitted it will default to true.

VALUE | DESCRIPTION
true | Automatically redraw the grid after the operation. (Default)
false | Delay the redraw until later.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Grid.SetCellFont

Grid.SetCellFont (

string ObjectName,

number Row,

number Column,

table FontData = nil,

boolean Redraw = true )

Description

Sets the font of a cell in a grid object.

Parameters

ObjectName

(string) The name of the grid object.

Row

(number) The zero-based index of the cell's row.

Column

(number) The zero-based index of the cell's column.

FontData

(table) A table of font information. Pass nil to use the default grid font. This is an optional argument and if omitted will default to nil. All values are optional and if omitted, the default will be used.

KEY

TYPE

DESCRIPTION

FaceName

string

The face name such as "Arial" or "Verdana".

Height

number

The font height (in points).

Weight

number

The weight of the font (how 'dark' the text will appear):

CONSTANT | VALUE | DESCRIPTION
FW_DONTCARE | 0 | Font weight not specified.
FW_THIN | 100 | Font weight 'thin'.
FW_EXTRALIGHT | 200 | Font weight 'extra-light'.
FW_LIGHT | 300 | Font weight 'light'.
FW_NORMAL | 400 | Font weight 'normal'.
FW_MEDIUM | 500 | Font weight 'medium'.
FW_SEMIBOLD | 600 | Font weight 'semi-bold'.
FW_BOLD | 700 | Font weight 'bold'.
FW_EXTRABOLD | 800 | Font weight 'extra bold'.
FW_HEAVY | 900 | Font weight 'heavy'.

Italic

boolean

True if the font should be set to italic, false if it should not be.

Underline

boolean

True if the it should be underlined, false if it should not be.

Redraw

(boolean) Whether the grid should be automatically redrawn after the operation. Usually you will want to set this to true. However there may be times when you want to perform a lot of grid actions and delay the redraw until later. This is an optional argument. If omitted it will default to true.

VALUE | DESCRIPTION
true | Automatically redraw the grid after the operation. (Default)
false | Delay the redraw until later.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Grid.SetCellText

Grid.SetCellText (

string ObjectName,

number Row,

number Column,

string Text,

boolean Redraw = true )

Description

Sets the text of a cell in a grid object.

Parameters

ObjectName

(string) The name of the grid object.

Row

(number) The zero-based index of the cell's row.

Column

(number) The zero-based index of the cell's column.

Text

(string) The cell's new text.

Redraw

(boolean) Whether the grid should be automatically redrawn after the operation. Usually you will want to set this to true. However there may be times when you want to perform a lot of grid actions and delay the redraw until later. This is an optional argument. If omitted it will default to true.

VALUE | DESCRIPTION
true | Automatically redraw the grid after the operation. (Default)
false | Delay the redraw until later.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Grid.SetColumnCount

Grid.SetColumnCount (

string ObjectName,

number ColumnCount )

Description

Sets the number of columns in a grid object. If there are more than ColumnCount columns in the grid already, the extra columns will be removed.

Parameters

ObjectName

(string) The name of the grid object.

ColumnCount

(number) The number of columns that should be in the grid object.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Grid.SetColumnHiding

Grid.SetColumnHiding (

string ObjectName,

boolean AllowHiding = true )

Description

Sets whether or not columns can be contracted to 0 width by the user with the mouse in a grid object.

Parameters

ObjectName

(string) The name of the grid object.

AllowHiding

(boolean) Whether columns can be hidden. This is an optional argument and if omitted will default to true.

VALUE | DESCRIPTION
true | Columns can be hidden. (Default)
false | Columns cannot be hidden.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Grid.SetColumnResize

Grid.SetColumnResize (

string ObjectName,

boolean Resizable = true )

Description

Sets whether or not columns are resizable by the user in a grid object. Columns are always resizable from actions such as Grid.SetColumnWidth.

Parameters

ObjectName

(string) The name of the grid object.

Resizable

(boolean) Whether columns can be resized. This is an optional argument and if omitted will default to true.

VALUE | DESCRIPTION
true | Columns can be resized. (Default)
false | Columns cannot be resized.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Grid.SetColumnWidth

Grid.SetColumnWidth (

string ObjectName,

number Column,

number Width,

boolean Redraw = true )

Description

Sets the width of a column in pixels.

Parameters

ObjectName

(string) The name of the grid object.

Column

(number) The (zero-based) index of the column.

Width

(number) The width of the column in pixels.

Redraw

(boolean) Whether the grid should be automatically redrawn after the operation. Usually you will want to set this to true. However there may be times when you want to perform a lot of grid actions and delay the redraw until later. This is an optional argument. If omitted it will default to true.

VALUE | DESCRIPTION
true | Automatically redraw the grid after the operation. (Default)
false | Delay the redraw until later.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Grid.SetDragAndDrop

Grid.SetDragAndDrop (

string ObjectName,

boolean Enable = true )

Description

Sets whether cells can be dragged and dropped by the user in a grid object.

Parameters

ObjectName

(string) The name of the grid object.

Enable

(boolean) Whether drag and drop is enabled. This is an optional argument and if omitted will default to true.

VALUE | DESCRIPTION
true | Enable drag and drop. (Default)
false | Disable drag and drop.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Grid.SetEditable

Grid.SetEditable (

string ObjectName,

boolean Editable )

Description

Sets whether the grid object is editable by the user.

Parameters

ObjectName

(string) The name of the grid object.

Editable

(boolean) Whether or not the grid object is editable.

VALUE | DESCRIPTION
true | Make the grid object editable.
false | Make the grid object non-editable.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Grid.SetEnabled

Grid.SetEnabled (

string ObjectName,

boolean Enabled = true )

Description

Sets the enabled/disabled state of a grid object.

Note: When a grid object is disabled, it doesn't respond to the user at all.

Parameters

ObjectName

(string) The name of the grid object.

Enabled

(boolean) Whether to make the grid object enabled or disabled:

VALUE | DESCRIPTION
true | Enabled. (Default)
false | Disabled.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Grid.SetFixedColumnCount

Grid.SetFixedColumnCount (

string ObjectName,

number ColumnCount )

Description

Sets the number of fixed columns in a grid object.

Parameters

ObjectName

(string) The name of the grid object.

ColumnCount

(number) The new fixed column count.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Grid.SetFixedColumnSelection

Grid.SetFixedColumnSelection (

string ObjectName,

boolean Enable )

Description

Sets whether or not clicking on a fixed column selects the cells underneath it in a grid object.

Parameters

ObjectName

(string) The name of the grid object.

Enable

(boolean) Whether or not fixed column selecting is turned on.

VALUE | DESCRIPTION
true | Turn on fixed column selection.
false | Turn off fixed column selection.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Grid.SetFixedRowCount

Grid.SetFixedRowCount (

string ObjectName,

number RowCount )

Description

Sets the number of fixed rows in a grid object.

Parameters

ObjectName

(string) The name of the grid object.

RowCount

(number) The new fixed row count.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Grid.SetFixedRowSelection

Grid.SetFixedRowSelection (

string ObjectName,

boolean Enable )

Description

Sets whether or not clicking on a fixed row selects the cells beside it in a grid object.

Parameters

ObjectName

(string) The name of the grid object.

Enable

(boolean) Whether or not fixed row selecting is turned on.

VALUE | DESCRIPTION
true | Turn on fixed row selection.
false | Turn off fixed row selection.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Grid.SetFocusCell

Grid.SetFocusCell (

string ObjectName,

number Row,

number Column )

Description

Sets the input focus to a cell at a specified row and column index in a grid object.

Parameters

ObjectName

(string) The name of the grid object.

Row

(number) The zero-based index of the cell's row.

Column

(number) The zero-based index of the cell's column.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Grid.SetFrameFocusCell

Grid.SetFrameFocusCell (

string ObjectName,

boolean Enable,

boolean Redraw = true )

Description

Sets whether or not the focus cell is highlighted with a framed border in a grid object.

Parameters

ObjectName

(string) The name of the grid object.

Enable

(boolean) Whether framing of the focus cell is enabled or not. Choose from:

VALUE | DESCRIPTION
true | Enable framing of the focus cell.
false | Disable framing of the focus cell.

Redraw

(boolean) Whether the grid should be automatically redrawn after the operation. Usually you will want to set this to true. However there may be times when you want to perform a lot of grid actions and delay the redraw until later. This is an optional argument. If omitted it will default to true.

VALUE | DESCRIPTION
true | Automatically redraw the grid after the operation. (Default)
false | Delay the redraw until later.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Grid.SetGridColors

Grid.SetGridColors (

string ObjectName,

table Colors )

Description

Sets the background, grid line, and tooltip colors of a grid object.

Parameters

ObjectName

(string) The name of the grid object.

Colors

(table) A table with the following indexes:

KEY | TYPE | DESCRIPTION
GridBackground | number | The color value of the grid's background. If this value is GRID_CLR_DEFAULT (4278190080) then the grid is set to the default color according to the user's Windows color scheme. You can use the Grid.MakeColorRGB action to help make colors.
GridLines | number | The color value of the grid's lines. If this value is GRID_CLR_DEFAULT (4278190080) then the grid lines are set to the default color according to the user's Windows color scheme.
TooltipBackground | number | The color value of the grid tooltip's background. If this value is GRID_CLR_DEFAULT (4278190080) then the tooltip background is set to the default color according to the user's Windows color scheme.
TooltipText | number | The color value of the grid tooltip's text. If this value is GRID_CLR_DEFAULT (4278190080) then the tooltip text is set to the default color according to the user's Windows color scheme.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Grid.SetGridLines

Grid.SetGridLines (

string ObjectName,

number GridLines )

Description

Sets whether the grid lines are displayed in a grid object.

Parameters

ObjectName

(string) The name of the grid object.

GridLines

(number) A number telling which grid lines to display in the grid. It should be one of the following values:

CONSTANT | VALUE | DESCRIPTION
GVL_NONE | 0 | None.
GVL_HORZ | 1 | Horizontal lines.
GVL_VERT | 2 | Vertical lines.
GVL_BOTH | 3 | Both.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Grid.SetHeaderSort

Grid.SetHeaderSort (

string ObjectName,

boolean SortOnClick )

Description

Sets whether or not rows are sorted on column header clicks when in list mode in a grid object.

Parameters

ObjectName

(string) The name of the grid object.

SortOnClick

(boolean) Whether or not clicking a column header sorts the rows below it.

VALUE | DESCRIPTION
true | Sort the rows below when column header is clicked.
false | Don't sort the rows.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Grid.SetListMode

Grid.SetListMode (

string ObjectName,

boolean ListMode )

Description

Sets whether the grid object is in list mode. When the grid object is in list mode, full row selection is enabled and clicking on the column header can sort the grid by rows according to the Grid.GetHeaderSort value.

Parameters

ObjectName

(string) The name of the grid object.

ListMode

(boolean) Whether the grid object should be in list mode.

VALUE | DESCRIPTION
true | Set the grid object to be in list mode.
false | Don't set the object to be in list mode.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Grid.SetModified

Grid.SetModified (

string ObjectName,

boolean Modified = true,

number Row = -1,

number Column = -1 )

Description

Sets the modified flag for a cell in a grid object. If row and column are set to -1, the change affects the entire grid object.

Parameters

ObjectName

(string) The name of the grid object.

Modified

(boolean) Whether the cell or grid is set as modified. This is an optional argument and if omitted will default to true.

VALUE | DESCRIPTION
true | Set the cell or grid as modified.
false | Don't set the cell or grid as modified.

Row

(number) The (zero-based) index of the row. Use -1 if you want to set the entire grid as modified.

Column

(number) The (zero-based) index of the column. Use -1 if you want to set the entire grid as modified.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Grid.SetPos

Grid.SetPos (

string ObjectName,

number X,

number Y )

Description

Sets the X and Y pixel coordinates of a grid object relative to the page or dialog.

Parameters

ObjectName

(string) The name of the grid object.

X

(number) The new X pixel coordinate (horizontal position) to set for the grid object. This is the X coordinate of the upper left hand corner of the object's bounding box relative to the page or dialog.

Y

(number) The new Y pixel coordinate (vertical position) to set for the grid object. This is the Y coordinate of the upper left hand corner of the object's bounding box relative to the page or dialog.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Grid.SetProperties

Grid.SetProperties (

string ObjectName,

table Properties )

Description

Sets the properties of a grid object.

Parameters

ObjectName

(string) The name of the grid object.

Properties

(table) A table containing the grid object's properties indexed by the following keys:

KEY

TYPE

DESCRIPTION

Rows

number

The number of rows to set in the grid object.

Columns

number

The number of columns to set in the grid object.

FixedRows

number

The number of fixed rows to set in the grid object.

FixedColumns

number

The number of fixed columns to set in the grid object.

TextColor

number

The color value to use for the text. Use GRID_CLR_DEFAULT (4278190080) to set to the default color according to the user's Windows color scheme. You can use the Grid.MakeColorRGB action to create the color value.

TextBackgroundColor

number

The color value to use for the background. Use GRID_CLR_DEFAULT (4278190080) to set to the default color according to the user's Windows color scheme. You can use the Grid.MakeColorRGB action to create the color value.

FixedTextColor

number

The color value to use for fixed text. Use GRID_CLR_DEFAULT (4278190080) to set to the default color according to the user's Windows color scheme. You can use the Grid.MakeColorRGB action to create the color value.

FixedBackgroundColor

number

The color value to use for the fixed background. Use GRID_CLR_DEFAULT (4278190080) to set to the default color according to the user's Windows color scheme. You can use the Grid.MakeColorRGB action to create the color value.

GridLineColor

number

The color value to use for the grid's lines. Use GRID_CLR_DEFAULT (4278190080) to set to the default color according to the user's Windows color scheme. You can use the Grid.MakeColorRGB action to create the color value.

GridBackgroundColor

number

The color value to use for the grid's background. Use GRID_CLR_DEFAULT (4278190080) to set to the default color according to the user's Windows color scheme. You can use the Grid.MakeColorRGB action to create the color value.

TitleTipBackgroundColor

number

The color value to use for the grid tooltip's background. Use GRID_CLR_DEFAULT (4278190080) to set to the default color according to the user's Windows color scheme. You can use the Grid.MakeColorRGB action to create the color value.

TitleTipTextColor

number

The color value to use for the grid tooltip's text. Use GRID_CLR_DEFAULT (4278190080) to set to the default color according to the user's Windows color scheme. You can use the Grid.MakeColorRGB action to create the color value.

Editable

boolean

True to set the grid as editable by the user, or false to not.

Selectable

boolean

True to allow the user to select grid cells with the mouse or keyboard, or false to not.

CellDragAndDrop

boolean

True to allow cells to be dragged and dropped by the user, or false to not.

ResizableRows

boolean

True to allow rows to be resized by the user, or false to not.

ResizableColumns

boolean

True to allow columns to be resized by the user, or false to not.

GridLines

number

A number that tells which grid lines to be displayed in the grid:

CONSTANT | VALUE | DESCRIPTION
GVL_NONE | 0 | None.
GVL_HORZ | 1 | Horizontal lines.
GVL_VERT | 2 | Vertical lines.
GVL_BOTH | 3 | Both.

FontName

string

The font name to set.

FontSize

number

The font size (in points) to set.

FontStrikeout

boolean

True to set font to strikeout, false to not.

FontUnderline

boolean

True to set font to underline, false to not.

FontAntiAlias

boolean

True to set font to anti-alias, false to not.

FontItalic

boolean

True to set font to italic, false to not.

FontWeight

number

The font weight to use (how 'dark' the text will appear):

CONSTANT | VALUE | DESCRIPTION
FW_DONTCARE | 0 | Font weight not specified.
FW_THIN | 100 | Font weight 'thin'.
FW_EXTRALIGHT | 200 | Font weight 'extra-light'.
FW_LIGHT | 300 | Font weight 'light'.
FW_NORMAL | 400 | Font weight 'normal'.
FW_MEDIUM | 500 | Font weight 'medium'.
FW_SEMIBOLD | 600 | Font weight 'semi-bold'.
FW_BOLD | 700 | Font weight 'bold'.
FW_EXTRABOLD | 800 | Font weight 'extra bold'.
FW_HEAVY | 900 | Font weight 'heavy'.

FontScript

number

The character set to use by the grid object:

CONSTANT | VALUE | DESCRIPTION
ANSI_CHARSET | 0 | ANSI character set.
BALTIC_CHARSET | 186 | Baltic character set.
CHINESEBIG5_CHARSET | 136 | Chinese character set.
DEFAULT_CHARSET | 1 | Default character set.
EASTEUROPE_CHARSET | 238 | Eastern European character set.
GB2312_CHARSET | 134 | GB2312 character set.
GREEK_CHARSET | 161 | Greek character set.
HANGUL_CHARSET | 129 | Hangul character set.
MAC_CHARSET | 77 | MAC character set.
OEM_CHARSET | 255 | OEM character set.
RUSSIAN_CHARSET | 204 | Russian character set.
SHIFTJIS_CHARSET | 128 | Shiftjis character set.
SYMBOL_CHARSET | 2 | Symbol character set.
TURKISH_CHARSET | 162 | Turkish character set.

Enabled

boolean

True to enable the grid object, false to disable it.

Visible

boolean

True to make the grid object visible, false to make it invisible..

X

number

The horizontal position (in pixels) to set the top left corner of the grid object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has an X value of 0

Y

number

The vertical position (in pixels) to set the top left corner of the grid object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has a Y value of 0

Width

number

The width (in pixels) to set for the grid object.

Height

number

The height (in pixels) to set for the grid object.

TooltipText

string

The mouseover tooltip to set for the grid object.

ResizeLeft

boolean

True if the left side of the object should move when the application is resized, false if it should not.

ResizeRight

boolean

True if the right side of the object should move when the application is resized, false if it should not.

ResizeTop

boolean

True if the top of the object should move when the application is resized, false if it should not.

ResizeBottom

boolean

True if the bottom of the object should move when the application is resized, false if it should not.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Grid.SetRedraw

Grid.SetRedraw (

string ObjectName,

boolean Redraw = true,

boolean RedrawScrollbars = true )

Description

Stops/starts redraws on things like changing the number of rows and columns and autosizing in a grid object, but not for user-intervention such as resizes.

Parameters

ObjectName

(string) The name of the grid object.

Redraw

(boolean) Whether redrawing is on or off. This is an optional argument and if omitted will default to true.

VALUE | DESCRIPTION
true | Set redrawing to be on. (Default)
false | Set redrawing to be off.

RedrawScrollbars

(boolean) Whether or not to redraw the scrollbars. This is an optional argument and if omitted will default to true.

VALUE | DESCRIPTION
true | Redraw the scrollbars.
false | Don't redraw the scrollbars.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Grid.SetRowCount

Grid.SetRowCount (

string ObjectName,

number RowCount )

Description

Sets the number of rows in a grid object.

Parameters

ObjectName

(string) The name of the grid object.

RowCount

(number) The number of rows that should be in the grid object.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Grid.SetRowHeight

Grid.SetRowHeight (

string ObjectName,

number Row,

number Height,

boolean Redraw = true )

Description

Sets the height of a row in pixels in a grid object.

Parameters

ObjectName

(string) The name of the grid object.

Row

(number) The (zero-based) index of the row.

Height

(number) The height of the row in pixels.

Redraw

(boolean) Whether the grid should be automatically redrawn after the operation. Usually you will want to set this to true. However there may be times when you want to perform a lot of grid actions and delay the redraw until later. This is an optional argument. If omitted it will default to true.

VALUE | DESCRIPTION
true | Automatically redraw the grid after the operation. (Default)
false | Delay the redraw until later.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Grid.SetRowHiding

Grid.SetRowHiding (

string ObjectName,

boolean AllowHiding = true )

Description

Sets whether or not rows can be contracted to 0 height by the user with the mouse in a grid object.

Parameters

ObjectName

(string) The name of the grid object.

AllowHiding

(boolean) Whether rows can be hidden. This is an optional argument and if omitted will default to true.

VALUE | DESCRIPTION
true | Rows can be hidden. (Default)
false | Rows cannot be hidden.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Grid.SetRowResize

Grid.SetRowResize (

string ObjectName,

boolean Resizable = true )

Description

Sets whether or not rows are resizable by the user in a grid object.

Parameters

ObjectName

(string) The name of the grid object.

Resizable

(boolean) Whether rows can be resized. This is an optional argument and if omitted will default to true.

VALUE | DESCRIPTION
true | Rows can be resized. (Default)
false | Rows cannot be resized.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Grid.SetSelectable

Grid.SetSelectable (

string ObjectName,

boolean Selectable )

Description

Sets whether or not the user can select grid cells with the mouse or keyboard in a grid object.

Parameters

ObjectName

(string) The name of the grid object.

Selectable

(boolean) Whether or not the grid cells are selectable.

VALUE | DESCRIPTION
true | Make grid cells selectable.
false | Don't make grid cells selectable.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Grid.SetSelectedRange

Grid.SetSelectedRange (

string ObjectName,

number MinRow,

number MinColumn,

number MaxRow,

number MaxColumn,

boolean SelectCells = true,

boolean Redraw = true )

Description

Selects or deselects a range of cells within a grid object.

Parameters

ObjectName

(string) The name of the grid object.

MinRow

(number) The (zero-based) index of the row to start selection at.

MinColumn

(number) The (zero-based) index of the column to start selection at.

MaxRow

(number) The (zero-based) index of the row to stop selection at.

MaxColumn

(number) The (zero-based) index of the column to stop selection at.

SelectCells

(boolean) Whether the cell range is selected or deselected. This is an optional argument and if omitted it will default to true.

VALUE | DESCRIPTION
true | Select the cell range.
false | Deselect the cell range.

Redraw

(boolean) Whether the grid should be automatically redrawn after the operation. Usually you will want to set this to true. However there may be times when you want to perform a lot of grid actions and delay the redraw until later. This is an optional argument. If omitted it will default to true.

VALUE | DESCRIPTION
true | Automatically redraw the grid after the operation. (Default)
false | Delay the redraw until later.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Grid.SetSingleColumnSelection

Grid.SetSingleColumnSelection (

string ObjectName,

boolean SingleColumnSelection )

Description

Sets the grid object into (or out of) single column selection mode. This mode is only effective when in list mode.

Parameters

ObjectName

(string) The name of the grid object.

SingleColumnSelection

(boolean) Whether or not single column selection is enabled.

VALUE | DESCRIPTION
true | Enable single column selection.
false | Disable single column selection.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Grid.SetSingleRowSelection

Grid.SetSingleRowSelection (

string ObjectName,

boolean SingleRowSelection )

Description

Sets the grid object into (or out of) single row selection mode. This mode is only effective when in list mode.

Parameters

ObjectName

(string) The name of the grid object.

SingleRowSelection

(boolean) Whether or not single row selection is enabled.

VALUE | DESCRIPTION
true | Enable single row selection.
false | Disable single row selection.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Grid.SetSize

Grid.SetSize (

string ObjectName,

number Width,

number Height )

Description

Sets the size of a grid object.

Parameters

ObjectName

(string) The name of the grid object.

Width

(number) The new width of the grid object in pixels.

Height

(number) The new height of the grid object in pixels.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Grid.SetSortAscending

Grid.SetSortAscending (

string ObjectName,

boolean Ascending )

Description

Sets whether the current sort column is sorted ascending in a grid object.

Parameters

ObjectName

(string) The name of the grid object.

Ascending

(boolean) Whether sort is ascending or descending.

VALUE | DESCRIPTION
true | Set sort as ascending.
false | Set sort as descending.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Grid.SetTabEnabled

Grid.SetTabEnabled (

string ObjectName,

boolean UseTabKey = true )

Description

Sets whether or not the Tab key is used to move the cell selection in a grid object.

Parameters

ObjectName

(string) The name of the grid object.

UseTabKey

(boolean) Whether the tab key is enabled for moving between cells. This is an optional argument and if omitted will default to true.

VALUE | DESCRIPTION
true | Enable tabbing between cells. (Default)
false | Disable tabbing between cells.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Grid.SetToolTipsEnabled

Grid.SetToolTipsEnabled (

string ObjectName,

boolean Tooltips )

Description

Sets whether or not tooltips will be displayed for cells that cannot contain all of their text in a grid object.

Parameters

ObjectName

(string) The name of the grid object.

Tooltips

(boolean) Whether or not tooltips will be displayed.

VALUE | DESCRIPTION
true | Display tooltips.
false | Don't display tooltips.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Grid.SetTrackFocusCell

Grid.SetTrackFocusCell (

string ObjectName,

boolean TrackFocus,

boolean Redraw = true )

Description

Sets whether or not the fixed cells on the same row/column as the current focus cell are highlighted with a sunken border in a grid object.

Parameters

ObjectName

(string) The name of the grid object.

TrackFocus

(boolean) Whether focus will be tracked.

VALUE | DESCRIPTION
true | Focus will be tracked.
false | Focus will not be tracked.

Redraw

(boolean) Whether the grid should be automatically redrawn after the operation. Usually you will want to set this to true. However there may be times when you want to perform a lot of grid actions and delay the redraw until later. This is an optional argument. If omitted it will default to true.

VALUE | DESCRIPTION
true | Automatically redraw the grid after the operation. (Default)
false | Delay the redraw until later.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Grid.SetUnhideColumn

Grid.SetUnhideColumn (

string ObjectName,

boolean AllowUnhide = true )

Description

Sets whether or not 0 width columns can be resized by the user via mouse in a grid object.

Parameters

ObjectName

(string) The name of the grid object.

AllowUnhide

(boolean) Sets whether or not hidden (0-width) columns can be unhidden by the user resizing the columns. This is an optional argument and if omitted will default to true.

VALUE | DESCRIPTION
true | Hidden columns can be unhidden by resizing. (Default)
false | Hidden columns cannot be unhidden by resizing.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Grid.SetUnhideRow

Grid.SetUnhideRow (

string ObjectName,

boolean AllowUnhide = true )

Description

Gets whether or not 0 height rows can be resized by the user via mouse in a grid object.

Parameters

ObjectName

(string) The name of the grid object.

AllowUnhide

(boolean) Sets whether or not hidden (0-height) rows can be unhidden by the user resizing the row. This is an optional argument and if omitted will default to true.

VALUE | DESCRIPTION
true | Hidden rows can be unhidden by resizing. (Default)
false | Hidden rows cannot be unhidden.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Grid.SetVisible

Grid.SetVisible (

string ObjectName,

boolean Visible = true )

Description

Sets the visibility of a grid object.

Parameters

ObjectName

(string) The name of the grid object.

Visible

(boolean) Whether to make the grid object visible or invisible:

VALUE | DESCRIPTION
true | Visible. (Default)
false | Invisible.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Grid.SortTextItems

Grid.SortTextItems (

string ObjectName,

number Column,

boolean Ascending,

boolean Redraw = true )

Description

Sorts a column alphabetically in ascending or descending order in a grid object.

Parameters

ObjectName

(string) The name of the grid object.

Column

(number) The zero-based index of the column.

Ascending

(boolean) Whether to sort in ascending or descending order.

VALUE | DESCRIPTION
true | Sort in ascending order.
false | Sort in descending order.

Redraw

(boolean) Whether the grid should be automatically redrawn after the operation. Usually you will want to set this to true. However there may be times when you want to perform a lot of grid actions and delay the redraw until later. This is an optional argument. If omitted it will default to true.

VALUE | DESCRIPTION
true | Automatically redraw the grid after the operation. (Default)
false | Delay the redraw until later.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Hotspot.GetPos

table Hotspot.GetPos (

string ObjectName )

Description

Returns the X and Y page or dialog coordinates of a hotspot object in pixels. This coordinate refers to the upper left hand corner of the object's bounding box relative to the page or dialog.

Note: The upper left hand corner of a page or dialog has X and Y coordinates of 0.

Parameters

ObjectName

(string) The name of the hotspot object.

Returns

(table) A table containing the object's current coordinates, indexed by values X and Y. If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Hotspot.GetProperties

table Hotspot.GetProperties (

string ObjectName )

Description

Returns a table containing the properties of a hotspot object.

Parameters

ObjectName

(string) The name of the hotspot object.

Returns

(table) A table containing the hotspot's properties, indexed by the following keys:

KEY

TYPE

DESCRIPTION

ObjectName

string

The name of the hotspot object.

Enabled

boolean

True if the hotspot object is enabled, false if it is not.

X

number

The horizontal position (in pixels) of the top left corner of the hotspot object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has an X value of 0

Y

number

The vertical position (in pixels) of the top left corner of the hotspot object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has a Y value of 0

Width

number

The width (in pixels) of the hotspot object.

Height

number

The height (in pixels) of the hotspot object.

TooltipText

string

The mouseover tooltip of the hotspot object.

Cursor

number

The mouse cursor that will be displayed when the mouse is over the hotspot object:

CONSTANT | VALUE | DESCRIPTION
CURSOR_ARROW | 0 | Standard mouse arrow cursor.
CURSOR_HAND | 1 | Hand cursor.
CURSOR_BLACK_ARROW | 2 | Black arrow cursor.
CURSOR_CROSSHAIR | 3 | Crosshair cursor.
CURSOR_EXPLORE | 4 | Explore cursor.
CURSOR_HELP | 5 | Help cursor.
CURSOR_MAGNIFY | 6 | Magnify cursor.
CURSOR_MEDIA | 7 | Media cursor.
CURSOR_MONEY | 8 | Money cursor.
CURSOR_NOTEPAD | 9 | Notepad cursor.
CURSOR_PENCIL | 10 | Pencil cursor.
CURSOR_PRINTER | 11 | Printer cursor.
CURSOR_SPEAKER | 12 | Speaker cursor.
CURSOR_UP_ARROW | 13 | Up arrow cursor.

ResizeLeft

boolean

True if the left side of the object will move when the application is resized, false if it is not.

ResizeRight

boolean

True if the right side of the object will move when the application is resized, false if it is not.

ResizeTop

boolean

True if the top of the object will move when the application is resized, false if it is not.

ResizeBottom

boolean

True if the bottom of the object will move when the application is resized, false if it is not.

HighlightSound

number

The type of sound that will be played when the mouse moves over the hotspot object.

CONSTANT | VALUE | DESCRIPTION
SND_NONE | 0 | No highlight sound.
SND_STANDARD | 1 | Standard highlight sound.
SND_CUSTOM | 2 | Custom highlight sound.

HighlightSoundFile

string

The path to the hotspot object's custom highlight sound file. If the hotspot object does not use a custom sound, this value will be an empty string ("").

ClickSound

number

The type of sound that will be played when the mouse clicks the hotspot object.

CONSTANT | VALUE | DESCRIPTION
SND_NONE | 0 | No click sound.
SND_STANDARD | 1 | Standard click sound.
SND_CUSTOM | 2 | Custom click sound.

ClickSoundFile

string

The path to the hotspot object's custom click sound file. If the hotspot object does not use a custom sound, this value will be an empty string ("").

If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Hotspot.GetSize

table Hotspot.GetSize (

string ObjectName )

Description

Returns the pixel dimensions of a hotspot object.

Parameters

ObjectName

(string) The name of the hotspot object.

Returns

(table) A table containing the object's pixel dimensions, indexed by values "Width" and "Height". If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Hotspot.IsEnabled

boolean Hotspot.IsEnabled (

string ObjectName )

Description

Returns true if a specific hotspot object is enabled, or false if it's disabled.

Note: When a hotspot object is disabled, it doesn't respond to user interaction at all.

Parameters

ObjectName

(string) The name of the hotspot object.

Returns

(boolean) True if the hotspot object is enabled, false if it is disabled. If an error occurs, false will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Hotspot.SetEnabled

Hotspot.SetEnabled (

string ObjectName,

boolean Enabled = true )

Description

Sets the enabled/disabled state of a hotspot object.

Note: When a hotspot object is disabled, it doesn't respond to the user at all.

Parameters

ObjectName

(string) The name of the hotspot object.

Enabled

(boolean) Whether to make the hotspot object enabled or disabled:

VALUE | DESCRIPTION
true | Enabled. (Default)
false | Disabled.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Hotspot.SetPos

Hotspot.SetPos (

string ObjectName,

number X,

number Y )

Description

Sets the X and Y pixel coordinates of a hotspot object relative to the page or dialog.

Parameters

ObjectName

(string) The name of the hotspot object.

X

(number) The new X pixel coordinate (horizontal position) to set for the hotspot object. This is the X coordinate of the upper left hand corner of the object's bounding box relative to the page or dialog.

Y

(number) The new Y pixel coordinate (vertical position) to set for the hotspot object. This is the Y coordinate of the upper left hand corner of the object's bounding box relative to the page or dialog.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Hotspot.SetProperties

Hotspot.SetProperties (

string ObjectName,

table Properties )

Description

Sets the properties of a hotspot object.

Parameters

ObjectName

(string) The name of the hotspot object.

Properties

(table) A table containing the hotspot object's properties indexed by the following keys:

KEY

TYPE

DESCRIPTION

Enabled

boolean

True if the hotspot object should be enabled, false if it should not be.

X

number

The horizontal position (in pixels) of the top left corner of the hotspot object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has an X value of 0

Y

number

The vertical position (in pixels) of the top left corner of the hotspot object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has a Y value of 0

Width

number

The width (in pixels) of the hotspot object.

Height

number

The height (in pixels) of the hotspot object.

TooltipText

string

The mouseover tooltip of the hotspot object. Tip: If you want a "&" character in the text, you must enter "&&&".

Cursor

number

The mouse cursor that will be displayed when the mouse is over the hotspot object:

CONSTANT | VALUE | DESCRIPTION
CURSOR_ARROW | 0 | Standard mouse arrow cursor.
CURSOR_HAND | 1 | Hand cursor.
CURSOR_BLACK_ARROW | 2 | Black arrow cursor.
CURSOR_CROSSHAIR | 3 | Crosshair cursor.
CURSOR_EXPLORE | 4 | Explore cursor.
CURSOR_HELP | 5 | Help cursor.
CURSOR_MAGNIFY | 6 | Magnify cursor.
CURSOR_MEDIA | 7 | Media cursor.
CURSOR_MONEY | 8 | Money cursor.
CURSOR_NOTEPAD | 9 | Notepad cursor.
CURSOR_PENCIL | 10 | Pencil cursor.
CURSOR_PRINTER | 11 | Printer cursor.
CURSOR_SPEAKER | 12 | Speaker cursor.
CURSOR_UP_ARROW | 13 | Up arrow cursor.

ResizeLeft

boolean

True if the left side of the object should move when the application is resized, false if it should not.

ResizeRight

boolean

True if the right side of the object should move when the application is resized, false if it should not.

ResizeTop

boolean

True if the top of the object should move when the application is resized, false if it should not.

ResizeBottom

boolean

True if the bottom of the object should move when the application is resized, false if it should not.

HighlightSound

number

The type of sound that will be played when the mouse moves over the hotspot object.

CONSTANT | VALUE | DESCRIPTION
SND_NONE | 0 | No highlight sound.
SND_STANDARD | 1 | Standard highlight sound.
SND_CUSTOM | 2 | Custom highlight sound.

HighlightSoundFile

string

The path to the hotspot object's custom highlight sound file. If the hotspot object does not use a custom sound, this value will be an empty string ("").

Note: For this to take effect, HighlightSound must be set to SND_CUSTOM.

ClickSound

number

The type of sound that will be played when the mouse clicks the hotspot object.

CONSTANT | VALUE | DESCRIPTION
SND_NONE | 0 | No click sound.
SND_STANDARD | 1 | Standard click sound.
SND_CUSTOM | 2 | Custom click sound.

ClickSoundFile

string

The path to the hotspot object's custom click sound file. If the hotspot object does not use a custom sound, this value will be an empty string ("").

Note: For this to take effect, ClickSound must be set to SND_CUSTOM.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Hotspot.SetSize

Hotspot.SetSize (

string ObjectName,

number Width,

number Height )

Description

Sets the size of a hotspot object.

Parameters

ObjectName

(string) The name of the hotspot object.

Width

(number) The new width of the hotspot object in pixels.

Height

(number) The new height of the hotspot object in pixels.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


HTTP.Download

HTTP.Download (

string URL,

string Filename,

number Mode = MODE_BINARY,

number Timeout = 20,

number Port = 80,

table AuthData = nil,

table ProxyData = nil,

function CallbackFunction = nil )

Description

Downloads a file from an Internet Web site.

Note: The default proxy settings that are currently configured through Internet Explorer will be used for the download by default, and is the recommended method. However if you require alternate proxy settings, they can be passed through the ProxyData parameter.

Tip: If this action fails, you can retrieve specific HTTP error details using HTTP.GetHTTPErrorInfo.

Parameters

URL

(string) The full URL to the file you want to download.

Filename

(string) The destination path and filename of the file you want to download. For example, C:\\MyFolder\\patch.zip.

Mode

(number) The mode you want to use to save the file. Choose from:

CONSTANT | VALUE | DESCRIPTION
MODE_BINARY | 0 | Save the file exactly as downloaded. (Default)
MODE_TEXT | 1 | Convert the file from Unix to Windows text mode, if necessary.

Timeout

(number) The maximum time in seconds that the action will wait for a response after attempting to connect. The default value is 20.

Note: Timeout values are interpreted in multiple ways during client server communication. As a result the actual timeout used by the connection may differ from the value specified.

Port

(number) The port to connect to. In most cases the default value of 80 is fine.

AuthData

(table) A table containing basic HTTP authentication information that can be used to gain access to the file. (This parameter is optional. If the download does not require HTTP authentication, just leave this parameter blank.) The table is indexed by the following keys:

KEY | TYPE | DESCRIPTION
UserName | string | The user name to be used during HTTP authentication.
Password | string | The password to be used during HTTP authentication.

ProxyData

(table)A table containing the user's proxy information. You can pass nil (the default) to use the default proxy settings that are currently configured through Internet Explorer (recommended), or pass a table of specific proxy settings. (You may need to gather this information from the user.)

The table is indexed by the following keys:

KEY | TYPE | DESCRIPTION
PUserName | string | The proxy user name.
PPassword | string | The proxy password.
PServerAddress | string | The proxy server address.

CallbackFunction

(function) The name of a function that will be called whenever progress is made in the download operation. (You can use this callback function to display the progress of the download in your own custom way.)

Note: If CallbackFunction is set to nil, then the progress information will be sent to the built-in status dialog, assuming it is currently visible. (You can show or hide the status dialog with a StatusDlg.Show or StatusDlg.Hide action.)

The callback function must be able to receive the following parameters:

BytesRead

(number) The number of bytes that have been downloaded so far.

FileSize

(number) The file size in bytes, 0 if the file size could not be retrieved from the server.

Note: If a redirection is used when accessing the file, it's size may not be available and zero will be passed as FileSize.

TransferRate

(number) The current transfer rate in Kilobytes per second.

SecondsLeft

(number) The estimated number of seconds left in the download.

SecondsLeftFormat

(string) The estimated number of seconds left formatted as a string in the form of: ""MM:SS".

Message

(string) Either a blank string ("") or an information message being sent by the server, such as "Resolving host name" or "Connecting to Server."

Note: If this parameter is not a blank string, it means that it is in a busy state, either before the download has begun, or at the end of the download. In this case all other parameters will be ignored.

The callback function should return a boolean value (true or false) indicating whether the download should continue:

VALUE | DESCRIPTION
true | Continue with the file download.
false | Stop the file download as soon as possible.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


HTTP.DownloadSecure

HTTP.DownloadSecure (

string URL,

string Filename,

number Mode = MODE_BINARY,

number Timeout = 20,

number Port = 443,

table AuthData = nil,

table ProxyData = nil,

function CallbackFunction = nil )

Description

Downloads a file from an Internet Web site using HTTPS (secure hypertext transfer protocol).

The secure hypertext transfer protocol (HTTPS) is a communications protocol designed to transfer encrypted information between computers over the World Wide Web. HTTPS is http using a Secure Socket Layer (SSL). A secure socket layer is an encryption protocol invoked on a Web server that uses HTTPS.

Note: The successful use of the HTTPS protocol requires a secure server to handle the request.

Note: This action requires that the end user has Internet Explorer version 4.0 or greater installed.

Note: The default proxy settings that are currently configured through Internet Explorer will be used for the download by default, and is the recommended method. However if you require alternate proxy settings, they can be passed through the ProxyData parameter.

Tip: If this action fails, you can retrieve specific HTTP error details using HTTP.GetHTTPErrorInfo.

Parameters

URL

(string) The full URL to the file you want to download.

Filename

(string) The destination path and filename of the file you want to download. For example, C:\\MyFolder\\patch.zip.

Mode

(number) The mode you want to use to save the file. Choose from:

CONSTANT | VALUE | DESCRIPTION
MODE_BINARY | 0 | Save the file exactly as downloaded. (Default)
MODE_TEXT | 1 | Convert the file from Unix to Windows text mode, if necessary.

Timeout

(number) The maximum time in seconds that the action will wait for a response after attempting to connect. The default value is 20.

Note: Timeout values are interpreted in multiple ways during client server communication. As a result the actual timeout used by the connection may differ from the value specified.

Port

(number) The port to connect to. The default value is 443.

AuthData

(table) A table containing basic HTTP authentication information that can be used to gain access to the file. (This parameter is optional. If the download does not require HTTP authentication, just leave this parameter blank.) The table is indexed by the following keys:

KEY | TYPE | DESCRIPTION
UserName | string | The user name to be used during HTTP authentication.
Password | string | The password to be used during HTTP authentication.

ProxyData

(table) A table containing the user's proxy information. You can pass nil (the default) to use the default proxy settings that are currently configured through Internet Explorer (recommended), or pass a table of specific proxy settings. (You may need to gather this information from the user.)

The table is indexed by the following keys:

KEY | TYPE | DESCRIPTION
PUserName | string | The proxy user name.
PPassword | string | The proxy password.
PServerAddress | string | The proxy server address.

CallbackFunction

(function) The name of a function that will be called whenever progress is made in the download operation. (You can use this callback function to display the progress of the download in your own custom way.)

Note: If CallbackFunction is set to nil, then the progress information will be sent to the built-in status dialog, assuming it is currently visible. (You can show or hide the status dialog with a StatusDlg.Show or StatusDlg.Hide action.)

The callback function must be able to receive the following parameters:

BytesRead

(number) The number of bytes that have been downloaded so far.

FileSize

(number) The file size in bytes, 0 if the file size could not be retrieved from the server.

Note: If a redirection is used when accessing the file, it's size may not be available and zero will be passed as FileSize.

TransferRate

(number) The current transfer rate in Kilobytes per second.

SecondsLeft

(number) The estimated number of seconds left in the download.

SecondsLeftFormat

(string) The estimated number of seconds left formatted as a string in the form of: ""MM:SS".

Message

(string) Either a blank string ("") or an information message being sent by the server, such as "Resolving host name" or "Connecting to Server."

Note: If this parameter is not a blank string, it means that it is in a busy state, either before the download has begun, or at the end of the download. In this case all other parameters will be ignored.

The callback function should return a boolean value (true or false) indicating whether the download should continue:

VALUE | DESCRIPTION
true | Continue with the file download.
false | Stop the file download as soon as possible.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


HTTP.GetConnectionState

table HTTP.GetConnectionState (

)

Description

Retrieves the connected state of the local system.

Note: This action requires that the end user has Internet Explorer version 4.0 or greater installed.

Note: You cannot rely solely on the fact that the Connected result of HTTP.GetConnectionState returning true means that you have a valid active Internet connection. It is impossible for HTTP.GetConnectionState to determine if the entire connection to the Internet is functioning without sending a request to a server. This is why you need to send a request to determine if you are really connected or not. You can be assured however that if the Connected value of HTTP.GetConnectionState returns true, that attempting your connection will NOT cause you to be prompted to connect to the default Internet Service Provider.

Parameters

None.

Returns

(table) A table containing the user's Internet connection information, indexed by the following categories:

Note: If the user has a version of Internet Explorer that is less than 4.0, nil will be returned.

KEY | TYPE | DESCRIPTION
Connected | boolean | Whether or not the user is connected to the Internet. If the user is connected, true is returned. If they are not connected, false is returned. You can access this value using tb.Connected.
Modem | boolean | Whether or not the local system uses a modem to connect to the Internet. If a modem is used, true is returned. If a modem is not used, false is returned. You can access this value using tb.Modem.
LAN | boolean | Whether or not the local system uses a local area network to connect to the Internet. If a LAN is used, true is returned. If a LAN is not used, false is returned. You can access this value using tb.Lan.
Proxy | boolean | Whether or not the local system uses a proxy server to connect to the Internet. If a proxy server is used, true is returned. If a proxy server is not used, false is returned. You can access this value using tb.Proxy.
RASInstalled | boolean | Whether or not the local system has RAS (Remote Access Service) installed. If a RAS is installed, true is returned. If RAS is not installed, false is returned. You can access this value using tb.RASInstalled.
ConnectionOffline | boolean | Whether or not the local system is in offline mode. If the system is offline, true is returned. If the system is not offline, false is returned. You can access this value using tb.ConnectionOffline.
ConnectionConfigured | boolean | Whether or not the local system has a valid connection to the Internet, but it might or might not be currently connected. If the system has a valid connection, true is returned. If the system does not have a valid connection, false is returned. You can access this value using tb.ConnectionConfigured.

You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


HTTP.GetFileSize

number HTTP.GetFileSize (

string URL,

number Mode = MODE_BINARY,

number Timeout = 20,

number Port = 80,

table AuthData = nil,

table ProxyData = nil,

function CallbackFunction = nil )

Description

Gets the size (in bytes) of a file located on an Internet Web site.

Note: The default proxy settings that are currently configured through Internet Explorer will be used to get the file size by default, and is the recommended method. However if you require alternate proxy settings, they can be passed through the ProxyData parameter.

Tip: If this action fails, you can retrieve specific HTTP error details using HTTP.GetHTTPErrorInfo.

Parameters

URL

(string) The full URL to the file you want to get the size of.

Mode

(number) The mode you want to use to access the file. Choose from:

CONSTANT | VALUE | DESCRIPTION
MODE_BINARY | 0 | Save the file exactly as downloaded. (Default)
MODE_TEXT | 1 | Convert the file from Unix to Windows text mode, if necessary.

Note: This parameter is mainly present for consistency between HTTP actions.

Timeout

(number) The maximum time in seconds that the action will wait for a response after attempting to connect. The default value is 20.

Note: Timeout values are interpreted in multiple ways during client server communication. As a result the actual timeout used by the connection may differ from the value specified.

Port

(number) The port to connect to. In most cases the default value of 80 is fine.

AuthData

(table) A table containing basic HTTP authentication information that can be used to gain access to the file. (This parameter is optional. If accessing the file does not require HTTP authentication, just leave this parameter blank.) The table is indexed by the following keys:

KEY | TYPE | DESCRIPTION
UserName | string | The user name to be used during HTTP authentication.
Password | string | The password to be used during HTTP authentication.

ProxyData

(table) A table containing the user's proxy information. You can pass nil (the default) to use the default proxy settings that are currently configured through Internet Explorer (recommended), or pass a table of specific proxy settings. (You may need to gather this information from the user.)

The table is indexed by the following keys:

KEY | TYPE | DESCRIPTION
PUserName | string | The proxy user name.
PPassword | string | The proxy password.
PServerAddress | string | The proxy server address.

CallbackFunction

(function) The name of a function that will be called whenever progress is made in the file access operation. (You can use this callback function to display the progress of the operation in your own custom way.)

Note: If CallbackFunction is set to nil, then the progress information will be sent to the built-in status dialog, assuming it is currently visible. (You can show or hide the status dialog with a StatusDlg.Show or StatusDlg.Hide action.)

The callback function must be able to receive the following parameter:

Message

(string) Either a blank string ("") or an information message being sent by the server, such as "Resolving host name" or "Connecting to Server."

The callback function should return a boolean value (true or false) indicating whether the file access should continue:

VALUE | DESCRIPTION
true | Continue with the file access.
false | Stop the file access as soon as possible.

Returns

(number) The size of the file on the Internet Web site (in bytes). If the file's size could not be retrieved, -1 is returned. You can use Application.GetLastError to determine whether this action failed, and why.


HTTP.GetFileSizeSecure

number HTTP.GetFileSizeSecure (

string URL,

number Mode = MODE_BINARY,

number Timeout = 20,

number Port = 443,

table AuthData = nil,

table ProxyData = nil,

function CallbackFunction = nil )

Description

Gets the size of a file (in bytes) located on an Internet Web site using HTTPS (secure hypertext transfer protocol).

The secure hypertext transfer protocol (HTTPS) is a communications protocol designed to transfer encrypted information between computers over the World Wide Web. HTTPS is http using a Secure Socket Layer (SSL). A secure socket layer is an encryption protocol invoked on a Web server that uses HTTPS.

Note: The successful use of the HTTPS protocol requires a secure server to handle the request.

Note: This action requires that the end user has Internet Explorer version 4.0 or greater installed.

Note: The default proxy settings that are currently configured through Internet Explorer will be used for the download by default, and is the recommended method. However if you require alternate proxy settings, they can be passed through the ProxyData parameter.

Tip: If this action fails, you can retrieve specific HTTP error details using HTTP.GetHTTPErrorInfo.

Parameters

URL

(string) The full URL to the file you want to get the size of.

Mode

(number) The mode you want to use to access the file. Choose from:

CONSTANT | VALUE | DESCRIPTION
MODE_BINARY | 0 | Save the file exactly as downloaded. (Default)
MODE_TEXT | 1 | Convert the file from Unix to Windows text mode, if necessary.

Note: This parameter is mainly present for consistency between HTTP actions.

Timeout

(number) The maximum time in seconds that the action will wait for a response after attempting to connect. The default value is 20.

Note: Timeout values are interpreted in multiple ways during client server communication. As a result the actual timeout used by the connection may differ from the value specified.

Port

(number) The port to connect to. The default value is 443.

AuthData

(table) A table containing basic HTTP authentication information that can be used to gain access to the file. (This parameter is optional. If the download does not require HTTP authentication, just leave this parameter blank.) The table is indexed by the following keys:

KEY | TYPE | DESCRIPTION
UserName | string | The user name to be used during HTTP authentication.
Password | string | The password to be used during HTTP authentication.

ProxyData

(table) A table containing the user's proxy information. You can pass nil (the default) to use the default proxy settings that are currently configured through Internet Explorer (recommended), or pass a table of specific proxy settings. (You may need to gather this information from the user.)

The table is indexed by the following keys:

KEY | TYPE | DESCRIPTION
PUserName | string | The proxy user name.
PPassword | string | The proxy password.
PServerAddress | string | The proxy server address.

CallbackFunction

(function) The name of a function that will be called whenever progress is made in the file access operation. (You can use this callback function to display the file access operation in your own custom way.)

Note: If CallbackFunction is set to nil, then the progress information will be sent to the built-in status dialog, assuming it is currently visible. (You can show or hide the status dialog with a StatusDlg.Show or StatusDlg.Hide action.)

The callback function must be able to receive the following parameter:

Message

(string) Either a blank string ("") or an information message being sent by the server, such as "Resolving host name" or "Connecting to Server."

The callback function should return a boolean value (true or false) indicating whether the file access should continue:

VALUE | DESCRIPTION
true | Continue with the file access.
false | Stop the file access as soon as possible.

Returns

(number) The size of the file on the Internet Web site (in bytes). If the file's size could not be retrieved, -1 is returned. You can use Application.GetLastError to determine whether this action failed, and why.


HTTP.GetHTTPErrorInfo

table HTTP.GetHTTPErrorInfo (

)

Description

Retrieves HTTP specific information about the last HTTP action that was performed.

For example, if you perform an HTTP.Download and an error occurs, you can use this action to retrieve HTTP information about that error.

Parameters

None.

Returns

(table) A table containing the HTTP error information indexed by the following keys:

KEY | TYPE | DESCRIPTION
Number | number | The WinInet error code.
Message | string | The WinInet Error string associated with the error code.
Status | number | The HTTP status code associated with the last error. Status codes are categorized into the following groups: 200-299 Success 300-399 Information 400-499 Request error 500-599 Server error Some common HTTP Status Codes: 200 URL located, transmission follows 400 Unintelligible request 404 Requested URL not found 405 Server does not support requested method 500 Unknown server error 503 Server capacity reached

Note: The Number and Message fields in the table generally report on whether the HTTP transaction itself was successful, for example the proper parameters were passed, an internet connection existed, and the information was actually sent to the server. The Status field contains information on the overall status of the operation at the server end, such as whether the server understood the request, and whether it was actually able to serve up the requested file.

You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


HTTP.Submit

string HTTP.Submit (

string URL,

table Values,

number Method = SUBMITWEB_GET,

number Timeout = 20,

number Port = 80,

table AuthData = nil,

table ProxyData = nil )

Description

Submits data to an Internet Web site and returns the response from the server.

Note: The default proxy settings that are currently configured through Internet Explorer will be used for submitting the data by default, and is the recommended method. However if you require alternate proxy settings, they can be passed through the ProxyData parameter.

Tip: If this action fails, you can retrieve specific HTTP error details using HTTP.GetHTTPErrorInfo.

Parameters

URL

(string) The full URL to the file you want to submit to.

Values

(table) The table of named value pairs to pass to the script. Each named value pair should have the form name="value".

For Example: {color="silver", make="Porsche", model="911 Turbo"}

Method

(number) The submission method to use. Choose from:

CONSTANT | VALUE | DESCRIPTION
SUBMITWEB_GET | 1 | The GET method will be used to submit the data. (Default)
SUBMITWEB_POST | 0 | The POST method will be used to submit the data.

Note: If you are not sure of the difference, please consult a book or Web site about CGI programming.

Timeout

(number) The maximum time in seconds that the action will wait for a response after attempting to connect. The default value is 20.

Note: Timeout values are interpreted in multiple ways during client server communication. As a result the actual timeout used by the connection may differ from the value specified.

Port

(number) The port to connect to. In most cases the default value of 80 is fine.

AuthData

(table) A table containing basic HTTP authentication information that can be used to gain access to the file. (This parameter is optional. If the submission does not require HTTP authentication, just leave this parameter blank.) The table is indexed by the following keys:

KEY | TYPE | DESCRIPTION
UserName | string | The user name to be used during HTTP authentication.
Password | string | The password to be used during HTTP authentication.

ProxyData

(table) A table containing the user's proxy information. You can pass nil (the default) to use the default proxy settings that are currently configured through Internet Explorer (recommended), or pass a table of specific proxy settings. (You may need to gather this information from the user.)

The table is indexed by the following keys:

KEY | TYPE | DESCRIPTION
PUserName | string | The proxy user name.
PPassword | string | The proxy password.
PServerAddress | string | The proxy server address.

Returns

(string) The contents of the file returned by the web script. If an error occurs, a blank string "" is returned. You can use Application.GetLastError to determine whether this action failed, and why.


HTTP.SubmitSecure

string HTTP.SubmitSecure (

string URL,

table Values,

number Method = SUBMITWEB_GET,

number Timeout = 20,

number Port = 443,

table AuthData = nil,

table ProxyData = nil )

Description

Submits data to an Internet Web site using HTTPS (secure hypertext transfer protocol) and returns the response from the server.

The secure hypertext transfer protocol (HTTPS) is a communications protocol designed to transfer encrypted information between computers over the World Wide Web. HTTPS is http using a Secure Socket Layer (SSL). A secure socket layer is an encryption protocol invoked on a Web server that uses HTTPS.

Note: The successful use of the HTTPS protocol requires a secure server to handle the request.

Note: This action requires that the end user has Internet Explorer version 4.0 or greater installed.

Note: The default proxy settings that are currently configured through Internet Explorer will be used for submitting the data by default, and is the recommended method. However if you require alternate proxy settings, they can be passed through the ProxyData parameter.

Tip: If this action fails, you can retrieve specific HTTP error details using HTTP.GetHTTPErrorInfo.

Parameters

URL

(string) The full URL to the file you want to submit to.

Values

(table) The table of named value pairs to pass to the script. Each named value pair should have the form name="value".

For Example: {color="silver", make="Porsche", model="911 Turbo"}

Method

(number) The submission method to use. Choose from:

CONSTANT | VALUE | DESCRIPTION
SUBMITWEB_GET | 1 | The GET method will be used to submit the data. (Default)
SUBMITWEB_POST | 0 | The POST method will be used to submit the data.

Note: If you are not sure of the difference, please consult a book or Web site about CGI programming.

Timeout

(number) The maximum time in seconds that the action will wait for a response after attempting to connect. The default value is 20.

Note: Timeout values are interpreted in multiple ways during client server communication. As a result the actual timeout used by the connection may differ from the value specified.

Port

(number) The port to connect to. The port to connect to. The default value is 443.

AuthData

(table) A table containing basic HTTP authentication information that can be used to gain access to the file. (This parameter is optional. If the submission does not require HTTP authentication, just leave this parameter blank.) The table is indexed by the following keys:

KEY | TYPE | DESCRIPTION
UserName | string | The user name to be used during HTTP authentication.
Password | string | The password to be used during HTTP authentication.

ProxyData

(table) A table containing the user's proxy information. You can pass nil (the default) to use the default proxy settings that are currently configured through Internet Explorer (recommended), or pass a table of specific proxy settings. (You may need to gather this information from the user.)

The table is indexed by the following keys:

KEY | TYPE | DESCRIPTION
PUserName | string | The proxy user name.
PPassword | string | The proxy password.
PServerAddress | string | The proxy server address.

Returns

(string) The contents of the file returned by the web script. If an error occurs, a blank string "" is returned. You can use Application.GetLastError to determine whether this action failed, and why.


HTTP.TestConnection

boolean HTTP.TestConnection (

string URL,

number Timeout = 20,

number Port = 80,

table AuthData = nil,

table ProxyData = nil )

Description

Checks whether the user is connected to the Internet.

Note: The default proxy settings that are currently configured through Internet Explorer will be used for testing the connection by default, and is the recommended method. However if you require alternate proxy settings, they can be passed through the ProxyData parameter.

Tip: If this action fails, you can retrieve specific HTTP error details using HTTP.GetHTTPErrorInfo.

Parameters

URL

(string) The full URL to use to check the Internet connection. The action will attempt to connect to this URL in order to determine if a connection is available.

Note: If the URL involves redirection, the initial connection will indicate success, and the redirected URL will not be connected to.

Timeout

(number) The maximum time in seconds that the action will wait for a response after attempting to connect. The default value is 20.

Note: Timeout values are interpreted in multiple ways during client server communication. As a result the actual timeout used by the connection may differ from the value specified.

Port

(number) The port to connect to. In most cases the default value of 80 is fine.

AuthData

(table) A table containing basic HTTP authentication information that can be used to gain access to the site. (This parameter is optional. If the site does not require HTTP authentication, just leave this parameter blank.) The table is indexed by the following keys:

KEY | TYPE | DESCRIPTION
UserName | string | The user name to be used during HTTP authentication.
Password | string | The password to be used during HTTP authentication.

ProxyData

(table) A table containing the user's proxy information. You can pass nil (the default) to use the default proxy settings that are currently configured through Internet Explorer (recommended), or pass a table of specific proxy settings. (You may need to gather this information from the user.)

The table is indexed by the following keys:

KEY | TYPE | DESCRIPTION
PUserName | string | The proxy user name.
PPassword | string | The proxy password.
PServerAddress | string | The proxy server address.

Returns

(boolean) True if the URL could be connected to, or false if it could not or an error occurs. You can use Application.GetLastError to determine whether this action failed, and why.


Image.GetFileInfo

table Image.GetFileInfo (

string Filename )

Description

Returns the width, height and bit depth of an image file.

Parameters

Filename

(string) The full path to the image file.

Returns

(table) A table containing the object's pixel dimensions and bit depth, indexed by values "Width", "Height" and "BitDepth." If an error occurs (for example, the file doesn't exist), nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Image.GetFilename

string Image.GetFilename (

string ObjectName )

Description

Returns the full path to the image file currently displayed in an image object.

Parameters

ObjectName

(string) The name of the image object.

Returns

(string) The full path to the image file. If an error occurs (such as the file not being found), a blank string "" will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Image.GetOpacity

number Image.GetOpacity (

string ObjectName )

Description

Returns a number representing the opacity of an image object.

Parameters

ObjectName

(string) The name of the image object.

Returns

(number) A value from 0 to 100 representing the opacity of the image object. A value of 100 means the image is completely opaque (fully visible) and the value 0 means the image is completely transparent (invisible). Any values in between means the image is translucent (see through). If an error occurs, -1 will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Image.GetPos

table Image.GetPos (

string ObjectName )

Description

Returns the X and Y page or dialog coordinates of an image object in pixels. This coordinate refers to the upper left hand corner of the object's bounding box relative to the page or dialog.

Note: The upper left hand corner of a page or dialog has X and Y coordinates of 0.

Parameters

ObjectName

(string) The name of the image object.

Returns

(table) A table containing the object's current coordinates, indexed by values X and Y. If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Image.GetProperties

table Image.GetProperties (

string ObjectName )

Description

Returns a table containing the properties of an image object.

Parameters

ObjectName

(string) The name of the image object.

Returns

(table) A table containing the image's properties, indexed by the following keys:

KEY

TYPE

DESCRIPTION

ImageFile

string

The currently loaded image file.

UseTransColor

boolean

True if a transparent color should be used, false if it should not be.

TransparentColor

number

The color being used as a transparent color in the image object.

Tolerance

number

The tolerance being used for the transparent color, between 0 and 100. 0 requires an exact match to TransparentColor. Increasing this value allows shades of TrasnparentColor to be transparent as well.

Opacity

number

Number between 0 and 100 corresponding to the percent opacity that the image object will observe. A value of 0 makes the image invisible while a value of 100 makes the image 100% visible.

HitTest

number

Whether AutoPlay will allow the mouse to interact with the image when it is anywhere within the bounds of the image object, or only when it is on a non-transparent section of the image itself:

CONSTANT | VALUE | DESCRIPTION
HITTEST_STANDARD | 0 | The mouse will interact with the image object anywhere within the bounds of the object.
HITTEST_ALPHA | 1 | The mouse will interact with the image object on any part of the image which is not transparent.

ObjectName

string

The name of the image object.

Enabled

boolean

True if the image object is enabled, false if it is not.

Visible

boolean

True if the image object is visible, false if it is not.

X

number

The horizontal position (in pixels) of the top left corner of the image object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has an X value of 0

Y

number

The vertical position (in pixels) of the top left corner of the image object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has a Y value of 0

Width

number

The width (in pixels) of the image object.

Height

number

The height (in pixels) of the image object.

TooltipText

string

The mouseover tooltip of the image object.

Cursor

number

The mouse cursor that will be displayed when the mouse is over the image object:

CONSTANT | VALUE | DESCRIPTION
CURSOR_ARROW | 0 | Standard mouse arrow cursor.
CURSOR_HAND | 1 | Hand cursor.
CURSOR_BLACK_ARROW | 2 | Black arrow cursor.
CURSOR_CROSSHAIR | 3 | Crosshair cursor.
CURSOR_EXPLORE | 4 | Explore cursor.
CURSOR_HELP | 5 | Help cursor.
CURSOR_MAGNIFY | 6 | Magnify cursor.
CURSOR_MEDIA | 7 | Media cursor.
CURSOR_MONEY | 8 | Money cursor.
CURSOR_NOTEPAD | 9 | Notepad cursor.
CURSOR_PENCIL | 10 | Pencil cursor.
CURSOR_PRINTER | 11 | Printer cursor.
CURSOR_SPEAKER | 12 | Speaker cursor.
CURSOR_UP_ARROW | 13 | Up arrow cursor.

ResizeLeft

boolean

True if the left side of the object will move when the application is resized, false if it is not.

ResizeRight

boolean

True if the right side of the object will move when the application is resized, false if it is not.

ResizeTop

boolean

True if the top of the object will move when the application is resized, false if it is not.

ResizeBottom

boolean

True if the bottom of the object will move when the application is resized, false if it is not.

HighlightSound

number

The type of sound that will be played when the mouse moves over the image object.

CONSTANT | VALUE | DESCRIPTION
SND_NONE | 0 | No highlight sound.
SND_STANDARD | 1 | Standard highlight sound.
SND_CUSTOM | 2 | Custom highlight sound.

HighlightSoundFile

string

The path to the image object's custom highlight sound file. If the image object does not use a custom sound, this value will be an empty string ("").

ClickSound

number

The type of sound that will be played when the mouse clicks the image object.

CONSTANT | VALUE | DESCRIPTION
SND_NONE | 0 | No click sound.
SND_STANDARD | 1 | Standard click sound.
SND_CUSTOM | 2 | Custom click sound.

ClickSoundFile

string

The path to the image object's custom click sound file. If the image object does not use a custom sound, this value will be an empty string ("").

If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Image.GetSize

table Image.GetSize (

string ObjectName )

Description

Returns the pixel dimensions of an image object.

Parameters

ObjectName

(string) The name of the image object.

Returns

(table) A table containing the object's pixel dimensions, indexed by values "Width" and "Height". If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Image.IsEnabled

boolean Image.IsEnabled (

string ObjectName )

Description

Returns true if a specific image object is enabled, or false if it's disabled.

Note: When an image object is disabled, it doesn't respond to user interaction at all.

Parameters

ObjectName

(string) The name of the image object.

Returns

(boolean) True if the image object is enabled, false if it is disabled. If an error occurs, false will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Image.IsVisible

boolean Image.IsVisible (

string ObjectName )

Description

Returns true if a specific image object is visible, and false if it isn't.

Parameters

ObjectName

(string) The name of the image object.

Returns

(boolean) True if the image object is visible, false if it's invisible. If an error occurs, false will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Image.Load

Image.Load (

string ObjectName,

string Filename )

Description

Loads an image file into an image object.

Parameters

ObjectName

(string) The name of the image object.

Filename

(string) The path to the image file. Click the browse button to select a file.

Note: The following image formats are supported in the image object: JPG, BMP, TIFF, GIF, PhotoCD, Photoshop, WBMP, PNG, PCX, PAX, TLA, WMF, EMF, APM and TGA.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Image.SetEnabled

Image.SetEnabled (

string ObjectName,

boolean Enabled = true )

Description

Sets the enabled/disabled state of an image object.

Note: When an image object is disabled, it doesn't respond to the user at all.

Parameters

ObjectName

(string) The name of the image object.

Enabled

(boolean) Whether to make the image object enabled or disabled:

VALUE | DESCRIPTION
true | Enabled. (Default)
false | Disabled.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Image.SetOpacity

Image.SetOpacity (

string ObjectName,

number Opacity = 100 )

Description

Sets the opacity of an image object.

Parameters

ObjectName

(string) The name of the image object.

Opacity

(number) The opacity value (0-100) you want to set for the image object. A value of 100 will make the image completely opaque (fully visible) and the value 0 will make the image completely transparent (invisible). Any values in between will make the image translucent (see through).

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Image.SetPos

Image.SetPos (

string ObjectName,

number X,

number Y )

Description

Sets the X and Y pixel coordinates of an image object relative to the page or dialog.

Parameters

ObjectName

(string) The name of the image object.

X

(number) The new X pixel coordinate (horizontal position) to set for the image object. This is the X coordinate of the upper left hand corner of the object's bounding box relative to the page or dialog.

Y

(number) The new Y pixel coordinate (vertical position) to set for the image object. This is the Y coordinate of the upper left hand corner of the object's bounding box relative to the page or dialog.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Image.SetProperties

Image.SetProperties (

string ObjectName,

table Properties )

Description

Sets the properties of an image object.

Parameters

ObjectName

(string) The name of the image object.

Properties

(table) A table containing the image object's properties indexed by the following keys:

KEY

TYPE

DESCRIPTION

ImageFile

string

The image file to load.

UseTransColor

boolean

Whether to use a transparent color in the image object.

TransparentColor

number

The color to use as a transparent color in the image object.

Tolerance

number

The tolerance to use for the transparent color, between 0 and 100. 0 requires an exact match to TransparentColor. Increasing this value allows shades of TrasnparentColor to be transparent as well.

Opacity

number

Number between 0 and 100 corresponding to the percent opacity that the image object will observe. A value of 0 makes the image invisible while a value of 100 makes the image 100% visible.

HitTest

number

Whether AutoPlay should allow the mouse to interact with the image when it is anywhere within the bounds of the image object, or only when it is on a non-transparent section of the image itself:

CONSTANT | VALUE | DESCRIPTION
HITTEST_STANDARD | 0 | The mouse should interact with the image object anywhere within the bounds of the object.
HITTEST_ALPHA | 1 | The mouse should interact with the image object on any part of the image which is not transparent.

Enabled

boolean

True if the image object should be enabled, false if it should not be.

Visible

boolean

True if the image object should be visible, false if it should not be.

X

number

The horizontal position (in pixels) of the top left corner of the image object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has an X value of 0

Y

number

The vertical position (in pixels) of the top left corner of the image object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has a Y value of 0

Width

number

The width (in pixels) of the image object.

Height

number

The height (in pixels) of the image object.

TooltipText

string

The mouseover tooltip of the image object. Tip: If you want a "&" character in the text, you must enter "&&&".

Cursor

number

The mouse cursor that will be displayed when the mouse is over the image object:

CONSTANT | VALUE | DESCRIPTION
CURSOR_ARROW | 0 | Standard mouse arrow cursor.
CURSOR_HAND | 1 | Hand cursor.
CURSOR_BLACK_ARROW | 2 | Black arrow cursor.
CURSOR_CROSSHAIR | 3 | Crosshair cursor.
CURSOR_EXPLORE | 4 | Explore cursor.
CURSOR_HELP | 5 | Help cursor.
CURSOR_MAGNIFY | 6 | Magnify cursor.
CURSOR_MEDIA | 7 | Media cursor.
CURSOR_MONEY | 8 | Money cursor.
CURSOR_NOTEPAD | 9 | Notepad cursor.
CURSOR_PENCIL | 10 | Pencil cursor.
CURSOR_PRINTER | 11 | Printer cursor.
CURSOR_SPEAKER | 12 | Speaker cursor.
CURSOR_UP_ARROW | 13 | Up arrow cursor.

ResizeLeft

boolean

True if the left side of the object should move when the application is resized, false if it should not.

ResizeRight

boolean

True if the right side of the object should move when the application is resized, false if it should not.

ResizeTop

boolean

True if the top of the object should move when the application is resized, false if it should not.

ResizeBottom

boolean

True if the bottom of the object should move when the application is resized, false if it should not.

HighlightSound

number

The type of sound that will be played when the mouse moves over the image object.

CONSTANT | VALUE | DESCRIPTION
SND_NONE | 0 | No highlight sound.
SND_STANDARD | 1 | Standard highlight sound.
SND_CUSTOM | 2 | Custom highlight sound.

HighlightSoundFile

string

The path to the image object's custom highlight sound file. If the image object does not use a custom sound, this value will be an empty string ("").

Note: For this to take effect, HighlightSound must be set to SND_CUSTOM.

ClickSound

number

The type of sound that will be played when the mouse clicks the image object.

CONSTANT | VALUE | DESCRIPTION
SND_NONE | 0 | No click sound.
SND_STANDARD | 1 | Standard click sound.
SND_CUSTOM | 2 | Custom click sound.

ClickSoundFile

string

The path to the image object's custom click sound file. If the image object does not use a custom sound, this value will be an empty string ("").

Note: For this to take effect, ClickSound must be set to SND_CUSTOM.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Image.SetSize

Image.SetSize (

string ObjectName,

number Width,

number Height )

Description

Sets the size of an image object.

Parameters

ObjectName

(string) The name of the image object.

Width

(number) The new width of the image object in pixels.

Height

(number) The new height of the image object in pixels.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Image.SetVisible

Image.SetVisible (

string ObjectName,

boolean Visible = true )

Description

Sets the visibility of an image object.

Parameters

ObjectName

(string) The name of the image object.

Visible

(boolean) Whether to make the image object visible or invisible:

VALUE | DESCRIPTION
true | Visible. (Default)
false | Invisible.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


INIFile.DeleteSection

INIFile.DeleteSection (

string Filename,

string Section )

Description

Deletes a "section" in a specified INI file.

Parameters

Filename

(string) The path to the INI file.

Section

(string) The INI file section to delete.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


INIFile.DeleteValue

INIFile.DeleteValue (

string Filename,

string Section,

string Value )

Description

Deletes a "value" in a specified INI file.

Parameters

Filename

(string) The full path to the INI file.

Section

(string) The "section" containing the value.

Value

(string) The "value" to delete.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


INIFile.GetSectionNames

table INIFile.GetSectionNames (

string Filename )

Description

Returns all of the "section" names within an INI file.

Parameters

Filename

(string) The full path to the INI file.

Returns

(table) A table containing all of the "section" names within the specified INI file. If there are no section names or an error occurs (for example, the file doesn't exist), nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


INIFile.GetValue

string INIFile.GetValue (

string Filename,

string Section,

string Value )

Description

Returns the data associated with a "value" in a specified INI file.

Parameters

Filename

(string) The full path to the INI file.

Section

(string) The section containing the "value."

Value

(string) The "value" whose data you want.

Returns

(string) The data associated with the given "value" in the INI file. If the value doesn't exist or the action fails, a blank string "" is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


INIFile.GetValueNames

table INIFile.GetValueNames (

string Filename,

string Section )

Description

Returns all of the "value" names within in a section of an INI file.

Parameters

Filename

(string) The full path to the INI file.

Section

(string) The section whose value names you want.

Returns

(table) A table containing all of the "value" names within the given section. If there are no value names or an error occurs (for example, the file doesn't exist), nil is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


INIFile.SetValue

INIFile.SetValue (

string Filename,

string Section,

string Value,

string Data )

Description

Sets the data for an INI file value.

Parameters

Filename

(string) The full path to the INI file. If the file does not exist, it will be created.

Section

(string) The section containing the "value."

Value

(string) The "value" whose data you want to set.

Data

(string) The value data to set.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Input.CanUndo

boolean Input.CanUndo (

string ObjectName )

Description

Gets the undo status of an input object.

Parameters

ObjectName

(string) The name of the input object whose undo status you want.

Returns

(boolean) True if an undo operation can be performed on the specified object, or false if it cannot. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Input.Copy

Input.Copy (

string ObjectName )

Description

Copies any selected text in a specific input object to the clipboard.

Parameters

ObjectName

(string) The name of the input object.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Input.Cut

Input.Cut (

string ObjectName )

Description

Cuts any selected text in a specific input object to the clipboard.

Parameters

ObjectName

(string) The name of the input object.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Input.Delete

Input.Delete (

string ObjectName )

Description

Deletes any selected text in a specific input object.

Parameters

ObjectName

(string) The name of the input object.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Input.GetPos

table Input.GetPos (

string ObjectName )

Description

Returns the X and Y page or dialog coordinates of an input object in pixels. This coordinate refers to the upper left hand corner of the object's bounding box relative to the page or dialog.

Note: The upper left hand corner of a page or dialog has X and Y coordinates of 0.

Parameters

ObjectName

(string) The name of the input object.

Returns

(table) A table containing the object's current coordinates, indexed by values X and Y. If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Input.GetProperties

table Input.GetProperties (

string ObjectName )

Description

Returns a table containing the properties of an input object.

Parameters

ObjectName

(string) The name of the input object.

Returns

(table) A table containing the input object's properties, indexed by the following keys:

KEY

TYPE

DESCRIPTION

Text

string

The text displayed in the input object.

ObjectName

string

The name of the input object.

FontName

string

The font name.

FontSize

number

The font size (in points).

FontStrikeout

boolean

True if the font is set to strikeout, false if it is not.

FontUnderline

boolean

True if the font is set to underline, false if it is not.

FontAntiAlias

boolean

True if the font is set to anti alias, false if it is not.

FontItalic

boolean

True if the font is set to italic, false if it is not.

FontWeight

number

The weight of the font (how 'dark' the text will appear):

CONSTANT | VALUE | DESCRIPTION
FW_DONTCARE | 0 | Font weight not specified.
FW_THIN | 100 | Font weight 'thin'.
FW_EXTRALIGHT | 200 | Font weight 'extra-light'.
FW_LIGHT | 300 | Font weight 'light'.
FW_NORMAL | 400 | Font weight 'normal'.
FW_MEDIUM | 500 | Font weight 'medium'.
FW_SEMIBOLD | 600 | Font weight 'semi-bold'.
FW_BOLD | 700 | Font weight 'bold'.
FW_EXTRABOLD | 800 | Font weight 'extra bold'.
FW_HEAVY | 900 | Font weight 'heavy'.

FontScript

number

The character set in use by the input object:

CONSTANT | VALUE | DESCRIPTION
ANSI_CHARSET | 0 | ANSI character set.
BALTIC_CHARSET | 186 | Baltic character set.
CHINESEBIG5_CHARSET | 136 | Chinese character set.
DEFAULT_CHARSET | 1 | Default character set.
EASTEUROPE_CHARSET | 238 | Eastern European character set.
GB2312_CHARSET | 134 | GB2312 character set.
GREEK_CHARSET | 161 | Greek character set.
HANGUL_CHARSET | 129 | Hangul character set.
MAC_CHARSET | 77 | MAC character set.
OEM_CHARSET | 255 | OEM character set.
RUSSIAN_CHARSET | 204 | Russian character set.
SHIFTJIS_CHARSET | 128 | Shiftjis character set.
SYMBOL_CHARSET | 2 | Symbol character set.
TURKISH_CHARSET | 162 | Turkish character set.

FontColor

number

The color of the font used in the input object.

Multiline

boolean

True if multi-line support is enabled, false if it is not.

VScrollbar

boolean

True if vertical scrollbars are enabled, false if they are not.

HScrollbar

boolean

True if horizontal scrollbars are enabled, false if they are not.

InputStyle

number

The type of input object:

CONSTANT | VALUE | DESCRIPTION
INPUT_STANDARD | 0 | A standard input object.
INPUT_PASSWORD | 1 | Any text in the input object is hidden: ******.
INPUT_MASK | 2 | The text has a specific structure (e.g. ###-####)

MaskText

string

The input mask used if InputStyle is set to INPUT_MASK.

MaskReturnMode

number

How text from an input object will be returned using an Input.GetText action:

CONSTANT | VALUE | DESCRIPTION
MASK_FORMATTED | 0 | Return the text as it is formatted by the mask: 555-5555
MASK_AS_TYPED | 1 | Return just the text without formatting: 5555555

Placeholder

string

A placeholder character used as 'filler' in an input object with an input mask.

Border

number

The type of border surrounding the input object:

CONSTANT | VALUE | DESCRIPTION
BORDER_NONE | 0 | No border.
BORDER_FLAT | 1 | 'Flat', single line border.
BORDER_SUNKEN | 2 | Sunken border.

ReadOrder

number

How text will be displayed in the input object:

CONSTANT | VALUE | DESCRIPTION
READ_STANDARD | 0 | Display the characters left to right.
READ_RIGHT_TO_LEFT | 1 | Display the characters right to left.

BackgroundColor

number

The color of the input object background.

ReadOnly

boolean

True if the input object is read-only, false if it is not.

Alignment

number

The text alignment in the input object:

CONSTANT | VALUE | DESCRIPTION
ALIGN_LEFT | 0 | Text is left aligned.
ALIGN_CENTER | 1 | Text is center aligned.
ALIGN_RIGHT | 2 | Text is right aligned.

Enabled

boolean

True if the input object is enabled, false if it is not.

Visible

boolean

True if the input object is visible, false if it is not.

X

number

The horizontal position (in pixels) of the top left corner of the input object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has an X value of 0

Y

number

The vertical position (in pixels) of the top left corner of the input object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has a Y value of 0

Width

number

The width (in pixels) of the input object.

Height

number

The height (in pixels) of the input object.

TooltipText

string

The mouseover tooltip of the input object.

ResizeLeft

boolean

True if the left side of the object will move when the application is resized, false if it is not.

ResizeRight

boolean

True if the right side of the object will move when the application is resized, false if it is not.

ResizeTop

boolean

True if the top of the object will move when the application is resized, false if it is not.

ResizeBottom

boolean

True if the bottom of the object will move when the application is resized, false if it is not.

WindowHandle

number

The integer value that represents the object's window. (Commonly referred to as an hWnd.)

If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Input.GetSelection

table Input.GetSelection (

string ObjectName )

Description

Returns the start and end positions of text that is selected in an input object.

Parameters

ObjectName

(string) The name of the input object.

Returns

(table) A table containing three numeric indexes. The first index stores where the selection started, the second stores where the selection ended in the input object, and the third stores the line number of the first character of the selection. You can access these values using the table keys "Start", "End", and "LineNum." If the "Start" and "End" values are the same, this means there was no selection, so they will contain the cursor position. If an error occurs, a value of nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Input.GetSize

table Input.GetSize (

string ObjectName )

Description

Returns the pixel dimensions of an input object.

Parameters

ObjectName

(string) The name of the input object.

Returns

(table) A table containing the object's pixel dimensions, indexed by values "Width" and "Height". If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Input.GetText

string Input.GetText (

string ObjectName )

Description

Returns the text displayed in an input object.

Parameters

ObjectName

(string) The name of the input object.

Returns

(string) The text that is currently displayed in the input object. If an error occurs, a blank string "" will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Input.IsEnabled

boolean Input.IsEnabled (

string ObjectName )

Description

Returns true if a specific input object is enabled, or false if it's disabled.

Note: When an input object is disabled, it doesn't respond to user interaction at all.

Parameters

ObjectName

(string) The name of the input object.

Returns

(boolean) True if the input object is enabled, false if it is disabled. If an error occurs, false will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Input.IsVisible

boolean Input.IsVisible (

string ObjectName )

Description

Returns true if a specific input object is visible, and false if it isn't.

Parameters

ObjectName

(string) The name of the input object.

Returns

(boolean) True if the input object is visible, false if it's invisible. If an error occurs, false will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Input.Paste

Input.Paste (

string ObjectName )

Description

Pastes text from the clipboard into an input object at the current insertion point.

Parameters

ObjectName

(string) The name of the input object.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Input.ScrollLines

Input.ScrollLines (

string ObjectName,

number Lines )

Description

Scrolls the text in an input object when multiline is enabled.

Parameters

ObjectName

(string) The name of the input object.

Lines

(number) The number of lines to scroll (either positive or negative).

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Input.ScrollToLine

Input.ScrollToLine (

string ObjectName,

number Line )

Description

Scrolls the text to a specific line in an input object when multiline is enabled.

Parameters

ObjectName

(string) The name of the input object.

Line

(number) The specific line to scroll to in the input object. You can use -1 to scroll to the last line.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Input.SetEnabled

Input.SetEnabled (

string ObjectName,

boolean Enabled = true )

Description

Sets the enabled/disabled state of an input object.

Note: When an input object is disabled, it doesn't respond to the user at all.

Parameters

ObjectName

(string) The name of the input object.

Enabled

(boolean) Whether to make the input object enabled or disabled:

VALUE | DESCRIPTION
true | Enabled. (Default)
false | Disabled.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Input.SetPos

Input.SetPos (

string ObjectName,

number X,

number Y )

Description

Sets the X and Y pixel coordinates of an input object relative to the page or dialog.

Parameters

ObjectName

(string) The name of the input object.

X

(number) The new X pixel coordinate (horizontal position) to set for the input object. This is the X coordinate of the upper left hand corner of the object's bounding box relative to the page or dialog.

Y

(number) The new Y pixel coordinate (vertical position) to set for the input object. This is the Y coordinate of the upper left hand corner of the object's bounding box relative to the page or dialog.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Input.SetProperties

Input.SetProperties (

string ObjectName,

table Properties )

Description

Sets the properties of an input object.

Parameters

ObjectName

(string) The name of the input object.

Properties

(table) A table containing the input object's properties indexed by the following keys:

KEY

TYPE

DESCRIPTION

Text

string

The text to display in the input object.

FontName

string

The font name.

FontSize

number

The font size (in points).

FontStrikeout

boolean

True if the font should be set to strikeout, false if it should not be.

FontUnderline

boolean

True if the font should set to underline, false if it should not be.

FontAntiAlias

boolean

True if the font should set to anti alias, false if it should not be.

FontItalic

boolean

True if the font should set to italic, false if it should not be.

FontWeight

number

The weight of the font (how 'dark' the text should appear):

CONSTANT | VALUE | DESCRIPTION
FW_DONTCARE | 0 | Font weight not specified.
FW_THIN | 100 | Font weight 'thin'.
FW_EXTRALIGHT | 200 | Font weight 'extra-light'.
FW_LIGHT | 300 | Font weight 'light'.
FW_NORMAL | 400 | Font weight 'normal'.
FW_MEDIUM | 500 | Font weight 'medium'.
FW_SEMIBOLD | 600 | Font weight 'semi-bold'.
FW_BOLD | 700 | Font weight 'bold'.
FW_EXTRABOLD | 800 | Font weight 'extra bold'.
FW_HEAVY | 900 | Font weight 'heavy'.

FontScript

number

The character set to use in the input object:

CONSTANT | VALUE | DESCRIPTION
ANSI_CHARSET | 0 | ANSI character set.
BALTIC_CHARSET | 186 | Baltic character set.
CHINESEBIG5_CHARSET | 136 | Chinese character set.
DEFAULT_CHARSET | 1 | Default character set.
EASTEUROPE_CHARSET | 238 | Eastern European character set.
GB2312_CHARSET | 134 | GB2312 character set.
GREEK_CHARSET | 161 | Greek character set.
HANGUL_CHARSET | 129 | Hangul character set.
MAC_CHARSET | 77 | MAC character set.
OEM_CHARSET | 255 | OEM character set.
RUSSIAN_CHARSET | 204 | Russian character set.
SHIFTJIS_CHARSET | 128 | Shiftjis character set.
SYMBOL_CHARSET | 2 | Symbol character set.
TURKISH_CHARSET | 162 | Turkish character set.

FontColor

number

The color of the font to use in the input object.

Multiline

boolean

True if multi-line support should be enabled, false if it should not be.

VScrollbar

boolean

True if vertical scrollbars should be enabled, false if they should not be.

HScrollbar

boolean

True if horizontal scrollbars should be enabled, false if they should not be.

InputStyle

number

The type of input object:

CONSTANT | VALUE | DESCRIPTION
INPUT_STANDARD | 0 | A standard input object.
INPUT_PASSWORD | 1 | Any text in the input object will be hidden: ******.
INPUT_MASK | 2 | The text will have a specific structure (e.g. ###-####).

MaskText

string

The input mask to use if InputStyle is set to INPUT_MASK.

MaskReturnMode

number

How text from an input object will be returned using an Input.GetText action:

CONSTANT | VALUE | DESCRIPTION
MASK_FORMATTED | 0 | Return the text as it is formatted by the mask: 555-5555
MASK_AS_TYPED | 1 | Return just the text without formatting: 5555555

Placeholder

string

A placeholder character to use as 'filler' in an input object with an input mask.

Border

number

The type of border to surround the input object:

CONSTANT | VALUE | DESCRIPTION
BORDER_NONE | 0 | No border.
BORDER_FLAT | 1 | 'Flat', single line border.
BORDER_SUNKEN | 2 | Sunken border.

ReadOrder

number

How text should be displayed in the input object:

CONSTANT | VALUE | DESCRIPTION
READ_STANDARD | 0 | Display the characters left to right.
READ_RIGHT_TO_LEFT | 1 | Display the characters right to left.

BackgroundColor

number

The color of the input object background.

ReadOnly

boolean

True if the input object should be read-only, false if it should not be.

Alignment

number

The text alignment in the input object:

CONSTANT | VALUE | DESCRIPTION
ALIGN_LEFT | 0 | Text is left aligned.
ALIGN_CENTER | 1 | Text is center aligned.
ALIGN_RIGHT | 2 | Text is right aligned.

Enabled

boolean

True if the input object should be enabled, false if it should not be.

Visible

boolean

True if the input object should be visible, false if it should not be.

X

number

The horizontal position (in pixels) of the top left corner of the input object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has an X value of 0

Y

number

The vertical position (in pixels) of the top left corner of the input object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has a Y value of 0

Width

number

The width (in pixels) of the input object.

Height

number

The height (in pixels) of the input object.

ResizeLeft

boolean

True if the left side of the object should move when the application is resized, false if it should not.

ResizeRight

boolean

True if the right side of the object should move when the application is resized, false if it should not.

ResizeTop

boolean

True if the top of the object should move when the application is resized, false if it should not.

ResizeBottom

boolean

True if the bottom of the object should move when the application is resized, false if it should not.

TooltipText

string

The mouseover tooltip of the image object. Tip: If you want a "&" character in the text, you must enter "&&&".

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Input.SetSelection

Input.SetSelection (

string ObjectName,

number Start,

number End )

Description

Selects a range of text in an input object. This is just like highlighting the text with the mouse.

Parameters

ObjectName

(string) The name of the input object.

Start

(number) The index in the input string to start selecting from. The first character in an input object is considered to have an index of 1.

Tip: You can use a start index of -1 to deselect all of the text in the object.

End

(number) The index in the string to stop selecting at. An index of -1 can be used to select all of the text to the end of the input object.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Input.SetSize

Input.SetSize (

string ObjectName,

number Width,

number Height )

Description

Sets the size of an input object.

Parameters

ObjectName

(string) The name of the input object.

Width

(number) The new width of the input object in pixels.

Height

(number) The new height of the input object in pixels.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Input.SetText

Input.SetText (

string ObjectName,

string Text )

Description

Sets the text displayed in an input object.

Parameters

ObjectName

(string) The name of the input object to set.

Text

(string) The text to display.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Input.SetVisible

Input.SetVisible (

string ObjectName,

boolean Visible = true )

Description

Sets the visibility of an input object.

Parameters

ObjectName

(string) The name of the input object.

Visible

(boolean) Whether to make the input object visible or invisible:

VALUE | DESCRIPTION
true | Visible. (Default)
false | Invisible.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Input.Undo

Input.Undo (

string ObjectName )

Description

Performs an undo operation on the input object's text.

Parameters

ObjectName

(string) The name of the input object to perform the undo operation on.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Label.GetPos

table Label.GetPos (

string ObjectName )

Description

Returns the X and Y page or dialog coordinates of a label object in pixels. This coordinate refers to the upper left hand corner of the object's bounding box relative to the page or dialog.

Note: The upper left hand corner of a page or dialog has X and Y coordinates of 0.

Parameters

ObjectName

(string) The name of the label object.

Returns

(table) A table containing the object's current coordinates, indexed by values X and Y. If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Label.GetProperties

table Label.GetProperties (

string ObjectName )

Description

Returns a table containing the properties of a label object.

Parameters

ObjectName

(string) The name of the label object.

Returns

(table) A table containing the label object's properties, indexed by the following keys:

KEY

TYPE

DESCRIPTION

Text

string

The text displayed in the label object.

ObjectName

string

The name of the label object.

FontName

string

The font name.

FontSize

number

The font size (in points).

FontStrikeout

boolean

True if the font is set to strikeout, false if it is not.

FontUnderline

boolean

True if the font is set to underline, false if it is not.

FontAntiAlias

boolean

True if the font is set to anti alias, false if it is not.

FontItalic

boolean

True if the font is set to italic, false if it is not.

FontWeight

number

The weight of the font (how 'dark' the text will appear):

CONSTANT | VALUE | DESCRIPTION
FW_DONTCARE | 0 | Font weight not specified.
FW_THIN | 100 | Font weight 'thin'.
FW_EXTRALIGHT | 200 | Font weight 'extra-light'.
FW_LIGHT | 300 | Font weight 'light'.
FW_NORMAL | 400 | Font weight 'normal'.
FW_MEDIUM | 500 | Font weight 'medium'.
FW_SEMIBOLD | 600 | Font weight 'semi-bold'.
FW_BOLD | 700 | Font weight 'bold'.
FW_EXTRABOLD | 800 | Font weight 'extra bold'.
FW_HEAVY | 900 | Font weight 'heavy'.

FontScript

number

The character set in use by the label object:

CONSTANT | VALUE | DESCRIPTION
ANSI_CHARSET | 0 | ANSI character set.
BALTIC_CHARSET | 186 | Baltic character set.
CHINESEBIG5_CHARSET | 136 | Chinese character set.
DEFAULT_CHARSET | 1 | Default character set.
EASTEUROPE_CHARSET | 238 | Eastern European character set.
GB2312_CHARSET | 134 | GB2312 character set.
GREEK_CHARSET | 161 | Greek character set.
HANGUL_CHARSET | 129 | Hangul character set.
MAC_CHARSET | 77 | MAC character set.
OEM_CHARSET | 255 | OEM character set.
RUSSIAN_CHARSET | 204 | Russian character set.
SHIFTJIS_CHARSET | 128 | Shiftjis character set.
SYMBOL_CHARSET | 2 | Symbol character set.
TURKISH_CHARSET | 162 | Turkish character set.

Alignment

number

The alignment of the text in the label object. Choose from:

CONSTANT | VALUE | DESCRIPTION
ALIGN_LEFT | 0 | Text is left aligned.
ALIGN_CENTER | 1 | Text is center aligned.
ALIGN_RIGHT | 2 | Text is right aligned.

Orientation

number

The orientation of the label object with relation to the page or dialog:

VALUE | DESCRIPTION
0 | Label object is 'normal'.
90 | Rotated 90 degrees counter-clockwise.
180 | Rotated 180 degrees counter-clockwise.
270 | Rotated 270 degrees counter-clockwise.

ColorNormal

number

The 'normal' color of the label object's text.

ColorHighlight

number

The 'highlight' color of the label object's text.

ColorDisabled

number

The 'disabled' color of the label object's text.

ColorDown

number

The 'down' color of the label object's text.

Enabled

boolean

True if the label object is enabled, false if it is not.

Visible

boolean

True if the label object is visible, false if it is not.

X

number

The horizontal position (in pixels) of the top left corner of the label object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has an X value of 0

Y

number

The vertical position (in pixels) of the top left corner of the label object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has a Y value of 0

Width

number

The width (in pixels) of the label object.

Height

number

The height (in pixels) of the label object.

TooltipText

string

The mouseover tooltip of the label object.

Cursor

number

The mouse cursor that will be displayed when the mouse is over the label object:

CONSTANT | VALUE | DESCRIPTION
CURSOR_ARROW | 0 | Standard mouse arrow cursor.
CURSOR_HAND | 1 | Hand cursor.
CURSOR_BLACK_ARROW | 2 | Black arrow cursor.
CURSOR_CROSSHAIR | 3 | Crosshair cursor.
CURSOR_EXPLORE | 4 | Explore cursor.
CURSOR_HELP | 5 | Help cursor.
CURSOR_MAGNIFY | 6 | Magnify cursor.
CURSOR_MEDIA | 7 | Media cursor.
CURSOR_MONEY | 8 | Money cursor.
CURSOR_NOTEPAD | 9 | Notepad cursor.
CURSOR_PENCIL | 10 | Pencil cursor.
CURSOR_PRINTER | 11 | Printer cursor.
CURSOR_SPEAKER | 12 | Speaker cursor.
CURSOR_UP_ARROW | 13 | Up arrow cursor.

ResizeLeft

boolean

True if the left side of the object will move when the application is resized, false if it is not.

ResizeRight

boolean

True if the right side of the object will move when the application is resized, false if it is not.

ResizeTop

boolean

True if the top of the object will move when the application is resized, false if it is not.

ResizeBottom

boolean

True if the bottom of the object will move when the application is resized, false if it is not.

HighlightSound

number

The type of sound that will be played when the mouse moves over the label object.

CONSTANT | VALUE | DESCRIPTION
SND_NONE | 0 | No highlight sound.
SND_STANDARD | 1 | Standard highlight sound.
SND_CUSTOM | 2 | Custom highlight sound.

HighlightSoundFile

string

The path to the label object's custom highlight sound file. If the label object does not use a custom sound, this value will be an empty string ("").

ClickSound

number

The type of sound that will be played when the mouse clicks the label object.

CONSTANT | VALUE | DESCRIPTION
SND_NONE | 0 | No click sound.
SND_STANDARD | 1 | Standard click sound.
SND_CUSTOM | 2 | Custom click sound.

ClickSoundFile

string

The path to the label object's custom click sound file. If the label object does not use a custom sound, this value will be an empty string ("").

If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Label.GetSize

table Label.GetSize (

string ObjectName )

Description

Returns the pixel dimensions of a label object.

Parameters

ObjectName

(string) The name of the label object.

Returns

(table) A table containing the object's pixel dimensions, indexed by values "Width" and "Height". If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Label.GetText

string Label.GetText (

string ObjectName )

Description

Gets the text that is currently displayed in a label object.

Parameters

ObjectName

(string) The name of the label object.

Returns

(string) The text that is currently displayed in the label object. If an error occurs, a blank string "" will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Label.IsEnabled

boolean Label.IsEnabled (

string ObjectName )

Description

Returns true if a specific label object is enabled, or false if it's disabled.

Note: When a label object is disabled, it is displayed in its Disabled color, and doesn't respond to the user at all.

Parameters

ObjectName

(string) The name of the label object.

Returns

(boolean) True if the label object is enabled, false if it is disabled. If an error occurs, false will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Label.IsVisible

boolean Label.IsVisible (

string ObjectName )

Description

Returns true if a specific label object is visible, and false if it isn't.

Parameters

ObjectName

(string) The name of the label object.

Returns

(boolean) True if the label object is visible, false if it's invisible. If an error occurs, false will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Label.SetEnabled

Label.SetEnabled (

string ObjectName,

boolean Enabled = true )

Description

Sets the enabled/disabled state of a label object.

Note: When a label object is disabled, it is displayed in its Disabled color, and doesn't respond to the user at all.

Parameters

ObjectName

(string) The name of the label object.

Enabled

(boolean) Whether to make the label object enabled or disabled:

VALUE | DESCRIPTION
true | Enabled. (Default)
false | Disabled.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Label.SetPos

Label.SetPos (

string ObjectName,

number X,

number Y )

Description

Sets the X and Y pixel coordinates of label object relative to the page or dialog.

Parameters

ObjectName

(string) The name of the label object.

X

(number) The new X pixel coordinate (horizontal position) to set for the label object. This is the X coordinate of the upper left hand corner of the object's bounding box relative to the page or dialog.

Y

(number) The new Y pixel coordinate (vertical position) to set for the label object. This is the Y coordinate of the upper left hand corner of the object's bounding box relative to the page or dialog.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Label.SetProperties

Label.SetProperties (

string ObjectName,

table Properties )

Description

Sets the properties of a label object.

Parameters

ObjectName

(string) The name of the label object.

Properties

(table) A table containing the label object's properties indexed by the following keys:

KEY

TYPE

DESCRIPTION

Text

string

The text to be displayed in the label object.

FontName

string

The font name.

Note: If this value is specified, any values passed for Height or Width will be ignored.

FontSize

number

The font size (in points).

Note: If this value is specified, any values passed for Height or Width will be ignored.

FontStrikeout

boolean

True if the font should be set to strikeout, false if it should not be.

Note: If this value is specified, any values passed for Height or Width will be ignored.

FontUnderline

boolean

True if the font should be set to underline, false if it should not be.

Note: If this value is specified, any values passed for Height or Width will be ignored.

FontAntiAlias

boolean

True if the font should be set to anti alias, false if it should not be.

Note: If this value is specified, any values passed for Height or Width will be ignored.

FontItalic

boolean

True if the font should be set to italic, false if it should not be.

Note: If this value is specified, any values passed for Height or Width will be ignored.

FontWeight

number

The weight of the font (how 'dark' the text will appear):

CONSTANT | VALUE | DESCRIPTION
FW_DONTCARE | 0 | Font weight not specified.
FW_THIN | 100 | Font weight 'thin'.
FW_EXTRALIGHT | 200 | Font weight 'extra-light'.
FW_LIGHT | 300 | Font weight 'light'.
FW_NORMAL | 400 | Font weight 'normal'.
FW_MEDIUM | 500 | Font weight 'medium'.
FW_SEMIBOLD | 600 | Font weight 'semi-bold'.
FW_BOLD | 700 | Font weight 'bold'.
FW_EXTRABOLD | 800 | Font weight 'extra bold'.
FW_HEAVY | 900 | Font weight 'heavy'.

Note: If this value is specified, any values passed for Height or Width will be ignored.

FontScript

number

The character set in use by the label object:

CONSTANT | VALUE | DESCRIPTION
ANSI_CHARSET | 0 | ANSI character set.
BALTIC_CHARSET | 186 | Baltic character set.
CHINESEBIG5_CHARSET | 136 | Chinese character set.
DEFAULT_CHARSET | 1 | Default character set.
EASTEUROPE_CHARSET | 238 | Eastern European character set.
GB2312_CHARSET | 134 | GB2312 character set.
GREEK_CHARSET | 161 | Greek character set.
HANGUL_CHARSET | 129 | Hangul character set.
MAC_CHARSET | 77 | MAC character set.
OEM_CHARSET | 255 | OEM character set.
RUSSIAN_CHARSET | 204 | Russian character set.
SHIFTJIS_CHARSET | 128 | Shiftjis character set.
SYMBOL_CHARSET | 2 | Symbol character set.
TURKISH_CHARSET | 162 | Turkish character set.

Note: If this value is specified, any values passed for Height or Width will be ignored.

Alignment

number

The alignment of the text in the label object. Choose from:

CONSTANT | VALUE | DESCRIPTION
ALIGN_LEFT | 0 | Text is left aligned.
ALIGN_CENTER | 1 | Text is center aligned.
ALIGN_RIGHT | 2 | Text is right aligned.

Orientation

number

The orientation of the label object with relation to the page or dialog:

VALUE | DESCRIPTION
0 | Label object is 'normal'.
90 | Rotated 90 degrees counter-clockwise.
180 | Rotated 180 degrees counter-clockwise.
270 | Rotated 270 degrees counter-clockwise.

ColorNormal

number

The 'normal' color of the label object's text.

ColorHighlight

number

The 'highlight' color of the label object's text.

ColorDisabled

number

The 'disabled' color of the label object's text.

ColorDown

number

The 'down' color of the label object's text.

Enabled

boolean

True if the label object should be enabled, false if it should not be.

Visible

boolean

True if the label object should be visible, false if it should not be.

X

number

The horizontal position (in pixels) of the top left corner of the label object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has an X value of 0

Y

number

The vertical position (in pixels) of the top left corner of the label object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has a Y value of 0

Width

number

The width (in pixels) of the label object.

Note: The label object will be resized so its width is as close as possible to this value while maintaining a whole number for its font size. If this value is specified, any value passed for Width will be ignored.

Tip: To adjust both font-related properties as well as the width of a label object, use two separate actions.

Height

number

The height (in pixels) of the label object.

Note: The label object will be resized so its height is as close as possible to this value while maintaining a whole number for its font size. If a value is specified for Width, the Height value will be ignored.

Tip: To adjust both font-related properties as well as the height of a label object, use two separate actions.

TooltipText

string

The mouseover tooltip of the label object. Tip: If you want a "&" character in the text, you must enter "&&&".

Cursor

number

The mouse cursor that should be displayed when the mouse is over the label object:

CONSTANT | VALUE | DESCRIPTION
CURSOR_ARROW | 0 | Standard mouse arrow cursor.
CURSOR_HAND | 1 | Hand cursor.
CURSOR_BLACK_ARROW | 2 | Black arrow cursor.
CURSOR_CROSSHAIR | 3 | Crosshair cursor.
CURSOR_EXPLORE | 4 | Explore cursor.
CURSOR_HELP | 5 | Help cursor.
CURSOR_MAGNIFY | 6 | Magnify cursor.
CURSOR_MEDIA | 7 | Media cursor.
CURSOR_MONEY | 8 | Money cursor.
CURSOR_NOTEPAD | 9 | Notepad cursor.
CURSOR_PENCIL | 10 | Pencil cursor.
CURSOR_PRINTER | 11 | Printer cursor.
CURSOR_SPEAKER | 12 | Speaker cursor.
CURSOR_UP_ARROW | 13 | Up arrow cursor.

ResizeLeft

boolean

True if the left side of the object should move when the application is resized, false if it should not.

ResizeRight

boolean

True if the right side of the object should move when the application is resized, false if it should not.

ResizeTop

boolean

True if the top of the object should move when the application is resized, false if it should not.

ResizeBottom

boolean

True if the bottom of the object should move when the application is resized, false if it should not.

HighlightSound

number

The type of sound that should be played when the mouse moves over the label object.

CONSTANT | VALUE | DESCRIPTION
SND_NONE | 0 | No highlight sound.
SND_STANDARD | 1 | Standard highlight sound.
SND_CUSTOM | 2 | Custom highlight sound.

HighlightSoundFile

string

The path to the label object's custom highlight sound file.

ClickSound

number

The type of sound that should be played when the mouse clicks the label object.

CONSTANT | VALUE | DESCRIPTION
SND_NONE | 0 | No click sound.
SND_STANDARD | 1 | Standard click sound.
SND_CUSTOM | 2 | Custom click sound.

ClickSoundFile

string

The path to the label object's custom click sound file.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Label.SetSize

Label.SetSize (

string ObjectName,

number Width,

number Height )

Description

Sets the size of a label object.

Parameters

ObjectName

(string) The name of the label object.

Width

(number) The new width of the label object in pixels.

Height

(number) The new height of the label object in pixels.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Label.SetText

Label.SetText (

string ObjectName,

string Text )

Description

Sets the text displayed in a label object.

Parameters

ObjectName

(string) The name of the label object.

Text

(string) The text to display in the label object.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Label.SetVisible

Label.SetVisible (

string ObjectName,

boolean Visible = true )

Description

Sets the visibility of a label object.

Parameters

ObjectName

(string) The name of the label object.

Visible

(boolean) Whether to make the label object visible or invisible:

VALUE | DESCRIPTION
true | Visible. (Default)
false | Invisible.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


ListBox.AddItem

number ListBox.AddItem (

string ObjectName,

string Text,

string Data = "" )

Description

Adds an item to a listbox object.

Parameters

ObjectName

(string) The name of the listbox object.

Text

(string) The item text to display.

Data

(string) The item data to associate with the item text.

Returns

(number) The index where the item was added. If an error occurs, -1 is returned. You can use Application.GetLastError to determine whether this action failed, and why.


ListBox.DeleteItem

ListBox.DeleteItem (

string ObjectName,

number Index )

Description

Removes an item from a listbox object.

Parameters

ObjectName

(string) The name of the listbox object.

Index

(number) The index (or line number) of the item to remove from the listbox object.

Tip: You can use an index of -1 (or variable LB_ALLITEMS) to remove all items from the listbox.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


ListBox.DeselectItem

ListBox.DeselectItem (

string ObjectName,

number Index )

Description

Deselects a currently selected item in a listbox object.

Parameters

ObjectName

(string) The name of the listbox object.

Index

(number) The index (or line number) of the item to deselect in the listbox object.

Tip: You can use an index of -1 (or variable LB_ALLITEMS) to deselect all items in the listbox.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


ListBox.FindItem

number ListBox.FindItem (

string ObjectName,

number StartAfter,

number SearchType,

string SearchText )

Description

Searches through the items in a listbox object for a specific string and returns the index (line number) where it was found.

Parameters

ObjectName

(string) The name of the listbox object.

StartAfter

(number) The index (line number) to start searching after. The search will begin in the next item in the list. You can use an index of -1 (or variable LB_ALLITEMS) to search all listbox items.

SearchType

(number) The type of search to perform:

CONSTANT | VALUE | DESCRIPTION
LB_BYTEXT | 0 | Search only the item text. (Default)
LB_BYDATA | 1 | Search only the associated item data.
LB_BYTEXTDATA | 2 | Search both the item text and item data.

SearchText

(string) The string of text to search for in the listbox object. You can use the * and ? wildcards in this field to search for text that matches a specific pattern.

Returns

(number) The first item index where the search string was found. If the string was not found or an error occurs, the value -1 (variable LB_ERROR) is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


ListBox.GetChecked

table ListBox.GetChecked (

string ObjectName,

number CheckState )

Description

Returns a table containing the indexes (line numbers) of the matching checked items in a listbox object.

Parameters

ObjectName

(string) The name of the listbox object.

CheckState

(number) The checkbox state to search for. Only items with this checkbox state will be found. Choose from:

CONSTANT | VALUE | DESCRIPTION
BST_UNCHECKED | 0 | Unchecked items.
BST_CHECKED | 1 | Checked items.
BST_INDETERMINATE | 2 | "Indeterminate" state items.

Returns

(table) A numerically indexed table containing the item indexes that match the selected CheckState. If no items match or an error occurs, nil is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


ListBox.GetCheckedCount

number ListBox.GetCheckedCount (

string ObjectName,

number CheckState )

Description

Returns the number of checked items in a listbox object.

Parameters

ObjectName

(string) The name of the listbox object.

CheckState

(number) The checkbox state to search for. Only items with this checkbox state will be counted. Choose from:

CONSTANT | VALUE | DESCRIPTION
BST_UNCHECKED | 0 | Unchecked items.
BST_CHECKED | 1 | Checked items.
BST_INDETERMINATE | 2 | "Indeterminate" state items.

Returns

(number) The number of items currently checked in the listbox object. If an error occurs or no items are checked, -1 will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


ListBox.GetCount

number ListBox.GetCount (

string ObjectName )

Description

Returns the number of items in a specific listbox object.

Parameters

ObjectName

(string) The name of the listbox object.

Returns

(number) The number of items in the listbox object. If an error occurs, -1 will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


ListBox.GetItemCheck

number ListBox.GetItemCheck (

string ObjectName,

number Index )

Description

Returns the checkbox state of a specific item in a listbox object.

Parameters

ObjectName

(string) The name of the listbox object.

Index

(number) The index (line number) of the item whose checkbox state you want. You can use an index of -1 to access the last item in the list.

Returns

(number) A number representing the checkbox state of the item. If an error occurs, the value -1 (LB_ERROR) is returned.

CONSTANT | VALUE | DESCRIPTION
BST_UNCHECKED | 0 | The item's checkbox is unchecked.
BST_CHECKED | 1 | The item's checkbox is checked.
BST_INDETERMINATE | 2 | The item's checkbox is in an "indeterminate" state. Usually used to indicate a "mix" of checked and unchecked items.

You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


ListBox.GetItemData

string ListBox.GetItemData (

string ObjectName,

number Index )

Description

Returns the item data associated to a specific item in a listbox object.

Parameters

ObjectName

(string) The name of the listbox object.

Index

(number) The index (line number) whose item data you want. You can use an index of -1 to access the last item in the list.

Returns

(string) A string containing the listbox item's associated item data. If an error occurs, a blank string "" will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


ListBox.GetItemText

string ListBox.GetItemText (

string ObjectName,

number Index )

Description

Returns the item text of a specific item in a listbox object.

Parameters

ObjectName

(string) The name of the listbox object.

Index

(number) The index (line number) whose item text you want. You can use an index of -1 to access the last item in the list.

Returns

(string) A string containing the listbox item's text. If an error occurs, a blank string "" will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


ListBox.GetPos

table ListBox.GetPos (

string ObjectName )

Description

Returns the X and Y page or dialog coordinates of a listbox object in pixels. This coordinate refers to the upper left hand corner of the object's bounding box relative to the page or dialog.

Note: The upper left hand corner of a page or dialog has X and Y coordinates of 0.

Parameters

ObjectName

(string) The name of the listbox object.

Returns

(table) A table containing the object's current coordinates, indexed by values X and Y. If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


ListBox.GetProperties

table ListBox.GetProperties (

string ObjectName )

Description

Returns a table containing the properties of a listbox object.

Parameters

ObjectName

(string) The name of the listbox object.

Returns

(table) A table containing the listbox object's properties, indexed by the following keys:

KEY

TYPE

DESCRIPTION

ObjectName

string

The name of the listbox object.

ListBoxType

number

A number representing the type of list box:

CONSTANT | VALUE | DESCRIPTION
LB_LISTBOX | 0 | The object is a normal list box.
LB_CHECKLISTBOX | 1 | The object is a checklist box. Each item in the list box has an associated checkbox that can be checked or unchecked.

MultipleSelection

boolean

True if multiple selection is enabled, false if it is not.

Sort

boolean

True if the listbox is sorted, false if it is not.

VScrollbar

boolean

True if the vertical scrollbar is enabled, false if it is not.

HScrollbar

boolean

True if the horizontal scrollbar is enabled, false if it is not.

FontName

string

The font name.

FontSize

number

The font size (in points).

FontStrikeout

boolean

True if the font is set to strikeout, false if it is not.

FontUnderline

boolean

True if the font is set to underline, false if it is not.

FontAntiAlias

boolean

True if the font is set to anti alias, false if it is not.

FontItalic

boolean

True if the font is set to italic, false if it is not.

FontWeight

number

The weight of the font (how 'dark' the text will appear):

CONSTANT | VALUE | DESCRIPTION
FW_DONTCARE | 0 | Font weight not specified.
FW_THIN | 100 | Font weight 'thin'.
FW_EXTRALIGHT | 200 | Font weight 'extra-light'.
FW_LIGHT | 300 | Font weight 'light'.
FW_NORMAL | 400 | Font weight 'normal'.
FW_MEDIUM | 500 | Font weight 'medium'.
FW_SEMIBOLD | 600 | Font weight 'semi-bold'.
FW_BOLD | 700 | Font weight 'bold'.
FW_EXTRABOLD | 800 | Font weight 'extra bold'.
FW_HEAVY | 900 | Font weight 'heavy'.

FontScript

number

The character script of the font:

CONSTANT | VALUE | DESCRIPTION
ANSI_CHARSET | 0 | ANSI character set.
BALTIC_CHARSET | 186 | Baltic character set.
CHINESEBIG5_CHARSET | 136 | Chinese character set.
DEFAULT_CHARSET | 1 | Default character set.
EASTEUROPE_CHARSET | 238 | Eastern European character set.
GB2312_CHARSET | 134 | GB2312 character set.
GREEK_CHARSET | 161 | Greek character set.
HANGUL_CHARSET | 129 | Hangul character set.
MAC_CHARSET | 77 | MAC character set.
OEM_CHARSET | 255 | OEM character set.
RUSSIAN_CHARSET | 204 | Russian character set.
SHIFTJIS_CHARSET | 128 | Shiftjis character set.
SYMBOL_CHARSET | 2 | Symbol character set.
TURKISH_CHARSET | 162 | Turkish character set.

TextColor

number

The color of the text in the listbox object.

BackgroundColor

number

The color of the listbox object's background.

Border

number

The style of the listbox object's border:

CONSTANT | VALUE | DESCRIPTION
BORDER_NONE | 0 | No border.
BORDER_FLAT | 1 | 'Flat' border.
BORDER_SUNKEN | 2 | Sunken border.

ReadOrder

number

How text will be displayed in the listbox object:

CONSTANT | VALUE | DESCRIPTION
READ_STANDARD | 0 | Display the characters left to right.
READ_RIGHT_TO_LEFT | 1 | Display the characters right to left.

Enabled

boolean

True if the listbox object is enabled, false if it is not.

Visible

boolean

True if the listbox object is visible, false if it is not.

X

number

The horizontal position (in pixels) of the top left corner of the listbox object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has an X value of 0

Y

number

The vertical position (in pixels) of the top left corner of the listbox object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has a Y value of 0

Width

number

The width (in pixels) of the listbox object.

Height

number

The height (in pixels) of the listbox object.

TooltipText

string

The mouseover tooltip of the listbox object.

ResizeLeft

boolean

True if the left side of the object will move when the application is resized, false if it is not.

ResizeRight

boolean

True if the right side of the object will move when the application is resized, false if it is not.

ResizeTop

boolean

True if the top of the object will move when the application is resized, false if it is not.

ResizeBottom

boolean

True if the bottom of the object will move when the application is resized, false if it is not.

WindowHandle

number

The integer value that represents the object's window. (Commonly referred to as an hWnd.)

If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


ListBox.GetSelected

table ListBox.GetSelected (

string ObjectName )

Description

Returns a table containing the indexes (line numbers) of all of the selected items in a specific listbox object.

Parameters

ObjectName

(string) The name of the listbox object.

Returns

(table) A numerically indexed table containing all item indexes that are currently selected. If no items are selected or an error occurs, nil is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


ListBox.GetSelectedCount

number ListBox.GetSelectedCount (

string ObjectName )

Description

Returns the number of currently selected items in a specific listbox object.

Parameters

ObjectName

(string) The name of the listbox object.

Returns

(number) The number of items currently selected in the listbox object. If an error occurs, -1 will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


ListBox.GetSize

table ListBox.GetSize (

string ObjectName )

Description

Returns the pixel dimensions of a listbox object.

Parameters

ObjectName

(string) The name of the listbox object.

Returns

(table) A table containing the object's pixel dimensions, indexed by values "Width" and "Height". If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


ListBox.GetType

number ListBox.GetType (

string ObjectName )

Description

Returns the type of a listbox object.

Parameters

ObjectName

(string) The name of the listbox object.

Returns

(number) A number representing the type of list box. If an error occurs, the value -1 (LB_ERROR) is returned.

CONSTANT | VALUE | DESCRIPTION
LB_LISTBOX | 0 | The object is a normal list box.
LB_CHECKLISTBOX | 1 | The object is a checklist box. Each item in the list box has an associated checkbox that can be checked or unchecked.

You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


ListBox.InsertItem

number ListBox.InsertItem (

string ObjectName,

number Index,

string Text,

string Data = "" )

Description

Inserts a new item into a listbox object at a specific index.

Parameters

ObjectName

(string) The name of the listbox object.

Index

(number) The index (line number) to insert the new item. You can use an index of -1 to insert an item at the end of the list.

Text

(string) The item text to display for the new item.

Data

(string) The optional item data to associate with the new item.

Returns

(number) The index where the item was added. If an error occurs, -1 is returned. You can use Application.GetLastError to determine whether this action failed, and why.


ListBox.IsEnabled

boolean ListBox.IsEnabled (

string ObjectName )

Description

Returns true if a specific listbox object is enabled, or false if it's disabled.

Note: When a listbox object is disabled, it doesn't respond to the user at all.

Parameters

ObjectName

(string) The name of the listbox object.

Returns

(boolean) True if the listbox object is enabled, false if it is disabled. If an error occurs, false will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


ListBox.IsItemSelected

boolean ListBox.IsItemSelected (

string ObjectName,

number Index )

Description

Returns true if a specific listbox item is selected, or false if it's not selected.

Parameters

ObjectName

(string) The name of the listbox object.

Index

(number) The item index whose selection state you want.

Returns

(boolean) True if the listbox object item is selected, false if it is not. If an error occurs, false is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


ListBox.IsVisible

boolean ListBox.IsVisible (

string ObjectName )

Description

Returns true if a specific listbox object is visible, and false if it isn't.

Parameters

ObjectName

(string) The name of the listbox object.

Returns

(boolean) True if the listbox object is visible, false if it's invisible. If an error occurs, false will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


ListBox.SelectItem

ListBox.SelectItem (

string ObjectName,

number Index )

Description

Selects an item in a specific listbox object.

Parameters

ObjectName

(string) The name of the listbox object.

Index

(number) The item to select in the listbox object. If the object has "multiple selection" enabled, you can use -1 (or LB_ALLITEMS) to select all items in the list.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


ListBox.SetEnabled

ListBox.SetEnabled (

string ObjectName,

boolean Enabled = true )

Description

Sets the enabled/disabled state of a listbox object.

Note: When a listbox object is disabled, it doesn't respond to the user at all.

Parameters

ObjectName

(string) The name of the listbox object.

Enabled

(boolean) Whether to make the listbox object enabled or disabled:

VALUE | DESCRIPTION
true | Enabled. (Default)
false | Disabled.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


ListBox.SetItemCheck

ListBox.SetItemCheck (

string ObjectName,

number Index,

number CheckboxState )

Description

Sets the checkbox state of a specific item in a listbox object.

Parameters

ObjectName

(string) The name of the listbox object.

Index

(number) The index (line number) of the item whose checkbox state you want to set. You can use an index of -1 to access the last item in the list, and -2 (LB_ALLCHECKS) to apply the change to all items in the list.

CheckboxState

(number) The checkbox state you want to set for the item.

CONSTANT | VALUE | DESCRIPTION
BST_UNCHECKED | 0 | The item's checkbox is unchecked.
BST_CHECKED | 1 | The item's checkbox is checked.
BST_INDETERMINATE | 2 | The item's checkbox is in an "indeterminate" state. Usually used to indicate a "mix" of checked and unchecked items.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


ListBox.SetItemData

ListBox.SetItemData (

string ObjectName,

number Index,

string Data )

Description

Sets the text of a listbox item's associated data.

Parameters

ObjectName

(string) The name of the listbox object.

Index

(number) The index (line number) whose item data you want to set. You can use an index of -1 to access the last item in the list.

Data

(string) The associated item data string to set.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


ListBox.SetItemText

ListBox.SetItemText (

string ObjectName,

number Index,

string Text )

Description

Sets the item text for a specific item in a listbox object.

Parameters

ObjectName

(string) The name of the listbox object.

Index

(number) The index (line number) whose item text you want to set. You can use an index of -1 to access the last item in the list.

Text

(string) The text to display for the listbox item.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


ListBox.SetPos

ListBox.SetPos (

string ObjectName,

number X,

number Y )

Description

Sets the X and Y pixel coordinates of a listbox object relative to the page or dialog.

Parameters

ObjectName

(string) The name of the listbox object.

X

(number) The new X pixel coordinate (horizontal position) to set for the listbox object. This is the X coordinate of the upper left hand corner of the object's bounding box relative to the page or dialog.

Y

(number) The new Y pixel coordinate (vertical position) to set for the listbox object. This is the Y coordinate of the upper left hand corner of the object's bounding box relative to the page or dialog.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


ListBox.SetProperties

ListBox.SetProperties (

string ObjectName,

table Properties )

Description

Sets the properties of a listbox object.

Parameters

ObjectName

(string) The name of the listbox object.

Properties

(table) A table containing the listbox object's properties indexed by the following keys:

KEY

TYPE

DESCRIPTION

ListBoxType

number

A number representing the type of list box:

CONSTANT | VALUE | DESCRIPTION
LB_LISTBOX | 0 | The object is a normal list box.
LB_CHECKLISTBOX | 1 | The object is a checklist box. Each item in the list box has an associated checkbox that can be checked or unchecked.

MultipleSelection

boolean

True if multiple selection should be enabled, false if it should not be.

Sort

boolean

True if the listbox should be sorted, false if it should not be.

VScrollbar

boolean

True if the vertical scrollbar should be enabled, false if it should not be.

HScrollbar

boolean

True if the horizontal scrollbar should be enabled, false if it should not be.

FontName

string

The font name.

FontSize

number

The font size (in points).

FontStrikeout

boolean

True if the font should be set to strikeout, false if it should not be.

FontUnderline

boolean

True if the font should be set to underline, false if it should not be.

FontAntiAlias

boolean

True if the font should be set to anti alias, false if it should not be.

FontItalic

boolean

True if the font should be set to italic, false if it should not be.

FontWeight

number

The weight of the font (how 'dark' the text should appear):

CONSTANT | VALUE | DESCRIPTION
FW_DONTCARE | 0 | Font weight not specified.
FW_THIN | 100 | Font weight 'thin'.
FW_EXTRALIGHT | 200 | Font weight 'extra-light'.
FW_LIGHT | 300 | Font weight 'light'.
FW_NORMAL | 400 | Font weight 'normal'.
FW_MEDIUM | 500 | Font weight 'medium'.
FW_SEMIBOLD | 600 | Font weight 'semi-bold'.
FW_BOLD | 700 | Font weight 'bold'.
FW_EXTRABOLD | 800 | Font weight 'extra bold'.
FW_HEAVY | 900 | Font weight 'heavy'.

FontScript

number

The character set that should be used by the listbox object:

CONSTANT | VALUE | DESCRIPTION
ANSI_CHARSET | 0 | ANSI character set.
BALTIC_CHARSET | 186 | Baltic character set.
CHINESEBIG5_CHARSET | 136 | Chinese character set.
DEFAULT_CHARSET | 1 | Default character set.
EASTEUROPE_CHARSET | 238 | Eastern European character set.
GB2312_CHARSET | 134 | GB2312 character set.
GREEK_CHARSET | 161 | Greek character set.
HANGUL_CHARSET | 129 | Hangul character set.
MAC_CHARSET | 77 | MAC character set.
OEM_CHARSET | 255 | OEM character set.
RUSSIAN_CHARSET | 204 | Russian character set.
SHIFTJIS_CHARSET | 128 | Shiftjis character set.
SYMBOL_CHARSET | 2 | Symbol character set.
TURKISH_CHARSET | 162 | Turkish character set.

TextColor

number

The color of the text in the listbox object.

BackgroundColor

number

The color of the listbox object's background.

Border

number

The style of the listbox object's border:

CONSTANT | VALUE | DESCRIPTION
BORDER_NONE | 0 | No border.
BORDER_FLAT | 1 | 'Flat' border.
BORDER_SUNKEN | 2 | Sunken border.

ReadOrder

number

How text should be displayed in the listbox object:

CONSTANT | VALUE | DESCRIPTION
READ_STANDARD | 0 | Display the characters left to right.
READ_RIGHT_TO_LEFT | 1 | Display the characters right to left.

Enabled

boolean

True if the listbox object should be enabled, false if it should not be.

Visible

boolean

True if the listbox object should be visible, false if it should not be.

X

number

The horizontal position (in pixels) of the top left corner of the listbox object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has an X value of 0

Y

number

The vertical position (in pixels) of the top left corner of the listbox object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has a Y value of 0

Width

number

The width (in pixels) of the listbox object.

Height

number

The height (in pixels) of the listbox object.

ResizeLeft

boolean

True if the left side of the object should move when the application is resized, false if it should not.

ResizeRight

boolean

True if the right side of the object should move when the application is resized, false if it should not.

ResizeTop

boolean

True if the top of the object should move when the application is resized, false if it should not.

ResizeBottom

boolean

True if the bottom of the object should move when the application is resized, false if it should not.

TooltipText

string

The mouseover tooltip of the listbox object. Tip: If you want a "&" character in the text, you must enter "&&&".

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


ListBox.SetSize

ListBox.SetSize (

string ObjectName,

number Width,

number Height )

Description

Sets the size of a listbox object.

Parameters

ObjectName

(string) The name of the listbox object.

Width

(number) The new width of the listbox object in pixels.

Height

(number) The new height of the listbox object in pixels.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


ListBox.SetType

ListBox.SetType (

string ObjectName,

number Type )

Description

Sets the type of listbox to be either a "normal" list box or a checklist box.

Parameters

ObjectName

(string) The name of the listbox object.

Type

(number) A number representing the type of list box to use.

CONSTANT | VALUE | DESCRIPTION
LB_LISTBOX | 0 | The object is a normal list box.
LB_CHECKLISTBOX | 1 | The object is a checklist box. Each item in the list box has an associated checkbox that can be checked or unchecked.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


ListBox.SetUpdate

ListBox.SetUpdate (

string ObjectName,

boolean Enabled = true )

Description

Sets the enabled/disabled update state of a listbox object. The update state controls whether or not the listbox object will be redrawn to reflect any changes that have been made.

Note: When a listbox object's update state is disabled, any actions to modify it will not be visible to the user until this action is called to enable the update state.

Parameters

ObjectName

(string) The name of the listbox object.

Enabled

(boolean) Whether to make the listbox object's update state enabled or disabled:

VALUE | DESCRIPTION
true | Enabled. Listbox changes are immediately visible. (Default)
false | Disabled. Listbox changes are not visible until it's update state is enabled.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


ListBox.SetVisible

ListBox.SetVisible (

string ObjectName,

boolean Visible = true )

Description

Sets the visibility of a listbox object.

Parameters

ObjectName

(string) The name of the listbox object.

Visible

(boolean) Whether to make the listbox object visible or invisible:

VALUE | DESCRIPTION
true | Visible. (Default)
false | Invisible.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Math.Abs

number Math.Abs (

number Num )

Description

Returns the absolute, positive value of a given number.

Parameters

Num

(number) The number whose absolute value you want.

Returns

(number) The absolute value of the number.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Math.Acos

number Math.Acos (

number Num )

Description

Returns the arccosine (inverse cosine) of a number (in radians).

Parameters

Num

(number) The number whose arccosine value you want.

Note: This must be a number between -1 and 1.

Returns

(number) The arccosine of the number.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Math.Asin

number Math.Asin (

number Num )

Description

Returns the arcsine (inverse sine) of a number (in radians).

Parameters

Num

(number) The number whose arcsine value you want.

Note: This must be a number between -1 and 1.

Returns

(number) The arcsine of the number.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Math.Atan

number Math.Atan (

number Num )

Description

Returns the arctangent (inverse tangent) of a number (in radians).

Parameters

Num

(number) The number whose arctangent value you want.

Returns

(number) The arctangent of the number.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Math.Atan2

number Math.Atan2 (

number Num1,

number Num2 )

Description

Returns the arctangent (inverse tangent) of Num1/Num2 (in radians).

Parameters

Num1

(number) The number to use as the dividend.

Num2

(number) The number to use as the divisor.

Returns

(number) The arctangent of Num1/Num2.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Math.Ceil

number Math.Ceil (

number Num )

Description

Returns the nearest integer above a given value.

Note: This is the same as rounding up.

Parameters

Num

(number) The number whose ceiling you want.

Returns

(number) The nearest integer above the number.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Math.Cos

number Math.Cos (

number Num )

Description

Returns the cosine (cos) of a number.

Parameters

Num

(number) The number whose cosine value you want (angle in radians).

Returns

(number) The cosine value of the number.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Math.Deg

number Math.Deg (

number Radian )

Description

Converts a number from radians to degrees.

Parameters

Radian

(number) The number in radians.

Returns

(number) The equivalent number in degrees.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Math.Exp

number Math.Exp (

number Num )

Description

Returns the exponential value of a number.

Parameters

Num

(number) The number whose exponential value you want.

Returns

(number) The exponential of the number.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Math.Floor

number Math.Floor (

number Num )

Description

Returns the nearest integer below a given value.

Note: This is the same as rounding down.

Parameters

Num

(number) The number whose floor you want.

Returns

(number) The nearest integer below the number.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Math.Frexp

table Math.Frexp (

number Num )

Description

Returns a table containing the mantissa (m) and exponent (n) of a number (x) in the equation x = m * 2^n.

Parameters

Num

(number) The number whose mantissa and exponent you want.

Returns

(table) A table containing the mantissa and exponent, indexed by "Mantissa" and "Exponent." The absolute value of the mantissa will be greater than or equal to 0.5 and less than 1.0.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Math.HexColorToNumber

number Math.HexColorToNumber (

string HexValue )

Description

Returns the equivalent COLORDEF value of a hex value. A COLORDEF value is what AutoPlay Media Studio uses to define colors. Any action that allows you to set the color of an item at runtime (for example, any object's SetProperties action) accepts COLORDEF values.

Parameters

HexValue

(string) The hex value you want to convert, for example "FFFF00".

Returns

(number) The converted hex value, in COLORDEF format.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Math.HexToNumber

number Math.HexToNumber (

string HexValue )

Description

Returns the equivalent decimal value of a hex value.

Parameters

HexValue

(string) The hex value you want to convert, for example "FFFF00".

Returns

(number) The converted hex value, in decimal format.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Math.Ldexp

number Math.Ldexp (

number Mantissa,

number Exponent )

Description

Returns a number (x), given a mantissa (m) and an exponent (n) in the equation x = m * 2^n.

Parameters

Mantissa

(number) The mantissa value.

Exponent

(number) The exponent value.

Returns

(number) The number x in the equation x = m * 2^n.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Math.Log

number Math.Log (

number Num )

Description

Returns the logarithm of a number.

Parameters

Num

(number) The number whose logarithm you want.

Returns

(number) The logarithm of the number.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Math.Log10

number Math.Log10 (

number Num )

Description

Returns the base-10 logarithm of a number.

Parameters

Num

(number) The number whose base-10 logarithm you want.

Returns

(number) The base-10 logarithm of the number.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Math.Max

number Math.Max (

number Num1,

number Num2 )

Description

Compares two numbers and returns the largest.

Parameters

Num1

(number) The first input number.

Num2

(number) The second input number.

Returns

(number) The larger of the two numbers.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Math.Min

number Math.Min (

number Num1,

number Num2 )

Description

Compares two numbers and returns the smallest.

Parameters

Num1

(number) The first input number.

Num2

(number) The second input number.

Returns

(number) The smaller of the two numbers.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Math.Mod

number Math.Mod (

number Num1,

number Num2 )

Description

Returns the modulus (remainder) of Num1/Num2.

Parameters

Num1

(number) The dividend.

Num2

(number) The divisor.

Returns

(number) The modulus of Num1/Num2.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Math.Pow

number Math.Pow (

number Base = 2,

number Exponent = 4 )

Description

Returns the result of the calculation of Base raised to the power of Exponent.

Parameters

Base

(number) The base you want to have in the calculation.

Exponent

(number) The exponent you want to have in the calculation.

Returns

(number) The result of the calculation of Base raised to the power of Exponent.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Math.Rad

number Math.Rad (

number Degree )

Description

Converts a number from degrees to radians.

Parameters

Degree

(number) The number in degrees.

Returns

(number) The equivalent number in radians.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Math.Random

number Math.Random (

number Rand1 = nil,

number Rand2 = nil )

Description

Generates a random number.

Parameters

There are three ways you can use this action: with no parameters, with one parameter, or with two parameters.

If you don't provide any parameters, it will generate a random value between 0 and 1 (inclusive).

If you only provide the first parameter (Rand1), it will generate a random number between 1 and that number (inclusive).

If you provide both parameters (Rand1 and Rand2), it will generate a random number between those two numbers (inclusive).

Rand1

(number) The first number.

Rand2

(number) The second number.

Returns

(number) The random number that was generated.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Math.RandomSeed

Math.RandomSeed (

number Seed )

Description

Seeds the random number generator used by Math.Random.

If you use the same seed, you will produce the same sequence of pseudo-random numbers. In order to ensure a unique sequence of random numbers, use a unique seed value such as the current time and date.

Note: The random number generator is automatically seeded with a unique value using the current date and time when the application is started.

Parameters

Seed

(number) The seed value. This needs to be a value less than 2147483647.

Returns

Nothing.


Math.RGBToNumber

number Math.RGBToNumber (

number Red,

number Green,

number Blue )

Description

Returns the number color value from an RGB color value.

Parameters

Red

(number) The red value (between 0 and 255) that you wish to convert.

Green

(number) The green value (between 0 and 255) that you wish to convert.

Blue

(number) The blue value (between 0 and 255) that you wish to convert.

Returns

(number) The converted RGB value as a number.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Math.Round

number Math.Round (

number Num,

number DecimalPlaces = 0 )

Description

Returns the "rounded" version of a given number to the specified number of decimal places.

For example, given the number 4.6 and 0 decimal places, 5 is returned. Given the number 5.748 and 2 decimal places, 5.75 is returned.

Parameters

Num

(number) The number you want to round.

DecimalPlaces

(number) The number of decimal places you want to round the number to. If 0 is passed, the number will be rounded to the nearest integer. If 2 is passed, the number will be rounded to 2 decimal places.

Returns

(number) The "rounded" version of the given number. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Math.Sin

number Math.Sin (

number Num )

Description

Returns the sine of a radian value.

Parameters

Num

(number) The angle in radians.

Returns

(number) The sine of the radian value.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Math.Sqrt

number Math.Sqrt (

number Num )

Description

Returns the square root of a number.

Parameters

Num

(number) The positive number whose square root you want.

Returns

(number) The square root of the number.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Math.Tan

number Math.Tan (

number Num )

Description

Returns the tangent of a radian value.

Parameters

Num

(number) The angle in radians.

Returns

(number) The tangent of the radian value.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


MSI.ApplyPatch

boolean MSI.ApplyPatch (

string PatchPath,

string InstallPackage,

number InstallType,

string CommandLine = "" )

Description

Calls the MsiApplyPatch function to invoke an installation and set the PATCH property to the path of the patch package for each product listed by the patch package as eligible to receive it.

Note: You must set the REINSTALL property on the command line when applying a small update or minor upgrade patch. Without this property, the patch is registered on the system but cannot update files. For patches that do not use a Custom Action Type 51 to automatically set the REINSTALL and REINSTALLMODE properties, the REINSTALL property must be explicitly set with the CommandLine parameter. Set the REINSTALL property to list the features affected by the patch, or use a practical default setting of "REINSTALL=ALL". The default value of the REINSTALLMODE property is "omus". Beginning with Windows Installer version 3.0, the REINSTALL property is configured by the installer and does not need to be set on the command line.

Parameters

PatchPath

(string) The full path to the patch package.

InstallPackage

(string) If InstallType is set to INSTALLTYPE_NETWORK_IMAGE, this parameter should be the full path to the product that is to be patched. To make the installer apply the patch to every eligible product listed in the patch package, set this parameter to an empty string ("") and InstallType to INSTALLTYPE_DEFAULT.

If InstallType is set to INSTALLTYPE_SINGLE_INSTANCE, the installer applies the patch to the product specified by this parameter. In this case, other eligible products listed in the patch package are ignored and the this parameter should contain the a string representing the product code of the instance to patch. This type of installation requires the installer running Windows Server 2003 or Windows XP.

InstallType

(number) The type of installation to patch. Choose from:

CONSTANT | VALUE | DESCRIPTION
INSTALLTYPE_DEFAULT | 0 | Searches the system for products to patch. In this case, InstallPackage must be an empty string ("").
INSTALLTYPE_NETWORK_IMAGE | 1 | Specifies an administrative installation. In this case, InstallPackage must be set to a package path.
INSTALLTYPE_SINGLE_INSTANCE | 2 | Patch the product specified by InstallPackage. InstallPackage is the product code of the instance to patch. This type of installation requires the installer be running Windows Server 2003 family or Windows XP SP1. For more information see the MSDN topic, Installing Multiple Instances of Products and Patches.

CommandLine

(string) The command line property settings to use.

Returns

(boolean) Returns true if the action was successful, or false if it failed. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the action editor, you can use this field to specify a variable that the return value will be stored in.


MSI.CloseHandle

boolean MSI.CloseHandle (

number MSIHandle )

Description

Calls the MsiCloseHandle function to close an open installation handle.

The following actions supply handles that should be closed after use by calling MSI.CloseHandle:

MSI.OpenPackage
MSI.OpenProduct

Parameters

MSIHandle

(number) The handle to an open installation.

Returns

(boolean) Returns true if the handle was closed successful, or false if it failed. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the action editor, you can use this field to specify a variable that the return value will be stored in.


MSI.ConfigureFeature

boolean MSI.ConfigureFeature (

string ProductCode,

string FeatureID,

number InstallState )

Description

Calls the MsiConfigureFeature function to configure the installed state for a product feature.

Parameters

ProductCode

(string) The "product code" of the product to be configured. This string must be an identifier string enclosed in curly braces, for example: "{78B82B0B-9AD9-40C0-B994-F72C21B52723}".

FeatureID

(string) The identifier of the feature to be configured.

InstallState

(number) The installation state for the feature. Choose from one of the following:

CONSTANT | VALUE | DESCRIPTION
INSTALLSTATE_ADVERTISED | 1 | The feature is advertised.
INSTALLSTATE_ABSENT | 2 | The feature is uninstalled.
INSTALLSTATE_LOCAL | 3 | The feature is installed locally.
INSTALLSTATE_SOURCE | 4 | The feature is installed to run from source.
INSTALLSTATE_DEFAULT | 5 | The feature is installed to its default location.

Returns

(boolean) Returns true if the action was successful, or false if it failed. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the action editor, you can use this field to specify a variable that the return value will be stored in.


MSI.ConfigureProduct

boolean MSI.ConfigureProduct (

string ProductCode,

number InstallLevel,

number InstallState )

Description

Calls the MsiConfigureProduct function to install or uninstall a product.

Parameters

ProductCode

(string) The "product code" of the product you want to configure. This string must be an identifier string enclosed in curly braces, for example: "{78B82B0B-9AD9-40C0-B994-F72C21B52723}".

InstallLevel

(number) How much of the product you want to install. Choose one of the following values:

CONSTANT | VALUE | DESCRIPTION
INSTALLLEVEL_DEFAULT | 0 | The authored default features are installed.
INSTALLLEVEL_MINIMUM | 1 | Only the required features are installed. You can specify a value between INSTALLLEVEL_MINIMUM and INSTALLLEVEL_MAXIMUM to install a subset of available features.
INSTALLLEVEL_MAXIMUM | 65535 | All features are installed. You can specify a value between INSTALLLEVEL_MINIMUM and INSTALLLEVEL_MAXIMUM to install a subset of available features.

InstallState

(number) The installation state for the product. Choose one of the following values:

CONSTANT | VALUE | DESCRIPTION
INSTALLSTATE_ADVERTISED | 1 | The product is advertised.
INSTALLSTATE_ABSENT | 2 | The product is uninstalled.
INSTALLSTATE_LOCAL | 3 | The product is to be installed with all features installed locally.
INSTALLSTATE_SOURCE | 4 | The product is to be installed with all features installed to run from source.
INSTALLSTATE_DEFAULT | 5 | The product is to be installed with all features installed to the default states specified in the Feature Table.

Returns

(boolean) Returns true if the action was successful, or false if it failed. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the action editor, you can use this field to specify a variable that the return value will be stored in.


MSI.ConfigureProductEx

boolean MSI.ConfigureProductEx (

string ProductCode,

number InstallLevel,

number InstallState,

string CommandLine = "" )

Description

Calls the MsiConfigureProductEx function to install or uninstall a product. A product command line can also be specified.

Parameters

ProductCode

(string) The "product code" of the product you want to configure. This string must be an identifier string enclosed in curly braces, for example: "{78B82B0B-9AD9-40C0-B994-F72C21B52723}".

InstallLevel

(number) How much of the product you want to install. Choose one of the following values:

CONSTANT | VALUE | DESCRIPTION
INSTALLLEVEL_DEFAULT | 0 | The authored default features are installed.
INSTALLLEVEL_MINIMUM | 1 | Only the required features are installed. You can specify a value between INSTALLLEVEL_MINIMUM and INSTALLLEVEL_MAXIMUM to install a subset of available features.
INSTALLLEVEL_MAXIMUM | 65535 | All features are installed. You can specify a value between INSTALLLEVEL_MINIMUM and INSTALLLEVEL_MAXIMUM to install a subset of available features.

InstallState

(number) The installation state for the product. Choose one of the following values:

CONSTANT | VALUE | DESCRIPTION
INSTALLSTATE_ADVERTISED | 1 | The product is advertised.
INSTALLSTATE_ABSENT | 2 | The product is uninstalled.
INSTALLSTATE_LOCAL | 3 | The product is to be installed with all features installed locally.
INSTALLSTATE_SOURCE | 4 | The product is to be installed with all features installed to run from source.
INSTALLSTATE_DEFAULT | 5 | The product is to be installed with all features installed to the default states specified in the Feature Table.

CommandLine

(string) The command-line property settings to use. This should be a list of the format "Property=Setting Property=Setting".

Returns

(boolean) Returns true if the action was successful, or false if it failed. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the action editor, you can use this field to specify a variable that the return value will be stored in.


MSI.EnableLog

boolean MSI.EnableLog (

number LogMode,

string LogFile,

boolean Append = false,

boolean FlushEachLine = false )

Description

Calls the MsiEnableLog function to set the log mode for all subsequent installations that are initiated in the calling process. This action is usually called before calling the MSI.InstallProduct action.

Parameters

LogMode

(number) The log mode. Use the plus sign ("+") to combine values. If this value is zero and LogFile is nil, then logging will be turned off. Choose from one or more of the following:

CONSTANT | VALUE | DESCRIPTION
INSTALLLOGMODE_FATALEXIT | 1 | Logs out of memory or fatal exit information.
INSTALLLOGMODE_ERROR | 2 | Logs the error messages.
INSTALLLOGMODE_WARNING | 4 | Logs the warning messages.
INSTALLLOGMODE_USER | 8 | Logs the user requests.
INSTALLLOGMODE_INFO | 16 | Logs the status messages that are not displayed.
INSTALLLOGMODE_RESOLVESOURCE | 64 | Request to determine a valid source location.
INSTALLLOGMODE_OUTOFDISKSPACE | 128 | Indicates insufficient disk space.
INSTALLLOGMODE_ACTIONSTART | 256 | Logs the start of new installation actions.
INSTALLLOGMODE_ACTIONDATA | 512 | Logs the data record with the installation action.
INSTALLLOGMODE_PROPERTYDUMP | 1024 | Logs the property values at termination.
INSTALLLOGMODE_COMMONDATA | 2048 | Logs the parameters for user-interface initialization.
INSTALLLOGMODE_VERBOSE | 4096 | Sends large amounts of information to a log file not generally useful to users. May be used for technical support.
INSTALLLOGMODE_EXTRADEBUG | 8192 | Sends extra debugging information, such as handle creation information, to the log file. This feature is not supported on Windows XP.
INSTALLLOGMODE_LOGONLYONERROR | 16384 | Logging information is collected but is less frequently saved to the log file. This can improve the performance of some installations, but may have little benefit for large installations. The log file is removed when the installation succeeds. If the installation fails, all logging information is saved to the log file.

LogFile

(string) The full path and filename of the log file. Specify nil to turn logging off.

Append

(boolean) Whether the installer should append or overwrite any existing log file. Choose from:

VALUE | DESCRIPTION
true | Append to any existign log file specified in LogFile.
false | Overwrite any existing log file specified in LogFile. (Default)

FlushEachLine

(boolean) Whether the log buffer should be flushed after each line, or flushed after 20 lines. Choose from:

VALUE | DESCRIPTION
true | Force the installer to flush the log buffer after each line.
false | Flush the log buffer after 20 lines. (Default)

Returns

(boolean) Returns true if the action was successful, or false if it failed. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the action editor, you can use this field to specify a variable that the return value will be stored in.


MSI.EnumClients

table MSI.EnumClients (

string ComponentGUID )

Description

Calls the MsiEnumClients function to get an enumerated table of clients for a given installed component.

Parameters

ComponentGUID

(string) The identifier (GUID) of the component whose clients you want to enumerate. This string must be an identifier string enclosed in curly braces, for example: "{1638E94C-DA3C-44BD-88FB-5CC76B59BE46}".

Returns

(table) Returns a numerically indexed table of product codes for the given component. If this action fails, or no features are found, nil is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the action editor, you can use this field to specify a variable that the return value will be stored in.


MSI.EnumComponents

table MSI.EnumComponents (

)

Description

Calls the MsiEnumComponents function to get an enumerated table of the installed components for all products.

Parameters

None.

Returns

(table) Returns a numerically indexed table of component GUIDs for all products. If this action fails, or no components are installed, nil is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the action editor, you can use this field to specify a variable that the return value will be stored in.


MSI.EnumFeatures

table MSI.EnumFeatures (

string ProductCode )

Description

Calls the MsiEnumFeatures function to get an enumerated table of the published features for a given product.

Parameters

ProductCode

(string) The "product code" of the product whose features you want to enumerate. This string must be an identifier string enclosed in curly braces, for example: "{78B82B0B-9AD9-40C0-B994-F72C21B52723}".

Returns

(table) Returns a numerically indexed table of tables containing the indexes below. If this action fails, or no features are found, nil is returned.

KEY | TYPE | DESCRIPTION
Feature | string | The feature ID.
ParentFeature | string | The parent feature ID.

You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the action editor, you can use this field to specify a variable that the return value will be stored in.


MSI.EnumPatches

table MSI.EnumPatches (

string ProductCode )

Description

Calls the MsiEnumPatches function to enumerate all of the patches that have been applied to a product, returning the patch code GUIDs for each patch that has been applied, and a list of transforms from each patch that apply to the product.

Note: Patches may have many transforms only some of which are applicable to a particular product.

Parameters

ProductCode

(string) The "product code" of the product whose patches you want to enumerate. This string must be an identifier string enclosed in curly braces, for example: "{78B82B0B-9AD9-40C0-B994-F72C21B52723}".

Returns

(table) Returns a numerically indexed table of tables containing the indexes below. If this action fails, or no patches are found, nil is returned.

KEY | TYPE | DESCRIPTION
PatchCode | string | The patch code GUID.
TransformList | string | The list of transforms in the patch that are applicable to the product. These are returned in the same format as the value of the TRANSFORMS property (a semicolon ';' delimited string).

You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the action editor, you can use this field to specify a variable that the return value will be stored in.


MSI.EnumProducts

table MSI.EnumProducts (

)

Description

Calls the MsiEnumProducts function to get an enumerated table of all the products currently advertised or installed. Both per-user and per-machine installations and advertisements are enumerated.

Parameters

None.

Returns

(table) Returns a numerically indexed table of product codes. If this action fails, or no products are installed, nil is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the action editor, you can use this field to specify a variable that the return value will be stored in.


MSI.EnumRelatedProducts

table MSI.EnumRelatedProducts (

string UpgradeCode )

Description

Calls the MsiEnumRelatedProducts function to get an enumerated table of products with a specified upgrade code. This function lists the currently installed and advertised products that have the specified UpgradeCode property in their Property table.

Parameters

UpgradeCode

(string) The upgrade code of related products to enumerate. This string must be an identifier string enclosed in curly braces, for example: "{07F11339-6660-4CEC-9E09-BB2FEA780929}".

Returns

(table) Returns a numerically indexed table of product codes. If this action fails, or no products are installed, nil is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the action editor, you can use this field to specify a variable that the return value will be stored in.


MSI.GetComponentPath

table MSI.GetComponentPath (

string ProductCode,

string ComponentGUID )

Description

Calls the MsiGetComponentPath function to get the full path to an installed component. If the key path for the component is a registry key then the registry key is returned.

Parameters

ProductCode

(string) The "product code" of the client product. This string must be an identifier string enclosed in curly braces, for example: "{78B82B0B-9AD9-40C0-B994-F72C21B52723}".

ComponentGUID

(string) The identifier (GUID) of the component to be located. This string must be an identifier string enclosed in curly braces, for example: "{1638E94C-DA3C-44BD-88FB-5CC76B59BE46}".

Returns

(table) Returns nil if the call fails or a table if successful with the following indexes:

InstallState

(number) The install state of the component represented by one of the following values:

CONSTANT | VALUE | DESCRIPTION
INSTALLSTATE_NOTUSED | -7 | The component being requested is disabled on the computer.
INSTALLSTATE_SOURCEABSENT | -4 | The component source is inaccessible.
INSTALLSTATE_INVALIDARG | -2 | One of the function parameters is invalid.
INSTALLSTATE_UNKNOWN | -1 | The product code or component identifier is unknown.
INSTALLSTATE_ABSENT | 2 | The component is not installed.
INSTALLSTATE_LOCAL | 3 | The component is installed locally.
INSTALLSTATE_SOURCE | 4 | The component is installed to run from source.

ComponentPath

(string) The path to the component. If there was an error getting the component path (i.e. InstallState returns INSTALLSTATE_UNKNOWN) then this table value will be nil.

If the component is a registry key, the registry roots are represented numerically. If this is a registry subkey path, there is a backslash at the end of the Key Path. If this is a registry value key path, there is no backslash at the end. For example, a registry path on a 32-bit operating system of HKEY_CURRENT_USER\SOFTWARE\Microsoft is returned as "01:\SOFTWARE\Microsoft\". The registry roots returned on 32-bit operating systems are defined as shown in the table below.

Note: On 64-bit operating systems, a value of 20 is added to the numerical registry roots in this table to distinguish them from registry key paths on 32-bit operating systems. For example, a registry key path of HKEY_CURRENT_USER\SOFTWARE\Microsoft is returned as "21:\SOFTWARE\Microsoft\", if the component path is a registry key on a 64-bit operating system.

ROOT | VALUE
HKEY_CLASSES_ROOT | 00
HKEY_CURRENT_USER | 01
HKEY_LOCAL_MACHINE | 02
HKEY_USERS | 03

If the action fails, nil is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the action editor, you can use this field to specify a variable that the return value will be stored in.


MSI.GetFeatureInfo

table MSI.GetFeatureInfo (

number Handle,

string FeatureID,

number Attributes )

Description

Calls the MsiGetFeatureInfo function to get descriptive information for a feature.

Parameters

Handle

(number) The "handle" to the product that owns the feature. You can use the MSI.OpenProduct action to get the product handle.

FeatureID

(string) The identifier of the feature whose information you want.

Attributes

(number) The attributes you want to get. Use the plus sign ("+") to combine values. Choose from one or more of the following:
For more information about these flags, see the Feature Table topic in the MSDN.

CONSTANT | VALUE
INSTALLFEATUREATTRIBUTE_FAVORLOCAL | 1
INSTALLFEATUREATTRIBUTE_FAVORSOURCE | 2
INSTALLFEATUREATTRIBUTE_FOLLOWPARENT | 4
INSTALLFEATUREATTRIBUTE_FAVORADVERTISE | 8
INSTALLFEATUREATTRIBUTE_DISALLOWADVERTISE | 16
INSTALLFEATUREATTRIBUTE_NOUNSUPPORTEDADVERTISE | 32

Returns

(table) Returns a table indexed by the following values.

KEY | TYPE | DESCRIPTION
Title | string | The localized name of the feature.
Description | string | The localized description of the feature.

If the action fails, nil is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the action editor, you can use this field to specify a variable that the return value will be stored in.


MSI.GetFeatureUsage

table MSI.GetFeatureUsage (

string ProductCode,

string FeatureID )

Description

Calls the MsiGetFeatureUsage function to get the usage metrics for a product feature.

Parameters

ProductCode

(string) The "product code" of the product containing the feature. This string must be an identifier string enclosed in curly braces, for example: "{78B82B0B-9AD9-40C0-B994-F72C21B52723}".

FeatureID

(string) The identifier of the feature whose metrics you want.

Returns

(table) Returns a table indexed by the following values. If this action fails or an error occurs, nil is returned:

KEY | TYPE | DESCRIPTION
UsageCount | number | The number of times the feature has been used.
Day | number | The day of the month the feature was last used (1-31).
Month | number | The month the feature was last used (1 = January, 2 = February etc.).
Year | number | The year the feature was last used.

If the action fails, nil is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the action editor, you can use this field to specify a variable that the return value will be stored in.


MSI.GetFileVersion

table MSI.GetFileVersion (

string FilePath )

Description

Calls the MsiGetFileVersion function to get the version and language strings in the format that the installer expects to find them in the database. This action is used to read version resource information from PE files (.exe, dll).

Note: This action will not work on Windows Installer files (.msi).

Parameters

FilePath

(string) The full path to the file whose version/language information you want.

Returns

(table) Returns a table indexed by the following values:

KEY | TYPE | DESCRIPTION
Version | string | The file version.
Language | string | The file language.

If the action fails, nil is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the action editor, you can use this field to specify a variable that the return value will be stored in.


MSI.GetMSIVersion

string MSI.GetMSIVersion (

)

Description

Gets the version of the Windows Installer that is installed on the user's system.

Parameters

None.

Returns

(string) A string containing the version number of the Windows Installer that is currently installed. If an error occurs, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the action editor, you can use this field to specify a variable that the return value will be stored in.


MSI.GetPatchInfo

string MSI.GetPatchInfo (

string PatchCode,

string Attribute )

Description

Calls the MsiGetPatchInfo function to get information about a patch.

Parameters

PatchCode

(string) The "patch code" for the patch package whose information you want. This string must be an identifier string enclosed in curly braces, for example: "{78B82B0B-9AD9-40C0-B994-F72C21B52723}".

Attribute

(string) The patch attribute to be retrieved. For example, for the local cached package you would use "INSTALLPROPERTY_LOCALPACKAGE".

Returns

(string) A string containing the value of the specified attribute. If this action fails, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the action editor, you can use this field to specify a variable that the return value will be stored in.


MSI.GetProductCode

string MSI.GetProductCode (

string ComponentGUID )

Description

Calls the MsiGetProductCode function to get the product code of an application by using the component GUID of an installed or advertised component of the application. During initialization, an application must determine under which product code it has been installed or advertised.

Parameters

ComponentGUID

(string) The identifier (GUID) of the component that has been installed by the application. This string must be an identifier string enclosed in curly braces, for example: "{1638E94C-DA3C-44BD-88FB-5CC76B59BE46}". This will be typically the component containing the executable file of the application.

Returns

(string) A string containing the product code based on the component GUID. If this action fails, a blank string (i.e. "") will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the action editor, you can use this field to specify a variable that the return value will be stored in.


MSI.GetProductInfo

string MSI.GetProductInfo (

string ProductCode,

string Property )

Description

Calls the MsiGetProductInfo function to get product information for published and installed products given a specified property.

Parameters

ProductCode

(string) The "product code" of the product whose information you want. This string must be an identifier string enclosed in curly braces, for example: "{78B82B0B-9AD9-40C0-B994-F72C21B52723}".

Property

(string) The property containing the value you want. Some properties can only be retrieved if they have been set. You can use the available properties listed below, or one that you've previously set yourself.

The following properties can only be retrieved from applications that are installed:

Note: For more information about the properties listed below, see the Property Reference topic in the online MSDN.

PROPERTY | DESCRIPTION
"HelpLink" | The support link. For more information, see the ARPHELPLINK property.
"HelpTelephone" | The support telephone. For more information, see the ARPHELPTELEPHONE property.
"InstallDate" | The installation date.
"InstalledProductName" | The installed product name. For more information, see the ProductName property.
"InstallLocation" | The installation location. For more information, see the ARPINSTALLLOCATION property.
"InstallSource" | The installation source. For more information, see the SourceDir property.
"LocalPackage" | The local cached package.
"Publisher" | The publisher. For more information, see the Manufacturer property.
"URLInfoAbout" | The URL information. For more information, see the ARPURLINFOABOUT property.
"URLUpdateInfo" | The URL update information. For more information, see the ARPURLUPDATEINFO property.
"VersionMinor" | The minor product version derived from the ProductVersion property.
"VersionMajor" | The major product version derived from the ProductVersion property.
"VersionString" | The product version. For more information, see the ProductVersion property.
"ProductID" | The product identifier for the product. For more information, see the ProductID property.
"RegCompany" | The company registered to use this product.
"RegOwner" | The owner registered to use this product.

The following properties can be retrieved from applications that are advertised or installed:

PROPERTY | DESCRIPTION
"InstanceType" | A missing value or a value of "0" (zero) indicates a normal product installation. A value of "1" (one) indicates a product installed using a multiple instance transform and the MSINEWINSTANCE property. Available with the installer running Windows Server 2003 family or Windows XP SP1. For more information see the MSDN article: Installing Multiple Instances of Products and Patches.
"Transforms" | The transforms.
"Language" | The product language.
"ProductName" | The product name. For more information, see the ProductName property.
"AssignmentType" | Returns "0" (zero) if the product is advertised or installed per-user. Returns "1" (one) if the product is advertised or installed per-machine for all users.
"PackageCode" | The identifier of the package this product was installed from.
"Version" | The product version derived from the ProductVersion property.
"ProductIcon" | The primary icon for the package. For more information, see the ARPPRODUCTICON property.
"PackageName" | The name of the original installation package.
"AuthorizedLUAApp" | A returned value of one (1) indicates a product that can be serviced by non-administrators using User Account Control (UAC) Patching. A missing value or returned value of 0 (zero) indicates that least-privilege patching is not enabled. Available in Windows Installer 3.0 or later.

Returns

(string) A string containing the value of the specified property. If this action fails, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the action editor, you can use this field to specify a variable that the return value will be stored in.


MSI.GetProductProperty

string MSI.GetProductProperty (

number Handle,

string Property )

Description

Calls the MsiGetProductProperty function to retrieve a product property. These are the properties in the product database.

Parameters

Handle

(number) The "handle" to the product obtained from calling the MSI.OpenProduct action.

Property

(string) The property whose value you want. This value is case-sensitive.

Returns

(string) A string containing the value of the specified property. If this action fails, nil is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the action editor, you can use this field to specify a variable that the return value will be stored in.


MSI.GetShortcutTarget

table MSI.GetShortcutTarget (

string ShortcutTarget )

Description

Calls the MsiGetShortcutTarget function to examine a shortcut and get its product, feature name, and component if available.

Parameters

ShortcutTarget

(string) The full path to the shortcut to examine.

Returns

(table) Returns a table indexed by the following values. If this action fails or an error occurs, nil is returned:

KEY | TYPE | DESCRIPTION
ProductCode | string | A GUID for the product code of the shortcut.
FeatureId | string | The feature name of the shortcut.
ComponentCode | string | A GUID of the component code.

If the action fails, nil is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the action editor, you can use this field to specify a variable that the return value will be stored in.


MSI.GetUserInfo

table MSI.GetUserInfo (

string ProductCode )

Description

Calls the MsiGetUserInfo function to get the registered user information for an installed product.

Parameters

ProductCode

(string) The "product code" of the product to be queried. This string must be an identifier string enclosed in curly braces, for example: "{78B82B0B-9AD9-40C0-B994-F72C21B52723}".

Returns

(table) Returns nil if the call fails or a table if successful with the following indexes:

UserInfoState

(number) The state of the user info represented by one of the following values:

CONSTANT | VALUE | DESCRIPTION
USERINFOSTATE_MOREDATA | -3 | A buffer is too small to hold the requested data.
USERINFOSTATE_INVALIDARG | -2 | One of the function parameters was invalid.
USERINFOSTATE_UNKNOWN | -1 | The product code does not identify a known product.
USERINFOSTATE_ABSENT | 0 | Some or all of the user information is absent.
USERINFOSTATE_PRESENT | 1 | The function completed successfully.

UserName

(string) The name of the registered user. If the information could not be retrieved, an empty string ("") is returned.

CompanyName

(string) The company name of the registered user. If the information could not be retrieved, an empty string ("") is returned.

SerialNumber

(string) The serial number of the product. If the information could not be retrieved, an empty string ("") is returned.

If the action fails, nil is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the action editor, you can use this field to specify a variable that the return value will be stored in.


MSI.InstallMissingComponent

boolean MSI.InstallMissingComponent (

string ProductCode,

string ComponentGUID,

number InstallState )

Description

Calls the MsiInstallMissingComponent function to install a component that is unexpectedly missing.

Parameters

ProductCode

(string) The "product code" of the product that owns the component to be installed. This string must be an identifier string enclosed in curly braces, for example: "{78B82B0B-9AD9-40C0-B994-F72C21B52723}".

ComponentGUID

(string) The identifier (GUID) of the component to be installed. This string must be an identifier string enclosed in curly braces, for example: "{1638E94C-DA3C-44BD-88FB-5CC76B59BE46}".

InstallState

(number) The way the component should be installed. Choose from one of the following:

CONSTANT | VALUE | DESCRIPTION
INSTALLSTATE_LOCAL | 3 | The component should be locally installed.
INSTALLSTATE_SOURCE | 4 | The component should be installed to run from the source.
INSTALLSTATE_DEFAULT | 5 | The component should be installed according to the installer defaults.

Returns

(boolean) Returns true if the action was successful, or false if it failed. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the action editor, you can use this field to specify a variable that the return value will be stored in.


MSI.InstallMissingFile

boolean MSI.InstallMissingFile (

string ProductCode,

string File )

Description

Calls the MsiInstallMissingFile function to install a file that is unexpectedly missing.

Parameters

ProductCode

(string) The "product code" of the product that owns the file to be installed. This string must be an identifier string enclosed in curly braces, for example: "{78B82B0B-9AD9-40C0-B994-F72C21B52723}".

File

(string) The identifier of the file to be installed.

Returns

(boolean) Returns true if the action was successful, or false if it failed. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the action editor, you can use this field to specify a variable that the return value will be stored in.


MSI.InstallProduct

boolean MSI.InstallProduct (

string PackagePath,

string CommandLine)

Description

Calls the MsiInstallProduct function to install or uninstall a product.

Parameters

PackagePath

(string) The full path and filename of the package to install.

CommandLine

(string) The command line property settings to pass to the package. This string should be a list in the format: "Property=Setting Property=Setting". To perform an administrative installation, include "ACTION=ADMIN". You can completely remove a product using "REMOVE=ALL", or install a product using "ACTION=INSTALL."

Returns

(boolean) True if the action completely successfully, and false if it did not or an error occurs. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the action editor, you can use this field to specify a variable that the return value will be stored in.


MSI.LocateComponent

table MSI.LocateComponent (

string ComponentGUID )

Description

Calls the MsiLocateComponent function to get the full path to an installed component without a product code. This function attempts to determine the product using MsiGetProductCode, but is not guaranteed to find the correct product for the caller. The MSI.GetComponentPath action should always be called when possible.

Parameters

ComponentGUID

(string) The identifier (GUID) of the component to be located. This string must be an identifier string enclosed in curly braces, for example: "{1638E94C-DA3C-44BD-88FB-5CC76B59BE46}".

Returns

(table) Returns nil if the call fails or a table if successful with the following indexes:

InstallState

(number) The install state of the component represented by one of the following values:

CONSTANT | VALUE | DESCRIPTION
INSTALLSTATE_NOTUSED | -7 | The component being requested is disabled on the computer.
INSTALLSTATE_SOURCEABSENT | -4 | The component source is inaccessible.
INSTALLSTATE_MOREDATA | -3 | The buffer provided was too small.
INSTALLSTATE_INVALIDARG | -2 | One of the function parameters is invalid.
INSTALLSTATE_UNKNOWN | -1 | The product code or component ID is unknown.
INSTALLSTATE_ABSENT | 2 | The component is not installed.
INSTALLSTATE_LOCAL | 3 | The component is installed locally.
INSTALLSTATE_SOURCE | 4 | The component is installed to run from source.

ComponentPath

(string) The path to the component. If there was an error getting the component path (i.e. InstallState returns INSTALLSTATE_UNKNOWN) then this table value will be nil.

If the action fails, nil is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the action editor, you can use this field to specify a variable that the return value will be stored in.


MSI.OpenPackage

number MSI.OpenPackage (

string PackagePath )

Description

Calls the MsiOpenPackage function to open a package for use with the actions that access the product database. You must call the MSI.CloseHandle action with the handle when it is no longer needed.

Parameters

PackagePath

(string) The full path to the package whose handle you want.

Returns

(number) The handle to the MSI package. If this action fails, nil is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the action editor, you can use this field to specify a variable that the return value will be stored in.


MSI.OpenProduct

number MSI.OpenProduct (

string ProductCode )

Description

Calls the MsiOpenProduct function to open a product for use with the actions that access the product database. You must call the MSI.CloseHandle action with the handle when it is no longer needed.

Parameters

ProductCode

(string) The "product code" of the product you want to open. This string must be an identifier string enclosed in curly braces, for example: "{78B82B0B-9AD9-40C0-B994-F72C21B52723}".

Returns

(number) The handle to the MSI product. If this action fails, nil is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the action editor, you can use this field to specify a variable that the return value will be stored in.


MSI.QueryFeatureState

number MSI.QueryFeatureState (

string ProductCode,

string Feature )

Description

Calls the MsiQueryFeatureState function to get the installed state for a product feature.

Parameters

ProductCode

(string) The "product code" of the product containing the feature. This string must be an identifier string enclosed in curly braces, for example: "{78B82B0B-9AD9-40C0-B994-F72C21B52723}".

Feature

(string) The feature whose installed state you want.

Returns

(number) The installed state of the feature represented by one of the following values:

CONSTANT | VALUE | DESCRIPTION
INSTALLSTATE_INVALIDARG | -2 | An invalid parameter was passed to the function.
INSTALLSTATE_UNKNOWN | -1 | The product code or feature ID is unknown.
INSTALLSTATE_ADVERTISED | 1 | The feature is advertised.
INSTALLSTATE_ABSENT | 2 | The feature is not installed.
INSTALLSTATE_LOCAL | 3 | The feature is installed locally.
INSTALLSTATE_SOURCE | 4 | The feature is installed to run from source.

If the action fails, nil is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the action editor, you can use this field to specify a variable that the return value will be stored in.


MSI.QueryProductState

number MSI.QueryProductState (

string ProductCode )

Description

Calls the MsiQueryProductState function to get the installed state for a product.

Parameters

ProductCode

(string) The "product code" of the product whose state you want. This string must be an identifier string enclosed in curly braces, for example: "{78B82B0B-9AD9-40C0-B994-F72C21B52723}".

Returns

(number) The installed state of the product represented by one of the following values:

CONSTANT | VALUE | DESCRIPTION
INSTALLSTATE_INVALIDARG | -2 | An invalid parameter was passed to the function.
INSTALLSTATE_UNKNOWN | -1 | The product is neither advertised or installed.
INSTALLSTATE_ADVERTISED | 1 | The product is advertised but not installed.
INSTALLSTATE_ABSENT | 2 | The product is installed for a different user.
INSTALLSTATE_DEFAULT | 5 | The product is installed for the current user.

You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the action editor, you can use this field to specify a variable that the return value will be stored in.


MSI.ReinstallFeature

boolean MSI.ReinstallFeature (

string ProductCode,

string FeatureID,

number ReinstallMode )

Description

Calls the MsiReinstallFeature function to reinstall a feature.

Parameters

ProductCode

(string) The "product code" of the product that contains the feature to be reinstalled. This string must be an identifier string enclosed in curly braces, for example: "{78B82B0B-9AD9-40C0-B994-F72C21B52723}".

FeatureID

(string) The identifier of the feature to be reinstalled. The parent feature or child feature of the specified feature is not reinstalled. To reinstall the parent or child feature, you must call the MSI.ReinstallFeature action for each separately, or use the MSI.ReinstallProduct action.

ReinstallMode

(number) The reinstall mode. Use the plus sign ("+") to combine values. Choose from one or more of the following:

CONSTANT | VALUE | DESCRIPTION
REINSTALLMODE_FILEMISSING | 2 | Reinstall only if the file is missing.
REINSTALLMODE_FILEOLDERVERSION | 4 | Reinstall if the file is missing or is an older version.
REINSTALLMODE_FILEEQUALVERSION | 8 | Reinstall if the file is missing, or is an equal or older version.
REINSTALLMODE_FILEEXACT | 16 | Reinstall if the file is missing or is a different version.
REINSTALLMODE_FILEVERIFY | 32 | Verify the checksum values and reinstall the file if they are missing or corrupt. This flag only repairs files that have msidbFileAttributesChecksum in the Attributes column of the File table.
REINSTALLMODE_FILEREPLACE | 64 | Force all files to be reinstalled, regardless of checksum or version.
REINSTALLMODE_MACHINEDATA | 128 | Rewrite all required registry entries from the Registry Table that go to the HKEY_LOCAL_MACHINE or HKEY_CLASSES_ROOT registry hive. Rewrite all information from the Class Table, Verb Table, PublishComponent Table, ProgID Table, MIMET Table, Icon Table, Extension Table, and AppID Table regardless of machine or user assignment. Reinstall all qualified components. When reinstalling an application, this option runs the RegisterTypeLibraries and InstallODBC actions.
REINSTALLMODE_USERDATA | 256 | Rewrite all required registry entries from the Registry Table that go to the HKEY_CURRENT_USER or HKEY_USERS registry hive.
REINSTALLMODE_SHORTCUT | 512 | Reinstall all shortcuts and re-cache all icons overwriting any existing shortcuts and icons.
REINSTALLMODE_PACKAGE | 1024 | Use to run from the source package and re-cache the local package. Do not use for the first installation of an application or feature.

Returns

(boolean) Returns true if the action was successful, or false if it failed. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the action editor, you can use this field to specify a variable that the return value will be stored in.


MSI.ReinstallProduct

boolean MSI.ReinstallProduct (

string ProductCode,

number ReinstallMode )

Description

Calls the MsiReinstallProduct function to reinstall a product.

Parameters

ProductCode

(string) The "product code" of the product to be reinstalled. This string must be an identifier string enclosed in curly braces, for example: "{78B82B0B-9AD9-40C0-B994-F72C21B52723}".

ReinstallMode

(number) The reinstall mode. Use the plus sign ("+") to combine values. Choose from one or more of the following:

CONSTANT | VALUE | DESCRIPTION
REINSTALLMODE_FILEMISSING | 2 | Reinstall only if the file is missing.
REINSTALLMODE_FILEOLDERVERSION | 4 | Reinstall if the file is missing or is an older version.
REINSTALLMODE_FILEEQUALVERSION | 8 | Reinstall if the file is missing, or is an equal or older version.
REINSTALLMODE_FILEEXACT | 16 | Reinstall if the file is missing or is a different version.
REINSTALLMODE_FILEVERIFY | 32 | Verify the checksum values and reinstall the file if they are missing or corrupt. This flag only repairs files that have msidbFileAttributesChecksum in the Attributes column of the File table.
REINSTALLMODE_FILEREPLACE | 64 | Force all files to be reinstalled, regardless of checksum or version.
REINSTALLMODE_MACHINEDATA | 128 | Rewrite all required registry entries from the Registry Table that go to the HKEY_LOCAL_MACHINE or HKEY_CLASSES_ROOT registry hive. Rewrite all information from the Class Table, Verb Table, PublishComponent Table, ProgID Table, MIMET Table, Icon Table, Extension Table, and AppID Table regardless of machine or user assignment. Reinstall all qualified components. When reinstalling an application, this option runs the RegisterTypeLibraries and InstallODBC actions.
REINSTALLMODE_USERDATA | 256 | Rewrite all required registry entries from the Registry Table that go to the HKEY_CURRENT_USER or HKEY_USERS registry hive.
REINSTALLMODE_SHORTCUT | 512 | Reinstall all shortcuts and re-cache all icons overwriting any existing shortcuts and icons.
REINSTALLMODE_PACKAGE | 1024 | Use to run from the source package and re-cache the local package. Do not use for the first installation of an application or feature.

Returns

(boolean) Returns true if the action was successful, or false if it failed. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the action editor, you can use this field to specify a variable that the return value will be stored in.


MSI.RunMsiexec

number MSI.RunMsiexec (

string Arguments,

boolean WaitForReturn = true )

Description

Runs the Windows Installer program "msiexec.exe" with the specified arguments.

Parameters

Arguments

(string) The arguments you want to pass to "msiexec.exe". For example, "-i \""C:\Temp\Example.msi"\" PROPERTY=VALUE"

WaitForReturn

(boolean) Whether the application will wait until the executable has exited before continuing:

VALUE | DESCRIPTION
true | Wait. (Default)
false | Don't wait.

Note: This parameter must be set to true if you want to receive a process return code.

Returns

(number) The process return code if the WaitForReturn parameter is set to true. If WaitForReturn is set to false 0 is returned. You can use Application.GetLastError to determine whether this action failed, and why.

Note: On Windows Vista or later, if this action fails due to requiring elevation, error code 1045 is returned.

Note: If the specified process has not terminated, the termination status returned is STILL_ACTIVE. If the process has terminated, the termination status returned may be one of the following:

The exit value specified in the ExitProcess or TerminateProcess function.
The return value from the main or WinMain function of the process.
The exception value for an unhandled exception that caused the process to terminate.

ResultVariable

When adding an action with the action editor, you can use this field to specify a variable that the return value will be stored in.

See also: Related Actions
MSDN Online: Command-Line Options


MSI.SetInternalUI

table MSI.SetInternalUI (

number UILevel,

number WindowHandle = nil )

Description

Calls the MsiSetInternalUI function to enable the installer's internal user interface. Then this user interface is used for all subsequent calls to user-interface-generating installer functions in this process. This action is usually called before calling the MSI.InstallProduct action.

Parameters

UILevel

(number) The user interface level to set. Some values can be combined with others. In that case, use the plus sign ("+") to combine values. Choose from:

CONSTANT | VALUE | DESCRIPTION
INSTALLUILEVEL_NOCHANGE | 0 | No change in the UI level. However, if WindowHandle is not nil, the parent window can change.
INSTALLUILEVEL_DEFAULT | 1 | The installer chooses an appropriate user interface level.
INSTALLUILEVEL_NONE | 2 | Completely silent installation.
INSTALLUILEVEL_BASIC | 3 | Simple progress and error handling.
INSTALLUILEVEL_REDUCED | 4 | Authored user interface with wizard dialog boxes suppressed.
INSTALLUILEVEL_FULL | 5 | Authored user interface with wizards, progress, and errors.
INSTALLUILEVEL_HIDECANCEL | 32 | If combined with the INSTALLUILEVEL_BASIC value, the installer shows simple progress dialog boxes but does not display a Cancel button on the dialog. This prevents users from canceling the install.
INSTALLUILEVEL_PROGRESSONLY | 64 | If combined with the INSTALLUILEVEL_BASIC value, the installer shows simple progress dialog boxes but does not display any modal dialog boxes or error dialog boxes.
INSTALLUILEVEL_ENDDIALOG | 128 | If combined with any above value, the installer displays a modal dialog box at the end of a successful installation or if there has been an error. No dialog box is displayed if the user cancels.
INSTALLUILEVEL_SOURCERESONLY | 256 | If this value is combined with the INSTALLUILEVEL_NONE value, the installer displays only the dialog boxes used for source resolution. No other dialog boxes are shown. This value has no effect if the UI level is not INSTALLUILEVEL_NONE. It is used with an external user interface designed to handle all of the UI except for source resolution. In this case, the installer handles source resolution.

WindowHandle

(number) A windows handle that becomes the owner of any user interface created. If this parameter is nil, the owner of the user interface does not change. You can use the Application.GetWndHandle action to get a handle to the application's main window.

Returns

(table) Returns nil if the call fails or a table if successful with the following indexes:

KEY | TYPE | DESCRIPTION
PreviousInterface | number | The previous user interface level.
PreviousWindowHandle | number | The previous window handle of the owner process. If WindowHandle was passed in as nil or not specified, this value will be nil.

If the action fails, nil is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the action editor, you can use this field to specify a variable that the return value will be stored in.


MSI.VerifyPackage

boolean MSI.VerifyPackage (

string PackagePath )

Description

Calls the MsiVerifyPackage function to verify that the given file is an installation package.

Parameters

PackagePath

(string) The full path and filename of the package.

Returns

(boolean) Returns true if the file is a package, or false if it is not or an error occurs. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the action editor, you can use this field to specify a variable that the return value will be stored in.


Page.ClickObject

Page.ClickObject (

string ObjectName )

Description

Fires the On Click event of the specified object. This will cause any actions on the object's On Click event to be executed.

Parameters

ObjectName

(string) The name of the object.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Page.CreateObject

Page.CreateObject (

number ObjectType,

string ObjectName,

table Properties )

Description

Creates an object on the current page.

Parameters

ObjectType

(number) The type of object to create:

CONSTANT | VALUE | DESCRIPTION
OBJECT_BUTTON | 0 | Button object.
OBJECT_LABEL | 1 | Label object.
OBJECT_PARAGRAPH | 2 | Paragraph object.
OBJECT_IMAGE | 3 | Image object.
OBJECT_FLASH | 4 | Flash object.
OBJECT_VIDEO | 5 | Video object.
OBJECT_WEB | 6 | Web object.
OBJECT_INPUT | 7 | Input object.
OBJECT_HOTSPOT | 8 | Hotspot object.
OBJECT_LISTBOX | 9 | Listbox object.
OBJECT_COMBOBOX | 10 | Combobox object.
OBJECT_PROGRESS | 11 | Progress object.
OBJECT_TREE | 12 | Tree object.
OBJECT_RADIOBUTTON | 13 | RadioButton object.
OBJECT_RICHTEXT | 14 | RichText object.
OBJECT_CHECKBOX | 15 | CheckBox object.
OBJECT_SLIDESHOW | 16 | SlideShow object.
OBJECT_GRID | 17 | Grid object.
OBJECT_PDF | 18 | PDF object.
OBJECT_QUICKTIME | 19 | QuickTime object.
OBJECT_XBUTTON | 20 | xButton object.

ObjectName

(string) The name of the object.

Note: This name must not be the name of another object on the page. If an object on the page already exists with the name passed, an error will occur.

Properties

(table) A table of properties you want to set for the object. The contents of this table depends on which object type was specified:

Note: Clicking on the links below will take you to the properties table in each object's SetProperties action.

  • Button

  • Image

  • Label (Height and Width cannot be specified when creating a label object with this action)

  • Paragraph

  • Video

  • QuickTime

  • Flash

  • SlideShow

  • PDF

  • Web

  • xButton

  • CheckBox

  • RadioButton

  • Input

  • ComboBox

  • ListBox

  • Tree

  • Grid

  • Progress

  • RichText

  • Hotspot

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Page.DeleteObject

Page.DeleteObject (

string ObjectName )

Description

Deletes an object from the current page.

Parameters

ObjectName

(string) The name of the object.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Page.EnumerateObjects

table Page.EnumerateObjects (

)

Description

Returns a table containing the names of all of the objects on the current page.

Parameters

None.

Returns

(table) A table containing each object name found on the current page. If there are no objects on the page, or the action fails, nil is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Page.GetFocus

string Page.GetFocus (

)

Description

Returns the name of the object that currently has focus.

Note: Focus can only be returned for the following object types: QuickTime, Flash, xButton, CheckBox, RadioButton, Input, ComboBox, ListBox, Tree, Grid, and RichText objects. It may also apply to various types of plugin objects that support focus.

Parameters

None.

Returns

(string) The name of the object that currently has focus. If no object has focus or an error occurs, a blank string "" is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Page.GetObjectScript

string Page.GetObjectScript (

string ObjectName,

string EventName )

Description

Returns a string containing the script from an object's event.

Parameters

ObjectName

(string) The name of the object whose script you want to get.

EventName

(string) The name of the event whose script you want as it appears in the script editor dialog. For example "On Click".

Returns

(string) The object's script for the specified event. If an error occurs, an empty string ("") is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Page.GetObjectType

number Page.GetObjectType (

string ObjectName )

Description

Returns the "type" of a given object on a page.

Parameters

ObjectName

(string) The name of the object.

Returns

(number) One of the following values representing the "type" of the object:

CONSTANT | VALUE | DESCRIPTION
OBJECT_BUTTON | 0 | Button object.
OBJECT_LABEL | 1 | Label object.
OBJECT_PARAGRAPH | 2 | Paragraph object.
OBJECT_IMAGE | 3 | Image object.
OBJECT_FLASH | 4 | Flash object.
OBJECT_VIDEO | 5 | Video object.
OBJECT_WEB | 6 | Web object.
OBJECT_INPUT | 7 | Input object.
OBJECT_HOTSPOT | 8 | Hotspot object.
OBJECT_LISTBOX | 9 | Listbox object.
OBJECT_COMBOBOX | 10 | Combobox object.
OBJECT_PROGRESS | 11 | Progress object.
OBJECT_TREE | 12 | Tree object.
OBJECT_RADIOBUTTON | 13 | RadioButton object.
OBJECT_RICHTEXT | 14 | RichText object.
OBJECT_CHECKBOX | 15 | CheckBox object.
OBJECT_SLIDESHOW | 16 | Slideshow object.
OBJECT_GRID | 17 | Grid object.
OBJECT_PDF | 18 | PDF object.
OBJECT_QUICKTIME | 19 | QuickTime object.
OBJECT_XBUTTON | 20 | xButton object.
OBJECT_PLUGIN | 40 | Plugin object.

If no object can be found with the name you provided, or any other error occurs, -1 is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Page.GetRadioValue

string Page.GetRadioValue (

string GroupID = "",

number Type = RADIOGROUP_VALUE )

Description

Gets the radiobutton value, object name, or text of the selected radio button on the page.

Tip: You can select a radio button on a page by text, value or object name using the Page.SetRadioValue action.

Parameters

GroupID

(string) The ID of the group whose selected radiobutton you want. When an empty string is passed, this is the default radiobutton group of the page.

Type

(number) The type of value you want from the selected radiobutton:

CONSTANT | VALUE | DESCRIPTION
RADIOGROUP_VALUE | 0 | Get the radiobutton value. (Default)
RADIOGROUP_OBJECTNAME | 1 | Get the radiobutton object's name.
RADIOGROUP_TEXT | 2 | Get the radiobutton's text.

Returns

(string) The chosen Type data of the currently selected radiobutton object on the page. If no object is selected, or an error occurs, an empty string is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Page.GetSize

table Page.GetSize (

)

Description

Returns table containing the current page's pixel dimensions.

Note: If the application is running in kiosk mode, the dimensions of the entire "kiosk" will be returned, not the size of the page within the kiosk. Generally this will be the size of the screen.

Parameters

None.

Returns

(table) A table containing the current page's pixel dimensions, indexed by values "Width" and "Height". If an error occurs, nil is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Page.Jump

Page.Jump (

string PageName )

Description

Jumps to a specific page in your application.

Note: This action exits the script on the current event, so any action script occurring after it will not be executed.

Note: You cannot navigate pages when a dialog is visible.

Parameters

PageName

(string) The name of the page to jump to.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Page.Navigate

Page.Navigate (

number NavigateType )

Description

Navigates to a relative page in your application.

Note: This action exits the script on the current event, so any action script occurring after it will not be executed.

Note: You cannot navigate pages when a dialog is visible.

Parameters

NavigateType

(number) The type of navigation to use:

CONSTANT | VALUE | DESCRIPTION
PAGE_FIRST | 0 | Navigate to the first page in the application.
PAGE_LAST | 1 | Navigate to the last page in the application.
PAGE_NEXT | 2 | Navigate to the next page in the application (according to the order the pages are listed in the program).
PAGE_PREVIOUS | 3 | Navigate to the previous page in the application (according to the order the pages are listed in the program).
PAGE_BACKWARD | 4 | Navigate one page backward in the user's navigation history (the page the user was on before the current page).
PAGE_FORWARD | 5 | Navigate one page forward in the user's navigation history. (For this type to work, the user must have used PAGE_BACKWARD before they can go forward in the navigation history.)

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Page.Print

Page.Print (

boolean ShowPrintDialog = true,

boolean ScaleToFit = true )

Description

Prints the current page.

Note: Some types of objects have troubles printing with certain printer drivers. The Video object will not display when printed.

Parameters

ShowPrintDialog

(boolean) Whether to show the common print dialog before printing.

VALUE | DESCRIPTION
true | Show the common print dialog before printing. (Default)
false | Use defaults such as default printer, letter sized paper and choose the best between portrait and landscape.

ScaleToFit

(boolean) Whether to scale the page to fill as much of the printed page as possible while preserving the aspect ratio of the page.

VALUE | DESCRIPTION
true | Scale the page to fill the printed page. (Default)
false | Print the page at a 1:1 ratio.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Page.Redraw

Page.Redraw (

)

Description

Causes the current page to redraw itself.

Note: This will also redraw all of the objects on the current page.

Parameters

None.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Page.SetFocus

Page.SetFocus (

string ObjectName )

Description

Sets focus to an object on the current page.

Note: Focus can only be set for QuickTime, Flash, xButton, CheckBox, RadioButton, Input, ComboBox, ListBox, Tree, Grid, and RichText objects. It may also apply to various types of plugin objects that support focus.

Parameters

ObjectName

(string) The name of the object.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Page.SetObjectScript

Page.SetObjectScript (

string ObjectName,

string EventName,

string Script )

Description

Sets the script on an object's event.

Note: This action applies to objects on the current page only. To set script for an object on page 2, your application must be displaying page 2.

Parameters

ObjectName

(string) The name of the object whose script you want to set.

EventName

(string) The name of the event whose script you want to set, as it appears in the script editor dialog. For example "On Click".

Script

(string) The script to assign to the specified object's event.

Note: The script specified in this argument will replace any script existing in the event. If you want to append to the event (instead of replacing the script), you must first perform a Page.GetObjectScript action.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Page.SetObjectZOrder

Page.SetObjectZOrder (

string ObjectName,

number Position,

string ReferenceObject = "" )

Description

Sets the z-position of an object on the current page.

Parameters

ObjectName

(string) The name of the object.

Position

(number) The z-order position the object should take:

CONSTANT | VALUE | DESCRIPTION
ZORDER_FRONT | 0 | Move the object to the front of the z-order.
ZORDER_BACK | 1 | Move the object to the back of the z-order.
ZORDER_FORWARD | 2 | Move the object forward one position in the z-order.
ZORDER_BACKWARD | 3 | Move the object backward one position in the z-order.
ZORDER_INSERT_BEFORE | 4 | Move the object into the z-order position in front of the object specified in ReferenceObject.
ZORDER_INSERT_BEHIND | 5 | Move the object into the z-order position behind the object specified in ReferenceObject.

ReferenceObject

(string) If Position is set to ZORDER_INSERT_BEFORE or ZORDER_INSERT_BEHIND, this is the object that the object specified in ObjectName will be positioned next to. ReferenceObject is an empty string ("") by default.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Page.SetRadioValue

Page.SetRadioValue (

string Value,

string GroupID = "",

number Type = RADIOGROUP_VALUE )

Description

Selects a radio button item in a group by value, object name or radio button text.

Tip: You can get the selected radio button on the page using the Page.GetRadioValue action.

Parameters

Value

(string) The radio button that should be selected in the group. This value will be interpreted according to the Type parameter.

GroupID

(string) The ID of the group whose radio button you want to select. When an empty string is passed, this is the default radiobutton group of the page.

Type

(number) The type of value that you are specifying in the Value parameter:

CONSTANT | VALUE | DESCRIPTION
RADIOGROUP_VALUE | 0 | Select by radiobutton value. (Default)
RADIOGROUP_OBJECTNAME | 1 | Select by radiobutton object's name.
RADIOGROUP_TEXT | 2 | Select by radiobutton's text.

Returns

Nothing.


Page.StartTimer

Page.StartTimer (

number Interval = 1000,

number ID = 10 )

Description

Starts a timer for the current page.

Note: Once started, the page timer will continually trigger the page's On Timer event on the interval that you specify. You can find the On Timer event tab in the script editor.

Parameters

Interval

(number) The timer interval in milliseconds.

ID

(number) The ID of the timer you want to start.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Page.StopTimer

Page.StopTimer (

number ID = 10 )

Description

Stops a page timer.

In other words, this action stops the On Timer event from being triggered by the page timer that was started with a Page.StartTimer action using the same timer ID. Other page timers will continue to run until they are stopped.

Parameters

ID

(number) The ID of the page timer to stop.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Paragraph.GetPos

table Paragraph.GetPos (

string ObjectName )

Description

Returns the X and Y page or dialog coordinates of a paragraph object in pixels. This coordinate refers to the upper left hand corner of the object's bounding box relative to the page or dialog.

Note: The upper left hand corner of a page or dialog has X and Y coordinates of 0.

Parameters

ObjectName

(string) The name of the paragraph object.

Returns

(table) A table containing the object's current coordinates, indexed by values X and Y. If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Paragraph.GetProperties

table Paragraph.GetProperties (

string ObjectName )

Description

Returns a table containing the properties of a paragraph object.

Parameters

ObjectName

(string) The name of the paragraph object.

Returns

(table) A table containing the paragraph object's properties, indexed by the following keys:

KEY

TYPE

DESCRIPTION

Text

string

The text displayed in the paragraph object.

ObjectName

string

The name of the paragraph object.

FontName

string

The font name.

FontSize

number

The font size (in points).

FontStrikeout

boolean

True if the font is set to strikeout, false if it is not.

FontUnderline

boolean

True if the font is set to underline, false if it is not.

FontAntiAlias

boolean

True if the font is set to anti alias, false if it is not.

FontItalic

boolean

True if the font is set to italic, false if it is not.

FontWeight

number

The weight of the font (how 'dark' the text will appear):

CONSTANT | VALUE | DESCRIPTION
FW_DONTCARE | 0 | Font weight not specified.
FW_THIN | 100 | Font weight 'thin'.
FW_EXTRALIGHT | 200 | Font weight 'extra-light'.
FW_LIGHT | 300 | Font weight 'light'.
FW_NORMAL | 400 | Font weight 'normal'.
FW_MEDIUM | 500 | Font weight 'medium'.
FW_SEMIBOLD | 600 | Font weight 'semi-bold'.
FW_BOLD | 700 | Font weight 'bold'.
FW_EXTRABOLD | 800 | Font weight 'extra bold'.
FW_HEAVY | 900 | Font weight 'heavy'.

FontScript

number

The character set in use by the paragraph object:

CONSTANT | VALUE | DESCRIPTION
ANSI_CHARSET | 0 | ANSI character set.
BALTIC_CHARSET | 186 | Baltic character set.
CHINESEBIG5_CHARSET | 136 | Chinese character set.
DEFAULT_CHARSET | 1 | Default character set.
EASTEUROPE_CHARSET | 238 | Eastern European character set.
GB2312_CHARSET | 134 | GB2312 character set.
GREEK_CHARSET | 161 | Greek character set.
HANGUL_CHARSET | 129 | Hangul character set.
MAC_CHARSET | 77 | MAC character set.
OEM_CHARSET | 255 | OEM character set.
RUSSIAN_CHARSET | 204 | Russian character set.
SHIFTJIS_CHARSET | 128 | Shiftjis character set.
SYMBOL_CHARSET | 2 | Symbol character set.
TURKISH_CHARSET | 162 | Turkish character set.

BGStyle

number

The style of the paragraph object's background:

CONSTANT | VALUE | DESCRIPTION
BG_SOLID | 0 | Solid background.
BG_TRANSPARENT | 1 | Transparent Background.

BGColor

number

The color of the paragraph object's background, if BGStyle is set to BG_SOLID.

BorderStyle

number

The style of the paragraph object's border:

CONSTANT | VALUE | DESCRIPTION
BORDER_NONE | 0 | No border.
BORDER_SOLID | 1 | Solid border.

BorderColor

number

The color of the paragraph object's border, if BorderStyle is set to BORDER_SOLID.

ScrollStyle

number

The style of scrollbars used by the paragraph object:

CONSTANT | VALUE | DESCRIPTION
SCROLL_STANDARD | 0 | Standard scrollbars.
SCROLL_CUSTOM | 1 | Custom scrollbars.

SkinFile

string

Path to the image file used for custom scrollbars if ScrollStyle is set to SCROLL_CUSTOM.

ScrollHorizontal

number

How the horizontal scroll option will function:

CONSTANT | VALUE | DESCRIPTION
SCROLL_AUTO | 0 | Scrollbars will enable automatically if more text exists than can be displayed.
SCROLL_ON | 1 | Scrollbars are enabled regardless of the amount of text within the object.
SCROLL_OFF | 2 | Scrollbars are not enabled, regardless of the amount of text within the object.

ScrollVertical

number

How the vertical scroll option will function:

CONSTANT | VALUE | DESCRIPTION
SCROLL_AUTO | 0 | Scrollbars will enable automatically if more text exists than can be displayed.
SCROLL_ON | 1 | Scrollbars are enabled regardless of the amount of text within the object.
SCROLL_OFF | 2 | Scrollbars are not enabled, regardless of the amount of text within the object.

Alignment

number

The text alignment:

CONSTANT | VALUE | DESCRIPTION
ALIGN_LEFT | 0 | Text is left aligned.
ALIGN_CENTER | 1 | Text is center aligned.
ALIGN_RIGHT | 2 | Text is right aligned.

ColorNormal

number

The 'normal' color of the paragraph object's text.

ColorHighlight

number

The 'highlight' color of the paragraph object's text.

ColorDisabled

number

The 'disabled' color of the paragraph object's text.

ColorDown

number

The 'down' color of the paragraph object's text.

Enabled

boolean

True if the paragraph object is enabled, false if it is not.

Visible

boolean

True if the paragraph object is visible, false if it is not.

X

number

The horizontal position (in pixels) of the top left corner of the paragraph object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has an X value of 0

Y

number

The vertical position (in pixels) of the top left corner of the paragraph object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has a Y value of 0

Width

number

The width (in pixels) of the paragraph object.

Height

number

The height (in pixels) of the paragraph object.

TooltipText

string

The mouseover tooltip of the paragraph object.

Cursor

number

The mouse cursor that will be displayed when the mouse is over the paragraph object:

CONSTANT | VALUE | DESCRIPTION
CURSOR_ARROW | 0 | Standard mouse arrow cursor.
CURSOR_HAND | 1 | Hand cursor.
CURSOR_BLACK_ARROW | 2 | Black arrow cursor.
CURSOR_CROSSHAIR | 3 | Crosshair cursor.
CURSOR_EXPLORE | 4 | Explore cursor.
CURSOR_HELP | 5 | Help cursor.
CURSOR_MAGNIFY | 6 | Magnify cursor.
CURSOR_MEDIA | 7 | Media cursor.
CURSOR_MONEY | 8 | Money cursor.
CURSOR_NOTEPAD | 9 | Notepad cursor.
CURSOR_PENCIL | 10 | Pencil cursor.
CURSOR_PRINTER | 11 | Printer cursor.
CURSOR_SPEAKER | 12 | Speaker cursor.
CURSOR_UP_ARROW | 13 | Up arrow cursor.

ResizeLeft

boolean

True if the left side of the object will move when the application is resized, false if it is not.

ResizeRight

boolean

True if the right side of the object will move when the application is resized, false if it is not.

ResizeTop

boolean

True if the top of the object will move when the application is resized, false if it is not.

ResizeBottom

boolean

True if the bottom of the object will move when the application is resized, false if it is not.

HighlightSound

number

The type of sound that will be played when the mouse moves over the paragraph object.

CONSTANT | VALUE | DESCRIPTION
SND_NONE | 0 | No highlight sound.
SND_STANDARD | 1 | Standard highlight sound.
SND_CUSTOM | 2 | Custom highlight sound.

HighlightSoundFile

string

The path to the paragraph object's custom highlight sound file. If the paragraph object does not use a custom sound, this value will be an empty string ("").

ClickSound

number

The type of sound that will be played when the mouse clicks the paragraph object.

CONSTANT | VALUE | DESCRIPTION
SND_NONE | 0 | No click sound.
SND_STANDARD | 1 | Standard click sound.
SND_CUSTOM | 2 | Custom click sound.

ClickSoundFile

string

The path to the paragraph object's custom click sound file. If the paragraph object does not use a custom sound, this value will be an empty string ("").

If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Paragraph.GetScrollPos

number Paragraph.GetScrollPos (

string ObjectName,

boolean Vertical = true )

Description

Returns the vertical or horizontal scroll position of a paragraph object.

Parameters

ObjectName

(string) The name of the paragraph object.

Vertical

(boolean) Whether the position will be returned for the vertical scroll bar handle:

VALUE | DESCRIPTION
true | The position will be returned for the vertical scroll bar. (Default)
false | The position will be returned for the horizontal scroll bar.

Returns

(number) The position (line number) of the vertical scroll handle if Vertical is set to true (relative to the top of the vertical scroll handle). If Vertical is set to false, the position in scroll bar units (approximately 10 pixels) of the horizontal scroll handle will be returned (relative to the left side of the horizontal scroll handle). If an error occurs, -1 is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Paragraph.GetScrollRange

table Paragraph.GetScrollRange (

string ObjectName,

boolean Vertical = true )

Description

Returns a table containing the range of the vertical or horizontal scroll bar.

Parameters

ObjectName

(string) The name of the paragraph object.

Vertical

(boolean) Whether the range will be returned for the vertical scroll bar:

VALUE | DESCRIPTION
true | The range will be returned for the vertical scroll bar. (Default)
false | The range will be returned for the horizontal scroll bar.

Returns

(table) A table containing the vertical or horizontal scroll bar range, indexed by values "Min" and "Max." The vertical range will contain the range of lines and the horizontal range will contain the range of horizontal scroll bar units (1 unit is approximately 10 pixels). If an error occurs, nil is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Paragraph.GetSize

table Paragraph.GetSize (

string ObjectName )

Description

Returns the pixel dimensions of a paragraph object.

Parameters

ObjectName

(string) The name of the paragraph object.

Returns

(table) A table containing the object's pixel dimensions, indexed by values "Width" and "Height". If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Paragraph.GetText

string Paragraph.GetText (

string ObjectName )

Description

Gets the text that is currently displayed in a paragraph object.

Parameters

ObjectName

(string) The name of the paragraph object.

Returns

(string) The text that is currently displayed in the paragraph object. If an error occurs, a blank string "" is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Paragraph.IsEnabled

boolean Paragraph.IsEnabled (

string ObjectName )

Description

Returns true if a specific paragraph object is enabled, or false if it's disabled.

Note: When a paragraph object is disabled, it takes on a disabled (or "ghosted") appearance, and doesn't respond to the user at all.

Parameters

ObjectName

(string) The name of the paragraph object.

Returns

(boolean) True if the paragraph object is enabled, false if it is disabled. If an error occurs, false will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Paragraph.IsVisible

boolean Paragraph.IsVisible (

string ObjectName )

Description

Returns true if a specific paragraph object is visible, and false if it isn't.

Parameters

ObjectName

(string) The name of the paragraph object.

Returns

(boolean) True if the paragraph object is visible, false if it's invisible. If an error occurs, false will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Paragraph.SetEnabled

Paragraph.SetEnabled (

string ObjectName,

boolean Enabled = true )

Description

Sets the enabled/disabled state of a paragraph object.

Note: When a paragraph object is disabled, it takes on a disabled (or "ghosted") appearance, and doesn't respond to the user at all.

Parameters

ObjectName

(string) The name of the paragraph object.

Enabled

(boolean) Whether to make the paragraph object enabled or disabled:

VALUE | DESCRIPTION
true | Enabled. (Default)
false | Disabled.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Paragraph.SetPos

Paragraph.SetPos (

string ObjectName,

number X,

number Y )

Description

Sets the X and Y pixel coordinates of a paragraph object relative to the page or dialog.

Parameters

ObjectName

(string) The name of the paragraph object.

X

(number) The new X pixel coordinate (horizontal position) to set for the paragraph object. This is the X coordinate of the upper left hand corner of the object's bounding box relative to the page or dialog.

Y

(number) The new Y pixel coordinate (vertical position) to set for the paragraph object. This is the Y coordinate of the upper left hand corner of the object's bounding box relative to the page or dialog.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Paragraph.SetProperties

Paragraph.SetProperties (

string ObjectName,

table Properties )

Description

Sets the properties of a paragraph object.

Parameters

ObjectName

(string) The name of the paragraph object.

Properties

(table) A table containing the paragraph object's properties indexed by the following keys:

KEY

TYPE

DESCRIPTION

Text

string

The text to display in the paragraph object.

FontName

string

The font name.

FontSize

number

The font size (in points).

FontStrikeout

boolean

True if the font should be set to strikeout, false if it should not be.

FontUnderline

boolean

True if the font should be set to underline, false if it should not be.

FontAntiAlias

boolean

True if the font should be set to anti alias, false if it should not be.

FontItalic

boolean

True if the font should be set to italic, false if it should not be.

FontWeight

number

The weight of the font (how 'dark' the text will appear):

CONSTANT | VALUE | DESCRIPTION
FW_DONTCARE | 0 | Font weight not specified.
FW_THIN | 100 | Font weight 'thin'.
FW_EXTRALIGHT | 200 | Font weight 'extra-light'.
FW_LIGHT | 300 | Font weight 'light'.
FW_NORMAL | 400 | Font weight 'normal'.
FW_MEDIUM | 500 | Font weight 'medium'.
FW_SEMIBOLD | 600 | Font weight 'semi-bold'.
FW_BOLD | 700 | Font weight 'bold'.
FW_EXTRABOLD | 800 | Font weight 'extra bold'.
FW_HEAVY | 900 | Font weight 'heavy'.

FontScript

number

The character set that should be used by the paragraph object:

CONSTANT | VALUE | DESCRIPTION
ANSI_CHARSET | 0 | ANSI character set.
BALTIC_CHARSET | 186 | Baltic character set.
CHINESEBIG5_CHARSET | 136 | Chinese character set.
DEFAULT_CHARSET | 1 | Default character set.
EASTEUROPE_CHARSET | 238 | Eastern European character set.
GB2312_CHARSET | 134 | GB2312 character set.
GREEK_CHARSET | 161 | Greek character set.
HANGUL_CHARSET | 129 | Hangul character set.
MAC_CHARSET | 77 | MAC character set.
OEM_CHARSET | 255 | OEM character set.
RUSSIAN_CHARSET | 204 | Russian character set.
SHIFTJIS_CHARSET | 128 | Shiftjis character set.
SYMBOL_CHARSET | 2 | Symbol character set.
TURKISH_CHARSET | 162 | Turkish character set.

BGStyle

number

The style of the paragraph object's background:

CONSTANT | VALUE | DESCRIPTION
BG_SOLID | 0 | Solid background.
BG_TRANSPARENT | 1 | Transparent Background.

BGColor

number

The color of the paragraph object's background, if BGStyle is set to BG_SOLID.

BorderStyle

number

The style of the paragraph object's border:

CONSTANT | VALUE | DESCRIPTION
BORDER_NONE | 0 | No border.
BORDER_SOLID | 1 | Solid border.

BorderColor

number

The color of the paragraph object's border, if BorderStyle is set to BORDER_SOLID.

ScrollStyle

number

The style of scrollbars used by the paragraph object:

CONSTANT | VALUE | DESCRIPTION
SCROLL_STANDARD | 0 | Standard scrollbars.
SCROLL_CUSTOM | 1 | Custom scrollbars.

SkinFile

string

Path to the image file to be used for custom scrollbars if ScrollStyle is set to SCROLL_CUSTOM.

ScrollHorizontal

number

How the horizontal scroll option will function:

CONSTANT | VALUE | DESCRIPTION
SCROLL_AUTO | 0 | Scrollbars will enable automatically if more text exists than can be displayed.
SCROLL_ON | 1 | Scrollbars are enabled regardless of the amount of text within the object.
SCROLL_OFF | 2 | Scrollbars are not enabled, regardless of the amount of text within the object.

ScrollVertical

number

How the vertical scroll option will function:

CONSTANT | VALUE | DESCRIPTION
SCROLL_AUTO | 0 | Scrollbars will enable automatically if more text exists than can be displayed.
SCROLL_ON | 1 | Scrollbars are enabled regardless of the amount of text within the object.
SCROLL_OFF | 2 | Scrollbars are not enabled, regardless of the amount of text within the object.

Alignment

number

The text alignment:

CONSTANT | VALUE | DESCRIPTION
ALIGN_LEFT | 0 | Text is left aligned.
ALIGN_CENTER | 1 | Text is center aligned.
ALIGN_RIGHT | 2 | Text is right aligned.

ColorNormal

number

The 'normal' color of the paragraph object's text.

ColorHighlight

number

The 'highlight' color of the paragraph object's text.

ColorDisabled

number

The 'disabled' color of the paragraph object's text.

ColorDown

number

The 'down' color of the paragraph object's text.

Enabled

boolean

True to enable the object, false to disable it.

Visible

boolean

True to make the object visible, false to hide it.

X

number

The horizontal position (in pixels) of the top left corner of the paragraph object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has an X value of 0

Y

number

The vertical position (in pixels) of the top left corner of the paragraph object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has a Y value of 0

Width

number

The width (in pixels) of the paragraph object.

Height

number

The height (in pixels) of the paragraph object.

TooltipText

string

The mouseover tooltip of the paragraph object. Tip: If you want a "&" character in the text, you must enter "&&&".

Cursor

number

The mouse cursor that will be displayed when the mouse is over the paragraph object:

CONSTANT | VALUE | DESCRIPTION
CURSOR_ARROW | 0 | Standard mouse arrow cursor.
CURSOR_HAND | 1 | Hand cursor.
CURSOR_BLACK_ARROW | 2 | Black arrow cursor.
CURSOR_CROSSHAIR | 3 | Crosshair cursor.
CURSOR_EXPLORE | 4 | Explore cursor.
CURSOR_HELP | 5 | Help cursor.
CURSOR_MAGNIFY | 6 | Magnify cursor.
CURSOR_MEDIA | 7 | Media cursor.
CURSOR_MONEY | 8 | Money cursor.
CURSOR_NOTEPAD | 9 | Notepad cursor.
CURSOR_PENCIL | 10 | Pencil cursor.
CURSOR_PRINTER | 11 | Printer cursor.
CURSOR_SPEAKER | 12 | Speaker cursor.
CURSOR_UP_ARROW | 13 | Up arrow cursor.

ResizeLeft

boolean

True if the left side of the object should move when the application is resized, false if it should not.

ResizeRight

boolean

True if the right side of the object should move when the application is resized, false if it should not.

ResizeTop

boolean

True if the top of the object should move when the application is resized, false if it should not.

ResizeBottom

boolean

True if the bottom of the object should move when the application is resized, false if it should not.

HighlightSound

number

The type of sound that will be played when the mouse moves over the paragraph object.

CONSTANT | VALUE | DESCRIPTION
SND_NONE | 0 | No highlight sound.
SND_STANDARD | 1 | Standard highlight sound.
SND_CUSTOM | 2 | Custom highlight sound.

HighlightSoundFile

string

The path to the paragraph object's custom highlight sound file. If the paragraph object does not use a custom sound, this value will be an empty string ("").

ClickSound

number

The type of sound that will be played when the mouse clicks the paragraph object.

CONSTANT | VALUE | DESCRIPTION
SND_NONE | 0 | No click sound.
SND_STANDARD | 1 | Standard click sound.
SND_CUSTOM | 2 | Custom click sound.

ClickSoundFile

string

The path to the paragraph object's custom click sound file. If the paragraph object does not use a custom sound, this value will be an empty string ("").

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Paragraph.SetScrollPos

Paragraph.SetScrollPos (

string ObjectName,

number ScrollPos,

boolean Vertical = true )

Description

Sets the vertical or horizontal scroll bar handle position in a paragraph object.

Parameters

ObjectName

(string) The name of the paragraph object.

ScrollPos

(number) The vertical line position or horizontal position in scroll bar units (approximately 10 pixels) to set the scroll bar handle to.

Note: The first position in a scroll bar is 0 and the end position will depend upon the size of the paragraph object. If you attempt to set a position beyond the current scroll bar range, it's position will be set to either the maximum or minimum possible range position.

Vertical

(boolean) Whether the position will be set for the vertical scroll handle:

VALUE | DESCRIPTION
true | The position will be set for the vertical scroll handle. (Default)
false | The position will be set for the horizontal scroll handle.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Paragraph.SetSize

Paragraph.SetSize (

string ObjectName,

number Width,

number Height )

Description

Sets the size of a paragraph object.

Parameters

ObjectName

(string) The name of the paragraph object.

Width

(number) The new width of the paragraph object in pixels.

Height

(number) The new height of the paragraph object in pixels.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Paragraph.SetText

Paragraph.SetText (

string ObjectName,

string Text )

Description

Sets the text to be displayed in a paragraph object.

Parameters

ObjectName

(string) The name of the paragraph object.

Text

(string) The text to display in the paragraph object.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Paragraph.SetVisible

Paragraph.SetVisible (

string ObjectName,

boolean Visible = true )

Description

Sets the visibility of a paragraph object.

Parameters

ObjectName

(string) The name of the paragraph object.

Visible

(boolean) Make the paragraph object visible or invisible:

VALUE | DESCRIPTION
true | Visible. (Default)
false | Invisible.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


PDF.GetFile

string PDF.GetFile (

string ObjectName )

Description

Gets the PDF File (*.pdf) or URL that is currently loaded in a PDF object.

Parameters

ObjectName

(string) The name of the PDF object.

Returns

(string) The full path and filename of the file, or URL that is currently loaded in the PDF object. If an error occurs, a blank string "" will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


PDF.GetPos

table PDF.GetPos (

string ObjectName )

Description

Returns the X and Y page or dialog coordinates of a PDF object in pixels. This coordinate refers to the upper left hand corner of the object's bounding box relative to the page or dialog.

Note: The upper left hand corner of a page or dialog has X and Y coordinates of 0.

Parameters

ObjectName

(string) The name of the PDF object.

Returns

(table) A table containing the object's current coordinates, indexed by values X and Y. If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


PDF.GetProperties

table PDF.GetProperties (

string ObjectName )

Description

Returns a table containing the properties of a PDF object.

Parameters

ObjectName

(string) The name of the PDF object.

Returns

(table) A table containing the PDF object's properties, indexed by the following keys:

KEY

TYPE

DESCRIPTION

ObjectName

string

The name of the PDF object.

File

string

The currently loaded PDF File (*.pdf).

ShowScrollbars

boolean

True if vertical and horizontal scrollbars are shown, false if they are not.

ShowToolbar

boolean

True if the toolbar is shown, false if it is not.

ShowBorder

boolean

True if a border is shown, false if it is not.

Layout

string

The layout mode set for the page:

CONSTANT | VALUE | DESCRIPTION
LAYOUT_USER_PREF | "DontCare" | Current user preference.
LAYOUT_SINGLE_PAGE | "SinglePage" | Showing single page.
LAYOUT_ONE_COLUMN | "OneColumn" | Showing one column in continuous mode.
LAYOUT_TWO_COLUMN_L | "TwoColumnLeft" | Showing two columns in continuous mode with first page on the left.
LAYOUT_TWO_COLUMN_R | "TwoColumnRight" | Showing two columns in continuous mode with first page on right.

Page

string

The page mode set for the object:

CONSTANT | VALUE | DESCRIPTION
PAGE_STANDARD | "none" | Just showing document, no bookmarks or thumbnails.
PAGE_BOOKMARKS | "bookmarks" | Showing document and bookmarks.
PAGE_THUMBS | "thumbs" | Showing document and thumbnails.

View

string

The view of the page currently set within the object:

CONSTANT | VALUE | DESCRIPTION
VIEW_PAGE | "Fit" | Fit entire page, both vertically and horizontally.
VIEW_WIDTH | "FitH" | Fit the width of the page.
VIEW_HEIGHT | "FitV" | Fit the height of the page.
VIEW_BOUNDING | "FitB" | Fit the bounding box (visible text area) both vertically and horizontally.
VIEW_BOUNDING_WIDTH | "FitBH" | Fit the width of the bounding box (visible text area).
VIEW_BOUNDING_HEIGHT | "FitBV" | Fit the height of the bounding box (visible text area).
VIEW_ACTUAL_SIZE | "ActualSize" | Show the document at its actual size (100% magnification).

ViewOffset

number

The horizontal (left), or vertical (top) offset based on the View setting.

Enabled

boolean

True if the PDF object is enabled, false if it is not.

Visible

boolean

True if the PDF object is visible, false if it is not.

X

number

The horizontal position (in pixels) of the top left corner of the PDF object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has an X value of 0

Y

number

The vertical position (in pixels) of the top left corner of the PDF object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has a Y value of 0

Width

number

The width (in pixels) of the PDF object.

Height

number

The height (in pixels) of the PDF object.

ResizeLeft

boolean

True if the left side of the object will move when the application is resized, false if it is not.

ResizeRight

boolean

True if the right side of the object will move when the application is resized, false if it is not.

ResizeTop

boolean

True if the top of the object will move when the application is resized, false if it is not.

ResizeBottom

boolean

True if the bottom of the object will move when the application is resized, false if it is not.

WindowHandle

number

The integer value that represents the object's window. (Commonly referred to as an hWnd.)

If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


PDF.GetSize

table PDF.GetSize (

string ObjectName )

Description

Returns the pixel dimensions of a PDF object.

Parameters

ObjectName

(string) The name of the PDF object.

Returns

(table) A table containing the object's pixel dimensions, indexed by values "Width" and "Height." If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


PDF.GoToPage

PDF.GoToPage (

string ObjectName,

number Page )

Description

Goes to a specific page of a PDF File (*.pdf) currently loaded in a PDF object.

Parameters

ObjectName

(string) The name of the PDF object.

Page

(number) The page number to go to.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


PDF.IsEnabled

boolean PDF.IsEnabled (

string ObjectName )

Description

Returns true if a specific PDF object is enabled, or false if it's disabled.

Note: When an object is disabled, it doesn't respond to user interaction.

Parameters

ObjectName

(string) The name of the PDF object.

Returns

(boolean) True if the object is enabled, false if it is disabled. If an error occurs, false will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


PDF.IsVisible

boolean PDF.IsVisible (

string ObjectName )

Description

Returns true if a specific PDF object is visible, or false if it isn't.

Parameters

ObjectName

(string) The name of the PDF object.

Returns

(boolean) True if the object is visible, false if it's invisible. If an error occurs, false will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


PDF.LoadFile

PDF.LoadFile (

string ObjectName,

string File )

Description

Loads a PDF File (*.pdf) or URL into a PDF object.

Parameters

ObjectName

(string) The name of the PDF object.

File

(string) The path to the local PDF File (*.pdf), or the URL. Click the browse button to select a file.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


PDF.Navigate

PDF.Navigate (

string ObjectName,

number NavigateType )

Description

Navigates to a relative page of a PDF File (*.pdf) currently loaded in an PDF object.

Parameters

ObjectName

(string) The name of the PDF object.

NavigateType

(number) The type of navigation to use. Choose from:

CONSTANT | VALUE | DESCRIPTION
PDF_FIRST | 0 | Go to the first page in the document.
PDF_LAST | 1 | Go to the last page in the document.
PDF_NEXT | 2 | Go to the next page in the document, if it exists.
PDF_PREV | 3 | Go to the previous page in the document, if it exists.
PDF_FORWARD | 4 | Go to the next view in the navigation history, if it exists.
PDF_BACK | 5 | Go to the previous view in the navigation history, if it exists.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


PDF.Print

PDF.Print (

string ObjectName,

number FromPage = 1,

number ToPage = -1,

boolean ShrinkToFit = true )

Description

Prints the specified pages of a PDF File (*.pdf) loaded in a PDF object without displaying a settings dialog.

Parameters

ObjectName

(string) The name of the PDF object.

FromPage

(number) The page number to start printing from. The default is 1.

ToPage

(number) The page number of the last page to be printed. The default is -1, which is the last page in the document.

ShrinkToFit

(boolean) Whether to shrink pages to fit when printed.

VALUE | DESCRIPTION
true | Shrink the page to fit the printed page (if necessary). (Default)
false | Print the page at a 1:1 ratio.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


PDF.PrintWithDialog

PDF.PrintWithDialog (

string ObjectName )

Description

Prints pages of a PDF File (*.pdf) loaded in a PDF object according to the options selected in a settings dialog.

Parameters

ObjectName

(string) The name of the PDF object.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


PDF.SetEnabled

PDF.SetEnabled (

string ObjectName,

boolean Enabled = true )

Description

Sets the enabled/disabled state of a PDF object.

Note: When an object is disabled, it doesn't respond to the user at all.

Parameters

ObjectName

(string) The name of the PDF object.

Enabled

(boolean) Whether to make the object enabled or disabled:

VALUE | DESCRIPTION
true | Enabled. (Default)
false | Disabled.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


PDF.SetNamedDest

PDF.SetNamedDest (

string ObjectName,

string NamedDest )

Description

Goes to a specified named destination in a PDF object's document.

Parameters

ObjectName

(string) The name of the PDF object.

NamedDest

(string) The named destination to go to.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


PDF.SetPos

PDF.SetPos (

string ObjectName,

number X,

number Y )

Description

Sets the X and Y pixel coordinates of a PDF object relative to the page or dialog.

Parameters

ObjectName

(string) The name of the PDF object.

X

(number) The new X pixel coordinate (horizontal position) to set for the object. This is the X coordinate of the upper left hand corner of the object's bounding box relative to the page or dialog.

Y

(number) The new Y pixel coordinate (vertical position) to set for the object. This is the Y coordinate of the upper left hand corner of the object's bounding box relative to the page or dialog.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


PDF.SetProperties

PDF.SetProperties (

string ObjectName,

table Properties )

Description

Sets the properties of a PDF object.

Parameters

ObjectName

(string) The name of the PDF object.

Properties

(table) A table containing the PDF object's properties indexed by the following keys:

KEY

TYPE

DESCRIPTION

File

string

The PDF File (*.pdf) to load.

ShowScrollbars

boolean

True if the object should show vertical and horizontal scrollbars, false if it should not.

ShowToolbar

boolean

True if the object should show a toolbar, false if it should not.

ShowBorder

boolean

True if the object should show a border, false if it should not.

Layout

string

The layout mode to set for the page:

CONSTANT | VALUE | DESCRIPTION
LAYOUT_USER_PREF | "DontCare" | Use the current user preference.
LAYOUT_SINGLE_PAGE | "SinglePage" | Show a single page.
LAYOUT_ONE_COLUMN | "OneColumn" | Show one column in continuous mode.
LAYOUT_TWO_COLUMN_L | "TwoColumnLeft" | Show two columns in continuous mode with first page on the left.
LAYOUT_TWO_COLUMN_R | "TwoColumnRight" | Show two columns in continuous mode with first page on right.

Page

string

The page mode to set for the object:

CONSTANT | VALUE | DESCRIPTION
PAGE_STANDARD | "none" | Show document, no bookmarks or thumbnails.
PAGE_BOOKMARKS | "bookmarks" | Show document and bookmarks.
PAGE_THUMBS | "thumbs" | Show document and thumbnails.

View

string

The view of the page to set within the object:

CONSTANT | VALUE | DESCRIPTION
VIEW_PAGE | "Fit" | Fit entire page, both vertically and horizontally.
VIEW_WIDTH | "FitH" | Fit the width of the page.
VIEW_HEIGHT | "FitV" | Fit the height of the page.
VIEW_BOUNDING | "FitB" | Fit the bounding box (visible text area) both vertically and horizontally.
VIEW_BOUNDING_WIDTH | "FitBH" | Fit the width of the bounding box (visible text area).
VIEW_BOUNDING_HEIGHT | "FitBV" | Fit the height of the bounding box (visible text area).
VIEW_ACTUAL_SIZE | "ActualSize" | Show the document at its actual size (100% magnification).

ViewOffset

number

The horizontal (left), or vertical (top) offset to set based on the View setting.

Enabled

boolean

True if the PDF object should be enabled, false if it should not be.

Visible

boolean

True if the PDF object should be visible, false if it should not be.

X

number

The horizontal position (in pixels) of the top left corner of the PDF object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has an X value of 0

Y

number

The vertical position (in pixels) of the top left corner of the PDF object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has a Y value of 0

Width

number

The width (in pixels) of the PDF object.

Height

number

The height (in pixels) of the PDF object.

ResizeLeft

boolean

True if the left side of the object should move when the application is resized, false if it should not.

ResizeRight

boolean

True if the right side of the object should move when the application is resized, false if it should not.

ResizeTop

boolean

True if the top of the object should move when the application is resized, false if it should not.

ResizeBottom

boolean

True if the bottom of the object should move when the application is resized, false if it should not.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


PDF.SetSize

PDF.SetSize (

string ObjectName,

number Width,

number Height )

Description

Sets the size of a PDF object.

Parameters

ObjectName

(string) The name of the PDF object.

Width

(number) The new width of the object in pixels.

Height

(number) The new height of the object in pixels.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


PDF.SetVisible

PDF.SetVisible (

string ObjectName,

boolean Visible = true )

Description

Sets the visibility of a PDF object.

Parameters

ObjectName

(string) The name of the PDF object.

Visible

(boolean) Whether to make the object visible or invisible:

VALUE | DESCRIPTION
true | Visible. (Default)
false | Invisible.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


PDF.SetZoomScroll

PDF.SetZoomScroll (

string ObjectName,

number Percent,

number Left,

number Top )

Description

Sets the magnification of a PDF object and scrolls the page vertically and horizontally.

Parameters

ObjectName

(string) The name of the PDF object.

Percent

(number) The percent of magnification to use.

Left

(number) The horizontal position within the object to scroll to.

Top

(boolean) The vertical position within the object to scroll to.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Plugin.GetPos

table Plugin.GetPos (

string ObjectName )

Description

Returns the X and Y page or dialog coordinates of a plugin object in pixels. This coordinate refers to the upper left hand corner of the object's bounding box relative to the page or dialog.

Note: The upper left hand corner of a page or dialog has X and Y coordinates of 0.

Parameters

ObjectName

(string) The name of the plugin object.

Returns

(table) A table containing the object's current coordinates, indexed by values X and Y. If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Plugin.GetSize

table Plugin.GetSize (

string ObjectName )

Description

Returns the pixel dimensions of a plugin object.

Parameters

ObjectName

(string) The name of the plugin object.

Returns

(table) A table containing the object's pixel dimensions, indexed by values "Width" and "Height". If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Plugin.IsEnabled

boolean Plugin.IsEnabled (

string ObjectName )

Description

Returns true if a specific plugin object is enabled, or false if it's disabled.

Note: When a plugin object is disabled, it doesn't respond to the user at all.

Parameters

ObjectName

(string) The name of the plugin object.

Returns

(boolean) True if the plugin object is enabled, false if it is disabled. If an error occurs, false will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Plugin.IsVisible

boolean Plugin.IsVisible (

string ObjectName )

Description

Returns true if a specific plugin object is visible, and false if it isn't.

Parameters

ObjectName

(string) The name of the plugin object.

Returns

(boolean) True if the plugin object is visible, false if it's invisible. If an error occurs, false will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Plugin.SetEnabled

Plugin.SetEnabled (

string ObjectName,

boolean Enabled = true )

Description

Sets the enabled/disabled state of a plugin object.

Note: When a plugin object is disabled, it doesn't respond to user interaction.

Parameters

ObjectName

(string) The name of the plugin object.

Enabled

(boolean) Whether to make the plugin object enabled or disabled:

VALUE | DESCRIPTION
true | Enabled. (Default)
false | Disabled.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Plugin.SetPos

Plugin.SetPos (

string ObjectName,

number X,

number Y )

Description

Sets the X and Y pixel coordinates of a plugin object relative to the page or dialog.

Parameters

ObjectName

(string) The name of the plugin object.

X

(number) The new X pixel coordinate (horizontal position) to set for the plugin object. This is the X coordinate of the upper left hand corner of the object's bounding box relative to the page or dialog.

Y

(number) The new Y pixel coordinate (vertical position) to set for the plugin object. This is the Y coordinate of the upper left hand corner of the object's bounding box relative to the page or dialog.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Plugin.SetSize

Plugin.SetSize (

string ObjectName,

number Width,

number Height )

Description

Sets the size of a plugin object.

Parameters

ObjectName

(string) The name of the plugin object.

Width

(number) The new width of the plugin object in pixels.

Height

(number) The new height of the plugin object in pixels.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Plugin.SetVisible

Plugin.SetVisible (

string ObjectName,

boolean Visible = true )

Description

Sets the visibility of a plugin object.

Parameters

ObjectName

(string) The name of the plugin object.

Visible

(boolean) Whether to make the plugin object visible or invisible:

VALUE | DESCRIPTION
true | Visible. (Default)
false | Invisible.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Progress.GetCurrentPos

number Progress.GetCurrentPos (

string ObjectName )

Description

Returns the current position of the progress meter within the progress bar.

Parameters

ObjectName

(string) The name of the progress object.

Returns

(number) The current position of the progress meter within the progress bar. If an error occurs -1 is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Progress.GetPos

table Progress.GetPos (

string ObjectName )

Description

Returns the X and Y page or dialog coordinates of a progress object in pixels. This coordinate refers to the upper left hand corner of the object's bounding box relative to the page or dialog.

Note: The upper left hand corner of a page or dialog has X and Y coordinates of 0.

Parameters

ObjectName

(string) The name of the progress object.

Returns

(table) A table containing the object's current coordinates, indexed by values X and Y. If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Progress.GetProperties

table Progress.GetProperties (

string ObjectName )

Description

Returns a table containing the properties of a progress object.

Parameters

ObjectName

(string) The name of the progress object.

Returns

(table) A table containing the progress object's properties, indexed by the following keys:

KEY

TYPE

DESCRIPTION

ObjectName

string

The name of the progress object.

Text

string

The text displayed in the progress object.

FontName

string

The font name.

FontSize

number

The font size (in points).

FontStrikeout

boolean

True if the font is set to strikeout, false if it is not.

FontUnderline

boolean

True if the font is set to underline, false if it is not.

FontAntiAlias

boolean

True if the font is set to anti alias, false if it is not.

FontItalic

boolean

True if the font is set to italic, false if it is not.

FontWeight

number

The weight of the font (how 'dark' the text will appear):

CONSTANT | VALUE | DESCRIPTION
FW_DONTCARE | 0 | Font weight not specified.
FW_THIN | 100 | Font weight 'thin'.
FW_EXTRALIGHT | 200 | Font weight 'extra-light'.
FW_LIGHT | 300 | Font weight 'light'.
FW_NORMAL | 400 | Font weight 'normal'.
FW_MEDIUM | 500 | Font weight 'medium'.
FW_SEMIBOLD | 600 | Font weight 'semi-bold'.
FW_BOLD | 700 | Font weight 'bold'.
FW_EXTRABOLD | 800 | Font weight 'extra bold'.
FW_HEAVY | 900 | Font weight 'heavy'.

FontScript

number

The character set in use by the progress object:

CONSTANT | VALUE | DESCRIPTION
ANSI_CHARSET | 0 | ANSI character set.
BALTIC_CHARSET | 186 | Baltic character set.
CHINESEBIG5_CHARSET | 136 | Chinese character set.
DEFAULT_CHARSET | 1 | Default character set.
EASTEUROPE_CHARSET | 238 | Eastern European character set.
GB2312_CHARSET | 134 | GB2312 character set.
GREEK_CHARSET | 161 | Greek character set.
HANGUL_CHARSET | 129 | Hangul character set.
MAC_CHARSET | 77 | MAC character set.
OEM_CHARSET | 255 | OEM character set.
RUSSIAN_CHARSET | 204 | Russian character set.
SHIFTJIS_CHARSET | 128 | Shiftjis character set.
SYMBOL_CHARSET | 2 | Symbol character set.
TURKISH_CHARSET | 162 | Turkish character set.

Style

number

The style of the progress bar:

CONSTANT | VALUE | DESCRIPTION
STYLE_BARS | 0 | The progress bar is divided into 'blocks'.
STYLE_SMOOTH | 1 | The progress bar is 'smooth'.

Orientation

number

The orientation of the progress bar:

CONSTANT | VALUE | DESCRIPTION
ORIENT_HORIZONTAL | 0 | Horizontal progress bar.
ORIENT_VERTICAL | 1 | Vertical progress bar.

MinRange

number

The beginning position of the progress bar.

MaxRange

number

The ending position of the progress bar.

Step

number

The step size that will be used whenever Progress.StepIt is called.

UseCustomColors

boolean

True if the object is set to use custom colors, or false if it is set to use the default Windows style.

BarColor

number

The color of the progress portion of the progress bar.

BackgroundColor

number

The color of the background of the progress bar.

TextColor

number

The color of the text in the progress bar.

XPStyle

boolean

True if the bar is 'XP' styled, false if it is not.

Enabled

boolean

True if the progress object is enabled, false if it is not.

Visible

boolean

True if the progress object is visible, false if it is not.

X

number

The horizontal position (in pixels) of the top left corner of the progress object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has an X value of 0

Y

number

The vertical position (in pixels) of the top left corner of the progress object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has a Y value of 0

Width

number

The width (in pixels) of the progress object.

Height

number

The height (in pixels) of the progress object.

TooltipText

string

The mouseover tooltip of the progress object.

ResizeLeft

boolean

True if the left side of the object will move when the application is resized, false if it is not.

ResizeRight

boolean

True if the right side of the object will move when the application is resized, false if it is not.

ResizeTop

boolean

True if the top of the object will move when the application is resized, false if it is not.

ResizeBottom

boolean

True if the bottom of the object will move when the application is resized, false if it is not.

WindowHandle

number

The integer value that represents the object's window. (Commonly referred to as an hWnd.)

If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Progress.GetRange

table Progress.GetRange (

string ObjectName )

Description

Returns a table containing the range of the progress bar.

Parameters

ObjectName

(string) The name of the progress object.

Returns

(table) A table containing the range of the progress bar, indexed by values "Begin" and "End". These values can be accessed using the form mytable.Begin and mytable.End. If an error occurs, nil is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Progress.GetSize

table Progress.GetSize (

string ObjectName )

Description

Returns the pixel dimensions of a progress object.

Parameters

ObjectName

(string) The name of the progress object.

Returns

(table) A table containing the object's pixel dimensions, indexed by values "Width" and "Height". If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Progress.GetText

string Progress.GetText (

string ObjectName )

Description

Returns the text currently displayed on the progress object.

Parameters

ObjectName

(string) The name of the progress object.

Returns

(string) The text currently displayed on the progress object. If no text is displayed or an error occurs, an empty string ("") is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Progress.IsEnabled

boolean Progress.IsEnabled (

string ObjectName )

Description

Returns true if a specific progress object is enabled, or false if it's disabled.

Note: When a progress object is disabled, it doesn't respond to the user at all.

Parameters

ObjectName

(string) The name of the progress object.

Returns

(boolean) True if the progress object is enabled, false if it is disabled. If an error occurs, false will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Progress.IsVisible

boolean Progress.IsVisible (

string ObjectName )

Description

Returns true if a specific progress object is visible, and false if it isn't.

Parameters

ObjectName

(string) The name of the progress object.

Returns

(boolean) True if the progress object is visible, false if it's invisible. If an error occurs, false will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Progress.SetCurrentPos

Progress.SetCurrentPos (

string ObjectName,

number Pos )

Description

Sets the position of the progress meter within the progress bar.

Parameters

ObjectName

(string) The name of the progress object.

Pos

(number) The position you want to set.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Progress.SetEnabled

Progress.SetEnabled (

string ObjectName,

boolean Enabled = true )

Description

Sets the enabled/disabled state of a progress object.

Parameters

ObjectName

(string) The name of the progress object.

Enabled

(boolean) Whether to make the progress object enabled or disabled:

VALUE | DESCRIPTION
true | Enabled. (Default)
false | Disabled.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Progress.SetPos

Progress.SetPos (

string ObjectName,

number X,

number Y )

Description

Sets the X and Y pixel coordinates of a progress object relative to the page or dialog.

Parameters

ObjectName

(string) The name of the progress object.

X

(number) The new X pixel coordinate (horizontal position) to set for the progress object. This is the X coordinate of the upper left hand corner of the object's bounding box relative to the page or dialog.

Y

(number) The new Y pixel coordinate (vertical position) to set for the progress object. This is the Y coordinate of the upper left hand corner of the object's bounding box relative to the page or dialog.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Progress.SetProperties

Progress.SetProperties (

string ObjectName,

table Properties )

Description

Sets the properties of a progress object.

Parameters

ObjectName

(string) The name of the progress object.

Properties

(table) A table containing the progress object's properties indexed by the following keys:

KEY

TYPE

DESCRIPTION

Text

string

The text to display in the progress object.

Note: Text can only be shown if Use custom colors is enabled.

FontName

string

The font name.

FontSize

number

The font size (in points).

FontStrikeout

boolean

True if the font should be set to strikeout, false if it should not be.

FontUnderline

boolean

True if the font should be set to underline, false if it should not be.

FontAntiAlias

boolean

True if the font should be set to anti alias, false if it should not be.

FontItalic

boolean

True if the font should be set to italic, false if it should not be.

FontWeight

number

The weight of the font (how 'dark' the text will appear):

CONSTANT | VALUE | DESCRIPTION
FW_DONTCARE | 0 | Font weight not specified.
FW_THIN | 100 | Font weight 'thin'.
FW_EXTRALIGHT | 200 | Font weight 'extra-light'.
FW_LIGHT | 300 | Font weight 'light'.
FW_NORMAL | 400 | Font weight 'normal'.
FW_MEDIUM | 500 | Font weight 'medium'.
FW_SEMIBOLD | 600 | Font weight 'semi-bold'.
FW_BOLD | 700 | Font weight 'bold'.
FW_EXTRABOLD | 800 | Font weight 'extra bold'.
FW_HEAVY | 900 | Font weight 'heavy'.

FontScript

number

The character set in use by the progress object:

CONSTANT | VALUE | DESCRIPTION
ANSI_CHARSET | 0 | ANSI character set.
BALTIC_CHARSET | 186 | Baltic character set.
CHINESEBIG5_CHARSET | 136 | Chinese character set.
DEFAULT_CHARSET | 1 | Default character set.
EASTEUROPE_CHARSET | 238 | Eastern European character set.
GB2312_CHARSET | 134 | GB2312 character set.
GREEK_CHARSET | 161 | Greek character set.
HANGUL_CHARSET | 129 | Hangul character set.
MAC_CHARSET | 77 | MAC character set.
OEM_CHARSET | 255 | OEM character set.
RUSSIAN_CHARSET | 204 | Russian character set.
SHIFTJIS_CHARSET | 128 | Shiftjis character set.
SYMBOL_CHARSET | 2 | Symbol character set.
TURKISH_CHARSET | 162 | Turkish character set.

Style

number

The style of the progress bar:

CONSTANT | VALUE | DESCRIPTION
STYLE_BARS | 0 | The progress bar is divided into 'blocks'.
STYLE_SMOOTH | 1 | The progress bar is 'smooth'.

Orientation

number

The orientation of the progress bar:

CONSTANT | VALUE | DESCRIPTION
ORIENT_HORIZONTAL | 0 | Horizontal progress bar.
ORIENT_VERTICAL | 1 | Vertical progress bar.

MinRange

number

The beginning position of the progress bar.

MaxRange

number

The ending position of the progress bar.

Step

number

The step size that should be used whenever Progress.StepIt is called.

UseCustomColors

boolean

True if the progress object should use custom colors, or false if it should use the default Windows style.

BarColor

number

The color of the progress portion of the progress bar.

BackgroundColor

number

The color of the background of the progress bar.

TextColor

number

The color of the text in the progress bar.

XPStyle

boolean

True if the bar should be 'XP' styled, false if it should not be.

Enabled

boolean

True if the progress object should be enabled, false if it should not be.

Visible

boolean

True if the progress object should be visible, false if it should not be.

X

number

The horizontal position (in pixels) of the top left corner of the progress object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has an X value of 0

Y

number

The vertical position (in pixels) of the top left corner of the progress object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has a Y value of 0

Width

number

The width (in pixels) of the progress object.

Height

number

The height (in pixels) of the progress object.

ResizeLeft

boolean

True if the left side of the object should move when the application is resized, false if it should not.

ResizeRight

boolean

True if the right side of the object should move when the application is resized, false if it should not.

ResizeTop

boolean

True if the top of the object should move when the application is resized, false if it should not.

ResizeBottom

boolean

True if the bottom of the object should move when the application is resized, false if it should not.

TooltipText

string

The mouseover tooltip of the progress object. Tip: If you want a "&" character in the text, you must enter "&&&".

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Progress.SetRange

Progress.SetRange (

string ObjectName,

number Begin,

number End )

Description

Sets the range of the progress bar.

Parameters

ObjectName

(string) The name of the progress object.

Begin

(number) The beginning of the range.

End

(number) The ending of the range.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Progress.SetSize

Progress.SetSize (

string ObjectName,

number Width,

number Height )

Description

Sets the size of a progress object.

Parameters

ObjectName

(string) The name of the progress object.

Width

(number) The new width of the progress object in pixels.

Height

(number) The new height of the progress object in pixels.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Progress.SetStep

Progress.SetStep (

string ObjectName,

number Step )

Description

Sets the step value that will be used whenever Progress.StepIt() is called.

Parameters

ObjectName

(string) The name of the progress object.

Step

(number) The step value to use.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Progress.SetText

Progress.SetText (

string ObjectName,

string Text )

Description

Sets the text currently displayed on the progress object.

Note: Text can only be shown if Use custom colors is enabled.

Parameters

ObjectName

(string) The name of the progress object.

Text

(string) The text you want to display on the progress object.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Progress.SetVisible

Progress.SetVisible (

string ObjectName,

boolean Visible = true )

Description

Sets the visibility of a progress object.

Parameters

ObjectName

(string) The name of the progress object.

Visible

(boolean) Whether to make the progress object visible or invisible:

VALUE | DESCRIPTION
true | Visible. (Default)
false | Invisible.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Progress.StepIt

Progress.StepIt (

string ObjectName )

Description

Increments the current progress by the step amount specified in the Progress.SetStep() action.

Parameters

ObjectName

(string) The name of the progress object.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


QuickTime.GetCurrentPos

number QuickTime.GetCurrentPos (

string ObjectName )

Description

Retrieves the current time position of the media in a QuickTime object, in seconds.

Parameters

ObjectName

(string) The QuickTime object to get the current time of.

Returns

(number) The current position of the media in seconds. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


QuickTime.GetFile

string QuickTime.GetFile (

string ObjectName )

Description

Returns the path to the media file that is currently loaded in a QuickTime object.

Parameters

ObjectName

(string) The name of the QuickTime object.

Returns

(string) The path to the media file currently loaded into the QuickTime object. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


QuickTime.GetFullScreen

boolean QuickTime.GetFullScreen (

string ObjectName )

Description

Returns true if a specific QuickTime object is currently in full screen mode, or false if it isn't.

Parameters

ObjectName

(string) The name of the QuickTime object.

Returns

(boolean) True if the QuickTime object is in full screen mode, false if it isn't. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


QuickTime.GetLength

number QuickTime.GetLength (

string ObjectName )

Description

Retrieves the length (in seconds) of the currently loaded media file.

Parameters

ObjectName

(string) The name of the QuickTime object.

Returns

(number) The length of the media file in seconds. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


QuickTime.GetMute

boolean QuickTime.GetMute (

string ObjectName )

Description

Returns true if a specific QuickTime object is muted, and false if it isn't.

Parameters

ObjectName

(string) The name of the QuickTime object.

Returns

(boolean) True if the QuickTime object is muted, false if it isn't. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


QuickTime.GetPos

table QuickTime.GetPos (

string ObjectName )

Description

Returns the X and Y page or dialog coordinates of a QuickTime object in pixels. This coordinate refers to the upper left hand corner of the object's bounding box relative to the page or dialog.

Note: The upper left hand corner of a page or dialog has X and Y coordinates of 0.

Parameters

ObjectName

(string) The name of the QuickTime object.

Returns

(table) A table containing the object's current coordinates, indexed by values X and Y. If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


QuickTime.GetProperties

table QuickTime.GetProperties (

string ObjectName )

Description

Returns a table containing the properties of a QuickTime object.

Parameters

ObjectName

(string) The name of the QuickTime object.

Returns

(table) A table containing the object's properties, indexed by the following keys:

KEY

TYPE

DESCRIPTION

ObjectName

string

The name of the QuickTime object.

MovieFile

string

The currently loaded media file.

SizingMode

number

How the media is displayed within the QuickTime control:

CONSTANT | VALUE | DESCRIPTION
qtMovieFitsControl | 1 | The media is resized to fill the area defined by the object's bounding box. This setting ignores the media's original aspect ratio.
qtMovieFitsControlMaintainAspectRatio | 2 | The media is fit the within the object's bounding box while maintaining the original aspect ratio for the file.
qtMovieCenteredInControl | 3 | The media is centered at full size within the object's bounding box.

BorderStyle

number

The type of border shown around the object:

CONSTANT | VALUE | DESCRIPTION
bsNone | 0 | No border is displayed.
bsPlain | 1 | A solid blank line is shown.
bs3D | 2 | The standard 3D/sunken border is shown. On 64-bit versions of Windows this style may not display properly.

AutoStart

boolean

True if the QuickTime object will automatically play the loaded media as soon as the page or dialog is shown, false if it will not.

Loop

boolean

True if the media will restart when it ends, false if it will not.

ShowControls

boolean

True if the control panel will be shown, false if it will not be.

UseBackgroundColor

boolean

True if the color specified in BackgroundColor will be used as the background of the media, false if it will not.

BackgroundColor

number

The color being used to replace the media background with if UseBackgroundColor is set to true.

Enabled

boolean

True if the QuickTime object is enabled, false if it is not.

Visible

boolean

True if the QuickTime object is visible, false if it is not.

X

number

The horizontal position (in pixels) of the top left corner of the QuickTime object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has an X value of 0

Y

number

The vertical position (in pixels) of the top left corner of the QuickTime object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has a Y value of 0

Width

number

The width (in pixels) of the QuickTime object.

Height

number

The height (in pixels) of the QuickTime object.

ResizeLeft

boolean

True if the left side of the object will move when the application is resized, false if it is not.

ResizeRight

boolean

True if the right side of the object will move when the application is resized, false if it is not.

ResizeTop

boolean

True if the top of the object will move when the application is resized, false if it is not.

ResizeBottom

boolean

True if the bottom of the object will move when the application is resized, false if it is not.

HighlightSound

number

The type of sound that will be played when the mouse moves over the QuickTime object.

CONSTANT | VALUE | DESCRIPTION
SND_NONE | 0 | No highlight sound.
SND_STANDARD | 1 | Standard highlight sound.
SND_CUSTOM | 2 | Custom highlight sound.

HighlightSoundFile

string

The path to the QuickTime object's custom highlight sound file. If the object does not use a custom sound, this value will be an empty string ("").

ClickSound

number

The type of sound that will be played when the mouse clicks the QuickTime object.

CONSTANT | VALUE | DESCRIPTION
SND_NONE | 0 | No click sound.
SND_STANDARD | 1 | Standard click sound.
SND_CUSTOM | 2 | Custom click sound.

ClickSoundFile

string

The path to the QuickTime object's custom click sound file. If the object does not use a custom sound, this value will be an empty string ("").

WindowHandle

number

The integer value that represents the object's window. (Commonly referred to as an hWnd.)

If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


QuickTime.GetSize

table QuickTime.GetSize (

string ObjectName )

Description

Returns the pixel dimensions of a QuickTime object.

Parameters

ObjectName

(string) The name of the QuickTime object.

Returns

(table) A table containing the object's pixel dimensions, indexed by values "Width" and "Height". If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


QuickTime.GetVolume

number QuickTime.GetVolume (

string ObjectName )

Description

Returns the volume level of a QuickTime object.

Parameters

ObjectName

(string) The name of the QuickTime object.

Returns

(number) The current volume level, represented by a number between 0 and 1. The value 0 is silent and 1 is the loudest.. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


QuickTime.IsEnabled

boolean QuickTime.IsEnabled (

string ObjectName )

Description

Returns true if a specific QuickTime object is enabled, or false if it's disabled.

Note: When a QuickTime object is disabled, it doesn't respond to the user at all.

Parameters

ObjectName

(string) The name of the QuickTime object.

Returns

(boolean) True if the QuickTime object is enabled, false if it is disabled. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


QuickTime.IsVisible

boolean QuickTime.IsVisible (

string ObjectName )

Description

Returns true if a specific QuickTime object is visible, and false if it isn't.

Parameters

ObjectName

(string) The name of the QuickTime object.

Returns

(boolean) True if the QuickTime object is visible, false if it's invisible. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


QuickTime.LoadFile

QuickTime.LoadFile (

string ObjectName,

string Filename,

boolean PlayAutomatic = false,

boolean Loop = false )

Description

Loads a media file into a QuickTime object.

Parameters

ObjectName

(string) The name of the QuickTime object.

Filename

(string) The path to the media file. Click the browse button to select a file.

PlayAutomatic

(boolean) Whether to automatically start playing the media after it loads:

VALUE | DESCRIPTION
true | Automatically start playing the file.
false | Don't play the file until told to do so. (Default)

Loop

(boolean) Whether to make the media loop when it reaches the end:

VALUE | DESCRIPTION
true | Loop.
false | Don't loop. (Default)

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


QuickTime.Pause

boolean QuickTime.Pause (

string ObjectName )

Description

Pauses the media's playback in a QuickTime object.

Parameters

ObjectName

(string) The name of the QuickTime object.

Returns

(boolean) True if the media paused successfully, false if it didn't. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


QuickTime.Play

boolean QuickTime.Play (

string ObjectName,

number Rate = 1.0 )

Description

Starts playing the media currently loaded in a QuickTime object.

Parameters

ObjectName

(string) The name of the QuickTime object.

Rate

(number) The rate at which the QuickTime object will play.

Returns

(boolean) True if the QuickTime object started to play successfully, false if it didn't. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


QuickTime.Seek

boolean QuickTime.Seek (

string ObjectName,

number SeekType = 0,

number SeekTime = 0 )

Description

Seeks to a position in a media file that is loaded in a QuickTime object.

Parameters

ObjectName

(string) The name of the QuickTime object.

SeekType

(number) The seek type to use:

CONSTANT | VALUE | DESCRIPTION
SEEK_BEGINNING | 0 | Beginning.
SEEK_END | 1 | End.
SEEK_FORWARD | 2 | Forward.
SEEK_BACKWARD | 3 | Backward.
SEEK_SPECIFIC | 4 | Specific time.

SeekTime

(number) The time to seek to (or seek by). Defaults to 0.

Note: Only used if SeekType is 2, 3, or 4.

Returns

(boolean) True if the media seek was successful, false if it wasn't. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


QuickTime.SetEnabled

QuickTime.SetEnabled (

string ObjectName,

boolean Enabled = true )

Description

Sets the enabled/disabled state of a QuickTime object.

Note: When a QuickTime object is disabled, it doesn't respond to user interaction.

Parameters

ObjectName

(string) The name of the QuickTime object.

Enabled

(boolean) Whether to make the QuickTime object enabled or disabled:

VALUE | DESCRIPTION
true | Enabled. (Default)
false | Disabled.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


QuickTime.SetFullScreen

boolean QuickTime.SetFullScreen (

string ObjectName,

boolean FullScreen,

boolean HideCursor = false,

number Sizing = 2,

number Monitor = 0 )

Description

Controls whether a QuickTime object will play in full screen mode or at its normal size.

Parameters

ObjectName

(string) The name of the QuickTime object.

FullScreen

(boolean) Whether to make the QuickTime object play in full screen mode:

VALUE | DESCRIPTION
true | Full screen playback.
false | Normal playback.

HideCursor

(boolean) Whether or not to hide the cursor:

VALUE | DESCRIPTION
true | Hide the cursor.
false | Don't hide the cursor. (Default)

Sizing

(number) How the media will be sized in full screen mode:

CONSTANT | VALUE | DESCRIPTION
qtFullScreenMovieFitsMonitor | 1 | The media will be sized to fit the monitor. This setting ignores the media's aspect ratio.
qtFullScreenMovieFitsMonitorMaintainAspectRatio | 2 | Fit the media within the monitor while maintaining the original aspect ratio for the file.
qtFullScreenMovieCenteredInMonitor | 3 | Center the media within the monitor. The media will not be resized in any way.

Monitor

(number) The index (zero-based) of the monitor where the media will be played in full screen mode.

Returns

(boolean) True if full screen mode was successful, false if it wasn't. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


QuickTime.SetMute

QuickTime.SetMute (

string ObjectName,

boolean Mute = true )

Description

Sets the mute state of a QuickTime object.

Parameters

ObjectName

(string) The name of the QuickTime object.

Mute

(boolean) Whether to mute or unmute the QuickTime object:

VALUE | DESCRIPTION
true | Mute. (Default)
false | Unmute.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


QuickTime.SetPos

QuickTime.SetPos (

string ObjectName,

number X,

number Y )

Description

Sets the X and Y pixel coordinates of a QuickTime object relative to the page or dialog.

Parameters

ObjectName

(string) The name of the QuickTime object.

X

(number) The new X pixel coordinate (horizontal position) to set for the QuickTime object. This is the X coordinate of the upper left hand corner of the object's bounding box relative to the page or dialog.

Y

(number) The new Y pixel coordinate (vertical position) to set for the QuickTime object. This is the Y coordinate of the upper left hand corner of the object's bounding box relative to the page or dialog.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


QuickTime.SetProperties

QuickTime.SetProperties (

string ObjectName,

table Properties )

Description

Sets the properties of a QuickTime object.

Parameters

ObjectName

(string) The name of the QuickTime object.

Properties

(table) A table containing the QuickTime object's properties indexed by the following keys:

KEY

TYPE

DESCRIPTION

MovieFile

string

The media file to load into the QuickTime object.

SizingMode

number

How to display the media within the QuickTime control:

CONSTANT | VALUE | DESCRIPTION
qtMovieFitsControl | 1 | Resize the media to fill the area defined by the object's bounding box. This setting ignores the media's original aspect ratio.
qtMovieFitsControlMaintainAspectRatio | 2 | Fit the media within the object's bounding box while maintaining the original aspect ratio for the file.
qtMovieCenteredInControl | 3 | Center the media at full size within the object's bounding box.

BorderStyle

number

The type of border to show around the object:

CONSTANT | VALUE | DESCRIPTION
bsNone | 0 | Don't show a border.
bsPlain | 1 | Show a solid blank line around the object.
bs3D | 2 | Show the standard 3D/sunken border. On 64-bit versions of Windows this style may not display properly.

AutoStart

boolean

True if the QuickTime object should automatically play the loaded media as soon as the page or dialog is shown, false if it should not.

Loop

boolean

True if the media should restart when it ends, false if it should not.

ShowControls

boolean

True if the control panel should be shown, false if it should not.

UseBackgroundColor

boolean

True if the color specified in BackgroundColor should be used as the background of the media, false if it should not.

BackgroundColor

number

The color to replace the media background with if UseBackgroundColor is set to true.

Enabled

boolean

True if the QuickTime object should be enabled, false if it should not be.

Visible

boolean

True if the QuickTime object should be visible, false if it should not be.

X

number

The horizontal position (in pixels) of the top left corner of the QuickTime object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has an X value of 0

Y

number

The vertical position (in pixels) of the top left corner of the QuickTime object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has a Y value of 0

Width

number

The width (in pixels) of the QuickTime object.

Height

number

The height (in pixels) of the QuickTime object.

ResizeLeft

boolean

True if the left side of the object should move when the application is resized, false if it should not.

ResizeRight

boolean

True if the right side of the object should move when the application is resized, false if it should not.

ResizeTop

boolean

True if the top of the object should move when the application is resized, false if it should not.

ResizeBottom

boolean

True if the bottom of the object should move when the application is resized, false if it should not.

HighlightSound

number

The type of sound that should be played when the mouse moves over the QuickTime object.

CONSTANT | VALUE | DESCRIPTION
SND_NONE | 0 | No highlight sound.
SND_STANDARD | 1 | Standard highlight sound.
SND_CUSTOM | 2 | Custom highlight sound.

HighlightSoundFile

string

The path to the QuickTime object's custom highlight sound file if it uses one.

ClickSound

number

The type of sound that should be played when the mouse clicks the QuickTime object.

CONSTANT | VALUE | DESCRIPTION
SND_NONE | 0 | No click sound.
SND_STANDARD | 1 | Standard click sound.
SND_CUSTOM | 2 | Custom click sound.

ClickSoundFile

string

The path to the QuickTime object's custom click sound file if it should use one.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


QuickTime.SetSize

QuickTime.SetSize (

string ObjectName,

number Width,

number Height )

Description

Sets the size of a QuickTime object.

Parameters

ObjectName

(string) The name of the QuickTime object.

Width

(number) The new width of the QuickTime object in pixels.

Height

(number) The new height of the QuickTime object in pixels.

Returns

Nothing.


QuickTime.SetVisible

QuickTime.SetVisible (

string ObjectName,

boolean Visible = true )

Description

Sets the visibility of a QuickTime object.

Note: This action simply controls the visibility of the object and does not affect its play state. For example, if you hide an object while it is playing, it will continue to play even though it's not visible.

Parameters

ObjectName

(string) The name of the QuickTime object.

Visible

(boolean) Whether to make the QuickTime object visible or invisible:

VALUE | DESCRIPTION
true | Visible. (Default)
false | Invisible.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


QuickTime.SetVolume

QuickTime.SetVolume (

string ObjectName,

number Volume )

Description

Sets the volume level of a QuickTime object.

Parameters

ObjectName

(string) The name of the QuickTime object.

Volume

(number) The volume level represented by a number between 0 and 1. The value 0 is silent and 1 is the loudest.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


RadioButton.GetChecked

boolean RadioButton.GetChecked (

string ObjectName )

Description

Returns true if a specific radiobutton object is checked, or false if it's unchecked.

Parameters

ObjectName

(string) The name of the radiobutton object.

Returns

(boolean) True if the radiobutton object is checked, false if it is unchecked. If an error occurs, false will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


RadioButton.GetPos

table RadioButton.GetPos (

string ObjectName )

Description

Returns the X and Y page or dialog coordinates of a radiobutton object in pixels. This coordinate refers to the upper left hand corner of the object's bounding box relative to the page or dialog.

Note: The upper left hand corner of a page or dialog has X and Y coordinates of 0.

Parameters

ObjectName

(string) The name of the radiobutton object.

Returns

(table) A table containing the object's current coordinates, indexed by values X and Y. If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


RadioButton.GetProperties

table RadioButton.GetProperties (

string ObjectName )

Description

Returns a table containing the properties of a radiobutton object.

Parameters

ObjectName

(string) The name of the radiobutton object.

Returns

(table) A table containing the radiobutton object's properties, indexed by the following keys:

KEY

TYPE

DESCRIPTION

ObjectName

string

The name of the radiobutton object.

GroupID

string

The name of the radiobutton group that the radiobutton belongs to.

Value

string

The value of the radiobutton object.

Checked

boolean

True if the radiobutton is checked, false if it is unchecked.

Text

string

The text displayed in the radiobutton object.

FontName

string

The font name.

FontSize

number

The font size (in points).

FontStrikeout

boolean

True if the font is set to strikeout, false if it is not.

FontUnderline

boolean

True if the font is set to underline, false if it is not.

FontAntiAlias

boolean

True if the font is set to anti-alias, false if it is not.

FontItalic

boolean

True if the font is set to italic, false if it is not.

FontWeight

number

The weight of the font (how 'dark' the text will appear):

CONSTANT | VALUE | DESCRIPTION
FW_DONTCARE | 0 | Font weight not specified.
FW_THIN | 100 | Font weight 'thin'.
FW_EXTRALIGHT | 200 | Font weight 'extra-light'.
FW_LIGHT | 300 | Font weight 'light'.
FW_NORMAL | 400 | Font weight 'normal'.
FW_MEDIUM | 500 | Font weight 'medium'.
FW_SEMIBOLD | 600 | Font weight 'semi-bold'.
FW_BOLD | 700 | Font weight 'bold'.
FW_EXTRABOLD | 800 | Font weight 'extra bold'.
FW_HEAVY | 900 | Font weight 'heavy'.

FontScript

number

The character set in use by the radiobutton object:

CONSTANT | VALUE | DESCRIPTION
ANSI_CHARSET | 0 | ANSI character set.
BALTIC_CHARSET | 186 | Baltic character set.
CHINESEBIG5_CHARSET | 136 | Chinese character set.
DEFAULT_CHARSET | 1 | Default character set.
EASTEUROPE_CHARSET | 238 | Eastern European character set.
GB2312_CHARSET | 134 | GB2312 character set.
GREEK_CHARSET | 161 | Greek character set.
HANGUL_CHARSET | 129 | Hangul character set.
MAC_CHARSET | 77 | MAC character set.
OEM_CHARSET | 255 | OEM character set.
RUSSIAN_CHARSET | 204 | Russian character set.
SHIFTJIS_CHARSET | 128 | Shiftjis character set.
SYMBOL_CHARSET | 2 | Symbol character set.
TURKISH_CHARSET | 162 | Turkish character set.

TextAlignment

number

The alignment of the radiobutton text:

CONSTANT | VALUE | DESCRIPTION
ALIGN_LEFT | 0 | Text is left aligned.
ALIGN_CENTER | 1 | Text is center aligned.
ALIGN_RIGHT | 2 | Text is right aligned.

ButtonAlignment

number

The alignment of the button on the object:

CONSTANT | VALUE | DESCRIPTION
BTN_ALIGN_LEFT | 0 | Button is to the left of the text.
BTN_ALIGN_RIGHT | 1 | Button is to the right of the text.

ReadOrder

number

How text will be displayed in the radiobutton object:

CONSTANT | VALUE | DESCRIPTION
READ_STANDARD | 0 | Display the characters left to right.
READ_RIGHT_TO_LEFT | 1 | Display the characters right to left.

ColorNormal

number

The 'normal' color of the object's text.

ColorHighlight

number

The 'highlight' color of the object's text.

ColorDisabled

number

The 'disabled' color of the object's text.

ColorDown

number

The 'down' color of the object's text.

Enabled

boolean

True if the radiobutton object is enabled, false if it is not.

Visible

boolean

True if the radiobutton object is visible, false if it is not.

X

number

The horizontal position (in pixels) of the top left corner of the object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has an X value of 0

Y

number

The vertical position (in pixels) of the top left corner of the object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has a Y value of 0

Width

number

The width (in pixels) of the radiobutton object.

Height

number

The height (in pixels) of the radiobutton object.

TooltipText

string

The mouseover tooltip of the radiobutton object.

Cursor

number

The mouse cursor that will be displayed when the mouse is over the radiobutton object:

CONSTANT | VALUE | DESCRIPTION
CURSOR_ARROW | 0 | Standard mouse arrow cursor.
CURSOR_HAND | 1 | Hand cursor.
CURSOR_BLACK_ARROW | 2 | Black arrow cursor.
CURSOR_CROSSHAIR | 3 | Crosshair cursor.
CURSOR_EXPLORE | 4 | Explore cursor.
CURSOR_HELP | 5 | Help cursor.
CURSOR_MAGNIFY | 6 | Magnify cursor.
CURSOR_MEDIA | 7 | Media cursor.
CURSOR_MONEY | 8 | Money cursor.
CURSOR_NOTEPAD | 9 | Notepad cursor.
CURSOR_PENCIL | 10 | Pencil cursor.
CURSOR_PRINTER | 11 | Printer cursor.
CURSOR_SPEAKER | 12 | Speaker cursor.
CURSOR_UP_ARROW | 13 | Up arrow cursor.

ResizeLeft

boolean

True if the left side of the object will move when the application is resized, false if it is not.

ResizeRight

boolean

True if the right side of the object will move when the application is resized, false if it is not.

ResizeTop

boolean

True if the top of the object will move when the application is resized, false if it is not.

ResizeBottom

boolean

True if the bottom of the object will move when the application is resized, false if it is not.

HighlightSound

number

The type of sound that will be played when the mouse moves over the radiobutton object.

CONSTANT | VALUE | DESCRIPTION
SND_NONE | 0 | No highlight sound.
SND_STANDARD | 1 | Standard highlight sound.
SND_CUSTOM | 2 | Custom highlight sound.

HighlightSoundFile

string

The path to the radiobutton object's custom highlight sound file. If the radiobutton object does not use a custom sound, this value will be an empty string ("").

ClickSound

number

The type of sound that will be played when the mouse clicks the radiobutton object.

CONSTANT | VALUE | DESCRIPTION
SND_NONE | 0 | No highlight sound.
SND_STANDARD | 1 | Standard highlight sound.
SND_CUSTOM | 2 | Custom highlight sound.

ClickSoundFile

string

The path to the radiobutton object's custom click sound file. If the radiobutton object does not use a custom sound, this value will be an empty string ("").

If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


RadioButton.GetSize

table RadioButton.GetSize (

string ObjectName )

Description

Returns the pixel dimensions of a radiobutton object.

Parameters

ObjectName

(string) The name of the radiobutton object.

Returns

(table) A table containing the object's pixel dimensions, indexed by values "Width" and "Height". If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


RadioButton.GetText

string RadioButton.GetText (

string ObjectName )

Description

Returns the text currently displayed on the radiobutton object.

Parameters

ObjectName

(string) The name of the radiobutton object.

Returns

(string) The text currently displayed on the radiobutton object. If no text is displayed or an error occurs, an empty string ("") is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


RadioButton.IsEnabled

boolean RadioButton.IsEnabled (

string ObjectName )

Description

Returns true if a specific radiobutton object is enabled, or false if it's disabled.

Note: When a radiobutton object is disabled, it doesn't respond to the user at all.

Parameters

ObjectName

(string) The name of the radiobutton object.

Returns

(boolean) True if the radiobutton object is enabled, false if it is disabled. If an error occurs, false will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


RadioButton.IsVisible

boolean RadioButton.IsVisible (

string ObjectName )

Description

Returns true if a specific radiobutton object is visible, and false if it isn't.

Parameters

ObjectName

(string) The name of the radiobutton object.

Returns

(boolean) True if the radiobutton object is visible, false if it's invisible. If an error occurs, false will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


RadioButton.SetChecked

RadioButton.SetChecked (

string ObjectName,

boolean Checked = true )

Description

Sets the checked/unchecked state of a radiobutton object.

Note: By default, radiobutton objects on the same page or dialog are part of the same group (blank group ID), so when you check a radiobutton, the other radiobuttons in that group will automatically be unchecked. This also applies to custom group IDs. Unchecking a radio button has no effect on any other radiobuttons. If you do not want the automatic checking, create each radiobutton with a unique group ID.

Parameters

ObjectName

(string) The name of the radiobutton object.

Checked

(boolean) Whether to make the radiobutton object checked or unchecked:

VALUE | DESCRIPTION
true | Checked. (Default)
false | Unchecked.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


RadioButton.SetEnabled

RadioButton.SetEnabled (

string ObjectName,

boolean Enabled = true )

Description

Sets the enabled/disabled state of a radiobutton object.

Parameters

ObjectName

(string) The name of the radiobutton object.

Enabled

(boolean) Whether to make the radiobutton object enabled or disabled:

VALUE | DESCRIPTION
true | Enabled. (Default)
false | Disabled.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


RadioButton.SetPos

RadioButton.SetPos (

string ObjectName,

number X,

number Y )

Description

Sets the X and Y pixel coordinates of a radiobutton object relative to the page or dialog.

Parameters

ObjectName

(string) The name of the radiobutton object.

X

(number) The new X pixel coordinate (horizontal position) to set for the radiobutton object. This is the X coordinate of the upper left hand corner of the object's bounding box relative to the page or dialog.

Y

(number) The new Y pixel coordinate (vertical position) to set for the radiobutton object. This is the Y coordinate of the upper left hand corner of the object's bounding box relative to the page or dialog.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


RadioButton.SetProperties

RadioButton.SetProperties (

string ObjectName,

table Properties )

Description

Sets the properties of a radiobutton object.

Parameters

ObjectName

(string) The name of the radiobutton object.

Properties

(table) A table containing the radiobutton object's properties indexed by the following keys:

KEY

TYPE

DESCRIPTION

GroupID

string

The name of the radiobutton group to belong to.

Value

string

The value to assign to the radiobutton.

Checked

boolean

True if the radiobutton should be checked, false if it should be unchecked.

Note: By default, radiobutton objects on the same page or dialog are part of the same group (blank group ID), so when you check a radiobutton, the other radiobuttons in that group will automatically be unchecked. This also applies to custom radiobutton groups. Unchecking a radio button has no effect on any other radiobuttons. If you do not want the automatic checking, create each radiobutton with a unique group ID.

Text

string

The text to be displayed in the radiobutton object.

FontName

string

The font name.

FontSize

number

The font size (in points).

FontStrikeout

boolean

True if the font should be set to strikeout, false if it should not be.

FontUnderline

boolean

True if the font should be set to underline, false if it should not be.

FontAntiAlias

boolean

True if the font should be set to anti alias, false if it should not be.

FontItalic

boolean

True if the font should be set to italic, false if it should not be.

FontWeight

number

The weight of the font (how 'dark' the text will appear):

CONSTANT | VALUE | DESCRIPTION
FW_DONTCARE | 0 | Font weight not specified.
FW_THIN | 100 | Font weight 'thin'.
FW_EXTRALIGHT | 200 | Font weight 'extra-light'.
FW_LIGHT | 300 | Font weight 'light'.
FW_NORMAL | 400 | Font weight 'normal'.
FW_MEDIUM | 500 | Font weight 'medium'.
FW_SEMIBOLD | 600 | Font weight 'semi-bold'.
FW_BOLD | 700 | Font weight 'bold'.
FW_EXTRABOLD | 800 | Font weight 'extra bold'.
FW_HEAVY | 900 | Font weight 'heavy'.

FontScript

number

The character set in use by the radiobutton object:

CONSTANT | VALUE | DESCRIPTION
ANSI_CHARSET | 0 | ANSI character set.
BALTIC_CHARSET | 186 | Baltic character set.
CHINESEBIG5_CHARSET | 136 | Chinese character set.
DEFAULT_CHARSET | 1 | Default character set.
EASTEUROPE_CHARSET | 238 | Eastern European character set.
GB2312_CHARSET | 134 | GB2312 character set.
GREEK_CHARSET | 161 | Greek character set.
HANGUL_CHARSET | 129 | Hangul character set.
MAC_CHARSET | 77 | MAC character set.
OEM_CHARSET | 255 | OEM character set.
RUSSIAN_CHARSET | 204 | Russian character set.
SHIFTJIS_CHARSET | 128 | Shiftjis character set.
SYMBOL_CHARSET | 2 | Symbol character set.
TURKISH_CHARSET | 162 | Turkish character set.

TextAlignment

number

The alignment of the text in the radiobutton object. Choose from:

CONSTANT | VALUE | DESCRIPTION
ALIGN_LEFT | 0 | Text is left aligned.
ALIGN_CENTER | 1 | Text is center aligned.
ALIGN_RIGHT | 2 | Text is right aligned.

ButtonAlignment

number

The alignment of the button in the radiobutton object:

CONSTANT | VALUE | DESCRIPTION
BTN_ALIGN_LEFT | 0 | Button is to the left of the text.
BTN_ALIGN_RIGHT | 1 | Button is to the right of the text.

ReadOrder

number

How text should be displayed in the radiobutton object:

CONSTANT | VALUE | DESCRIPTION
READ_STANDARD | 0 | Display the characters left to right.
READ_RIGHT_TO_LEFT | 1 | Display the characters right to left.

ColorNormal

number

The 'normal' color of the radiobutton object's text.

ColorHighlight

number

The 'highlight' color of the radiobutton object's text.

ColorDisabled

number

The 'disabled' color of the radiobutton object's text.

ColorDown

number

The 'down' color of the radiobutton object's text.

Enabled

boolean

True if the radiobutton object should be enabled, false if it should not be.

Visible

boolean

True if the radiobutton object should be visible, false if it should not be.

X

number

The horizontal position (in pixels) of the top left corner of the radiobutton object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has an X value of 0

Y

number

The vertical position (in pixels) of the top left corner of the radiobutton object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has a Y value of 0

Width

number

The width (in pixels) of the radiobutton object.

Height

number

The height (in pixels) of the radiobutton object.

TooltipText

string

The mouseover tooltip of the radiobutton object. Tip: If you want a "&" character in the text, you must enter "&&&".

Cursor

number

The mouse cursor that should be displayed when the mouse is over the radiobutton object:

CONSTANT | VALUE | DESCRIPTION
CURSOR_ARROW | 0 | Standard mouse arrow cursor.
CURSOR_HAND | 1 | Hand cursor.
CURSOR_BLACK_ARROW | 2 | Black arrow cursor.
CURSOR_CROSSHAIR | 3 | Crosshair cursor.
CURSOR_EXPLORE | 4 | Explore cursor.
CURSOR_HELP | 5 | Help cursor.
CURSOR_MAGNIFY | 6 | Magnify cursor.
CURSOR_MEDIA | 7 | Media cursor.
CURSOR_MONEY | 8 | Money cursor.
CURSOR_NOTEPAD | 9 | Notepad cursor.
CURSOR_PENCIL | 10 | Pencil cursor.
CURSOR_PRINTER | 11 | Printer cursor.
CURSOR_SPEAKER | 12 | Speaker cursor.
CURSOR_UP_ARROW | 13 | Up arrow cursor.

ResizeLeft

boolean

True if the left side of the object should move when the application is resized, false if it should not.

ResizeRight

boolean

True if the right side of the object should move when the application is resized, false if it should not.

ResizeTop

boolean

True if the top of the object should move when the application is resized, false if it should not.

ResizeBottom

boolean

True if the bottom of the object should move when the application is resized, false if it should not.

HighlightSound

number

The type of sound that should be played when the mouse moves over the object.

CONSTANT | VALUE | DESCRIPTION
SND_NONE | 0 | No highlight sound.
SND_STANDARD | 1 | Standard highlight sound.
SND_CUSTOM | 2 | Custom highlight sound.

HighlightSoundFile

string

The path to the object's custom highlight sound file.

ClickSound

number

The type of sound that should be played when the mouse clicks the object.

CONSTANT | VALUE | DESCRIPTION
SND_NONE | 0 | No click sound.
SND_STANDARD | 1 | Standard click sound.
SND_CUSTOM | 2 | Custom click sound.

ClickSoundFile

string

The path to the object's custom click sound file.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


RadioButton.SetSize

RadioButton.SetSize (

string ObjectName,

number Width,

number Height )

Description

Sets the size of a radiobutton object.

Parameters

ObjectName

(string) The name of the radiobutton object.

Width

(number) The new width of the radiobutton object in pixels.

Height

(number) The new height of the radiobutton object in pixels.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


RadioButton.SetText

RadioButton.SetText (

string ObjectName,

string Text )

Description

Sets the text currently displayed on the radiobutton object.

Parameters

ObjectName

(string) The name of the radiobutton object.

Text

(string) The text you want to display on the radiobutton object.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


RadioButton.SetVisible

RadioButton.SetVisible (

string ObjectName,

boolean Visible = true )

Description

Sets the visibility of a radiobutton object.

Parameters

ObjectName

(string) The name of the radiobutton object.

Visible

(boolean) Whether to make the radiobutton object visible or invisible:

VALUE | DESCRIPTION
true | Visible. (Default)
false | Invisible.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Registry.CreateKey

Registry.CreateKey (

number MainKey,

string SubKey )

Description

Creates a "key" in the user's Registry.

Parameters

MainKey

(number) The main or "root" key where you want to create the key. Choose from:

CONSTANT | VALUE
HKEY_CLASSES_ROOT | 0
HKEY_CURRENT_CONFIG | 1
HKEY_CURRENT_USER | 2
HKEY_LOCAL_MACHINE | 3
HKEY_USERS | 4

SubKey

(string) The sub key to create.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Registry.DeleteKey

Registry.DeleteKey (

number MainKey,

string SubKey )

Description

Deletes a "key" from the user's Registry.

Parameters

MainKey

(number) The main or "root" key where you want to delete the key. Choose from:

CONSTANT | VALUE
HKEY_CLASSES_ROOT | 0
HKEY_CURRENT_CONFIG | 1
HKEY_CURRENT_USER | 2
HKEY_LOCAL_MACHINE | 3
HKEY_USERS | 4

SubKey

(string) The sub key to delete.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Registry.DeleteValue

Registry.DeleteValue (

number MainKey,

string SubKey,

string Value )

Description

Deletes a "value" from the user's Registry.

Parameters

MainKey

(number) The main or "root" key where the value can be found. Choose from:

CONSTANT | VALUE
HKEY_CLASSES_ROOT | 0
HKEY_CURRENT_CONFIG | 1
HKEY_CURRENT_USER | 2
HKEY_LOCAL_MACHINE | 3
HKEY_USERS | 4

SubKey

(string) The sub key that contains the value.

Value

(string) The value to delete.

Note: To specify the "(Default)" value, use an empty string "" as the value name. Deleting the "(Default)" value results in the removal of the key and all of its values.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Registry.DoesKeyExist

boolean Registry.DoesKeyExist (

number MainKey,

string SubKey )

Description

Determines whether or not a particular Registry key exists and returns either true or false.

Parameters

MainKey

(number) The main or "root" key containing the sub key. Choose from:

CONSTANT | VALUE
HKEY_CLASSES_ROOT | 0
HKEY_CURRENT_CONFIG | 1
HKEY_CURRENT_USER | 2
HKEY_LOCAL_MACHINE | 3
HKEY_USERS | 4

SubKey

(string) The sub key to check for existence.

Returns

(boolean) True if the sub key exists, or false if it doesn't or an error occurs. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Registry.GetAccess

boolean Registry.GetAccess (

number MainKey,

string SubKey,

number Rights = ACCESS_ALL )

Description

Checks to see if a Registry key has specific access rights and returns either true or false.

Parameters

MainKey

(number) The main or "root" key containing the sub key. Choose from:

CONSTANT | VALUE
HKEY_CLASSES_ROOT | 0
HKEY_CURRENT_CONFIG | 1
HKEY_CURRENT_USER | 2
HKEY_LOCAL_MACHINE | 3
HKEY_USERS | 4

SubKey

(string) The sub key to check for access rights.

Rights

(number) The access rights to check. Choose from:

CONSTANT | VALUE | DESCRIPTION
ACCESS_READ | 131097 | The Registry key contents can be read.
ACCESS_WRITE | 131078 | The Registry key can be written to.
ACCESS_ENUMERATE | 8 | The Registry key contents can be enumerated.
ACCESS_ALL | 98103 | The key has full access rights. (Default)

Returns

(boolean) True if the key has the specified access rights and false if it doesn't or an error occurs. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Registry.GetKeyNames

table Registry.GetKeyNames (

number MainKey,

string SubKey )

Description

Returns a table containing the names of all of the sub keys for a particular key.

Parameters

MainKey

(number) The main or "root" key containing the sub key. Choose from:

CONSTANT | VALUE
HKEY_CLASSES_ROOT | 0
HKEY_CURRENT_CONFIG | 1
HKEY_CURRENT_USER | 2
HKEY_LOCAL_MACHINE | 3
HKEY_USERS | 4

SubKey

(string) The key whose sub key names you want.

Returns

(table) A table containing the names of all of the sub keys under the specified key. If there are no key names or an error occurs, nil is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Registry.GetValue

string Registry.GetValue (

number MainKey,

string SubKey,

string Value,

boolean AutoExpand = true )

Description

Returns a specific Registry value's data.

Parameters

MainKey

(number) The main or "root" key containing the sub key. Choose from:

CONSTANT | VALUE
HKEY_CLASSES_ROOT | 0
HKEY_CURRENT_CONFIG | 1
HKEY_CURRENT_USER | 2
HKEY_LOCAL_MACHINE | 3
HKEY_USERS | 4

SubKey

(string) The sub key containing the value.

Value

(string) The value whose data you want.

Note: To get the "(Default)" value's data, use an empty string "" as the value name.

AutoExpand

(boolean) Whether to expand any environment variables in the data before it is returned. This option is used when retrieving a value whose type is REG_EXPAND_SZ:

VALUE | DESCRIPTION
true | Expand environment variables. (Default)
false | Don't expand environment variables.

Returns

(string) The data contained within the Registry value. If the action fails, a blank string "" is returned. You can use Application.GetLastError to determine whether this action failed, and why.

Note: For values of type REG_BINARY, the returned value will be a string of hex values separated by spaces. For values of type REG_MULTI_SZ, a string will be returned where each registry entry string is separated by a "|" character.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Registry.GetValueNames

table Registry.GetValueNames (

number MainKey,

string SubKey )

Description

Returns the names of all of the values within a specific sub key.

Parameters

MainKey

(number) The main or "root" key containing the sub key. Choose from:

CONSTANT | VALUE
HKEY_CLASSES_ROOT | 0
HKEY_CURRENT_CONFIG | 1
HKEY_CURRENT_USER | 2
HKEY_LOCAL_MACHINE | 3
HKEY_USERS | 4

SubKey

(string) The sub key whose value names you want.

Returns

(table) A table containing the names of all the values in the sub key. If the sub key contains no values or an error occurs, nil is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Registry.GetValueType

number Registry.GetValueType (

number MainKey,

string SubKey,

string Value )

Description

Returns a Registry value's type.

Parameters

MainKey

(number) The main or "root" key containing the sub key. Choose from:

CONSTANT | VALUE
HKEY_CLASSES_ROOT | 0
HKEY_CURRENT_CONFIG | 1
HKEY_CURRENT_USER | 2
HKEY_LOCAL_MACHINE | 3
HKEY_USERS | 4

SubKey

(string) The sub key containing the value.

Value

(string) The value whose type you want.

Note: To specify the "(Default)" value, use an empty string "" as the value name.

Returns

(number) A numeric constant that corresponds to the Registry value's type:

CONSTANT | VALUE | DESCRIPTION
REG_NONE | 0 | No defined value type.
REG_SZ | 1 | A null-terminated string. ("SZ" is short for "string, zero-terminated.")
REG_EXPAND_SZ | 2 | A null-terminated string that contains environment variables which are to be expanded whenever the Registry value is accessed.
REG_BINARY | 3 | Raw binary data.
REG_DWORD | 4 | A 32-bit number.
REG_DWORD_LITTLE_ENDIAN | 4 | A 32-bit number in little-endian format. This is the same as REG_DWORD.
REG_DWORD_BIG_ENDIAN | 5 | A 32-bit number in big-endian format.
REG_LINK | 6 | A Unicode symbolic link. Used internally; applications should not use this type.
REG_MULTI_SZ | 7 | An array of null-terminated strings, each one terminated by two null characters.
REG_RESOURCE_LIST | 8 | A device-driver resource list.
REG_FULL_RESOURCE_DESCRIPTOR | 9 | A list of hardware resources.
REG_RESOURCE_REQUIREMENTS_LIST | 10 | A list of resources required by a driver.

If the action fails, -1 is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Registry.SetValue

Registry.SetValue (

number MainKey,

string SubKey,

string Value,

string Data,

number Type = REG_SZ )

Description

Sets the data of a specific Registry value.

Parameters

MainKey

(number) The main or "root" key containing the sub key. Choose from:

CONSTANT | VALUE
HKEY_CLASSES_ROOT | 0
HKEY_CURRENT_CONFIG | 1
HKEY_CURRENT_USER | 2
HKEY_LOCAL_MACHINE | 3
HKEY_USERS | 4

SubKey

(string) The sub key containing the value.

Value

(string) The value whose data you want to set.

Note: To specify the "(Default)" value, use an empty string "" as the value name.

Data

(string) The data you want to assign to the value.

Type

(number) The type of data you want to assign:

CONSTANT | VALUE | DESCRIPTION
REG_SZ | 1 | A null-terminated string. ("SZ" is short for "string, zero-terminated.")
REG_EXPAND_SZ | 2 | A null-terminated string that contains environment variables which are to be expanded whenever the Registry value is accessed.
REG_BINARY | 3 | Raw binary data. AutoPlay requires this data be passed as a string of hex values separated by single spaces. For example, 2C 00 00
REG_DWORD | 4 | A 32-bit number.
REG_MULTI_SZ | 7 | An array of null-terminated strings, each one terminated by two null characters. When storing multiple string values in one Registry value, AutoPlay requires that each string be separated by a "|" character. For example \Hey|\You.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


RichText.CanPaste

boolean RichText.CanPaste (

string ObjectName )

Description

Returns true if the contents of the clipboard can be pasted into a richtext object.

Parameters

ObjectName

(string) The name of the richtext object.

Returns

(boolean) True if the contents of the clipboard can be pasted into the object, false if it cannot. If an error occurs, false will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


RichText.CanUndo

boolean RichText.CanUndo (

string ObjectName )

Description

Returns true if the last editing operation in a richtext object can be undone.

Parameters

ObjectName

(string) The name of the richtext object.

Returns

(boolean) True if the last editing operation in the richtext object can be undone, false if it cannot. If an error occurs, false will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


RichText.Copy

RichText.Copy (

string ObjectName )

Description

Copies the current selection in a richtext object to the clipboard.

Parameters

ObjectName

(string) The name of the richtext object.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


RichText.Cut

RichText.Cut (

string ObjectName )

Description

Cuts the current selection in a richtext object to the clipboard.

Parameters

ObjectName

(string) The name of the richtext object.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


RichText.Delete

RichText.Delete (

string ObjectName )

Description

Deletes the currently selected text in a richtext object.

Parameters

ObjectName

(string) The name of the richtext object.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


RichText.EmptyUndoBuffer

RichText.EmptyUndoBuffer (

string ObjectName )

Description

Resets (clears) the undo buffer in a richtext object.

Parameters

ObjectName

(string) The name of the richtext object.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


RichText.FindText

table RichText.FindText (

string ObjectName,

string SearchFor,

number Start = 1,

number End = -1,

boolean CaseSensitive = false,

boolean WholeWord = false )

Description

Searches for text in a RichText object.

Parameters

ObjectName

(string) The name of the richtext object.

SearchFor

(string) The text to search for.

Start

(number) The position in the richtext object where the search will begin. The default is 1, which is the first character in object. If you would like to search from the back, specify -1. If the start position is less than the end position, it searches forward. If the start position is greater than the end position, it searches backward.

End

(number) The position in the richtext object where the search will end. The default is -1, which is the last character in object, or if you are searching backward, -1 means the first character in the object. If the start position is less than the end position, it searches forward. If the start position is greater than the end position, it searches backward.

CaseSensitive

(boolean) Whether the search will be case sensitive:

VALUE | DESCRIPTION
true | Make the search case sensitive.
false | Don't make the search case insensitive. (Default)

WholeWord

(boolean) Whether the search will find matching whole words only:

VALUE | DESCRIPTION
true | Find matching whole words only.
false | Find any occurrence of the text. (Default)

Returns

(table) A table containing the start and end positions of the match indexed by "Start" and "End". If there were no matches or an error occurs, nil is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


RichText.GetLine

string RichText.GetLine (

string ObjectName,

number Line = 1 )

Description

Returns a line of text from a richtext object.

Parameters

ObjectName

(string) The name of the richtext object.

Line

(number) The line number (one-based) of the line you want to get from the richtext object.

Returns

(string) Returns the text of the specified line in the richtext object. If an invalid line is specified, or an error occurs, a blank string ("") will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


RichText.GetParagraphFormat

table RichText.GetParagraphFormat (

string ObjectName,

boolean OnlyConsistentAttributes = true )

Description

Returns a table describing the paragraph format of the current selection in a richtext object.

Parameters

ObjectName

(string) The name of the richtext object.

OnlyConsistentAttributes

(boolean) Whether the table should only contain attributes that are consistent throughout the selection. (If true, any mixed attributes will be nil. If false, the table will describe all attributes of the first selected paragraph.)

VALUE | DESCRIPTION
true | Only contain attributes consistent throughout selection (mixed attributes will be nil). (Default)
false | Describe all attributes of the first selected paragraph.

Returns

(table) A table describing the paragraph format of the current selection in a richtext object, indexed by the following values. If there is no selection or an error occurs, nil is returned. You can use Application.GetLastError to determine whether this action failed, and why.

Note: The functionality of some of the items may be depend on the version of the rich edit control available on the user's system.

KEY

TYPE

DESCRIPTION

Bulleted

boolean

True if the text selection is bulleted, false if it is not.

StartIndent

number

The left indent of the first line in twips. (and all subsequent lines if Offset is 0).

RightIndent

number

The right indent of the text, relative to the right margin, in twips.

Offset

number

The indentation of the second and subsequent lines, relative to the indentation of the first line, in twips.

Alignment

number

The paragraph alignment:
PFA_LEFT (1) - Paragraphs are aligned with the left margin.
PFA_RIGHT (2) - Paragraphs are aligned with the right margin.
PFA_CENTER (3) - Paragraphs are centered.
PFA_JUSTIFY (4) - Paragraphs are justified (Rich Edit 2.0). This value is included for compatibility with TOM interfaces; rich edit controls earlier than Rich Edit 3.0 display the text aligned with the left margin.

Tabs

table

A numerically indexed table of the tab positions.

SpaceBefore

number

The size of the spacing above the paragraph, in twips.

SpaceAfter

number

The size of the spacing below the paragraph, in twips.

LineSpacing

number

The spacing between lines based on the LineSpacingRule defined below.

LineSpacingRule

number

Type of line spacing based on one of the following values:
0 - Single spacing. The LineSpacing item is ignored.

1 - One-and-a-half spacing. The LineSpacing item is ignored.
2 - Double spacing. The LineSpacing item is ignored.
3 - The LineSpacing item specifies the spacing from one line to the next, in twips. However, if LineSpacing specifies a value that is less than single spacing, the control displays single-spaced text.
4 - The LineSpacing item specifies the spacing from one line to the next, in twips. The control uses the exact spacing specified, even if LineSpacing specifies a value that is less than single spacing.
5 - The value of LineSpacing / 20 is the spacing, in lines, from one line to the next. Thus, setting LineSpacing to 20 produces single-spaced text, 40 is double spaced, 60 is triple spaced, and so on.

BorderSpace

number

The space between the border and the paragraph text, in twips. This item is included for compatibility with Word; the rich edit control stores the values but does not use them to display text.

BorderWidth

number

The border width, in twips.

Borders

number

This item is only included for compatibility, and may not have any visible effect. For a description of this option, see MSDN: PARAFORMAT2 Structure.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


RichText.GetPos

table RichText.GetPos (

string ObjectName )

Description

Returns the X and Y page or dialog coordinates of a richtext object in pixels. This coordinate refers to the upper left hand corner of the object's bounding box relative to the page or dialog.

Note: The upper left hand corner of a page or dialog has X and Y coordinates of 0.

Parameters

ObjectName

(string) The name of the richtext object.

Returns

(table) A table containing the object's current coordinates, indexed by values "X" and "Y". If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


RichText.GetProperties

table RichText.GetProperties (

string ObjectName )

Description

Returns a table containing the properties of a richtext object.

Parameters

ObjectName

(string) The name of the richtext object.

Returns

(table) A table containing the richtext object's properties, indexed by the following keys:

KEY

TYPE

DESCRIPTION

ObjectName

string

The name of the richtext object.

Text

string

The text displayed in the richtext object.

RawRTF

string

The raw RTF text of the richtext object (this includes the internal formatting.)

VScrollbar

boolean

True if vertical scrollbars are enabled, false if they are not.

HScrollbar

boolean

True if horizontal scrollbars are enabled, false if they are not.

Transparent

boolean

True if the background is transparent, false if it is not.

BackgroundColor

number

The color of the richtext object background.

Border

number

The type of border surrounding the richtext object:

CONSTANT | VALUE | DESCRIPTION
BORDER_NONE | 0 | No border.
BORDER_SUNKEN | 2 | Sunken border.

ReadOrder

number

How text will be displayed in the richtext object:

CONSTANT | VALUE | DESCRIPTION
READ_STANDARD | 0 | Display the characters left to right.
READ_RIGHT_TO_LEFT | 1 | Display the characters right to left.

ReadOnly

boolean

True if the richtext object is read-only, false if it is not.

AutoDetectURL

boolean

True if URLs are set to be automatically detected in the object, false if they are not.

ShowContextMenu

boolean

True if a right-click context menu is set to show, false if it is not.

Enabled

boolean

True if the richtext object is enabled, false if it is not.

Visible

boolean

True if the richtext object is visible, false if it is not.

X

number

The horizontal position (in pixels) of the top left corner of the richtext object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has an X value of 0

Y

number

The vertical position (in pixels) of the top left corner of the richtext object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has a Y value of 0

Width

number

The width (in pixels) of the richtext object.

Height

number

The height (in pixels) of the richtext object.

TooltipText

string

The mouseover tooltip of the richtext object.

ResizeLeft

boolean

True if the left side of the object will move when the application is resized, false if it is not.

ResizeRight

boolean

True if the right side of the object will move when the application is resized, false if it is not.

ResizeTop

boolean

True if the top of the object will move when the application is resized, false if it is not.

ResizeBottom

boolean

True if the bottom of the object will move when the application is resized, false if it is not.

WindowHandle

number

The integer value that represents the object's window. (Commonly referred to as an hWnd.)

If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


RichText.GetSelection

table RichText.GetSelection (

string ObjectName )

Description

Returns a table containing the start and end positions of the current selection in a richtext object.

Parameters

ObjectName

(string) The name of the richtext object.

Returns

(table) A table containing two numeric indexes. The first index stores where the selection started, the second stores where the selection ended in the richtext object. You can access these values using the table keys "Start" and "End". If there was no selection, or if an error occurs, a value of nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


RichText.GetSelectionFormat

table RichText.GetSelectionFormat (

string ObjectName,

boolean OnlyConsistentAttributes = true )

Description

Returns a table describing the character format of the current selection in a richtext object.

Parameters

ObjectName

(string) The name of the richtext object.

OnlyConsistentAttributes

(boolean) Whether the table should only contain attributes that are consistent throughout the selection. (If true, any mixed attributes will be nil. If false, the table will describe all attributes of the first parts of the selection.)

VALUE | DESCRIPTION
true | Only contain attributes consistent throughout selection (mixed attributes will be nil). (Default)
false | Describe all attributes of the first parts of the selection.

Returns

(table) A table describing the character format of the current selection in a richtext object, indexed by the following values. If there is no selection or an error occurs, nil is returned. You can use Application.GetLastError to determine whether this action failed, and why.

Note: Some of the following table items are included only for compatibility with Microsoft Text Object Model (TOM) interfaces; the rich edit control stores the value but does not use it to display text. The functionality of some of the items may also depend on the version of the rich edit control available on the system.

KEY

TYPE

DESCRIPTION

AllCaps

boolean

True if the selected characters are all capital letters and false if they are not. This value applies only to versions earlier than Rich Edit 3.0.

AutoBackColor

boolean

True if the background color is the object's background color for selected text (BackColor is ignored), false if BackColor is used.

AutoColor

boolean

True if the text color is the objects text color for selected text (TextColor is ignored), false if TextColor is used.

Bold

boolean

True if the selected text is bolded, false if it is not.

Disabled

boolean

True if characters are displayed as disabled, false if they are not.

Emboss

boolean

True if the characters are embossed, false if they are not. (This item has no effect on displayed text in the object.)

Hidden

boolean

True if the characters are displayed, false if they are not. This item is only supported for Rich Edit 3.0 and later.

Imprint

boolean

True if characters are displayed as imprinted characters, false if they are not. (This item has no effect on displayed text in the object.)

Italic

boolean

True if characters are italic, false if they are not.

Link

boolean

True if the selection contains links, false if it does not.

Outline

boolean

True if characters are displayed as outlined characters, false if they are not. (This value has no effect on displayed text in the object.)

Protected

boolean

True if the characters are protected, false if they are not.

Revised

boolean

True if characters are marked as revised, false if they are not.

Shadow

boolean

True if the characters are displayed as shadowed characters, false if they are not. (This value has no effect on displayed text in the object.)

SmallCaps

boolean

True if characters are in small capital letters, false if they are not. (This value has no effect on displayed text in the object.)

StrikeOut

boolean

True if characters are struck out, false if they are not.

SubScript

boolean

True if the characters are subscript, false if they are not.

SuperScript

boolean

True if the characters are superscript, false if they are not.

Underline

boolean

True if the characters are underlined, false if they are not.

Height

number

The height of the characters in twips.

YOffset

number

The character offset from the baseline, in twips. If this value is positive, the character is a superscript; if the value is negative, the character is a subscript.

TextColor

number

The text color. This item is ignored if AutoColor is set to true.

CharacterSet

number

The character set of the text:

CONSTANT | VALUE | DESCRIPTION
ANSI_CHARSET | 0 | ANSI character set.
BALTIC_CHARSET | 186 | Baltic character set.
CHINESEBIG5_CHARSET | 136 | Chinese character set.
DEFAULT_CHARSET | 1 | Default character set.
EASTEUROPE_CHARSET | 238 | Eastern European character set.
GB2312_CHARSET | 134 | GB2312 character set.
GREEK_CHARSET | 161 | Greek character set.
HANGUL_CHARSET | 129 | Hangul character set.
MAC_CHARSET | 77 | MAC character set.
OEM_CHARSET | 255 | OEM character set.
RUSSIAN_CHARSET | 204 | Russian character set.
SHIFTJIS_CHARSET | 128 | Shiftjis character set.
SYMBOL_CHARSET | 2 | Symbol character set.
TURKISH_CHARSET | 162 | Turkish character set.

PitchAndFamily

number

The font family and pitch. See MSDN: CHARFORMAT2 Structure for more information.

FaceName

string

The name of the font used in the selected text.

Weight

number

The weight of the font (how 'dark' the text is):

CONSTANT | VALUE | DESCRIPTION
FW_DONTCARE | 0 | Font weight not specified.
FW_THIN | 100 | Font weight 'thin'.
FW_EXTRALIGHT | 200 | Font weight 'extra-light'.
FW_LIGHT | 300 | Font weight 'light'.
FW_NORMAL | 400 | Font weight 'normal'.
FW_MEDIUM | 500 | Font weight 'medium'.
FW_SEMIBOLD | 600 | Font weight 'semi-bold'.
FW_BOLD | 700 | Font weight 'bold'.
FW_EXTRABOLD | 800 | Font weight 'extra bold'.
FW_HEAVY | 900 | Font weight 'heavy'.

Spacing

number

The horizontal space between letters, in twips. (This value has no effect on displayed text in the object. It is included for compatibility with Microsoft WindowsText Object Model (TOM) interfaces.)

BackColor

number

The background color. This value is ignored if AutoBackColor is set to true.

LCID

number

The locale identifier of the selected text. (This value has no effect on displayed text in the object.) See MSDN: CHARFORMAT2 Structure for more information.

Kerning

number

The value of the font size, above which to kern the character (Height). (This value has no effect on displayed text in the object. It is included for compatibility with Microsoft WindowsText Object Model (TOM) interfaces.)

Style

number

The character style handle. (This value has no effect on displayed text in the object. It is included for compatibility with Microsoft WindowsText Object Model (TOM) interfaces.)

UnderlineType

number

The underline type specified by one of the following values:
CFU_CF1UNDERLINE (255) - Contains a CHARFORMAT type of underline.
CFU_UNDERLINENONE (0) - No underline. This is the default.
CFU_UNDERLINE (1) - Solid underlined text.
CFU_UNDERLINEWORD (2) - Underline words only. The object displays the text with a solid underline.

CFU_UNDERLINEDOUBLE (3) - Double-underlined text. The object displays the text with a solid underline.
CFU_UNDERLINEDOTTED (4) - Dotted underlined text. For versions earlier than Rich Edit 3.0, text is displayed with a solid underline.

Animation

number

The text animation type. (This value has no effect on displayed text in the object. It is included for compatibility with TOM interfaces.)

RevAuthor

number

An index that identifies the author making a revision. The rich edit control uses different text colors for each different author index.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


RichText.GetSize

table RichText.GetSize (

string ObjectName )

Description

Returns the pixel dimensions of a richtext object.

Parameters

ObjectName

(string) The name of the richtext object.

Returns

(table) A table containing the object's pixel dimensions, indexed by values "Width" and "Height". If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


RichText.GetText

string RichText.GetText (

string ObjectName,

boolean RawRTF = true )

Description

Returns the text displayed in a richtext object.

Parameters

ObjectName

(string) The name of the richtext object.

RawRTF

(boolean) Whether to return the raw RTF text (including formatting codes) or the text as displayed in the richtext object (unformatted).

VALUE | DESCRIPTION
true | Return the raw RTF text (including formatting codes). (Default)
false | Return the text as displayed in the object. (unformatted).

Returns

(string) The text that is currently displayed in the richtext object. If an error occurs, a blank string "" will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


RichText.GetTextLength

number RichText.GetTextLength (

string ObjectName )

Description

Returns the length of the text displayed in a richtext object.

Parameters

ObjectName

(string) The name of the richtext object.

Returns

(number) The length of the text displayed in the richtext object. If an error occurs, -1 is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


RichText.IsEnabled

boolean RichText.IsEnabled (

string ObjectName )

Description

Returns true if a specific richtext object is enabled, or false if it's disabled.

Note: When a richtext object is disabled, it doesn't respond to the user at all.

Parameters

ObjectName

(string) The name of the richtext object.

Returns

(boolean) True if the richtext object is enabled, false if it is disabled. If an error occurs, false will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


RichText.IsVisible

boolean RichText.IsVisible (

string ObjectName )

Description

Returns true if a specific richtext object is visible, and false if it isn't.

Parameters

ObjectName

(string) The name of the richtext object.

Returns

(boolean) True if the richtext object is visible, false if it's invisible. If an error occurs, false will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


RichText.LoadFromFile

RichText.LoadFromFile (

string ObjectName,

string Filename )

Description

Loads text from an RTF file into a richtext object.

Parameters

ObjectName

(string) The name of the richtext object.

Filename

(string) The full path to the rich text (RTF) file.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


RichText.Paste

RichText.Paste (

string ObjectName )

Description

Inserts the contents of the clipboard into a richtext object.

Parameters

ObjectName

(string) The name of the richtext object.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


RichText.SaveToFile

RichText.SaveToFile (

string ObjectName,

string Filename )

Description

Saves the current text in a richtext object to an RTF file.

Parameters

ObjectName

(string) The name of the richtext object.

Filename

(string) The full path to the rich text (RTF) file.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


RichText.ScrollLines

RichText.ScrollLines (

string ObjectName,

number Lines )

Description

Scrolls the text in a richtext object.

Parameters

ObjectName

(string) The name of the richtext object.

Lines

(number) The number of lines to scroll. This can be a positive or negative value.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


RichText.ScrollToLine

RichText.ScrollToLine (

string ObjectName,

number Line )

Description

Scrolls the text to a specific line in a richtext object.

Parameters

ObjectName

(string) The name of the richtext object.

Line

(number) The specific line to scroll to in the richtext object, or -1 to scroll to the end.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


RichText.SetEnabled

RichText.SetEnabled (

string ObjectName,

boolean Enabled = true )

Description

Sets the enabled/disabled state of a richtext object.

Parameters

ObjectName

(string) The name of the richtext object.

Enabled

(boolean) Whether to make the richtext object enabled or disabled:

VALUE | DESCRIPTION
true | Enabled. (Default)
false | Disabled.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


RichText.SetParagraphFormat

RichText.SetParagraphFormat (

string ObjectName,

table ParagraphFormat )

Description

Sets the paragraph format of the current selection in a richtext object.

Parameters

ObjectName

(string) The name of the richtext object.

ParagraphFormat

(table) A table containing the paragraph settings you want to modify in the richtext object, indexed by the following items.

Note: The functionality of some of the items may be depend on the version of the rich edit control available on the user's system.

KEY

TYPE

DESCRIPTION

Bulleted

boolean

True if the text selection should be bulleted, false if it is not.

StartIndent

number

The left indent of the first line to set in twips. (and all subsequent lines if Offset is 0).

RightIndent

number

The right indent of the text to set, relative to the right margin, in twips.

Offset

number

The indentation of the second and subsequent lines to set, relative to the indentation of the first line, in twips.

Alignment

number

The paragraph alignment to set:
PFA_LEFT (1) - Align paragraphs with the left margin.
PFA_RIGHT (2) - Align paragraphs with the right margin.
PFA_CENTER (3) - Center paragraphs.
PFA_JUSTIFY (4) - Justify paragraphs (Rich Edit 2.0). This value is included for compatibility with TOM interfaces; rich edit controls earlier than Rich Edit 3.0 display the text aligned with the left margin.

Tabs

table

A numerically indexed table of the tab positions to set.

SpaceBefore

number

The size of the spacing above the paragraph to set, in twips.

SpaceAfter

number

The size of the spacing below the paragraph to set, in twips.

LineSpacing

number

The spacing between lines to set, based on the LineSpacingRule defined below.

LineSpacingRule

number

Type of line spacing to set, based on one of the following values:
0 - Single spacing. The LineSpacing item is ignored.

1 - One-and-a-half spacing. The LineSpacing item is ignored.
2 - Double spacing. The LineSpacing item is ignored.
3 - The LineSpacing item specifies the spacing from one line to the next, in twips. However, if LineSpacing specifies a value that is less than single spacing, the control displays single-spaced text.
4 - The LineSpacing item specifies the spacing from one line to the next, in twips. The control uses the exact spacing specified, even if LineSpacing specifies a value that is less than single spacing.
5 - The value of LineSpacing / 20 is the spacing, in lines, from one line to the next. Thus, setting LineSpacing to 20 produces single-spaced text, 40 is double spaced, 60 is triple spaced, and so on.

BorderSpace

number

The space between the border and the paragraph text to set, in twips. This item is included for compatibility with Word; the rich edit control stores the values but does not use them to display text.

BorderWidth

number

The border width to set, in twips.

Borders

number

This item is only included for compatibility, and may not have any visible effect. For a description of this option, see MSDN: PARAFORMAT2 Structure.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


RichText.SetPos

RichText.SetPos (

string ObjectName,

number X,

number Y )

Description

Sets the X and Y pixel coordinates of a richtext object relative to the page or dialog.

Parameters

ObjectName

(string) The name of the richtext object.

X

(number) The new X pixel coordinate (horizontal position) to set for the richtext object. This is the X coordinate of the upper left hand corner of the object's bounding box relative to the page or dialog.

Y

(number) The new Y pixel coordinate (vertical position) to set for the richtext object. This is the Y coordinate of the upper left hand corner of the object's bounding box relative to the page or dialog.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


RichText.SetProperties

RichText.SetProperties (

string ObjectName,

table Properties )

Description

Sets the properties of a richtext object on the page or dialog.

Parameters

ObjectName

(string) The name of the richtext object.

Properties

(table) A table containing the properties you want to modify in the richtext object, indexed by the following items.

KEY

TYPE

DESCRIPTION

Text

string

The text to display in the richtext object. Note: This value will be overridden by any value defined in the RawRTF table item.

RawRTF

string

The raw RTF text to set in the richtext object (this includes the internal formatting.) Note: This value will override any value defined in the Text table item.

VScrollbar

boolean

True if vertical scrollbars should be enabled, false if they should not.

HScrollbar

boolean

True if horizontal scrollbars should be enabled, false if they should not.

Transparent

boolean

True if the background should be transparent, false if it should not.

BackgroundColor

number

The color to set the richtext object background.

Border

number

The type of border surrounding the richtext object to use:

CONSTANT | VALUE | DESCRIPTION
BORDER_NONE | 0 | No border.
BORDER_SUNKEN | 2 | Sunken border.

ReadOrder

number

How text should be displayed in the richtext object:

CONSTANT | VALUE | DESCRIPTION
READ_STANDARD | 0 | Display the characters left to right.
READ_RIGHT_TO_LEFT | 1 | Display the characters right to left.

ReadOnly

boolean

True if the richtext object should be read-only, false if it should not.

AutoDetectURL

boolean

True if URLs should be automatically detected in the object, false if they should not.

ShowContextMenu

boolean

True if a right-click context menu should be shown, false if it should not.

Enabled

boolean

True if the richtext object should be enabled, false if it should not.

Visible

boolean

True if the richtext object should be visible, false if it should not.

X

number

The horizontal position (in pixels) of the top left corner of the richtext object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has an X value of 0.

Y

number

The vertical position (in pixels) of the top left corner of the richtext object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has a Y value of 0.

Width

number

The width (in pixels) to set for the richtext object.

Height

number

The height (in pixels) to set for the richtext object.

TooltipText

string

The mouseover tooltip to set for the richtext object.

ResizeLeft

boolean

True if the left side of the object should move when the application is resized, false if it should not.

ResizeRight

boolean

True if the right side of the object should move when the application is resized, false if it should not.

ResizeTop

boolean

True if the top of the object should move when the application is resized, false if it should not.

ResizeBottom

boolean

True if the bottom of the object should move when the application is resized, false if it should not.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


RichText.SetSelection

RichText.SetSelection (

string ObjectName,

number Start,

number End )

Description

Selects a range of text in a richtext object. This is just like highlighting the text with the mouse.

Parameters

ObjectName

(string) The name of the richtext object.

Start

(number) The character index for the start of the selection. (The first character in a richtext object has an index of 1.)

End

(number) The character index for the end of the selection. (Use -1 to specify the end of the text in the richtext object.)

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


RichText.SetSelectionFormat

RichText.SetSelectionFormat (

string ObjectName,

table CharacterFormat,

boolean ApplyToWord = false )

Description

Sets the character formatting of the current selection in a richtext object.

Parameters

ObjectName

(string) The name of the richtext object.

CharacterFormat

(table) A table containing the format settings you want to modify in the richtext object, indexed by the following items.

Note: Some of the following table items are included only for compatibility with Microsoft Text Object Model (TOM) interfaces; the rich edit control stores the value but does not use it to display text. The functionality of some of the items may also depend on the version of the rich edit control available on the system.

KEY

TYPE

DESCRIPTION

AllCaps

boolean

True to set the selected characters as all capital letters and false to not. This value applies only to versions earlier than Rich Edit 3.0.

AutoBackColor

boolean

True to use the background color of the object's background color for selected text (ignore BackColor), false if BackColor should be used.

AutoColor

boolean

True to use the text color of the objects text color for selected text (ignore TextColor), false if TextColor should be used.

Bold

boolean

True if the selected text should be bolded, false if it should not.

Disabled

boolean

True if characters should be displayed as disabled, false if they should not.

Emboss

boolean

True if the characters should be embossed, false if they should not. (This item has no effect on displayed text in the object.)

Hidden

boolean

True if the characters should be displayed, false if they should not. This item is only supported for Rich Edit 3.0 and later.

Imprint

boolean

True if characters should be displayed as imprinted characters, false if they should not. (This item has no effect on displayed text in the object.)

Italic

boolean

True if characters should be italic, false if they should not.

Link

boolean

True if the selection should contains links, false if it should not.

Outline

boolean

True if characters should be displayed as outlined characters, false if they should not. (This value has no effect on displayed text in the object.)

Protected

boolean

True if the characters should be protected, false if they should not.

Revised

boolean

True if characters should be marked as revised, false if they should not.

Shadow

boolean

True if the characters should be displayed as shadowed characters, false if they should not. (This value has no effect on displayed text in the object.)

SmallCaps

boolean

True if characters should be in small capital letters, false if they should not. (This value has no effect on displayed text in the object.)

StrikeOut

boolean

True if characters should be struck out, false if they should not.

SubScript

boolean

True if the characters should be subscript, false if they should not.

SuperScript

boolean

True if the characters should be superscript, false if they should not.

Underline

boolean

True if the characters should be underlined, false if they should not.

Height

number

The height of the characters to set in twips.

YOffset

number

The character offset from the baseline to set, in twips. If this value is positive, the character is a superscript; if the value is negative, the character is a subscript.

TextColor

number

The text color to set. This item is ignored if AutoColor is set to true.

CharacterSet

number

The character set of the text to use:

CONSTANT | VALUE | DESCRIPTION
ANSI_CHARSET | 0 | ANSI character set.
BALTIC_CHARSET | 186 | Baltic character set.
CHINESEBIG5_CHARSET | 136 | Chinese character set.
DEFAULT_CHARSET | 1 | Default character set.
EASTEUROPE_CHARSET | 238 | Eastern European character set.
GB2312_CHARSET | 134 | GB2312 character set.
GREEK_CHARSET | 161 | Greek character set.
HANGUL_CHARSET | 129 | Hangul character set.
MAC_CHARSET | 77 | MAC character set.
OEM_CHARSET | 255 | OEM character set.
RUSSIAN_CHARSET | 204 | Russian character set.
SHIFTJIS_CHARSET | 128 | Shiftjis character set.
SYMBOL_CHARSET | 2 | Symbol character set.
TURKISH_CHARSET | 162 | Turkish character set.

PitchAndFamily

number

The font family and pitch to use. See MSDN: CHARFORMAT2 Structure for more information.

FaceName

string

The name of the font to use in the selected text.

Weight

number

The weight of the font to use (how 'dark' the text is):

CONSTANT | VALUE | DESCRIPTION
FW_DONTCARE | 0 | Font weight not specified.
FW_THIN | 100 | Font weight 'thin'.
FW_EXTRALIGHT | 200 | Font weight 'extra-light'.
FW_LIGHT | 300 | Font weight 'light'.
FW_NORMAL | 400 | Font weight 'normal'.
FW_MEDIUM | 500 | Font weight 'medium'.
FW_SEMIBOLD | 600 | Font weight 'semi-bold'.
FW_BOLD | 700 | Font weight 'bold'.
FW_EXTRABOLD | 800 | Font weight 'extra bold'.
FW_HEAVY | 900 | Font weight 'heavy'.

Spacing

number

The horizontal space between letters to use, in twips. (This value has no effect on displayed text in the object. It is included for compatibility with Microsoft WindowsText Object Model (TOM) interfaces.)

BackColor

number

The background color to set. This value is ignored if AutoBackColor is set to true.

LCID

number

The locale identifier of the selected text to use. (This value has no effect on displayed text in the object.) See MSDN: CHARFORMAT2 Structure for more information.

Kerning

number

The value of the font size, above which to kern the character (Height). (This value has no effect on displayed text in the object. It is included for compatibility with Microsoft WindowsText Object Model (TOM) interfaces.)

Style

number

The character style handle. (This value has no effect on displayed text in the object. It is included for compatibility with Microsoft WindowsText Object Model (TOM) interfaces.)

UnderlineType

number

The underline type to use specified by one of the following values:
CFU_CF1UNDERLINE (255) - Contains a CHARFORMAT type of underline.
CFU_UNDERLINENONE (0) - No underline. This is the default.
CFU_UNDERLINE (1) - Solid underlined text.
CFU_UNDERLINEWORD (2) - Underline words only. The object displays the text with a solid underline.

CFU_UNDERLINEDOUBLE (3) - Double-underlined text. The object displays the text with a solid underline.
CFU_UNDERLINEDOTTED (4) - Dotted underlined text. For versions earlier than Rich Edit 3.0, text is displayed with a solid underline.

Animation

number

The text animation type to use. (This value has no effect on displayed text in the object. It is included for compatibility with TOM interfaces.)

RevAuthor

number

An index that identifies the author making a revision. The rich edit control uses different text colors for each different author index.

ApplyToWord

(boolean) Whether to apply the formatting to any words the selection covers (or the insertion point is in), or to apply the formatting only to the selected characters (or to new characters entered at the insertion point if nothing is selected).

VALUE | DESCRIPTION
true | Apply formatting to any words the selection covers.
false | Only apply formatting to selected characters. (Default)

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


RichText.SetSize

RichText.SetSize (

string ObjectName,

number Width,

number Height )

Description

Sets the size of a richtext object.

Parameters

ObjectName

(string) The name of the richtext object.

Width

(number) The new width of the richtext object in pixels.

Height

(number) The new height of the richtext object in pixels.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


RichText.SetText

RichText.SetText (

string ObjectName,

string Text,

boolean RawRTF = true )

Description

Sets the text displayed in a richtext object.

Parameters

ObjectName

(string) The name of the richtext object to set.

Text

(string) The text to display.

RawRTF

(boolean) Whether the text contains RTF formatting codes, or is regular unformatted text.

VALUE | DESCRIPTION
true | Text contains RTF formatting codes. (Default)
false | Text is regular unformatted text.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


RichText.SetVisible

RichText.SetVisible (

string ObjectName,

boolean Visible = true )

Description

Sets the visibility of a richtext object.

Parameters

ObjectName

(string) The name of the richtext object.

Visible

(boolean) Whether to make the richtext object visible or invisible:

VALUE | DESCRIPTION
true | Visible. (Default)
false | Invisible.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


RichText.Undo

RichText.Undo (

string ObjectName )

Description

Reverses (undoes) the last editing operation in a richtext object.

Parameters

ObjectName

(string) The name of the richtext object.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Service.Continue

Service.Continue (

string DisplayName,

string KeyName = "" )

Description

Continues a specific service that has been previously paused.

Parameters

DisplayName

(string) The display name of the service that you wish to continue.

KeyName

(string) The key name of the service that you wish to continue.

Note: The key name is only required if no service matches the display name.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Service.Create

Service.Create (

string Filename,

string DisplayName = "Service1",

string KeyName = "",

number ServiceType = SERVICE_WIN32_OWN_PROCESS,

boolean AllowDesktopInteraction = false,

number StartType = SERVICE_DEMAND_START,

number ErrorControl = SERVICE_ERROR_NORMAL,

string LoadOrderGroup = "",

number GroupTag = nil,

table Dependencies = nil,

string ServiceStartName = "",

string Password = "" )

Description

Creates a new service on the local system.

Parameters

Filename

(string) The fully qualified path to the service binary file, with or without arguments.

DisplayName

(string) A string that user interface programs will use to identify the service.

KeyName

(number) A string that names the service to install. The maximum string length is 256 characters to be a valid Windows key name.

Note: The service control manager database preserves the case of the characters, but service name comparisons are always case insensitive. Forward-slash (/) and back-slash (\) are invalid service name characters.

ServiceType

(number) The type of service. This can be one of the following:

CONSTANT | VALUE | DESCRIPTION
SERVICE_WIN32_OWN_PROCESS | 0 | Service that runs in its own process.
SERVICE_WIN32_SHARE_PROCESS | 1 | Service that shares a process with other services.
SERVICE_KERNEL_DRIVER | 2 | Driver service.
SERVICE_FILE_SYSTEM_DRIVER | 3 | File system driver service.

AllowDesktopInteraction

(boolean) Whether to allow the service process to interact with the desktop. If set to true, the service must run in the "LocalSystem" account. This can be done by setting the ServiceStartName to "LocalSystem".

StartType

(number) The way in which the service will be started. This can be one of the following:

CONSTANT | VALUE | DESCRIPTION
SERVICE_BOOT_START | 0 | A device driver started by the system loader. This value is valid only for driver services.
SERVICE_SYSTEM_START | 1 | A device driver started by the IoInitSystem function. This value is valid only for driver services.
SERVICE_AUTO_START | 2 | A service started automatically by the service control manager during system startup.
SERVICE_DEMAND_START | 3 | A service started by the service control manager when a process calls the StartService function.
SERVICE_DISABLED | 4 | A service that cannot be started. Attempts to start this service will result in a Windows error.

ErrorControl

(number) The severity of the error if this service fails to start during startup. Can be one of the following:

CONSTANT | VALUE | DESCRIPTION
SERVICE_ERROR_IGNORE | 0 | The startup program logs the error but continues the startup operation.
SERVICE_ERROR_NORMAL | 1 | The startup program logs the error and puts up a message box pop-up but continues the startup operation.
SERVICE_ERROR_SEVERE | 2 | The startup program logs the error. If the last-known-good configuration is being started, the startup operation continues. Otherwise, the system is restarted with the last-known-good configuration.
SERVICE_ERROR_CRITICAL | 3 | The startup program logs the error, if possible. If the last-known-good configuration is being started, the startup operation fails. Otherwise, the system is restarted with the last-known good configuration.

LoadOrderGroup

(string) The name of the load ordering group of which this service is a member. Enter an empty string "" if it does not belong to a group.

GroupTag

(number) The tag value. This value is unique to the load order group. Tags are only evaluated for driver services that have SERVICE_BOOT_START or SERVICE_SYSTEM_START start types.

Dependencies

(table) A numerically indexed table containing the names of services or load order groups that must be loaded before this service can start.

ServiceStartName

(string) A string that names the account under which the service should run. If the service type is SERVICE_WIN32_OWN_PROCESS, use an account name in the form "DomainName\\UserName". The service process will be logged on as this user. If the account belongs to the built-in domain, you can specify ".\\UserName". If this parameter is empty (""), the service create uses the LocalSystem account. If the AllowDesktopInteraction option is set to true, the service must run in the "LocalSystem" account.

Password

(string) The password for the service. Specify an empty string "" if the account has no password or if the service runs in the LocalService, NetworkService, or LocalSystem account. Passwords are ignored for driver services.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Service.Delete

Service.Delete (

string DisplayName,

string KeyName = "" )

Description

Deletes a specific service from the service database on the user's system.

Parameters

DisplayName

(string) The display name of the service that you wish to delete.

KeyName

(string) The key name of the service that you wish to delete.

Note: The key name is only required if no service matches the display name.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Service.Pause

Service.Pause (

string DisplayName,

string KeyName = "" )

Description

Pauses a specific service on the local system.

Parameters

DisplayName

(string) The display name of the service that you wish to pause.

KeyName

(string) The key name of the service that you wish to pause.

Note: The key name is only required if no service matches the display name.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Service.Query

number Service.Query (

string DisplayName,

string KeyName = "" )

Description

Queries the system for the status of a specific service.

Parameters

DisplayName

(string) The display name of the service that you wish to query.

KeyName

(string) The key name of the service that you wish to query.

Returns

(number) A number containing the status of the specific service. Can be one of the following:

CONSTANT | VALUE | DESCRIPTION
SERVICE_NOT_FOUND | 0 | The service was not found.
SERVICE_STOPPED | 1 | The service is not running.
SERVICE_START_PENDING | 2 | The service is starting.
SERVICE_STOP_PENDING | 3 | The service is stopping.
SERVICE_RUNNING | 4 | The service is running.
SERVICE_CONTINUE_PENDING | 5 | The service continue is pending.
SERVICE_PAUSE_PENDING | 6 | The service pause is pending.
SERVICE_PAUSED | 7 | The service is paused.
SERVICE_ERROR | -1 | Returned on error.

You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the action editor, you can use this field to specify a variable that the return value will be stored in.


Service.Start

Service.Start (

string DisplayName,

string KeyName = "",

table Arguments = nil )

Description

Starts a specific service on the user's system.

Parameters

DisplayName

(string) The display name of the service that you wish to start.

KeyName

(string) The key name of the service that you wish to start.

Note: The key name is only required if no service matches the display name.

Arguments

(table) A numerically index table of arguments to be passed to the service when it starts.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Service.Stop

Service.Stop (

string DisplayName,

string KeyName = "",

number WaitTime = 0 )

Description

Stops a specific service on the user's system.

Parameters

DisplayName

(string) The display name of the service that you wish to stop.

KeyName

(string) The key name of the service that you wish to stop.

Note: The key name is only required if no service matches the display name.

WaitTime

(number) The maximum time to wait for the service to stop (in seconds).

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Shell.CreateShortcut

Shell.CreateShortcut (

string Folder,

string Description,

string Target,

string CmdLine = "",

string WorkingFolder = "",

string IconPath = "",

number IconIndex = 0,

number WindowMode = SW_SHOWNORMAL,

table HotKey = nil,

string Comment = "",

number StartPinOption = START_OPTION_DEFAULT )

Description

Creates a shortcut on the user's system.

Note: If the target drive does not exist or cannot be accessed, the shortcut path folder will be truncated to eight characters. For more information, see Microsoft article Q263324.

Parameters

Folder

(string) The path to the folder where the shortcut will be created.

Description

(string) The label that will be given to the shortcut. This is the shortcut's "name"—i.e., what the user will see.

Target

(string) The full path and name of the file or folder that the shortcut will point to.

CmdLine

(string) The command line arguments (if any) that will be passed to the file linked by the shortcut.

WorkingFolder

(string) The working directory that will be used for the file pointed to by the shortcut.

IconPath

(string) The full path to a file containing the icon you want to use. The most common types are icon files (.ico) and executables (.exe). If no icon path is specified, the icon will be taken from the target file instead.

IconIndex

(number) The zero-based index describing which icon to use in the file. For example, an icon index of 2 means it will use the third icon in the file. If there is only one icon in the file, or if you want to use the first icon found, enter 0.

WindowMode

(number) The run mode to use when it launches the file. Choose from:

CONSTANT | VALUE | DESCRIPTION
SW_SHOWNORMAL | 1 | The file will launch normally.
SW_MAXIMIZE | 3 | The file will launch maximized.
SW_SHOWMINNOACTIVE | 7 | The file will launch minimized.

HotKey

(table) A table containing an optional system-wide key combination that will launch the shortcut, indexed by the following keys:

KEY | TYPE | DESCRIPTION
shift | boolean | Whether the "shift" modifier key was held down as part of the key combination. The value true means it was held down and false means it wasn't. This value can be accessed using tb.shift.
ctrl | boolean | Whether the "ctrl" modifier key was held down as part of the key combination. The value true means it was held down and false means it wasn't. This value can be accessed using tb.ctrl.
alt | boolean | Whether the "alt" modifier key was held down as part of the key combination. The value true means it was held down and false means it wasn't. This value can be accessed using tb.alt.
keycode | number | The virtual key code of the key that was pressed. This value can be accessed using tb.keycode.

Note: If you do not want to assign a hotkey for the shortcut, nil should be passed (nil is the default value).

Comment

(string) An optional string to display in the "comment" section of the shortcut.

StartPinOption

(number) This setting controls whether or not this shortcut will be pinned to the Windows 8 Start screen if it was created under the Start menu. Choose from the following options:

Note: This setting only affects shortcuts created in the Start menu on Windows 8 / Windows Server 2012 operating systems. As of Windows 8.1 and later, developers are no longer able to pin shortcuts to the user's Start Screen. This decision by Microsoft was to let the user control what they want on their Start Screen given their preference instead of the decision being forced upon them by application developers.

CONSTANT | VALUE | DESCRIPTION
START_OPTION_DEFAULT | 0 | Use the default Windows behavior for this Start menu shortcut, based on the target file's type. In general all Start menu shortcuts that point to executables will be pinned to the Windows 8 Start screen by default.
START_OPTION_NO_PIN | 1 | Don't pin the Start menu shortcut to the Windows 8 Start screen. This allows you to remove any secondary pinned shortcuts.
START_OPTION_PIN | 2 | Pin the Start menu shortcut to the Windows 8 Start screen. This option allows you to pin Start menu shortcuts that point to non-executables such as help files (however Microsoft discourages that).

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Shell.DeleteShortcut

Shell.DeleteShortcut (

string Folder,

string Description )

Description

Removes a shortcut from the user's system.

Parameters

Folder

(string) The path to the folder where the shortcut is located.

Description

(string) The shortcut's description. This is the name (or label) that appears on the shortcut.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Shell.Execute

number Shell.Execute (

string Filename,

string Verb = "open",

string Arguments = "",

string WorkingFolder = "",

number WindowMode = SW_SHOWNORMAL,

boolean WaitForReturn = false )

Description

Performs a shell execute on a target with a given shell verb.

Parameters

Filename

(string) The file or folder path to use.

Verb

(string) The verb to use in the shell command. Choose from:

VERB | DESCRIPTION
open | Opens the file. This is the same as if you double clicked on the file in Windows.
explore | Opens the file/folder in Windows Explorer.
edit | Opens the file for editing using the associated editor.
print | Uses the associated viewer to print the file.

Note: If you set this verb to an empty string (""):
- For Windows XP and later systems, the default verb is used if available. If not, the "open" verb is used. If neither verb is available, the system uses the first verb listed in the registry.

Arguments

(string) The command line arguments to pass to the file.

WorkingFolder

(string) The working directory that will be used for the file.

Note: This sets the current directory for the operation to something other than the folder that the file is in. Normally, you can just leave it blank.

WindowMode

(number) The window mode to use. Choose from:

CONSTANT | VALUE | DESCRIPTION
SW_SHOWNORMAL | 1 | The file will launch normally.
SW_MAXIMIZE | 3 | The file will launch maximized.
SW_MINIMIZE | 6 | The file will launch minimized.
SW_HIDE | 0 | The file will launch hidden.

WaitForReturn

(boolean) Whether the application will wait until the executable has exited before continuing:

VALUE | DESCRIPTION
true | Wait.
false | Don't wait. (Default)

Returns

(number) The process return code if the WaitForReturn parameter is set to true. If WaitForReturn is set to false 0 is returned. You can use Application.GetLastError to determine whether this action failed, and why.

Note: If the specified process has not terminated, the termination status returned is STILL_ACTIVE. If the process has terminated, the termination status returned may be one of the following:

The exit value specified in the ExitProcess or TerminateProcess function.
The return value from the main or WinMain function of the process.
The exception value for an unhandled exception that caused the process to terminate.


Shell.GetFolder

string Shell.GetFolder (

number Type )

Description

Returns the path to a common folder on the local system, such as "My Documents" or the user's Startup folder.

Parameters

Type

(number) The folder that you want. Choose from:

CONSTANT | VALUE | DESCRIPTION
SHF_FONTS | 20 | The path to the user’s font directory (e.g. "C:\Windows\Fonts").
SHF_MYMUSIC | 13 | The path to the user's My Music folder. For example "C:\Documents and Settings\User\My Documents\My Music."
SHF_MYMUSIC_COMMON | 53 | The path to the All Users profile My Music folder, for example "C:\Documents and Settings\All Users\Documents\My Music." Only available on Windows XP/Vista or later.
SHF_MYPICTURES | 39 | The path to the user's My Pictures folder. For example "C:\Documents and Settings\username\My Documents\My Pictures."
SHF_MYPICTURES_COMMON | 54 | The path to the All User profile My Pictures folder, for example "C:\Documents and Settings\All Users\Documents\My Pictures." Only available on Windows XP/Vista or later.
SHF_MYVIDEOS | 14 | The path to the user's My Videos folder. For example "C:\Documents and Settings\username\My Documents\My Videos." Only available on Windows XP/Vista or later.
SHF_MYVIDEOS_COMMON | 55 | The path to the All User profile My Videos folder. For example "C:\Documents and Settings\All Users\Documents\My Videos." Only available on Windows XP/Vista or later.
SHF_DESKTOP | 16 | The path to the user's Desktop directory. On XP/Vista or later, this is the path from the per-user profile.
SHF_DESKTOP_COMMON | 25 | The path to the user's Desktop folder. On XP/Vista or later, this is the path from the All Users profile.
SHF_STARTMENU | 11 | The path to the user's Start Menu folder. On XP/Vista or later, this is the path from the per-user profile.
SHF_STARTMENU_COMMON | 22 | The path to the user's Start Menu folder. On Windows XP/Vista or later, this is the path from the All Users profile.
SHF_STARTMENUPROGRAMS | 2 | The path to the Programs folder in the user's Start menu. On Windows XP/Vista or later this is the path from the per-user profile.
SHF_STARTMENUPROGRAMS_COMMON | 23 | The path to the Programs folder in the user's Start menu. On Windows XP/Vista or later this is the path from the All Users profile.
SHF_STARTUP | 7 | The path to the user's Startup folder. On Windows XP/Vista or later this is the path from the per-user profile.
SHF_STARTUP_COMMON | 24 | The path to the user's Startup folder. On XP/Vista or later this is the path from the All Users profile.
SHF_COMMONFILES | 43 | The path to the user's Common Files folder. Typically, this is something like C:\Program Files\Common Files.
SHF_PROGRAMFILES | 38 | The user's Program Files folder. Typically, this is something like C:\Program Files.
SHF_MYDOCUMENTS | 5 | The path to the user's personal ("My Documents") folder on their system. Usually this is something like "C:\Documents and Settings\YourName\My Documents" on Windows XP, and "C:\Users\YourName\Documents" on Windows Vista or later.
SHF_COMMON_DOCUMENTS | 46 | The path to the documents folder common to all users. Usually this is something like "C:\Documents and Settings\All Users\Documents."
SHF_APPLICATIONDATA | 26 | The path to the Application Data folder on the user's system. On Windows XP, this is the path from the per-user profile. Typically, this is something like "C:\Documents and Settings\YourName\Application Data." On Windows Vista or later, this is something like "C:\Users\YourName\AppData\Roaming."
SHF_APPLICATIONDATA_LOCAL | 28 | The path to the local (nonroaming) Application Data folder on the user's system. On Windows XP, this is the path from the per-user profile. Typically, this is something like "C:\Documents and Settings\YourName\Local Settings\Application Data." On Windows Vista or later, this is something like "C:\Users\YourName\AppData\Local."
SHF_APPLICATIONDATA_COMMON | 35 | The path to the Application Data folder on the user's system. On Windows XP/Vista or later, this is the path from the All Users profile.

Returns

(string) The path to the folder on the user's system that was specified in Type. If this action fails, a blank string "" is returned. You can use Application.GetLastError to determine whether this action failed, and why.


SlideShow.AddSlide

number SlideShow.AddSlide (

string ObjectName,

string FilePath,

number Position = -1 )

Description

Adds a slide to a slideshow object.

Parameters

ObjectName

(string) The name of the slideshow object.

FilePath

(string) The path to the image file you want to add. Click the browse button to select a file.

Note: The following image formats are supported in the slideshow object: JPG, BMP, TIFF, GIF, PhotoCD, Photoshop, WBMP, PNG, PCX, PAX, TLA, WMF, EMF, APM and TGA.

Position

(number) The 1-based position to add the new slide. Use -1 to add the slide to the end of the object's slideshow list.

Returns

(number) The 1-based position where the slide was added. If an error occurs, -1 is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


SlideShow.DeleteSlide

SlideShow.DeleteSlide (

string ObjectName,

number Position )

Description

Deletes a slide from a slideshow object.

Parameters

ObjectName

(string) The name of the slideshow object.

Position

(number) The 1-based position of the slide you want to remove from the object. Use -1 to remove all slides.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


SlideShow.FillFromFolder

SlideShow.FillFromFolder (

string ObjectName,

string FolderPath,

boolean EmptyFirst = false,

boolean Recurse = false )

Description

Fills a slideshow object's slides from a folder.

Parameters

ObjectName

(string) The name of the slideshow object.

FolderPath

(string) The folder containing images to add to the slideshow object.

Note: The following image formats are looked for when adding slides in the slideshow object: JPG, BMP, TIFF, GIF, PhotoCD, Photoshop, WBMP, PNG, PCX, PAX, TLA, WMF, EMF, APM and TGA.

EmptyFirst

(boolean) Whether the slideshow object should be emptied first:

VALUE | DESCRIPTION
true | Empty the slideshow object before adding slides.
false | Don't empty the slideshow object. (Default)

Recurse

(boolean) Whether to recurse into subfolders when adding slides:

VALUE | DESCRIPTION
true | Recurse into subfolders when adding slides.
false | Don't recurse. Just add from the folder's root. (Default)

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


SlideShow.GetCurrentSlide

number SlideShow.GetCurrentSlide (

string ObjectName )

Description

Returns the index of the current slide in a slideshow object.

Parameters

ObjectName

(string) The name of the slideshow object.

Returns

(number) The 1-based index of the current slide in the slideshow object. If an error occurs, or there are no slides in the object, -1 is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


SlideShow.GetImagePath

string SlideShow.GetImagePath (

string ObjectName,

number Position )

Description

Gets the path to an image in a slideshow object.

Parameters

ObjectName

(string) The name of the slideshow object.

Position

(number) The 1-based position of the slide to get the path of.

Returns

(string) A string containing the path to the specified slideshow image. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


SlideShow.GetPos

table SlideShow.GetPos (

string ObjectName )

Description

Returns the X and Y page or dialog coordinates of a slideshow object in pixels. This coordinate refers to the upper left hand corner of the object's bounding box relative to the page or dialog.

Note: The upper left hand corner of a page or dialog has X and Y coordinates of 0.

Parameters

ObjectName

(string) The name of the slideshow object.

Returns

(table) A table containing the object's current coordinates, indexed by values "X" and "Y". If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


SlideShow.GetProperties

table SlideShow.GetProperties (

string ObjectName )

Description

Returns a table containing the properties of a slideshow object.

Parameters

ObjectName

(string) The name of the slideshow object.

Returns

(table) A table containing the slideshow object's properties, indexed by the following keys:

KEY

TYPE

DESCRIPTION

ObjectName

string

The name of the slideshow object.

ImageFiles

table

A numerically indexed table containing the paths to the image files in the slideshow object.

BackgroundStyle

number

The style of the background defined by one of the following values:

CONSTANT | VALUE | DESCRIPTION
BG_SOLID | 0 | The background is the solid color defined in BackgroundColor.
BG_TRANSPARENT | 1 | The background is transparent.

BackgroundColor

number

The background color of the object.

BorderStyle

number

The border style defined by one of the following values:

CONSTANT | VALUE | DESCRIPTION
BORDER_NONE | 0 | The object contains no border.
BORDER_SOLID | 1 | The border is the solid color defined in BorderColor.

BorderColor

number

The border color of the object.

Interval

number

The duration each slide is set to show (in milliseconds).

AutoStart

boolean

True if the slideshow is set to start automatically, false if it is not.

ResizeMode

number

The resize mode for the slides defined by one of the following values:

CONSTANT | VALUE | DESCRIPTION
PROPORTIONAL | 0 | The image is resized so it fits inside the area defined by the object's bounding box. Tip: See NoEnlarge below.
STRETCH | 1 | The image is stretched to fill the entire area defined by the object's bounding box.
CROP | 2 | If the slide dimensions are larger than the object's dimensions, the slide will be cropped.

NoEnlarge

boolean

True if the image will be centered if it is smaller than the object dimensions when ResizeMode = PROPORTIONAL, false if it will be resized proportionally to fit the object.

Loop

boolean

True if the slideshow will begin playing from the beginning again whenever the slideshow reaches the end, or false if not.

Note: If this item is True, the object's On Finished event will not be fired.

Shuffle

boolean

True if the slides will play in random order, false if they will play in the order defined at design-time.

Transitions

boolean

True if a transition effect will be shown between slides, false if it will not.

Enabled

boolean

True if the slideshow object is enabled, false if it is not.

Visible

boolean

True if the slideshow object is visible, false if it is not.

X

number

The horizontal position (in pixels) of the top left corner of the object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has an X value of 0

Y

number

The vertical position (in pixels) of the top left corner of the object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has a Y value of 0

Width

number

The width (in pixels) of the slideshow object.

Height

number

The height (in pixels) of the slideshow object.

TooltipText

string

The mouseover tooltip of the slideshow object.

Cursor

number

The mouse cursor that will be displayed when the mouse is over the slideshow object:

CONSTANT | VALUE | DESCRIPTION
CURSOR_ARROW | 0 | Standard mouse arrow cursor.
CURSOR_HAND | 1 | Hand cursor.
CURSOR_BLACK_ARROW | 2 | Black arrow cursor.
CURSOR_CROSSHAIR | 3 | Crosshair cursor.
CURSOR_EXPLORE | 4 | Explore cursor.
CURSOR_HELP | 5 | Help cursor.
CURSOR_MAGNIFY | 6 | Magnify cursor.
CURSOR_MEDIA | 7 | Media cursor.
CURSOR_MONEY | 8 | Money cursor.
CURSOR_NOTEPAD | 9 | Notepad cursor.
CURSOR_PENCIL | 10 | Pencil cursor.
CURSOR_PRINTER | 11 | Printer cursor.
CURSOR_SPEAKER | 12 | Speaker cursor.
CURSOR_UP_ARROW | 13 | Up arrow cursor.

ResizeLeft

boolean

True if the left side of the object will move when the application is resized, false if it is not.

ResizeRight

boolean

True if the right side of the object will move when the application is resized, false if it is not.

ResizeTop

boolean

True if the top of the object will move when the application is resized, false if it is not.

ResizeBottom

boolean

True if the bottom of the object will move when the application is resized, false if it is not.

HighlightSound

number

The type of sound that will be played when the mouse moves over the slideshow object.

CONSTANT | VALUE | DESCRIPTION
SND_NONE | 0 | No highlight sound.
SND_STANDARD | 1 | Standard highlight sound.
SND_CUSTOM | 2 | Custom highlight sound.

HighlightSoundFile

string

The path to the slideshow object's custom highlight sound file. If the slideshow object does not use a custom sound, this value will be an empty string ("").

ClickSound

number

The type of sound that will be played when the mouse clicks the slideshow object.

CONSTANT | VALUE | DESCRIPTION
SND_NONE | 0 | No highlight sound.
SND_STANDARD | 1 | Standard highlight sound.
SND_CUSTOM | 2 | Custom highlight sound.

ClickSoundFile

string

The path to the slideshow object's custom click sound file. If the slideshow object does not use a custom sound, this value will be an empty string ("").

If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


SlideShow.GetSize

table SlideShow.GetSize (

string ObjectName )

Description

Returns the pixel dimensions of a slideshow object.

Parameters

ObjectName

(string) The name of the slideshow object.

Returns

(table) A table containing the object's pixel dimensions, indexed by values "Width" and "Height". If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


SlideShow.GetSlideCount

number SlideShow.GetSlideCount (

string ObjectName )

Description

Returns the number of slides in a slideshow object.

Parameters

ObjectName

(string) The name of the slideshow object.

Returns

(number) The number of slides in a slideshow object. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


SlideShow.GoToSlide

SlideShow.GoToSlide (

string ObjectName,

number Position )

Description

Navigate to a specific slide in a slideshow object.

Parameters

ObjectName

(string) The name of the slideshow object.

Position

(number) The 1-based position of the slide to navigate to.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


SlideShow.IsEnabled

boolean SlideShow.IsEnabled (

string ObjectName )

Description

Returns true if a specific slideshow object is enabled, or false if it's disabled.

Note: When a slideshow object is disabled, it doesn't respond to the user at all.

Parameters

ObjectName

(string) The name of the slideshow object.

Returns

(boolean) True if the slideshow object is enabled, false if it is disabled. If an error occurs, false will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


SlideShow.IsVisible

boolean SlideShow.IsVisible (

string ObjectName )

Description

Returns true if a specific slideshow object is visible, and false if it isn't.

Parameters

ObjectName

(string) The name of the slideshow object.

Returns

(boolean) True if the slideshow object is visible, false if it's invisible. If an error occurs, false will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


SlideShow.Navigate

SlideShow.Navigate (

string ObjectName,

number Position )

Description

Navigates to a slide in a slideshow object.

Parameters

ObjectName

(string) The name of the slideshow object.

Position

(number) The position to navigate to in the object. Choose from one of the following values:

CONSTANT | VALUE | DESCRIPTION
SLIDESHOW_FIRST | 0 | Navigate to the first slide.
SLIDESHOW_LAST | 1 | Navigate to the last slide.
SLIDESHOW_NEXT | 2 | Navigate to the next slide.
SLIDESHOW_PREV | 3 | Navigate to the previous slide.
SLIDESHOW_RANDOM | 4 | Navigate to a random slide.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


SlideShow.Pause

SlideShow.Pause (

string ObjectName )

Description

Pauses a slideshow object.

Parameters

ObjectName

(string) The name of the slideshow object.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


SlideShow.Play

SlideShow.Play (

string ObjectName )

Description

Plays a slideshow object.

Parameters

ObjectName

(string) The name of the slideshow object.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


SlideShow.SetEnabled

SlideShow.SetEnabled (

string ObjectName,

boolean Enabled = true )

Description

Sets the enabled/disabled state of a slideshow object.

Parameters

ObjectName

(string) The name of the slideshow object.

Enabled

(boolean) Whether to make the slideshow object enabled or disabled:

VALUE | DESCRIPTION
true | Enabled. (Default)
false | Disabled.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


SlideShow.SetPos

SlideShow.SetPos (

string ObjectName,

number X,

number Y )

Description

Sets the X and Y pixel coordinates of a slideshow object relative to the page or dialog.

Parameters

ObjectName

(string) The name of the slideshow object.

X

(number) The new X pixel coordinate (horizontal position) to set for the slideshow object. This is the X coordinate of the upper left hand corner of the object's bounding box relative to the page or dialog.

Y

(number) The new Y pixel coordinate (vertical position) to set for the slideshow object. This is the Y coordinate of the upper left hand corner of the object's bounding box relative to the page or dialog.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


SlideShow.SetProperties

SlideShow.SetProperties (

string ObjectName,

table Properties )

Description

Sets the properties of a slideshow object.

Parameters

ObjectName

(string) The name of the slideshow object.

Properties

(table) A table containing the slideshow object's properties indexed by the following keys:

KEY

TYPE

DESCRIPTION

ImageFiles

table

A numerically indexed table containing the paths to the image files to use in the slideshow object. Any existing images in the object will be cleared before adding these.

BackgroundStyle

number

The style of the background to use, defined by one of the following values:

CONSTANT | VALUE | DESCRIPTION
BG_SOLID | 0 | Use a solid background defined by the color in BackgroundColor.
BG_TRANSPARENT | 1 | Set the background as transparent.

BackgroundColor

number

The background color to use in the object.

BorderStyle

number

The border style to use defined by one of the following values:

CONSTANT | VALUE | DESCRIPTION
BORDER_NONE | 0 | Don't set any border.
BORDER_SOLID | 1 | Use a solid color as the border defined by the color in BorderColor.

BorderColor

number

The border color to use in the object.

Interval

number

The duration to show each slide (in milliseconds).

AutoStart

boolean

True to have the slideshow start automatically, false to not.

ResizeMode

number

The resize mode to use for the slides defined by one of the following values:

CONSTANT | VALUE | DESCRIPTION
PROPORTIONAL | 0 | Resize the image so it fits inside the area defined by the object's bounding box. Tip: See the NoEnlarge setting below.
STRETCH | 1 | Stretch the image to fill the entire area defined by the object's bounding box.
CROP | 2 | If the slide dimensions are larger than the object's dimensions, crop the slide.

NoEnlarge

boolean

True to center the image if it is smaller than the object dimensions when ResizeMode = PROPORTIONAL, false to resize it proportionally to fit the object.

Loop

boolean

True if the slideshow should begin playing from the beginning again whenever the slideshow reaches the end, or false if it should not.

Note: If this item is True, the object's On Finished event will not be fired.

Shuffle

boolean

True if the slides should play in random order, false if they should play in the order defined at design-time.

Transitions

boolean

True if a transition effect should be shown between slides, false if it should not.

Enabled

boolean

True if the slideshow object should be enabled, false if it should not be.

Visible

boolean

True if the slideshow object should be visible, false if it should not be.

X

number

The horizontal position (in pixels) of the top left corner of the slideshow object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has an X value of 0

Y

number

The vertical position (in pixels) of the top left corner of the slideshow object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has a Y value of 0

Width

number

The width (in pixels) of the slideshow object.

Height

number

The height (in pixels) of the slideshow object.

TooltipText

string

The mouseover tooltip of the slideshow object. Tip: If you want a "&" character in the text, you must enter "&&&".

Cursor

number

The mouse cursor that should be displayed when the mouse is over the slideshow object:

CONSTANT | VALUE | DESCRIPTION
CURSOR_ARROW | 0 | Standard mouse arrow cursor.
CURSOR_HAND | 1 | Hand cursor.
CURSOR_BLACK_ARROW | 2 | Black arrow cursor.
CURSOR_CROSSHAIR | 3 | Crosshair cursor.
CURSOR_EXPLORE | 4 | Explore cursor.
CURSOR_HELP | 5 | Help cursor.
CURSOR_MAGNIFY | 6 | Magnify cursor.
CURSOR_MEDIA | 7 | Media cursor.
CURSOR_MONEY | 8 | Money cursor.
CURSOR_NOTEPAD | 9 | Notepad cursor.
CURSOR_PENCIL | 10 | Pencil cursor.
CURSOR_PRINTER | 11 | Printer cursor.
CURSOR_SPEAKER | 12 | Speaker cursor.
CURSOR_UP_ARROW | 13 | Up arrow cursor.

ResizeLeft

boolean

True if the left side of the object should move when the application is resized, false if it should not.

ResizeRight

boolean

True if the right side of the object should move when the application is resized, false if it should not.

ResizeTop

boolean

True if the top of the object should move when the application is resized, false if it should not.

ResizeBottom

boolean

True if the bottom of the object should move when the application is resized, false if it should not.

HighlightSound

number

The type of sound that should be played when the mouse moves over the object.

CONSTANT | VALUE | DESCRIPTION
SND_NONE | 0 | No highlight sound.
SND_STANDARD | 1 | Standard highlight sound.
SND_CUSTOM | 2 | Custom highlight sound.

HighlightSoundFile

string

The path to the object's custom highlight sound file.

ClickSound

number

The type of sound that should be played when the mouse clicks the object.

CONSTANT | VALUE | DESCRIPTION
SND_NONE | 0 | No highlight sound.
SND_STANDARD | 1 | Standard highlight sound.
SND_CUSTOM | 2 | Custom highlight sound.

ClickSoundFile

string

The path to the object's custom click sound file.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


SlideShow.SetSize

SlideShow.SetSize (

string ObjectName,

number Width,

number Height )

Description

Sets the size of a slideshow object.

Parameters

ObjectName

(string) The name of the slideshow object.

Width

(number) The new width of the slideshow object in pixels.

Height

(number) The new height of the slideshow object in pixels.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


SlideShow.SetVisible

SlideShow.SetVisible (

string ObjectName,

boolean Visible = true )

Description

Sets the visibility of a slideshow object.

Parameters

ObjectName

(string) The name of the slideshow object.

Visible

(boolean) Whether to make the slideshow object visible or invisible:

VALUE | DESCRIPTION
true | Visible. (Default)
false | Invisible.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


StatusDlg.GetAutoSize

boolean StatusDlg.GetAutoSize (

)

Description

Returns the status dialog's current auto-size setting.

Note: You can enable or disable the status dialog's resize setting using the StatusDlg.SetAutoSize action.

Parameters

None.

Returns

(boolean) True if the status dialog is set to automatically resize and false if it is not. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


StatusDlg.GetMeterPos

number StatusDlg.GetMeterPos (

)

Description

Returns the status dialog's current status meter position.

Parameters

None.

Returns

(number) The current status meter position. If the action fails, -1 is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


StatusDlg.Hide

StatusDlg.Hide (

)

Description

Hides the built-in status dialog.

Parameters

None.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


StatusDlg.IsCancelled

boolean StatusDlg.IsCancelled (

)

Description

Returns true if the cancel button on the built-in status dialog has been clicked, or false if it hasn't.

Parameters

None.

Returns

(boolean) True if the cancel button has been clicked, false if it hasn't or an error occurs. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


StatusDlg.SetAutoSize

StatusDlg.SetAutoSize (

boolean AutoSize )

Description

Sets whether or not the built-in status dialog will automatically resize when its settings change.

Parameters

AutoSize

(boolean) Whether or not the status dialog will automatically resize when its settings change:

VALUE | DESCRIPTION
true | The status dialog will automatically resize.
false | The status dialog will not resize.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


StatusDlg.SetCancelled

StatusDlg.SetCancelled (

boolean Cancelled )

Description

Sets the clicked/unclicked state of the cancel button on the built-in status dialog.

Note: This affects the value that is returned by the StatusDlg.IsCancelled action.

Parameters

Cancelled

(boolean) Whether or not the cancel button was clicked:

VALUE | DESCRIPTION
true | The button was clicked.
false | The button was not clicked. (Even if it was, just pretend that it wasn't.)

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


StatusDlg.SetMessage

StatusDlg.SetMessage (

string Text )

Description

Sets the main description message on the built-in status dialog.

Parameters

Text

(string) The text you want to display.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


StatusDlg.SetMeterPos

StatusDlg.SetMeterPos (

number Position )

Description

Sets the status meter position on the built-in status dialog.

Parameters

Position

(number) The status meter position to set.

Note: This position must be within the range defined in the StatusDlg.SetMeterRange action. If no range is defined, a default of 0-100 is used.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


StatusDlg.SetMeterRange

StatusDlg.SetMeterRange (

number Begin,

number End )

Description

Sets the range of the built-in status dialog's status meter.

Parameters

Begin

(number) The beginning of the range.

Note: This must be a value greater than, or equal to 0.

End

(number) The ending of the range.

Note: This must be a value greater than 0 and less than 65534.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


StatusDlg.SetStatusText

StatusDlg.SetStatusText (

string Text )

Description

Sets the status text on the built-in status dialog. This is the text that appears right above the status meter.

Parameters

Text

(string) The status text to display.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


StatusDlg.SetTitle

StatusDlg.SetTitle (

string Text )

Description

Sets the title bar text on the built-in status dialog.

Parameters

Text

(string) The title bar text to display.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


StatusDlg.Show

StatusDlg.Show (

number Icon = 0,

boolean Cancelled = false )

Description

Displays the built-in status dialog.

Parameters

Icon

(number) The icon to display on the dialog:

CONSTANT | VALUE | DESCRIPTION
MB_ICONNONE | 0 | None. (Default)
MB_ICONSTOP | 16 | Stop.
MB_ICONQUESTION | 32 | Question.
MB_ICONEXCLAMATION | 48 | Exclamation.
MB_ICONINFORMATION | 64 | Information.

Cancelled

(boolean) Whether the cancel button has been pressed:

VALUE | DESCRIPTION
true | The cancel button has been pressed.
false | The cancel button has not been pressed. (Default)

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


StatusDlg.ShowCancelButton

StatusDlg.ShowCancelButton (

boolean ShowCancel = true,

string ButtonText = "Cancel" )

Description

Shows or hides the cancel button on the built-in status dialog.

Parameters

ShowCancel

(boolean) Whether to show the cancel button:

VALUE | DESCRIPTION
true | The cancel button will be displayed on the status dialog. (Default)
false | The cancel button will not be displayed on the status dialog.

ButtonText

(string) The text to display on the cancel button.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


StatusDlg.ShowProgressMeter

StatusDlg.ShowProgressMeter (

boolean Show = true )

Description

Shows or hides the progress meter on the built-in status dialog.

Parameters

Show

(boolean) Whether to show the progress meter on the built-in status dialog:

VALUE | DESCRIPTION
true | Show the progress meter. (Default)
false | Hide the progress meter.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


String.AbbreviateFilePath

string String.AbbreviateFilePath (

string FilePath,

number Characters )

Description

Returns an abbreviated file path given a maximum number of characters. If the file path exceeds the maximum number of characters, folder names will be removed from the path from the right hand side until its length is less than the specified number of characters. This removal will be replaced by "...".

Note: The filename will never be truncated, therefore if the path including the filename exceeds the maximum number of characters, the abbreviation will be as close as possible.

For example: String.AbbreviateFilePath("C:\\Program Files\\AutoPlay Media Studio X\\Readme.htm",37);

Returns:
C:\Program Files\...\Readme.htm

Because this path is the smallest path that does not exceed 37 characters in length.

Parameters

FilePath

(string) The file path you want to abbreviate.

Characters

(number) The maximum number of characters to use in the abbreviated path.

Returns

(string) A new file path based on the specified number of characters. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


String.Asc

number String.Asc (

string Char )

Description

Returns the ASCII code of a character (in decimal format).

Parameters

Char

(string) The character whose ASCII code you want.

Returns

(number) The ASCII code of the specified character. If the action fails, -1 is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


String.Char

string String.Char (

number ASCII )

Description

Returns the character value of a specific ASCII code (in decimal format).

Parameters

ASCII

(number) The ASCII code of the character you want.

Returns

(string) The character value of the given ASCII code. If an error occurs, a blank string "" is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


String.Compare

number String.Compare (

string Text,

string CompareTo )

Description

Performs a case-sensitive comparison between two strings.

Parameters

Text

(string) The string you want to compare to CompareTo.

CompareTo

(string) The string you want to compare to Text.

Returns

(number) A number representing the result of the comparison:

VALUE | DESCRIPTION
-1 | The string in Text is less than (<) the string in CompareTo.
0 | The string in Text is equal to (=) the string in CompareTo.
1 | The string in Text is greater than (>) the string in CompareTo.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


String.CompareFileVersions

number String.CompareFileVersions (

string Version,

string CompareTo )

Description

Compares two file version strings.

Parameters

Version

(string) The first file version string you want to compare.

CompareTo

(string) The second file version string you want to compare.

Returns

(number) A number representing the result of the comparison:

VALUE | DESCRIPTION
-1 | The string in Version is less than (<) the string in CompareTo.
0 | The string in Version is equal to (=) the string in CompareTo.
1 | The string in Version is greater than (>) the string in CompareTo.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


String.CompareNoCase

number String.CompareNoCase (

string Text,

string CompareTo )

Description

Performs a case-insensitive comparison between two strings.

Parameters

Text

(string) The string you want to compare to CompareTo.

CompareTo

(string) The string you want to compare to Text.

Returns

(number) A number representing the result of the comparison:

VALUE | DESCRIPTION
-1 | The string in Text is less than (<) the string in CompareTo.
0 | The string in Text is equal to (=) the string in CompareTo.
1 | The string in Text is greater than (>) the string in CompareTo.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


String.Concat

string String.Concat (

string StartString,

string EndString )

Description

Adds (or "concatenates") two strings together and returns the result as a new string.

Note: This does not modify either of the source strings.

Parameters

StartString

(string) The string to be added to. This string will be appear at the start of the new string.

EndString

(string) The string to add (append) to the StartString. This string will appear after the StartString.

Returns

(string) The new concatenated string beginning with the StartString and ending with the EndString.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


String.Find

number String.Find (

string SearchString,

string Pattern,

number StartAt = 1,

boolean CaseSensitive = false )

Description

Finds the first occurrence of a sub-string within a string.

Parameters

SearchString

(string) The string to be searched.

Pattern

(string) The sub-string to search for.

StartAt

(number) The position in the SearchString where the search will begin. The default is 1, which is the first character in the string.

CaseSensitive

(boolean) Whether the search will be case sensitive:

VALUE | DESCRIPTION
true | Perform a case-sensitive search.
false | Ignore the character case in the search. (Default)

Returns

(number) The first position in the string where the sub-string was found. If the sub-string cannot be found or an error occurs, -1 is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


String.GetFormattedSize

string String.GetFormattedSize (

number SizeInBytes,

number Format = FMTSIZE_AUTOMATIC,

boolean ShowCommas = true )

Description

Given a number of bytes, returns a formatted string that converts to bytes, KB, MB or GB and optionally inserts commas.

Parameters

SizeInBytes

(number) The number of raw bytes to convert.

Format

(number) The format to return. The following constants are defined:

CONSTANT | VALUE | DESCRIPTION
FMTSIZE_AUTOMATIC | 1 | Automatically choose the best format based on the size.
FMTSIZE_BYTES | 2 | Format the value in bytes.
FMTSIZE_KB | 3 | Format the value in Kilobytes.
FMTSIZE_MB | 4 | Format the value in Megabytes.
FMTSIZE_GB | 5 | Format the value in Gigabytes.

ShowCommas

(boolean) Whether to insert commas into the result (i.e. "63636" becomes "63,636").

Returns

(string) A formatted string given a number of bytes. If an error occurs, a blank string "" is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


String.Left

string String.Left (

string LeftString,

number NumChar )

Description

Creates a new string from the left-most x characters of an existing string.

Parameters

LeftString

(string) The string to copy the characters from.

NumChar

(number) The number of characters to copy from the left hand side of the string.

Returns

(string) A string consisting of the specified number of characters from the beginning of the string. If an error occurs, a blank string "" is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


String.Length

number String.Length (

string LengthString )

Description

Returns the number of characters in a string.

Parameters

LengthString

(string) The string whose length you want.

Returns

(number) The number of characters in the specified string. If an error occurs, -1 is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


String.Lower

string String.Lower (

string ToLower )

Description

Returns an all lowercase version of a string.

Note: The original string will not be modified.

Parameters

ToLower

(string) The string to convert to lowercase.

Returns

(string) The all lowercase version of the specified string. If an error occurs, a blank string "" is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


String.MakePath

string String.MakePath (

table PathParts )

Description

Returns a path based upon the elements in a specified table.

Parameters

PathParts

(table) A table containing each part of the path. The table should be indexed as follows:

KEY | TYPE | VALUE
Drive | string | The drive portion of the path (drive letter followed by a colon, for example, C:).
Folder | string | All of the folders within the path. This must begin with a backslash (for example, \MyFolder1\MyFolder2\).
Filename | string | The filename in the path (for example, "myfile").
Extension | string | The file extension in the path (for example, ".exe").

Returns

(string) A path string composed of the specified table elements. If for some reason, the path cannot be created or an error occurs, a blank string "" is returned. You can use Application.GetLastError to determine whether this action failed, and why.

Note: The path created cannot exceed the Windows maximum path of 260 characters.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


String.Mid

string String.Mid (

string MidString,

number CharStart,

number NumChar )

Description

Returns a specified range of characters from a string.

Parameters

MidString

(string) The string to copy the characters from.

CharStart

(number) The position in the string to start copying from.

NumChar

(number) The number of characters from CharStart to copy. Use -1 to get all of the characters to the end of the string.

Returns

(string) The specified range of characters from the source string. If an error occurs, a blank string "" is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


String.Repeat

string String.Repeat (

string RepeatString,

number NumRepeat )

Description

Repeats a string a given number of times.

Parameters

RepeatString

(string) The string to copy the characters from.

NumRepeat

(number) The number of times to repeat the string.

Returns

(string) A string containing the specified number of copies of the source string. If an error occurs, a blank string "" is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


String.Replace

string String.Replace (

string SearchString,

string Pattern,

string ReplaceString,

boolean CaseSensitive = false )

Description

Searches a string for a sub-string and replaces every occurrence of it with a new sub-string.

Note: The source string will not be modified.

Parameters

SearchString

(string) The string to search.

Pattern

(string) The sub-string to search for.

ReplaceString

(string) The replacement sub-string.

CaseSensitive

(boolean) Whether the search will be case sensitive:

VALUE | DESCRIPTION
true | Perform a case-sensitive search.
false | Ignore the character case in the search. (Default)

Returns

(string) A copy of the source string containing the replacement sub-string. If the sub-string is not found, a copy of the source string is returned.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


String.ReverseFind

number String.ReverseFind (

string SearchString,

string Pattern,

boolean CaseSensitive = false )

Description

Finds the first occurrence of a sub-string within a string by searching it from right to left.

Parameters

SearchString

(string) The string to be searched.

Pattern

(string) The sub-string to search for.

CaseSensitive

(boolean) Whether the search will be case sensitive:

VALUE | DESCRIPTION
true | Perform a case-sensitive search.
false | Ignore the character case in the search. (Default)

Returns

(number) The first position in the string where the sub-string was found, searching from right to left. If the sub-string cannot be found or an error occurs, -1 is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


String.Right

string String.Right (

string RightString,

number NumChar )

Description

Creates a new string from the right-most x characters of an existing string.

Parameters

RightString

(string) The string to copy the characters from.

NumChar

(number) The number of characters to copy from the right hand side of the string.

Returns

(string) A string consisting of the specified number of characters from the end of the string. If an error occurs, a blank string "" is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


String.SplitPath

table String.SplitPath (

string Path )

Description

Splits a path up into it's drive, folders, filename, and file extension and returns a table containing each part.

Parameters

Path

(string) The path that you want to split up.

Returns

(table) A table containing each component of the path, indexed by the following keys:

KEY | TYPE | DESCRIPTION
Drive | string | The drive portion of the path (for example, C:).
Folder | string | All of the folders within the path (for example, \MyFolder1\MyFolder2\).
Filename | string | The filename in the path (for example, "myfile").
Extension | string | The file extension in the path (for example, ".exe").

Note: If any portion of the path is not available, an empty string will be returned ("") as it's value.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


String.ToNumber

number String.ToNumber (

string NumericString )

Description

Converts a numeric string into a numeric value.

Parameters

NumericString

(string) A string containing numeric characters. For example: "10", "3.2", "-5".

Returns

(number) The numeric value of the given numeric string. If the string does not contain numeric characters, 0 will be returned.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


String.TrimLeft

string String.TrimLeft (

string SourceString,

string CharactersToTrim = nil )

Description

Trims specific characters from the left hand side of a source string. Each character in CharactersToTrim will be removed from the left hand side of the SourceString until no characters match.

Note: You can also use this action to remove beginning newlines, space, and tab characters from the string by passing nil as the CharactersToTrim parameter.

Parameters

SourceString

(string) The source string you want to trim.

CharactersToTrim

(string) The string whose characters you want to trim from the source string. The default is nil which can be used to remove beginning newlines, space and tab characters.

Returns

(string) A string with the specified characters removed from the left hand side of the source string. If an error occurs, the source string is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


String.TrimRight

string String.TrimRight (

string SourceString,

string CharactersToTrim = nil )

Description

Trims specific characters from the right hand side of a source string. Each character in CharactersToTrim will be removed from the right hand side of the SourceString until no characters match.

Note: You can also use this action to remove trailing newlines, space, and tab characters from the string by passing nil as the CharactersToTrim parameter.

Parameters

SourceString

(string) The source string you want to trim.

CharactersToTrim

(string) The string whose characters you want to trim from the source string. The default is nil which can be used to remove trailing newlines, space and tab characters.

Returns

(string) A string with the specified characters removed from the right hand side of the source string. If an error occurs, the source string is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


String.Upper

string String.Upper (

string ToUpper )

Description

Returns an all uppercase version of a string.

Note: The original string will not be modified.

Parameters

ToUpper

(string) The string to convert to uppercase.

Returns

(string) The all uppercase version of the specified string. If an error occurs, a blank string "" is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


System.EnumerateProcesses

table System.EnumerateProcesses (

)

Description

Returns a table containing a list of all the currently running processes and the full paths to the files that spawned them.

Parameters

None.

Returns

(table) A table of process IDs and the paths to the files that spawned them. In this table the process IDs are the keys, and the values are the paths to the executables that spawned the processes. If an error occurs, or there were no processes (there should always be processes) nil is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


System.GetDate

string System.GetDate (

number DateType )

Description

Gets the current date in a variety of formats.

Parameters

DateType

(number) Return the date in the format:

CONSTANT | VALUE | DESCRIPTION
DATE_FMT_US | 0 | North American (MM/DD/YYYY)
DATE_FMT_EUROPE | 1 | European (DD/MM/YYYY)
DATE_FMT_ISO | 2 | ISO Date (YYYY-MM-DD)
DATE_FMT_JULIAN | 3 | Julian Date (an integer value representing the number of days since midnight on January 1, 4713 B.C.)
DATE_FMT_MONTH | 4 | Month (MM)
DATE_FMT_DAY | 5 | Day (DD)
DATE_FMT_YEAR | 6 | Year (YYYY)
DATE_FMT_DAYOFWEEK | 7 | Day of the week (1-7)

Returns

(string) The date in the format specified by DateType. If an error occurs, a blank string "" is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


System.GetDefaultLangID

table System.GetDefaultLangID (

)

Description

Returns a table containing the primary and secondary language ID code for the language on the local system.

Parameters

None.

Returns

(table) A table containing the primary and secondary language ID code, indexed by "Primary" and "Secondary." If the language information cannot be determined or an error occurs, nil is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


System.GetDisplayInfo

table System.GetDisplayInfo (

)

Description

Returns a table containing the display information of the user's system.

Parameters

None.

Returns

(table) A table containing the user's display information, indexed by the following keys:

KEY | TYPE | DESCRIPTION
Width | number | The user's screen width in pixels (for example 800).
Height | number | The user's screen height in pixels (for example 600).
ColorDepth | number | The color depth of the user's video display, in bits per pixel. For example, 8 for 256 Colors, 16 for High Color or 32 for True Color.

If this information cannot be determined, or an error occurs, nil is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


System.GetLANInfo

table System.GetLANInfo (

)

Description

Returns a table containing the user's LAN information.

Parameters

None.

Returns

(table) A table containing the user's LAN information indexed by the following categories:

KEY | TYPE | DESCRIPTION
Host | string | The user's local computer name. If the user's system is not connected to a LAN, this value will default to "Unknown" on non-NT systems. NT-based systems always return a host value.
Domain | string | The network domain that the user is logged in to. If the user's system is not connected to a LAN, this value will default to "Unknown " on non-NT systems. NT-based systems always return a domain value.
User | string | The user name that the user is currently logged in as. If the user's system is not connected to a LAN, this value will default to "Unknown."
IP | string | The user's IP address on the local network. If the user's system is not connected to a LAN, this value will default to "Unknown."
NIC | string | The MAC address of the user's NIC (network interface card). If the user's system does not contain a network card, this value will default to "Unknown."

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


System.GetMemoryInfo

table System.GetMemoryInfo (

)

Description

Returns a table containing the system's memory information.

Parameters

None.

Returns

(table) A table containing the system's memory information indexed by the following categories. If the system's memory information could not be accessed, nil is returned.

KEY

TYPE

DESCRIPTION

AvailablePageFile

number

The number of MB available in the paging file. You can access this value using tablename.AvailablePageFile.

AvailableRAM

number

The number of MB of physical memory available. You can access this value using tablename.AvailableRAM.

AvailableVirtual

number

The number of MB of unreserved and uncommitted memory in the user mode portion of the virtual address space of the calling process. You can access this value using tablename.AvailableVirtual.

MemoryLoad

number

A number between 0 and 100 that gives a general idea of current memory utilization, in which 0 indicates no memory use and 100 indicates full memory use. You can access this value using tablename.MemoryLoad.

TotalPageFile

number

The total number of MB that can be stored in the paging file. Note that this number does not represent the actual physical size of the paging file on disk. You can access this value using tablename.TotalPageFile.

TotalRAM

number

The total number of MB of physical memory available to Windows. You can access this value using tablename.TotalRAM.

Note: This value may or may not be the "actual" amount of RAM you have on your system. Usually the value returned will be 2 or 3 MB less than the actual RAM value. Keep this in mind if you are using this option for system requirements.

TotalVirtual

number

The total number of MB that can be described in the user mode portion of the virtual address space of the calling process. You can access this value using tablename.TotalVirtual.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


System.GetMousePosition

table System.GetMousePosition (

boolean ClientCoordinates = true,

number WndHandle = nil )

Description

Returns a table containing the current position of the mouse, either relative to the entire screen (screen coordinates), relative to the application (client coordinates), or relative to some other client window.

Note: Screen coordinates are relative to the top left corner of the screen. Client coordinates are relative to the top left corner of the application's client area (the page), and if WndHandle is specified, it will be relative to the top left corner of that window.

Parameters

ClientCoordinates

(boolean) Whether to get the mouse position relative to the application or another window:

VALUE | DESCRIPTION
true | Return the current position of the mouse relative to the application (client coordinates) or some other window. (Default)
false | Return the current position of the mouse relative to the screen (screen coordinates).

WndHandle

(number) An optional numeric window handle of a window to get the relative mouse position of. This value will only be used if ClientCoordinates is set to true and a valid window handle is passed. If this value is nil the application's client area will be used.

Returns

(table) A table containing the current position of the mouse, either relative to the entire screen (screen coordinates), relative to the application (client coordinates), or to a specific window, indexed by the following keys:

KEY | TYPE | DESCRIPTION
X | number | The horizontal position of the mouse cursor.
Y | number | The vertical position of the mouse cursor.

If this information cannot be determined, or an error occurs, nil is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


System.GetOSName

string System.GetOSName (

)

Description

Gets the name of the operating system the user is running:

Windows 10

Windows Server 10

Windows 8.1

Windows Server 2012 R2

Windows 8

Windows Server 2012

Windows 7

Windows Server 2008 R2

Windows Vista

Windows Server 2008

Windows XP

Windows Server 2003

Parameters

None.

Returns

(string) A string containing the name of the OS the user is running on their system. If this action fails, a blank string "" is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


System.GetOSProductInfo

number System.GetOSProductInfo (

)

Description

Gets the product type for the operating system. Only supported on Windows Vista, Windows Server 2008, or later.

Parameters

None.

Returns

(number) Returns a numeric value representing the product type for the operating system. If the action is not supported, -1 will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

CONSTANT | VALUE | DESCRIPTION
PRODUCT_UNDEFINED | 0 | An unknown product
PRODUCT_ULTIMATE | 1 | Ultimate
PRODUCT_HOME_BASIC | 2 | Home Basic
PRODUCT_HOME_PREMIUM | 3 | Home Premium
PRODUCT_ENTERPRISE | 4 | Enterprise
PRODUCT_HOME_BASIC_N | 5 | Home Basic N
PRODUCT_BUSINESS | 6 | Business
PRODUCT_STANDARD_SERVER | 7 | Server Standard
PRODUCT_DATACENTER_SERVER | 8 | Server Datacenter (full installation)
PRODUCT_SMALLBUSINESS_SERVER | 9 | Windows Small Business Server
PRODUCT_ENTERPRISE_SERVER | 10 | Server Enterprise (full installation)
PRODUCT_STARTER | 11 | Starter
PRODUCT_DATACENTER_SERVER_CORE | 12 | Server Datacenter (core installation)
PRODUCT_STANDARD_SERVER_CORE | 13 | Server Standard (core installation)
PRODUCT_ENTERPRISE_SERVER_CORE | 14 | Server Enterprise (core installation)
PRODUCT_ENTERPRISE_SERVER_IA64 | 15 | Server Enterprise for Itanium-based Systems
PRODUCT_BUSINESS_N | 16 | Business N
PRODUCT_WEB_SERVER | 17 | Web Server (full installation)
PRODUCT_CLUSTER_SERVER | 18 | HPC Edition
PRODUCT_HOME_SERVER | 19 | Windows Storage Server 2008 R2 Essentials
PRODUCT_STORAGE_EXPRESS_SERVER | 20 | Storage Server Express
PRODUCT_STORAGE_STANDARD_SERVER | 21 | Storage Server Standard
PRODUCT_STORAGE_WORKGROUP_SERVER | 22 | Storage Server Workgroup
PRODUCT_STORAGE_ENTERPRISE_SERVER | 23 | Storage Server Enterprise
PRODUCT_SERVER_FOR_SMALLBUSINESS | 24 | Windows Server 2008 for Windows Essential Server Solutions
PRODUCT_SMALLBUSINESS_SERVER_PREMIUM | 25 | Small Business Server Premium
PRODUCT_HOME_PREMIUM_N | 26 | Home Premium N
PRODUCT_ENTERPRISE_N | 27 | Enterprise N
PRODUCT_ULTIMATE_N | 28 | Ultimate N
PRODUCT_WEB_SERVER_CORE | 29 | Web Server (core installation)
PRODUCT_MEDIUMBUSINESS_SERVER_MANAGEMENT | 30 | Windows Essential Business Server Management Server
PRODUCT_MEDIUMBUSINESS_SERVER_SECURITY | 31 | Windows Essential Business Server Security Server
PRODUCT_MEDIUMBUSINESS_SERVER_MESSAGING | 32 | Windows Essential Business Server Messaging Server
PRODUCT_SERVER_FOUNDATION | 33 | Server Foundation
PRODUCT_HOME_PREMIUM_SERVER | 34 | Windows Home Server 2011
PRODUCT_SERVER_FOR_SMALLBUSINESS_V | 35 | Windows Server 2008 without Hyper-V for Windows Essential Server Solutions
PRODUCT_STANDARD_SERVER_V | 36 | Server Standard without Hyper-V
PRODUCT_DATACENTER_SERVER_V | 37 | Server Datacenter without Hyper-V (full installation)
PRODUCT_ENTERPRISE_SERVER_V | 38 | Server Enterprise without Hyper-V (full installation)
PRODUCT_DATACENTER_SERVER_CORE_V | 39 | Server Datacenter without Hyper-V (core installation)
PRODUCT_STANDARD_SERVER_CORE_V | 40 | Server Standard without Hyper-V (core installation)
PRODUCT_ENTERPRISE_SERVER_CORE_V | 41 | Server Enterprise without Hyper-V (core installation)
PRODUCT_HYPERV | 42 | Microsoft Hyper-V Server
PRODUCT_STORAGE_EXPRESS_SERVER_CORE | 43 | Storage Server Express (core installation)
PRODUCT_STORAGE_STANDARD_SERVER_CORE | 44 | Storage Server Standard (core installation)
PRODUCT_STORAGE_WORKGROUP_SERVER_CORE | 45 | Storage Server Workgroup (core installation)
PRODUCT_STORAGE_ENTERPRISE_SERVER_CORE | 46 | Storage Server Enterprise (core installation)
PRODUCT_STARTER_N | 47 | Starter N
PRODUCT_PROFESSIONAL | 48 | Professional
PRODUCT_PROFESSIONAL_N | 49 | Professional N
PRODUCT_SB_SOLUTION_SERVER | 50 | Windows Small Business Server 2011 Essentials
PRODUCT_SERVER_FOR_SB_SOLUTIONS | 51 | Server For SB Solutions
PRODUCT_STANDARD_SERVER_SOLUTIONS | 52 | Server Solutions Premium
PRODUCT_STANDARD_SERVER_SOLUTIONS_CORE | 53 | Server Solutions Premium (core installation)
PRODUCT_SB_SOLUTION_SERVER_EM | 54 | Server For SB Solutions EM
PRODUCT_SERVER_FOR_SB_SOLUTIONS_EM | 55 | Server For SB Solutions EM
PRODUCT_SOLUTION_EMBEDDEDSERVER | 56 | Windows MultiPoint Server
PRODUCT_SOLUTION_EMBEDDEDSERVER_CORE | 57 |
PRODUCT_ESSENTIALBUSINESS_SERVER_MGMT | 59 | Windows Essential Server Solution Management
PRODUCT_ESSENTIALBUSINESS_SERVER_ADDL | 60 | Windows Essential Server Solution Additional
PRODUCT_ESSENTIALBUSINESS_SERVER_MGMTSVC | 61 | Windows Essential Server Solution Management SVC
PRODUCT_ESSENTIALBUSINESS_SERVER_ADDLSVC | 62 | Windows Essential Server Solution Additional SVC
PRODUCT_SMALLBUSINESS_SERVER_PREMIUM_CORE | 63 | Small Business Server Premium (core installation)
PRODUCT_CLUSTER_SERVER_V | 64 | Server Hyper Core V
PRODUCT_EMBEDDED | 65 |
PRODUCT_STARTER_E | 66 | Not supported
PRODUCT_HOME_BASIC_E | 67 | Not supported
PRODUCT_HOME_PREMIUM_E | 68 | Not supported
PRODUCT_PROFESSIONAL_E | 69 | Not supported
PRODUCT_ENTERPRISE_E | 70 | Not supported
PRODUCT_ULTIMATE_E | 71 | Not supported
PRODUCT_ENTERPRISE_EVALUATION | 72 | Server Enterprise (evaluation installation)
PRODUCT_MULTIPOINT_STANDARD_SERVER | 76 | Windows MultiPoint Server Standard (full installation)
PRODUCT_MULTIPOINT_PREMIUM_SERVER | 77 | Windows MultiPoint Server Premium (full installation)
PRODUCT_STANDARD_EVALUATION_SERVER | 79 | Server Standard (evaluation installation)
PRODUCT_DATACENTER_EVALUATION_SERVER | 80 | Server Datacenter (evaluation installation)
PRODUCT_ENTERPRISE_N_EVALUATION | 84 | Enterprise N (evaluation installation)
PRODUCT_STORAGE_WORKGROUP_EVALUATION_SERVER | 95 | Storage Server Workgroup (evaluation installation)
PRODUCT_STORAGE_STANDARD_EVALUATION_SERVER | 96 | Storage Server Standard (evaluation installation)
PRODUCT_CORE_N | 98 | Windows 8 N
PRODUCT_CORE_COUNTRYSPECIFIC | 99 | Windows 8 China
PRODUCT_CORE_SINGLELANGUAGE | 100 | Windows 8 Single Language
PRODUCT_CORE | 101 | Windows 8
PRODUCT_PROFESSIONAL_WMC | 103 | Professional with Media Center
PRODUCT_UNLICENSED | 2882382797 | The product has not been activated and is no longer in the grace period.

ResultVariable

When adding an action with the action editor, you can use this field to specify a variable that the return value will be stored in.


System.GetOSVersionInfo

table System.GetOSVersionInfo (

)

Description

Returns a table containing the version information of the operating system the user is running.

Parameters

None.

Returns

(table) A table containing the OS version information indexed by version categories.

KEY | TYPE | DESCRIPTION
MajorVersion | string | The major version number of the OS. If the version was 5.00.2195, "5" would be returned.
MinorVersion | string | The minor version number of the OS. If the version was 5.00.2195, "0" would be returned.
BuildNumber | string | The build number of the OS version. If the version was 5.00.2195, "2195" would be returned.
PlatformId | string | Returns "1" if the OS is non-NT based and "2" if the OS is NT based (XP, Vista, Server "Longhorn", Windows Server 2008, Windows 7, Windows Server 2008 R2, Windows 8, Windows Server 2012, Windows 8.1, Windows Server 2012 R2, Windows 10, Windows Server 10).
CSDVersion | string | The name of the most recently installed service pack for the OS, such as "Service Pack 3."

Additional table values are available for the following client and server operating systems:
Client: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Vista, Windows XP.
Server: Windows Server 10, Windows Server 2012 R2, Windows Server 2012, Windows Server 2008 R2, Windows Server 2008, Windows Server "Longhorn", Windows Server 2003.

Note: If the target operating system is not one of the above mentioned client or server operating systems, -1 will be returned for keys of type number and false for keys of type boolean.

KEY | TYPE | DESCRIPTION
ServicePackMajor | number | The major version number of the latest Service Pack installed on the system. For example, for Service Pack 3, the major version number is 3. If no Service Pack has been installed, the value is zero.
ServicePackMinor | number | The minor version number of the latest Service Pack installed on the system. For example, for Service Pack 3, the minor version number is 0.
ProductType | number | One of the numeric values "1", "2" or "3" will be returned. These values are defined as follows: 1 - The system is running Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Vista, Windows XP Professional, Windows XP Home Edition. 2 - The system is a domain controller. 3 - The system is a server.
BackOffice | boolean | Whether or not Microsoft BackOffice components are installed. If they are installed the value true is returned. If they are not installed, false is returned.
Blade | boolean | Whether or not Windows Server 2003, Web Edition is installed. If it is installed the value true is returned. If it is not installed, false is returned.
ComputeServer | boolean | Whether Windows Server 2003, Compute Cluster Edition is installed.
DataCenter | boolean | Whether or not Windows Server 2008 Datacenter Edition, or Windows Server 2003 Datacenter Edition is installed. If one of them is installed, the value true is returned. If none are installed, false is returned.
Enterprise | boolean | Whether or not Windows Server Enterprise, Windows Server 2003, Enterprise Edition, Windows Server 2008 Enterprise is installed. If one of them is installed, the value true is returned. If none are installed, false is returned.
EmbeddedNT | boolean | Whether or not Windows XP Embedded is installed.
Personal | boolean | Whether or not Windows Vista Home Premium, Windows Vista Home Basic, or Windows XP Home Edition is installed. If it is installed, the value true is returned. If it is not installed, false is returned.
SingleUserTerminalService | boolean | Whether or not Terminal Services is installed, but only one interactive session is supported. If only one interactive session is supported, the value true is returned. If Terminal Services is not installed, or supports more than one interactive session, false is returned.
SmallBusiness | boolean | Whether or not Microsoft Small Business Server was once installed on the system, but may have been upgraded to another version of Windows. If it was installed at some point, the value true is returned. If it was never installed, false is returned.
SmallBusinessRestricted | boolean | Whether or not Microsoft Small Business Server is installed with the restrictive client license in force. If it is installed with the restrictive client license in force, the value true is returned. If it is not, false is returned.
Terminal | boolean | Whether or not Terminal Services is installed. If it is installed, the value true is returned. If it is not installed, false is returned.
Communications | boolean | Whether or not Communication components are installed. If they are installed, the value true is returned. If they are not installed, false is returned.
Server2003R2 | boolean | Whether or not the operating system is Windows Storage Server 2003 R2 or Windows Storage Server 2003 is installed. If it is, true is returned. If it is not, false is returned.
XPMediaCenterEdition | boolean | Whether or not the operating system is Windows XP Media Center Edition. If it is, true is returned. If it is not, false is returned.
StarterEdition | boolean | Whether or not the operating system is Windows 7 Starter Edition, Windows Vista Starter, or Windows XP Starter Edition. If it is, true is returned. If it is not, false is returned.
TabletPCEdition | boolean | Returns true if the current operating system is the Windows XP Tablet PC edition or if the current operating system is Windows Vista, Windows 7 and the Tablet PC Input service is started. Otherwise returns false.

If this action fails, nil is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


System.GetTime

string System.GetTime (

number TimeType )

Description

Gets the current time in a variety of formats.

Parameters

TimeType

(number) Return the time in the format:

CONSTANT | VALUE | DESCRIPTION
TIME_FMT_MIL | 0 | Military Time (HH:MM:SS)
TIME_FMT_AMPM | 1 | AM/PM Time (HH:MM:SS AM/PM)
TIME_FMT_SEC | 2 | Seconds (SS)
TIME_FMT_MIN | 3 | Minutes (MM)
TIME_FMT_HOUR | 4 | Hours (HH)

Returns

(string) The time in the format specified by TimeType. If an error occurs, a blank string "" is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


System.GetUserInfo

table System.GetUserInfo (

)

Description

Returns a table containing the current user's information.

Parameters

None.

Returns

(table) A table containing the current user's information, indexed by the following keys:

KEY

TYPE

DESCRIPTION

RegOwner

string

The registered owner of the system. If this information cannot be determined, an empty string will be returned.

RegOrganization

string

The organization of the registered owner of the system. If this information cannot be determined, an empty string will be returned.

IsAdmin

boolean

Whether the current user is logged into Windows XP/Vista or later with Administrator permissions. True will be returned if the user has administrator permissions and false if they do not. If this information cannot be determined, false will be returned.

Note: On Windows Vista or later, with UAC enabled, administrators are logged in with standard user privileges with the ability to elevate. This will determine if the user has already been elevated to the full access token. See Running on Windows Vista or Later for more information.

IsVistaAdminLimitedToken

boolean

Returns True if the current user on Windows Vista or later (only) is part of the administrator's group, but only contains a standard user access token (has not been elevated to full administrator privileges). False is returned if UAC (User Account Control) is off, or if the user has already been elevated. For all non-Vista or later operating systems, the result will be the same as the normal administrator check IsAdmin as mentioned above.

Note: See Running on Windows Vista or Later for more information.

If this action fails, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


System.GetUserSID

string System.GetUserSID (

string UserName )

Description

Gets the string SID value for a user on the local computer.

Tip: This action is normally used to get the SID value for use in the File.SetPermissions action.

Parameters

UserName

(string) The username of the user to get the SID value for.

Returns

(string) Returns the SID value or a blank string if this action failed. If this action fails you can reference the System.UserSIDError variable to get the system error code for this action. For more information on the possible system error codes and their meanings, see http://msdn.microsoft.com/en-us/library/ms681381%28v=VS.85%29.aspx

ResultVariable

When adding an action with the action editor, you can use this field to specify a variable that the return value will be stored in.


System.Is64BitOS

boolean System.Is64BitOS (

)

Description

Determines if the user is running a 64 bit operating system (OS).

Parameters

None.

Returns

(boolean) True if the user's OS is 64 bit, false if it is not.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


System.IsSystemRestoreAvailable

boolean System.IsSystemRestoreAvailable (

)

Description

Determines whether or not the system restore service is available on the current system.

Note: The system restore service can only be accessed on Windows XP or later.

System Restore does not restore user data or documents, so it will not cause users to lose their files, e-mail, browsing history, or favorites. Only certain file types are monitored by system restore. See the System Restore Monitored File Extensions topic for details. System Restore also saves a full snapshot of the registry.

Parameters

None.

Returns

(boolean) True if the system restore service is available on the current system, or false if not. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the action editor, you can use this field to specify a variable that the return value will be stored in.


System.IsKeyDown

boolean System.IsKeyDown (

number Key )

Description

Determines if a specific key on the keyboard or a specific mouse button is down.

Parameters

Key

(number) The key or button to check. If the desired key is a letter or digit (A-Z, a-z, or 0-9), this value must be the character's ASCII value. For all other keys (and mouse buttons), this value must be set to the virtual key code.

Tip: In your scripts folder (typically ..\Program Files\AutoPlay Media Studio 8\Gallery\Scripts) there is a pre-made table of virtual key codes (VirtualKeyCodes.lua) that you can include in your project using an Application.LoadScript action.

Returns

(boolean) True if the specified key is down, false if it is up.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


System.Reboot

System.Reboot (

)

Description

Reboots the user's system.

Parameters

None.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


System.RegisterActiveX

System.RegisterActiveX (

string Filename )

Description

Registers an ActiveX control on the local system.

Note: This will only work for controls that properly support the DLLRegisterServer interface.

Parameters

Filename

(string) The full path to the ActiveX control file.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


System.RegisterFont

System.RegisterFont (

string Filename,

string Fontname,

boolean Permanent = true )

Description

Registers a TrueType font (.ttf file) on the local system.

Parameters

Filename

(string) The full path to the font file. The file must be a valid Windows .TTF file.

Fontname

(string) The name you want to use for the TrueType font (as it will appear in the Registry).

Permanent

(boolean) Whether to permanently register the font file:

VALUE | DESCRIPTION
true | The font file will be permanently registered on the user's system. (Default)
false | The font file will be temporarily registered on the user's system. This means it will be registered until a system reboot.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


System.RegisterTypeLib

System.RegisterTypeLib (

string Filename )

Description

Registers a type library file (.tlb) on the local system.

Parameters

Filename

(string) The full path to the TypeLib file (.tlb).

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


System.RemoveRestorePoint

System.RemoveRestorePoint (

number SequenceNum )

Description

Removes a system restore point given the sequence number generated by the System.SetRestorePoint action.

Note: This system restore action is only supported on Windows XP or later and may require administrative privileges.

Parameters

SequenceNum

(number) The sequence number of the restore point you want to remove. This is the value generated by the System.SetRestorePoint action.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


System.SetRestorePoint

number System.SetRestorePoint (

number EventType,

number RestorePointType,

number SequenceNum,

string Description )

Description

Creates a system restore point on the computer and returns the sequence number that was used.

To create a proper restore point, this action needs to be called twice. The first time, EventType should be set to SYSTEM_CHANGE_BEGIN. The second time, EventType should be set to SYSTEM_CHANGE_END.

Note: This system restore action is only supported on Windows XP or later and may require administrative privileges. You can use the System.IsSystemRestoreAvailable action to determine whether or not the system restore service is available.

System Restore does not restore user data or documents, so it will not cause users to lose their files, e-mail, browsing history, or favorites. Only certain file types are monitored by system restore. See the System Restore Monitored File Extensions topic for details. System Restore also saves a full snapshot of the registry.

Parameters

EventType

(number) The type of event for system restore. Choose from:

CONSTANT | VALUE | DESCRIPTION
SYSTEM_CHANGE_BEGIN | 100 | Notify that a system change has begun.
SYSTEM_CHANGE_END | 101 | Notify that a system change has ended.

RestorePointType

(number) The type of restore point to set. Choose from:

CONSTANT | VALUE | DESCRIPTION
SYS_RESTORE_APP_INSTALL | 0 | The restore point wraps an application install.
SYS_RESTORE_APP_UNINSTALL | 1 | The restore point wraps an application uninstall.
SYS_RESTORE_APP_DDRIVER_INSTALL | 10 | The restore point wraps a device driver install.
SYS_RESTORE_MODIFY_SETTINGS | 12 | The restore point wraps the modifications of an application's settings. (Only System Restore monitored file extensions are restored)
SYS_RESTORE_CANCELLED_OPERATION | 13 | The operation that the restore point was set to wrap has been canceled. As a result the restore point needs to be deleted. For example, an install would use this flag when a user cancels the installation. Note: You can delete a restore point using the System.RemoveRestorePoint action.

SequenceNum

(number) The sequence number of the restore point. When calling this action with the EventType set to SYSTEM_CHANGE_BEGIN, pass 0 as this parameter. This will cause the action to return the sequence number of the restore point that has been created. Use that sequence number in all subsequent calls to any restore point actions.

Description

(string) The description of the restore point that will show in Microsoft's System Restore utility. A maximum of 64 characters can be used.

Returns

(number) Returns the sequence number that was used to create the system restore point. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the action editor, you can use this field to specify a variable that the return value will be stored in.


System.TerminateProcess

boolean System.TerminateProcess (

number ProcessID )

Description

Terminates a process given its process ID. Process IDs can be retrieved using the System.EnumerateProcesses action.

Parameters

ProcessID

(number) The integer value that represents the specific process on the user's system. Process IDs can be retrieved using the System.EnumerateProcesses action.

Returns

(boolean) True if the process was terminated successfully, or false if it failed. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


System.UnregisterActiveX

System.UnregisterActiveX (

string Filename )

Description

Unregisters an ActiveX control on the local system.

Note: This will only work for controls that properly support the DLLUnregisterServer interface.

Parameters

Filename

(string) The full path to the ActiveX control file.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


System.UnregisterFont

System.UnregisterFont (

string Filename,

string Fontname,

boolean Permanent = true )

Description

Unregisters a TrueType font (.ttf file) on the local system. This removes the font's registration with the system font table.

Parameters

Filename

(string) The full path to the font file. The file must be a valid Windows .TTF file.

Fontname

(string) The name of the TrueType font (as it appears in the Registry).

Permanent

(boolean) Whether to permanently unregister the font file:

VALUE | DESCRIPTION
true | The font file will be permanently unregistered on the user's system. (Default)
false | The font file will be temporarily unregistered on the user's system. This means it will be unregistered until a system reboot.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Table.Concat

string Table.Concat (

table SourceTable,

string Separator,

number Start = 1,

number End = TABLE_ALL )

Description

Returns a string containing some or all of the values in a table. The values will be separated by the delimiter of your choice.

Parameters

SourceTable

(table) The table whose values you want to concatenate.

Separator

(string) The delimiter to use to separate the table values.

Start

(number) The index of the first item in the table that you want to concatenate. The default for this parameter is 1.

End

(number) The index of the last item in the table that you want to concatenate. The constant TABLE_ALL or -1 can be used to specify the last index in the table. TABLE_ALL is useful when you want to concatenate the entire table contents.

Returns

(string) A string containing the table values, separated by the delimiter you chose. If an error occurs, a blank string "" is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Table.Count

number Table.Count (

table SourceTable )

Description

Returns the total number of items in a table.

Parameters

SourceTable

(table) The table whose number of items you want.

Returns

(number) The total number of items in the table. If the table is empty, 0 is returned.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Table.Insert

Table.Insert (

table SourceTable,

number Position,

variant Value )

Description

Inserts an item into a numerically indexed table at a specific position.

Parameters

SourceTable

(table) The table to insert the item into.

Position

(number) The index in the table where you want to insert the item.

Value

(variant) The item you want to insert into the table.

Returns

Nothing.


Table.Remove

variant Table.Remove (

table SourceTable,

number Position )

Description

Removes a specific item from a numerically indexed table and returns it's value.

Parameters

SourceTable

(table) The table you want to remove an item from.

Position

(number) The table index of the item to remove from the table.

Returns

(variant) The value of the item that was removed from the table.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Table.Sort

Table.Sort (

table SourceTable,

function Compare = nil )

Description

Sorts the items of a numerically indexed table.

Parameters

SourceTable

(table) The table to sort.

Compare

(function) An optional comparison function to use while sorting the table. The function should be able to compare two values and return true if the two items are already sorted, or false if the items need to be swapped. If no function is specified, the less than operator (<) will be used to sort the items.

Returns

Nothing.


TextFile.ReadToString

string TextFile.ReadToString (

string Filename )

Description

Reads the contents of a text file and returns it as a string.

Parameters

Filename

(string) The full path to the text file.

Returns

(string) A string containing the contents of the text file. If an error occurs, a blank string "" is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


TextFile.ReadToTable

table TextFile.ReadToTable (

string Filename )

Description

Reads the contents of a text file into a table.

Parameters

Filename

(string) The full path to the text file.

Returns

(table) A table indexed by lines in the text file. Each table item contains one line of text from the file. If an error occurs, nil is returned. If the text file is empty, a table with an empty string is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


TextFile.WriteFromString

TextFile.WriteFromString (

string Filename,

string Text,

boolean Append = false )

Description

Writes a string of text to a text file.

Parameters

Filename

(string) The full path to the text file.

Note: If the file does not exist, it will be created.

Text

(string) The string of text to write.

Append

(boolean) Whether to append the string to the end of the text file:

VALUE | DESCRIPTION
true | Append the string to the end of the text file. (The text file must exist.)
false | Overwrite the current contents of the text file. (Default)

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


TextFile.WriteFromTable

TextFile.WriteFromTable (

string Filename,

table Table,

boolean Append = false )

Description

Writes a table's contents out to a text file. The table should consist of one line of text per table item.

Parameters

Filename

(string) The full path to the text file.

Note: If the file does not exist, it will be created.

Table

(string) The table to write.

Append

(boolean) Whether to append the table's contents to the end of the text file:

VALUE | DESCRIPTION
true | Append the table's contents to the end of the text file. (The text file must exist.)
false | Overwrite the current contents of the text file. (Default)

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Tree.CollapseNode

Tree.CollapseNode (

string ObjectName,

string NodeIndex )

Description

Collapses the specified node.

Parameters

ObjectName

(string) The name of the tree object.

NodeIndex

(string) The index of the node whose data you want to collapse.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Tree.EnsureVisible

Tree.EnsureVisible (

string ObjectName,

string NodeIndex )

Description

Expands all collapsed parent items of the specified node and scrolls the tree view control so that the specified node is visible.

Parameters

ObjectName

(string) The name of the tree object.

NodeIndex

(string) The index of the node that you want to ensure is visible.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Tree.ExpandNode

Tree.ExpandNode (

string ObjectName,

string NodeIndex )

Description

Expands the specified node and all sub items.

Note: If the specified node is not currently visible (under a collapsed parent node, for example), the node will still be expanded, but it will not be made visible (the parent node will remain collapsed). To force a node to become visible, us the Tree.EnsureVisible action.

Parameters

ObjectName

(string) The name of the tree object.

NodeIndex

(string) The index of the node whose data you want to expand.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Tree.FindNodeByData

string Tree.FindNodeByData (

string ObjectName,

string StartNodeIndex,

string Data )

Description

Searches the tree for a node based on specified data.

Parameters

ObjectName

(string) The name of the tree object.

StartNodeIndex

The index of the node whose first child will be the starting point for the search.

Tip: Use an index of "0" to reference the root-level nodes.

Data

(string) The data to find.

Returns

(string) A string containing the NodeIndex if a matching node is found. If no matching node is found, or an error occurs, a blank string "" is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Tree.FindNodeByText

string Tree.FindNodeByText (

string ObjectName,

string StartNodeIndex,

string Text )

Description

Searches the tree for a node based on specified text.

Parameters

ObjectName

(string) The name of the tree object.

StartNodeIndex

The index of the node whose first child will be the starting point for the search.

Tip: Use an index of "0" to reference the root-level nodes.

Text

(string) The text to find.

Returns

(string) A string containing the NodeIndex if a matching node is found. If no matching node is found, or an error occurs, a blank string "" is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Tree.GetChildCount

number Tree.GetChildCount (

string ObjectName,

string ParentNodeIndex )

Description

Returns the child count of a node.

Parameters

ObjectName

(string) The name of the tree object.

ParentNodeIndex

(string) The index of the node whose children will be counted.

Tip: Use an index of "0" to reference the root-level nodes.

Returns

(number) The number of child nodes in a specific parent node. If an error occurs, -1 is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Tree.GetChildren

table Tree.GetChildren (

string ObjectName,

string ParentNodeIndex )

Description

Returns a table containing child data tables.

Parameters

ObjectName

(string) The name of the tree object.

ParentNodeIndex

(string) The index of the node whose child data will be retrieved.

Tip: Use an index of "0" to reference the root-level nodes.

Returns

(table) A numerically indexed table of child data tables, indexed by the following keys:

KEY | TYPE | DESCRIPTION
Text | string | The text of the current item.
Data | string | The data of the current item.
Selected | boolean | True if the item is selected, false if it is not.
Expanded | boolean | True if the item is expanded, false if it is not.
NodeIndex | string | The current item's node index.
ImageIndex | number | The icon index that the current item will use when not selected. The icon file is specified in the Tree's properties. See the ImageList key in the Tree.SetProperties action for more information.
SelectedImageIndex | number | The icon index that the current item will use when selected. The icon file is specified in the Tree's properties. See the ImageList key in the Tree.SetProperties action for more information.

If there are no child elements at the specified node or an error occurs, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Tree.GetNode

table Tree.GetNode (

string ObjectName,

string NodeIndex )

Description

Returns a table containing the specified node's properties.

Parameters

ObjectName

(string) The name of the tree object.

NodeIndex

(string) The index of the node whose properties you want.

Returns

(table) A table containing the specified node's properties, indexed by the following keys:

KEY | TYPE | DESCRIPTION
Text | string | The text of the current item.
Data | string | The data of the current item.
Selected | boolean | True if the item is selected, false if it is not.
Expanded | boolean | True if the item is expanded, false if it is not.
Checked | boolean | True if the item is checked, false if it is not. Note: If check boxes are not shown in the tree object, false will always be returned.
NodeIndex | string | The current item's node index.
ImageIndex | number | The icon index that the current item will use when not selected. The icon file is specified in the Tree's properties. See the ImageList key in the Tree.SetProperties action for more information.
SelectedImageIndex | number | The icon index that the current item will use when selected. The icon file is specified in the Tree's properties. See the ImageList key in the Tree.SetProperties action for more information.

If no data exists, or an error occurs, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Tree.GetPos

table Tree.GetPos (

string ObjectName )

Description

Returns the X and Y page or dialog coordinates of a tree object in pixels.

Parameters

ObjectName

(string) The name of the tree object.

Returns

(table) A table containing the object's current coordinates, indexed by values X and Y. If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Tree.GetProperties

table Tree.GetProperties (

string ObjectName )

Description

Returns a table containing the properties of a tree object.

Parameters

ObjectName

(string) The name of the tree object.

Returns

(table) A table containing the tree's properties, indexed by the following keys:

KEY

TYPE

DESCRIPTION

ObjectName

string

The name of the tree object.

ShowCheckBoxes

boolean

True if checkboxes will be shown, false if they will not be.

HasLines

boolean

True if the tree object will display lines, false if it will not.

LinesAtRoot

boolean

True if the tree object will display lines at the root level, false if it will not.

HasButtons

boolean

True if the tree object will have expand/collapse buttons, false if it will not.

EditLabels

boolean

True if the user can edit the item labels, false if they can't.

AlwaysShowSelection

boolean

True if the current item will remain selected when the tree object looses focus, false if it will not.

FontName

string

The name of the font currently in use in the tree object.

FontSize

number

The font size currently displayed in the tree object.

FontStrikeout

boolean

True if the current font is set to strikeout, false if it is not.

FontUnderline

boolean

True if the current font is set to underline, false if it is not.

FontItalic

boolean

True if the current font is set to italic, false if it is not.

FontAntiAlias

boolean

True if the current font is set to anti alias, false if it is not.

FontWeight

number

The weight of the font (how 'dark' the text will appear):

CONSTANT | VALUE | DESCRIPTION
FW_DONTCARE | 0 | Font weight not specified.
FW_THIN | 100 | Font weight 'thin'.
FW_EXTRALIGHT | 200 | Font weight 'extra-light'.
FW_LIGHT | 300 | Font weight 'light'.
FW_NORMAL | 400 | Font weight 'normal'.
FW_MEDIUM | 500 | Font weight 'medium'.
FW_SEMIBOLD | 600 | Font weight 'semi-bold'.
FW_BOLD | 700 | Font weight 'bold'.
FW_EXTRABOLD | 800 | Font weight 'extra bold'.
FW_HEAVY | 900 | Font weight 'heavy'.

FontScript

number

The character set in use by the paragraph object:

CONSTANT | VALUE | DESCRIPTION
ANSI_CHARSET | 0 | ANSI character set.
BALTIC_CHARSET | 186 | Baltic character set.
CHINESEBIG5_CHARSET | 136 | Chinese character set.
DEFAULT_CHARSET | 1 | Default character set.
EASTEUROPE_CHARSET | 238 | Eastern European character set.
GB2312_CHARSET | 134 | GB2312 character set.
GREEK_CHARSET | 161 | Greek character set.
HANGUL_CHARSET | 129 | Hangul character set.
MAC_CHARSET | 77 | MAC character set.
OEM_CHARSET | 255 | OEM character set.
RUSSIAN_CHARSET | 204 | Russian character set.
SHIFTJIS_CHARSET | 128 | Shiftjis character set.
SYMBOL_CHARSET | 2 | Symbol character set.
TURKISH_CHARSET | 162 | Turkish character set.

BackgroundColor

number

The currently displayed background color.

TextColor

number

The currently displayed text color.

BorderMode

number

The border mode in use by the tree object. Choose from:

CONSTANT | VALUE | DESCRIPTION
BORDER_NONE | 0 | No border.
BORDER_FLAT | 1 | Flat border.
BORDER_SUNKEN | 2 | Sunken border.

UseImageList

boolean

True if the tree object uses an image list, false if it does not.

ImageList

string

The path to a bitmap file (32bit max) containing 16x16 icons being used as icons for items in the tree list.

ImageListTransColor

number

The decimal value of the color that is transparent in the image list. This color is used to represent transparency in the image.

ReadOrder

number

How text will be displayed in the tree object:

CONSTANT | VALUE | DESCRIPTION
READ_STANDARD | 0 | Display the characters left to right.
READ_RIGHT_TO_LEFT | 1 | Display the characters right to left.

Enabled

boolean

True if the tree object is enabled, false if it is not.

Visible

boolean

True if the tree object is visible, false if it is not.

X

number

The horizontal position (in pixels) of the top left corner of the tree object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has an X value of 0

Y

number

The vertical position (in pixels) of the top left corner of the tree object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has a Y value of 0

Width

number

The width (in pixels) of the tree object.

Height

number

The height (in pixels) of the tree object.

TooltipText

string

The mouseover tooltip of the tree object.

ResizeLeft

boolean

True if the left side of the object will move when the application is resized, false if it is not.

ResizeRight

boolean

True if the right side of the object will move when the application is resized, false if it is not.

ResizeTop

boolean

True if the top of the object will move when the application is resized, false if it is not.

ResizeBottom

boolean

True if the bottom of the object will move when the application is resized, false if it is not.

WindowHandle

number

The integer value that represents the object's window. (Commonly referred to as an hWnd.)

If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Tree.GetSelectedNode

string Tree.GetSelectedNode (

string ObjectName )

Description

Returns a string containing the selected item's node index.

Parameters

ObjectName

(string) The name of the tree object.

Returns

(string) A string containing the selected item's node index or an empty string ("") if an error occurs. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Tree.GetSize

table Tree.GetSize (

string ObjectName )

Description

Returns the pixel dimensions of a tree object.

Parameters

ObjectName

(string) The name of the tree object.

Returns

(table) A table containing the object's pixel dimensions, indexed by values "Width" and "Height". If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Tree.InsertNode

string Tree.InsertNode (

string ObjectName,

string NodeIndex,

table NodeData )

Description

Inserts a node into the tree object.

Parameters

ObjectName

(string) The name of the tree object.

NodeIndex

(string) The index of the location to insert the node into.

NodeData

(table) A table of properties to assign to the new node, indexed by the following keys:

KEY | TYPE | DESCRIPTION
Text | string | The text of the current item.
Data | string | The data of the current item.
Selected | boolean | True if the item is selected, false if it is not.
Expanded | boolean | True if the item is expanded, false if it is not.
Checked | boolean | True if the item is checked, false if it is not. Note: If check boxes are not shown in the tree object, this property will be ignored.
NodeIndex | string | The current item's node index.
ImageIndex | number | The icon index that the current item will use when not selected. The icon file is specified in the Tree's properties. See the ImageList key in the Tree.SetProperties action for more information.
SelectedImageIndex | number | The icon index that the current item will use when selected. The icon file is specified in the Tree's properties. See the ImageList key in the Tree.SetProperties action for more information.

Returns

(string) The node index where the item was inserted to. If an error occurs, a blank string "" is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Tree.IsEnabled

boolean Tree.IsEnabled (

string ObjectName )

Description

Returns true if a specific tree object is enabled, or false if it's disabled.

Note: When a tree object is disabled, it doesn't respond to the user at all.

Parameters

ObjectName

(string) The name of the tree object.

Returns

(boolean) True if the tree object is enabled, false if it is disabled. If an error occurs, false will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Tree.IsVisible

boolean Tree.IsVisible (

string ObjectName )

Description

Returns true if a specific tree object is visible, and false if it isn't.

Parameters

ObjectName

(string) The name of the tree object.

Returns

(boolean) True if the tree object is visible, false if it's invisible. If an error occurs, false will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Tree.RemoveNode

Tree.RemoveNode (

string ObjectName,

string NodeIndex )

Description

Removes a node from a tree object.

Parameters

ObjectName

(string) The name of the tree object.

NodeIndex

(string) The index of the node that you want to remove.

Tip: To remove all nodes in the tree, set NodeIndex to "0".

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Tree.SetEnabled

Tree.SetEnabled (

string ObjectName,

boolean Enabled = true )

Description

Sets the enabled/disabled state of a tree object.

Note: When a tree object is disabled, it doesn't respond to user interaction.

Parameters

ObjectName

(string) The name of the tree object.

Enabled

(boolean) Whether to make the tree object enabled or disabled:

VALUE | DESCRIPTION
true | Enabled. (Default)
false | Disabled.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Tree.SetNode

Tree.SetNode (

string ObjectName,

string NodeIndex,

table Data )

Description

Sets the properties of the specified node in a tree object.

Parameters

ObjectName

(string) The name of the tree object.

NodeIndex

(string) The index of the node whose properties you want to set.

Data

(table) A table containing node properties, indexed by the following keys:

KEY | TYPE | DESCRIPTION
Text | string | The text of the current item.
Data | string | The data of the current item.
Selected | boolean | True to select the item, false to not.
Expanded | boolean | True to expand the item, false to not. Note: Only the current node's items will be expanded, not its sub items. Use Tree.ExpandNode to expand all sub items.
Checked | boolean | True if the item is checked, false if it is not. Note: If check boxes are not shown in the tree object, this property will be ignored.
ImageIndex | number | The icon index that the current item will use when not selected. The icon file is specified in the Tree's properties. See the ImageList key in the Tree.SetProperties action for more information.
SelectedImageIndex | number | The icon index that the current item will use when selected. The icon file is specified in the Tree's properties. See the ImageList key in the Tree.SetProperties action for more information.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Tree.SetPos

Tree.SetPos (

string ObjectName,

number X,

number Y )

Description

Sets the X and Y pixel coordinates of a tree object relative to the page or dialog.

Parameters

ObjectName

(string) The name of the tree object.

X

(number) The new X pixel coordinate (horizontal position) to set for the tree object. This is the X coordinate of the upper left hand corner of the object's bounding box relative to the page or dialog.

Y

(number) The new Y pixel coordinate (vertical position) to set for the tree object. This is the Y coordinate of the upper left hand corner of the object's bounding box relative to the page or dialog.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Tree.SetProperties

Tree.SetProperties (

string ObjectName,

table Properties )

Description

Sets the properties of a tree object.

Parameters

ObjectName

(string) The name of the tree object.

Properties

(table) A table containing the tree object's properties indexed by the following keys:

KEY

TYPE

DESCRIPTION

ShowCheckBoxes

boolean

True if checkboxes should be shown, false if they should not be.

HasLines

boolean

True if the tree object should display lines, false if it should not.

LinesAtRoot

boolean

True if the tree object should display lines at the root level, false if it should not.

HasButtons

boolean

True if the tree object should have expand/collapse buttons, false if it should not.

EditLabels

boolean

True if the user should be able to edit the item labels, false if they should not be.

AlwaysShowSelection

boolean

True if the current item should remain selected when the tree object looses focus, false if it should not.

FontName

string

The name of the font to be used in the tree object.

FontSize

number

The font size to be displayed in the tree object.

FontStrikeout

boolean

True if the current font should be set to strikeout, false if it should not be.

FontUnderline

boolean

True if the current font should be set to underline, false if it should not be.

FontItalic

boolean

True if the current font should be set to italic, false if it should not be.

FontAntiAlias

boolean

True if the current font should be set to anti alias, false if it should not be.

FontWeight

number

The weight of the font (how 'dark' the text should appear):

CONSTANT | VALUE | DESCRIPTION
FW_DONTCARE | 0 | Font weight not specified.
FW_THIN | 100 | Font weight 'thin'.
FW_EXTRALIGHT | 200 | Font weight 'extra-light'.
FW_LIGHT | 300 | Font weight 'light'.
FW_NORMAL | 400 | Font weight 'normal'.
FW_MEDIUM | 500 | Font weight 'medium'.
FW_SEMIBOLD | 600 | Font weight 'semi-bold'.
FW_BOLD | 700 | Font weight 'bold'.
FW_EXTRABOLD | 800 | Font weight 'extra bold'.
FW_HEAVY | 900 | Font weight 'heavy'.

FontScript

number

The character set to be used by the paragraph object:

CONSTANT | VALUE | DESCRIPTION
ANSI_CHARSET | 0 | ANSI character set.
BALTIC_CHARSET | 186 | Baltic character set.
CHINESEBIG5_CHARSET | 136 | Chinese character set.
DEFAULT_CHARSET | 1 | Default character set.
EASTEUROPE_CHARSET | 238 | Eastern European character set.
GB2312_CHARSET | 134 | GB2312 character set.
GREEK_CHARSET | 161 | Greek character set.
HANGUL_CHARSET | 129 | Hangul character set.
MAC_CHARSET | 77 | MAC character set.
OEM_CHARSET | 255 | OEM character set.
RUSSIAN_CHARSET | 204 | Russian character set.
SHIFTJIS_CHARSET | 128 | Shiftjis character set.
SYMBOL_CHARSET | 2 | Symbol character set.
TURKISH_CHARSET | 162 | Turkish character set.

BackgroundColor

number

The background color to use.

TextColor

number

The text color to use.

BorderMode

number

The border mode to use for the tree object. Choose from:

CONSTANT | VALUE | DESCRIPTION
BORDER_NONE | 0 | No border.
BORDER_FLAT | 1 | Flat border.
BORDER_SUNKEN | 2 | Sunken border.

UseImageList

boolean

True if the tree object should use an image list, false if it should not.

ImageList

string

The path to a bitmap file (32bit max) containing 16x16 icons to be used as icons for items in the tree list.

ImageListTransColor

number

The decimal value of the color that should be transparent in the image list. This color will be used to represent transparency in the image.

ReadOrder

number

How text should be displayed in the tree object:

CONSTANT | VALUE | DESCRIPTION
READ_STANDARD | 0 | Display the characters left to right.
READ_RIGHT_TO_LEFT | 1 | Display the characters right to left.

Enabled

boolean

True if the tree object should be enabled, false if it should not be.

Visible

boolean

True if the tree object should be visible, false if it should not be.

X

number

The horizontal position (in pixels) of the top left corner of the tree object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has an X value of 0

Y

number

The vertical position (in pixels) of the top left corner of the tree object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has a Y value of 0

Width

number

The width (in pixels) of the tree object.

Height

number

The height (in pixels) of the tree object.

ResizeLeft

boolean

True if the left side of the object should move when the application is resized, false if it should not.

ResizeRight

boolean

True if the right side of the object should move when the application is resized, false if it should not.

ResizeTop

boolean

True if the top of the object should move when the application is resized, false if it should not.

ResizeBottom

boolean

True if the bottom of the object should move when the application is resized, false if it should not.

TooltipText

string

The mouseover tooltip of the tree object. Tip: If you want a "&" character in the text, you must enter "&&&".

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Tree.SetSelectedNode

Tree.SetSelectedNode (

string ObjectName,

string NodeIndex )

Description

Sets the selection in the tree object.

Parameters

ObjectName

(string) The name of the tree object.

NodeIndex

(string) The index of the node that you want selected.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Tree.SetSize

Tree.SetSize (

string ObjectName,

number Width,

number Height )

Description

Sets the size of a tree object.

Parameters

ObjectName

(string) The name of the tree object.

Width

(number) The new width of the tree object in pixels.

Height

(number) The new height of the tree object in pixels.

Returns

Nothing.


Tree.SetVisible

Tree.SetVisible (

string ObjectName,

boolean Visible = true )

Description

Sets the visibility of a tree object.

Parameters

ObjectName

(string) The name of the tree object.

Visible

(boolean) Whether to make the tree object visible or invisible:

VALUE | DESCRIPTION
true | Visible. (Default)
false | Invisible.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Video.GetCurrentPos

number Video.GetCurrentPos (

string ObjectName )

Description

Retrieves the current time position of a video in a video object, in seconds.

Parameters

ObjectName

(string) The video object to get the current time of.

Returns

(number) The current position of the video in seconds. If an error occurs, -1 is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Video.GetFilename

string Video.GetFilename (

string ObjectName )

Description

Returns the path to the file that is currently loaded in a video object.

Parameters

ObjectName

(string) The name of the video object.

Returns

(string) The path to the file currently loaded into the video object. If an error occurs, a blank string "" is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Video.GetLength

number Video.GetLength (

string ObjectName )

Description

Retrieves the length (in seconds) of the video file in a video object.

Parameters

ObjectName

(string) The name of the video object.

Returns

(number) The length of the video in seconds. If an error occurs, -1 is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Video.GetPos

table Video.GetPos (

string ObjectName )

Description

Returns the X and Y page or dialog coordinates of a video object in pixels. This coordinate refers to the upper left hand corner of the object's bounding box relative to the page or dialog.

Note: The upper left hand corner of a page or dialog has X and Y coordinates of 0.

Parameters

ObjectName

(string) The name of the video object.

Returns

(table) A table containing the object's current coordinates, indexed by values X and Y. If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Video.GetProperties

table Video.GetProperties (

string ObjectName )

Description

Returns a table containing the properties of a video object.

Parameters

ObjectName

(string) The name of the video object.

Returns

(table) A table containing the video's properties, indexed by the following keys:

KEY

TYPE

DESCRIPTION

ObjectName

string

The name of the video object.

VideoFile

string

The currently loaded video file.

MaskFile

string

The path of the image to be used as the object mask.

ApplyCustomMask

boolean

True if a mask file should be used, false if it should not be.

ScalingMode

number

How the movie will 'fit' inside the video object:

CONSTANT | VALUE | DESCRIPTION
STRETCH_MODE | 0 | The movie loaded in the video object will stretch to fill the entire region of the video object (the aspect ratio of the movie will match the aspect ratio of the video object).
MAINTAIN_ASPECT | 1 | The movie loaded will maintain it's aspect ratio regardless of the aspect ratio of the video object.

CPStyle

number

How the control panel will appear:

CONSTANT | VALUE | DESCRIPTION
CONTROL_PANEL_NONE | 0 | The video object will have no control panel.
CONTROL_PANEL_STANDARD | 1 | The standard control panel will be shown.
CONTROL_PANEL_CUSTOM | 2 | A custom 'skin' will be applied to the standard control panel.

SkinFile

string

The path to the skin file to be used if CPStyle is set to CONTROL_PANEL_CUSTOM.

CPTime

number

How the time information will be displayed on the control panel:

CONSTANT | VALUE | DESCRIPTION
TIME_NONE | 0 | No time display will be shown.
TIME_ELAPSED | 1 | The time elapsed will be displayed.
TIME_LENGTH | 2 | The length of the movie loaded will be displayed.
TIME_BOTH | 3 | Both the time elapsed and the movie length will be displayed.

PanelColor

number

The color of the control panel.

TextColor

number

The color of the text (e.g. displayed time) displayed on the control panel.

ControlButtons

boolean

True if buttons will be displayed on the control panel, false if it will not be.

Slider

boolean

True if a slider will be displayed on the control panel, false if it will not be.

AutoStart

boolean

True if the video object will automatically play the loaded movie as soon as the page or dialog is shown, false if it will not.

Loop

boolean

True if the movie will restart when it ends, false if it will not.

Border

boolean

True if a border will be shown around the video object, false if one will not be shown.

Enabled

boolean

True if the video object is enabled, false if it is not.

Visible

boolean

True if the video object is visible, false if it is not.

X

number

The horizontal position (in pixels) of the top left corner of the video object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has an X value of 0

Y

number

The vertical position (in pixels) of the top left corner of the video object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has a Y value of 0

Width

number

The width (in pixels) of the video object.

Height

number

The height (in pixels) of the video object.

Cursor

number

The mouse cursor that will be displayed when the mouse is over the video object:

CONSTANT | VALUE | DESCRIPTION
CURSOR_ARROW | 0 | Standard mouse arrow cursor.
CURSOR_HAND | 1 | Hand cursor.
CURSOR_BLACK_ARROW | 2 | Black arrow cursor.
CURSOR_CROSSHAIR | 3 | Crosshair cursor.
CURSOR_EXPLORE | 4 | Explore cursor.
CURSOR_HELP | 5 | Help cursor.
CURSOR_MAGNIFY | 6 | Magnify cursor.
CURSOR_MEDIA | 7 | Media cursor.
CURSOR_MONEY | 8 | Money cursor.
CURSOR_NOTEPAD | 9 | Notepad cursor.
CURSOR_PENCIL | 10 | Pencil cursor.
CURSOR_PRINTER | 11 | Printer cursor.
CURSOR_SPEAKER | 12 | Speaker cursor.
CURSOR_UP_ARROW | 13 | Up arrow cursor.

ResizeLeft

boolean

True if the left side of the object will move when the application is resized, false if it is not.

ResizeRight

boolean

True if the right side of the object will move when the application is resized, false if it is not.

ResizeTop

boolean

True if the top of the object will move when the application is resized, false if it is not.

ResizeBottom

boolean

True if the bottom of the object will move when the application is resized, false if it is not.

HighlightSound

number

The type of sound that will be played when the mouse moves over the video object.

CONSTANT | VALUE | DESCRIPTION
SND_NONE | 0 | No highlight sound.
SND_STANDARD | 1 | Standard highlight sound.
SND_CUSTOM | 2 | Custom highlight sound.

HighlightSoundFile

string

The path to the video object's custom highlight sound file. If the video object does not use a custom sound, this value will be an empty string ("").

ClickSound

number

The type of sound that will be played when the mouse clicks the video object.

CONSTANT | VALUE | DESCRIPTION
SND_NONE | 0 | No click sound.
SND_STANDARD | 1 | Standard click sound.
SND_CUSTOM | 2 | Custom click sound.

ClickSoundFile

string

The path to the video object's custom click sound file. If the video object does not use a custom sound, this value will be an empty string ("").

WindowHandle

number

The integer value that represents the object's window. (Commonly referred to as an hWnd.)

If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Video.GetSize

table Video.GetSize (

string ObjectName )

Description

Returns the pixel dimensions of a video object.

Parameters

ObjectName

(string) The name of the video object.

Returns

(table) A table containing the object's pixel dimensions, indexed by values "Width" and "Height". If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Video.GetState

number Video.GetState (

string ObjectName )

Description

Returns the current state of a video object.

Parameters

ObjectName

(string) The name of the video object.

Returns

(number) The current state of the video object:

CONSTANT | VALUE | DESCRIPTION
VIDEO_STOPPED | 0 | Stopped.
VIDEO_PAUSED | 1 | Paused.
VIDEO_PLAYING | 2 | Playing.

If an error occurs, -1 is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Video.GetVolume

number Video.GetVolume (

string ObjectName )

Description

Retrieves the current volume level of a video object. The volume is represented as a number between 0 and 100.

Parameters

ObjectName

(string) The name of the video object.

Returns

(number) The current volume level of the video object. The returned value is a number between 0 and 100, where 0 is silent and 100 is the loudest. If an error occurs, -1 is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Video.IsEnabled

boolean Video.IsEnabled (

string ObjectName )

Description

Returns true if a specific video object is enabled, or false if it's disabled.

Note: When a video object is disabled, it doesn't respond to the user at all.

Parameters

ObjectName

(string) The name of the video object.

Returns

(boolean) True if the video object is enabled, false if it is disabled. If an error occurs, false will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Video.IsFullScreen

boolean Video.IsFullScreen (

string ObjectName )

Description

Returns true if a specific video object is currently in full screen mode, or false if it isn't.

Parameters

ObjectName

(string) The name of the video object.

Returns

(boolean) True if the video object is in full screen mode, false if it isn't. If an error occurs, false is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Video.IsVisible

boolean Video.IsVisible (

string ObjectName )

Description

Returns true if a specific video object is visible, and false if it isn't.

Parameters

ObjectName

(string) The name of the video object.

Returns

(boolean) True if the video object is visible, false if it's invisible. If an error occurs, false will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Video.Load

Video.Load (

string ObjectName,

string Filename,

boolean PlayAutomatic = false,

boolean Loop = false )

Description

Loads a video file into a video object.

Parameters

ObjectName

(string) The name of the video object.

Filename

(string) The path to the video file. Click the browse button to select a file.

PlayAutomatic

(boolean) Whether to automatically start playing the video after it loads:

VALUE | DESCRIPTION
true | Automatically start playing the file.
false | Don't play the file until told to do so. (Default)

Loop

(boolean) Whether to make the video loop when it reaches the end:

VALUE | DESCRIPTION
true | Loop.
false | Don't loop. (Default)

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Video.Pause

Video.Pause (

string ObjectName )

Description

Pauses the video's playback in a video object.

Parameters

ObjectName

(string) The name of the video object.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Video.Play

Video.Play (

string ObjectName )

Description

Starts playing the video currently loaded in a video object.

Parameters

ObjectName

(string) The name of the video object.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Video.Seek

Video.Seek (

string ObjectName,

number SeekType,

number SeekTime = 0 )

Description

Seeks to a position in a video that is loaded in a video object.

Parameters

ObjectName

(string) The name of the video object.

SeekType

(number) The seek type to use:

CONSTANT | VALUE | DESCRIPTION
SEEK_BEGINNING | 0 | Beginning.
SEEK_END | 1 | End.
SEEK_FORWARD | 2 | Forward.
SEEK_BACKWARD | 3 | Backward.
SEEK_SPECIFIC | 4 | Specific time.

SeekTime

(number) The time to seek to (or seek by). Defaults to 0.

Note: Only used if SeekType is 2, 3, or 4.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Video.SetEnabled

Video.SetEnabled (

string ObjectName,

boolean Enabled = true )

Description

Sets the enabled/disabled state of a video object.

Note: When a video object is disabled, it doesn't respond to user interaction.

Parameters

ObjectName

(string) The name of the video object.

Enabled

(boolean) Whether to make the video object enabled or disabled:

VALUE | DESCRIPTION
true | Enabled. (Default)
false | Disabled.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Video.SetFullScreen

Video.SetFullScreen (

string ObjectName,

boolean Fullscreen = true )

Description

Controls whether a video object will play in full screen mode or at its normal size.

Parameters

ObjectName

(string) The name of the video object.

Fullscreen

(boolean) Whether to make the video object play in full screen mode:

VALUE | DESCRIPTION
true | Full screen playback. (Default)
false | Normal playback.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Video.SetPos

Video.SetPos (

string ObjectName,

number X,

number Y )

Description

Sets the X and Y pixel coordinates of a video object relative to the page or dialog.

Parameters

ObjectName

(string) The name of the video object.

X

(number) The new X pixel coordinate (horizontal position) to set for the video object. This is the X coordinate of the upper left hand corner of the object's bounding box relative to the page or dialog.

Y

(number) The new Y pixel coordinate (vertical position) to set for the video object. This is the Y coordinate of the upper left hand corner of the object's bounding box relative to the page or dialog.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Video.SetProperties

Video.SetProperties (

string ObjectName,

table Properties )

Description

Sets the properties of a video object.

Parameters

ObjectName

(string) The name of the video object.

Properties

(table) A table containing the video object's properties indexed by the following keys:

KEY

TYPE

DESCRIPTION

VideoFile

string

The movie file to load into the video object.

MaskFile

string

The path of the image to be used as the object mask.

ApplyCustomMask

boolean

True if a mask file should be used, false if it should not be.

ScalingMode

number

How the movie should 'fit' inside the video object:

CONSTANT | VALUE | DESCRIPTION
STRETCH_MODE | 0 | The movie loaded in the video object will stretch to fill the entire region of the video object (the aspect ratio of the movie will match the aspect ratio of the video object).
MAINTAIN_ASPECT | 1 | The movie loaded will maintain it's aspect ratio regardless of the aspect ratio of the video object.

CPStyle

number

How the control panel should appear:

CONSTANT | VALUE | DESCRIPTION
CONTROL_PANEL_NONE | 0 | The video object will have no control panel.
CONTROL_PANEL_STANDARD | 1 | The standard control panel will be shown.
CONTROL_PANEL_CUSTOM | 2 | A custom 'skin' will be applied to the standard control panel.

SkinFile

string

The path to the skin file to be used if CPStyle is set to CONTROL_PANEL_CUSTOM.

CPTime

number

How the time information should be displayed on the control panel:

CONSTANT | VALUE | DESCRIPTION
TIME_NONE | 0 | No time display will be shown.
TIME_ELAPSED | 1 | The time elapsed will be displayed.
TIME_LENGTH | 2 | The length of the movie loaded will be displayed.
TIME_BOTH | 3 | Both the time elapsed and the movie length will be displayed.

PanelColor

number

The color of the control panel.

TextColor

number

The color of the text (e.g. displayed time) displayed on the control panel.

ControlButtons

boolean

True if buttons should be displayed on the control panel, false if it should not be.

Slider

boolean

True if a slider should be displayed on the control panel, false if it should not be.

AutoStart

boolean

True if the video object should automatically play the loaded movie as soon as the page or dialog is shown, false if it should not.

Loop

boolean

True if the movie should restart when it ends, false if it should not.

Border

boolean

True if a border should be shown around the video object, false if one should not be shown.

Enabled

boolean

True if the video object should be enabled, false if it should not be.

Visible

boolean

True if the video object should be visible, false if it should not be.

X

number

The horizontal position (in pixels) of the top left corner of the video object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has an X value of 0

Y

number

The vertical position (in pixels) of the top left corner of the video object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has a Y value of 0

Width

number

The width (in pixels) of the video object.

Height

number

The height (in pixels) of the video object.

Cursor

number

The mouse cursor that should be displayed when the mouse is over the video object:

CONSTANT | VALUE | DESCRIPTION
CURSOR_ARROW | 0 | Standard mouse arrow cursor.
CURSOR_HAND | 1 | Hand cursor.
CURSOR_BLACK_ARROW | 2 | Black arrow cursor.
CURSOR_CROSSHAIR | 3 | Crosshair cursor.
CURSOR_EXPLORE | 4 | Explore cursor.
CURSOR_HELP | 5 | Help cursor.
CURSOR_MAGNIFY | 6 | Magnify cursor.
CURSOR_MEDIA | 7 | Media cursor.
CURSOR_MONEY | 8 | Money cursor.
CURSOR_NOTEPAD | 9 | Notepad cursor.
CURSOR_PENCIL | 10 | Pencil cursor.
CURSOR_PRINTER | 11 | Printer cursor.
CURSOR_SPEAKER | 12 | Speaker cursor.
CURSOR_UP_ARROW | 13 | Up arrow cursor.

ResizeLeft

boolean

True if the left side of the object should move when the application is resized, false if it should not.

ResizeRight

boolean

True if the right side of the object should move when the application is resized, false if it should not.

ResizeTop

boolean

True if the top of the object should move when the application is resized, false if it should not.

ResizeBottom

boolean

True if the bottom of the object should move when the application is resized, false if it should not.

HighlightSound

number

The type of sound that should be played when the mouse moves over the video object.

CONSTANT | VALUE | DESCRIPTION
SND_NONE | 0 | No highlight sound.
SND_STANDARD | 1 | Standard highlight sound.
SND_CUSTOM | 2 | Custom highlight sound.

HighlightSoundFile

string

The path to the video object's custom highlight sound file if it uses one.

ClickSound

number

The type of sound that should be played when the mouse clicks the video object.

CONSTANT | VALUE | DESCRIPTION
SND_NONE | 0 | No click sound.
SND_STANDARD | 1 | Standard click sound.
SND_CUSTOM | 2 | Custom click sound.

ClickSoundFile

string

The path to the video object's custom click sound file if it uses one.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Video.SetSize

Video.SetSize (

string ObjectName,

number Width,

number Height )

Description

Sets the size of a video object.

Parameters

ObjectName

(string) The name of the video object.

Width

(number) The new width of the video object in pixels.

Height

(number) The new height of the video object in pixels.

Returns

Nothing.


Video.SetVisible

Video.SetVisible (

string ObjectName,

boolean Visible = true )

Description

Sets the visibility of a video object.

Note: This action simply controls the visibility of the object and does not affect its play state. For example, if you hide an object while it is playing, it will continue to play even though it's not visible.

Parameters

ObjectName

(string) The name of the video object.

Visible

(boolean) Whether to make the video object visible or invisible:

VALUE | DESCRIPTION
true | Visible. (Default)
false | Invisible.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Video.SetVolume

Video.SetVolume (

string ObjectName,

number Volume )

Description

Sets the volume level of a video object.

Parameters

ObjectName

(string) The name of the video object.

Volume

(number) The volume level represented by a number between 0 and 100. The value 0 is silent and 100 is the loudest.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Video.Stop

Video.Stop (

string ObjectName )

Description

Stops the playback of the video in a video object.

Parameters

ObjectName

(string) The name of the video object.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Web.Back

Web.Back (

string ObjectName )

Description

Navigates one page back in a web object.

Parameters

ObjectName

(string) The name of the web object.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Web.Forward

Web.Forward (

string ObjectName )

Description

Navigates one page forward in a web object.

Parameters

ObjectName

(string) The name of the web object.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Web.GetPos

table Web.GetPos (

string ObjectName )

Description

Returns the X and Y page or dialog coordinates of a web object in pixels. This coordinate refers to the upper left hand corner of the object's bounding box relative to the page or dialog.

Note: The upper left hand corner of a page or dialog has X and Y coordinates of 0.

Parameters

ObjectName

(string) The name of the web object.

Returns

(table) A table containing the object's current coordinates, indexed by values X and Y. If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Web.GetProperties

table Web.GetProperties (

string ObjectName )

Description

Returns a table containing the properties of a web object.

Parameters

ObjectName

(string) The name of the web object.

Returns

(table) A table containing the web's properties, indexed by the following keys:

KEY | TYPE | DESCRIPTION
URL | string | The current URL displayed in the web object.
ObjectName | string | The name of the web object.
ShowBorder | boolean | True if a border is shown, false if it is not.
ShowScrollbars | boolean | True if vertical and horizontal scrollbars are shown, false if they are not.
Enabled | boolean | True if the web object is enabled, false if it is not.
Visible | boolean | True if the web object is visible, false if it is not.
X | number | The horizontal position (in pixels) of the top left corner of the web object in relation to the current page or dialog. Note: The top left corner of the current page or dialog has an X value of 0
Y | number | The vertical position (in pixels) of the top left corner of the web object in relation to the current page or dialog. Note: The top left corner of the current page or dialog has a Y value of 0
Width | number | The width (in pixels) of the web object.
Height | number | The height (in pixels) of the web object.
ResizeLeft | boolean | True if the left side of the object will move when the application is resized, false if it is not.
ResizeRight | boolean | True if the right side of the object will move when the application is resized, false if it is not.
ResizeTop | boolean | True if the top of the object will move when the application is resized, false if it is not.
ResizeBottom | boolean | True if the bottom of the object will move when the application is resized, false if it is not.
WindowHandle | number | The integer value that represents the object's window. (Commonly referred to as an hWnd.)

If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Web.GetSize

table Web.GetSize (

string ObjectName )

Description

Returns the pixel dimensions of a web object.

Parameters

ObjectName

(string) The name of the web object.

Returns

(table) A table containing the object's pixel dimensions, indexed by values "Width" and "Height". If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Web.GetURL

string Web.GetURL (

string ObjectName )

Description

Gets the URL that is currently displayed in a web object.

Note: If the web object is displaying a local file, this action will return the full path to that file in the standard URL format, i.e. file:/// followed by the full path to the file. (For more information, see the netspace.org URL guide.)

Parameters

ObjectName

(string) The name of the web object.

Returns

(string) The URL of the file that is currently displayed in the web object. If an error occurs, a blank string "" is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Web.IsEnabled

boolean Web.IsEnabled (

string ObjectName )

Description

Returns true if a specific web object is enabled, or false if it's disabled.

Note: When a web object is disabled, it doesn't respond to the user at all.

Parameters

ObjectName

(string) The name of the web object.

Returns

(boolean) True if the web object is enabled, false if it is disabled. If an error occurs, false will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Web.IsSilent

boolean Web.IsSilent (

string ObjectName )

Description

Returns true if a specific web object is silent, or false if it's not.

Parameters

ObjectName

(string) The name of the web object.

Returns

(boolean) True if the web object is silent, false if it's not. If an error occurs, false will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Web.IsVisible

boolean Web.IsVisible (

string ObjectName )

Description

Returns true if a specific web object is visible, and false if it isn't.

Parameters

ObjectName

(string) The name of the web object.

Returns

(boolean) True if the web object is visible, false if it's invisible. If an error occurs, false will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Web.LoadHTML

boolean Web.LoadHTML (

string ObjectName,

string HTML )

Description

Loads a string of HTML into a web object. In order for the action to succeed the Web object must have a valid window handle. This means that the object must be visible and that this action should happen after the page's "On Show" event.

Parameters

ObjectName

(string) The name of the web object.

HTML

(string) The HTML that will be loaded into the web object.

Returns

(boolean) True if successful, or false if it failed. You can use Application.GetLastError to determine why this action failed.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Web.LoadURL

Web.LoadURL (

string ObjectName,

string URL )

Description

Loads a local file or web-based URL into a web object.

Note: You cannot load a file or URL into a disabled web object. You must enable the object before loading the URL using the Web.SetEnabled action.

Note: If you want to use a named anchor on a relative path, it will fail. You must use the full path in order for this to work. For example, the following will not work:
Web.LoadURL("Web1", "AutoPlay\\Docs\\index.html#news");

It must be specified as:
Web.LoadURL("Web1", _SourceFolder.."\\AutoPlay\\Docs\\index.html#news");

Parameters

ObjectName

(string) The name of the web object.

URL

(string) The URL for the web page, or the path to the local file. Click the browse button to select a file.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Web.Print

Web.Print (

string ObjectName,

boolean DefaultPrinter = true )

Description

Prints the web page that is currently displayed in a web object.

Parameters

ObjectName

(string) The name of the web object.

DefaultPrinter

(boolean) Whether to print using the user's default printer:

VALUE | DESCRIPTION
true | Automatically print with the user's default printer. (Default)
false | Display the "Print" dialog so the user can select which printer to use.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Web.Refresh

Web.Refresh (

string ObjectName )

Description

Refreshes a web object.

Note: This is just like clicking the "Refresh" button in Internet Explorer to reload the current web page.

Parameters

ObjectName

(string) The name of the web object.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Web.SetEnabled

Web.SetEnabled (

string ObjectName,

boolean Enabled = true )

Description

Sets the enabled/disabled state of a web object.

Note: When a web object is disabled, it doesn't respond to the user at all.

Parameters

ObjectName

(string) The name of the web object.

Enabled

(boolean) Whether to make the web object enabled or disabled:

VALUE | DESCRIPTION
true | Enabled. (Default)
false | Disabled.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Web.SetPos

Web.SetPos (

string ObjectName,

number X,

number Y )

Description

Sets the X and Y pixel coordinates of a web object relative to the page or dialog.

Parameters

ObjectName

(string) The name of the web object.

X

(number) The new X pixel coordinate (horizontal position) to set for the web object. This is the X coordinate of the upper left hand corner of the object's bounding box relative to the page or dialog.

Y

(number) The new Y pixel coordinate (vertical position) to set for the web object. This is the Y coordinate of the upper left hand corner of the object's bounding box relative to the page or dialog.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Web.SetProperties

Web.SetProperties (

string ObjectName,

table Properties )

Description

Sets the properties of a web object.

Parameters

ObjectName

(string) The name of the web object.

Properties

(table) A table containing the web object's properties indexed by the following keys:

KEY | TYPE | DESCRIPTION
URL | string | The URL to load into the web object
ShowBorder | boolean | True if the object should show a border, false if it should not.
ShowScrollbars | boolean | True if the object should show vertical and horizontal scrollbars, false if it should not.
Enabled | boolean | True if the web object should be enabled, false if it should not be.
Visible | boolean | True if the web object should be visible, false if it should not be.
X | number | The horizontal position (in pixels) of the top left corner of the web object in relation to the current page or dialog. Note: The top left corner of the current page or dialog has an X value of 0
Y | number | The vertical position (in pixels) of the top left corner of the web object in relation to the current page or dialog. Note: The top left corner of the current page or dialog has a Y value of 0
Width | number | The width (in pixels) of the web object.
Height | number | The height (in pixels) of the web object.
ResizeLeft | boolean | True if the left side of the object should move when the application is resized, false if it should not.
ResizeRight | boolean | True if the right side of the object should move when the application is resized, false if it should not.
ResizeTop | boolean | True if the top of the object should move when the application is resized, false if it should not.
ResizeBottom | boolean | True if the bottom of the object should move when the application is resized, false if it should not.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Web.SetSilent

Web.SetSilent (

string ObjectName,

boolean Silent = true )

Description

Sets whether or not the web object will display dialogs, including error dialogs.

Parameters

ObjectName

(string) The name of the web object.

Silent

(boolean) Whether to make the web object silent:

VALUE | DESCRIPTION
true | Silent. (Default)
false | Not Silent.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Web.SetSize

Web.SetSize (

string ObjectName,

number Width,

number Height )

Description

Sets the size of a web object.

Parameters

ObjectName

(string) The name of the web object.

Width

(number) The new width of the web object in pixels.

Height

(number) The new height of the web object in pixels.

Returns

Nothing.


Web.SetVisible

Web.SetVisible (

string ObjectName,

boolean Visible = true )

Description

Sets the visibility of a web object.

Note: This option simply controls the visibility of the object. The object will continue to respond to actions even though it is hidden.

Parameters

ObjectName

(string) The name of the web object.

Visible

(boolean) Whether to make the web object visible or invisible:

VALUE | DESCRIPTION
true | Visible. (Default)
false | Invisible.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Web.Stop

Web.Stop (

string ObjectName )

Description

Stops a web object.

Note: This is just like clicking the "Stop" button in Internet Explorer to interrupt the current download.

Parameters

ObjectName

(string) The name of the web object.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Window.Close

Window.Close (

number WndHandle,

number Method = CLOSEWND_SENDMESSAGE )

Description

Closes a specific window on the user's desktop.

Parameters

WndHandle

(number) The integer value that represents the specific window on the user's desktop. (Commonly referred to as an hWnd.)

Method

(number) How to close the window. Choose from:

CONSTANT | VALUE | DESCRIPTION
CLOSEWND_SENDMESSAGE | 0 | Send the program a WM_CLOSE message. This is exactly like clicking the "Close" button on the window's title bar. (Default)
CLOSEWND_TERMINATE | 1 | Immediately terminate the program's process. The state of global data maintained by the program's dynamic-link libraries (DLLs) may be compromised if this option is used. (When this option is selected, the AutoPlay application calls the Windows API function "TerminateProcess" to immediately terminate the specified program.)

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Window.EnumerateProcesses

table Window.EnumerateProcesses (

boolean TopLevel = true )

Description

Returns a table containing a list of all the currently running processes and their associated window handles.

Parameters

TopLevel

(boolean) Whether to return information from top level windows only:

VALUE | DESCRIPTION
true | Return the list for top level windows only. (Default)
false | Return the list for all available windows.

Note: In order for a window to be classified as a top level window, it must not have an owner window and must be visible.

Returns

(table) A table of window handles and the processes they belong to. In this table the window handles are the keys, and the values are the paths to the executables that spawned the processes. If an error occurs, or there were no processes (there should always be processes) nil is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Window.EnumerateTitles

table Window.EnumerateTitles (

boolean TopLevel = true )

Description

Returns a table containing the window handles and window titles of all of the open windows on the system.

Parameters

TopLevel

(boolean) Whether to return information from top level windows only:

VALUE | DESCRIPTION
true | Return the list for top level windows only. (Default)
false | Return the list for all available windows.

Note: In order for a window to be classified as a top level window, it must not have an owner window and must be visible.

Returns

(table) A table indexed by window handles, each containing its window title. If an error occurs or there are no windows, nil is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Window.GetPos

table Window.GetPos (

number WndHandle )

Description

Returns the X and Y screen coordinates of a window in pixels. This coordinate refers to the upper left hand corner of the window relative to the screen.

Note: The upper left hand corner of the screen has X and Y coordinates of 0.

Parameters

WndHandle

(number) The integer value that represents the specific window on the user's desktop. (Commonly referred to as an hWnd.)

Returns

(table) A table containing the window's current coordinates, indexed by values X and Y. If the window cannot be found or an error occurs, nil is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Window.GetSize

table Window.GetSize (

number WndHandle )

Description

Returns the pixel dimensions of a window.

Parameters

WndHandle

(number) The integer value that represents the specific window on the user's desktop. (Commonly referred to as an hWnd.)

Returns

(table) A table containing the window's pixel dimensions, indexed by values "Width" and "Height". If the window cannot be found, nil is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Window.Hide

Window.Hide (

number WndHandle )

Description

Hides a specific window given it's window handle.

Parameters

WndHandle

(number) The integer value that represents the specific window on the user's desktop. (Commonly referred to as an hWnd.)

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Window.Maximize

Window.Maximize (

number WndHandle )

Description

Maximizes a specific window given it's window handle. This is the same as clicking the "Maximize" button on the title bar of a window.

Parameters

WndHandle

(number) The integer value that represents the specific window on the user's desktop. (Commonly referred to as an hWnd.)

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Window.Minimize

Window.Minimize (

number WndHandle )

Description

Minimizes a specific window given it's window handle. This is the same as clicking the "Minimize" button on the title bar of a window.

Parameters

WndHandle

(number) The integer value that represents the specific window on the user's desktop. (Commonly referred to as an hWnd.)

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Window.Restore

Window.Restore (

number WndHandle )

Description

Restores a specific window given it's window handle. Restoring means that if the window is currently maximized or minimized, the window will be re-sized to it's original size and position.

Parameters

WndHandle

(number) The integer value that represents the specific window on the user's desktop. (Commonly referred to as an hWnd.)

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Window.SetMask

Window.SetMask (

number WindowHandle,

string MaskFile,

boolean FitToWindow = true,

number TransparentColor = 0 )

Description

Applies an image mask to the specified window. This allows you to change the shape of your application's window at runtime.

Note: On Windows 9x systems, this action will only work on AutoPlay created windows at runtime. This means masks cannot be applied to any windows belonging to other programs on Windows 9x systems.

Tip: You can use this action to change the shape of certain objects which are actually windows within your autoplay application. The following objects are technically windows within your application: Video, Flash, ComboBox, ListBox, Input, Tree, Progress, Web, PDF, QuickTime and xButton. You can get the window handles for any of these objects by using their respective GetProperties actions.

Parameters

WindowHandle

(number) The integer value that represents the specific window on the user's desktop. (Commonly referred to as an hWnd.)

MaskFile

(string) The path to the file to be used as the window mask.

Tip: Pass an empty string ("") as MaskFile to clear the window mask.

FitToWindow

(boolean) True if the mask file should be resized to match the dimensions of the window, false if it should not be. The default is true.

TransparentColor

(number) The decimal value of the color to use as the transparent color for your window mask. The default is 0 (black). Click the select button to bring up a color chooser.

Note: We recommend using black (0) as your window mask transparent color for ease of use. As well, always using the same color for all of your masks ensures compatibility.

Tip: You can calculate the decimal value of your transparent color from its hex value using the Math.HexColorToNumber action.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Window.SetOrder

Window.SetOrder (

number WndHandle,

number InsertAfter )

Description

Sets the z-order of a window relative to other visible windows on the system. This action can be used to control the order of overlapping windows on the desktop, so that a particular window displays on top, or behind another. The top-most window has the highest z-order.

Parameters

WndHandle

(number) The integer value that represents the specific window on the user's desktop. (Commonly referred to as an hWnd.)

InsertAfter

(number) The handle of the window to precede the window specified in WndHandle. Alternatively, you can use one of the following constants:

CONSTANT | VALUE | DESCRIPTION
HWND_BOTTOM | 1 | Places the window at the bottom of the z-order. If the WndHandle parameter identifies a topmost window, the window loses its topmost status and is placed at the bottom of all other windows.
HWND_NOTOPMOST | -2 | Places the window above all non-topmost windows (that is, behind all topmost windows). This flag has no effect if the window is already a non-topmost window. This window will be the topmost window until it loses focus.
HWND_TOP | 0 | Places the window at the top of the z-order.
HWND_TOPMOST | -1 | Places the window above all non-topmost windows. The window maintains its topmost position even when it is deactivated (loses focus).

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Window.SetPos

Window.SetPos (

number WndHandle,

number X,

number Y )

Description

Sets the X and Y pixel coordinates of a specific window relative to the screen.

Parameters

WndHandle

(number) The integer value that represents the specific window on the user's desktop. (Commonly referred to as an hWnd.)

X

(number) The new X pixel coordinate (horizontal position) to set for the window. This is the X coordinate of the upper left hand corner of the window relative to the screen.

Y

(number) The new Y pixel coordinate (vertical position) to set for the window. This is the Y coordinate of the upper left hand corner of the window relative to the screen.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Window.SetSize

Window.SetSize (

number WndHandle,

number Width,

number Height )

Description

Sets the size of a specific window given it's window handle.

Parameters

WndHandle

(number) The integer value that represents the specific window on the user's desktop. (Commonly referred to as an hWnd.)

Width

(number) The new width of the window in pixels.

Height

(number) The new height of the window in pixels.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Window.SetText

Window.SetText (

number WndHandle,

string Text )

Description

Sets the title text for a specific window. This text will be displayed in the window's title bar and task bar.

Parameters

WndHandle

(number) The integer value that represents the specific window on the user's desktop. (Commonly referred to as an hWnd.)

Text

(string) The text to display.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Window.Show

Window.Show (

number WndHandle )

Description

Shows a specific window given it's window handle. This action can be used to "show" a window after a Window.Hide action was performed.

Parameters

WndHandle

(number) The integer value that represents the specific window on the user's desktop. (Commonly referred to as an hWnd.)

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


xButton.GetImage

string xButton.GetImage (

string ObjectName )

Description

Returns the path to the image file that is currently displayed on an xButton object.

Parameters

ObjectName

(string) The name of the xButton object.

Returns

(string) The full path to the image file that is currently displayed on the xButton object. If an error occurs, a blank string "" will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


xButton.GetPos

table xButton.GetPos (

string ObjectName )

Description

Returns the X and Y page or dialog coordinates of an xButton object in pixels. This coordinate refers to the upper left hand corner of the object's bounding box relative to the page or dialog.

Note: The upper left hand corner of a page or dialog has X and Y coordinates of 0.

Parameters

ObjectName

(string) The name of the xButton object.

Returns

(table) A table containing the object's current coordinates, indexed by values X and Y. If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


xButton.GetProperties

table xButton.GetProperties (

string ObjectName )

Description

Returns a table containing the properties of an xButton object.

Parameters

ObjectName

(string) The name of the xButton object.

Returns

(table) A table containing the xButton's properties, indexed by the following keys:

KEY

TYPE

DESCRIPTION

ObjectName

string

The name of the xButton object.

Text

string

The text displayed on the xButton object.

ButtonImage

string

The full path to the image file displayed on the xButton object.

TextColor

number

The color of the text.

EnableMarkup

boolean

True if text markup is enabled, false if it is not.

FontName

string

The font name.

FontSize

number

The font size (in points).

FontStrikeout

boolean

True if the font is set to strikeout, false if it is not.

FontUnderline

boolean

True if the font is set to underline, false if it is not.

FontAntiAlias

boolean

True if the font is set to anti alias, false if it is not.

FontItalic

boolean

True if the font is set to italic, false if it is not.

FontWeight

number

The weight of the font (how 'dark' the text will appear):

CONSTANT | VALUE | DESCRIPTION
FW_DONTCARE | 0 | Font weight not specified.
FW_THIN | 100 | Font weight 'thin'.
FW_EXTRALIGHT | 200 | Font weight 'extra-light'.
FW_LIGHT | 300 | Font weight 'light'.
FW_NORMAL | 400 | Font weight 'normal'.
FW_MEDIUM | 500 | Font weight 'medium'.
FW_SEMIBOLD | 600 | Font weight 'semi-bold'.
FW_BOLD | 700 | Font weight 'bold'.
FW_EXTRABOLD | 800 | Font weight 'extra bold'.
FW_HEAVY | 900 | Font weight 'heavy'.

FontScript

number

The character set in use by the xButton object:

CONSTANT | VALUE | DESCRIPTION
ANSI_CHARSET | 0 | ANSI character set.
BALTIC_CHARSET | 186 | Baltic character set.
CHINESEBIG5_CHARSET | 136 | Chinese character set.
DEFAULT_CHARSET | 1 | Default character set.
EASTEUROPE_CHARSET | 238 | Eastern European character set.
GB2312_CHARSET | 134 | GB2312 character set.
GREEK_CHARSET | 161 | Greek character set.
HANGUL_CHARSET | 129 | Hangul character set.
MAC_CHARSET | 77 | MAC character set.
OEM_CHARSET | 255 | OEM character set.
RUSSIAN_CHARSET | 204 | Russian character set.
SHIFTJIS_CHARSET | 128 | Shiftjis character set.
SYMBOL_CHARSET | 2 | Symbol character set.
TURKISH_CHARSET | 162 | Turkish character set.

TextAlignment

number

The text alignment in use:

CONSTANT | VALUE | DESCRIPTION
XBTN_ALIGN_MIDDLE_LEFT | 0 | Text is middle left aligned.
XBTN_ALIGN_MIDDLE_RIGHT | 1 | Text is middle right aligned.
XBTN_ALIGN_MIDDLE_CENTER | 2 | Text is middle center aligned.
XBTN_ALIGN_TOP_LEFT | 3 | Text is top left aligned.
XBTN_ALIGN_TOP_RIGHT | 4 | Text is top right aligned.
XBTN_ALIGN_TOP_CENTER | 5 | Text is top center aligned.
XBTN_ALIGN_BOTTOM_LEFT | 6 | Text is bottom left aligned.
XBTN_ALIGN_BOTTOM_RIGHT | 7 | Text is bottom right aligned.
XBTN_ALIGN_BOTTOM_CENTER | 8 | Text is bottom center aligned.

ImageAlignment

number

The image alignment in use:

CONSTANT | VALUE | DESCRIPTION
XBTN_ALIGN_MIDDLE_LEFT | 0 | Image is middle left aligned.
XBTN_ALIGN_MIDDLE_RIGHT | 1 | Image is middle right aligned.
XBTN_ALIGN_MIDDLE_CENTER | 2 | Image is middle center aligned.
XBTN_ALIGN_TOP_LEFT | 3 | Image is top left aligned.
XBTN_ALIGN_TOP_RIGHT | 4 | Image is top right aligned.
XBTN_ALIGN_TOP_CENTER | 5 | Image is top center aligned.
XBTN_ALIGN_BOTTOM_LEFT | 6 | Image is bottom left aligned.
XBTN_ALIGN_BOTTOM_RIGHT | 7 | Image is bottom right aligned.
XBTN_ALIGN_BOTTOM_CENTER | 8 | Image is bottom center aligned.

ImageTextRelation

number

The relationship between the text and image:

CONSTANT | VALUE | DESCRIPTION
RELATION_OVERLAY | 0 | Image is displayed over top of the text.
RELATION_IMAGE_ABOVE_TEXT | 1 | Image is displayed above the text.
RELATION_TEXT_ABOVE_IMAGE | 2 | Text is displayed above the image.
RELATION_IMAGE_BEFORE_TEXT | 3 | Image is displayed before (to the left) of the text.
RELATION_TEXT_BEFORE_IMAGE | 4 | Text is displayed before (to the left) of the image.

Theme

number

The visual theme of the xButton:

CONSTANT | VALUE | DESCRIPTION
THEME_STANDARD | 0 | Standard theme.
THEME_FLAT | 1 | Flat theme.
THEME_ULTRA_FLAT | 2 | Ultra flat theme.
THEME_OFFICE_2000 | 3 | Office 2000 theme.
THEME_OFFICE_XP | 4 | Office XP theme.
THEME_OFFICE_2003 | 5 | Office 2003 theme.
THEME_OFFICE_2007 | 6 | Office 2007 theme.

Style

number

The style of the xButton object:

CONSTANT | VALUE | DESCRIPTION
BTNSTYLE_STANDARD | 0 | xButton is a standard button.
BTNSTYLE_TOGGLE | 1 | xButton is a toggle button.

ToggleState

number

The current toggle state of the xButton object.

CONSTANT | VALUE | DESCRIPTION
BTN_UP | 0 | xButton is in its up state.
BTN_DOWN | 1 | xButton is in its down state.

Enabled

boolean

True if the xButton object is enabled, false if it is not.

Visible

boolean

True if the xButton object is visible, false if it is not.

X

number

The horizontal position (in pixels) of the top left corner of the xButton object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has an X value of 0

Y

number

The vertical position (in pixels) of the top left corner of the xButton object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has a Y value of 0

Width

number

The width (in pixels) of the xButton object.

Height

number

The height (in pixels) of the xButton object.

TooltipText

string

The mouseover tooltip of the xButton object.

Cursor

number

The mouse cursor that will be displayed when the mouse is over the xButton object:

CONSTANT | VALUE | DESCRIPTION
CURSOR_ARROW | 0 | Standard mouse arrow cursor.
CURSOR_HAND | 1 | Hand cursor.
CURSOR_BLACK_ARROW | 2 | Black arrow cursor.
CURSOR_CROSSHAIR | 3 | Crosshair cursor.
CURSOR_EXPLORE | 4 | Explore cursor.
CURSOR_HELP | 5 | Help cursor.
CURSOR_MAGNIFY | 6 | Magnify cursor.
CURSOR_MEDIA | 7 | Media cursor.
CURSOR_MONEY | 8 | Money cursor.
CURSOR_NOTEPAD | 9 | Notepad cursor.
CURSOR_PENCIL | 10 | Pencil cursor.
CURSOR_PRINTER | 11 | Printer cursor.
CURSOR_SPEAKER | 12 | Speaker cursor.
CURSOR_UP_ARROW | 13 | Up arrow cursor.

ResizeLeft

boolean

True if the left side of the object will move when the application is resized, false if it is not.

ResizeRight

boolean

True if the right side of the object will move when the application is resized, false if it is not.

ResizeTop

boolean

True if the top of the object will move when the application is resized, false if it is not.

ResizeBottom

boolean

True if the bottom of the object will move when the application is resized, false if it is not.

HighlightSound

number

The type of sound that will be played when the mouse moves over the xButton object.

CONSTANT | VALUE | DESCRIPTION
SND_NONE | 0 | No highlight sound.
SND_STANDARD | 1 | Standard highlight sound.
SND_CUSTOM | 2 | Custom highlight sound.

HighlightSoundFile

string

The path to the xButton object's custom highlight sound file. If the xButton object does not use a custom sound, this value will be an empty string ("").

ClickSound

number

The type of sound that will be played when the mouse clicks the xButton object.

CONSTANT | VALUE | DESCRIPTION
SND_NONE | 0 | No click sound.
SND_STANDARD | 1 | Standard click sound.
SND_CUSTOM | 2 | Custom click sound.

ClickSoundFile

string

The path to the xButton object's custom click sound file. If the xButton object does not use a custom sound, this value will be an empty string ("").

WindowHandle

number

The integer value that represents the object's window. (Commonly referred to as an hWnd.)

If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


xButton.GetSize

table xButton.GetSize (

string ObjectName )

Description

Returns the pixel dimensions of an xButton object.

Parameters

ObjectName

(string) The name of the xButton object.

Returns

(table) A table containing the object's pixel dimensions, indexed by values "Width" and "Height." If the object cannot be found, nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


xButton.GetState

number xButton.GetState (

string ObjectName )

Description

Returns the up/down state of an xButton object.

Note: This action is only effective on toggle xButtons. You can change a xButton's type (standard or toggle) by changing the Style setting in the xButton's properties. Standard xButtons will always return the "up" state.

Parameters

ObjectName

(string) The name of the xButton object.

Returns

(number) The current state of the xButton:

CONSTANT | VALUE | DESCRIPTION
BTN_UP | 0 | xButton is up (normal).
BTN_DOWN | 1 | xButton is down (pressed).

If an error occurs, -1 will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


xButton.GetText

string xButton.GetText (

string ObjectName )

Description

Returns the text displayed on an xButton object.

Parameters

ObjectName

(string) The name of the xButton object.

Returns

(string) The text that is currently displayed on the xButton object. If an error occurs, a blank string "" will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


xButton.IsEnabled

boolean xButton.IsEnabled (

string ObjectName )

Description

Returns true if a specific xButton object is enabled, or false if it's disabled.

Note: When an xButton is disabled, it doesn't respond to user interaction.

Parameters

ObjectName

(string) The name of the xButton object.

Returns

(boolean) True if the xButton is enabled, false if it is disabled. If an error occurs, false will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


xButton.IsVisible

boolean xButton.IsVisible (

string ObjectName )

Description

Returns true if a specific xButton object is visible, or false if it isn't.

Parameters

ObjectName

(string) The name of the xButton object.

Returns

(boolean) True if the xButton is visible, false if it's invisible. If an error occurs, false will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


xButton.SetImage

xButton.SetImage (

string ObjectName,

string ButtonImage )

Description

Sets the image of an xButton object.

Parameters

ObjectName

(string) The name of the xButton object.

ButtonImage

(string) The path to the image file to set. Click the browse button to select a file. The xButton supports the following image formats: .bmp, .jpg, .png, .wmf, .gif and .ico (icon).

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


xButton.SetEnabled

xButton.SetEnabled (

string ObjectName,

boolean Enabled = true )

Description

Sets the enabled/disabled state of an xButton object.

Note: When an xButton is disabled, it doesn't respond to the user at all.

Parameters

ObjectName

(string) The name of the xButton object.

Enabled

(boolean) Whether to make the xButton object enabled or disabled:

VALUE | DESCRIPTION
true | Enabled. (Default)
false | Disabled.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


xButton.SetPos

xButton.SetPos (

string ObjectName,

number X,

number Y )

Description

Sets the X and Y pixel coordinates of an xButton object relative to the page or dialog.

Parameters

ObjectName

(string) The name of the xButton object.

X

(number) The new X pixel coordinate (horizontal position) to set for the xButton object. This is the X coordinate of the upper left hand corner of the object's bounding box relative to the page or dialog.

Y

(number) The new Y pixel coordinate (vertical position) to set for the xButton object. This is the Y coordinate of the upper left hand corner of the object's bounding box relative to the page or dialog.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


xButton.SetProperties

xButton.SetProperties (

string ObjectName,

table Properties )

Description

Sets the properties of an xButton object.

Parameters

ObjectName

(string) The name of the xButton object.

Properties

(table) A table containing the xButton object's properties indexed by the following keys:

KEY

TYPE

DESCRIPTION

Text

string

The text to display on the xButton object.

ButtonImage

string

The path to the image file to display on the xButton object. The xButton supports the following image formats: .bmp, .jpg, .png, .wmf, .gif and .ico (icon).

TextColor

number

The color of the text.

EnableMarkup

boolean

True if text markup should be enabled, false if it should not be.

FontName

string

The font name.

FontSize

number

The font size (in points).

FontStrikeout

boolean

True if the font should be set to strikeout, false if it should not be.

FontUnderline

boolean

True if the font should be set to underline, false if it should not be.

FontAntiAlias

boolean

True if the font should be set to anti-alias, false if it should not be.

FontItalic

boolean

True if the font should be set to italic, false if it should not be.

FontWeight

number

The weight of the font (how 'dark' the text will appear):

CONSTANT | VALUE | DESCRIPTION
FW_DONTCARE | 0 | Font weight not specified.
FW_THIN | 100 | Font weight 'thin'.
FW_EXTRALIGHT | 200 | Font weight 'extra-light'.
FW_LIGHT | 300 | Font weight 'light'.
FW_NORMAL | 400 | Font weight 'normal'.
FW_MEDIUM | 500 | Font weight 'medium'.
FW_SEMIBOLD | 600 | Font weight 'semi-bold'.
FW_BOLD | 700 | Font weight 'bold'.
FW_EXTRABOLD | 800 | Font weight 'extra bold'.
FW_HEAVY | 900 | Font weight 'heavy'.

FontScript

number

The character set to use by the xButton object:

CONSTANT | VALUE | DESCRIPTION
ANSI_CHARSET | 0 | ANSI character set.
BALTIC_CHARSET | 186 | Baltic character set.
CHINESEBIG5_CHARSET | 136 | Chinese character set.
DEFAULT_CHARSET | 1 | Default character set.
EASTEUROPE_CHARSET | 238 | Eastern European character set.
GB2312_CHARSET | 134 | GB2312 character set.
GREEK_CHARSET | 161 | Greek character set.
HANGUL_CHARSET | 129 | Hangul character set.
MAC_CHARSET | 77 | MAC character set.
OEM_CHARSET | 255 | OEM character set.
RUSSIAN_CHARSET | 204 | Russian character set.
SHIFTJIS_CHARSET | 128 | Shiftjis character set.
SYMBOL_CHARSET | 2 | Symbol character set.
TURKISH_CHARSET | 162 | Turkish character set.

TextAlignment

number

The text alignment to use:

CONSTANT | VALUE | DESCRIPTION
XBTN_ALIGN_MIDDLE_LEFT | 0 | Text is middle left aligned.
XBTN_ALIGN_MIDDLE_RIGHT | 1 | Text is middle right aligned.
XBTN_ALIGN_MIDDLE_CENTER | 2 | Text is middle center aligned.
XBTN_ALIGN_TOP_LEFT | 3 | Text is top left aligned.
XBTN_ALIGN_TOP_RIGHT | 4 | Text is top right aligned.
XBTN_ALIGN_TOP_CENTER | 5 | Text is top center aligned.
XBTN_ALIGN_BOTTOM_LEFT | 6 | Text is bottom left aligned.
XBTN_ALIGN_BOTTOM_RIGHT | 7 | Text is bottom right aligned.
XBTN_ALIGN_BOTTOM_CENTER | 8 | Text is bottom center aligned.

ImageAlignment

number

The image alignment to use:

CONSTANT | VALUE | DESCRIPTION
XBTN_ALIGN_MIDDLE_LEFT | 0 | Image is middle left aligned.
XBTN_ALIGN_MIDDLE_RIGHT | 1 | Image is middle right aligned.
XBTN_ALIGN_MIDDLE_CENTER | 2 | Image is middle center aligned.
XBTN_ALIGN_TOP_LEFT | 3 | Image is top left aligned.
XBTN_ALIGN_TOP_RIGHT | 4 | Image is top right aligned.
XBTN_ALIGN_TOP_CENTER | 5 | Image is top center aligned.
XBTN_ALIGN_BOTTOM_LEFT | 6 | Image is bottom left aligned.
XBTN_ALIGN_BOTTOM_RIGHT | 7 | Image is bottom right aligned.
XBTN_ALIGN_BOTTOM_CENTER | 8 | Image is bottom center aligned.

ImageTextRelation

number

The relationship between the text and image:

CONSTANT | VALUE | DESCRIPTION
RELATION_OVERLAY | 0 | Image is displayed over top of the text.
RELATION_IMAGE_ABOVE_TEXT | 1 | Image is displayed above the text.
RELATION_TEXT_ABOVE_IMAGE | 2 | Text is displayed above the image.
RELATION_IMAGE_BEFORE_TEXT | 3 | Image is displayed before (to the left) of the text.
RELATION_TEXT_BEFORE_IMAGE | 4 | Text is displayed before (to the left) of the image.

Theme

number

The visual theme of the xButton:

CONSTANT | VALUE | DESCRIPTION
THEME_STANDARD | 0 | Standard theme.
THEME_FLAT | 1 | Flat theme.
THEME_ULTRA_FLAT | 2 | Ultra flat theme.
THEME_OFFICE_2000 | 3 | Office 2000 theme.
THEME_OFFICE_XP | 4 | Office XP theme.
THEME_OFFICE_2003 | 5 | Office 2003 theme.
THEME_OFFICE_2007 | 6 | Office 2007 theme.

Style

number

The style of the xButton object:

CONSTANT | VALUE | DESCRIPTION
BTNSTYLE_STANDARD | 0 | xButton is a standard button.
BTNSTYLE_TOGGLE | 1 | xButton is a toggle button.

ToggleState

number

The current toggle state of the xButton object.

CONSTANT | VALUE | DESCRIPTION
BTN_UP | 0 | xButton is in its up state.
BTN_DOWN | 1 | xButton is in its down state.

Enabled

boolean

True if the xButton object should be enabled, false if it should not be.

Visible

boolean

True if the xButton object should be visible, false if it should not be.

X

number

The horizontal position (in pixels) of the top left corner of the xButton object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has an X value of 0

Y

number

The vertical position (in pixels) of the top left corner of the xButton object in relation to the current page or dialog.

Note: The top left corner of the current page or dialog has a Y value of 0

Width

number

The width (in pixels) of the xButton object.

Height

number

The height (in pixels) of the xButton object.

TooltipText

string

The mouseover tooltip of the xButton object.

Cursor

number

The mouse cursor to display when the mouse is over the xButton object:

CONSTANT | VALUE | DESCRIPTION
CURSOR_ARROW | 0 | Standard mouse arrow cursor.
CURSOR_HAND | 1 | Hand cursor.
CURSOR_BLACK_ARROW | 2 | Black arrow cursor.
CURSOR_CROSSHAIR | 3 | Crosshair cursor.
CURSOR_EXPLORE | 4 | Explore cursor.
CURSOR_HELP | 5 | Help cursor.
CURSOR_MAGNIFY | 6 | Magnify cursor.
CURSOR_MEDIA | 7 | Media cursor.
CURSOR_MONEY | 8 | Money cursor.
CURSOR_NOTEPAD | 9 | Notepad cursor.
CURSOR_PENCIL | 10 | Pencil cursor.
CURSOR_PRINTER | 11 | Printer cursor.
CURSOR_SPEAKER | 12 | Speaker cursor.
CURSOR_UP_ARROW | 13 | Up arrow cursor.

ResizeLeft

boolean

True if the left side of the object should move when the application is resized, false if it should not.

ResizeRight

boolean

True if the right side of the object should move when the application is resized, false if it should not.

ResizeTop

boolean

True if the top of the object should move when the application is resized, false if it should not.

ResizeBottom

boolean

True if the bottom of the object should move when the application is resized, false if it should not.

HighlightSound

number

The type of sound to play when the mouse moves over the xButton object.

CONSTANT | VALUE | DESCRIPTION
SND_NONE | 0 | No highlight sound.
SND_STANDARD | 1 | Standard highlight sound.
SND_CUSTOM | 2 | Custom highlight sound.

HighlightSoundFile

string

The path to the xButton object's custom highlight sound file. If the xButton object does not use a custom sound, this value will be an empty string ("").

ClickSound

number

The type of sound to play when the mouse clicks the xButton object.

CONSTANT | VALUE | DESCRIPTION
SND_NONE | 0 | No click sound.
SND_STANDARD | 1 | Standard click sound.
SND_CUSTOM | 2 | Custom click sound.

ClickSoundFile

string

The path to the xButton object's custom click sound file. If the xButton object does not use a custom sound, this value will be an empty string ("").

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


xButton.SetSize

xButton.SetSize (

string ObjectName,

number Width,

number Height )

Description

Sets the size of an xButton object.

Parameters

ObjectName

(string) The name of the xButton object.

Width

(number) The new width of the object in pixels.

Height

(number) The new height of the object in pixels.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


xButton.SetState

xButton.SetState (

string ObjectName,

number State = BTN_UP )

Description

Sets the up/down state of an xButton object.

Note: This action is only effective on toggle xButtons. You can change an xButton's type (standard or toggle) by changing the Style setting in the xButton's properties.

Parameters

ObjectName

(string) The name of the xButton object.

State

(number) The new state of the xButton:

CONSTANT | VALUE | DESCRIPTION
BTN_UP | 0 | xButton is up (normal). (default)
BTN_DOWN | 1 | xButton is down (pressed).

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


xButton.SetText

xButton.SetText (

string ObjectName,

string Text )

Description

Sets the text that you want to display on the xButton object. If the object has markup enabled, you can specify the desired text and formatting using supported Extensible Application Markup Language (XAML) syntax.

Parameters

ObjectName

(string) The name of the xButton object to set.

Text

(string) The text to display. If markup is enabled, the text must be formatted as XAML.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


xButton.SetVisible

xButton.SetVisible (

string ObjectName,

boolean Visible = true )

Description

Sets the visibility of an xButton object.

Parameters

ObjectName

(string) The name of the xButton object.

Visible

(boolean) Whether to make the xButton visible or invisible:

VALUE | DESCRIPTION
true | Visible. (Default)
false | Invisible.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


XML.Count

number XML.Count (

string XMLPath,

string ElementName )

Description

Counts the number of elements below a given XML path that match a given element name.

Note: For more information on the XML actions, see the XML Actions Concepts topic.

Parameters

XMLPath

(string) The full path to the element whose children you want to count.

ElementName

(string) The element name (tag name) that you want to search for. Only elements that match will be counted. Use * to match any name.

Returns

(number) The number of matching child elements found. If an error occurs, -1 is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


XML.GetAttribute

string XML.GetAttribute (

string XMLPath,

string AttributeName )

Description

Returns the value of an element's attribute.

Note: For more information on the XML actions, see the XML Actions Concepts topic.

Parameters

XMLPath

(string) The full path to the element whose attribute names you want to retrieve.

AttributeName

(string) The full path to the element whose attribute you want to retrieve.

Returns

(string) The value of the specified element's attribute. If an element has no attribute or an error occurs, an empty string ("") is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


XML.GetAttributeNames

table XML.GetAttributeNames (

string XMLPath )

Description

Returns the names of an element's attributes in a numerically indexed table.

Note: For more information on the XML actions, see the XML Actions Concepts topic.

Parameters

XMLPath

(string) The full path to the element whose attribute names you want to retrieve.

Returns

(table) A numerically indexed table containing the names of the specified element's attributes. If the element doesn't contain any attributes or an error occurs, nil is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


XML.GetElementNames

table XML.GetElementNames (

string XMLPath,

boolean FullPaths = false

boolean IncludeIndices = false )

Description

Returns a numerically indexed table containing the names of all child elements contained within a specific element.

Note: For more information on the XML actions, see the XML Actions Concepts topic.

Parameters

XMLPath

(string) The full path to the element whose child elements you want to find.

FullPaths

(boolean) Whether to return the full paths of the child elements, or just the element names:

VALUE | DESCRIPTION
true | Return the full paths of the child elements.
false | Return just the element names. (Default)

IncludeIndices

(boolean) Whether to append the delimiter and index (e.g. ":3") to each element name:

VALUE | DESCRIPTION
true | Append the delimiter and index to each element name.
false | Return just the element names. (Default)

Returns

(table) A numerically indexed table containing the names of all child elements contained within the specified element. If there are no child elements or an error occurs, nil is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


XML.GetElementXML

string XML.GetElementXML (

string XMLPath )

Description

Returns the raw XML of an element, i.e. the plain-text XML code for the element and all of its children.

Note: For more information on the XML actions, see the XML Actions Concepts topic.

Parameters

XMLPath

(string) The full path to the element whose XML you want to retrieve.

Returns

(string) The XML code for the entire element and all of its children. If the element doesn't exist, or an error occurs, an empty string ("") is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


XML.GetValue

string XML.GetValue (

string XMLPath )

Description

Returns the value of an element.

Note: For more information on the XML actions, see the XML Actions Concepts topic.

Parameters

XMLPath

(string) The full path to the element whose value you want to retrieve.

Returns

(string) The value of the specified element. If the element contains no value, or an error occurs, an empty string ("") is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


XML.GetXML

string XML.GetXML (

)

Description

Returns the currently loaded XML document as a string.

Note: For more information on the XML actions, see the XML Actions Concepts topic.

Parameters

None.

Returns

(string) A string containing the currently loaded XML document. If no document is loaded or an error occurs, an empty string ("") is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


XML.InsertXML

XML.InsertXML (

string XMLPath,

string Text,

number InsertionMode )

Description

Inserts raw XML code into a specific location in the currently loaded document.

Note: For more information on the XML actions, see the XML Actions Concepts topic.

Parameters

XMLPath

(string) The path to the element where you want to insert the XML text. You can insert the XML before this element, insert it after this element, or replace the element (and all its children) with the new XML text.

Text

(string) The XML text that you want to insert.

InsertionMode

(number) The insertion mode to use:

CONSTANT | VALUE | DESCRIPTION
XML.INSERT_BEFORE | 0 | Insert the new XML text before the specified element.
XML.INSERT_AFTER | 1 | Insert the new XML text after the specified element.
XML.REPLACE | 2 | Replace the specified element's XML text with the new XML text.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


XML.Load

XML.Load (

string Filename )

Description

Loads an XML file into memory so it can be processed.

Note: For more information on the XML actions, see the XML Actions Concepts topic.

Parameters

Filename

(string) The full path to the XML file.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


XML.RemoveAttribute

XML.RemoveAttribute (

string XMLPath,

string AttributeName )

Description

Removes a specific attribute from an element.

Note: For more information on the XML actions, see the XML Actions Concepts topic.

Parameters

XMLPath

(string) The path to the element whose attribute you want to remove.

AttributeName

(string) The name of the attribute you want to remove.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


XML.RemoveElement

XML.RemoveElement (

string XMLPath )

Description

Removes a specific element (and its children) from the currently loaded XML document.

Note: For more information on the XML actions, see the XML Actions Concepts topic.

Parameters

XMLPath

(string) The path to the element you want to remove.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


XML.Save

XML.Save (

string Filename )

Description

Saves the currently loaded XML document to a file.

Note: For more information on the XML actions, see the XML Actions Concepts topic.

Parameters

Filename

(string) The full path for the XML file.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


XML.SetAttribute

XML.SetAttribute (

string XMLPath,

string AttributeName,

string AttributeValue )

Description

Sets the value of an element's attribute.

Note: For more information on the XML actions, see the XML Actions Concepts topic.

Parameters

XMLPath

(string) The path to the element whose attribute you want to set.

AttributeName

(string) The name of the attribute you want to set.

AttributeValue

(string) The value you want the attribute to have.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


XML.SetValue

XML.SetValue (

string XMLPath,

string Value,

boolean WriteCDATA = false )

Description

Sets the value of an element.

Note: For more information on the XML actions, see the XML Actions Concepts topic.

Parameters

XMLPath

(string) The full path to the element whose value you want to set.

Value

(string) The value you want the element to have.

WriteCDATA

(boolean) Whether to write the data as a CDATA section:

VALUE | DESCRIPTION
true | Write the data as a CDATA section.
false | Don't write the data as CDATA. (Default)

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


XML.SetXML

XML.SetXML (

string Text )

Description

Sets the currently loaded XML document to the contents of a string (overwriting its current contents).

Note: For more information on the XML actions, see the XML Actions Concepts topic.

Parameters

Text

(string) The XML document. This will replace the contents of the currently loaded XML document.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Zip.Add

Zip.Add (

string ZipFile,

table Files,

boolean IncludeFolderNames = true,

string Password = "",

number CompFactor = 5,

function CallbackFunction = nil,

boolean Recurse = false )

Description

Adds files to a Zip archive.

Parameters

ZipFile

(string) The full path and file name of the Zip archive file.

Files

(table) A table containing the full paths to all of the files you want to add. You can also use the * and ? wildcards in this table to add all files from one directory, for example, {"C:\\MyFolder\\*.*"}.

When a wildcard is used, each file will be added relative to the base folder. For example, if the file table references {"C:\\MyFolder\\*.*"} and "MyFolder" contains one file called "One.txt" and a folder called "MyInsideFolder" containing a file "Two.txt", the base folder would be "MyFolder". If you want to recurse subfolders, the Recurse parameter must be set to true.

IncludeFolderNames

(boolean) Whether to preserve the relative directory structure in the archive when adding files with wildcards.

VALUE | DESCRIPTION
true | Include relative folder names so the structure can be recreated. (Default)
false | Don't include any relative folder names. (The Zip archive will have no internal directory structure.)

For example, given two files located at:

C:\MyFolder\One.txt
C:\MyFolder\MyInsideFolder\Two.txt

If the file table references {"C:\\MyFolder\\*.*"} and IncludeFolderNames and Recurse is set to true, the Zip archive structure would be:

One.txt
MyInsideFolder\Two.txt

If IncludeFolderNames is set to false, the Zip archive structure would be:

One.txt
Two.txt

Note: If no wildcards are used, no relative folder names will be preserved.

Password

(string) The password to use to protect the Zip file. This password will be needed to extract the files. (This parameter is optional. If you don't want to protect the Zip file, just leave this parameter blank.)

CompFactor

(number) The compression factor to use for the Zip file (0-9). 0 is the fastest and compresses the least, 9 is the slowest and compresses the most. The default is 5.

CallbackFunction

(function) The name of a function that will be called whenever progress is made in adding a file to the Zip archive. (You can use this callback function to display the progress of each file's archiving in your own custom way.)

Note: If CallbackFunction is set to nil, then the progress information will be sent to the built-in status dialog, assuming it is currently visible. (You can show or hide the status dialog with a StatusDlg.Show or StatusDlg.Hide action.)

The callback function must be able to receive the following parameters:

String

(string) The full path and file name currently being added to the Zip archive.

Percent

(number) The progress percentage, corresponding to either the current file or the total action.

Status

(number) The status of the current callback message. Either ZIP_STATUS_MAJOR (value of 0) or ZIP_STATUS_MINOR (value of 1). ZIP_STATUS_MAJOR means that the callback corresponds to the progress of the action as a whole. ZIP_STATUS_MINOR means that the callback corresponds to the progress of the current file.

The callback function should return a boolean value (true or false) indicating whether the archiving of the Zip file should continue:

VALUE | DESCRIPTION
true | Continue with the Zip file archiving.
false | Stop the Zip file archiving as soon as possible.

Recurse

(boolean) Whether to recurse subfolders when wildcards are used:

VALUE | DESCRIPTION
true | Recurse subfolders when wildcards are used.
false | Don't recurse subfolders, even if a wildcard is used. (Default)

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Zip.Extract

Zip.Extract (

string ZipFile,

table Files,

string Destination,

boolean Recurse = true,

boolean UseInternalFolders = true,

string Password = "",

number Overwrite = 0,

function CallbackFunction = nil )

Description

Extracts files from a Zip archive.

Parameters

ZipFile

(string) The full path and file name of the Zip archive file.

Files

(table) A table containing the list of files to extract. Use {"*.*"} to extract all files from the Zip archive.

Note: You can also use the * and ? wildcards in the table to extract multiple files.

Destination

(string) The folder path to extract the files to.

Recurse

(boolean) Whether to recurse into subfolders as it searches for files to extract:

VALUE | DESCRIPTION
true | Recurse into subfolders when extracting files. (Default)
false | Don't recurse into subfolders.

Note: This is primarily useful when wildcards are used in the files you want to extract.

UseInternalFolders

(boolean) Whether to recreate the internal file structure of the Zip file when extracting files:

VALUE | DESCRIPTION
true | The internal file structure will be recreated. (Default)
false | The internal file structure will be ignored and all files will be extracted to the root of the destination folder.

Password

(string) The password required to extract files from the Zip file. (This parameter is optional and only needed if you password protected the Zip file. If no password is required, just leave this parameter blank. )

Overwrite

(number) Whether to overwrite any already existing files in the destination folder when extracting. Choose from:

CONSTANT | VALUE | DESCRIPTION
ZIP_OVERWRITE_NEVER | 0 | Do not overwrite any files. (Default)
ZIP_OVERWRITE_NEWER | 1 | Only overwrite a file if the one being extracted is newer.
ZIP_OVERWRITE_ALWAYS | 2 | Overwrite all existing files with the ones being extracted.

CallbackFunction

(function) The name of a function that will be called whenever progress is made when extracting each file from the Zip archive. (You can use this callback function to display the progress of each file's extraction in your own custom way.)

Note: If CallbackFunction is set to nil, then the progress information will be sent to the built-in status dialog, assuming it is currently visible. (You can show or hide the status dialog with a StatusDlg.Show or StatusDlg.Hide action.)

The callback function must be able to receive the following parameters:

String

(string) The full destination path and file name currently being extracted from the Zip archive.

Percent

(number) The progress percentage, corresponding to either the current file or the total action.

Status

(number) The status of the current callback message. Either ZIP_STATUS_MAJOR (value of 0) or ZIP_STATUS_MINOR (value of 1). ZIP_STATUS_MAJOR means that the callback corresponds to the progress of the action as a whole. ZIP_STATUS_MINOR means that the callback corresponds to the progress of the current file.

The callback function should return a boolean value (true or false) indicating whether the extraction of the Zip file should continue:

VALUE | DESCRIPTION
true | Continue with the Zip file extraction.
false | Stop the Zip file extraction as soon as possible.

Returns

Nothing. You can use Application.GetLastError to determine whether this action failed, and why.


Zip.GetContents

table Zip.GetContents (

string ZipFile,

boolean IncludeFolderNames = true )

Description

Returns the list of files within a given Zip file.

Parameters

ZipFile

(string) The full path and file name of the Zip archive file.

IncludeFolderNames

(boolean) Whether to include any folders in the list:

VALUE | DESCRIPTION
true | Any internal folders will be included in the list as separate entries. (Default)
false | Any internal folders will be omitted from the list. (The file paths will still have folder names in them, however the folders will not be included as separate entries.)

Returns

(table) A table containing a list of the contents of the Zip file. If the Zip file is empty or an error occurs, nil is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.


Error Codes

Actions

Overview Alphabetical List Error Codes

The following is a categorical list of all of the error codes that may be returned when calling actions in AutoPlay Media Studio:

Note: All of the error code messages are stored in a table called _tblErrorMessages and can be accessed by their error code index. For example, accessing the table index _tblErrorMessages[1000] will access the error code string "The specified file could not be found."

(9999) Unknown Error Codes

(1000-1099) File Related

(1100-1199) Generic Object Related

(1200-1299) Audio Related

(1300-1399) Page Related

(1400-1499) Status Dialog Related

(1500-1599) INI File Related

(1600-1699) Registry Related

(1700-1799) ListBox Related

(1800-1899) System Related

(1900-1999) Text File Related

(2000-2099) Window Related

(2100-2199) Drive Related

(2200-2299) Folder Action Related

(2300-2399) Shell Action Related

(2400-2499) DLL Related

(2500-2599) HTTP/FTPWI Related

(2600-2699) ZIP File Related

(2700-2799) Dialog Related

(2800-2899) Application Related

(2900-2999) Internal Function Related

(3000-3099) String Related

(3300-3399) Math Related

(3400-3499) Tree Related

(4200-4299) MSI Related

(4300-4399) RichText Related

(4400-4499) SlideShow Related

(5000-5499) DialogEx Related

(6000-6099) Service Related

(7000-7099) QuickTime Related

(8000-8099) PDF Related

(12400-12499) Grid Related

(34000-34099) Crypto Related

(37000-37099) XML Related

(77000-77099) ComboBox Related

Unknown Error Codes (9999)

9999

"Unknown error."

File Related (1000-1099)

1000

"The specified file could not be found."

1001

"Failed to load file."

1002

"The specified path was not found."

1003

"The .exe file is invalid (non-Win32 .exe or error in .exe image)."

1004

"The operating system denied access to the specified file."

1005

"The file name association is incomplete or invalid."

1006

"The DDE transaction could not be completed because other DDE transactions were being processed."

1007

"The DDE transaction failed."

1008

"The DDE transaction could not be completed because the request timed out."

1009

"The specified dynamic-link library was not found."

1011

"There is no application associated with the given file name extension. This error will also be returned if you attempt to print a file that is not printable."

1012

"There was not enough memory to complete the operation."

1013

"File execution failed."

1014

"A sharing violation occurred."

1015

"Could not determine viewer class name."

1016

"Could not determine viewer command line."

1017

"Associated viewer was not an executable file."

1018

"Associated viewer executable does not exist."

1019

"Invalid source specified."

1020

"Invalid destination specified."

1021

"Source file(s) does not exist."

1022

"Destination directory does not exist."

1023

"Failed to copy one or more files."

1024

"Failed to delete one or more files."

1025

"Failed to schedule delete on reboot."

1026

"Failed to schedule move on reboot."

1027

"Operation aborted by user."

1028

"An error occurred while calling the callback function."

1029

"Error, the callback function could not be found."

1030

"Could not get the size of the version information."

1031

"Could not get the file version information."

1032

"The specified filename contains invalid characters."

1033

"The destination file already exists."

1034

"An unknown error occurred."

1035

"Run on reboot command failed, could not open key."

1036

"Run on reboot command failed, could not set value."

1037

"Could not set the file's attributes."

1038

"Could not set file's compressed attribute."

1039

"Could not create destination Folder."

1040

"Could not create a backup of one or more files."

1041

"Out of memory."

1045

"File execution failed, elevation required."

Note: This return code is only valid on Windows Vista or later.

Generic Object Related (1100-1199)

1100

"The specified object could not be found."

1101

"Play command failed."

1102

"Pause command failed."

1103

"Media does not support seeking."

1104

"Seek command failed."

1105

"Stop command failed."

1106

"Could not display dialog."

1107

"File is too large to read."

1108

"The specified file could not be opened"

1109

"The image file could not be found"

1110

"Could not determine the size of the media."

1115

"Exception thrown by internal control."

1118

"Action cannot be performed on disabled object."

1120

"Failed to create object, an object with that name already exists."

1123

"Failed to create object, invalid object type."

1126

"Failed to create object."

1128

"The specified event could not be found."

1130

"Invalid z-order position value."

1140

"Error plugin version not supported."

Audio Related (1200-1299)

1200

"The specified channel is out of range."

1201

"Audio channel is not loaded."

1202

"Set volume command failed."

1203

"Could not determine volume level."

1204

"Error CHANNEL_ALL not supported for the Audio.Load action."

1205

"Error CHANNEL_ALL not supported for the Audio.GetVolume action."

1206

"Error CHANNEL_ALL not supported for the Audio.GetCurrentPos action."

1207

"Error CHANNEL_ALL not supported for the Audio.Seek action."

1208

"Could not determine audio file's length."

1209

"Could not determine the playback position."

1210

"Error CHANNEL_ALL not supported for the Audio.GetOggTags action."

1211

"Error sound system not initialized."

1212

"Error file does not appear to be of type Ogg-Vorbis."

Page Related (1300-1399)

1300

"The specified page does not exist."

1301

"Could not resolve the current page."

1302

"No radiobutton in specified group."

1303

"Error, cannot navigate pages while a dialog is visible."

Status Dialog Related (1400-1499)

1400

"Could not show status dialog."

1401

"Could not hide status dialog."

1402

"Could not set the status text on the status dialog."

1403

"Could not set the progress meter's range on the status dialog."

1404

"Could not set the progress meter's position on the status dialog."

1405

"Could not set the message text on the status dialog."

1406

"Could not set the title text on the status dialog."

1407

"Could not get the position of the progress meter."

INI File Related (1500-1599)

1500

"Could not delete the specified INI file section."

1501

"Could not delete the specified INI file value."

1502

"Could not set the specified value."

Registry Related (1600-1699)

1600

"Could not create the specified Registry key."

1601

"Could not delete the specified Registry key."

1602

"Could not delete the specified Registry value."

1603

"The specified sub key does not exist."

1604

"Could not get the sub key names."

1605

"Could not get the specified value's data."

1606

"Could not get the value names."

1607

"Could not get the registry value's type."

1608

"Could not set the specified registry value's data."

ListBox Related (1700-1799)

1700

"Could not add item to ListBox object."

1701

"Could not insert item into ListBox object."

1702

"Index out of range."

1703

"Invalid list box type."

1704

"Invalid value for item checkbox."

System Related (1800-1899)

1800

"Could not get the OS Version information."

1801

"Could not reboot system. OS information not available."

1802

"Failure in LoadLibrary()."

1803

"GetProcAddress failed."

1804

"Failure code returned by DllRegisterServer."

1805

"Error in call to LoadTypeLib."

1806

"Error in call to RegisterTypeLib."

1807

"Error, font name cannot be empty."

1808

"Invalid font name."

1809

"Failed to add font to system font table."

1810

"Failed to add font to registry."

1811

"Failed to remove font from system font table."

1812

"Failed to remove font from registry."

1813

"Could not retrieve user information."

1814

"Unknown date format specified."

1815

"Unknown time format specified."

1816

"Unable to determine default language ID."

1817

"Unable to determine display info."

1818

"The server was unable to complete the registration of all the type libraries used by its classes."

1819

"The server was unable to complete the registration of all the object classes."

1820

"The server was unable to remove the entries of all the type libraries used by its classes."

1821

"The server was unable to remove the entries of all the object classes."

1822

"Failure code returned by DllUnregisterServer."

1823

"Failed to access the number of running processes."

1824

"Failed to enumerate the processes."

1825

"Failed to get the process handle."

1831

"Failed to access the number of running processes."

1832

"Failed to enumerate the processes."

1833

"Failed to get the process handle."

Text File Related (1900-1999)

1900

"Could not open text file."

1901

"The text file is too large to be read."

1902

"Error, could not save text file."

Window Related (2000-2099)

2000

"Error, window handle is not valid."

2001

"Error, could not hide window."

2002

"Error, could not maximize window."

2003

"Error, could not minimize window."

2004

"Error, could not restore window."

2005

"Error, could not show window."

2006

"Error, could not load transparency map file."

2007

"Error, could not set window mask."

Drive Related (2100-2199)

2100

"Error, could not eject drive, action not supported."

2101

"Error, could not calculate free space."

2102

"Error, could not calculate total size."

2103

"Error, could not calculate used space."

2104

"Failed to get volume information."

Folder Action Related (2200-2299)

2200

"Could not create folder."

2201

"The specified folder does not exist."

2202

"The specified path does not point to a folder."

2203

"Could not delete folder."

2204

"Could not set the current folder."

2205

"The destination folder already exists."

2206

"The folder name contains invalid characters."

2207

"Could not delete base folder."

Shell Action Related (2300-2399)

2300

"Could not create folder for shortcut."

2301

"Could not create the link for the shortcut."

2302

"Error, the shortcut description is longer then 250 characters."

2303

"Shortcut could not be deleted."

2304

"Unknown shell folder."

2305

"The folder returned is invalid."

DLL Related (2400-2499)

2400

"Failed to load the specified DLL."

2401

"Failed to find the specified function within the DLL."

HTTP/FTPWI Related (2500-2599)

2500

"Failed to create the Internet session."

2501

"Failed to create the Internet connection."

2502

"Could not open request."

2503

"Send request failed."

2504

"Could not open the destination file for writing."

2505

"Invalid HTTP response from server."

2506

"An error occurred when downloading information from the server."

2507

"An error occurred while trying to write to the destination file."

2508

"The user has aborted the action."

2509

"An error occurred while trying to open an FTP file."

2510

"An error occurred when trying to write to memory. (Out of memory?)"

2511

"An error occurred when trying to set the proxy username."

2512

"An error occurred when trying to set the proxy password."

2513

"The request could not be understood by the server. (Bad Syntax)"

2514

"Access is forbidden."

2515

"The requested URL was not found on the server."

2516

"An internal server error has occurred."

2517

"The server is at full capacity."

ZIP File Related (2600-2699)

Zip File Errors

2600

"Could not reenter the zip file."

2601

"Unexpected end of zip file."

2602

"Zip file structure error."

2603

"Out of memory."

2604

"Internal logic error."

2605

"Entry too large to split."

2606

"Invalid comment format."

2607

"Zip test failed or out of memory."

2608

"User cancelled."

2609

"An error occurred when using a temp file."

2610

"A read or seek error occurred."

2611

"No files were added to the zip file."

2612

"Missing or empty zip file."

2613

"Error writing to a file."

2614

"Couldn't open to write."

2615

"Bad control parameters."

2616

"Could not complete operation."

2617

"Could not open a specified file to read."

2618

"Media error. Disk not ready, hardware read/write error."

2619

"Bad Multi-Volume control parameters."

2620

"Improper usage of a Multi-Volume Zip File."

Unzip File Errors

2621

"Unexpected end of zip file, the zip file may be corrupted."

2622

"The internal structure of the zip file is invalid."

2623

"Out of memory, not enough memory was available to complete the action."

2624

"The zip file could not be found."

2625

"There was nothing to extract in the unzip action."

2626

"An error occurred when trying to extract to the same volume."

2627

"The index specified in the zip file was out of bounds."

2628

"An error occurred when creating the output file."

2629

"An error occurred when opening the zip file. The zip file may be locked or unavailable."

2630

"An extracted file has an incorrect CRC value and may be corrupted."

2631

"The operation has been canceled."

2632

"A file was skipped during the extraction because it is encrypted and no password was specified, or the password was incorrect."

2633

"A file was skipped because it used an unknown compression format."

2634

"Bad or missing decrypt code, either no password was specified, or the password was incorrect.."

2635

"Busy error, the zip file could not be entered."

2636

"Could not extract volume ID item."

2637

"A bad command structure was used when attempting to unzip the file."

2638

"The operation was canceled through an internal function."

2639

"One or more of the files was skipped during the extraction phase. Usually this is caused by an incorrect password."

2640

"The destination disk was full, and no more information could be written to it."

2641

"The destination folder could not be created."

Dialog Related (2700-2799)

2700

"Could not register window class to create splash dialog."

2701

"Could not create Flash splash dialog."

2702

"Could not create image splash dialog."

2703

"Could not create video splash dialog."

Application Related (2800-2899)

2800

"An error occurred getting the current page name. No current page."

2801

"Could not load value."

2802

"Could not save value."

2803

"Error, could not get applications window handle."

2804

"The specified icon file could not be found."

2805

"Failed to set the system tray icon."

2806

"The application does not contain a system tray icon."

2807

"Failed to set the system tray icon tooltip."

Internal Function Related (2900-2999)

2900

"An internal error occurred resolving the specified function."

2901

"A runtime error occurred while calling the function."

2902

"A memory allocation error occurred while calling the function."

String Related (3000-3099)

3000

"An invalid index has been specified. Indices must be greater than or equal to -1."

3001

"The specified path is longer then MAX_PATH, or 260 characters."

Math Related (3300-3399)

3300

"The specified math value is not valid for the given function. "

Tree Related (3400-3499)

3400

"The item could not be found in the tree."

3401

"An error occurred when trying to update the item in the tree."

3402

"An error occurred when trying to insert the item into the tree."

3403

"Error, the tree's window is not valid. This action needs a valid window to succeed."

3404

"An internal pointer error has occurred."

3405

"An error occurred when trying to expand the specified item."

MSI Related (4200-4299)

4200

"Failed to load MSI.DLL. Windows Installer is not installed."

4201

"Failed to load function from MSI.DLL."

4203

"The user has cancelled the installation."

4204

"A fatal error occurred during the installation."

4205

"Installation suspended, incomplete."

4206

"Error unknown product."

4207

"Error unknown feature."

4208

"Error unknown component."

4209

"Error unknown property."

4210

"The handle is in an invalid state."

4211

"MSI configuration data is invalid."

4212

"The component qualifier is not present."

4213

"The installation source for this product is not available."

4214

"The product is uninstalled."

4215

"The SQL query syntax is invalid or unsupported."

4216

"The record field does not exist."

4217

"The Windows Installer service could not be accessed."

4218

"Error package version."

4219

"Another installation is already in progress."

4220

"This installation package could not be opened."

4221

"This installation package could not be opened, it appears to be invalid."

4222

"There was an error starting the Windows Installer service user interface."

4223

"There was an error opening installation log file."

4224

"This language of this installation package is not supported by your system."

4225

"This installation is forbidden by system policy."

4226

"The function could not be executed."

4227

"The function failed during execution."

4228

"An invalid or unknown table was specified."

4229

"The data supplied is the wrong type."

4230

"Data of this type is not supported."

4231

"The Windows Installer service failed to start."

4232

"The Temp folder is either full or inaccessible."

4233

"This installation package is not supported on this platform."

4234

"The install component is not used on this machine."

4235

"There was an error applying transforms."

4236

"This patch package could not be opened."

4237

"This patch package could not be opened, it appears to be invalid."

4238

"This patch package cannot be processed by the Windows Installer service, it is unsupported."

4239

"Another version of this product is already installed."

4240

"Invalid command line argument."

4241

"Installation from a Terminal Server client session is not permitted for the current user."

4242

"The installer has initiated a restart."

4243

"The installer cannot install the upgrade patch because the program being upgraded may be missing or the upgrade patch updates a different version of the program."

4244

"The patch package is not permitted by system policy."

4245

"One or more customizations are not permitted by system policy."

4246

"Windows Installer does not permit installation from a Remote Desktop Connection."

4247

"The patch package is not a removable patch package."

4248

"The patch could not be applied to this product. Unknown patch."

4249

"A valid sequence could not be found for the set of patches."

4250

"Patch removal was disallowed by policy."

4251

"The XML patch data is invalid."

4252

"Administrative user failed to apply patch for a per-user managed or a per-machine application that is in advertise state."

4253

"An invalid parameter has been passed to the function."

4254

"A buffer is too small to hold all of the data."

4255

"A restart is required to complete the install."

4256

"The MSI file is invalid, or does not contain a valid version of specific information."

4257

"The MSI file contains invalid data."

4258

"An unexpected error has occurred."

4259

"An invalid handle has been used."

RichText Related (4300-4399)

4300

"An invalid line index was specified."

4301

"An error occurred while trying to retrieve a line of text from the RichText object."

4302

"Unable to open rich text (RTF) file for reading."

4303

"Unable to open rich text (RTF) file for writing."

4306

"Attempt to set character format of current selection in RichText object failed."

4307

"Attempt to set paragraph format of current selection in RichText object failed."

SlideShow Related (4400-4499)

4400

"An error occurred when adding the slide to the SlideShow."

DialogEx Related (5000-5499)

5000

"The specified dialog does not exist."

5001

"Error, an application dialog is not visible."

5002

"No radiobutton in specified group."

5003

"Failed to create properties table."

5004

"Error, the specified dialog is already in use."

5005

"Error, could not get dialog window handle."

5006

"Error, cannot show a dialog with a status dialog visible."

5007

"Error, cannot close a dialog with a status dialog visible."

Service Related (6000-6099)

6001

"An error occurred while trying to iterate the services."

6002

"An error occurred while trying to query the services."

6003

"The service could not be found."

6004

"The continue command failed."

6005

"The stop command failed."

6006

"The start command failed."

6007

"The pause command failed."

6008

"The delete command failed."

6009

"The create command failed."

6010

"The handle to the specified service control manager database does not have access."

6011

"A circular service dependency was specified."

6012

"The display name already exists in the service control manager database either as a service name or as another display name."

6013

"The handle to the specified service control manager database is invalid."

6014

"The specified service name is invalid."

6015

"A parameter that was specified is invalid."

6016

"The user account name specified does not exist."

6017

"The specified service already exists in this database."

QuickTime Related (7000-7099)

7000

"The QuickTime object's internal movie interface has not been attached."

7001

"The QuickTime object's window is not valid."

PDF Related (8000-8099)

8000

"The PDF object's window is not valid."

Grid Related (12400-12499)

12400

"Grid operation failed."

12401

"Invalid grid window."

12402

"Invalid cell."

12403

"Invalid grid pointer."

12404

"Invalid grid delimiter."

Crypto Related (34000-34099)

34000

"String does not contain valid base-64 encoded data."

34001

"Error while attempting to decode base-64 encoded string (usually means string is corrupt - missing bytes in string?)."

34002

"Invalid file header - not an Indigo Rose blowfish file."

34003

"Incompatible blowfish file. (The file has either been damaged or it uses an incompatible block padding scheme.)"

XML Related (37000-37099)

37000

"Error loading XML file."

37001

"Error saving XML file."

37002

"No valid XML document loaded. (The document is empty or not well formed.)"

37003

"The specified XML path is not valid or was not found."

37004

"An error occurred while trying to set the value."

37005

"An error occurred while trying to set the attribute."

37006

"Invalid attribute name. (Attribute names cannot contain spaces.)"

37007

"The specified element could not be removed."

37008

"The specified attribute could not be removed."

37009

"There are no elements below the specified XML path."

37010

"The element at the specified XML path does not have any attributes."

37011

"An error occurred while trying to insert XML."

37012

"Invalid insertion mode."

ComboBox Related (77000 - 77099)

77001

Could not add item to the ComboBox.

77002

An error occurred when trying to set the items data.

77003

An error occurred when trying to delete the item from the ComboBox.

77004

Error index is out of range.

77005

An error occurred trying to get the item's text.

77006

Could not insert item into the ComboBox.

77007

An error occurred setting the items text.

77008

An error occurred setting the current selection.


Database Actions

Overview

AutoPlay Media Studio includes support for several database technologies including MySQL, Oracle, and Sqlite3. This database functionality makes use of the LuaSQL library designed and implemented by the Kepler Project team.

Each supported database technology has a corresponding category of actions. These actions are hidden from the Action Wizard by default, and will only be shown after you enable support for the database in your project.

You can enable or disable support for databases individually on the Databases dialog, which you can access by choosing Project > Databases from the menu.

Note: When you enable support for a database in AutoPlay, the appropriate LuaSQL require statement will automatically be performed for you when the runtime (autorun.exe) launches. For example, if you enable MySQL support you do not need to add require "luasql.mysql" to your scripts, it will be done automatically.

Error Handling

The database actions support two return values. The first return value returns a value that is specific to each action. The second return value is optional, and is used to receive an error string from the database driver if one is available.

Normally the first return variable will contain a value, and the second return variable will be nil.

In the case of an error, the first return value will be nil, and the second return value will be a string containing the error message if one is available. (If there is no error message available, both return values will be nil.)

Note: Use of the second return value is optional -- you may choose not to specify any variable to receive it, and it will simply be ignored.

Database Actions

All of the database actions have nearly the same syntax across the different database technologies.

In the following section, replace the "xxxx" part of each method name with the name of each action category. For example:

Where you see this: | Use this:
xxxx:close() | MySQL:close(), SQLite3:close(), etc.
xxxxConnection:commit() | MySQLConnection:commit(), OracleConnection:commit(), etc.

Some of the actions return an object, for example MySQL:connect() returns an object that represents the connection to the database. Although you may technically name these objects any valid Lua variable name, AutoPlay requires that you use specific names in order to enable script editor integration (Quick Help, intellisense, etc.). So, you should name the first return variable from MySQL:connect() "MySQLConnection" if you want the script editor features to work.

Environment Objects

An environment object represents a link with the database driver, and is normally returned from a call to an initialization function. This initialization is automatically performed for you at startup for each database you enable on the Databases dialog. The environment object for each database will also automatically be closed on shutdown.

So, in AutoPlay there is no need to perform a call such as:

env = luasql.mysql()

Instead, the equivalent of the following is automatically performed:

MySQL = luasql.mysql();

In AutoPlay, the environment objects are represented by the following action categories:

  • MySQL

  • SQLite3

  • Oracle

  • ODBC

  • PostgreSQL

Environment Actions

xxxx:connect(sourcename[,username[,password]])

Connects to a data source specified in sourcename using username and password if they are supplied. The sourcename may vary according to each database type.

For MySQL and PostgreSQL, you may also provide an optional hostname and port:

MySQL:connect(sourcename[,username[,password[,hostname[,port]]]])

PostgreSQL:connect(sourcename[,username[,password[,hostname[,port]]]])

Note: For PostgreSQL, MySQL and SQLite the sourcename is the database name. For ODBC it's the name of the DSN, and for Oracle driver it's the service name.

Returns a connection object that represents the data source connection.

xxxx:close()

Closes the database environment. Only successful if all connections pertaining to it are closed first.

Returns true if successful. Returns false if the object is already closed.

Connection Actions

A connection object contains specific attributes and parameters for a single data source connection. A connection object is created using the xxxx:connect() action.

For full script editor integration you should name your connection objects "xxxxConnection" where "xxxx" is replaced by the database name, e.g. MySQLConnection.

xxxxConnection:close()

Closes the connection. Only successful if all cursors pertaining to it have been closed and the connection is still open.

Returns true if successful.

xxxxConnection:commit()

Commits the current transaction. This feature might not work on database systems that do not implement transactions.

Returns true if successful. Returns false if the operation could not be performed or is not implemented.

xxxxConnection:execute(statement)

Executes the given SQL statement.

Returns a cursor object if there are results, or the number of rows affected by the command otherwise.

xxxxConnection:rollback()

Rolls back the current transaction. This feature might not work on database systems that do not implement transactions.

Returns true if successful. Returns false if the operation could not be performed or is not implemented.

xxxxConnection:setautocommit(boolean)

Turns on or off the "auto commit" mode. This feature might not work on database systems that do not implement transactions.

Returns true if successful. Returns false if the operation could not be performed or is not implemented.

Cursor Actions

A cursor object contains methods to retrieve data resulting from an executed statement. A cursor object is created using the xxxxConnection:execute() action.

For full script editor integration you should name your connection objects "xxxxCursor" where "xxxx" is replaced by the database name, e.g. OracleCursor.

xxxxCursor:close()

Closes the cursor.

Returns true if successful. Returns false if the object is already closed.

xxxxCursor:fetch([table[,modestring]])

Retrieves the next row of results.

If fetch is called without parameters, the results will be returned directly to the caller. If fetch is called with a table, the results will be copied into that table and the changed table will be returned. In this case, an optional modestring parameter can be used. It is just a string indicating how the resulting table should be constructed. The mode string can contain:

"n" the resulting table will have numerical indices (default)

"a" the resulting table will have alphanumerical indices

The numerical indices are the positions of the fields in the SELECT statement; the alphanumerical indices are the names of the fields.

The optional table parameter is a table that should be used to store the next row. This allows the use of a unique table for many fetches, which can improve the overall performance.

There is no guarantee about the types of the results: they may or may not be converted to adequate Lua types by the driver. In the current implementation, the PostgreSQL and MySQL drivers return all values as strings while the ODBC and Oracle drivers convert them to Lua types.

Returns a table of data, as above, or nil if there are no more rows. Note that this action could return nil as a valid result.

Note: Currently the MySQL driver does not support the optional table or modestring parameters. Its only valid syntax is MySQLCursor:fetch().

xxxxCursor:getcolnames()

Returns a table of column names.

xxxxCursor:getcoltypes()

Returns a table of column types.

xxxxCursor:numrows()

Returns the number of rows in the query result.

Only available for MySQL, Oracle and PostgreSQL.

Examples

Here is an example of basic use of the database actions.

SQLite3Connection, err = SQLite3:connect("test-db");

if not SQLite3Connection and err then
Dialog.Message("Error", err);
end

SQLite3Connection:execute("DROP TABLE people");
SQLite3Connection:execute("CREATE TABLE people(name varchar(50),email varchar(50))");

-- add a few elements from a Lua table into the database table
list = {
{ name="Jose das Couves", email="jose@couves.com" },
{ name="Manoel Joaquim", email="manoel.joaquim@cafundo.com" },
{ name="Maria das Dores", email="maria@dores.com" }
}

for i, p in pairs(list) do
SQLite3Connection:execute(string.format("INSERT INTO people VALUES ('%s', '%s')", p.name, p.email));
end

-- retrieve a cursor
SQLite3Cursor = SQLite3Connection:execute("SELECT name, email from people");

-- print all the rows
row = SQLite3Cursor:fetch({},"a")
local s = "";
while row do
s = s..(string.format("Name: %s, Email: %s\n", row.name, row.email))

-- get the next row, reusing the same table
row = SQLite3Cursor:fetch(row,"a");
end
Dialog.Message("The 'people' table contains", s);

-- close everything
SQLite3Cursor:close()
SQLite3Connection:close()

For MySQL, the above example would need to be modified a bit since MySQL currently doesn't support the optional fetch() parameters.

-- print all the rows
local s = "";
for i = 1, MySQLCursor:numrows() do
local name,email = MySQLCursor:fetch();
s = s.."Name: "..name..", Email: "..email.."\n";
end

Dialog.Message("The 'people' table contains", s);

You can also iterate over the results using an iterator function:

function rows (connection, sql_statement)
local cursor = assert(connection:execute (sql_statement))
return function ()
return cursor:fetch()
end
end

MySQLConnection = MySQL:connect("mydatabase");
local s = "";
for name, email in rows(MySQLConnection, "select * from contacts") do
s = s .. string.format("Name: %s, Email: %s\n", name, email);
end

Dialog.Message("The 'people' table contains", s);

Notice

The database functionality makes use of the LuaSQL library designed and implemented by the Kepler Project team.

Copyright © 2003-2007 The Kepler Project.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

PostgreSQL Data Base Management System

Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
Portions Copyright (c) 1994-1996 Regents of the University of California

Permission to use, copy, modify, and distribute this software and its documentation for any purpose, without fee, and without a written agreement is hereby granted, provided that the above copyright notice and this paragraph and the following two paragraphs appear in all copies.

IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.


Variables - Overview

Variables

Overview Global Variables Event Variables

Built-in variables are automatically provided for you by AutoPlay Media Studio. They are used to represent common values that might differ between systems, like the location of the user's temp folder (_TempFolder) or the path to the user's Program Files folder (_ProgramFilesFolder).

There are two types of built-in variables:

  • Global variables that can be used anywhere in your project.

  • Event variables that are local to events. (Their values are only available for the duration of that event.)

Tip: Often variables are used as part of a full path where you need to join two strings together. For example, you may need a path consisting of the user's Program Files folder and a program folder such as "ApplicationX." To do this, you would use the string concatenation operator which consists of two dots (..). The script looks like this:

_ProgramFilesFolder .. "\\ApplicationX"

You can also use the String.Concat action to concatenate two strings.

Note: There are also a series of actions available that can be used to gather information about the user's system that may not be part of the built-in variables list. For example, additional common folder paths can be read using the Shell.GetFolder action. There is also a System category of actions for other system information.

For more information on variables, see Variables in the Scripting Guide.


Variables - Global Variables

Variables

Overview Global Variables Event Variables

Global variables (or "built-in variables") are variables whose values are automatically set when your AutoPlay application starts. They are used to represent common values that might differ between systems. These variables are all global which means you can use them anywhere in your project.

Tip: The built-in variables are listed along with all of the actions and constants when you press Ctrl+Space in the script editor. Since all of the built-in variables start with an underscore, if you type _ and then press Ctrl+Space, you'll be taken right to the first built-in variable in the list.

The following global variables are available in AutoPlay Media Studio:

_AutoTabOrder

Controls whether the tab order for input, listbox, combobox, radiobutton, checkbox, richtext and tree objects is automatically determined by the z-order. Set this variable to false if you want to override the default tab order for input, listbox, combobox, radiobutton, checkbox, richtext and tree objects by using the page's On Key event.

_CommandLineArgs

A numerically indexed table that contains the command line arguments passed into the AutoPlay application.

_DesktopFolder

The path to the user's Desktop folder. On Windows XP/Vista or later, this is the path from the per-user profile.

_DesktopFolderCommon

The path to the user's Desktop folder. On Windows XP/Vista or later, this is the path from the All Users profile.

_DoFlashCheck

A Boolean variable used to control whether or not AutoPlay Media Studio will check for the Flash Player ActiveX control at runtime. If it is set to true (automatically set when the project contains a Flash object), the check will be performed. If it is set to false, no check will be performed. If the check is performed and the control is not found (based on the default version 6.0.0.0), AutoPlay will display a notification dialog. _DoFlashCheck can be set in Global Functions.

_IR_ProductID

This variable contains the product ID of the product from which the script was run. This allows you to identify the product being run from script. This could be useful when making generic scripts that are used in several Indigo Rose products, but that have different things to do based on the product being run from. AutoPlay Media Studio 8 returns "AMS8".

_NoExitScriptOnPageJump

If set to true, action script in an event will continue to be executed after a Page.Jump or Page.Navigate action is called. If set to false, the execution of the action script in the event will halt after a Page.Jump or Page.Navigate is called. This variable is set to false by default.

_ProgramFilesFolder

The user's Program Files folder (typically, this is something like "C:\Program Files").

_ShowIntroVideo

A Boolean variable used to control whether the intro video will be displayed at runtime. If it is set to true (which it is by default) and the project has an intro video specified, the intro video will be shown. If it is set to false, the video will be skipped. This variable must be set either in Global Functions, or on the project's On Startup event.

_SoundInitialized

A Boolean variable that is set to true if the sound engine successfully initializes at runtime or false if it fails. (The failure to initialize is a very rare occurrence. This variable is made available for those who may require this rare feedback.)

_SourceDrive

The drive that the AutoPlay application was run from (e.g. "C:" or "D:").

_SourceFilename

The filename of the AutoPlay application (e.g. "autorun.exe").

_SourceFolder

The full path to the folder that the AutoPlay application was run from (e.g. "C:\Downloads" or "D:").

_SystemFolder

The path to the user's Windows System folder (e.g. "C:\Windows\System32" on NT based systems).

_tblErrorMessages

A table indexed by error codes containing all of the possible error messages. For example, accessing the table index _tblErrorMessages[1000] will access the error code string "The specified file could not be found." The Application.GetLastError action is used to retrieve the last performed action's error code.

_TempFolder

The path to the user's Temp folder.

_WindowsFolder

The path to the user’s Windows folder (e.g. "C:\Windows").


Variables - Event Variables

Variables

Overview Global Variables Event Variables

Some events in AutoPlay Media Studio contain variables whose values are automatically set whenever that event is triggered. These variables are called event variables. Event variables are local to the event and can be found on some page, dialog and object events. When we say they are "local," we mean their values are only available for actions created on that event.

Note: You can find additional information about each event variable by looking at the list of events.

The following event variables are available in AutoPlay Media Studio:

e_Button

(number) The index of the button that was pressed. This variable is only available on the On Mouse Button Down, On Mouse Button Up and On Mouse Move events of a QuickTime object.

CONSTANT | VALUE | DESCRIPTION
BUTTON_LEFT | 1 | Left mouse button.
BUTTON_RIGHT | 2 | Right mouse button.
BUTTON_MIDDLE | 3 | Middle mouse button.

e_Channel

(number) The audio channel whose state has changed. This variable is only available on the On Audio event. One of the following channel values will be returned:

CONSTANT | VALUE | DESCRIPTION
CHANNEL_BACKGROUND | 5 | Background audio channel.
CHANNEL_EFFECTS | 0 | Effects channel (used for mouse over, down, and click sounds).
CHANNEL_NARRATION | 6 | Narration channel (used for voice overs).
CHANNEL_USER1 | 1 | User channel 1.
CHANNEL_USER2 | 2 | User channel 2.
CHANNEL_USER3 | 3 | User channel 3.
CHANNEL_USER4 | 4 | User channel 4.
CHANNEL_ALL | -3 | All audio channels.

e_Char

(number) The character code of the key that was pressed in an input object. This variable is only available on the On Char event of input objects.

e_Checked

(boolean) True if a node in the tree object has been checked, false if it has been unchecked. This variable is only available on the On Check event.

e_Column

(number) The column (0-based) of the cell that now has focus in a grid object. This variable is available on the grid object's On Selection Changed event.

The column (0-based) of the cell that changed in a grid object. This variable is available on the grid object's On Cell Changed event.

e_Delta

(number) The distance that the mouse wheel was rotated while on a page or dialog. A negative value indicates that the mouse wheel was rotated backward towards the user, and a positive value indicates that the mouse wheel was rotated forward away from the user. This can be altered by the user via their mouse software. This value will usually be 120 or -120, however may be multiples or divisions of 120 depending upon the mouse vendor. This variable is only available on a page's or dialog's On Mouse Wheel event.

e_DialogHeight

(number) The height of the current dialog. This variable is only available on the On Size event.

e_DialogWidth

(number) The width of the current dialog. This variable is only available on the On Size event.

e_ErrorCode

(number) The numeric code of the error that has occurred in a QuickTime object. This variable is only available on the On Error event.

e_ErrorOrigin

(number) Where the error originated from in a QuickTime object. This variable is only available on the On Error event.

CONSTANT | VALUE | DESCRIPTION
qtErrorEventOriginControl | 0 | An error occurred in the QTControl area of the QuickTime ActiveX control.
qtErrorEventOriginMovie | 1 | An error occurred in the QTMovie area of the QuickTime ActiveX control.
qtErrorEventOriginQuickTime | 2 | An error occurred in the QTQuickTime area of the QuickTime ActiveX control.

e_Expanded

(boolean) True if a node in the tree object has been expanded, false if it has been collapsed. This variable is only available on the On Expanded event.

e_FilePath

(string) The full path to the image file that was changed to in the slideshow (currently shown).

e_Flags

(table) A table containing five boolean values that describe which modifier keys or buttons were held down when the On Mouse Wheel event is fired on a page or dialog.

There are five true/false values in the table: shift key, ctrl key, left mouse button, middle mouse button, and right mouse button. You can access these values as e_Flags.shift, e_Flags.ctrl, e_Flags.LButton, e_Flags.MButton, and e_Flags.RButton.

e_FSArgs

(string) A string containing the arguments of the last FSCommand fired within the Flash object. This variable is only available on the On FSCommand event.

e_FSCommand

(string) A string containing the last FSCommand fired within the Flash object. This variable is only available on the On FSCommand event.

e_Hyperlink

(string) A string containing the hyperlink text that the user clicked on a markup enabled xButton object. This is the text surrounded by Hyperlink tags in its markup text. For example, "Link Text" would be returned if the markup text contained <Hyperlink>Link Text</Hyperlink>. This variable is only available on the xButton object's On Hyperlink event.

e_ID

(number) The item ID of the menu item currently being interacted with.

e_Index

(number) The 1-based index of the slide that was changed to in the slideshow (currently shown).

e_ItemInfo

(table) Extended information about the currently selected menu item.

KEY | TYPE | DESCRIPTION
Text | string | The text of the menu item currently being interacted with.
ID | number | The item ID of the menu item currently being interacted with.
IconID | number | The 0-based icon index from the Image List specified on the Menu Bar for the menu item.
Enabled | boolean | True if the current menu item is enabled, false if it is not.
Checked | boolean | True if the current menu item is checked, false if it is not.

e_Key

(number) The virtual key code of the key that was pressed. This variable is only available on the On Key event.

e_Link

(string) The text of the link that was clicked. This variable is only available on the On Link event.

e_Max

(number) The 1-based character index where the link's text ends. This variable is only available on the On Link and On Selection Changed events.

e_Min

(number) The 1-based character index where the link's text begins. This variable is only available on the On Link and On Selection Changed events.

e_Modifiers

(table) A table containing three boolean values that describe which modifier keys were held down while the key was pressed, or for a QuickTime object, which mouse button was pressed. A modifier key is a key that can be held down while another key is pressed, to "modify" it.

There are three true/false values in the table, one for each type of modifier key on the keyboard: shift, ctrl, and alt. You can access these values as e_Modifiers.shift, e_Modifiers.ctrl, and e_Modifiers.alt. This variable is available on the On Key event, the On Mouse Button Down, On Mouse Button Up and On Mouse Move events of a QuickTime object, and the On Char event of the input object.

e_NewText

(string) The text that has just been set for a node in the tree object. This variable is available on a tree object's On EditLabel event.

The new text of the cell in grid object. This variable is available on a grid object's On Cell Changed event.

e_NodeIndex

(string) The index of a node in the tree object.

e_OldText

(string) The text that existed previously before the user edited the text of a node in the tree object. This variable is available on a tree object's On EditLabel event.

The text that was in the cell before it was changed in a grid object. This variable is available on a grid object's On Cell Changed event.

e_PageHeight

(number) The height of the current page. This variable is only available on the On Size event.

e_PageWidth

(number) The width of the current page. This variable is only available on the On Size event.

e_Rate

(number) The new rate of the media file. This variable is only available on the On Rate Change event.

e_Row

(number) The row (0-based) of the cell that now has focus in a grid object. This variable is available on the grid object's On Selection Changed event.

The row (0-based) of the cell that changed in a grid object. This variable is available on the grid object's On Cell Changed event.

e_Selection

(number) The index of a comboxbox item that is being selected. (The first item in the list has an index of 1.) This variable is only available on the On Select event of a combobox object.

e_State

(string) A string containing the current state of the audio channel. This variable is only available on the On Audio event. One of the following states will be returned:

VALUE | TYPE | DESCRIPTION
Finish | string | The audio channel's track reached it's end.
Pause | string | The audio channel was paused using the Audio.Pause action.
Play | string | The audio channel was played using the Audio.Play action
Stop | string | The audio channel was stopped using the Audio.Stop action.

e_Type

(number) The type of resize that has occurred if on the On Size event, or the type of mouse button click if on the On Mouse Button event.

On Size e_Type constants:

CONSTANT | VALUE | DESCRIPTION
SIZE_RESTORED | 0 | The application was either restored from being maximized or minimized or was resized normally.
SIZE_MINIMIZED | 1 | The application was minimized to the taskbar.
SIZE_MAXIMIZED | 2 | The application was maximized.

On Mouse Button e_Type constants:

CONSTANT | VALUE | DESCRIPTION
LEFT_BUTTON_DOWN | 0 | Left mouse button has been pressed.
LEFT_BUTTON_UP | 1 | Left mouse button has been released.
RIGHT_BUTTON_DOWN | 2 | Right mouse button has been pressed.
RIGHT_BUTTON_UP | 3 | Right mouse button has been released.

e_URL

(string) A string containing the URL that has finished loading or is being navigated to. This variable is only available on the On Loaded and On Navigate events.

e_WindowHeight

(number) The height, in pixels, of the entire application window, including the border and title bar. This variable is only available on the On Size event.

e_WindowWidth

(number) The width, in pixels, of the entire application window, including the border and title bar. This variable is only available on the On Size event.

e_X

(number) The horizontal position of the mouse cursor, in pixels, from the left side of the page or dialog. This variable is only available on the On Mouse Button, On Mouse Move events, On Mouse Button Down, On Mouse Button Up and On Mouse Move events of a QuickTime object, and On Mouse Wheel event of a page or dialog.

e_XObject

(number) The horizontal position of the mouse cursor, in pixels, from the left side of a QuickTime object. This variable is only available on the On Mouse Button Down, On Mouse Button Up and On Mouse Move events of a QuickTime object.

e_Y

(number) The vertical position of the mouse cursor, in pixels, from the right side of the page or dialog. This variable is only available on the On Mouse Button, On Mouse Move events, On Mouse Button Down, On Mouse Button Up and On Mouse Move events of a QuickTime object, and On Mouse Wheel event of a page or dialog.

e_YObject

(number) The vertical position of the mouse cursor, in pixels, from the right side of a QuickTime object. This variable is only available on On Mouse Button Down, On Mouse Button Up and On Mouse Move events of a QuickTime object.

this

(string) A string containing the name of the object, page or dialog where the event is located. This variable is useful for creating generic actions or functions that are not dependent on specific page, dialog, or object names. For example:

Label.SetVisible(this, false);

This action hides the label object it was created on. For example, if the action was created on the object named "Label1", it would hide the Label1 object. If it was created on the object called "Label2", it would hide the Label2 object.

Example 1: e_Channel, e_State

Often its necessary to be able to detect when an audio track has reached its end so you can respond with some type of action. This example illustrates how to jump to another page when an audio track playing in the narration audio channel reaches the end. Using this design, the visual presentation could be controlled by an audio voice over.

  1. Create a two page project with your second page called "Page2".

  2. Add the following code to the On Show event of your first page. An audio file is needed for this example, so you will need to modify this action so it loads an actual audio file within your project.

- Load a narration track into the narration channel.
Audio.Load(CHANNEL_NARRATION, "AutoPlay\\Audio\\Lesson1.ogg", true, false);

  3. Add the following code to the On Audio event of your first page.

-- If the narration audio channel's track reaches the end, jump to another page.
if ((e_Channel == CHANNEL_NARRATION) and (e_State == "Finish")) then
Page.Jump("Page2");
end

If you preview your project, the audio file will begin to play when the first page opens. Once that audio track has reached the end, the second page will display.

Example 2: e_Key

In most cases, interaction with an AutoPlay application is accomplished using the mouse. However it's also possible to control some of the functionality through the keyboard by responding to certain key strokes. This example illustrates how navigation can be controlled by key strokes if a mouse is not available.

  1. Create a project with two or more pages.

  2. Add the following code to the On Key event of each page.

-- If the user presses the Enter key, jump to the next page in the project.
if (e_Key == 13) then
Page.Navigate(PAGE_NEXT);
end

When you preview your project, each time you press the "Enter" key, the next page will be displayed. In the example code, the event variable e_Key is compared to the number 13 which is the virtual key code value for the "Enter" key (carriage return).


File Menu

Program Menus

Overview File Edit Align Page Dialog Object Project Publish View Tools Help

New

Opens the New Project dialog to start a new project. If there are any unsaved changes in the current project, you will be prompted to save them.

Open...

Opens a previously saved AutoPlay Media Studio version 5 ,6 ,7, 8 project file, or imports an AutoPlay Media Studio 4 project file or imports an AutoPlay Menu Studio 3 project file.

Note: When opening a project file created with a previous version, AutoPlay Media Studio 8 will analyze your project and may create a report detailing where minor changes may need to be made for compatibility. See Changes to AutoPlay Media Studio for more information.

Note: Autorun MAX! projects can also be opened in AutoPlay Media Studio, however they first must be exported from Autorun MAX! as an *.apz file. You can do this by going to File > Export and selecting AutoPlay Media Studio x.x as the "Save as type."

Save

Saves the current project file.

Save As...

Saves the project under a different name. This creates a new folder, copies all of the files from the current project into that folder, and creates a new project file.

Export...

Creates an archive of your project for backup purposes, or to transport it somewhere else. An Export Project dialog will be displayed where you can choose a name and location for the Zip file. This feature will archive all of the files within your Project folder.

Note: If you select Project Template (*.apt) as the Save as type, once you click save you will be presented with the Project Template Information dialog, where you can save information about the template, and include a screenshot.

Tip: You can select the Clean Resources option from the Export Project dialog to clean up unused resources before archiving. This feature is the same as if you went to Tools > Optimize Resources...

Revert

Reverts to the last saved state of the project. A confirmation dialog will display informing you that all unsaved changes will be lost (the confirmation dialog is a preference that can be turned off).

Properties...

Opens the Document Properties dialog where you can add project specific developer notes.

Exit

Closes the current project and exits out of AutoPlay Media Studio. If there are any unsaved changes in the current project, you will be prompted to save them.


Project Properties - Overview

Document Properties

Overview General Statistics

The document's properties are mainly used for organizational purposes and can only be accessed from within the design environment on the Document Properties dialog.

There are two tabs on the Document Properties dialog:

  • General

  • Statistics

Tip: To access the Document Properties dialog, choose File > Properties... from the menu.


Project Properties - General

Document Properties

Overview General Statistics

Filename:

The full path and filename of your AutoPlay Media Studio project file.

Title:

The title you want to give the current project file.

Author:

The author of the current project.

Company:

The company who created the project.

Copyright:

Copyright information for the current project.

URL:

A URL that may contain company or product information for the project.

Email:

A contact email address.

Comments:

Any additional comments you would like to provide to describe the current project.

Note: All of the information above will not be visible in the project's generated runtime.


Project Properties - Statistics

Document Properties

Overview General Statistics

File size:

The size of the AutoPlay Media Studio project file.

Created:

The creation date and time of the project file.

Modified:

The date and time of the last modification to the project file.

Accessed:

The date and time the project file was last accessed.

Created ver:

The full build number and product description the project was created with.

Last saved ver:

The full build number and product description the project was last saved with.

Number of pages:

The number of pages in the project.

Number of dialogs:

The number of dialogs in your project.

Number of objects:

The number of objects in the project.


Edit Menu

Program Menus

Overview File Edit Align Page Dialog Object Project Publish View Tools Help

Undo

Undoes the last command performed in the program.

Redo

Redoes the last Undo command performed in the program.

Cut

Removes the currently selected objects and stores them in the Windows clipboard. Once on the clipboard, the objects can be pasted to another location.

Copy

Copies the currently selected objects to the Windows clipboard. Once on the clipboard, the objects can be pasted to another location.

Paste

Pastes one or more objects from the Windows clipboard to the current page or dialog.

Delete

Deletes the currently selected objects.

Duplicate

Creates a duplicate of the currently selected objects. The new objects will maintain all of the properties except for the object names.

Select

All

Selects all of the objects on the current page or dialog.

Deselect

Deselects all of the currently selected objects on the page or dialog.

Inverse

Inverts the current selection. This will select any objects on the page or dialog that aren't already selected, and deselect the ones that are.

Next Object Below

Selects the object that is one level "lower" in the z-order—in other words, the object that is one step closer to the page or dialog.

Next Object Above

Selects the object that is one level "higher" in the z-order—in other words, the object that is one step further from the page or dialog.

Arrange

Arranges the object's z-order on the page or dialog.

Bring to Front

Make the selected object the top-most object in the z-order for this page or dialog. This means that it will be displayed on top of any other objects that it overlaps.

Bring Forward

Bring the selected object one object closer in the z-order for this page or dialog. This means that it will be displayed on top of any other objects that are behind it in the z-order if the objects overlap.

Send Backward

Place the selected object one object further away in the z-order for this page or dialog. This means that it will be displayed behind any other objects that are in front of it in the z-order.

Send to Back

Make the selected object the bottom-most object in the z-order for this page or dialog. This means that it will be displayed behind any other objects that overlap it.

Note: Some types of objects can't be displayed on top of other types of objects.

Group

Groups the selected objects on the page or dialog. A group is just a bunch of objects that are always selected together, and that maintain their positions relative to one another when you use the alignment tools on them. It's almost like the group becomes a single object.

Ungroup

Ungroups the selected group on the page or dialog. These objects will no longer behave like a single object when using the alignment tools.

Lock

Locking an object to the page or dialog renders it completely unselectable. This means you cannot move, resize or edit it's properties. Locking an object has no effect on the object at runtime.

Note: In order to unlock an object, you must right-click it and choose Lock from the right-click menu. This will disable it's locked state.

Unlock All

Unlocks all of the objects on the page or dialog.

Pin

Pinning an object means you cannot move or resize it, but you can still select it to edit it's properties. Pinning an object has no effect on the object at runtime.

Unpin

Unpins a previously pinned object.

Hide

Hides the selected object(s) at design time. Any object hidden is not visible in the design environment.

Note: Objects hidden are only invisible at design time. This feature has no impact on objects at runtime.

Unhide All

Unhides all hidden object on the current page or dialog.

Preferences...

Opens the Preferences dialog where you can customize the AutoPlay design environment to suit your style.


Preferences - Overview

Preferences

Overview

The Preferences dialog is where you can find the settings and options that let you configure the AutoPlay Media Studio design environment to your liking.

There are the following categories on the Preferences dialog:

  • Build

  • Code Signing

  • Document

  • Environment

  • Tabs

  • Guidelines

  • Grid

  • Project Size

  • Rulers

  • Folders

  • Objects

  • Drag and Drop

  • Drop on Page/Dialog

  • Drop on Object

  • File Associations

  • Resource Preview

  • Script Editor

  • Spell Checker

  • Startup

  • Updates

Tip: To access the Preferences dialog, choose Edit > Preferences from the menu.


Build Preferences

Preferences

Overview Build

Preview

Confirm

Make AutoPlay Media Studio ask you for confirmation (that you're ready to preview your project) before the preview begins.

Minimize

Automatically minimize the AutoPlay Media Studio program window whenever you preview a project.

Ignore warnings

Make AutoPlay Media Studio ignore any warnings messages generated during the preview.

Show debug window

Show the debug window while previewing your project.

Code sign

Code sign the application using the settings on the Code Signing tab of the Project Settings dialog whenever you preview a project.

Publish

CD/DVD/Blu-Ray write speed

The CD/DVD/Blu-Ray write speed you want to use to burn your CD/DVD/Blu-Ray's. You can click the select button to choose a write speed. The default speed is 4X.

Tip: You can also make AutoPlay Media Studio ask you for the CD/DVD write speed you want to use before the burn process begins. To do this you can select the "Ask" option from the write speed list.

Optimize resources before publish

Automatically open the Remove Unused Resources dialog when Publish is selected. This will allow you to remove any unused files from your project's resources before publishing your project.

UPX runtime (not compatible with runtime skins)

Compress the AutoPlay runtime executable during the build process using UPX compression. Generally compressing the file reduces its size by about 50%.

Note: If skins have been applied, the UPX of the runtime will be skipped during the build process.

Files to ignore (use the | character to delimit list):

A '|' delimited list of files that will be ignored by the build process. Any files listed may exist in your project folder but will be ignored by Autoplay when building, exporting, and cleaning resources. Wildcards are accepted.

For example if you wished to ignore text files and Code Jock style files the following could be specified:

*.txt|*.cjstyles

You can also specify specific filenames to ignore:

WinXP.Luna.cjstyles

If you would like to ignore a folder and its contents, you can use:

*\myfolder\*


Code Signing Preferences

Preferences

Overview Code Signing

Code Signing Defaults

These settings are the default values that will be used on the Code Signing tab of the Project Settings dialog when new projects are started.

Code sign applications

Code sign all new AutoPlay applications during the build process.

Code signing tool:

The tool you want to use to digitally sign all new AutoPlay projects. Choose from:

SignTool.exe

Use SignTool.exe to digitally sign the application executable. This tool could not be distributed, but is available in the \Bin folder of the Platform Software Development Kit (SDK). For more information, see MSDN: SignTool (Windows).

SignCode.exe

Use SignCode.exe to digitally sign the application executable. This tool could not be distributed, and only ships with the .NET Framework SDK version 1.0 and 1.1. For more information, see MSDN: File Signing Tool (Signcode.exe).

Tool location:

The full path and filename of the chosen code signing tool on your system (SignTool.exe or SignCode.exe). You can click the Browse button to select the file.

Certificate filename:

The full path and filename of the certificate to use for signing all new AutoPlay applications. If SignTool.exe is selected, this file must be a "Personal Information Exchange" file (*.PFX). If SignCode.exe is selected, this file must be a "Software Publisher Certificate" file (*.SPC). You can click the Browse button to select the file.

Private key filename:

The full path and filename of the "Private Key" file (*.pvk) to use for signing all new AutoPlay applications. This file is only used when SignCode.exe is the selected tool. You can click the Browse button to select the file.

Timestamp URL:

The URL of a timestamp DLL on the Web to use for all new AutoPlay applications, such as: http://timestamp.verisign.com/scripts/timstamp.dll. If you do not want to timestamp the application, leave this field blank.

Other arguments:

Any additional options you would like to pass to the code signing tool. If you leave any of the code signing fields blank (except for tool location), you can pass their values as command line options. AutoPlay Media Studio automatically passes the "sign" argument when "SignTool.exe" is the selected tool.


Document Preferences

Preferences

Overview Document

File Revert

Show confirmation

Show a confirmation dialog whenever you revert to the last saved state of the project.

Auto-Save

Enabled

Make AutoPlay Media Studio save your project automatically at regular intervals.

Interval:

The time in minutes to wait between autosaves. This is how long AutoPlay Media Studio will wait after it automatically saves your project, before it automatically saves the project again.

Purge level:

The maximum number of autosaved project files that you want AutoPlay Media Studio to keep at any given time.

The files will be saved at regular intervals in a subfolder called Autosave inside the project folder. The files will automatically be named according to the following format:

autosave_YYYY-MM-DD_HH-MM-SS.am5

Undo/Redo

Levels:

The maximum number of changes that will be undo-able in AutoPlay Media Studio. (Set this to 0 to disable the undo/redo feature.)


Environment Preferences

Preferences

Overview Environment

Selected Object Colors

Selected

The color that you want to use for the bounding box (the border that surrounds objects) of objects when they are selected at design time.

Grouped

The color that you want to use for the bounding box of objects that are part of a group at design time.

Pinned

The color that you want to use for the bounding box of objects that are pinned at design time.

Stage Colors

Background

The background color that you want to use for the work area.

Shadow

The color that you want to use for the page/dialog shadow in the work area.

Show page/dialog shadow

Show or hide the page/dialog shadow.

Themes

GUI

The default style to use for the Graphical User Interface.

Docking pane

The default style to use for the docking pane.

Grid theme

The default style to use for the grid.


Tabs Preferences

Preferences

Overview Tabs

Position of Dialog Tabs

These settings control how the dialog tabs will be shown relative to the page tabs.

Note: The AutoPlay Media Studio design needs to be restarted for these changes to take effect.

Show dialogs to the left of the page tabs

Show all dialog tabs to the left of the page tabs.

Show dialogs to the right of the page tabs

Show all dialog tabs to the right of the page tabs.


Guideline Preferences

Preferences

Overview Guidelines

Guidelines

Both vertical and horizontal guidelines can be positioned on any page or dialog on your project. As well, project guidelines can be created that exist on every page or dialog in your project. This feature can be used to help align objects on your page or dialog with precision.

Visible

Show or hide the guidelines.

Draw over objects

If checked, guidelines will be drawn over any non-windowed objects on the page or dialog, instead of being drawn directly onto the page or dialog surface.

Note: Guidelines will not appear over 'windowed' objects, such as input objects, web objects, video objects, etc.

Snap threshold:

The proximity in pixels that an object must be in relation to a guideline in order for that object to 'snap' to that guideline.

Note: Objects will only snap to guidelines when the guidelines are visible. Hiding the guidelines disables the snapping feature.

Tip: You can disable snapping temporarily by holding the Shift key while you drag an object.

Page/Dialog Guideline Colors

Normal:

The color that you want to use for each guideline on your page or dialog.

Locked:

The color that you want to use for each locked guideline on your page or dialog.

Project Guideline Colors

Normal:

The color that you want to use for each project-wide guideline in your project.

Locked:

The color that you want to use for each locked project-wide guideline in your project.


Grid Preferences

Preferences

Overview Grid

Grid

The page grid consists of vertical and horizontal lines that are drawn on each page or dialog. This feature can be used to help align objects on your page or dialog with precision.

Visible

Show or hide the grid.

Snap

Make objects (according to their bounding box) snap to grid cells when moved around the work area. This feature can be used to precisely position your objects.

Note: You can disable snapping temporarily by holding the Shift key while you drag an object.

Top Left

Snap the top left corner of objects to the top left corner of grid cells.

Top

Snap the top of objects to the top of grid cells.

Top Right

Snap the top right corner of objects to the top right corner of grid cells.

Right

Snap the right side of objects to the right side of grid cells.

Bottom Right

Snap the bottom right corner of objects to the bottom right corner of grid cells.

Bottom

Snap the bottom of objects to the bottom of grid cells.

Bottom Left

Snap the bottom left corner of objects to the bottom left corner of grid cells.

Left

Snap the left side of objects to the left side of grid cells.

Colors

Cell color:

The color that you want to use for each grid cell.

Block color:

The color that you want to use for each block surrounding the cells.

Static

Cell size (pixels):

The size (in pixels) you want to use for each cell in the grid.

Block size (cells):

The height and width (in cells) you want to use to create the blocks in the grid.

Style

Lines

Use solid lines to draw the grid.

Dots

Use dotted lines to draw the grid.


Project Size Preferences

Preferences

Overview Project Size

Target Media

Determines the scale of the meter on the Project Size panel.

If you set this target media size to match the size of the media you’re using, you'll have a visual indicator of how much space is left in your project as the project grows in size.

Note: This preference doesn't affect the project in any way; the target media size only affects the size meter on the Project Size panel. It also doesn't matter how big the disc in your burner is...if you want the size meter to match the size of the media you're using, you'll need to change the target media size manually whenever you switch from one media size to another.

30 MB

The Project Size panel will be scaled to accommodate 30 MB of resources.

50 MB

The Project Size panel will be scaled to accommodate 50 MB of resources.

180 MB

The Project Size panel will be scaled to accommodate 180 MB of resources.

650 MB

The Project Size panel will be scaled to accommodate 650 MB of resources.

700 MB

The Project Size panel will be scaled to accommodate 700 MB of resources.

4.3 GB (4403 MB)

The Project Size panel will be scaled to accommodate 4.3 GB (4403 MB) of resources.

4.7 GB (4813 MB)

The Project Size panel will be scaled to accommodate 4.7 GB (4813 MB) of resources.

25 GB (25600 MB)

The Project Size panel will be scaled to accommodate 25 GB (25600 MB) of resources.

50 GB (51200 MB)

The Project Size panel will be scaled to accommodate 50 GB (51200 MB) of resources.

100 GB (102400 MB)

The Project Size panel will be scaled to accommodate 100 GB (102400 MB) of resources.

Custom

Choose a custom size to scale the meter on the Project Size panel.

Warning Size

AutoPlay Media Studio will warn you when your project size reaches this percentage of the chosen target media.


Ruler Preferences

Preferences

Overview Rulers

Rulers

The rulers in AutoPlay Media Studio are designed to show you the size and position of objects on the page or dialog without going into the object's properties.

Visible

Show or hide the rulers in the work area.

Colors

Background:

The color that you want to use for the background of the ruler.

Foreground:

The color that you want to use for the lines on the ruler.

Objects:

The color that you want to use for the object shadows on the ruler.


Folder Preferences

Preferences

Overview Folders

Temporary:

The full path to the folder where AutoPlay Media Studio will store any temporary files that it needs to generate during the build/preview process. (Set to your Temp folder by default.) Click the browse button to select a new folder.

Projects:

The full path to the folder where your projects are created. Click the browse button to select a new folder.

Preference files:

The full path to the folder where your preference files will be saved. Click the browse button to select a new folder.


Objects Preferences

Preferences

Overview Objects

Default object font:

The default font that you want to use for the text of each created object. Select an object from the combobox and then click the Font... button to open the Font dialog where you can specify all of its font settings.

Override button file settings

Override all Button object's internal font settings and instead use the settings specified in default object font.


Drag and Drop Preferences

Preferences

Overview Drag and Drop

File Exists

You can use these settings to control what happens if a file being dragged and dropped onto the work area already exists in your project.

Auto-rename

Automatically rename the file being added to the project so there are no naming conflicts.

Use newest

Use the newest of the two files.

Ask

Ask you if you would like to overwrite the file currently in your project with the new file, or add the file with a new name.

Dropped Script

You can use these settings to control what happens when a script file (*.lua) is dragged and dropped onto the work area of your project.

Add Application.LoadScript to Global Functions.

Automatically add an Application.LoadScript action to the Global Functions of your project.

Ignore

Ignore the attempt to add the file.

Ask

Ask you if you would like to load the script file using an Application.LoadScript action in Global Functions.


Drop on Page Preferences

Preferences

Overview Drop on Page/Dialog

Document Dropped on Page/Dialog

You can use these settings to control what happens when you drag and drop a document file onto the work area. A document file is any file that can't be displayed in an object.

Add file to Docs folder

Automatically add document files to the Docs folder in your project.

Ignore

Ignore the attempt to add the file.

Ask

Ask you if it should be added to the Docs folder in your project.

Audio Dropped on Page/Dialog

You can use these settings to control what happens when you drag and drop an audio file onto the project's work area.

Add Audio file to background music

Automatically add the file to the end of the Background Music list in your project.

Ignore

Ignore the attempt to add the file.

Ask

Ask you if it should be added as a Background Music track.

Image Becomes Background

You can use these settings to control what happens when you drag an image onto the project's work area.

Enabled

When an image file whose dimensions are larger than a specified percentage of the page or dialog is dragged into the work area, make that image the background image for the page or dialog (rather than adding it as an image object).

Size threshold:

The percentage of the page or dialog you want to use to determine whether or not the image should be added as the background. If an image's dimensions are greater than this percentage value, it will be added as the background. Otherwise it will be added as an image object.

Show prompt

Ask you whether the image should be used as your background image for the page or dialog.


Drop on Object Preferences

Preferences

Overview Drop on Object

Document Dropped on Object

You can use these settings to control what happens when you drag and drop a document file onto an object. A document file is any file that can't be displayed in an object.

Add File.Open action to "On Click" event

Automatically add a File.Open action to the object's On Click event.

Ignore

Ignore the attempt to add the file.

Ask

Ask you if a File.Open action should be added to the object.

Note: If the object does not have an On Click event, it will be ignored.

Audio Dropped on Object

You can use these settings to control what happens when you drag and drop an audio file onto an object.

Add Audio.Load action to "On Click" event

Automatically add an Audio.Load(CHANNEL_NARRATION, "Filename", true, false) action to the object's On Click event.

Ignore

Ignore the attempt to add the file.

Ask

Ask you if an Audio.Load action should be added to the object.

Note: If the object does not have an On Click event, it will be ignored.

Page Dropped on Object

You can use these settings to control what happens when you drag and drop a page from the Page Manager pane onto an object.

Add Page.Jump action to "On Click" event

Automatically add a Page.Jump action to the object's On Click event.

Ignore

Ignore the dragging attempt.

Ask

Ask you if a Page.Jump action should be added to the object.

Note: If the object does not have an On Click event, it will be ignored.

Dialog Dropped on Object

You can use these settings to control what happens when you drag and drop a dialog from the Dialog Manager pane onto an object.

Add DialogEx.Show action to "On Click" event

Automatically add a DialogEx.Show action to the object's On Click event.

Ignore

Ignore the dragging attempt.

Ask

Ask you if a DialogEx.Show action should be added to the object.

Note: If the object does not have an On Click event, it will be ignored.


File Associations Preferences

Preferences

Overview File Associations

Override associations:

Allows you to specify specific external programs to use as external editors for any file extension used in your project. These programs will be used whenever the Open Source File option is selected (Tools > Open Source File).

This field is basically a paragraph object in a dialog. You can type whatever you want; however, AutoPlay will only recognize a specific format:

<Extension>=<Program Path> %1 <Any other arguments>

Note: '%1' is a placeholder for the path of a source file. It is important to keep in mind that any %1 appearing in an extension override will be replaced by the path to the source file. This includes any %1's that may be passed in the <any other arguments> portion of an extension override.

For example, to force AutoPlay to use the button editor to edit .btn files, the setting would be as follows:

.btn="C:\Program Files\AutoPlay Media Studio 8\Tools\ButtonMaker.exe" %1

You can list as many extensions as you like. Just make sure each entry is on a separate line, and that there is only one entry per line. You can enter duplicate extensions in this field, however note that only the first extension listed will be used (subsequent entries for the same extension will be ignored).

Note: Any changes made in an external program to a source file will not be visible in the design environment of AutoPlay Media Studio until you refresh the design environment (View > Refresh).


Resource Preview Preferences

Preferences

Overview Resource Preview

File Preview

These settings control whether media files selected through the Select File dialog will automatically play in the preview window.

Play videos automatically

When a video file is selected, automatically start to play the video in the preview window.

Play audio files automatically

When an audio file is selected, automatically start to play the audio file in the preview window.

Object Preview

These settings control whether objects will display a preview of their media files at design time.

Show live preview for flash objects

Display each Flash object's first frame at design time.

Note: Some Flash files use scripting to include animation in the first frame. When this preview option is enabled, such Flash files will begin to play their animation as soon as the Flash object is added to the page or dialog.


Script Editor Preferences

Preferences

Overview Script Editor

Double-click opens action's properties dialog

Controls whether or not the action's properties dialog will open when you double-click an action in the script editor window. If unchecked, double-clicking any text in the script editor simply selects the text, as in most other text editors.

Automatic syntax checking

Controls whether or not a check is performed on scripts to make sure they are syntactically correct. It does not check for logical or other programming errors, simply syntax. This check is performed when leaving the current script editor window. If unchecked, no syntax checking is performed.

Confirm cancel when scripts are modified

Controls whether or not a confirmation dialog will appear after you click the Cancel button in the action editor when there are unsaved changes. If unchecked, cancelling will exit the dialog without notice and you will lose any changes that have been made.


Spell Checker Preferences

Preferences

Overview Spell Checker

You can use these settings to control the spell checker features within fields that support spell checking (each field that supports spell checking will have a check spelling button near it).

Check spelling as you type

Check the spelling of text as you type it.

Always suggest corrections

Suggest possible corrections for any spelling mistakes encountered.

Suggest from main dictionaries only

Show spelling mistake suggestions from the Main Dictionaries only (not the Custom Dictionary).

Ignore words in UPPERCASE

Ignore any uppercase words in the text. For example, AUTOPLAY.

Ignore words with numbers

Ignore any words in the text that contain numbers. For example, am4.

Ignore Internet and file addresses

Ignore any internet or file addresses in the text. For example, http://www.indigorose.com, or C:\Program Files\myfile.txt.

Capitalize sentences

Automatically capitalize the first letter of a new sentence.

Correct two initial capitals

If a word is encountered in the text that starts with two capital letters, make the second letter lower-case.

Custom dictionary:

The full path to your custom dictionary file. This file can be included or added to when you encounter common words that are not in the main dictionary. You can click the browse button to select a custom dictionary file (*.dic).

Main dictionaries:

The full paths to your main dictionary files (*.lex). You can use the Insert, Delete and Up/Down arrows to manipulate the dictionary file list.


Startup Preferences

Preferences

Overview Startup

When this Program Starts

Show welcome dialog

When AutoPlay Media Studio starts, display the welcome dialog where you can create a new project or open and existing project.

Open last project

When AutoPlay Media Studio starts, automatically open the last project viewed through the design environment.

New Project Options

Show template notes if present

Show the Template Notes dialog containing its description or instructions when starting a new project from a template. Template notes are the text entered in the Description field of the Project Template Information when exporting projects as templates.


Updates Preferences

Preferences

Overview Updates

Auto-Update

Enabled

Whether to automatically check for new versions of the AutoPlay Media Studio program according to the settings below. If you disable this feature, make sure that you choose the Check for Update item from the Help menu from time to time to ensure that you are always using the most current release of AutoPlay Media Studio.

Frequency:

How often (the number of days) you want AutoPlay Media Studio to check for an update.

Hide interface

Whether to hide the update interface when the program checks for an update.

Connection...

Open the Connection Settings dialog where you can configure the connection settings that AutoPlay Media Studio will use when it checks for updates.


Align Menu

Program Menus

Overview File Edit Align Page Dialog Object Project Publish View Tools Help

Left

Aligns the left sides of all selected objects with the left side of the dominant object. The dominant object is usually the last one selected and will be displayed with a solid bounding box.

Tip: You can change the dominant object by selecting one of the other objects in the selection.

Center Horizontal

Aligns the horizontal centers of all selected objects with the horizontal center of the dominant object. The dominant object is usually the last one selected and will be displayed with a solid bounding box.

Right

Aligns the right sides of all selected objects with the right side of the dominant object. The dominant object is usually the last one selected and will be displayed with a solid bounding box.

Top

Aligns the top sides of all selected objects with the top side of the dominant object. The dominant object is usually the last one selected and will be displayed with a solid bounding box.

Center Vertical

Aligns the vertical centers of all selected objects with the vertical center of the dominant object. The dominant object is usually the last one selected and will be displayed with a solid bounding box.

Bottom

Aligns the bottom sides of all selected objects with the bottom side of the dominant object. The dominant object is usually the last one selected and will be displayed with a solid bounding box.

Distribute Vertical

Distributes the selected objects evenly down the page or dialog (vertically) so they are spread out evenly between the two outermost objects, with exactly the same amount of space between each pair. (The outermost objects may be moved a few pixels up or down in order to keep the spaces between all the objects the same.)

Distribute Horizontal

Distributes the selected objects evenly across the page or dialog (horizontally) so they are spread out evenly between the two outermost objects, with exactly the same amount of space between each pair. (The outermost objects may be moved a few pixels left or right in order to keep the spaces between all the objects the same.)

Make Same Width

Resizes the selected objects so their width is the same as the dominant object's width. The dominant object is usually the last one selected and will be displayed with a solid bounding box.

Make Same Height

Resizes the selected objects so their height is the same as the dominant object's height. The dominant object is usually the last one selected and will be displayed with a solid bounding box.

Make Same Size

Resizes the selected objects so their width and height are the same as the dominant object's. The dominant object is usually the last one selected and will be displayed with a solid bounding box.

Restore Size

Restores the object to it's original size. (This feature is only available for certain objects.)

To Page/Dialog

Aligns the selected objects to the page or dialog instead of the dominant object.


Page Menu

Program Menus

Overview File Edit Align Page Dialog Object Project Publish View Tools Help

Add

Adds a blank new page to your project.

Remove

Removes the currently selected page from your project.

Insert...

Opens the Insert Page dialog where you can insert a new page in your project.

Duplicate

Creates a duplicate copy of the currently selected page.

Arrange...

Opens the Organize Pages dialog allowing you to arrange all of the pages in your project.

Move Up

Moves the current page one position up in the page order (moves the page tab one position to the left).

Move Down

Moves the current page one position down in the page order (moves the page tab one position to the right).

Export...

Exports the current page as an Exported AutoPlay Page File (*xpg). You will be presented with an Export Page dialog where you can specify it's name and location to be saved.

Preview

Previews the current page.

Properties...

Opens the Page Properties dialog where you can configure its settings.


Page - Overview

Page

Overview Pane Dialog Actions

Each project is made up of one or more pages. A page in AutoPlay is very much like a page in a book. Just like in a book, each page can have different items on it, such as different photographs and text.

An individual project can have up to 2500 pages.

Note: Pages are the "surfaces" that objects can be placed on.

When you click on the page surface, the page settings are displayed in the properties pane. Double-clicking on the page surface opens the Properties dialog for the page.

Tip: You can switch between pages by clicking on a page tab at the top of the work area, or by double-clicking on any page in the project explorer.

Tip: You can change the order of the pages in your project through the Organize Pages dialog (Page > Arrange).


Page - Pane

Page

Overview Pane Dialog Actions

Here are the page's settings as they appear in the properties pane:

Page

Name

The unique name that is used to identify this page.

Description

A short description you want to use for this page. If entered, this text will be shown to identify this page in the Dialog.PageSearch action. You an also access this value at runtime using the Application.GetPageProperties action.

Keywords

A comma-delimited list of keywords you want to store for this page. These can be used to allow the user to search your application at runtime for pages containing keyword text. See the Dialog.PageSearch action for displaying a search dialog in your application, and the Application.MakeKeywordIndex and Application.SearchKeywords actions for manually working with the keyword index in your project.

UseCustomSettings

Setting this value to true will allow you to change the look of your page background. If this value is false, the page background will be the default background color for windows applications.

Note: If you skin your application, the default background color will come from your skin file.

Note: if this value is set to true, the BackgroundStyle, BackgroundImage, ImageStyle, BackgroundColor and GradientColor settings will be ignored.

BackgroundStyle

The type of background to use. Choose from:

Solid

Cover the background with a single, solid color.

Gradient

Cover the background with a 2-color gradient.
(A smooth transition from one color at the top of the page, to a second color at the bottom of the page.)

Image

Display an image as the background. The image will be resized to fit the page.

BackgroundImage

The image that will be used as the background for this page. Click the browse button to select an image file.

ImageStyle

The background image style to show. Choose from:

Fit to page

Resize or stretch the image to cover the entire page. (This may cause some images to appear distorted.)

Tile

Cover the background with copies of the image placed side-by-side and top-to-bottom, like tiles on a floor.

Actual size

Display the image using it's original dimensions. The image will be positioned in the top left hand corner of the page.

BackgroundColor

The background color for the page.

Tip: You can click the select button to bring up a color chooser. Clicking the "More Colors..." button on the color menu allows you to choose either a standard color/custom color, or use the eyedropper to pick a color from somewhere within the AutoPlay application window.

GradientColor

The bottom color for the Gradient background style. The page background will be blended from the background color (at the top of the page) to this color (at the bottom of the page) when Style is set to "Gradient."

Transition

The type of transition you want to have between pages in your project. Click the select button to choose one of the available transition styles.

TransitionSettings

The settings you want to have for the selected transition style. Click the edit button to open the transition properties dialog.

InheritBackground

The name of the page whose background properties you want to inherit. The background for that page will be used on the current page. If you need to edit the background, you will need to go to the page you inherited from to make any changes.

InheritObjects

The name of the page whose objects you want to inherit. If you need to edit any objects that are inherited, you will need to go to the page you inherited from to make any changes.

Actions

On Preload

The actions that will be performed right after the page is created in memory, before the page (or any of the objects on it) is shown.

You can use this event to set the initial visibility of each object on the page. Simply show or hide the objects according to whether they should start out visible or hidden. (By doing so before the page is displayed, you can avoid any visible "flickering" as the objects are hidden or shown.)

Note: Some actions (especially object-related actions) may not work properly on this event because it occurs before any of the page's objects are "created." If an action doesn't work at On Preload, try it at On Show instead.

Click the edit button to open the script editor.

On Show

The actions that will be performed whenever the page is opened (after the page is shown and the objects have been drawn). Click the edit button to open the script editor.

On Close

The actions that will be performed whenever the page is closed. Click the edit button to open the script editor.

On Timer

The actions that will be performed whenever a page timer fires. You can start a page timer using a Page.StartTimer action. Click the edit button to open the script editor.

On Audio

The actions that will be performed whenever an audio channel's state changes on the page. For example, if a channel's audio is paused, this event will be triggered. Click the edit button to open the script editor.

On Size

The actions that will be performed whenever the page changes size. For example, if the user maximizes the application's window, this event will fire. Click the edit button to open the script editor.

On Menu

The actions that will be performed when the user interacts with the menu bar. Click the edit button to open the script editor.

On Key

The actions that will be performed whenever the application window has focus and the user presses a key. Click the edit button to open the script editor.

On Mouse Button

The actions that will be performed when a mouse button is clicked within the bounds of your application. Click the edit button to open the script editor.

On Mouse Move

The actions that will be performed when the mouse moves within the bounds of your application. Click the edit button to open the script editor.

On Mouse Wheel

The actions that will be performed when the mouse wheel is rotated while the page has focus. Click the edit button to open the script editor.


Page - Dialog

Page

Overview Pane Dialog Actions

Here are the page's settings as they appear on the "double-click" Properties dialog.

There are two tabs on the Properties dialog:

Settings

Script

Settings Tab

Page

Name:

The unique name that is used to identify this page.

Description:

A short description you want to use for this page. If entered, this text will be shown to identify this page in the Dialog.PageSearch action. You an also access this value at runtime using the Application.GetPageProperties action.

Keywords:

A comma-delimited list of keywords you want to store for this page. These can be used to allow the user to search your application at runtime for pages containing keyword text. See the Dialog.PageSearch action for displaying a search dialog in your application, and the Application.MakeKeywordIndex and Application.SearchKeywords actions for manually working with the keyword index in your project.

Background

Use custom settings

Checking this checkbox will allow you to change the look of your page background. If this checkbox is unchecked, the page background will be the default background color for windows applications.

Note: If you skin your application, the default background color will come from your skin file.

Solid color

Cover the background with a single, solid color. You can click the select button to bring up a color chooser.

Tip: Clicking the "More Colors..." button on the color menu allows you to choose either a standard color/custom color, or use the eyedropper to pick a color from somewhere within the AutoPlay application window.

Gradient

Cover the background with a 2-color gradient. You can click on both of the select buttons to bring up color choosers.
(A smooth transition from one color at the top of the page, to a second color at the bottom of the page.)

Image

Display an image as the background. The image will be resized to fit the page.

File:

The image that will be used as the background for this page. Click the browse button to select an image file.

Note: This setting is only available when the "Image" background is selected.

Fit to page

Resize or stretch the image to cover the entire page. (This may cause some images to appear distorted.)

Tile

Cover the background with copies of the image placed side-by-side and top-to-bottom, like tiles on a floor.

Actual size

Display the image using it's original dimensions. The image will be positioned in the top left hand corner of the page.

Background color:

The color to use behind the image if the image does not cover the entire page. Click the select button to bring up a color chooser.

Inherit

Background from page:

The name of the page whose background properties you want to inherit. The background for that page will be used on the current page. If you need to edit the background, you will need to go to the page you inherited from to make any changes.

Objects from page:

The name of the page whose objects you want to inherit. If you need to edit any objects that are inherited, you will need to go to the page you inherited from to make any changes.

Transition

Effect:

The type of transition you want to have between pages in your project. Click the select button to choose one of the available transition effects.

Settings...

Opens the transition properties dialog where you can choose the settings you want to have for the selected transition effect.

Script Tab

You can use the script editor on this tab to edit the script of actions that will be performed on each of this page's events.

Each page supports the following events:

On Preload

The actions that will be performed right after the page is created in memory, before the page (or any of the objects on it) is shown.

You can use this event to set the initial visibility of each object on the page. Simply show or hide the objects according to whether they should start out visible or hidden. (By doing so before the page is displayed, you can avoid any visible "flickering" as the objects are hidden or shown.)

Note: Some actions (especially object-related actions) may not work properly on this event because it occurs before any of the page's objects are "created." If an action doesn't work at On Preload, try it at On Show instead.

On Show

The actions that will be performed whenever the page is opened (after the page is shown and the objects have been drawn).

On Close

The actions that will be performed whenever the page is closed.

On Timer

The actions that will be performed whenever a page timer fires. You can start a page timer using a Page.StartTimer action.

The following event variable is automatically set whenever this event is triggered:

e_ID

(number) The numeric ID of the page timer that has fired. This is the same ID that was passed to the Page.StartTimer action that created the page timer. When using multiple timers, you can differentiate between them using if/elseif statements.

On Audio

The actions that will be performed whenever an audio channel's state changes on the page. For example, if a channel's audio is paused, this event will be triggered.

The following event variables are automatically set whenever this event is triggered:

e_Channel

(number) The audio channel whose state has changed. One of the following channel values will be returned:

CONSTANT | VALUE | DESCRIPTION
CHANNEL_BACKGROUND | 5 | Background audio channel.
CHANNEL_EFFECTS | 0 | Effects channel (used for mouse over, down, and click sounds).
CHANNEL_NARRATION | 6 | Narration channel (used for voice overs).
CHANNEL_USER1 | 1 | User channel 1.
CHANNEL_USER2 | 2 | User channel 2.
CHANNEL_USER3 | 3 | User channel 3.
CHANNEL_USER4 | 4 | User channel 4.
CHANNEL_ALL | -3 | All audio channels.

e_State

(string) The state that the audio channel has changed to. One of the following states will be returned:

VALUE | TYPE | DESCRIPTION
Finish | string | The audio channel's track reached it's end.
Pause | string | The audio channel was paused using the Audio.Pause action.
Play | string | The audio channel was played using the Audio.Play action
Stop | string | The audio channel was stopped using the Audio.Stop action.

On Size

The actions that will be performed whenever the page changes size. For example, if the user maximizes the application's window, this event will fire.

The following event variables are automatically set whenever this event is triggered:

e_WindowWidth

(number) The width, in pixels, of the entire application window, including the border and title bar.

e_WindowHeight

(number) The height, in pixels, of the entire application window, including the border and title bar.

e_PageWidth

(number) The width of the current page.

e_PageHeight

(number) The height of the current page.

e_Type

(number) The type of resize that has occurred. Choose from:

CONSTANT | VALUE | DESCRIPTION
SIZE_RESTORED | 0 | The application was either restored from being maximized or minimized or was resized normally.
SIZE_MINIMIZED | 1 | The application was minimized to the taskbar.
SIZE_MAXIMIZED | 2 | The application was maximized.

Tip: To make your project resizable, enable the resizable option on the Appearance tab of the Project Settings dialog (Project > Settings).

On Menu

The actions that will be performed when the user interacts with the menu bar.

The following event variables are automatically set whenever this event is triggered:

e_ID

(number) The item ID of the menu item currently being interacted with.

e_ItemInfo

(table) Extended information about the currently selected menu item.

KEY | TYPE | DESCRIPTION
Text | string | The text of the menu item currently being interacted with.
ID | number | The item ID of the menu item currently being interacted with.
IconID | number | The 0-based icon index from the Image List specified on the Menu Bar for the menu item.
Enabled | boolean | True if the current menu item is enabled, false if it is not.
Checked | boolean | True if the current menu item is checked, false if it is not.

On Key

The actions that will be performed whenever the application window has focus and the user presses a key.

The following event variables are automatically set whenever this event is triggered:

e_Key

(number) The virtual key code of the key that was pressed.

e_Modifiers

(table) A table containing three boolean values that describe which modifier keys were held down while the key was pressed. A modifier key is a key that can be held down while another key is pressed, to "modify" it.

There are three true/false values in the table, one for each type of modifier key on the keyboard: shift, ctrl, and alt. You can access these values as e_Modifiers.shift, e_Modifiers.ctrl, and e_Modifiers.alt.

On Mouse Button

The actions that will be performed when a mouse button is clicked within the bounds of your application.

The following event variables are automatically set whenever this event is triggered:

e_Type

(number) A number containing the type of mouse-button behaviour:

CONSTANT | VALUE | DESCRIPTION
LEFT_BUTTON_DOWN | 0 | Left mouse button has been pressed.
LEFT_BUTTON_UP | 1 | Left mouse button has been released.
RIGHT_BUTTON_DOWN | 2 | Right mouse button has been pressed.
RIGHT_BUTTON_UP | 3 | Right mouse button has been released.

e_X

(number) The horizontal position of the mouse cursor, in pixels, from the left side of the page.

e_Y

(number) The vertical position of the mouse cursor, in pixels, from the right side of the page.

On Mouse Move

The actions that will be performed when the mouse moves within the bounds of your application.

The following event variables are automatically set whenever this event is triggered:

e_X

(number) The horizontal position of the mouse cursor, in pixels, from the left side of the page.

e_Y

(number) The vertical position of the mouse cursor, in pixels, from the right side of the page.

On Mouse Wheel

The actions that will be performed when the mouse wheel is rotated while the page has focus.

The following event variables are automatically set whenever this event is triggered:

e_Flags

(table) A table containing five boolean values that describe which modifier keys or buttons were held down when the mouse wheel event was fired.

There are five true/false values in the table: shift key, ctrl key, left mouse button, middle mouse button, and right mouse button. You can access these values as e_Flags.shift, e_Flags.ctrl, e_Flags.LButton, e_Flags.MButton, and e_Flags.RButton.

e_Delta

(number) The distance that the mouse wheel was rotated. A negative value indicates that the mouse wheel was rotated backward towards the user, and a positive value indicates that the mouse wheel was rotated forward away from the user. This can be altered by the user via their mouse software. This value will usually be 120 or -120, however may be multiples or divisions of 120 depending upon the mouse vendor.

e_X

(number) The horizontal position of the mouse cursor, in pixels, from the left side of the page.

e_Y

(number) The vertical position of the mouse cursor, in pixels, from the top of the page.


Page - Actions

Page

Overview Pane Dialog Actions

Page.ClickObject

Page.CreateObject

Page.DeleteObject

Page.EnumerateObjects

Page.GetFocus

Page.GetObjectScript

Page.GetObjectType

Page.GetRadioValue

Page.GetSize

Page.Jump

Page.Navigate

Page.Print

Page.Redraw

Page.SetFocus

Page.SetObjectScript

Page.SetObjectZOrder

Page.SetRadioValue

Page.StartTimer

Page.StopTimer

Additional page related actions:

Application.GetCurrentPage

Application.GetPageProperties

Application.GetPages

Application.GetPageScript

Application.SetPageProperties

Application.SetPageScript


Dialog Menu

Program Menus

Overview File Edit Align Page Dialog Object Project Publish View Tools Help

Add

Adds a blank new dialog to your project.

Remove

Removes the currently selected dialog from your project.

Insert...

Opens the Insert Dialog dialog where you can insert a new dialog in your project.

Duplicate

Creates a duplicate copy of the currently selected dialog.

Arrange...

Opens the Organize Dialogs dialog allowing you to arrange all of the dialogs in your project.

Move Up

Moves the current dialog one position up in the dialog order (moves the dialog tab one position to the left).

Move Down

Moves the current dialog one position down in the dialog order (moves the dialog tab one position to the right).

Export...

Exports the current dialog as an Exported AutoPlay Dialog File (*xdg). You will be presented with an Export Dialog dialog where you can specify it's name and location to be saved.

Preview

Previews the current dialog.

Tip: If the dialog does not contain a title bar and you do not have an action to close the dialog, you can close it using the Escape key, or ALT+F4.

Properties...

Opens the Dialog Properties dialog where you can configure its settings.


Dialog - Overview

Dialog

Overview Pane Dialog Actions

A dialog is very similar to a page and can contain a variety of items such as text, images or radio buttons. While pages are shown in the main window of your application, dialogs are separate windows that can be opened on top of your application window.

Dialogs can be shown using the DialogEx.Show action, and closed using the DialogEx.Close action.

Note: You cannot navigate pages when a dialog is visible, nor can you show another instance of a dialog if it is already visible. You can however show a dialog from a dialog.

Note: Dialogs and pages are the "surfaces" that objects can be placed on.

When you click on the dialog surface, the dialog settings are displayed in the properties pane. Double-clicking on the dialog surface opens the Properties dialog for the dialog.

Tip: You can switch between dialogs and pages by clicking on their tabs at the top of the work area, or by double-clicking on any page or dialog in the project explorer. By default, dialog tabs are shown to the right of page tabs, however this can be changed on the Tabs preference (Edit > Preferences, Environment > Tabs).

Tip: You can change the order of the dialogs in your project through the Organize Dialogs dialog (Dialog > Arrange).


Dialog - Pane

Dialog

Overview Pane Dialog Actions

Here are the dialog's settings as they appear in the properties pane:

Dialog

Name

The unique name that is used to identify this dialog.

UseCustomSettings

Setting this value to true will allow you to change the look of your dialog background. If this value is false, the dialog background will be the default background color for windows applications.

Note: If you skin your application, the default background color will come from your skin file.

Note: if this value is set to true, the BackgroundStyle, BackgroundImage, ImageStyle, BackgroundColor and GradientColor settings will be ignored.

BackgroundStyle

The type of background to use. Choose from:

Solid

Cover the background with a single, solid color.

Gradient

Cover the background with a 2-color gradient.
(A smooth transition from one color at the top of the dialog, to a second color at the bottom of the dialog.)

Image

Display an image as the background. The image will be resized to fit the dialog.

BackgroundImage

The image that will be used as the background for this dialog. Click the browse button to select an image file.

ImageStyle

The background image style to show. Choose from:

Fit to page

Resize or stretch the image to cover the entire dialog. (This may cause some images to appear distorted.)

Tile

Cover the background with copies of the image placed side-by-side and top-to-bottom, like tiles on a floor.

Actual size

Display the image using it's original dimensions. The image will be positioned in the top left hand corner of the dialog.

BackgroundColor

The background color for the dialog.

Tip: You can click the select button to bring up a color chooser. Clicking the "More Colors..." button on the color menu allows you to choose either a standard color/custom color, or use the eyedropper to pick a color from somewhere within the AutoPlay application window.

GradientColor

The bottom color for the Gradient background style. The dialog background will be blended from the background color (at the top of the dialog) to this color (at the bottom of the dialog) when Style is set to "Gradient."

WindowTitle

The text that will be displayed in the title bar of the dialog's window.

Movable

Whether to make the dialog window "movable." Choose from:

True

If the Standard style is selected, allow the user to left-click the title bar and drag the dialog window around their screen. If the Flat style is selected, allow the user to left-click on the dialog surface and drag it around their screen.

False

Don't allow the user to move the dialog window around their screen.

AlwaysOnTop

Whether to make the dialog window always appear on top of all other windows on the desktop. Choose from:

True

Make the dialog window always appear on top of all other windows on the desktop. The window will remain on top even if the user switches to another application.

False

Don't make the dialog window always appear on top of all other windows.

Width

The width of the dialog surface, in pixels.

Height

The height of the dialog surface, in pixels.

Style

The window style to use for the dialog. Choose from:

Standard

A title bar and border will be displayed for the dialog window.

Bordered

A border will be displayed around the dialog window with no title bar.

Flat

The dialog will be displayed without a title bar or border.

Custom

The dialog will be displayed as a custom window shape using the custom mask file defined in CustomMask.

Note: When some of these options are used, the controls that normally appear on the title bar—such as the "X"-shaped close button in the upper right corner—will not be available. Make sure you provide some other way for your users to exit from the dialog. (For example, you could have an "Exit" button somewhere on the dialog.) You can also exit the dialog using the Escape key, or ALT+F4.

CustomMask

Make certain parts of your dialog's window transparent when the Custom style is selected. You can use this option to make a custom window shape for your dialog.

To specify the areas that you want to make transparent, you need to create a transparency mask file in your favorite drawing program.

A transparency mask file is just an image where a single color represents the parts that you want to make transparent. Picture this image as being invisibly "placed over" your dialog's window, like a mask or a stencil.

In AutoPlay, the transparent parts of the mask should all be solid black. Wherever solid black appears in the mask image, the corresponding part of the window will be made transparent. The transparency mask acts like a "cookie cutter," cutting holes in the dialog's window so the user's desktop can show through.

Click the browse button to select an image file.

FitToWindow

Whether to take your transparency mask image in CustomMask and resize it to fit the dialog. Choose from:

True

Take your transparency mask image and resize it to fit the dialog.

False

Use the original image dimensions to mask the dialog.

Resizable

Whether to make the dialog window resizable. Choose from:

True

Make the dialog window resizable. Enabling this option allows the user to resize the dialog window either by dragging the title bar, or by pressing the maximize/restore button. This option only applies to dialogs using the Standard and Bordered window styles.

Tip: To manipulate the size, position, visibility, etc. of objects when the dialog is resized, use the On Size event of the dialog's Script tab.

False

Don't allow the user to resize the dialog window.

MinWidth

The minimum dialog width to use at runtime if the window is resizable.

Note: This is the minimum dialog width, not the window width.

MinHeight

The minimum dialog height to use at runtime if the window is resizable.

Note: This is the minimum dialog height, not the window height.

UseCustomIcon

Whether to show a custom icon in the top left corner of the dialog window. Choose from:

True

Show a custom icon in the top left corner of the dialog window if the Standard style is selected.

False

Show the default application icon in the top left corner of the dialog window.

CustomIcon

The custom icon file to show in the top left corner of the dialog window if the Standard style is selected, and UseCustomIcon is set to True. You can use the browse button to select a standard icon (.ico) file.

Actions

On Preload

The actions that will be performed right after the dialog is created in memory, before the dialog (or any of the objects on it) is shown.

You can use this event to set the initial visibility of each object on the dialog. Simply show or hide the objects according to whether they should start out visible or hidden. (By doing so before the dialog is displayed, you can avoid any visible "flickering" as the objects are hidden or shown.)

Note: Some actions (especially object-related actions) may not work properly on this event because it occurs before any of the dialog's objects are "created." If an action doesn't work at On Preload, try it at On Show instead.

Click the edit button to open the script editor.

On Show

The actions that will be performed whenever the dialog is opened (after the dialog is shown and the objects have been drawn). Click the edit button to open the script editor.

On Close

The actions that will be performed whenever the dialog is closed. Click the edit button to open the script editor.

Tip: If you need to prevent the user from closing the dialog or want to add a confirmation message, you can use the built-in function QueryAllowDialogClose.

On Timer

The actions that will be performed whenever a dialog timer fires. You can start a dialog timer using a DialogEx.StartTimer action. Click the edit button to open the script editor.

On Audio

The actions that will be performed whenever an audio channel's state changes on the dialog. For example, if a channel's audio is paused, this event will be triggered. Click the edit button to open the script editor.

On Size

The actions that will be performed whenever the dialog changes size. For example, if the user maximizes the application's window, this event will fire. Click the edit button to open the script editor.

On Key

The actions that will be performed whenever the dialog window has focus and the user presses a key. Click the edit button to open the script editor.

On Mouse Button

The actions that will be performed when a mouse button is clicked within the bounds of your dialog. Click the edit button to open the script editor.

On Mouse Move

The actions that will be performed when the mouse moves within the bounds of your dialog. Click the edit button to open the script editor.

On Mouse Wheel

The actions that will be performed when the mouse wheel is rotated while the dialog has focus. Click the edit button to open the script editor.


Dialog - Dialog

Dialog

Overview Pane Dialog Actions

Here are the dialog's settings as they appear on the "double-click" Properties dialog.

There are three tabs on the Properties dialog:

Settings

Attributes

Script

Settings Tab

Dialog

Name:

The unique name that is used to identify this dialog.

Background

Use custom settings

Checking this checkbox will allow you to change the look of your dialog background. If this checkbox is unchecked, the dialog background will be the default background color for windows applications.

Note: If you skin your application, the default background color will come from your skin file.

Solid color

Cover the background with a single, solid color. You can click the select button to bring up a color chooser.

Tip: Clicking the "More Colors..." button on the color menu allows you to choose either a standard color/custom color, or use the eyedropper to pick a color from somewhere within the AutoPlay application window.

Gradient

Cover the background with a 2-color gradient. You can click on both of the select buttons to bring up color choosers.
(A smooth transition from one color at the top of the dialog, to a second color at the bottom of the dialog.)

Image

Display an image as the background. The image will be resized to fit the dialog.

File:

The image that will be used as the background for this dialog. Click the browse button to select an image file.

Note: This setting is only available when the "Image" background is selected.

Fit to page

Resize or stretch the image to cover the entire dialog. (This may cause some images to appear distorted.)

Tile

Cover the background with copies of the image placed side-by-side and top-to-bottom, like tiles on a floor.

Actual size

Display the image using it's original dimensions. The image will be positioned in the top left hand corner of the dialog.

Background color:

The color to use behind the image if the image does not cover the entire dialog. Click the select button to bring up a color chooser.

Tip: Clicking the "More Colors..." button on the color menu allows you to choose either a standard color/custom color, or use the eyedropper to pick a color from somewhere within the AutoPlay application window.

Attributes Tab

General

Window title:

The text that will be displayed in the title bar of the dialog's window.

Movable

Make the dialog window "movable." If the Standard style is selected, this means the user can left-click the title bar and drag the dialog window around their screen. If the Flat style is selected, the user can left-click on the dialog surface and drag it around their screen.

Always on top

Make the dialog window always appear on top of all other windows on the desktop. The window will remain on top even if the user switches to another application.

Dimensions

Dialog size (presets):

The size that will be used for the dialog, in pixels. Choose from:

Tiny

Make the dialog 200 pixels tall by 320 pixels wide.

Small

Make the dialog 300 pixels tall by 480 pixels wide.

Medium

Make the dialog 425 pixels tall by 630 pixels wide. (The largest size that will fit on a standard 640x480 display.)

Large

Make the dialog 545 pixels tall by 790 pixels wide. (The largest size that will fit on a standard 800x600 display.)

Extra Large

Make the dialog 713 pixels tall by 1014 pixels wide.

Huge

Make the dialog 969 pixels tall by 1270 pixels wide.

Custom

Specify a custom size.

Width:

The width of the dialog surface, in pixels.

Note: This setting is only available when the "Custom" dialog size is selected.

Height:

The height of the dialog surface, in pixels.

Note: This setting is only available when the "Custom" dialog size is selected.

Resize

Window is resizable

Make the dialog window resizable. Enabling this option allows the user to resize the dialog window either by dragging the title bar, or by pressing the maximize/restore button. This option only applies to dialogs using the Standard and Bordered window styles.

Tip: To manipulate the size, position, visibility, etc. of objects when the dialog is resized, use the On Size event of the dialog's Script tab.

Min. width:

The minimum dialog width to use at runtime if the window is resizeable.

Note: This is the minimum dialog width, not the window width.

Min. height:

The minimum dialog height to use at runtime if the window is resizable.

Note: This is the minimum dialog height, not the window height.

Style

Standard

A title bar and border will be displayed for the dialog window.

Bordered

A border will be displayed around the dialog window with no title bar.

Flat

The dialog will be displayed without a title bar or border.

Custom mask

Make certain parts of your dialog's window transparent. You can use this option to make a custom window shape for your dialog.

To specify the areas that you want to make transparent, you need to create a transparency mask file in your favorite drawing program.

A transparency mask file is just an image where a single color represents the parts that you want to make transparent. Picture this image as being invisibly "placed over" your dialog's window, like a mask or a stencil.

In AutoPlay, the transparent parts of the mask should all be solid black. Wherever solid black appears in the mask image, the corresponding part of the window will be made transparent. The transparency mask acts like a "cookie cutter," cutting holes in the dialog's window so the user's desktop can show through.

Click the Browse button to select an image file.

Note: When some of these options are used, the controls that normally appear on the title bar—such as the "X"-shaped close button in the upper right corner—will not be available. Make sure you provide some other way for your users to exit from the dialog. (For example, you could have an "Exit" button somewhere on the dialog.) You can also exit the dialog using the Escape key, or ALT+F4.

Fit custom mask to window

Take your transparency mask image and resize it to fit the dialog. The original image dimensions will be used to mask the dialog if this option is not selected.

Options

Custom icon

Show a custom icon in the top left corner of your dialog window if the Standard style is selected.

Click the browse button to select a standard icon (.ico) file.

Script Tab

You can use the script editor on this tab to edit the script of actions that will be performed on each of this dialog's events.

Each dialog supports the following events:

On Preload

The actions that will be performed right after the dialog is created in memory, before the dialog (or any of the objects on it) is shown.

You can use this event to set the initial visibility of each object on the dialog. Simply show or hide the objects according to whether they should start out visible or hidden. (By doing so before the dialog is displayed, you can avoid any visible "flickering" as the objects are hidden or shown.)

Note: Some actions (especially object-related actions) may not work properly on this event because it occurs before any of the dialog's objects are "created." If an action doesn't work at On Preload, try it at On Show instead.

On Show

The actions that will be performed whenever the dialog is opened (after the dialog is shown and the objects have been drawn).

On Close

The actions that will be performed whenever the dialog is closed.

Tip: If you need to prevent the user from closing the dialog or want to add a confirmation message, you can use the built-in function QueryAllowDialogClose.

On Timer

The actions that will be performed whenever a dialog timer fires. You can start a dialog timer using a DialogEx.StartTimer action.

The following event variable is automatically set whenever this event is triggered:

e_ID

(number) The numeric ID of the dialog timer that has fired. This is the same ID that was passed to the DialogEx.StartTimer action that created the dialog timer. When using multiple timers, you can differentiate between them using if/elseif statements.

On Audio

The actions that will be performed whenever an audio channel's state changes on the dialog. For example, if a channel's audio is paused, this event will be triggered.

The following event variables are automatically set whenever this event is triggered:

e_Channel

(number) The audio channel whose state has changed. One of the following channel values will be returned:

CONSTANT | VALUE | DESCRIPTION
CHANNEL_BACKGROUND | 5 | Background audio channel.
CHANNEL_EFFECTS | 0 | Effects channel (used for mouse over, down, and click sounds).
CHANNEL_NARRATION | 6 | Narration channel (used for voice overs).
CHANNEL_USER1 | 1 | User channel 1.
CHANNEL_USER2 | 2 | User channel 2.
CHANNEL_USER3 | 3 | User channel 3.
CHANNEL_USER4 | 4 | User channel 4.
CHANNEL_ALL | -3 | All audio channels.

e_State

(string) The state that the audio channel has changed to. One of the following states will be returned:

VALUE | TYPE | DESCRIPTION
Finish | string | The audio channel's track reached it's end.
Pause | string | The audio channel was paused using the Audio.Pause action.
Play | string | The audio channel was played using the Audio.Play action
Stop | string | The audio channel was stopped using the Audio.Stop action.

On Size

The actions that will be performed whenever the dialog changes size. For example, if the user maximizes the dialog's window, this event will fired.

The following event variables are automatically set whenever this event is triggered:

e_WindowWidth

(number) The width, in pixels, of the entire dialog window, including the border and title bar.

e_WindowHeight

(number) The height, in pixels, of the entire dialog window, including the border and title bar.

e_DialogWidth

(number) The width of the current dialog.

e_DialogHeight

(number) The height of the current dialog.

e_Type

(number) The type of resize that has occurred. Choose from:

CONSTANT | VALUE | DESCRIPTION
SIZE_RESTORED | 0 | The dialog was either restored from being maximized or minimized or was resized normally.
SIZE_MINIMIZED | 1 | The dialog was minimized to the taskbar.
SIZE_MAXIMIZED | 2 | The dialog was maximized.

Tip: To make your dialog resizable, enable the resizable option on the Attributes tab of the Dialog's properties.

On Key

The actions that will be performed whenever the dialog window has focus and the user presses a key.

The following event variables are automatically set whenever this event is triggered:

e_Key

(number) The virtual key code of the key that was pressed.

e_Modifiers

(table) A table containing three boolean values that describe which modifier keys were held down while the key was pressed. A modifier key is a key that can be held down while another key is pressed, to "modify" it.

There are three true/false values in the table, one for each type of modifier key on the keyboard: shift, ctrl, and alt. You can access these values as e_Modifiers.shift, e_Modifiers.ctrl, and e_Modifiers.alt.

On Mouse Button

The actions that will be performed when a mouse button is clicked within the bounds of your dialog.

The following event variables are automatically set whenever this event is triggered:

e_Type

(number) A number containing the type of mouse-button behaviour:

CONSTANT | VALUE | DESCRIPTION
LEFT_BUTTON_DOWN | 0 | Left mouse button has been pressed.
LEFT_BUTTON_UP | 1 | Left mouse button has been released.
RIGHT_BUTTON_DOWN | 2 | Right mouse button has been pressed.
RIGHT_BUTTON_UP | 3 | Right mouse button has been released.

e_X

(number) The horizontal position of the mouse cursor, in pixels, from the left side of the dialog.

e_Y

(number) The vertical position of the mouse cursor, in pixels, from the right side of the dialog.

On Mouse Move

The actions that will be performed when the mouse moves within the bounds of your dialog.

The following event variables are automatically set whenever this event is triggered:

e_X

(number) The horizontal position of the mouse cursor, in pixels, from the left side of the dialog.

e_Y

(number) The vertical position of the mouse cursor, in pixels, from the right side of the dialog.

On Mouse Wheel

The actions that will be performed when the mouse wheel is rotated while the dialog has focus.

The following event variables are automatically set whenever this event is triggered:

e_Flags

(table) A table containing five boolean values that describe which modifier keys or buttons were held down when the mouse wheel event was fired.

There are five true/false values in the table: shift key, ctrl key, left mouse button, middle mouse button, and right mouse button. You can access these values as e_Flags.shift, e_Flags.ctrl, e_Flags.LButton, e_Flags.MButton, and e_Flags.RButton.

e_Delta

(number) The distance that the mouse wheel was rotated. A negative value indicates that the mouse wheel was rotated backward towards the user, and a positive value indicates that the mouse wheel was rotated forward away from the user. This can be altered by the user via their mouse software. This value will usually be 120 or -120, however may be multiples or divisions of 120 depending upon the mouse vendor.

e_X

(number) The horizontal position of the mouse cursor, in pixels, from the left side of the dialog.

e_Y

(number) The vertical position of the mouse cursor, in pixels, from the top of the dialog.


Dialog - Actions

Dialog

Overview Pane Dialog Actions

DialogEx.ClickObject

DialogEx.Close

DialogEx.CreateObject

DialogEx.DeleteObject

DialogEx.EnumerateObjects

DialogEx.GetFocus

DialogEx.GetObjectScript

DialogEx.GetObjectType

DialogEx.GetRadioValue

DialogEx.GetSize

DialogEx.GetWndHandle

DialogEx.Print

DialogEx.Redraw

DialogEx.SetFocus

DialogEx.SetObjectScript

DialogEx.SetObjectZOrder

DialogEx.SetRadioValue

DialogEx.SetRedraw

DialogEx.Show

DialogEx.StartTimer

DialogEx.StopTimer

Additional dialog related actions:

Application.GetCurrentDialog

Application.GetDialogProperties

Application.GetDialogs

Application.GetDialogScript

Application.SetDialogProperties

Application.SetDialogScript


Object Menu

Program Menus

Overview File Edit Align Page Dialog Object Project Publish View Tools Help

Button

Adds a new button object to the current page or dialog. A select file dialog will be displayed so you can select a .btn file to load.

Image

Adds a new image object to the current page or dialog. A select file dialog will be displayed so you can select an image file to load.

Label

Adds a new label object to the current page or dialog.

Paragraph

Adds a new paragraph object to the current page or dialog.

Video

Adds a new video object to the current page or dialog. A select file dialog will be displayed so you can select a video file to load.

QuickTime

Adds a new quicktime object to the current page or dialog.

Flash

Adds a new flash object to the current page or dialog. A select file dialog will be displayed so you can select a flash file to load.

SlideShow

Adds a new slideshow object to the current page or dialog.

PDF

Adds a new pdf object to the current page or dialog. The New PDF Object dialog will be displayed so you can select a local file or specify a URL to load.

Web

Adds a new web object to the current page or dialog. The New Web Object dialog will be displayed so you can select a URL to load.

xButton

Adds a new xbutton object to the current page or dialog.

CheckBox

Adds a new checkbox object to the current page or dialog.

RadioButton

Adds a new radiobutton object to the current page or dialog.

Input

Adds a new input object to the current page or dialog.

ComboBox

Adds a new combobox object to the current page or dialog.

ListBox

Adds a new listbox object to the current page or dialog.

Tree

Adds a new tree object to the current page or dialog.

Grid

Adds a new grid object to the current page or dialog.

Progress

Adds a new progress object to the current page or dialog.

RichText

Adds a new richtext object to the current page or dialog.

Hotspot

Adds a new hotspot object to the current page or dialog.

Plugins

A sub-menu allowing you to add a new plugin object to the current page or dialog. All of the supported object plugins installed on your system will appear in this menu.

Properties...

Opens the currently selected object's Properties dialog where you can modify its settings.


Button Object - Overview

Button Object

Overview Pane Dialog Actions

The button is a special interactive object. It responds automatically to the user by changing its appearance when you move the mouse over it or click on it. In fact, each button has four different appearances, or "states," built into it: Up, Down, Highlight, and Disabled.

There's a different image for each state built right into the button file. By switching between these images, a button can appear animated and interactive—glowing when the user moves the mouse over it, for instance, and appearing pushed in when the user clicks on it. With full support for alpha transparency and variable opacity, buttons can even come with built-in drop shadow effects and have smooth, rounded edges.

Buttons are a great place to put actions, since they usually look like something you would want to click on. And to help the user know what the buttons will do, each button can have custom text on it, just like a label object. The text can even change color in each of the different states, so it fits in with each state's appearance perfectly.

Buttons come in all shapes, sizes and colors. The professionally-designed buttons that come with AutoPlay resize well and even look great when they're stacked on top of each other, thanks to the built-in drop shadows which give our buttons a nice, three-dimensional appearance.

Tip: An easy way to add a button object is to drag and drop a button file (.btn) onto the page or dialog surface. You can also add a button object by choosing Object > Button from the menu.


Button Object - Pane

Button Object

Overview Pane Dialog Actions

Here are the object's settings as they appear in the properties pane:

Object

Name

The name that is used to identify this object.

ButtonFile

The AutoPlay button file (.btn) that you want to display in the button object. Click the browse button to select a file.

Text

The text that you want to display on the button object.

Font

The font that you want to use for the text. Click the edit button to open the Font dialog where you can edit all of the font settings.

Tip: You can set the default font for this object type by configuring its settings on the Objects tab in Edit > Preferences.

Tip: You can override all button file's internal font settings on the Objects tab in Edit > Preferences.

FontFamily

The font family that you want to use.

FontSize

The font size, in points.

FontBold

Make the text bolded.

FontItalic

Make the text appear in italics.

XOffset

The x offset for the text, i.e. the number of pixels that the text should be offset horizontally from its default position. Positive values move the text to the right, and negative values move it to the left.

For example, you can offset the text 5 pixels to the left by setting this to -5.

YOffset

The y offset for the text, i.e. the number of pixels that the text should be offset vertically from its default position. Positive values move the text down, and negative values move the text up.

For example, you can offset the text 7 pixels down by setting this to 7.

Left margin:

The size of the left margin (in pixels) to leave around the text.

Right margin:

The size of the right margin (in pixels) to leave around the text.

Alignment

The alignment to use. Choose from:

Left

Left-align the text within the object's bounding box, like so:

This text is left-aligned

Center

Center the text within the object's bounding box, like so:

This text is centered

Right

Right-align the text within the object's bounding box, like so:

This text is right-aligned

Style

Choose from:

Standard

A standard button. Click to enter the down state; release the mouse button to return to the up state automatically.

Toggle

A toggle button. Click once to enter the down state; click again to return to the up state.

DefaultToggleState

The initial state of a toggle button. Choose from:

Up

Begin in the up state.

Down

Begin in the down (pressed) state.

Colors

Normal

The text color for the button's up state. (Normally used when the mouse is not over the object and the user is not clicking on it.)

Tip: You can click the select button to bring up a color chooser. Clicking the "More Colors..." button on the color menu allows you to choose either a standard color/custom color, or use the eyedropper to pick a color from somewhere within the AutoPlay application window.

Highlight

The text color for the button's highlight state. (Normally used while the mouse is held over the object.)

Click

The text color for the button's down state. (Normally used while the left mouse button is pressed down on the object.)

Disabled

The text color for the disabled state. This color will persist until a Button.SetEnabled action is called. While in the disabled state, the object will not respond to any mouse overs or clicks.

Attributes

TooltipText

A short string of text that will appear after the mouse hovers over this object for a moment.

Tip: You can choose from several tooltip styles for all tooltips in your project, Standard, Balloon and Extended. This setting can be found on the Appearance tab of the Project > Settings.

Tip: If you want a newline in your tooltip text, use "\r\n". For example, for an Extended tooltip, "My First Line\r\nMy Second Line|My Title". Newlines are not supported in the Title text for Balloon or Extended styles.

Tip: If you want a "&" character in the text, you must enter "&&&".

Enabled

Enable the object so it responds to user interaction. Choose from:

True

The object will respond to mouse overs and clicks and perform any actions assigned to its events.

False

The object will not respond to any mouse overs or clicks and will not perform any actions until it is enabled.

Note: You can use the Button.SetEnabled action to enable this object.

Visible

Set the object's initial visibility. Choose from:

True

The object will be visible when the page or dialog is displayed.

False

The object will be invisible when the page or dialog is displayed.

Note: You can use the Button.SetVisible action to make the object visible or invisible at run time.

Cursor

The mouse pointer that will be used while the mouse is over this object.

Position

Left

The distance in pixels from the left edge of the object to the left edge of the page or dialog.

Tip: You can also change the position of an object by dragging it or using the arrow keys.

Top

The distance in pixels from the top edge of the object to the top edge of the page or dialog.

Width

The width of the object in pixels.

Tip: You can also resize an object by dragging one of the resize handles on its bounding box.

Height

The height of the object in pixels.

Auto-Resize

ResizeLeft

Whether the left side of the object will move when resized. Choose from:

True

The left side of the object will move when the application is resized.

False

Don't move the left side of the object when the application is resized.

ResizeRight

Whether the right side of the object will move when resized. Choose from:

True

The right side of the object will move when the application is resized.

False

Don't move the right side of the object when the application is resized.

ResizeTop

Whether the top of the object will move when resized. Choose from:

True

The top of the object will move when the application is resized.

False

Don't move the top of the object when the application is resized.

ResizeBottom

Whether the bottom of the object will move when resized. Choose from:

True

The bottom of the object will move when the application is resized.

False

Don't move the bottom of the object when the application is resized.

Sounds

HighlightSound

The sound that will be played when the mouse moves over this object. Choose from:

None

Don't play any sound.

Standard

Play the default mouse over sound, as configured on the Sound Effects tab of the Audio Settings dialog.

Custom

Play a custom mouse over sound.

HighlightFile

The custom audio file to play. Click the browse button to select an appropriate sound file.

ClickSound

The sound that will be played when the user clicks on this object. Choose from:

None

Don't play any sound.

Standard

Play the default mouse click sound, as configured on the Sound Effects tab of the Audio Settings dialog.

Custom

Play a custom mouse click sound.

ClickFile

The custom audio file to play. Click the browse button to select an appropriate sound file.

Actions

Quick Action

A quick action to perform when the object is clicked. Click the edit button to select a quick action.

On Click

The actions that will be performed when the user clicks on this object. Click the edit button to open the script editor.

On Right-Click

The actions that will be performed when the user right-clicks on this object. Click the edit button to open the script editor.

On Enter

The actions that will be performed when the mouse moves onto this object ("enters" the object's territory). Click the edit button to open the script editor.

On Leave

The actions that will be performed when the mouse moves off of this object ("leaves" the object's territory). Click the edit button to open the script editor.


Button Object - Dialog

Button Object

Overview Pane Dialog Actions

Here are the object's settings as they appear on the "double-click" Properties dialog.

There are four tabs on the Properties dialog:

Settings

Attributes

Quick Action

Script

Settings Tab

Object

File:

The AutoPlay button file (.btn) that you want to display in the button object. Click the browse button to select a file.

Text:

The text that you want to display on the button object.

Font...

The font that you want to use for the text. Click the select font button to open the Font dialog where you can edit all of the font settings.

Tip: You can set the default font for this object type by configuring its settings on the Objects tab in Edit > Preferences.

Tip: You can override all button file's internal font settings on the Objects tab in Edit > Preferences.

Spelling

Check the spelling of the button text.

X Offset:

The x offset for the text, i.e. the number of pixels that the text should be offset horizontally from its default position. Positive values move the text to the right, and negative values move it to the left.

For example, you can offset the text 5 pixels to the left by setting this to -5.

Y Offset:

The y offset for the text, i.e. the number of pixels that the text should be offset vertically from its default position. Positive values move the text down, and negative values move the text up.

For example, you can offset the text 7 pixels down by setting this to 7.

Left margin:

The size of the left margin (in pixels) to leave around the text.

Right margin:

The size of the right margin (in pixels) to leave around the text.

Alignment

The alignment to use.

Left

Left-align the text within the object's bounding box, like so:

This text is left-aligned

Center

Center the text within the object's bounding box, like so:

This text is centered

Right

Right-align the text within the object's bounding box, like so:

This text is right-aligned

Style

Standard

A standard button. Click to enter the down state; release the mouse button to return to the up state automatically.

Toggle

A toggle button. Click once to enter the down state; click again to return to the up state.

Up

Begin in the up state.

Down

Begin in the down (pressed) state.

State Colors

Normal:

The text color for the button's normal (up) state. (Normally used when the mouse is not over the object and the user is not clicking on it.)

Tip: You can click the select button to bring up a color chooser. Clicking the "More Colors..." button on the color menu allows you to choose either a standard color/custom color, or use the eyedropper to pick a color from somewhere within the AutoPlay application window.

Disabled:

The text color for the disabled state. This color will persist until a Button.SetEnabled action is called. While in the disabled state, the object will not respond to any mouse overs or clicks.

Highlight:

The text color for the button's highlight state. (Normally used while the mouse is held over the object.)

Click:

The text color for the button's down state. (Normally used while the left mouse button is pressed down on the object.)

Match Normal

Sets the Highlight and Click color to be the same as the Normal color.

Attributes Tab

Identification

Object name:

The name that is used to identify this object.

State

Enabled

Enable the object so it responds to user interaction. When an object is disabled, it will not respond to any mouse overs or clicks and will not perform any actions until it is enabled.

Note: You can use the Button.SetEnabled action to enable this object.

Visible

Set the object's initial visibility (whether it's visible when the page or dialog is displayed).

Note: You can use the Button.SetVisible action to make the object visible or invisible at run time.

Auto-Resize

Left

If checked, the left side of the object will move when the application is resized. If unchecked, the left side of the object will not move.

Right

If checked, the right side of the object will move when the application is resized. If unchecked, the right side of the object will not move.

Top

If checked, the top of the object will move when the application is resized. If unchecked, the top of the object will not move.

Bottom

If checked, the bottom of the object will move when the application is resized. If unchecked, the bottom of the object will not move.

Position

Left:

The distance in pixels from the left edge of the object to the left edge of the page or dialog.

Tip: You can also change the position of an object by dragging it or using the arrow keys.

Top:

The distance in pixels from the top edge of the object to the top edge of the page or dialog.

Width:

The width of the object in pixels.

Tip: You can also resize an object by dragging one of the resize handles on its bounding box.

Height:

The height of the object in pixels.

Restore Original

Set's the object's size back to the original values.

Feedback

Tooltip:

A short string of text that will appear after the mouse hovers over this object for a moment.

Tip: You can choose from several tooltip styles for all tooltips in your project, Standard, Balloon and Extended. This setting can be found on the Appearance tab of the Project > Settings.

Tip: If you want a newline in your tooltip text, use "\r\n". For example, for an Extended tooltip, "My First Line\r\nMy Second Line|My Title". Newlines are not supported in the Title text for Balloon or Extended styles.

Tip: If you want a "&" character in the text, you must enter "&&&".

Spelling

Check the spelling of the tooltip text.

Cursor:

The mouse pointer that will be used while the mouse is over this object.

Sounds

Highlight:

The sound that will be played when the mouse moves over this object. Choose from:

None

Don't play any sound.

Standard

Play the default mouse over sound, as configured on the Sound Effects tab of the Audio Settings dialog.

Custom

Play a custom mouse over sound.

File:

The custom audio file to play. Click the browse button to select an appropriate sound file.

Click:

The sound that will be played when the user clicks on this object. Choose from:

None

Don't play any sound.

Standard

Play the default mouse click sound, as configured on the Sound Effects tab of the Audio Settings dialog.

Custom

Play a custom mouse click sound.

File:

The custom audio file to play. Click the browse button to select an appropriate sound file.

Quick Action Tab

You can use this tab to perform a simple action when the object is clicked.

When Object is Clicked

Action to run:

The action to perform when the object is clicked. Choose from:

ACTION | DESCRIPTION
None | Does nothing.
Show Page | Jumps to the specified page in your application. Click here for more information.
Show Dialog | Shows a specific dialog in your application. Click here for more information.
Close Dialog | Closes the currently displayed dialog. Click here for more information.
Run Program | Runs an application with optional command line arguments. Click here for more information.
Open Document | Opens a document in an external viewer. Click here for more information.
Print Document | Prints a document on the user's system. Click here for more information.
Send Email | Sends an email through the user's default email program. Click here for more information.
View Website | Opens a website in the user's default web browser. Click here for more information.
Explore Folder | Explores a folder on the user's system. Click here for more information.
Play Multimedia | Plays a multimedia file in the default player on the user's system. Click here for more information.
Play/Pause Background Music | Toggles the play state of the background music. Click here for more information.
Exit/Close | Exits from the AutoPlay application. Click here for more information.

Properties

Any additional settings corresponding to the selected quick action.

Script Tab

You can use the script editor on this tab to edit the script of actions that will be performed on each of this object's events.

This object supports the following events:

On Click

The actions that will be performed when the user clicks on this object.

On Right-Click

The actions that will be performed when the user right-clicks this object.

On Enter

The actions that will be performed when the mouse moves onto this object ("enters" the object's territory).

On Leave

The actions that will be performed when the mouse moves off of this object ("leaves" the object's territory).


Button Object - Actions

Button Object

Overview Pane Dialog Actions

Button.GetPos

Button.GetProperties

Button.GetSize

Button.GetState

Button.GetText

Button.IsEnabled

Button.IsVisible

Button.SetEnabled

Button.SetPos

Button.SetProperties

Button.SetSize

Button.SetState

Button.SetText

Button.SetVisible


Image Object - Overview

Image Object

Overview Pane Dialog Actions

The image object allows you display an image (such as a photo, logo or illustration) on the page or dialog and optionally have it respond to mouse overs and mouse clicks.

The image object also allows you to set the opacity and use alpha transparency in your image. Adjusting the opacity of the object allows you to achieve a translucent (see-through) effect for the image. The alpha transparency feature allows you to specify a color in the image that you would like to make transparent. Wherever this transparent color appears in the image, the page background (and any objects that are behind the image object) will be allowed to "show through."

The image object is compatible with the following image formats:

.bmp, .jpg, .gif, .pcx, .png, .tga, .tif, .wmf, .apm, .emf, .psd, .pcd.

For best results, you should try to use true-color (24 bit) images. Since they support 16.7 million colors, they look much better then 256 color (8 bit) images. As long as your user's system and graphics card support 24 bit images, AutoPlay Media Studio will display them at their full resolution. Users that are running a 256 color system will see your image reduced to a standard rainbow palette, eliminating any possible palette conflicts.

Tip: There are two ways to add an image object: dragging an image file onto the page or dialog, or choosing Object > Image from the menu.


Image Object - Pane

Image Object

Overview Pane Dialog Actions

Here are the object's settings as they appear in the properties pane:

Object

Name

The name that is used to identify this object.

ImageFile

The image file that you want to display in the image object. Click the browse button to select a file.

Note: The image object has a wide range of supported file types.

UseTransparentColor

True if a specific color in the image should be transparent, false if it should not be.

Note: This is independent of an image's built-in alpha transparency.

TransparentColor

The color that will be transparent in the image. Click the select button to open the Select Transparent Color dialog. The color that you click on will be used to represent transparency in the image.

Tip: Clicking the "More Colors..." button on the color menu allows you to choose either a standard color/custom color, or use the eyedropper to pick a color from somewhere within the AutoPlay application window.

TransparentTolerance

How close the selected transparent color has to be to the color you wish to be transparent. 0 means it must be the exact color while a larger number means a larger range of color difference will be accepted.

Opacity

How opaque the image will be. A value of 100 will make the image completely opaque (fully visible). A value of 0 will make the image completely transparent (invisible). Values in between can be used to make the image translucent (see-through).

HitTest

The area of the image object that will respond to user interaction such as mouse overs or mouse clicks. Choose from:

Standard

The object will respond to user interaction when the mouse enters it's rectangular bounding box.

Alpha

If alpha transparency is used, the object will only respond to user interaction if the mouse enters the visible area of the image.

Attributes

TooltipText

A short string of text that will appear after the mouse hovers over this object for a moment.

Tip: You can choose from several tooltip styles for all tooltips in your project, Standard, Balloon and Extended. This setting can be found on the Appearance tab of the Project > Settings.

Tip: If you want a newline in your tooltip text, use "\r\n". For example, for an Extended tooltip, "My First Line\r\nMy Second Line|My Title". Newlines are not supported in the Title text for Balloon or Extended styles.

Tip: If you want a "&" character in the text, you must enter "&&&".

Enabled

Enable the object so it responds to user interaction. Choose from:

True

The object will respond to mouse overs and clicks and perform any actions assigned to its events.

False

The object will not respond to any mouse overs or clicks and will not perform any actions until it is enabled.

Note: You can use the Image.SetEnabled action to enable this object.

Visible

Set the object's initial visibility. Choose from:

True

The object will be visible when the page or dialog is displayed.

False

The object will be invisible when the page or dialog is displayed.

Note: You can use the Image.SetVisible action to make the object visible or invisible at run time.

Cursor

The mouse pointer that will be used while the mouse is over this object.

Position

Left

The distance in pixels from the left edge of the object to the left edge of the page or dialog.

Tip: You can also change the position of an object by dragging it or using the arrow keys.

Top

The distance in pixels from the top edge of the object to the top edge of the page or dialog.

Width

The width of the object in pixels.

Tip: You can also resize an object by dragging one of the resize handles on its bounding box.

Height

The height of the object in pixels.

Auto-Resize

ResizeLeft

Whether the left side of the object will move when resized. Choose from:

True

The left side of the object will move when the application is resized.

False

Don't move the left side of the object when the application is resized.

ResizeRight

Whether the right side of the object will move when resized. Choose from:

True

The right side of the object will move when the application is resized.

False

Don't move the right side of the object when the application is resized.

ResizeTop

Whether the top of the object will move when resized. Choose from:

True

The top of the object will move when the application is resized.

False

Don't move the top of the object when the application is resized.

ResizeBottom

Whether the bottom of the object will move when resized. Choose from:

True

The bottom of the object will move when the application is resized.

False

Don't move the bottom of the object when the application is resized.

Sounds

HighlightSound

The sound that will be played when the mouse moves over this object. Choose from:

None

Don't play any sound.

Standard

Play the default mouse over sound, as configured on the Sound Effects tab of the Audio Settings dialog.

Custom

Play a custom mouse over sound.

HighlightFile

The custom audio file to play. Click the browse button to select an appropriate sound file.

ClickSound

The sound that will be played when the user clicks on this object. Choose from:

None

Don't play any sound.

Standard

Play the default mouse click sound, as configured on the Sound Effects tab of the Audio Settings dialog.

Custom

Play a custom mouse click sound.

ClickFile

The custom audio file to play. Click the browse button to select an appropriate sound file.

Actions

Quick Action

A quick action to perform when the object is clicked. Click the edit button to select a quick action.

On Click

The actions that will be performed when the user clicks on this object. Click the edit button to open the script editor.

On Right-Click

The actions that will be performed when the user right-clicks on this object. Click the edit button to open the script editor.

On Enter

The actions that will be performed when the mouse moves onto this object ("enters" the object's territory). Click the edit button to open the script editor.

On Leave

The actions that will be performed when the mouse moves off of this object ("leaves" the object's territory). Click the edit button to open the script editor.


Image Object - Dialog

Image Object

Overview Pane Dialog Actions

Here are the object's settings as they appear on the "double-click" Properties dialog.

There are four tabs on the Properties dialog:

Settings

Attributes

Quick Action

Script

Settings Tab

Object

File:

The image file that you want to display in the image object. Click the browse button to select a file.

Note: The image object has a wide range of supported file types.

Transparent Color

Make color transparent

Make a specific color in the image transparent.

Note: This is independent of an image's built-in alpha transparency.

Color:

The color that will be transparent in the image. Click the select button to bring up a color chooser. The color that you click on will be used to represent transparency in the image.

Tip: Clicking the "More Colors..." button on the color menu allows you to choose either a standard color/custom color, or use the eyedropper to pick a color from somewhere within the AutoPlay application window.

Tolerance:

How close the selected transparent color has to be to the color you wish to be transparent. 0 means it must be the exact color while a larger number means a larger range of color difference will be accepted.

Special

Opacity:

How opaque the image will be. A value of 100 will make the image completely opaque (fully visible). A value of 0 will make the image completely transparent (invisible). Values in between can be used to make the image translucent (see-through).

Hit test:

The area of the image object that will respond to user interaction such as mouse overs or mouse clicks. Choose from:

Standard

The object will respond to user interaction when the mouse enters it's rectangular bounding box.

Alpha

If alpha transparency is used, the object will only respond to user interaction if the mouse enters the visible area of the image.

Attributes Tab

Identification

Object name:

The name that is used to identify this object.

State

Enabled

Enable the object so it responds to user interaction. When an object is disabled, it will not respond to any mouse overs or clicks and will not perform any actions until it is enabled.

Note: You can use the Image.SetEnabled action to enable this object.

Visible

Set the object's initial visibility (whether it's visible when the page or dialog is displayed).

Note: You can use the Image.SetVisible action to make the object visible or invisible at run time.

Auto-Resize

Left

If checked, the left side of the object will move when the application is resized. If unchecked, the left side of the object will not move.

Right

If checked, the right side of the object will move when the application is resized. If unchecked, the right side of the object will not move.

Top

If checked, the top of the object will move when the application is resized. If unchecked, the top of the object will not move.

Bottom

If checked, the bottom of the object will move when the application is resized. If unchecked, the bottom of the object will not move.

Position

Left:

The distance in pixels from the left edge of the object to the left edge of the page or dialog.

Tip: You can also change the position of an object by dragging it or using the arrow keys.

Top:

The distance in pixels from the top edge of the object to the top edge of the page or dialog.

Width:

The width of the object in pixels.

Tip: You can also resize an object by dragging one of the resize handles on its bounding box.

Height:

The height of the object in pixels.

Restore Original

Set's the object's size back to the original values.

Feedback

Tooltip:

A short string of text that will appear after the mouse hovers over this object for a moment.

Tip: You can choose from several tooltip styles for all tooltips in your project, Standard, Balloon and Extended. This setting can be found on the Appearance tab of the Project > Settings.

Tip: If you want a newline in your tooltip text, use "\r\n". For example, for an Extended tooltip, "My First Line\r\nMy Second Line|My Title". Newlines are not supported in the Title text for Balloon or Extended styles.

Tip: If you want a "&" character in the text, you must enter "&&&".

Spelling

Check the spelling of the tooltip text.

Cursor:

The mouse pointer that will be used while the mouse is over this object.

Sounds

Highlight:

The sound that will be played when the mouse moves over this object. Choose from:

None

Don't play any sound.

Standard

Play the default mouse over sound, as configured on the Sound Effects tab of the Audio Settings dialog.

Custom

Play a custom mouse over sound.

File:

The custom audio file to play. Click the browse button to select an appropriate sound file.

Click:

The sound that will be played when the user clicks on this object. Choose from:

None

Don't play any sound.

Standard

Play the default mouse click sound, as configured on the Sound Effects tab of the Audio Settings dialog.

Custom

Play a custom mouse click sound.

File:

The custom audio file to play. Click the browse button to select an appropriate sound file.

Quick Action Tab

You can use this tab to perform a simple action when the object is clicked.

When Object is Clicked

Action to run:

The action to perform when the object is clicked. Choose from:

ACTION | DESCRIPTION
None | Does nothing.
Show Page | Jumps to the specified page in your application. Click here for more information.
Show Dialog | Shows a specific dialog in your application. Click here for more information.
Close Dialog | Closes the currently displayed dialog. Click here for more information.
Run Program | Runs an application with optional command line arguments. Click here for more information.
Open Document | Opens a document in an external viewer. Click here for more information.
Print Document | Prints a document on the user's system. Click here for more information.
Send Email | Sends an email through the user's default email program. Click here for more information.
View Website | Opens a website in the user's default web browser. Click here for more information.
Explore Folder | Explores a folder on the user's system. Click here for more information.
Play Multimedia | Plays a multimedia file in the default player on the user's system. Click here for more information.
Play/Pause Background Music | Toggles the play state of the background music. Click here for more information.
Exit/Close | Exits from the AutoPlay application. Click here for more information.

Properties

Any additional settings corresponding to the selected quick action.

Script Tab

You can use the action editor on this tab to edit the script of actions that will be performed on each of this object's events.

This object supports the following events:

On Click

The actions that will be performed when the user clicks on this object.

On Right-Click

The actions that will be performed when the user right-clicks this object.

On Enter

The actions that will be performed when the mouse moves onto this object ("enters" the object's territory).

On Leave

The actions that will be performed when the mouse moves off of this object ("leaves" the object's territory).


Image Object - Actions

Image Object

Overview Pane Dialog Actions

Image.GetFileInfo

Image.GetFilename

Image.GetOpacity

Image.GetPos

Image.GetProperties

Image.GetSize

Image.IsEnabled

Image.IsVisible

Image.Load

Image.SetEnabled

Image.SetOpacity

Image.SetPos

Image.SetProperties

Image.SetSize

Image.SetVisible


Label Object - Overview

Label Object

Overview Pane Dialog Actions

The label object allows you to display static text on the page or dialog. The font, size, color and orientation of the text can all be customized to suit your needs.

With independent Normal, Highlight, and Click colors, label objects can also be used as interactive objects, much like hyperlinks.

Note: Label objects will always maintain their aspect ratio. The Keep Aspect item on the right click context menu will always be enabled.

Tip: You can add a label object by choosing Object > Label from the menu.


Label Object - Pane

Label Object

Overview Pane Dialog Actions

Here are the object's settings as they appear in the properties pane:

Object

Name

The name that is used to identify this object.

Text

The text that you want to display on the label object. You can also click the edit button to open the Edit Text dialog for larger amounts of text.

Font

The font that you want to use for the text. Click the edit button to open the Font dialog where you can edit all of the font settings.

Tip: You can set the default font for this object type by configuring its settings on the Objects tab in Edit > Preferences.

FontFamily

The font family that you want to use.

FontSize

The font size, in points.

FontBold

Make the text bolded.

FontItalic

Make the text appear in italics.

Alignment

The alignment to use. Choose from:

Left

Left-align the text within the object's bounding box, like so:

This text is left-aligned

Center

Center the text within the object's bounding box, like so:

This text is centered

Right

Right-align the text within the object's bounding box, like so:

This text is right-aligned

Orientation

The orientation of the text (in degrees) from the horizontal axis. Choose from:

0

Normal. Display the text horizontally and right-side-up.

90

Orient the text 90 degrees counter-clockwise. The text will be drawn vertically, so you read it from the bottom up.

180

Orient the text 180 degrees counter-clockwise. The text will be drawn horizontally and upside down.

270

Orient the text 270 degrees counter-clockwise. The text will be drawn vertically, so you read it from the top down.

Colors

Normal

The text color used when the mouse is not over the object and the user is not clicking on it.

Tip: You can click the select button to bring up a color chooser. Clicking the "More Colors..." button on the color menu allows you to choose either a standard color/custom color, or use the eyedropper to pick a color from somewhere within the AutoPlay application window.

Highlight

The text color used while the mouse is held over the object.

Click

The text color used while the left mouse button is pressed down on the object.

Disabled

The text color for the disabled state. This color will persist until a Label.SetEnabled action is called. While in the disabled state, the object will not respond to any mouse overs or clicks.

Attributes

TooltipText

A short string of text that will appear after the mouse hovers over this object for a moment.

Tip: You can choose from several tooltip styles for all tooltips in your project, Standard, Balloon and Extended. This setting can be found on the Appearance tab of the Project > Settings.

Tip: If you want a newline in your tooltip text, use "\r\n". For example, for an Extended tooltip, "My First Line\r\nMy Second Line|My Title". Newlines are not supported in the Title text for Balloon or Extended styles.

Tip: If you want a "&" character in the text, you must enter "&&&".

Enabled

Enable the object so it responds to user interaction. Choose from:

True

The object will respond to mouse overs and clicks and perform any actions assigned to its events.

False

The object will not respond to any mouse overs or clicks and will not perform any actions until it is enabled.

Note: You can use the Label.SetEnabled action to enable this object.

Visible

Set the object's initial visibility. Choose from:

True

The object will be visible when the page or dialog is displayed.

False

The object will be invisible when the page or dialog is displayed.

Note: You can use the Label.SetVisible action to make the object visible or invisible at run time.

Cursor

The mouse pointer that will be used while the mouse is over this object.

Position

Left

The distance in pixels from the left edge of the object to the left edge of the page or dialog.

Tip: You can also change the position of an object by dragging it or using the arrow keys.

Top

The distance in pixels from the top edge of the object to the top edge of the page or dialog.

Width

The width of the object in pixels.

Tip: You can also resize an object by dragging one of the resize handles on its bounding box.

Height

The height of the object in pixels.

Auto-Resize

ResizeLeft

Whether the left side of the object will move when resized. Choose from:

True

The left side of the object will move when the application is resized.

False

Don't move the left side of the object when the application is resized.

ResizeRight

Whether the right side of the object will move when resized. Choose from:

True

The right side of the object will move when the application is resized.

False

Don't move the right side of the object when the application is resized.

ResizeTop

Whether the top of the object will move when resized. Choose from:

True

The top of the object will move when the application is resized.

False

Don't move the top of the object when the application is resized.

ResizeBottom

Whether the bottom of the object will move when resized. Choose from:

True

The bottom of the object will move when the application is resized.

False

Don't move the bottom of the object when the application is resized.

Sounds

HighlightSound

The sound that will be played when the mouse moves over this object. Choose from:

None

Don't play any sound.

Standard

Play the default mouse over sound, as configured on the Sound Effects tab of the Audio Settings dialog.

Custom

Play a custom mouse over sound.

HighlightFile

The custom audio file to play. Click the browse button to select an appropriate sound file.

ClickSound

The sound that will be played when the user clicks on this object. Choose from:

None

Don't play any sound.

Standard

Play the default mouse click sound, as configured on the Sound Effects tab of the Audio Settings dialog.

Custom

Play a custom mouse click sound.

ClickFile

The custom audio file to play. Click the browse button to select an appropriate sound file.

Actions

Quick Action

A quick action to perform when the object is clicked. Click the edit button to select a quick action.

On Click

The actions that will be performed when the user clicks on this object. Click the edit button to open the script editor.

On Right-Click

The actions that will be performed when the user right-clicks on this object. Click the edit button to open the script editor.

On Enter

The actions that will be performed when the mouse moves onto this object ("enters" the object's territory). Click the edit button to open the script editor.

On Leave

The actions that will be performed when the mouse moves off of this object ("leaves" the object's territory). Click the edit button to open the script editor.


Label Object - Dialog

Label Object

Overview Pane Dialog Actions

Here are the object's settings as they appear on the "double-click" Properties dialog.

There are four tabs on the Properties dialog:

Settings

Attributes

Quick Action

Script

Settings Tab

Object

Text:

The text that you want to display on the label object.

Font...

The font that you want to use for the text. Click the Select Font button to open the Font dialog where you can edit all of the font settings.

Tip: You can set the default font for this object type by configuring its settings on the Objects tab in Edit > Preferences.

Spelling

Check the spelling of the label text.

Alignment

The alignment to use. Choose from:

Left

Left-align the text within the object's bounding box, like so:

This text is left-aligned

Center

Center the text within the object's bounding box, like so:

This text is centered

Right

Right-align the text within the object's bounding box, like so:

This text is right-aligned

Orientation

The orientation of the text (in degrees) from the horizontal axis. Choose from:

0

Normal. Display the text horizontally and right-side-up.

90

Orient the text 90 degrees counter-clockwise. The text will be drawn vertically, so you read it from the bottom up.

180

Orient the text 180 degrees counter-clockwise. The text will be drawn horizontally and upside down.

270

Orient the text 270 degrees counter-clockwise. The text will be drawn vertically, so you read it from the top down.

State Colors

Normal:

The text color used when the mouse is not over the object and the user is not clicking on it.

Tip: You can click the select button to bring up a color chooser. Clicking the "More Colors..." button on the color menu allows you to choose either a standard color/custom color, or use the eyedropper to pick a color from somewhere within the AutoPlay application window.

Disabled:

The text color for the disabled state. This color will persist until a Label.SetEnabled action is called. While in the disabled state, the object will not respond to any mouse overs or clicks.

Highlight:

The text color used while the mouse is held over the object.

Click:

The text color used while the left mouse button is pressed down on the object.

Match Normal

Sets the Highlight and Click color to be the same as the Normal color.

Attributes Tab

Identification

Object name:

The name that is used to identify this object.

State

Enabled

Enable the object so it responds to user interaction. When an object is disabled, it will not respond to any mouse overs or clicks and will not perform any actions until it is enabled.

Note: You can use the Label.SetEnabled action to enable this object.

Visible

Set the object's initial visibility (whether it's visible when the page or dialog is displayed).

Note: You can use the Label.SetVisible action to make the object visible or invisible at run time.

Auto-Resize

Left

If checked, the left side of the object will move when the application is resized. If unchecked, the left side of the object will not move.

Right

If checked, the right side of the object will move when the application is resized. If unchecked, the right side of the object will not move.

Top

If checked, the top of the object will move when the application is resized. If unchecked, the top of the object will not move.

Bottom

If checked, the bottom of the object will move when the application is resized. If unchecked, the bottom of the object will not move.

Position

Left:

The distance in pixels from the left edge of the object to the left edge of the page or dialog.

Tip: You can also change the position of an object by dragging it or using the arrow keys.

Top:

The distance in pixels from the top edge of the object to the top edge of the page or dialog.

Width:

The width of the object in pixels.

Tip: You can also resize an object by dragging one of the resize handles on its bounding box.

Height:

The height of the object in pixels.

Restore Original

Set's the object's size back to the original values.

Feedback

Tooltip:

A short string of text that will appear after the mouse hovers over this object for a moment.

Tip: You can choose from several tooltip styles for all tooltips in your project, Standard, Balloon and Extended. This setting can be found on the Appearance tab of the Project > Settings.

Tip: If you want a newline in your tooltip text, use "\r\n". For example, for an Extended tooltip, "My First Line\r\nMy Second Line|My Title". Newlines are not supported in the Title text for Balloon or Extended styles.

Tip: If you want a "&" character in the text, you must enter "&&&".

Spelling

Check the spelling of the tooltip text.

Cursor:

The mouse pointer that will be used while the mouse is over this object.

Sounds

Highlight:

The sound that will be played when the mouse moves over this object. Choose from:

None

Don't play any sound.

Standard

Play the default mouse over sound, as configured on the Sound Effects tab of the Audio Settings dialog.

Custom

Play a custom mouse over sound.

File:

The custom audio file to play. Click the browse button to select an appropriate sound file.

Click:

The sound that will be played when the user clicks on this object. Choose from:

None

Don't play any sound.

Standard

Play the default mouse click sound, as configured on the Sound Effects tab of the Audio Settings dialog.

Custom

Play a custom mouse click sound.

File:

The custom audio file to play. Click the browse button to select an appropriate sound file.

Quick Action Tab

You can use this tab to perform a simple action when the object is clicked.

When Object is Clicked

Action to run:

The action to perform when the object is clicked. Choose from:

ACTION | DESCRIPTION
None | Does nothing.
Show Page | Jumps to the specified page in your application. Click here for more information.
Show Dialog | Shows a specific dialog in your application. Click here for more information.
Close Dialog | Closes the currently displayed dialog. Click here for more information.
Run Program | Runs an application with optional command line arguments. Click here for more information.
Open Document | Opens a document in an external viewer. Click here for more information.
Print Document | Prints a document on the user's system. Click here for more information.
Send Email | Sends an email through the user's default email program. Click here for more information.
View Website | Opens a website in the user's default web browser. Click here for more information.
Explore Folder | Explores a folder on the user's system. Click here for more information.
Play Multimedia | Plays a multimedia file in the default player on the user's system. Click here for more information.
Play/Pause Background Music | Toggles the play state of the background music. Click here for more information.
Exit/Close | Exits from the AutoPlay application. Click here for more information.

Properties

Any additional settings corresponding to the selected quick action.

Script Tab

You can use the script editor on this tab to edit the script of actions that will be performed on each of this object's events.

This object supports the following events:

On Click

The actions that will be performed when the user clicks on this object.

On Right-Click

The actions that will be performed when the user right-clicks this object.

On Enter

The actions that will be performed when the mouse moves onto this object ("enters" the object's territory).

On Leave

The actions that will be performed when the mouse moves off of this object ("leaves" the object's territory).


Label Object - Actions

Label Object

Overview Pane Dialog Actions

Label.GetPos

Label.GetProperties

Label.GetSize

Label.GetText

Label.IsEnabled

Label.IsVisible

Label.SetEnabled

Label.SetPos

Label.SetProperties

Label.SetSize

Label.SetText

Label.SetVisible


Paragraph Object - Overview

Paragraph Object

Overview Pane Dialog Actions

The paragraph object allows you display scrollable text on the page or dialog where large amounts of text are needed. Many properties of the object can be customized so that it's integration is seamless. Some of these setting include: transparency, fonts, text colors, background colors, borders, scroll bars and alignment.

The paragraph object can also respond to mouse overs and clicks if you need the group of text as a whole to be interactive.

Tip: You can add a paragraph object by choosing Object > Paragraph from the menu.


Paragraph Object - Pane

Paragraph Object

Overview Pane Dialog Actions

Here are the object's settings as they appear in the properties pane:

Object

Name

The name that is used to identify this object.

Text

The text that you want to display on the paragraph object. Click the edit button to open the Edit Text dialog, where you can import, edit and spell check this object's text.

Font

The font that you want to use for the text. Click the edit button to open the Font dialog where you can edit all of the font settings.

Tip: You can set the default font for this object type by configuring its settings on the Objects tab in Edit > Preferences.

FontFamily

The font family that you want to use.

FontSize

The font size, in points.

FontBold

Make the text bolded.

FontItalic

Make the text appear in italics.

Alignment

The alignment to use. Choose from:

Left

Left-align the text within the object's bounding box, like so:

This text is left-aligned

Center

Center the text within the object's bounding box, like so:

This text is centered

Right

Right-align the text within the object's bounding box, like so:

This text is right-aligned

BackgroundStyle

The background style to use for the object. Choose from:

Solid

Make the background a solid color.

Transparent

Make the background of the object transparent.

BackgroundColor

The solid color to use as your background. You can click the select button to bring up a color chooser.

Tip: Clicking the "More Colors..." button on the color menu allows you to choose either a standard color/custom color, or use the eyedropper to pick a color from somewhere within the AutoPlay application window.

BorderStyle

The type of border to display around the object text. Choose from 'None' or 'Solid'.

BorderColor

The border color. You can click the select button to bring up a color chooser.

Tip: Clicking the "More Colors..." button on the color menu allows you to choose either a standard color/custom color, or use the eyedropper to pick a color from somewhere within the AutoPlay application window.

Scrollbars

ScrollbarStyle

The style of scroll bar to use. Click the select button to choose one of the available scroll bar styles.

Note: You can find the skin files for the scroll bar styles in the Plugins\Scrollbars folder located within your AutoPlay Media Studio program directory.

Vertical

Include a vertical scroll bar for the text. Choose from:

Auto

Include a vertical scroll bar if the amount of text to be displayed exceeds the vertical visible area.

On

Include a vertical scroll bar.

Off

Don't include a vertical scroll bar.

Horizontal

Include a horizontal scroll bar for the text. Choose from:

Auto

Include a horizontal scroll bar if the amount of text to be displayed exceeds the horizontal visible area.

On

Include a horizontal scroll bar.

Off

Don't include a horizontal scroll bar.

Colors

Normal

The text color used when the mouse is not over the object and the user is not clicking on it.

Tip: You can click the select button to bring up a color chooser. Clicking the "More Colors..." button on the color menu allows you to choose either a standard color/custom color, or use the eyedropper to pick a color from somewhere within the AutoPlay application window.

Highlight

The text color used while the mouse is held over the object.

Click

The text color used while the left mouse button is pressed down on the object.

Disabled

The text color for the disabled state. This color will persist until a Paragraph.SetEnabled action is called. While in the disabled state, the object will not respond to any mouse overs or clicks.

Attributes

TooltipText

A short string of text that will appear after the mouse hovers over this object for a moment.

Tip: You can choose from several tooltip styles for all tooltips in your project, Standard, Balloon and Extended. This setting can be found on the Appearance tab of the Project > Settings.

Tip: If you want a newline in your tooltip text, use "\r\n". For example, for an Extended tooltip, "My First Line\r\nMy Second Line|My Title". Newlines are not supported in the Title text for Balloon or Extended styles.

Tip: If you want a "&" character in the text, you must enter "&&&".

Enabled

Enable the object so it responds to user interaction. Choose from:

True

The object will respond to mouse overs and clicks and perform any actions assigned to it's events.

False

The object will not respond to any mouse overs or clicks and will not perform any actions until it is enabled.

Note: You can use the Paragraph.SetEnabled action to enable this object.

Visible

Set the object's initial visibility. Choose from:

True

The object will be visible when the page or dialog is displayed.

False

The object will be invisible when the page or dialog is displayed.

Note: You can use the Paragraph.SetVisible action to make the object visible or invisible at run time.

Cursor

The mouse pointer that will be used while the mouse is over this object.

Position

Left

The distance in pixels from the left edge of the object to the left edge of the page or dialog.

Tip: You can also change the position of an object by dragging it or using the arrow keys.

Top

The distance in pixels from the top edge of the object to the top edge of the page or dialog.

Width

The width of the object in pixels.

Tip: You can also resize an object by dragging one of the resize handles on its bounding box.

Height

The height of the object in pixels.

Auto-Resize

ResizeLeft

Whether the left side of the object will move when resized. Choose from:

True

The left side of the object will move when the application is resized.

False

Don't move the left side of the object when the application is resized.

ResizeRight

Whether the right side of the object will move when resized. Choose from:

True

The right side of the object will move when the application is resized.

False

Don't move the right side of the object when the application is resized.

ResizeTop

Whether the top of the object will move when resized. Choose from:

True

The top of the object will move when the application is resized.

False

Don't move the top of the object when the application is resized.

ResizeBottom

Whether the bottom of the object will move when resized. Choose from:

True

The bottom of the object will move when the application is resized.

False

Don't move the bottom of the object when the application is resized.

Sounds

HighlightSound

The sound that will be played when the mouse moves over this object. Choose from:

None

Don't play any sound.

Standard

Play the default mouse over sound, as configured on the Sound Effects tab of the Audio Settings dialog.

Custom

Play a custom mouse over sound.

HighlightFile

The custom audio file to play. Click the browse button to select an appropriate sound file.

ClickSound

The sound that will be played when the user clicks on this object. Choose from:

None

Don't play any sound.

Standard

Play the default mouse click sound, as configured on the Sound Effects tab of the Audio Settings dialog.

Custom

Play a custom mouse click sound.

ClickFile

The custom audio file to play. Click the browse button to select an appropriate sound file.

Actions

Quick Action

A quick action to perform when the object is clicked. Click the edit button to select a quick action.

On Click

The actions that will be performed when the user clicks on this object. Click the edit button to open the script editor.

On Right-Click

The actions that will be performed when the user right-clicks on this object. Click the edit button to open the script editor.

On Enter

The actions that will be performed when the mouse moves onto this object ("enters" the object's territory). Click the edit button to open the script editor.

On Leave

The actions that will be performed when the mouse moves off of this object ("leaves" the object's territory). Click the edit button to open the script editor.


Paragraph Object - Dialog

Paragraph Object

Overview Pane Dialog Actions

Here are the object's settings as they appear on the "double-click" Properties dialog.

There are three tabs on the Properties dialog:

Settings

Attributes

Quick Action

Script

Settings Tab

Object

Text:

The text that you want to display in the paragraph object.

Font...

The font that you want to use for the text. Click the select font button to open the Font dialog where you can edit all of the font settings.

Tip: You can set the default font for this object type by configuring its settings on the Objects tab in Edit > Preferences.

Spelling

Check the spelling of the object text.

Load...

Opens the Select File dialog where you can select a text file to load.

Alignment

The alignment to use. Choose from:

Left

Left-align the text within the object's bounding box, like so:

This text is left-aligned

Center

Center the text within the object's bounding box, like so:

This text is centered

Right

Right-align the text within the object's bounding box, like so:

This text is right-aligned

Background Style

Solid

The background color for the object. You can click the select button to bring up a color chooser.

Tip: Clicking the "More Colors..." button on the color menu allows you to choose either a standard color/custom color, or use the eyedropper to pick a color from somewhere within the AutoPlay application window.

Transparent

Make the background of the object transparent.

Border Style

Solid

Display a border around the object text. You can click the select button to bring up a color chooser for the border.

Tip: Clicking the "More Colors..." button on the color menu allows you to choose either a standard color/custom color, or use the eyedropper to pick a color from somewhere within the AutoPlay application window.

None

Do not display a border.

Scrollbars

Style:

The style of scroll bar to use. Click the select button to choose one of the available scroll bar styles.

Note: You can find the skin files for the scroll bar styles in the Plugins\Scrollbars folder located within your AutoPlay Media Studio program directory.

Vertical:

Include a vertical scroll bar for the text. Choose from:

Auto

Include a vertical scroll bar if the amount of text to be displayed exceeds the vertical visible area.

On

Include a vertical scroll bar.

Off

Don't include a vertical scroll bar.

Horizontal:

Include a horizontal scroll bar for the text. Choose from:

Auto

Include a horizontal scroll bar if the amount of text to be displayed exceeds the horizontal visible area.

On

Include a horizontal scroll bar.

Off

Don't include a horizontal scroll bar.

State Colors

Normal:

The text color used when the mouse is not over the object and the user is not clicking on it.

Tip: You can click the select button to bring up a color chooser. Clicking the "More Colors..." button on the color menu allows you to choose either a standard color/custom color, or use the eyedropper to pick a color from somewhere within the AutoPlay application window.

Disabled:

The text color for the disabled state. This color will persist until a Paragraph.SetEnabled action is called. While in the disabled state, the object will not respond to any mouse overs or clicks.

Highlight:

The text color used while the mouse is held over the object.

Click:

The text color used while the left mouse button is pressed down on the object.

Match Normal

Sets the Highlight and Click color to be the same as the Normal color.

Attributes Tab

Identification

Object name:

The name that is used to identify this object.

State

Enabled

Enable the object so it responds to user interaction. When an object is disabled, it will not respond to any mouse overs or clicks and will not perform any actions until it is enabled.

Note: You can use the Paragraph.SetEnabled action to enable this object.

Visible

Set the object's initial visibility (whether it's visible when the page or dialog is displayed).

Note: You can use the Paragraph.SetVisible action to make the object visible or invisible at run time.

Auto-Resize

Left

If checked, the left side of the object will move when the application is resized. If unchecked, the left side of the object will not move.

Right

If checked, the right side of the object will move when the application is resized. If unchecked, the right side of the object will not move.

Top

If checked, the top of the object will move when the application is resized. If unchecked, the top of the object will not move.

Bottom

If checked, the bottom of the object will move when the application is resized. If unchecked, the bottom of the object will not move.

Position

Left:

The distance in pixels from the left edge of the object to the left edge of the page or dialog.

Tip: You can also change the position of an object by dragging it or using the arrow keys.

Top:

The distance in pixels from the top edge of the object to the top edge of the page or dialog.

Width:

The width of the object in pixels.

Tip: You can also resize an object by dragging one of the resize handles on its bounding box.

Height:

The height of the object in pixels.

Restore Original

Set's the object's size back to the original values.

Feedback

Tooltip:

A short string of text that will appear after the mouse hovers over this object for a moment.

Tip: You can choose from several tooltip styles for all tooltips in your project, Standard, Balloon and Extended. This setting can be found on the Appearance tab of the Project > Settings.

Tip: If you want a newline in your tooltip text, use "\r\n". For example, for an Extended tooltip, "My First Line\r\nMy Second Line|My Title". Newlines are not supported in the Title text for Balloon or Extended styles.

Tip: If you want a "&" character in the text, you must enter "&&&".

Spelling

Check the spelling of the tooltip text.

Cursor:

The mouse pointer that will be used while the mouse is over this object.

Sounds

Highlight:

The sound that will be played when the mouse moves over this object. Choose from:

None

Don't play any sound.

Standard

Play the default mouse click sound, as configured on the Sound Effects tab of the Audio Settings dialog.

Custom

Play a custom mouse over sound.

File:

The custom audio file to play. Click the browse button to select an appropriate sound file.

Click:

The sound that will be played when the user clicks on this object. Choose from:

None

Don't play any sound.

Standard

Play the default mouse click sound, as configured on the Sound Effects tab of the Audio Settings dialog.

Custom

Play a custom mouse click sound.

File:

The custom audio file to play. Click the browse button to select an appropriate sound file.

Quick Action Tab

You can use this tab to perform a simple action when the object is clicked.

When Object is Clicked

Action to run:

The action to perform when the object is clicked. Choose from:

ACTION | DESCRIPTION
None | Does nothing.
Show Page | Jumps to the specified page in your application. Click here for more information.
Show Dialog | Shows a specific dialog in your application. Click here for more information.
Close Dialog | Closes the currently displayed dialog. Click here for more information.
Run Program | Runs an application with optional command line arguments. Click here for more information.
Open Document | Opens a document in an external viewer. Click here for more information.
Print Document | Prints a document on the user's system. Click here for more information.
Send Email | Sends an email through the user's default email program. Click here for more information.
View Website | Opens a website in the user's default web browser. Click here for more information.
Explore Folder | Explores a folder on the user's system. Click here for more information.
Play Multimedia | Plays a multimedia file in the default player on the user's system. Click here for more information.
Play/Pause Background Music | Toggles the play state of the background music. Click here for more information.
Exit/Close | Exits from the AutoPlay application. Click here for more information.

Properties

Any additional settings corresponding to the selected quick action.

Script Tab

You can use the action editor on this tab to edit the script of actions that will be performed on each of this object's events.

This object supports the following events:

On Click

The actions that will be performed when the user clicks on this object. Click the edit button to open the script editor.

On Right-Click

The actions that will be performed when the user right-clicks this object.

On Enter

The actions that will be performed when the mouse moves onto this object ("enters" the object's territory). Click the edit button to open the script editor.

On Leave

The actions that will be performed when the mouse moves off of this object ("leaves" the object's territory). Click the edit button to open the script editor.


Paragraph Object - Actions

Paragraph Object

Overview Pane Dialog Actions

Paragraph.GetPos

Paragraph.GetProperties

Paragraph.GetScrollPos

Paragraph.GetScrollRange

Paragraph.GetSize

Paragraph.GetText

Paragraph.IsEnabled

Paragraph.IsVisible

Paragraph.SetEnabled

Paragraph.SetPos

Paragraph.SetProperties

Paragraph.SetScrollPos

Paragraph.SetSize

Paragraph.SetText

Paragraph.SetVisible


Video Object - Overview

Video Object

Overview Pane Dialog Actions

The video object allows you display a video file (such as an AVI, MPEG, or WMV) on the page or dialog. This can be very useful when you want to show training videos, product previews or just cool moving graphics as part of your application without having to use another program to display them. The object contains a built-in skinable control panel for controlling the video and an extensive action set if you require the video's playback to be controlled internally.

The video object is compatible with the following video formats:

.asf, .asx, .wax, .wmv, .wvx, .wmp, .wmx, .avi, .mpg, .mpeg, .m1v, .mpa, .mpe, .mpv2

Video Object Requirements

Windows XP
Pentium 120 MHz
32 MB RAM
DirectX 7 or greater
Internet Explorer 4.0 or newer

Note: Requirements may vary according to the needs of your project. For example, a faster system may be required to view large videos at high bitrates, or your project may require a specific version of the Flash player, or the presence of a specific video codec.

Tip: You can add a video object by either dragging a video file onto the page or dialog, or choosing Object > Video from the menu.


Video Object - Pane

Video Object

Overview Pane Dialog Actions

Here are the object's settings as they appear in the properties pane:

Object

Name

The name that is used to identify this object.

VideoFile

The video file that you want to display in the video object. Click the browse button to select a file.

Note: The video object has a wide range of supported file types.

StageColor

The background color of the object. This is the color that will appear around the video if the object is larger than the video itself.

Tip: You can click the select button to bring up a color chooser. Clicking the "More Colors..." button on the color menu allows you to choose either a standard color/custom color, or use the eyedropper to pick a color from somewhere within the AutoPlay application window.

VideoScalingMode

The scale that will be used for the video. Choose from:

Stretch

Resize the video to fill the area defined by the object's bounding box.

Note: This setting ignores the movie's original aspect ratio. The movie may appear distorted as a result.

Maintain Aspect

Maintain the original aspect ratio for the file. The aspect ratio of a video is it's width to height ratio. For example 4:3 or 16:9. This option enables you to ensure the video is viewed at it's intended dimensions.

Control Panel

ControlStyle

Display a control panel for video playback. Click the select button to choose the panel style you want to use.

Note: You can find the skin files for the panel styles in the Plugins\Transports folder located within your AutoPlay Media Studio program directory.

Tip: If you do not want to display a control panel, you can choose None as the panel style.

Time

The type of time display to include on the control panel. Choose from:

None

Do not show any time display on the control panel.

Elapsed

The time that has elapsed during the video's playback.

Length

The total length of the video.

Both

Both the time that has elapsed and the total length of the video.

PanelColor

The color to use for the control panel.

TextColor

The color used for the text that appears on the control panel, such as the "Elapsed" or "Length" of time.

ControlButtons

Display play/pause and stop buttons on the control panel.

Slider

Include a position slider on the control panel.

Special

AutoStart

Start playing the video automatically (as soon as the page or dialog is opened).

Note: If this is set to False, the video will not play until you start it with a Video.Play action.

Loop

Automatically begin playing from the beginning again whenever the video reaches the end.

Border

Include a border around the object.

ObjectMask

ApplyWindowMask

Apply a window mask to this object. Choose from:

True

The specified window mask image file will be applied to this object.

False

No window mask image file will be applied to this object.

FitToObject

Dynamically resize the window mask image file to the same dimensions as this object. Choose from:

True

The specified window mask image file will be resized to the same dimensions as this object.

False

The specified window mask image file will maintain its original dimensions.

MaskFile

The window mask image file to apply to this object. Click the browse button to choose an image file.

Attributes

Enabled

Enable the object so it responds to user interaction. Choose from:

True

The object will respond to mouse overs and clicks and perform any actions assigned to its events.

False

The object will not respond to any mouse overs or clicks and will not perform any actions until it is enabled.

Note: You can use the Video.SetEnabled action to enable this object.

Visible

Set the object's initial visibility. Choose from:

True

The object will be visible when the page or dialog is displayed.

False

The object will be invisible when the page or dialog is displayed.

Note: You can use the Video.SetVisible action to make the object visible or invisible at run time.

Note: This option simply controls the initial visibility of the object and does not affect its play state. For example, if the object is set to start automatically, it will begin to play when the page opens whether it is visible or not.

Cursor

The mouse pointer that will be used while the mouse is over this object.

Position

Left

The distance in pixels from the left edge of the object to the left edge of the page or dialog.

Tip: You can also change the position of an object by dragging it or using the arrow keys.

Top

The distance in pixels from the top edge of the object to the top edge of the page or dialog.

Width

The width of the object in pixels.

Tip: You can also resize an object by dragging one of the resize handles on its bounding box.

Height

The height of the object in pixels.

Auto-Resize

ResizeLeft

Whether the left side of the object will move when resized. Choose from:

True

The left side of the object will move when the application is resized.

False

Don't move the left side of the object when the application is resized.

ResizeRight

Whether the right side of the object will move when resized. Choose from:

True

The right side of the object will move when the application is resized.

False

Don't move the right side of the object when the application is resized.

ResizeTop

Whether the top of the object will move when resized. Choose from:

True

The top of the object will move when the application is resized.

False

Don't move the top of the object when the application is resized.

ResizeBottom

Whether the bottom of the object will move when resized. Choose from:

True

The bottom of the object will move when the application is resized.

False

Don't move the bottom of the object when the application is resized.

Sounds

HighlightSound

The sound that will be played when the mouse moves over this object. Choose from:

None

Don't play any sound.

Standard

Play the default mouse over sound, as configured on the Sound Effects tab of the Audio Settings dialog.

Custom

Play a custom mouse over sound.

HighlightFile

The custom audio file to play. Click the browse button to select an appropriate sound file.

ClickSound

The sound that will be played when the user clicks on this object. Choose from:

None

Don't play any sound.

Standard

Play the default mouse click sound, as configured on the Sound Effects tab of the Audio Settings dialog.

Custom

Play a custom mouse click sound.

ClickFile

The custom audio file to play. Click the browse button to select an appropriate sound file.

Actions

Quick Action

A quick action to perform when the object is clicked. Click the edit button to select a quick action.

On Click

The actions that will be performed when the user clicks on this object. Click the edit button to open the script editor.

On Enter

The actions that will be performed when the mouse moves onto this object ("enters" the object's territory). Click the edit button to open the script editor.

On Leave

The actions that will be performed when the mouse moves off of this object ("leaves" the object's territory). Click the edit button to open the script editor.

On Play

The actions that will be performed whenever the video starts to play. Click the edit button to open the script editor.

On Pause

The actions that will be performed whenever the video is paused. Click the edit button to open the script editor.

On Stop

The actions that will be performed whenever the video is stopped. Click the edit button to open the script editor.

On Finish

The actions that will be performed whenever the video reaches the end. Click the edit button to open the script editor.


Video Object - Dialog

Video Object

Overview Pane Dialog Actions

Here are the object's settings as they appear on the "double-click" Properties dialog.

There are four tabs on the Properties dialog:

Settings

Attributes

Quick Action

Script

Settings Tab

Object

File:

The video file that you want to display in the video object. Click the browse button to select a file.

Note: The video object has a wide range of supported file types.

Stage:

The background color of the object. This is the color that will appear around the video if the object is larger than the video itself. You can click the select button to bring up a color chooser.

Tip: Clicking the "More Colors..." button on the color menu allows you to choose either a standard color/custom color, or use the eyedropper to pick a color from somewhere within the AutoPlay application window.

Scaling mode:

The scale that will be used for the video. Choose from:

Stretch

Resize the video to fill the area defined by the object's bounding box.

Note: This setting ignores the movie's original aspect ratio. The movie may appear distorted as a result.

Maintain Aspect

Maintain the original aspect ratio for the file. The aspect ratio of a video is it's width to height ratio. For example 4:3 or 16:9. This option enables you to ensure the video is viewed at it's intended dimensions.

Control Panel

Style:

Display a control panel for video playback. Click the select button to choose the panel style you want to use.

Note: You can find the skin files for the panel styles in the Plugins\Transports folder located within your AutoPlay Media Studio program directory.

Tip: If you do not want to display a control panel, you can choose None as the panel style.

Time:

The type of time display to include on the control panel. Choose from:

None

Do not show any time display on the control panel.

Elapsed

The time that has elapsed during the video's playback.

Length

The total length of the video.

Both

Both the time that has elapsed and the total length of the video.

Panel:

The color used for the control panel. You can click the select button to bring up a color chooser.

Tip: Clicking the "More Colors..." button on the color menu allows you to choose either a standard color/custom color, or use the eyedropper to pick a color from somewhere within the AutoPlay application window.

Text:

The color used for the text that appears on the control panel, such as the "Elapsed" or "Length" of time. You can click the select button to bring up a color chooser.

Control buttons

Display play/pause and stop buttons on the control panel.

Slider

Include a position slider on the control panel.

Play

Auto start

Start playing the video automatically (as soon as the page or dialog is opened).

Note: If this option is unchecked, the video will not play until you start it with a Video.Play action.

Loop

Automatically begin playing from the beginning again whenever the video reaches the end.

Appearance

Border

Include a border around the object.

Apply custom window mask:

Makes certain parts of the video object transparent. You can use this option to make a custom shaped video object play in your application.

To specify the areas that you want to make transparent, you need to create a transparency mask file in your favorite drawing program.

A transparency mask file is just an image where a single color represents the parts that you want to make transparent. Picture this image as being invisibly "placed over" your video object, like a mask or a stencil.

In AutoPlay, the transparent parts of the mask should all be solid black. Wherever solid black appears in the mask image, the corresponding part of the video object will be made transparent. The transparency mask acts like a "cookie cutter," cutting holes in the video object so whatever is behind it in the project can show through.

Click the browse button to select an image file.

Fit to object

Take your transparency mask image and resize it to fit the video object. The original image dimensions will be used to mask the video object if this option is not selected.

Attributes Tab

Identification

Object name:

The name that is used to identify this object.

State

Enabled

Enable the object so it responds to user interaction. When an object is disabled, it will not respond to any mouse overs or clicks and will not perform any actions until it is enabled.

Note: You can use the Video.SetEnabled action to enable this object.

Visible

Set the object's initial visibility (whether it's visible when the page or dialog is displayed). You can use the Video.SetVisible action to make the object visible or invisible at run time.

Note: This option simply controls the initial visibility of the object and does not affect its play state. For example, if the object is set to start automatically, it will begin to play when the page or dialog opens whether it is visible or not.

Auto-Resize

Left

If checked, the left side of the object will move when the application is resized. If unchecked, the left side of the object will not move.

Right

If checked, the right side of the object will move when the application is resized. If unchecked, the right side of the object will not move.

Top

If checked, the top of the object will move when the application is resized. If unchecked, the top of the object will not move.

Bottom

If checked, the bottom of the object will move when the application is resized. If unchecked, the bottom of the object will not move.

Position

Left:

The distance in pixels from the left edge of the object to the left edge of the page or dialog.

Tip: You can also change the position of an object by dragging it or using the arrow keys.

Top:

The distance in pixels from the top edge of the object to the top edge of the page or dialog.

Width:

The width of the object in pixels.

Tip: You can also resize an object by dragging one of the resize handles on its bounding box.

Height:

The height of the object in pixels.

Restore Original

Set's the object's size back to the original values.

Feedback

Tooltip:

This feature is not available for the Video object.

Spelling

Check the spelling of the tooltip text.

Cursor:

The mouse pointer that will be used while the mouse is over this object.

Sounds

Highlight:

The sound that will be played when the mouse moves over this object. Choose from:

None

Don't play any sound.

Standard

Play the default mouse over sound, as configured on the Sound Effects tab of the Audio Settings dialog.

Custom

Play a custom mouse over sound.

File:

The custom audio file to play. Click the browse button to select an appropriate sound file.

Click:

The sound that will be played when the user clicks on this object. Choose from:

None

Don't play any sound.

Standard

Play the default mouse click sound, as configured on the Sound Effects tab of the Audio Settings dialog.

Custom

Play a custom mouse click sound.

File:

The custom audio file to play. Click the browse button to select an appropriate sound file.

Quick Action Tab

You can use this tab to perform a simple action when the object is clicked.

When Object is Clicked

Action to run:

The action to perform when the object is clicked. Choose from:

ACTION | DESCRIPTION
None | Does nothing.
Show Page | Jumps to the specified page in your application. Click here for more information.
Show Dialog | Shows a specific dialog in your application. Click here for more information.
Close Dialog | Closes the currently displayed dialog. Click here for more information.
Run Program | Runs an application with optional command line arguments. Click here for more information.
Open Document | Opens a document in an external viewer. Click here for more information.
Print Document | Prints a document on the user's system. Click here for more information.
Send Email | Sends an email through the user's default email program. Click here for more information.
View Website | Opens a website in the user's default web browser. Click here for more information.
Explore Folder | Explores a folder on the user's system. Click here for more information.
Play Multimedia | Plays a multimedia file in the default player on the user's system. Click here for more information.
Play/Pause Background Music | Toggles the play state of the background music. Click here for more information.
Exit/Close | Exits from the AutoPlay application. Click here for more information.

Properties

Any additional settings corresponding to the selected quick action.

Script Tab

You can use the script editor on this tab to edit the script of actions that will be performed on each of this object's events.

This object supports the following events:

On Click

The actions that will be performed when the user clicks on this object.

On Enter

The actions that will be performed when the mouse moves onto this object ("enters" the object's territory).

On Leave

The actions that will be performed when the mouse moves off of this object ("leaves" the object's territory).

On Play

The actions that will be performed whenever the video starts to play.

On Pause

The actions that will be performed whenever the video is paused.

On Stop

The actions that will be performed whenever the video is stopped.

On Finish

The actions that will be performed whenever the video reaches the end.


Video Object - Actions

Video Object

Overview Pane Dialog Actions

Video.GetCurrentPos

Video.GetFilename

Video.GetLength

Video.GetPos

Video.GetProperties

Video.GetSize

Video.GetState

Video.GetVolume

Video.IsEnabled

Video.IsFullScreen

Video.IsVisible

Video.Load

Video.Pause

Video.Play

Video.Seek

Video.SetEnabled

Video.SetFullScreen

Video.SetPos

Video.SetProperties

Video.SetSize

Video.SetVisible

Video.SetVolume

Video.Stop


QuickTime Object - Overview

QuickTime Object

Overview Pane Dialog Actions

The QuickTime object lets you play audio, video or show images on the page or dialog. It does this by taking advantage of the QuickTime ActiveX control that is found on most systems.

Specifically, it embeds the QuickTime control directly into your AutoPlay application. This essentially "borrows" the QuickTime player's rendering engine and uses it to display media files in your AutoPlay application. The QuickTime object supports a wide variety of media formats.

The QuickTime object is compatible with any version of the QuickTime ActiveX control. However, some files may only display in certain versions of the control. Therefore you may want to take steps to ensure that your users will have the appropriate version of the control installed on their systems.

Note: You will need to configure this detection by going to Project > Dependencies. There you will be able to select the QuickTime ActiveX control and customize its detection properties.


QuickTime Object - Pane

QuickTime Object

Overview Pane Dialog Actions

Here are the object's settings as they appear in the properties pane:

Object

Name

The name that is used to identify this object.

MovieFile

The media file that you want to display in the QuickTime object. Click the browse button to select a file.

Note: The QuickTime object has a wide range of supported file types.

SizingMode

The way that media files will be displayed within the QuickTime control. Choose from:

Movie Fits Control

Resize the media to fill the area defined by the object's bounding box.

Note: This setting ignores the media's original aspect ratio. The media may appear distorted as a result.

Centered In Control

Center the media file at full size within the object's bounding box.

Maintain Aspect Ratio

Fit the media file within the object's bounding box while maintaining the original aspect ratio for the file. The aspect ratio of media file is its width to height ratio. For example 4:3 or 16:9. This option enables you to ensure the media is viewed at its intended dimensions.

BorderStyle

The type of border that the QuickTime object will have. Choose from:

Note: The border styles may not draw properly on 64-bit versions of the Windows operating system.

None

No border will be displayed.

Plain

A solid black line will be used for the object's border.

3D

The standard 3D/sunken border will surround the QuickTime object.

Note: On 64-bit versions of Windows this style may not display properly.

Loop

Automatically begin playing from the beginning whenever the end of the media file is reached. Choose from:

True

Automatically begin playing from the beginning when the end of the media file is reached.

False

Don't restart the media file when the end is reached.

AutoStart

Start playing the media file automatically (as soon as the page or dialog is opened). Choose from:

True

Start playing the media file automatically.

False

Don't start the media file automatically.

Note: If this option is False, the media will not play until you start it with a QuickTime.Play action.

Attributes

Enabled

Enable the object so it responds to user interaction. Choose from:

True

The object will respond to mouse overs and clicks and perform any actions assigned to its events.

False

The object will not respond to any mouse overs or clicks and will not perform any actions until it is enabled.

Note: You can use the QuickTime.SetEnabled action to enable this object.

Visible

Set the object's initial visibility. Choose from:

True

The object will be visible when the page or dialog is displayed.

False

The object will be invisible when the page or dialog is displayed.

Note: You can use the QuickTime.SetVisible action to make the object visible or invisible at run time.

Note: This option simply controls the initial visibility of the object and does not affect its play state. For example, if the object is set to start automatically, it will begin to play when the page opens whether it is visible or not.

Position

Left

The distance in pixels from the left edge of the object to the left edge of the page or dialog.

Tip: You can also change the position of an object by dragging it or using the arrow keys.

Top

The distance in pixels from the top edge of the object to the top edge of the page or dialog.

Width

The width of the object in pixels.

Tip: You can also resize an object by dragging one of the resize handles on its bounding box.

Height

The height of the object in pixels.

Auto-Resize

ResizeLeft

Whether the left side of the object will move when resized. Choose from:

True

The left side of the object will move when the application is resized.

False

Don't move the left side of the object when the application is resized.

ResizeRight

Whether the right side of the object will move when resized. Choose from:

True

The right side of the object will move when the application is resized.

False

Don't move the right side of the object when the application is resized.

ResizeTop

Whether the top of the object will move when resized. Choose from:

True

The top of the object will move when the application is resized.

False

Don't move the top of the object when the application is resized.

ResizeBottom

Whether the bottom of the object will move when resized. Choose from:

True

The bottom of the object will move when the application is resized.

False

Don't move the bottom of the object when the application is resized.

Sounds

HighlightSound

The sound that will be played when the mouse moves over this object. Choose from:

None

Don't play any sound.

Standard

Play the default mouse over sound, as configured on the Sound Effects tab of the Audio Settings dialog.

Custom

Play a custom mouse over sound.

HighlightFile

The custom audio file to play. Click the browse button to select an appropriate sound file.

ClickSound

The sound that will be played when the user clicks on this object. Choose from:

None

Don't play any sound.

Standard

Play the default mouse click sound, as configured on the Sound Effects tab of the Audio Settings dialog.

Custom

Play a custom mouse click sound.

ClickFile

The custom audio file to play. Click the browse button to select an appropriate sound file.

Actions

On Mouse Button Down

The actions that will be performed when the cursor is over the QuickTime object and a mouse button is pressed down. Click the edit button to open the script editor.

On Mouse Button Up

The actions that will be performed when the cursor is over the QuickTime object and a mouse button is released. Click the edit button to open the script editor.

On Mouse Move

The actions that will be performed when the mouse cursor moves over the QuickTime object. Click the edit button to open the script editor.

On Rate Change

The actions that will be performed when the play rate of the media file within the QuickTime object has changed. Click the edit button to open the script editor.

On Movie End

The actions that will be performed when the media file has finished playing. Click the edit button to open the script editor.

On Error

The actions that will be performed when an error occurs in the QuickTime object. Click the edit button to open the script editor.


QuickTime Object - Dialog

QuickTime Object

Overview Pane Dialog Actions

Here are the object's settings as they appear on the "double-click" Properties dialog.

There are four tabs on the Properties dialog:

Settings

Attributes

Script

Settings Tab

File

The media file that you want to display in the QuickTime object. Click the Browse button to select a file.

Note: The QuickTime object has a wide range of supported file types.

Options

Sizing mode:

The way that media files will be displayed within the QuickTime control. Choose from:

Centered In Control

Center the media file at full size within the object's bounding box.

Maintain Aspect Ratio

Fit the media file within the object's bounding box while maintaining the original aspect ratio for the file. The aspect ratio of media file is its width to height ratio. For example 4:3 or 16:9. This option enables you to ensure the media is viewed at its intended dimensions.

Movie Fits Control

Resize the media to fill the area defined by the object's bounding box.

Note: This setting ignores the media's original aspect ratio. The media may appear distorted as a result.

Border style:

The type of border that the QuickTime object will have. Choose from:

Note: The border styles may not draw properly on 64-bit versions of the Windows operating system.

3D

The standard 3D/sunken border will surround the QuickTime object.

Note: On 64-bit versions of Windows this style may not display properly.

None

No border will be displayed.

Plain

A solid black line will be used for the object's border.

Auto start

Start playing the media file automatically (as soon as the page or dialog is opened).

Note: If this option is unchecked, the media will not play until you start it with a QuickTime.Play action.

Loop

Automatically begin playing from the beginning whenever the end of the media file is reached.

Attributes Tab

Identification

Object name:

The name that is used to identify this object.

State

Enabled

Enable the object so it responds to user interaction. When an object is disabled, it will not respond to any mouse overs or clicks and will not perform any actions until it is enabled.

Note: You can use the QuickTime.SetEnabled action to enable this object.

Visible

Set the object's initial visibility (whether it's visible when the page or dialog is displayed). You can use the QuickTime.SetVisible action to make the object visible or invisible at run time.

Note: This option simply controls the initial visibility of the object and does not affect its play state. For example, if the object is set to start automatically, it will begin to play when the page or dialog opens whether it is visible or not.

Auto-Resize

Left

If checked, the left side of the object will move when the application is resized. If unchecked, the left side of the object will not move.

Right

If checked, the right side of the object will move when the application is resized. If unchecked, the right side of the object will not move.

Top

If checked, the top of the object will move when the application is resized. If unchecked, the top of the object will not move.

Bottom

If checked, the bottom of the object will move when the application is resized. If unchecked, the bottom of the object will not move.

Position

Left:

The distance in pixels from the left edge of the object to the left edge of the page or dialog.

Tip: You can also change the position of an object by dragging it or using the arrow keys.

Top:

The distance in pixels from the top edge of the object to the top edge of the page or dialog.

Width:

The width of the object in pixels.

Tip: You can also resize an object by dragging one of the resize handles on its bounding box.

Height:

The height of the object in pixels.

Sounds

Highlight:

The sound that will be played when the mouse moves over this object. Choose from:

None

Don't play any sound.

Standard

Play the default mouse over sound, as configured on the Sound Effects tab of the Audio Settings dialog.

Custom

Play a custom mouse over sound.

File:

The custom audio file to play. Click the browse button to select an appropriate sound file.

Click:

The sound that will be played when the user clicks on this object. Choose from:

None

Don't play any sound.

Standard

Play the default mouse click sound, as configured on the Sound Effects tab of the Audio Settings dialog.

Custom

Play a custom mouse click sound.

File:

The custom audio file to play. Click the browse button to select an appropriate sound file.

Script Tab

You can use the script editor on this tab to edit the script of actions that will be performed on each of this object's events.

This object supports the following events:

On Mouse Button Down

The actions that will be performed when the cursor is over the QuickTime object and a mouse button is pressed down.

The following event variables are automatically set whenever this event is triggered:

e_Button

(number) The index of the button that was pressed:

CONSTANT | VALUE | DESCRIPTION
BUTTON_LEFT | 1 | Left mouse button.
BUTTON_RIGHT | 2 | Right mouse button.
BUTTON_MIDDLE | 3 | Middle mouse button.

e_Modifiers

(table) A table containing three boolean values that describe which modifier keys were held down while the mouse button was pressed. A modifier key is a key that can be held down while button is pressed, to "modify" it.

There are three true/false values in the table, one for each type of modifier key on the keyboard: shift, ctrl, and alt. You can access these values as e_Modifiers.shift, e_Modifiers.ctrl, and e_Modifiers.alt.

e_XObject

(number) The horizontal position of the mouse cursor when the mouse button was pressed, relative to the top left of the object.

e_YObject

(number) The vertical position of the mouse cursor when the mouse button was pressed, relative to the top left of the object.

e_X

(number) The horizontal position of the mouse cursor when the mouse button was pressed, relative to the top left of the page.

e_Y

(number) The vertical position of the mouse cursor when the mouse button was pressed, relative to the top left of the page.

On Mouse Button Up

The actions that will be performed when the cursor is over the QuickTime object and a mouse button is released.

The following event variables are automatically set whenever this event is triggered:

e_Button

(number) The index of the button that was pressed:

CONSTANT | VALUE | DESCRIPTION
BUTTON_LEFT | 1 | Left mouse button.
BUTTON_RIGHT | 2 | Right mouse button.
BUTTON_MIDDLE | 3 | Middle mouse button.

e_Modifiers

(table) A table containing three boolean values that describe which modifier keys were held down while the mouse button was pressed. A modifier key is a key that can be held down while button is pressed, to "modify" it.

There are three true/false values in the table, one for each type of modifier key on the keyboard: shift, ctrl, and alt. You can access these values as e_Modifiers.shift, e_Modifiers.ctrl, and e_Modifiers.alt.

e_XObject

(number) The horizontal position of the mouse cursor when the mouse button was pressed, relative to the top left of the object.

e_YObject

(number) The vertical position of the mouse cursor when the mouse button was pressed, relative to the top left of the object.

e_X

(number) The horizontal position of the mouse cursor when the mouse button was pressed, relative to the top left of the page.

e_Y

(number) The vertical position of the mouse cursor when the mouse button was pressed, relative to the top left of the page.

On Mouse Move

The actions that will be performed when the mouse cursor moves over the QuickTime object.

The following event variables are automatically set whenever this event is triggered:

e_Button

(number) The index of the button that was pressed:

CONSTANT | VALUE | DESCRIPTION
BUTTON_LEFT | 1 | Left mouse button.
BUTTON_RIGHT | 2 | Right mouse button.
BUTTON_MIDDLE | 3 | Middle mouse button.

e_Modifiers

(table) A table containing three boolean values that describe which modifier keys were held down while the mouse button was pressed. A modifier key is a key that can be held down while button is pressed, to "modify" it.

There are three true/false values in the table, one for each type of modifier key on the keyboard: shift, ctrl, and alt. You can access these values as e_Modifiers.shift, e_Modifiers.ctrl, and e_Modifiers.alt.

e_XObject

(number) The horizontal position of the mouse cursor when the mouse button was pressed, relative to the top left of the object.

e_YObject

(number) The vertical position of the mouse cursor when the mouse button was pressed, relative to the top left of the object.

e_X

(number) The horizontal position of the mouse cursor when the mouse button was pressed, relative to the top left of the page.

e_Y

(number) The vertical position of the mouse cursor when the mouse button was pressed, relative to the top left of the page.

On Rate Change

The actions that will be performed when the play rate of the media file within the QuickTime object has changed.

The following event variables are automatically set whenever this event is triggered:

e_Rate

(number) The new rate of the media file.

On Movie End

The actions that will be performed when the media file has finished playing.

On Error

The actions that will be performed when an error occurs in the QuickTime object.

The following event variables are automatically set whenever this event is triggered:

e_ErrorCode

(number) The numeric code of the error that has occurred.

e_ErrorOrigin

(number) Where the error originated from:

CONSTANT | VALUE | DESCRIPTION
qtErrorEventOriginControl | 0 | An error occurred in the QTControl area of the QuickTime ActiveX control.
qtErrorEventOriginMovie | 1 | An error occurred in the QTMovie area of the QuickTime ActiveX control.
qtErrorEventOriginQuickTime | 2 | An error occurred in the QTQuickTime area of the QuickTime ActiveX control.


QuickTime Object - Actions

QuickTime Object

Overview Pane Dialog Actions

QuickTime.GetCurrentPos

QuickTime.GetFile

QuickTime.GetFullScreen

QuickTime.GetLength

QuickTime.GetMute

QuickTime.GetPos

QuickTime.GetProperties

QuickTime.GetSize

QuickTime.GetVolume

QuickTime.IsEnabled

QuickTime.IsVisible

QuickTime.LoadFile

QuickTime.Pause

QuickTime.Play

QuickTime.Seek

QuickTime.SetEnabled

QuickTime.SetFullScreen

QuickTime.SetMute

QuickTime.SetPos

QuickTime.SetProperties

QuickTime.SetSize

QuickTime.SetVisible

QuickTime.SetVolume


Flash Object - Overview

Flash Object

Overview Pane Dialog Actions

The Flash object lets you display a Flash (.swf) movie on the page or dialog. It does this by taking advantage of the Adobe Flash Player ActiveX control that is found on most systems.

Specifically, it embeds the Flash Player control directly into your AutoPlay application. This essentially "borrows" the Flash Player's rendering engine—which is the part of the player that deals with showing Flash movies on your computer screen—and uses it to display Flash files in your AutoPlay application. The Flash object is kind of like a Flash Player-shaped receptacle, that the Flash Player ActiveX control can "plug into" at run time. The end result is that it looks like the Flash file is built right into your AutoPlay application.

Tip: An easy way to add a Flash object is to drag and drop a Flash file (.swf) onto the page or dialog surface.

The Flash object is compatible with any version of the Adobe Flash Player control. However, some Flash movies will only display in certain versions of the control. Therefore you may want to take steps to ensure that your users will have the appropriate version of the control installed on their systems.

Note: You will need to configure this detection by going to Project > Dependencies. There you will be able to select the Flash ActiveX control and customize it's detection properties.

Note: The Flash object's On FlashCall event is only supported in Flash version 8.0 or later.


Flash Object - Pane

Flash Object

Overview Pane Dialog Actions

Here are the object's settings as they appear in the properties pane:

Object

Name

The name that is used to identify this object.

FlashFile

The Flash file (.swf) that you want to display in the Flash object. Click the browse button to select a file.

Alignment

The alignment of the Flash movie within the object's bounding box.

Context Menu

Control which context menu will display when you right-click on the Flash movie at run time. Choose from:

Standard

The standard right-click context menu will be shown.

Full

The full right-click context menu will be shown.

Quality

The rendering quality to use when displaying the Flash file, including the level of anti-aliasing performed. Choose from:

Low

Gives priority to playback speed over appearance. Anti-aliasing is turned off.

High

Gives priority to appearance over playback speed. Anti-aliasing is turned on.

Auto Low

Emphasizes speed at first, but improves appearance whenever possible. Playback begins with anti-aliasing turned off; if the Player determines that the system can handle it, it turns anti-aliasing on.

Auto High

Emphasizes speed and appearance equally at first, but sacrifices appearance for the sake of speed if necessary. Playback begins with anti-aliasing turned on, but it will be turned off if the frame rate drops below an acceptable level.

FlashScalingMode

How the Flash movie will be made to fit within the bounding box. Choose from:

Show All

Makes the entire movie visible in the area defined by the object's bounding box without distortion, while maintaining the original aspect ratio of the movie. Borders may appear on two sides of the movie.

No Border

Scales the movie to fill the area defined by the object's bounding box without distortion, while maintaining the original aspect ratio of the movie. Any part of the movie that falls outside the area defined by the object's bounding box will be cropped.

Exact Fit

Resizes the movie to fill the area defined by the object's bounding box, ignoring the movie's original aspect ratio. The movie may appear distorted as a result.

OverrideBackground

Override the background color of the Flash file (.swf). This allows you to replace the background color in your Flash file with something more appropriate.

BackgroundColor

The background color for the object. Click the select button to bring up a color chooser.

Note: This setting is only available when Override Background is set to True.

Tip: Clicking the "More Colors..." button on the color menu allows you to choose either a standard color/custom color, or use the eyedropper to pick a color from somewhere within the AutoPlay application window.

DeviceFont

Set the "Device Font Attribute" for the Flash control. When this option is enabled (set to True), and appropriate fonts are installed on the user's system, the control will substitute installed system fonts for any fonts used in the Flash movie. Any text whose fonts are substituted will appear aliased (rough) regardless of the Quality setting. If the necessary fonts are not installed, the text will be rendered in the normal anti-aliased (smooth) way.

Special

AutoStart

Start playing the Flash movie automatically (as soon as the page or dialog is opened).

Note: If this is set to False, the movie will not play until you start it with a Flash.Play action.

Loop

Automatically begin playing from the beginning again whenever the Flash movie reaches the end.

Attributes

TooltipText

A short string of text that will appear after the mouse hovers over this object for a moment.

Tip: You can choose from several tooltip styles for all tooltips in your project, Standard, Balloon and Extended. This setting can be found on the Appearance tab of the Project > Settings.

Tip: If you want a newline in your tooltip text, use "\r\n". For example, for an Extended tooltip, "My First Line\r\nMy Second Line|My Title". Newlines are not supported in the Title text for Balloon or Extended styles.

Tip: If you want a "&" character in the text, you must enter "&&&".

Enabled

Enable the object so it responds to user interaction. Choose from:

True

The object will respond to mouse overs and clicks and perform any actions assigned to its events.

False

The object will not respond to any mouse overs or clicks and will not perform any actions until it is enabled.

Note: You can use the Flash.SetEnabled action to enable this object.

Visible

Set the object's initial visibility. Choose from:

True

The object will be visible when the page or dialog is displayed.

False

The object will be invisible when the page or dialog is displayed.

Note: You can use the Flash.SetVisible action to make the object visible or invisible at run time.

Note: This option simply controls the initial visibility of the object and does not affect its play state. For example, if the object is set to start automatically, it will begin to play when the page or dialog opens whether it is visible or not.

Position

Left

The distance in pixels from the left edge of the object to the left edge of the page or dialog.

Tip: You can also change the position of an object by dragging it or using the arrow keys.

Top

The distance in pixels from the top edge of the object to the top edge of the page or dialog.

Width

The width of the object in pixels.

Tip: You can also resize an object by dragging one of the resize handles on its bounding box.

Height

The height of the object in pixels.

Auto-Resize

ResizeLeft

Whether the left side of the object will move when resized. Choose from:

True

The left side of the object will move when the application is resized.

False

Don't move the left side of the object when the application is resized.

ResizeRight

Whether the right side of the object will move when resized. Choose from:

True

The right side of the object will move when the application is resized.

False

Don't move the right side of the object when the application is resized.

ResizeTop

Whether the top of the object will move when resized. Choose from:

True

The top of the object will move when the application is resized.

False

Don't move the top of the object when the application is resized.

ResizeBottom

Whether the bottom of the object will move when resized. Choose from:

True

The bottom of the object will move when the application is resized.

False

Don't move the bottom of the object when the application is resized.

Actions

On FSCommand

The actions that will be performed whenever an fscommand() function is performed in the Flash file's internal actionscript code. Click the edit button to open the script editor.

Note: "fscommand()" is the name of a Flash actionscript function that allows a .swf file to send a message or "command" to the application that is playing it. Whenever a Flash file calls the fscommand() function, AutoPlay responds by performing the action that you assigned to the On FSCommand event.

Tip: The Flash fscommand() function passes a command in the form of a short text string. You can use AutoPlay's own scripting abilities to differentiate between fscommand() calls that pass different command strings. In fact, your Flash file can use the fscommand() function to send any number of custom commands to your AutoPlay application, and you can make your application respond to each command in any way you want.

On FlashCall

The actions that will be performed whenever an exposed Flash actionscript function is called using the control's external API (ExternalInterface class) causing it to dispatch its FlashCall event. You can respond to Flash actionscript function calls using the Flash.SetReturnValue action, or call Flash actionscript functions using the Flash.CallFunction action. Click the edit button to open the script editor.

Flash's external API offers additional functionality compared to fscommand() by allowing any number of arguments to be passed as well as various data types.

Note: This event is only available in Flash version 8.0 or later.


Flash Object - Dialog

Flash Object

Overview Pane Dialog Actions

Here are the object's settings as they appear on the "double-click" Properties dialog.

There are three tabs on the Properties dialog:

Settings

Attributes

Script

Settings Tab

Object

File:

The Flash file (.swf) that you want to display in the Flash object. Click the browse button to select a file.

Player Options

Alignment:

The alignment of the Flash movie within the object's bounding box.

Quality:

The rendering quality to use when displaying the Flash file, including the level of anti-aliasing performed. Choose from:

Low

Gives priority to playback speed over appearance. Anti-aliasing is turned off.

High

Gives priority to appearance over playback speed. Anti-aliasing is turned on.

Auto Low

Emphasizes speed at first, but improves appearance whenever possible. Playback begins with anti-aliasing turned off; if the Player determines that the system can handle it, it turns anti-aliasing on.

Auto High

Emphasizes speed and appearance equally at first, but sacrifices appearance for the sake of speed if necessary. Playback begins with anti-aliasing turned on, but it will be turned off if the frame rate drops below an acceptable level.

Context menu:

Control which context menu will display when you right-click on the Flash movie at run time. Choose from:

Standard

The standard right-click context menu will be shown.

Full

The full right-click context menu will be shown.

Scaling mode:

How the Flash movie will be made to fit within the bounding box. Choose from:

Show All

Makes the entire movie visible in the area defined by the object's bounding box without distortion, while maintaining the original aspect ratio of the movie. Borders may appear on two sides of the movie.

No Border

Scales the movie to fill the area defined by the object's bounding box without distortion, while maintaining the original aspect ratio of the movie. Any part of the movie that falls outside the area defined by the object's bounding box will be cropped.

Exact Fit

Resizes the movie to fill the area defined by the object's bounding box, ignoring the movie's original aspect ratio. The movie may appear distorted as a result.

Override background

Override the background color of the Flash file (.swf). This allows you to replace the background color in your Flash file with something more appropriate. Click the select button to bring up a color chooser.

Tip: Clicking the "More Colors..." button on the color menu allows you to choose either a standard color/custom color, or use the eyedropper to pick a color from somewhere within the AutoPlay application window.

Device font

Set the "Device Font Attribute" for the Flash control. When this option is enabled (checked), and appropriate fonts are installed on the user's system, the control will substitute installed system fonts for any fonts used in the Flash movie. Any text whose fonts are substituted will appear aliased (rough) regardless of the Quality setting. If the necessary fonts are not installed, the text will be rendered in the normal anti-aliased (smooth) way.

Special

Auto start

Start playing the Flash movie automatically (as soon as the page or dialog is opened).

Note: If this is unchecked, the movie will not play until you start it with a Flash.Play action.

Loop

Automatically begin playing from the beginning again whenever the Flash movie reaches the end.

Attributes Tab

Identification

Object name:

The name that is used to identify this object.

State

Enabled

Enable the object so it responds to user interaction. When an object is disabled, it will not respond to any mouse overs or clicks and will not perform any actions until it is enabled.

Note: You can use the Flash.SetEnabled action to enable this object.

Visible

Set the object's initial visibility (whether it's visible when the page or dialog is displayed). You can use the Flash.SetVisible action to make the object visible or invisible at run time.

Note: This option simply controls the initial visibility of the object and does not affect its play state. For example, if the object is set to start automatically, it will begin to play when the page or dialog opens whether it is visible or not.

Auto-Resize

Left

If checked, the left side of the object will move when the application is resized. If unchecked, the left side of the object will not move.

Right

If checked, the right side of the object will move when the application is resized. If unchecked, the right side of the object will not move.

Top

If checked, the top of the object will move when the application is resized. If unchecked, the top of the object will not move.

Bottom

If checked, the bottom of the object will move when the application is resized. If unchecked, the bottom of the object will not move.

Position

Left:

The distance in pixels from the left edge of the object to the left edge of the page or dialog.

Tip: You can also change the position of an object by dragging it or using the arrow keys.

Top:

The distance in pixels from the top edge of the object to the top edge of the page or dialog.

Width:

The width of the object in pixels.

Tip: You can also resize an object by dragging one of the resize handles on its bounding box.

Height:

The height of the object in pixels.

Restore Original

Set's the object's size back to the original values.

Feedback

Tooltip:

A short string of text that will appear after the mouse hovers over this object for a moment.

Tip: You can choose from several tooltip styles for all tooltips in your project, Standard, Balloon and Extended. This setting can be found on the Appearance tab of the Project > Settings.

Tip: If you want a newline in your tooltip text, use "\r\n". For example, for an Extended tooltip, "My First Line\r\nMy Second Line|My Title". Newlines are not supported in the Title text for Balloon or Extended styles.

Tip: If you want a "&" character in the text, you must enter "&&&".

Spelling

Check the spelling of the tooltip text.

Cursor:

The mouse pointer that will be used while the mouse is over this object.

Script Tab

You can use the script editor on this tab to edit the script of actions that will be performed on each of this object's events.

This object supports the following events:

On FSCommand

The actions that will be performed whenever an fscommand() function is performed in the Flash file's internal actionscript code.

Note: "fscommand()" is the name of a Flash actionscript function that allows a .swf file to send a message or "command" to the application that is playing it. Whenever a Flash file calls the fscommand() function, AutoPlay responds by performing the action that you assigned to the On FSCommand event.

Tip: The Flash fscommand() function passes a command in the form of a short text string. You can use AutoPlay's own scripting abilities to differentiate between fscommand() calls that pass different command strings. In fact, your Flash file can use the fscommand() function to send any number of custom commands to your AutoPlay application, and you can make your application respond to each command in any way you want.

The following event variables are automatically set whenever this event is triggered:

e_FSCommand

(string) A string containing the last FSCommand fired within the Flash object.

e_FSArgs

(string) A string containing the arguments of the last FSCommand fired within the Flash object.

On FlashCall

The actions that will be performed whenever an exposed Flash actionscript function is called using the control's external API (ExternalInterface class) causing it to dispatch its FlashCall event. You can respond to Flash actionscript function calls using the Flash.SetReturnValue action, or call Flash actionscript functions using the Flash.CallFunction action.

Flash's external API offers additional functionality compared to fscommand() by allowing any number of arguments to be passed as well as various data types.

Note: This event is only available in Flash version 8.0 or later.

e_FlashCall

(string) An XML formatted string containing the function request from the Flash file's actionscript code. This string can be parsed using the available XML actions.


Flash Object - Actions

Flash Object

Overview Pane Dialog Actions

Flash.CallFunction

Flash.GetFilename

Flash.GetFlashVariable

Flash.GetPos

Flash.GetProperties

Flash.GetSize

Flash.GetState

Flash.IsEnabled

Flash.IsVisible

Flash.Load

Flash.Play

Flash.Seek

Flash.SetEnabled

Flash.SetFlashVariable

Flash.SetPos

Flash.SetProperties

Flash.SetReturnValue

Flash.SetSize

Flash.SetVisible

Flash.Stop


SlideShow Object - Overview

SlideShow Object

Overview Pane Dialog Actions

The slideshow object allows you to incorporate an image slideshow into your application. The slideshow object contains many settings that can be configured to suite your presentation, such as: background style, border style, slide duration, resize modes, auto-start, looping, shuffle, slide transition effect, and many more.

Note: The slideshow object has a wide range of supported file types.

Tip: You can add a slideshow object by choosing Object > SlideShow from the menu.


SlideShow Object - Pane

SlideShow Object

Overview Pane Dialog Actions

Here are the object's settings as they appear in the properties pane:

Object

Name

The name that is used to identify this object.

ImageFiles

The image files you want included in the slideshow. Click the edit button to open object's properties dialog to the Settings tab where you can configure the slideshow list.

TransparentBackground

Whether to make the background transparent. Choose from:

True

Make the background of the object transparent.

False

Don't make the background transparent. Instead use the BackColor for the background.

BackColor

The solid color to use as the background of the object. You can click the select button to bring up a color chooser.

Tip: Clicking the "More Colors..." button on the color menu allows you to choose either a standard color/custom color, or use the eyedropper to pick a color from somewhere within the AutoPlay application window.

ShowBorder

Whether to show a border for the object. Choose from:

True

Show a border around the object using the color defined in BorderColor.

False

Don't show a border around the object.

BorderColor

The color to use as the border of the object. You can click the select button to bring up a color chooser.

Tip: Clicking the "More Colors..." button on the color menu allows you to choose either a standard color/custom color, or use the eyedropper to pick a color from somewhere within the AutoPlay application window.

ResizeMode

The resize mode to use for the image slides. Choose from:

Proportional

Resize the image so it fits inside the area defined by the object's bounding box using the image's largest dimension.

Stretch

Resize the image to fill the entire area defined by the object's bounding box.

Note: This setting ignores the image's original dimensions. The image may appear distorted as a result.

Crop

Fill the area defined by the object's bounding box and crop any parts that extends beyond the object's dimensions.

Timer

The duration to show each slide in the object (in milliseconds).

AutoStart

Whether to start playing the slideshow automatically. Choose from:

True

Start playing the slideshow automatically (as soon as the page or dialog is opened).

False

Don't play the slideshow automatically. The slideshow will not play until you start it with a SlideShow.Play action.

Loop

Whether to automatically begin playing from the beginning again whenever the slideshow reaches the end. Choose from:

True

Automatically begin playing from the beginning again whenever the slideshow reaches the end.

Note: If this option is selected, the On Finished event will not be fired.

False

Don't automatically replay the slideshow.

Shuffle

Whether to play the slide images in random order. Choose from:

True

Play the slides in the object's image file list in random order.

False

Play the slides in the object's image list in the order defined at design-time.

ShowTransitions

Whether to show a transition effect between slides. Choose from:

True

Show a transition effect between slides.

False

Don't show a transition effect.

NoEnlarge

Whether to resize smaller image to fit the object area, or center the image in the object when ResizeMode is set to "Proportional." Choose from:

True

If an image is smaller than the object's dimensions, center the image in the object, do not enlarge it.

False

Always proportionally resize the image to fit the object's dimensions.

Attributes

TooltipText

A short string of text that will appear after the mouse hovers over this object for a moment.

Tip: You can choose from several tooltip styles for all tooltips in your project, Standard, Balloon and Extended. This setting can be found on the Appearance tab of the Project > Settings.

Tip: If you want a newline in your tooltip text, use "\r\n". For example, for an Extended tooltip, "My First Line\r\nMy Second Line|My Title". Newlines are not supported in the Title text for Balloon or Extended styles.

Tip: If you want a "&" character in the text, you must enter "&&&".

Enabled

Enable the object so it responds to user interaction. Choose from:

True

The object will respond to mouse overs and clicks and perform any actions assigned to it's events.

False

The object will not respond to any mouse overs or clicks and will not perform any actions until it is enabled.

Note: You can use the SlideShow.SetEnabled action to enable this object.

Visible

Set the object's initial visibility. Choose from:

True

The object will be visible when the page or dialog is displayed.

False

The object will be invisible when the page or dialog is displayed.

Note: You can use the SlideShow.SetVisible action to make the object visible or invisible at run time.

Cursor

The mouse pointer that will be used while the mouse is over this object.

Position

Left

The distance in pixels from the left edge of the object to the left edge of the page or dialog.

Tip: You can also change the position of an object by dragging it or using the arrow keys.

Top

The distance in pixels from the top edge of the object to the top edge of the page or dialog.

Width

The width of the object in pixels.

Tip: You can also resize an object by dragging one of the resize handles on its bounding box.

Height

The height of the object in pixels.

Auto-Resize

ResizeLeft

Whether the left side of the object will move when resized. Choose from:

True

The left side of the object will move when the application is resized.

False

Don't move the left side of the object when the application is resized.

ResizeRight

Whether the right side of the object will move when resized. Choose from:

True

The right side of the object will move when the application is resized.

False

Don't move the right side of the object when the application is resized.

ResizeTop

Whether the top of the object will move when resized. Choose from:

True

The top of the object will move when the application is resized.

False

Don't move the top of the object when the application is resized.

ResizeBottom

Whether the bottom of the object will move when resized. Choose from:

True

The bottom of the object will move when the application is resized.

False

Don't move the bottom of the object when the application is resized.

Sounds

HighlightSound

The sound that will be played when the mouse moves over this object. Choose from:

None

Don't play any sound.

Standard

Play the default mouse over sound, as configured on the Sound Effects tab of the Audio Settings dialog.

Custom

Play a custom mouse over sound.

HighlightFile

The custom audio file to play. Click the browse button to select an appropriate sound file.

ClickSound

The sound that will be played when the user clicks on this object. Choose from:

None

Don't play any sound.

Standard

Play the default mouse click sound, as configured on the Sound Effects tab of the Audio Settings dialog.

Custom

Play a custom mouse click sound.

ClickFile

The custom audio file to play. Click the browse button to select an appropriate sound file.

Actions

Quick Action

A quick action to perform when the object is clicked. Click the edit button to select a quick action.

On Click

The actions that will be performed when the user clicks on this object. Click the edit button to open the script editor.

On Right-Click

The actions that will be performed when the user right-clicks on this object. Click the edit button to open the script editor.

On Enter

The actions that will be performed when the mouse moves onto this object ("enters" the object's territory). Click the edit button to open the script editor.

On Leave

The actions that will be performed when the mouse moves off of this object ("leaves" the object's territory). Click the edit button to open the script editor.

On Play

The actions that will be performed when the slideshow begins to play. Click the edit button to open the script editor.

On Pause

The actions that will be performed when the slideshow is paused. Click the edit button to open the script editor.

On Finished

The actions that will be performed when the slideshow reaches the end. Click the edit button to open the script editor.

Note: If the Loop setting is selected, this event will not be fired.

On Slide Changed

The actions that will be performed each time the slide changes in the slideshow object. Click the edit button to open the script editor.


SlideShow Object - Dialog

SlideShow Object

Overview Pane Dialog Actions

Here are the object's settings as they appear on the "double-click" Properties dialog.

There are four tabs on the Properties dialog:

Settings

Attributes

Quick Action

Script

Settings Tab

Image Files

The image files you wish to show in the slideshow object.

Click the add button to choose an image file through the Select File dialog. Repeat this step if you wish to include multiple files, or click the add folder button to add all supported images within a folder on your system. You can manipulate the image files list by first highlighting the image file, then either clicking the edit, delete, or the arrow buttons to achieve the desired image list.

Note: The slideshow object has a wide range of supported file types.

Background Style

Solid

The background color for the object. You can click the select button to bring up a color chooser.

Tip: Clicking the "More Colors..." button on the color menu allows you to choose either a standard color/custom color, or use the eyedropper to pick a color from somewhere within the AutoPlay application window.

Transparent

Make the background of the object transparent.

Border Style

Solid

The border color for the object. You can click the select button to bring up a color chooser.

Tip: Clicking the "More Colors..." button on the color menu allows you to choose either a standard color/custom color, or use the eyedropper to pick a color from somewhere within the AutoPlay application window.

None

Don't show any border for the object.

Timer

Interval (milliseconds):

The duration to show each slide in the object (in milliseconds).

Auto-start

Start playing the slideshow automatically (as soon as the page or dialog is opened).

Note: If this option is unchecked, the slideshow will not play until you start it with a SlideShow.Play action.

Options

Resize mode:

The resize mode to use for the image slides. Choose from:

Crop

Fill the area defined by the object's bounding box and crop any parts that extends beyond the object's dimensions.

Proportional

Resize the image so it fits inside the area defined by the object's bounding box using the image's largest dimension.

Stretch

Resize the image to fill the entire area defined by the object's bounding box.

Note: This setting ignores the image's original dimensions. The image may appear distorted as a result.

Loop

Automatically begin playing from the beginning again whenever the slideshow reaches the end.

Note: If this option is checked, the On Finished event will not be fired.

Transitions

Show a transition effect between slides.

Shuffle

Play the slides in the object's image file list in random order. If unchecked, they will be played in the order they were defined at design-time.

No enlarge

If checked, and Resize mode is set to "Proportional," any images that are smaller than the object's dimensions will be centered in the object, and not enlarged to fit the dimensions of the object. If unchecked, images will be proportionally resized to fit the object's dimensions.

Attributes Tab

Identification

Object name:

The name that is used to identify this object.

State

Enabled

Enable the object so it responds to user interaction. When an object is disabled, it will not respond to any mouse overs or clicks and will not perform any actions until it is enabled.

Note: You can use the SlideShow.SetEnabled action to enable this object.

Visible

Set the object's initial visibility (whether it's visible when the page or dialog is displayed).

Note: You can use the SlideShow.SetVisible action to make the object visible or invisible at run time.

Auto-Resize

Left

If checked, the left side of the object will move when the application is resized. If unchecked, the left side of the object will not move.

Right

If checked, the right side of the object will move when the application is resized. If unchecked, the right side of the object will not move.

Top

If checked, the top of the object will move when the application is resized. If unchecked, the top of the object will not move.

Bottom

If checked, the bottom of the object will move when the application is resized. If unchecked, the bottom of the object will not move.

Position

Left:

The distance in pixels from the left edge of the object to the left edge of the page or dialog.

Tip: You can also change the position of an object by dragging it or using the arrow keys.

Top:

The distance in pixels from the top edge of the object to the top edge of the page or dialog.

Width:

The width of the object in pixels.

Tip: You can also resize an object by dragging one of the resize handles on its bounding box.

Height:

The height of the object in pixels.

Restore Original

Set's the object's size back to the original values. (This feature is not available for the SlideShow object.)

Feedback

Tooltip:

A short string of text that will appear after the mouse hovers over this object for a moment.

Tip: You can choose from several tooltip styles for all tooltips in your project, Standard, Balloon and Extended. This setting can be found on the Appearance tab of the Project > Settings.

Tip: If you want a newline in your tooltip text, use "\r\n". For example, for an Extended tooltip, "My First Line\r\nMy Second Line|My Title". Newlines are not supported in the Title text for Balloon or Extended styles.

Tip: If you want a "&" character in the text, you must enter "&&&".

Spelling

Check the spelling of the tooltip text.

Cursor:

The mouse pointer that will be used while the mouse is over this object.

Sounds

Highlight:

The sound that will be played when the mouse moves over this object. Choose from:

None

Don't play any sound.

Standard

Play the default mouse click sound, as configured on the Sound Effects tab of the Audio Settings dialog.

Custom

Play a custom mouse over sound.

File:

The custom audio file to play. Click the browse button to select an appropriate sound file.

Click:

The sound that will be played when the user clicks on this object. Choose from:

None

Don't play any sound.

Standard

Play the default mouse click sound, as configured on the Sound Effects tab of the Audio Settings dialog.

Custom

Play a custom mouse click sound.

File:

The custom audio file to play. Click the browse button to select an appropriate sound file.

Quick Action Tab

You can use this tab to perform a simple action when the object is clicked.

When Object is Clicked

Action to run:

The action to perform when the object is clicked. Choose from:

ACTION | DESCRIPTION
None | Does nothing.
Show Page | Jumps to the specified page in your application. Click here for more information.
Show Dialog | Shows a specific dialog in your application. Click here for more information.
Close Dialog | Closes the currently displayed dialog. Click here for more information.
Run Program | Runs an application with optional command line arguments. Click here for more information.
Open Document | Opens a document in an external viewer. Click here for more information.
Print Document | Prints a document on the user's system. Click here for more information.
Send Email | Sends an email through the user's default email program. Click here for more information.
View Website | Opens a website in the user's default web browser. Click here for more information.
Explore Folder | Explores a folder on the user's system. Click here for more information.
Play Multimedia | Plays a multimedia file in the default player on the user's system. Click here for more information.
Play/Pause Background Music | Toggles the play state of the background music. Click here for more information.
Exit/Close | Exits from the AutoPlay application. Click here for more information.

Properties

Any additional settings corresponding to the selected quick action.

Script Tab

You can use the action editor on this tab to edit the script of actions that will be performed on each of this object's events.

This object supports the following events:

On Click

The actions that will be performed when the user clicks on this object.

On Right-Click

The actions that will be performed when the user right-clicks this object.

On Enter

The actions that will be performed when the mouse moves onto this object ("enters" the object's territory).

On Leave

The actions that will be performed when the mouse moves off of this object ("leaves" the object's territory).

On Play

The actions that will be performed when the slideshow begins to play.

On Pause

The actions that will be performed when the slideshow is paused.

On Finished

The actions that will be performed when the slideshow reaches the end.

Note: If the Loop setting is selected, this event will not be fired.

On Slide Changed

The actions that will be performed each time the slide changes in the slideshow object.

The following event variables are automatically set whenever this event is triggered:

e_Index

(number) The 1-based index of the slide that was changed to in the slideshow (currently shown).

e_FilePath

(string) The full path to the image file that was changed to in the slideshow (currently shown).


SlideShow Object - Actions

SlideShow Object

Overview Pane Dialog Actions

SlideShow.AddSlide

SlideShow.DeleteSlide

SlideShow.FillFromFolder

SlideShow.GetCurrentSlide

SlideShow.GetImagePath

SlideShow.GetPos

SlideShow.GetProperties

SlideShow.GetSize

SlideShow.GetSlideCount

SlideShow.GoToSlide

SlideShow.IsEnabled

SlideShow.IsVisible

SlideShow.Navigate

SlideShow.Pause

SlideShow.Play

SlideShow.SetEnabled

SlideShow.SetPos

SlideShow.SetProperties

SlideShow.SetSize

SlideShow.SetVisible


PDF Object - Overview

PDF Object

Overview Pane Dialog Actions

The PDF object lets you display a PDF File (*.pdf) on the page or dialog, just like it would appear in the Adobe Reader application or web browser. It does this by taking advantage of the Adobe Reader ActiveX control installed with the commonly used Adobe Reader application.

Specifically, it embeds this PDF browser control directly into your AutoPlay application at run time. This essentially "borrows" the Acrobat Reader rendering engine—which is the part of Adobe Reader that deals with showing .pdf pages on a computer screen—and uses it to display and navigate PDF files in your application.

The end result is pretty much the same as what you would see when viewing PDF files through Acrobat Reader, except that the Acrobat Reader program interface is not visible. Therefore it looks like the PDF file is built right into your application. You can use it to display local files directly off a CD-ROM, user's hard drive, or hosted on the Internet.

PDF Object Requirements

The PDF object will only work if version 8.0 or newer of the Adobe Reader ActiveX control is installed on the user's system. It is installed with version 8.0 or newer of either the free Adobe Reader application, or one of the Adobe Acrobat professional products.

Note: You can configure the detection of the Adobe Reader control by going to Project > Dependencies.

Tip: You can add a PDF object by choosing Object > PDF from the menu.


PDF Object - Pane

PDF Object

Overview Pane Dialog Actions

Here are the object's settings as they appear in the properties pane:

Object

Name

The name that is used to identify this object.

File

The local PDF File (*.pdf) or URL that the object will load at runtime. Specify a web address in this field, or click the browse button to select a file.

ShowScrollbars

Show horizontal and vertical scrollbars.

ShowToolbar

Show the PDF browser toolbar.

ShowBorder

Show a border around the object.

Layout

The layout mode for the page in the object. Choose from:

User Preference

Use the current user preference for viewing.

Single Page

Show a single page.

One Column

Show one column of pages in continuous mode.

Two Columns Left

Show two columns of pages in continuous mode with the first page shown on the left.

Two Columns Right

Show two columns of pages in continuous mode with the first page shown on the right.

Page

The page mode for the object. Choose from:

Standard

Show the document, but don't display any bookmarks or thumbnails.

Bookmarks

Show the document and bookmarks.

Thumbs

Show the document and thumbnails.

View

The view of the page within the object. Choose from:

Fit Page

Fit the entire page, both vertically and horizontally.

Fit Page Width

Fit the width of the page.

Fit Page Height

Fit the height of the page.

Fit Bounding

Fit the bounding box (visible text area) both vertically and horizontally.

Fit Bounding Width

Fit the width of the bounding box (visible text area).

Fit Bounding Height

Fit the height of the bounding box (visible text area).

Actual Size

Show the document at its actual size (100% magnification).

ViewOffset

The horizontal (left), or vertical (top) offset to scroll the page to depending on the selected View setting. The page will be scrolled to the right or down the specified amount.

Attributes

Enabled

Enable the object so it responds to user interaction. Choose from:

True

The object will respond to mouse overs and clicks.

False

The object will not respond to any mouse overs or clicks until it is enabled.

Note: You can use the PDF.SetEnabled action to enable this object.

Visible

Set the object's initial visibility. Choose from:

True

The object will be visible when the page or dialog is displayed.

False

The object will be invisible when the page or dialog is displayed.

Note: You can use the PDF.SetVisible action to make the object visible or invisible at run time.

Note: This option simply controls the initial visibility of the object. The object will continue to respond to actions even though it is hidden.

Position

Left

The distance in pixels from the left edge of the object to the left edge of the page or dialog.

Tip: You can also change the position of an object by dragging it.

Top

The distance in pixels from the top edge of the object to the top edge of the page or dialog.

Width

The width of the object in pixels.

Tip: You can also resize an object by dragging one of the resize handles on its bounding box.

Height

The height of the object in pixels.

Auto-Resize

ResizeLeft

Whether the left side of the object will move when resized. Choose from:

True

The left side of the object will move when the application is resized.

False

Don't move the left side of the object when the application is resized.

ResizeRight

Whether the right side of the object will move when resized. Choose from:

True

The right side of the object will move when the application is resized.

False

Don't move the right side of the object when the application is resized.

ResizeTop

Whether the top of the object will move when resized. Choose from:

True

The top of the object will move when the application is resized.

False

Don't move the top of the object when the application is resized.

ResizeBottom

Whether the bottom of the object will move when resized. Choose from:

True

The bottom of the object will move when the application is resized.

False

Don't move the bottom of the object when the application is resized.


PDF Object - Dialog

PDF Object

Overview Pane Dialog Actions

Here are the object's settings as they appear on the "double-click" Properties dialog.

There are two tabs on the Properties dialog:

Settings

Attributes

Settings Tab

Object

File or URL:

The local PDF File (*.pdf) or URL that the object will load at runtime. Specify a web address in this field, or click the Browse button to select a file.

Options

Layout:

The layout mode for the page in the object. Choose from:

User Preference

Use the current user preference for viewing.

Single Page

Show a single page.

One Column

Show one column of pages in continuous mode.

Two Columns Left

Show two columns of pages in continuous mode with the first page shown on the left.

Two Columns Right

Show two columns of pages in continuous mode with the first page shown on the right.

Page:

The page mode for the object. Choose from:

Standard

Show the document, but don't display any bookmarks or thumbnails.

Bookmarks

Show the document and bookmarks.

Thumbs

Show the document and thumbnails.

View:

The view of the page within the object. Choose from:

Fit Page

Fit the entire page, both vertically and horizontally.

Fit Page Width

Fit the width of the page.

Fit Page Height

Fit the height of the page.

Fit Bounding

Fit the bounding box (visible text area) both vertically and horizontally.

Fit Bounding Width

Fit the width of the bounding box (visible text area).

Fit Bounding Height

Fit the height of the bounding box (visible text area).

Actual Size

Show the document at its actual size (100% magnification).

View offset:

The horizontal (left), or vertical (top) offset to scroll the page to depending on the selected View setting. The page will be scrolled to the right or down the specified amount.

Show scrollbars

Show horizontal and vertical scrollbars.

Show toolbar

Show the PDF browser toolbar.

Show border

Show a border around the object.

Attributes Tab

Identification

Object name:

The name that is used to identify this object.

State

Enabled

Enable the object so it responds to user interaction. When an object is disabled, it will not respond to any mouse overs or clicks until it is enabled.

Note: You can use the PDF.SetEnabled action to enable this object.

Visible

Set the object's initial visibility (whether it's visible when the page or dialog is displayed). You can use the PDF.SetVisible action to make the object visible or invisible at run time.

Note: This option simply controls the initial visibility of the object. The object will continue to respond to actions even though it is hidden.

Auto-Resize

Left

If checked, the left side of the object will move when the application is resized. If unchecked, the left side of the object will not move.

Right

If checked, the right side of the object will move when the application is resized. If unchecked, the right side of the object will not move.

Top

If checked, the top of the object will move when the application is resized. If unchecked, the top of the object will not move.

Bottom

If checked, the bottom of the object will move when the application is resized. If unchecked, the bottom of the object will not move.

Position

Left:

The distance in pixels from the left edge of the object to the left edge of the page or dialog.

Tip: You can also change the position of an object by dragging it.

Top:

The distance in pixels from the top edge of the object to the top edge of the page or dialog.

Width:

The width of the object in pixels.

Tip: You can also resize an object by dragging one of the resize handles on its bounding box.

Height:

The height of the object in pixels.


PDF Object - Actions

PDF Object

Overview Pane Dialog Actions

PDF.GetFile

PDF.GetPos

PDF.GetProperties

PDF.GetSize

PDF.GoToPage

PDF.IsEnabled

PDF.IsVisible

PDF.LoadFile

PDF.Navigate

PDF.Print

PDF.PrintWithDialog

PDF.SetEnabled

PDF.SetNamedDest

PDF.SetPos

PDF.SetProperties

PDF.SetSize

PDF.SetVisible

PDF.SetZoomScroll


Web Object - Overview

Web Object

Overview Pane Dialog Actions

The web object lets you display a web site on the page or dialog, just like it would appear in Internet Explorer. It does this by taking advantage of the Internet Explorer ActiveX control that is found on most systems.

Specifically, it embeds this Internet Explorer control directly into your AutoPlay application at run time. This essentially "borrows" the Internet Explorer rendering engine—which is the part of Internet Explorer that deals with showing web pages on a computer screen—and uses it to display HTML in your application.

The end result is pretty much the same as what you would see in Internet Explorer itself, except that the Internet Explorer program interface is not visible. Therefore it looks like the web page is built right into your application. You can use it to display "live" web pages on the Internet, or to display "stored" web pages directly off a CD-ROM (or the user's hard drive).

Web Object Requirements

The web object will only work if the Internet Explorer ActiveX control is installed on the user's system. It is compatible with version 4.01 or newer of the Internet Explorer control.

Note: You can configure the detection of the Internet Explorer control by going to Project > Dependencies.

Tip: You can add a web object by choosing Object > Web from the menu.


Web Object - Pane

Web Object

Overview Pane Dialog Actions

Here are the object's settings as they appear in the properties pane:

Object

Name

The name that is used to identify this object.

URL

The URL (or full path and filename) of the initial web page to display. This can be an HTML file, or any other type of file that can be viewed in Internet Explorer. Click the browse button to select a file.

ShowBorder

Show a border around the object.

ShowScrollbars

Show horizontal and vertical scrollbars.

Attributes

Enabled

Enable the object so it responds to user interaction. Choose from:

True

The object will respond to mouse overs and clicks and perform any actions assigned to its events.

False

The object will not respond to any mouse overs or clicks and will not perform any actions until it is enabled.

Note: You can use the Web.SetEnabled action to enable this object.

Visible

Set the object's initial visibility. Choose from:

True

The object will be visible when the page or dialog is displayed.

False

The object will be invisible when the page or dialog is displayed.

Note: You can use the Web.SetVisible action to make the object visible or invisible at run time.

Note: This option simply controls the initial visibility of the object. The object will continue to respond to actions even though it is hidden.

Position

Left

The distance in pixels from the left edge of the object to the left edge of the page or dialog.

Tip: You can also change the position of an object by dragging it.

Top

The distance in pixels from the top edge of the object to the top edge of the page or dialog.

Width

The width of the object in pixels.

Tip: You can also resize an object by dragging one of the resize handles on its bounding box.

Height

The height of the object in pixels.

Auto-Resize

ResizeLeft

Whether the left side of the object will move when resized. Choose from:

True

The left side of the object will move when the application is resized.

False

Don't move the left side of the object when the application is resized.

ResizeRight

Whether the right side of the object will move when resized. Choose from:

True

The right side of the object will move when the application is resized.

False

Don't move the right side of the object when the application is resized.

ResizeTop

Whether the top of the object will move when resized. Choose from:

True

The top of the object will move when the application is resized.

False

Don't move the top of the object when the application is resized.

ResizeBottom

Whether the bottom of the object will move when resized. Choose from:

True

The bottom of the object will move when the application is resized.

False

Don't move the bottom of the object when the application is resized.

Actions

On Navigate

The actions that will be performed whenever the URL changes (when it starts to navigate to a new page) in the web object . Click the edit button to open the script editor.

On Loaded

The actions that will be performed whenever the URL being navigated to has finished loading. Click the edit button to open the script editor.


Web Object - Dialog

Web Object

Overview Pane Dialog Actions

Here are the object's settings as they appear on the "double-click" Properties dialog.

There are three tabs on the Properties dialog:

Settings

Attributes

Script

Settings Tab

Object

URL:

The URL (or full path and filename) of the initial web page to display. This can be an HTML file, or any other type of file that can be viewed in Internet Explorer. Click the browse button to select a file.

Appearance

Show border

Show a border around the object.

Show scrollbars

Show horizontal and vertical scrollbars.

Attributes Tab

Identification

Object name:

The name that is used to identify this object.

State

Enabled

Enable the object so it responds to user interaction. When an object is disabled, it will not respond to any mouse overs or clicks and will not perform any actions until it is enabled.

Note: You can use the Web.SetEnabled action to enable this object.

Visible

Set the object's initial visibility (whether it's visible when the page or dialog is displayed). You can use the Web.SetVisible action to make the object visible or invisible at run time.

Note: This option simply controls the initial visibility of the object. The object will continue to respond to actions even though it is hidden.

Auto-Resize

Left

If checked, the left side of the object will move when the application is resized. If unchecked, the left side of the object will not move.

Right

If checked, the right side of the object will move when the application is resized. If unchecked, the right side of the object will not move.

Top

If checked, the top of the object will move when the application is resized. If unchecked, the top of the object will not move.

Bottom

If checked, the bottom of the object will move when the application is resized. If unchecked, the bottom of the object will not move.

Position

Left:

The distance in pixels from the left edge of the object to the left edge of the page or dialog.

Tip: You can also change the position of an object by dragging it.

Top:

The distance in pixels from the top edge of the object to the top edge of the page or dialog.

Width:

The width of the object in pixels.

Tip: You can also resize an object by dragging one of the resize handles on its bounding box.

Height:

The height of the object in pixels.

Restore Original

Set's the object's size back to the original values.

Script Tab

You can use the script editor on this tab to edit the script of actions that will be performed on each of this object's events.

This object supports the following events:

On Navigate

The actions that will be performed whenever the URL changes (when it starts to navigate to a new page) in the web object.

The following event variables are automatically set whenever this event is triggered:

e_URL

(string) A string containing the URL that is being navigated to.

On Loaded

The actions that will be performed whenever the URL being navigated to has finished loading.

The following event variables are automatically set whenever this event is triggered:

e_URL

(string) A string containing the URL that has finished loading.


Web Object - Actions

Web Object

Overview Pane Dialog Actions

Web.Back

Web.Forward

Web.GetPos

Web.GetProperties

Web.GetSize

Web.GetURL

Web.IsEnabled

Web.IsSilent

Web.IsVisible

Web.LoadHTML

Web.LoadURL

Web.Print

Web.Refresh

Web.SetEnabled

Web.SetPos

Web.SetProperties

Web.SetSilent

Web.SetSize

Web.SetVisible

Web.Stop


xButton Object - Overview

xButton Object

Overview Pane Dialog Actions

The xButton is an extension of the Windows button. It responds automatically to the user by changing its appearance when you move the mouse over it or click on it, but that's not all.

The xButton is highly configurable containing features such as text and images, various visual themes and standard or toggle button styles. The xButton also supports markup text using Extensible Application Markup Language (XAML) syntax which adds endless formatting possibilities including text highlighting, hyperlinks and much more.

Buttons are a great place to put actions, since they usually look like something you would want to click on. And to help the user know what the buttons will do, each button can have an image and custom text on it, just like a label object.

The xButton supports the following image formats: .bmp, .jpg, .png, .wmf, .gif and .ico (icon).

Tip: You can add an xButton object by choosing Object > xButton from the menu.


xButton Object - Pane

xButton Object

Overview Pane Dialog Actions

Here are the object's settings as they appear in the properties pane:

Object

Name

The name that is used to identify this object.

Text

The text that you want to display on the xButton object. If EnableMarkup is selected, you can specify the desired text and formatting using supported Extensible Application Markup Language (XAML) syntax.

Font

The font that you want to use for the text. Click the edit button to open the Font dialog where you can edit all of the font settings.

Tip: You can set the default font for this object type by configuring its settings on the Objects tab in Edit > Preferences.

FontFamily

The font family that you want to use.

FontSize

The font size, in points.

FontBold

Make the text bolded.

FontItalic

Make the text appear in italics.

TextColor

The color to use for the text.

Tip: You can click the select button to bring up a color chooser. Clicking the "More Colors..." button on the color menu allows you to choose either a standard color/custom color, or use the eyedropper to pick a color from somewhere within the AutoPlay application window.

EnableMarkup

Whether to use markup text. Choose from:

True

Enable the use of markup text using supported Extensible Application Markup Language (XAML) syntax. This enables you to add text highlighting, hyperlinks and more.

False

Use standard text.

ButtonImage

The image that you want to display on the xButton object. Click the browse button to select a file. The xButton supports the following image formats: .bmp, .jpg, .png, .wmf, .gif and .ico (icon).

ImageAlignment

The alignment to use for the image. Choose from:

Middle Left

Align the image to the middle left.

Middle Right

Align the image to the middle right.

Middle Center

Align the image to the middle center.

Top Left

Align the image to the top left.

Top Right

Align the image to the top right.

Top Center

Align the image to the top center.

Bottom Left

Align the image to the bottom left.

Bottom Right

Align the image to the bottom right.

Bottom Center

Align the image to the bottom center.

TextAlignment

The alignment to use for the text. Choose from:

Middle Left

Align the text to the middle left.

Middle Right

Align the text to the middle right.

Middle Center

Align the text to the middle center.

Top Left

Align the text to the top left.

Top Right

Align the text to the top right.

Top Center

Align the text to the top center.

Bottom Left

Align the text to the bottom left.

Bottom Right

Align the text to the bottom right.

Bottom Center

Align the text to the bottom center.

ImageTextRelation

The relationship to use between the text and image:

Overlay

Display the image over top of the text.

Image Above Text

Display the image above the text.

Text Above Image

Display the text above the image.

Image Before Text

Display the image before (to the left) of the text.

Text Before Image

Display the text before (to the left) of the image.

Theme

The visual theme to use for the xButton. Click the select button to choose from a variety of themes. Any button with Office 2007 selected as it's theme will use the Office 20007 sub-theme that can be changed on the Appearance tab of the Project Settings dialog.

Style

Choose from:

Standard

A standard button. Click to enter the down state; release the mouse button to return to the up state automatically.

Toggle

A toggle button. Click once to enter the down state; click again to return to the up state.

DefaultToggleState

The initial state of a toggle button. Choose from:

Up

Begin in the up state.

Down

Begin in the down (pressed) state.

Attributes

TooltipText

A short string of text that will appear after the mouse hovers over this object for a moment.

Tip: You can choose from several tooltip styles for all tooltips in your project, Standard, Balloon and Extended. This setting can be found on the Appearance tab of the Project > Settings.

Tip: If you want a newline in your tooltip text, use "\r\n". For example, for an Extended tooltip, "My First Line\r\nMy Second Line|My Title". Newlines are not supported in the Title text for Balloon or Extended styles.

Tip: If you want a "&" character in the text, you must enter "&&&".

Enabled

Enable the object so it responds to user interaction. Choose from:

True

The object will respond to mouse overs and clicks and perform any actions assigned to its events.

False

The object will not respond to any mouse overs or clicks and will not perform any actions until it is enabled.

Note: You can use the xButton.SetEnabled action to enable this object.

Visible

Set the object's initial visibility. Choose from:

True

The object will be visible when the page or dialog is displayed.

False

The object will be invisible when the page or dialog is displayed.

Note: You can use the xButton.SetVisible action to make the object visible or invisible at run time.

Cursor

The mouse pointer that will be used while the mouse is over this object.

Position

Left

The distance in pixels from the left edge of the object to the left edge of the page or dialog.

Tip: You can also change the position of an object by dragging it or using the arrow keys.

Top

The distance in pixels from the top edge of the object to the top edge of the page or dialog.

Width

The width of the object in pixels.

Tip: You can also resize an object by dragging one of the resize handles on its bounding box.

Height

The height of the object in pixels.

Auto-Resize

ResizeLeft

Whether the left side of the object will move when resized. Choose from:

True

The left side of the object will move when the application is resized.

False

Don't move the left side of the object when the application is resized.

ResizeRight

Whether the right side of the object will move when resized. Choose from:

True

The right side of the object will move when the application is resized.

False

Don't move the right side of the object when the application is resized.

ResizeTop

Whether the top of the object will move when resized. Choose from:

True

The top of the object will move when the application is resized.

False

Don't move the top of the object when the application is resized.

ResizeBottom

Whether the bottom of the object will move when resized. Choose from:

True

The bottom of the object will move when the application is resized.

False

Don't move the bottom of the object when the application is resized.

Sounds

HighlightSound

The sound that will be played when the mouse moves over this object. Choose from:

None

Don't play any sound.

Standard

Play the default mouse over sound, as configured on the Sound Effects tab of the Audio Settings dialog.

Custom

Play a custom mouse over sound.

HighlightFile

The custom audio file to play. Click the browse button to select an appropriate sound file.

ClickSound

The sound that will be played when the user clicks on this object. Choose from:

None

Don't play any sound.

Standard

Play the default mouse click sound, as configured on the Sound Effects tab of the Audio Settings dialog.

Custom

Play a custom mouse click sound.

ClickFile

The custom audio file to play. Click the browse button to select an appropriate sound file.

Actions

Quick Action

A quick action to perform when the object is clicked. Click the edit button to select a quick action.

On Click

The actions that will be performed when the user clicks on this object. Click the edit button to open the script editor.

On Right-Click

The actions that will be performed when the user right-clicks on this object. Click the edit button to open the script editor.

On Enter

The actions that will be performed when the mouse moves onto this object ("enters" the object's territory). Click the edit button to open the script editor.

On Leave

The actions that will be performed when the mouse moves off of this object ("leaves" the object's territory). Click the edit button to open the script editor.

On Hyperlink

The actions that will be performed when the user clicks on a hyperlink in a markup enabled xButton object.


xButton Object - Dialog

xButton Object

Overview Pane Dialog Actions

Here are the object's settings as they appear on the "double-click" Properties dialog.

There are four tabs on the Properties dialog:

Settings

Attributes

Quick Action

Script

Settings Tab

Object

Text:

The text that you want to display on the xButton object. If Enable markup is checked, you can specify the desired text and formatting using supported Extensible Application Markup Language (XAML) syntax.

Font...

The font that you want to use for the text. Click the select font button to open the Font dialog where you can edit all of the font settings.

Tip: You can set the default font for this object type by configuring its settings on the Objects tab in Edit > Preferences.

Text color:

The color to use for the text.

Tip: You can click the select button to bring up a color chooser. Clicking the "More Colors..." button on the color menu allows you to choose either a standard color/custom color, or use the eyedropper to pick a color from somewhere within the AutoPlay application window.

Enable markup

Enable the use of markup text using supported Extensible Application Markup Language (XAML) syntax. If checked, you can specify the formatted markup text to add features such as highlighting, hyperlinks and more. If unchecked, standard text will be used given the Text and Font settings.

Spelling

Check the spelling of the text.

Button image:

The image that you want to display on the xButton object. Click the browse button to select a file. The xButton supports the following image formats: .bmp, .jpg, .png, .wmf, .gif and .ico (icon).

Alignment

Image:

The alignment to use for the image. Choose from:

Middle Left

Align the image to the middle left.

Middle Right

Align the image to the middle right.

Middle Center

Align the image to the middle center.

Top Left

Align the image to the top left.

Top Right

Align the image to the top right.

Top Center

Align the image to the top center.

Bottom Left

Align the image to the bottom left.

Bottom Right

Align the image to the bottom right.

Bottom Center

Align the image to the bottom center.

Text:

The alignment to use for the text. Choose from:

Middle Left

Align the text to the middle left.

Middle Right

Align the text to the middle right.

Middle Center

Align the text to the middle center.

Top Left

Align the text to the top left.

Top Right

Align the text to the top right.

Top Center

Align the text to the top center.

Bottom Left

Align the text to the bottom left.

Bottom Right

Align the text to the bottom right.

Bottom Center

Align the text to the bottom center.

Image and text relation:

The relationship to use between the text and image:

Overlay

Display the image over top of the text.

Image Above Text

Display the image above the text.

Text Above Image

Display the text above the image.

Image Before Text

Display the image before (to the left) of the text.

Text Before Image

Display the text before (to the left) of the image.

Theme

The visual theme to use for the xButton. Click the select button to choose from a variety of themes. Any button with Office 2007 selected as it's theme will use the Office 20007 sub-theme that can be changed on the Appearance tab of the Project Settings dialog.

Style

Standard

A standard button. Click to enter the down state; release the mouse button to return to the up state automatically.

Toggle

A toggle button. Click once to enter the down state; click again to return to the up state.

Up

Begin in the up state.

Down

Begin in the down (pressed) state.

Attributes Tab

Identification

Object name:

The name that is used to identify this object.

State

Enabled

Enable the object so it responds to user interaction. When an object is disabled, it will not respond to any mouse overs or clicks and will not perform any actions until it is enabled.

Note: You can use the xButton.SetEnabled action to enable this object.

Visible

Set the object's initial visibility (whether it's visible when the page or dialog is displayed).

Note: You can use the xButton.SetVisible action to make the object visible or invisible at run time.

Auto-Resize

Left

If checked, the left side of the object will move when the application is resized. If unchecked, the left side of the object will not move.

Right

If checked, the right side of the object will move when the application is resized. If unchecked, the right side of the object will not move.

Top

If checked, the top of the object will move when the application is resized. If unchecked, the top of the object will not move.

Bottom

If checked, the bottom of the object will move when the application is resized. If unchecked, the bottom of the object will not move.

Position

Left:

The distance in pixels from the left edge of the object to the left edge of the page or dialog.

Tip: You can also change the position of an object by dragging it or using the arrow keys.

Top:

The distance in pixels from the top edge of the object to the top edge of the page or dialog.

Width:

The width of the object in pixels.

Tip: You can also resize an object by dragging one of the resize handles on its bounding box.

Height:

The height of the object in pixels.

Feedback

Tooltip:

A short string of text that will appear after the mouse hovers over this object for a moment.

Tip: You can choose from several tooltip styles for all tooltips in your project, Standard, Balloon and Extended. This setting can be found on the Appearance tab of the Project > Settings.

Tip: If you want a newline in your tooltip text, use "\r\n". For example, for an Extended tooltip, "My First Line\r\nMy Second Line|My Title". Newlines are not supported in the Title text for Balloon or Extended styles.

Tip: If you want a "&" character in the text, you must enter "&&&".

Spelling

Check the spelling of the tooltip text.

Cursor:

The mouse pointer that will be used while the mouse is over this object.

Sounds

Highlight:

The sound that will be played when the mouse moves over this object. Choose from:

None

Don't play any sound.

Standard

Play the default mouse over sound, as configured on the Sound Effects tab of the Audio Settings dialog.

Custom

Play a custom mouse over sound.

File:

The custom audio file to play. Click the browse button to select an appropriate sound file.

Click:

The sound that will be played when the user clicks on this object. Choose from:

None

Don't play any sound.

Standard

Play the default mouse click sound, as configured on the Sound Effects tab of the Audio Settings dialog.

Custom

Play a custom mouse click sound.

File:

The custom audio file to play. Click the browse button to select an appropriate sound file.

Quick Action Tab

You can use this tab to perform a simple action when the object is clicked.

When Object is Clicked

Action to run:

The action to perform when the object is clicked. Choose from:

ACTION | DESCRIPTION
None | Does nothing.
Show Page | Jumps to the specified page in your application. Click here for more information.
Show Dialog | Shows a specific dialog in your application. Click here for more information.
Close Dialog | Closes the currently displayed dialog. Click here for more information.
Run Program | Runs an application with optional command line arguments. Click here for more information.
Open Document | Opens a document in an external viewer. Click here for more information.
Print Document | Prints a document on the user's system. Click here for more information.
Send Email | Sends an email through the user's default email program. Click here for more information.
View Website | Opens a website in the user's default web browser. Click here for more information.
Explore Folder | Explores a folder on the user's system. Click here for more information.
Play Multimedia | Plays a multimedia file in the default player on the user's system. Click here for more information.
Play/Pause Background Music | Toggles the play state of the background music. Click here for more information.
Exit/Close | Exits from the AutoPlay application. Click here for more information.

Properties

Any additional settings corresponding to the selected quick action.

Script Tab

You can use the script editor on this tab to edit the script of actions that will be performed on each of this object's events.

This object supports the following events:

On Click

The actions that will be performed when the user clicks on this object.

On Right-Click

The actions that will be performed when the user right-clicks this object.

On Enter

The actions that will be performed when the mouse moves onto this object ("enters" the object's territory).

On Leave

The actions that will be performed when the mouse moves off of this object ("leaves" the object's territory).

On Hyperlink

The actions that will be performed when the user clicks on a hyperlink in a markup enabled xButton object.

The following event variable is automatically set whenever this event is triggered:

e_Hyperlink

(string) A string containing the hyperlink text that the user clicked on an xButton object. This is the text surrounded by Hyperlink tags in the markup text. For example, "Link Text" would be returned if the markup text contained <Hyperlink>Link Text</Hyperlink>.


xButton Object - Actions

xButton Object

Overview Pane Dialog Actions

xButton.GetImage

xButton.GetPos

xButton.GetProperties

xButton.GetSize

xButton.GetState

xButton.GetText

xButton.IsEnabled

xButton.IsVisible

xButton.SetEnabled

xButton.SetImage

xButton.SetPos

xButton.SetProperties

xButton.SetSize

xButton.SetState

xButton.SetText

xButton.SetVisible


CheckBox Object - Overview

CheckBox Object

Overview Pane Dialog Actions

The checkbox object allows you add the functionality of a Windows checkbox to the page or dialog. The object contains many of the features native to the Windows checkbox, and a few additional settings. Some of these settings include: checked states, multi-line text font and state colors, button and text alignment, and many more configurable attributes.

Tip: You can add a checkbox object by choosing Object > CheckBox from the menu.


CheckBox Object - Pane

CheckBox Object

Overview Pane Dialog Actions

Here are the object's settings as they appear in the properties pane:

Object

Name

The name that is used to identify this object.

Checked

Whether to show the checkbox as checked or unchecked. Choose from:

True

Show the checkbox as checked.

False

Show the checkbox as unchecked.

Text

The text that you want to display on the checkbox object. Click the edit button to open the Edit Text dialog, where you can import, edit and spell check this object's text.

Font

The font that you want to use for the text. Click the edit button to open the Font dialog where you can edit all of the font settings.

Tip: You can set the default font for this object type by configuring its settings on the Objects tab in Edit > Preferences.

FontFamily

The font family that you want to use.

FontSize

The font size, in points.

FontBold

Make the text bolded.

FontItalic

Make the text appear in italics.

TextAlignment

The text alignment to use. Choose from:

Left

Left-align the object text.

Center

Center the object text.

Right

Right-align the object text.

ButtonAlignment

The button alignment to use. Choose from:

Left

Align the button to the left of the object text.

Right

Align the button to the right of the object text.

ReadOrder

The order the text will display when typed into the object. Choose from:

Standard

Display the text normally, from left to right.

Right to Left

If the shell language is Hebrew, Arabic, or another language that supports reading-order alignment, the text is displayed using right-to-left reading-order properties. For other languages, this style is ignored.

Colors

Normal

The text color used when the mouse is not over the object and the user is not clicking on it.

Tip: You can click the select button to bring up a color chooser. Clicking the "More Colors..." button on the color menu allows you to choose either a standard color/custom color, or use the eyedropper to pick a color from somewhere within the AutoPlay application window.

Highlight

The text color used while the mouse is held over the object.

Click

The text color used while the left mouse button is pressed down on the object.

Disabled

The text color for the disabled state. This color will persist until a CheckBox.SetEnabled action is called. While in the disabled state, the object will not respond to any mouse overs or clicks.

Attributes

TooltipText

A short string of text that will appear after the mouse hovers over this object for a moment.

Tip: You can choose from several tooltip styles for all tooltips in your project, Standard, Balloon and Extended. This setting can be found on the Appearance tab of the Project > Settings.

Tip: If you want a newline in your tooltip text, use "\r\n". For example, for an Extended tooltip, "My First Line\r\nMy Second Line|My Title". Newlines are not supported in the Title text for Balloon or Extended styles.

Tip: If you want a "&" character in the text, you must enter "&&&".

Enabled

Enable the object so it responds to user interaction. Choose from:

True

The object will respond to mouse overs and clicks and perform any actions assigned to it's events.

False

The object will not respond to any mouse overs or clicks and will not perform any actions until it is enabled.

Note: You can use the CheckBox.SetEnabled action to enable this object.

Visible

Set the object's initial visibility. Choose from:

True

The object will be visible when the page or dialog is displayed.

False

The object will be invisible when the page or dialog is displayed.

Note: You can use the CheckBox.SetVisible action to make the object visible or invisible at run time.

Cursor

The mouse pointer that will be used while the mouse is over this object.

Position

Left

The distance in pixels from the left edge of the object to the left edge of the page or dialog.

Tip: You can also change the position of an object by dragging it or using the arrow keys.

Top

The distance in pixels from the top edge of the object to the top edge of the page or dialog.

Width

The width of the object in pixels.

Tip: You can also resize an object by dragging one of the resize handles on its bounding box.

Height

The height of the object in pixels.

Auto-Resize

ResizeLeft

Whether the left side of the object will move when resized. Choose from:

True

The left side of the object will move when the application is resized.

False

Don't move the left side of the object when the application is resized.

ResizeRight

Whether the right side of the object will move when resized. Choose from:

True

The right side of the object will move when the application is resized.

False

Don't move the right side of the object when the application is resized.

ResizeTop

Whether the top of the object will move when resized. Choose from:

True

The top of the object will move when the application is resized.

False

Don't move the top of the object when the application is resized.

ResizeBottom

Whether the bottom of the object will move when resized. Choose from:

True

The bottom of the object will move when the application is resized.

False

Don't move the bottom of the object when the application is resized.

Sounds

HighlightSound

The sound that will be played when the mouse moves over this object. Choose from:

None

Don't play any sound.

Standard

Play the default mouse over sound, as configured on the Sound Effects tab of the Audio Settings dialog.

Custom

Play a custom mouse over sound.

HighlightFile

The custom audio file to play. Click the browse button to select an appropriate sound file.

ClickSound

The sound that will be played when the user clicks on this object. Choose from:

None

Don't play any sound.

Standard

Play the default mouse click sound, as configured on the Sound Effects tab of the Audio Settings dialog.

Custom

Play a custom mouse click sound.

ClickFile

The custom audio file to play. Click the browse button to select an appropriate sound file.

Actions

Quick Action

A quick action to perform when the object is clicked. Click the edit button to select a quick action.

On Click

The actions that will be performed when the user clicks on this object. Click the edit button to open the script editor.

On Right-Click

The actions that will be performed when the user right-clicks on this object. Click the edit button to open the script editor.

On Enter

The actions that will be performed when the mouse moves onto this object ("enters" the object's territory). Click the edit button to open the script editor.

On Leave

The actions that will be performed when the mouse moves off of this object ("leaves" the object's territory). Click the edit button to open the script editor.


CheckBox Object - Dialog

CheckBox Object

Overview Pane Dialog Actions

Here are the object's settings as they appear on the "double-click" Properties dialog.

There are four tabs on the Properties dialog:

Settings

Attributes

Quick Action

Script

Settings Tab

Object

Text:

The text that you want to display on the checkbox object.

Font...

The font that you want to use for the text. Click the select font button to open the Font dialog where you can edit all of the font settings.

Tip: You can set the default font for this object type by configuring its settings on the Objects tab in Edit > Preferences.

Spelling

Check the spelling of the object text.

Checked

Show the checkbox as checked. If unchecked, the checkbox will be shown unchecked.

Text Alignment

The text alignment to use. Choose from:

Left

Left-align the object text.

Center

Center the object text.

Right

Right-align the object text.

Button Alignment

The button alignment to use. Choose from:

Left

Align the button to the left of the object text.

Right

Align the button to the right of the object text.

Special

Read order:

The order the text will display when typed into the object. Choose from:

Standard

Display the text normally, from left to right.

Right to Left

If the shell language is Hebrew, Arabic, or another language that supports reading-order alignment, the text is displayed using right-to-left reading-order properties. For other languages, this style is ignored.

State Colors

Normal:

The text color used when the mouse is not over the object and the user is not clicking on it.

Tip: You can click the select button to bring up a color chooser. Clicking the "More Colors..." button on the color menu allows you to choose either a standard color/custom color, or use the eyedropper to pick a color from somewhere within the AutoPlay application window.

Disabled:

The text color for the disabled state. This color will persist until a CheckBox.SetEnabled action is called. While in the disabled state, the object will not respond to any mouse overs or clicks.

Highlight:

The text color used while the mouse is held over the object.

Click:

The text color used while the left mouse button is pressed down on the object.

Match Normal

Sets the Highlight and Click color to be the same as the Normal color.

Attributes Tab

Identification

Object name:

The name that is used to identify this object.

State

Enabled

Enable the object so it responds to user interaction. When an object is disabled, it will not respond to any mouse overs or clicks and will not perform any actions until it is enabled.

Note: You can use the CheckBox.SetEnabled action to enable this object.

Visible

Set the object's initial visibility (whether it's visible when the page or dialog is displayed).

Note: You can use the CheckBox.SetVisible action to make the object visible or invisible at run time.

Auto-Resize

Left

If checked, the left side of the object will move when the application is resized. If unchecked, the left side of the object will not move.

Right

If checked, the right side of the object will move when the application is resized. If unchecked, the right side of the object will not move.

Top

If checked, the top of the object will move when the application is resized. If unchecked, the top of the object will not move.

Bottom

If checked, the bottom of the object will move when the application is resized. If unchecked, the bottom of the object will not move.

Position

Left:

The distance in pixels from the left edge of the object to the left edge of the page or dialog.

Tip: You can also change the position of an object by dragging it or using the arrow keys.

Top:

The distance in pixels from the top edge of the object to the top edge of the page or dialog.

Width:

The width of the object in pixels.

Tip: You can also resize an object by dragging one of the resize handles on its bounding box.

Height:

The height of the object in pixels.

Restore Original

Set's the object's size back to the original values. (This feature is not available for the CheckBox object.)

Feedback

Tooltip:

A short string of text that will appear after the mouse hovers over this object for a moment.

Tip: You can choose from several tooltip styles for all tooltips in your project, Standard, Balloon and Extended. This setting can be found on the Appearance tab of the Project > Settings.

Tip: If you want a newline in your tooltip text, use "\r\n". For example, for an Extended tooltip, "My First Line\r\nMy Second Line|My Title". Newlines are not supported in the Title text for Balloon or Extended styles.

Tip: If you want a "&" character in the text, you must enter "&&&".

Spelling

Check the spelling of the tooltip text.

Cursor:

The mouse pointer that will be used while the mouse is over this object.

Sounds

Highlight:

The sound that will be played when the mouse moves over this object. Choose from:

None

Don't play any sound.

Standard

Play the default mouse click sound, as configured on the Sound Effects tab of the Audio Settings dialog.

Custom

Play a custom mouse over sound.

File:

The custom audio file to play. Click the browse button to select an appropriate sound file.

Click:

The sound that will be played when the user clicks on this object. Choose from:

None

Don't play any sound.

Standard

Play the default mouse click sound, as configured on the Sound Effects tab of the Audio Settings dialog.

Custom

Play a custom mouse click sound.

File:

The custom audio file to play. Click the browse button to select an appropriate sound file.

Quick Action Tab

You can use this tab to perform a simple action when the object is clicked.

When Object is Clicked

Action to run:

The action to perform when the object is clicked. Choose from:

ACTION | DESCRIPTION
None | Does nothing.
Show Page | Jumps to the specified page in your application. Click here for more information.
Show Dialog | Shows a specific dialog in your application. Click here for more information.
Close Dialog | Closes the currently displayed dialog. Click here for more information.
Run Program | Runs an application with optional command line arguments. Click here for more information.
Open Document | Opens a document in an external viewer. Click here for more information.
Print Document | Prints a document on the user's system. Click here for more information.
Send Email | Sends an email through the user's default email program. Click here for more information.
View Website | Opens a website in the user's default web browser. Click here for more information.
Explore Folder | Explores a folder on the user's system. Click here for more information.
Play Multimedia | Plays a multimedia file in the default player on the user's system. Click here for more information.
Play/Pause Background Music | Toggles the play state of the background music. Click here for more information.
Exit/Close | Exits from the AutoPlay application. Click here for more information.

Properties

Any additional settings corresponding to the selected quick action.

Script Tab

You can use the action editor on this tab to edit the script of actions that will be performed on each of this object's events.

This object supports the following events:

On Click

The actions that will be performed when the user clicks on this object. Click the edit button to open the script editor.

On Right-Click

The actions that will be performed when the user right-clicks this object.

On Enter

The actions that will be performed when the mouse moves onto this object ("enters" the object's territory). Click the edit button to open the script editor.

On Leave

The actions that will be performed when the mouse moves off of this object ("leaves" the object's territory). Click the edit button to open the script editor.


CheckBox Object - Actions

CheckBox Object

Overview Pane Dialog Actions

CheckBox.GetChecked

CheckBox.GetPos

CheckBox.GetProperties

CheckBox.GetSize

CheckBox.GetText

CheckBox.IsEnabled

CheckBox.IsVisible

CheckBox.SetChecked

CheckBox.SetEnabled

CheckBox.SetPos

CheckBox.SetProperties

CheckBox.SetSize

CheckBox.SetText

CheckBox.SetVisible


RadioButton Object - Overview

RadioButton Object

Overview Pane Dialog Actions

The radiobutton object allows you add the functionality of a Windows radio button to the page or dialog. The object contains many of the features native to the Windows radio button, and a few additional settings. Some of these settings include: group IDs, button values, checked states, multi-line text font and state colors, button and text alignment, and many more configurable attributes.

Tip: You can add a radiobutton object by choosing Object > RadioButton from the menu.


RadioButton Object - Pane

RadioButton Object

Overview Pane Dialog Actions

Here are the object's settings as they appear in the properties pane:

Object

Name

The name that is used to identify this object. You can retrieve this value when the radiobutton is selected using the Page.GetRadioValue action, or on dialogs, DialogEx.GetRadioValue. You can also select a radio button in a group by object name using the Page.SetRadioValue action, or on dialogs, DialogEx.SetRadioValue.

GroupID

The identifier of the radiobutton group you want this object to be a part of. You can select an existing group from the dropdown. By default, all newly created radiobuttons are part of a default group (no defined group ID ie. ""). When radiobutton objects contain the same group ID, they automatically work together. So when one radiobutton is selected, all others within that group are unselected.

Value

The associated data value you want to assign to the radiobutton. You can retrieve this value when the radiobutton is selected using the Page.GetRadioValue action, or on dialogs, DialogEx.GetRadioValue. You can also select a radio button in a group by value using the Page.SetRadioValue action, or on dialogs, DialogEx.SetRadioValue.

Checked

Whether to show the radiobutton as selected or unselected. Choose from:

True

Show the radiobutton as selected.

False

Show the radiobutton as unselected.

Text

The text that you want to display on the radiobutton object. Click the edit button to open the Edit Text dialog, where you can import, edit and spell check this object's text. You can retrieve this value when the radiobutton is selected using the Page.GetRadioValue action, or on dialogs, DialogEx.GetRadioValue. You can also select a radio button in a group by text using the Page.SetRadioValue action, or on dialogs, DialogEx.SetRadioValue.

Font

The font that you want to use for the text. Click the edit button to open the Font dialog where you can edit all of the font settings.

Tip: You can set the default font for this object type by configuring its settings on the Objects tab in Edit > Preferences.

FontFamily

The font family that you want to use.

FontSize

The font size, in points.

FontBold

Make the text bolded.

FontItalic

Make the text appear in italics.

TextAlignment

The text alignment to use. Choose from:

Left

Left-align the object text.

Center

Center the object text.

Right

Right-align the object text.

ButtonAlignment

The button alignment to use. Choose from:

Left

Align the button to the left of the object text.

Right

Align the button to the right of the object text.

ReadOrder

The order the text will display when typed into the object. Choose from:

Standard

Display the text normally, from left to right.

Right to Left

If the shell language is Hebrew, Arabic, or another language that supports reading-order alignment, the text is displayed using right-to-left reading-order properties. For other languages, this style is ignored.

Colors

Normal

The text color used when the mouse is not over the object and the user is not clicking on it.

Tip: You can click the select button to bring up a color chooser. Clicking the "More Colors..." button on the color menu allows you to choose either a standard color/custom color, or use the eyedropper to pick a color from somewhere within the AutoPlay application window.

Highlight

The text color used while the mouse is held over the object.

Click

The text color used while the left mouse button is pressed down on the object.

Disabled

The text color for the disabled state. This color will persist until a RadioButton.SetEnabled action is called. While in the disabled state, the object will not respond to any mouse overs or clicks.

Attributes

TooltipText

A short string of text that will appear after the mouse hovers over this object for a moment.

Tip: You can choose from several tooltip styles for all tooltips in your project, Standard, Balloon and Extended. This setting can be found on the Appearance tab of the Project > Settings.

Tip: If you want a newline in your tooltip text, use "\r\n". For example, for an Extended tooltip, "My First Line\r\nMy Second Line|My Title". Newlines are not supported in the Title text for Balloon or Extended styles.

Tip: If you want a "&" character in the text, you must enter "&&&".

Enabled

Enable the object so it responds to user interaction. Choose from:

True

The object will respond to mouse overs and clicks and perform any actions assigned to it's events.

False

The object will not respond to any mouse overs or clicks and will not perform any actions until it is enabled.

Note: You can use the RadioButton.SetEnabled action to enable this object.

Visible

Set the object's initial visibility. Choose from:

True

The object will be visible when the page or dialog is displayed.

False

The object will be invisible when the page or dialog is displayed.

Note: You can use the RadioButton.SetVisible action to make the object visible or invisible at run time.

Cursor

The mouse pointer that will be used while the mouse is over this object.

Position

Left

The distance in pixels from the left edge of the object to the left edge of the page or dialog.

Tip: You can also change the position of an object by dragging it or using the arrow keys.

Top

The distance in pixels from the top edge of the object to the top edge of the page or dialog.

Width

The width of the object in pixels.

Tip: You can also resize an object by dragging one of the resize handles on its bounding box.

Height

The height of the object in pixels.

Auto-Resize

ResizeLeft

Whether the left side of the object will move when resized. Choose from:

True

The left side of the object will move when the application is resized.

False

Don't move the left side of the object when the application is resized.

ResizeRight

Whether the right side of the object will move when resized. Choose from:

True

The right side of the object will move when the application is resized.

False

Don't move the right side of the object when the application is resized.

ResizeTop

Whether the top of the object will move when resized. Choose from:

True

The top of the object will move when the application is resized.

False

Don't move the top of the object when the application is resized.

ResizeBottom

Whether the bottom of the object will move when resized. Choose from:

True

The bottom of the object will move when the application is resized.

False

Don't move the bottom of the object when the application is resized.

Sounds

HighlightSound

The sound that will be played when the mouse moves over this object. Choose from:

None

Don't play any sound.

Standard

Play the default mouse over sound, as configured on the Sound Effects tab of the Audio Settings dialog.

Custom

Play a custom mouse over sound.

HighlightFile

The custom audio file to play. Click the browse button to select an appropriate sound file.

ClickSound

The sound that will be played when the user clicks on this object. Choose from:

None

Don't play any sound.

Standard

Play the default mouse click sound, as configured on the Sound Effects tab of the Audio Settings dialog.

Custom

Play a custom mouse click sound.

ClickFile

The custom audio file to play. Click the browse button to select an appropriate sound file.

Actions

Quick Action

A quick action to perform when the object is clicked. Click the edit button to select a quick action.

On Click

The actions that will be performed when the user clicks on this object. Click the edit button to open the script editor.

On Right-Click

The actions that will be performed when the user right-clicks on this object. Click the edit button to open the script editor.

On Enter

The actions that will be performed when the mouse moves onto this object ("enters" the object's territory). Click the edit button to open the script editor.

On Leave

The actions that will be performed when the mouse moves off of this object ("leaves" the object's territory). Click the edit button to open the script editor.


RadioButton Object - Dialog

RadioButton Object

Overview Pane Dialog Actions

Here are the object's settings as they appear on the "double-click" Properties dialog.

There are four tabs on the Properties dialog:

Settings

Attributes

Quick Action

Script

Settings Tab

Object

Group ID:

The identifier of the radiobutton group you want this object to be a part of. You can select an existing group from the dropdown. By default, all newly created radiobuttons are part of a default group (no defined group ID ie. ""). When radiobutton objects contain the same group ID, they automatically work together. So when one radiobutton is selected, all others within that group are unselected.

Value:

The associated data value you want to assign to the radiobutton. You can retrieve this value when the radiobutton is selected using the Page.GetRadioValue action, or on dialogs, DialogEx.GetRadioValue. You can also select a radio button in a group by value using the Page.SetRadioValue action, or on dialogs, DialogEx.SetRadioValue.

Checked

Show the radiobutton as selected. If unchecked, the radio button will be shown unselected.

Text:

The text that you want to display on the radiobutton object. You can retrieve this value when the radiobutton is selected using the Page.GetRadioValue action, or on dialogs, DialogEx.GetRadioValue. You can also select a radio button in a group by text using the Page.SetRadioValue action, or on dialogs, DialogEx.SetRadioValue.

Font...

The font that you want to use for the text. Click the select font button to open the Font dialog where you can edit all of the font settings.

Tip: You can set the default font for this object type by configuring its settings on the Objects tab in Edit > Preferences.

Spelling

Check the spelling of the object text.

Text Alignment

The text alignment to use. Choose from:

Left

Left-align the object text.

Center

Center the object text.

Right

Right-align the object text.

Button Alignment

The button alignment to use. Choose from:

Left

Align the button to the left of the object text.

Right

Align the button to the right of the object text.

Special

Read order:

The order the text will display when typed into the object. Choose from:

Standard

Display the text normally, from left to right.

Right to Left

If the shell language is Hebrew, Arabic, or another language that supports reading-order alignment, the text is displayed using right-to-left reading-order properties. For other languages, this style is ignored.

State Colors

Normal:

The text color used when the mouse is not over the object and the user is not clicking on it.

Tip: You can click the select button to bring up a color chooser. Clicking the "More Colors..." button on the color menu allows you to choose either a standard color/custom color, or use the eyedropper to pick a color from somewhere within the AutoPlay application window.

Disabled:

The text color for the disabled state. This color will persist until a RadioButton.SetEnabled action is called. While in the disabled state, the object will not respond to any mouse overs or clicks.

Highlight:

The text color used while the mouse is held over the object.

Click:

The text color used while the left mouse button is pressed down on the object.

Match Normal

Sets the Highlight and Click color to be the same as the Normal color.

Attributes Tab

Identification

Object name:

The name that is used to identify this object. You can retrieve this value when the radiobutton is selected using the Page.GetRadioValue action, or on dialogs, DialogEx.GetRadioValue. You can also select a radio button in a group by object name using the Page.SetRadioValue action, or on dialogs, DialogEx.SetRadioValue.

State

Enabled

Enable the object so it responds to user interaction. When an object is disabled, it will not respond to any mouse overs or clicks and will not perform any actions until it is enabled.

Note: You can use the RadioButton.SetEnabled action to enable this object.

Visible

Set the object's initial visibility (whether it's visible when the page or dialog is displayed).

Note: You can use the RadioButton.SetVisible action to make the object visible or invisible at run time.

Auto-Resize

Left

If checked, the left side of the object will move when the application is resized. If unchecked, the left side of the object will not move.

Right

If checked, the right side of the object will move when the application is resized. If unchecked, the right side of the object will not move.

Top

If checked, the top of the object will move when the application is resized. If unchecked, the top of the object will not move.

Bottom

If checked, the bottom of the object will move when the application is resized. If unchecked, the bottom of the object will not move.

Position

Left:

The distance in pixels from the left edge of the object to the left edge of the page or dialog.

Tip: You can also change the position of an object by dragging it or using the arrow keys.

Top:

The distance in pixels from the top edge of the object to the top edge of the page or dialog.

Width:

The width of the object in pixels.

Tip: You can also resize an object by dragging one of the resize handles on its bounding box.

Height:

The height of the object in pixels.

Restore Original

Set's the object's size back to the original values. (This feature is not available for the RadioButton object.)

Feedback

Tooltip:

A short string of text that will appear after the mouse hovers over this object for a moment.

Tip: You can choose from several tooltip styles for all tooltips in your project, Standard, Balloon and Extended. This setting can be found on the Appearance tab of the Project > Settings.

Tip: If you want a newline in your tooltip text, use "\r\n". For example, for an Extended tooltip, "My First Line\r\nMy Second Line|My Title". Newlines are not supported in the Title text for Balloon or Extended styles.

Tip: If you want a "&" character in the text, you must enter "&&&".

Spelling

Check the spelling of the tooltip text.

Cursor:

The mouse pointer that will be used while the mouse is over this object.

Sounds

Highlight:

The sound that will be played when the mouse moves over this object. Choose from:

None

Don't play any sound.

Standard

Play the default mouse click sound, as configured on the Sound Effects tab of the Audio Settings dialog.

Custom

Play a custom mouse over sound.

File:

The custom audio file to play. Click the browse button to select an appropriate sound file.

Click:

The sound that will be played when the user clicks on this object. Choose from:

None

Don't play any sound.

Standard

Play the default mouse click sound, as configured on the Sound Effects tab of the Audio Settings dialog.

Custom

Play a custom mouse click sound.

File:

The custom audio file to play. Click the browse button to select an appropriate sound file.

Quick Action Tab

You can use this tab to perform a simple action when the object is clicked.

When Object is Clicked

Action to run:

The action to perform when the object is clicked. Choose from:

ACTION | DESCRIPTION
None | Does nothing.
Show Page | Jumps to the specified page in your application. Click here for more information.
Show Dialog | Shows a specific dialog in your application. Click here for more information.
Close Dialog | Closes the currently displayed dialog. Click here for more information.
Run Program | Runs an application with optional command line arguments. Click here for more information.
Open Document | Opens a document in an external viewer. Click here for more information.
Print Document | Prints a document on the user's system. Click here for more information.
Send Email | Sends an email through the user's default email program. Click here for more information.
View Website | Opens a website in the user's default web browser. Click here for more information.
Explore Folder | Explores a folder on the user's system. Click here for more information.
Play Multimedia | Plays a multimedia file in the default player on the user's system. Click here for more information.
Play/Pause Background Music | Toggles the play state of the background music. Click here for more information.
Exit/Close | Exits from the AutoPlay application. Click here for more information.

Properties

Any additional settings corresponding to the selected quick action.

Script Tab

You can use the action editor on this tab to edit the script of actions that will be performed on each of this object's events.

This object supports the following events:

On Click

The actions that will be performed when the user clicks on this object. Click the edit button to open the script editor.

On Right-Click

The actions that will be performed when the user right-clicks this object.

On Enter

The actions that will be performed when the mouse moves onto this object ("enters" the object's territory). Click the edit button to open the script editor.

On Leave

The actions that will be performed when the mouse moves off of this object ("leaves" the object's territory). Click the edit button to open the script editor.


RadioButton Object - Actions

RadioButton Object

Overview Pane Dialog Actions

RadioButton.GetChecked

RadioButton.GetPos

RadioButton.GetProperties

RadioButton.GetSize

RadioButton.GetText

RadioButton.IsEnabled

RadioButton.IsVisible

RadioButton.SetChecked

RadioButton.SetEnabled

RadioButton.SetPos

RadioButton.SetProperties

RadioButton.SetSize

RadioButton.SetText

RadioButton.SetVisible

Additional radiobutton related actions:

DialogEx.GetRadioValue

DialogEx.SetRadioValue

Page.GetRadioValue

Page.SetRadioValue


Input Object - Overview

Input Object

Overview Pane Dialog Actions

The input object allows you to display a single or multi-line input field on the page or dialog so you can gather information from the user. The input object has three available modes: Standard, Password and Input Mask.

The Standard mode is used simply to display or gather input from the user.

The Password mode can be used to gather sensitive data from the user by displaying asterisks (****) for any text they type.

Note: The password feature is not available for the multi-line style.

The Input Mask mode is useful if you require the user's input to be in a specific format. Using an input mask you can control what the user enters and pre-format the user's response a bit with "guide" characters. This helps prevent errors by performing keystroke validation. A couple common examples are phone numbers and serial numbers.

The input object's visual properties can also be customized to suit your needs. Settings such as background color, font, borders, and scroll bars can all be customized to fit the design of your project.

For serious validation, the input object allows you to detect whenever focus in inside of the input field and whenever the user enters a keystroke. These features provide extended control over user input.

Note: Keyboard-friendly users can access input objects at run time by using the Tab and Shift+Tab keys to cycle through the tab order.

Tip: You can add an input object by choosing Object > Input from the menu.


Input Object - Pane

Input Object

Overview Pane Dialog Actions

Here are the object's settings as they appear in the properties pane:

Object

Name

The name that is used to identify this object.

Text

The text that you want to display in the input object.

Font

The font that you want to use for the text. Click the edit button to open the Font dialog where you can edit all of the font settings.

Tip: You can set the default font for this object type by configuring its settings on the Objects tab in Edit > Preferences.

FontFamily

The font family that you want to use.

FontSize

The font size, in points.

FontBold

Make the text bolded.

FontItalic

Make the text appear in italics.

TextColor

The color to display user input text.

Tip: You can click the select button to bring up a color chooser. Clicking the "More Colors..." button on the color menu allows you to choose either a standard color/custom color, or use the eyedropper to pick a color from somewhere within the AutoPlay application window.

Alignment

The alignment to use. Choose from:

Left

Left-align the text within the input object, like so:

This text is left-aligned

Center

Center the text within the input object, like so:

This text is centered

Right

Right-align the text within the input object, like so:

This text is right-aligned

Options

MultilineEnabled

True if this object will be multi-lined, false if it will not be.

VerticalScrollbar

Include a vertical scroll bar for the object. Choose from:

True

Include a vertical scroll bar.

False

Don't include a vertical scroll bar.

HorizontalScrollbar

Include a horizontal scroll bar for the object. Choose from:

True

Include a horizontal scroll bar.

False

Don't include a horizontal scroll bar.

InputStyle

The display style of the text in the input object. Choose from:

Standard

Display the input text normally.

Password

Hide any text that the user types by displaying asterisks (****).

Note: The password feature is not available for the Multi Line style.

Input Mask

Control the text the user inputs into the object.

InputMask

The input mask you want to use to control the data the user inputs into the object. Input masks let you pre-format the user's response a bit with "guide" characters, and help prevent errors by performing keystroke validation.

One of the sample input masks available is a telephone number. It appears in the list as (###) ###-####. The "#" character in the input mask is a special digit placeholder (0-9). For every # in the input mask, the user will only be able to enter a digit between 0 and 9. At runtime, the user will only be able to enter 10 numeric characters and will appear as a formatted telephone number such as (204) 946-0263.

You can also include alphabetic characters in an input mask. For example, one of the sample input masks is ?#? #?# used to represent a Canadian postal code. The "?" character in the input mask is a special alphabetic placeholder (a-Z). For every ? in the input mask, the user will only be able to enter a letter from a to Z. For example, R3B 0R3 is one valid postal code that the user could enter. The mask would prevent the user from entering two sequential alphabetic characters or numbers.

PlaceholderCharacter

Single character used as a placeholder for the input mask. This can be used as sample input until the user fills the input mask. For the telephone number input mask mentioned in the above example, you could include a sample digit as the placeholder such as 9. At runtime it would appear as (999) 999-9999 until the user replaced these digits with their own.

Note: This field accepts a single character only. If the Placeholder is set to '_' in the example above, at runtime it would appear as (___) ___-____. Likewise, if the placeholder is set to '?' at runtime it would appear as (???) ???-????.

InputMaskReturn

The input text to return. Choose from:

Formatted

Return only the text the user typed. This does not include any Input Mask characters.

As Typed

Return all text displayed in the input object. This includes any text displayed by the Input Mask.

Special

BorderMode

The border style to display around the input object. Choose from:

None

Don't display any border around the object.

Flat

Display a thin black border around the object.

Sunken

The object will have a "sunken" appearance on the page or dialog.

ReadOrder

The order the text will display when typed into the object. Choose from:

Standard

Display the text normally, from left to right.

Right to Left

If the shell language is Hebrew, Arabic, or another language that supports reading-order alignment, the text is displayed using right-to-left reading-order properties. For other languages, this style is ignored.

BackgroundColor

The background color to use for the object.

ReadOnly

Make the text in the object read-only so the user cannot type into it. Choose from:

True

Any text displayed in the object will be read-only. This means the user can copy the text, but cannot modify it.

False

Any text displayed in the object can be modified.

Attributes

TooltipText

A short string of text that will appear after the mouse hovers over this object for a moment.

Tip: You can choose from several tooltip styles for all tooltips in your project, Standard, Balloon and Extended. This setting can be found on the Appearance tab of the Project > Settings.

Tip: If you want a newline in your tooltip text, use "\r\n". For example, for an Extended tooltip, "My First Line\r\nMy Second Line|My Title". Newlines are not supported in the Title text for Balloon or Extended styles.

Tip: If you want a "&" character in the text, you must enter "&&&".

Enabled

Enable the object so it responds to user interaction. Choose from:

True

The object will respond to mouse overs and clicks and perform any actions assigned to its events.

False

The object will not respond to any mouse overs or clicks and will not perform any actions until it is enabled.

Note: You can use the Input.SetEnabled action to enable this object.

Visible

Set the object's initial visibility. Choose from:

True

The object will be visible when the page or dialog is displayed.

False

The object will be invisible when the page or dialog is displayed.

Note: You can use the Input.SetVisible action to make the object visible or invisible at run time.

Position

Left

The distance in pixels from the left edge of the object to the left edge of the page or dialog.

Tip: You can also change the position of an object by dragging it.

Top

The distance in pixels from the top edge of the object to the top edge of the page or dialog.

Width

The width of the object in pixels.

Tip: You can also resize an object by dragging one of the resize handles on its bounding box.

Height

The height of the object in pixels.

Auto-Resize

ResizeLeft

Whether the left side of the object will move when resized. Choose from:

True

The left side of the object will move when the application is resized.

False

Don't move the left side of the object when the application is resized.

ResizeRight

Whether the right side of the object will move when resized. Choose from:

True

The right side of the object will move when the application is resized.

False

Don't move the right side of the object when the application is resized.

ResizeTop

Whether the top of the object will move when resized. Choose from:

True

The top of the object will move when the application is resized.

False

Don't move the top of the object when the application is resized.

ResizeBottom

Whether the bottom of the object will move when resized. Choose from:

True

The bottom of the object will move when the application is resized.

False

Don't move the bottom of the object when the application is resized.

Actions

On Key

The actions that will be performed whenever the cursor is inside the input object and the user presses a key. Click the edit button to open the script editor.

On Focus

The actions that will be performed whenever the input object is given focus. For example, it will be given focus if the user clicks inside the object. Click the edit button to open the script editor.

On Char

The actions that will be performed whenever the cursor is inside the input object and receives the WM_CHAR windows message. This event will occur after the On Key event is fired, but will not necessarily be fired after each key stroke. This event is similar to the On Key event, except instead of being fired each time a key is pressed, On Char is fired when a keystroke (or a combination of keystrokes) translates to a character. Click the edit button to open the script editor.


Input Object - Dialog

Input Object

Overview Pane Dialog Actions

Here are the object's settings as they appear on the "double-click" Properties dialog.

There are three tabs on the Properties dialog:

Settings

Attributes

Script

Settings Tab

Object

Text:

The text that you want to display in the input object.

Font...

The font that you want to use for the text. Click the Select Font button to open the Font dialog where you can edit all of the font settings.

Tip: You can set the default font for this object type by configuring its settings on the Objects tab in Edit > Preferences.

Spelling

Check the spelling of the input text.

Multiline

Enabled

Enable multiple lines of input text in the object. If this option is disabled, the input box will be limited to one line of text.

Vertical scrollbar

Include a vertical scroll bar for the object.

Horizontal scrollbar

Include a horizontal scroll bar for the object.

Input Style

Standard

Display the input text normally.

Password

Hide any text that the user types by displaying asterisks (****).

Note: The password feature is not available for multi-line input objects (if multiline is enabled).

Input mask

Use an input mask to control input into the object. Click the Options... button to open the Input Mask Settings dialog where you can configure it's settings.

Special

Border mode:

The type of border to display around the input object. Choose from:

None

Don't display any border around the object.

Flat

Display a thin black border around the object.

Sunken

The object will have a "sunken" appearance on the page or dialog.

Read order:

The order the text will display when typed into the object. Choose from:

Standard

Display the text normally, from left to right.

Right to Left

If the shell language is Hebrew, Arabic, or another language that supports reading-order alignment, the text is displayed using right-to-left reading-order properties. For other languages, this style is ignored.

Read only

Make the text in the object read-only so the user cannot type into it. This means the user can copy the text, but cannot modify it.

Background:

The background color to use for the object. You can click the select button to bring up a color chooser.

Tip: Clicking the "More Colors..." button on the color menu allows you to choose either a standard color/custom color, or use the eyedropper to pick a color from somewhere within the AutoPlay application window.

Text:

The color to display user input text. You can click the select button to bring up a color chooser.

Alignment

The alignment to use. Choose from:

Left

Left-align the text within the input object, like so:

This text is left-aligned

Center

Center the text within the input object, like so:

This text is centered

Right

Right-align the text within the input object, like so:

This text is right-aligned

Attributes Tab

Identification

Object name:

The name that is used to identify this object.

State

Enabled

Enable the object so it responds to user interaction. When an object is disabled, it will not respond to any mouse overs or clicks and will not perform any actions until it is enabled.

Note: You can use the Input.SetEnabled action to enable this object.

Visible

Set the object's initial visibility (whether it's visible when the page or dialog is displayed).

Note: You can use the Input.SetVisible action to make the object visible or invisible at run time.

Auto-Resize

Left

If checked, the left side of the object will move when the application is resized. If unchecked, the left side of the object will not move.

Right

If checked, the right side of the object will move when the application is resized. If unchecked, the right side of the object will not move.

Top

If checked, the top of the object will move when the application is resized. If unchecked, the top of the object will not move.

Bottom

If checked, the bottom of the object will move when the application is resized. If unchecked, the bottom of the object will not move.

Position

Left:

The distance in pixels from the left edge of the object to the left edge of the page or dialog.

Tip: You can also change the position of an object by dragging it.

Top:

The distance in pixels from the top edge of the object to the top edge of the page or dialog.

Width:

The width of the object in pixels.

Tip: You can also resize an object by dragging one of the resize handles on its bounding box.

Height:

The height of the object in pixels.

Restore Original

Set's the object's size back to the original values.

Feedback

Tooltip:

A short string of text that will appear after the mouse hovers over this object for a moment.

Tip: You can choose from several tooltip styles for all tooltips in your project, Standard, Balloon and Extended. This setting can be found on the Appearance tab of the Project > Settings.

Tip: If you want a newline in your tooltip text, use "\r\n". For example, for an Extended tooltip, "My First Line\r\nMy Second Line|My Title". Newlines are not supported in the Title text for Balloon or Extended styles.

Tip: If you want a "&" character in the text, you must enter "&&&".

Spelling

Check the spelling of the tooltip text.

Cursor:

Note: This option is not available for input objects.

Script Tab

You can use the script editor on this tab to edit the script of actions that will be performed on each of this object's events.

This object supports the following events:

On Key

The actions that will be performed whenever the cursor is inside the input object and the user presses a key.

The following event variables are automatically set whenever this event is triggered:

e_Key

(number) The virtual key code of the key that was pressed.

e_Modifiers

(table) A table containing three boolean values that describe which modifier keys were held down while the key was pressed. A modifier key is a key that can be held down while another key is pressed, to "modify" it.

There are three true/false values in the table, one for each type of modifier key on the keyboard: shift, ctrl, and alt. You can access these values as e_Modifiers.shift, e_Modifiers.ctrl, and e_Modifiers.alt.

On Focus

The actions that will be performed whenever the input object is given focus. For example, it will be given focus if the user clicks inside the object.

On Char

The actions that will be performed whenever the cursor is inside the input object and receives the WM_CHAR windows message. This event will occur after the On Key event is fired, but will not necessarily be fired after each key stroke. This event is similar to the On Key event, except instead of being fired each time a key is pressed, On Char is fired when a keystroke (or a combination of keystrokes) translates to a character.

The following event variables are automatically set whenever this event is triggered:

e_Char

(number) The character code of the key that was pressed.

e_Modifiers

(table) A table containing three boolean values that describe which modifier keys were held down while the key was pressed. A modifier key is a key that can be held down while another key is pressed, to "modify" it.

There are three true/false values in the table, one for each type of modifier key on the keyboard: shift, ctrl, and alt. You can access these values as e_Modifiers.shift, e_Modifiers.ctrl, and e_Modifiers.alt.


Input Object - Actions

Input Object

Overview Pane Dialog Actions

Input.CanUndo

Input.Copy

Input.Cut

Input.Delete

Input.GetPos

Input.GetProperties

Input.GetSelection

Input.GetSize

Input.GetText

Input.IsEnabled

Input.IsVisible

Input.Paste

Input.ScrollLines

Input.ScrollToLine

Input.SetEnabled

Input.SetPos

Input.SetProperties

Input.SetSelection

Input.SetSize

Input.SetText

Input.SetVisible

Input.Undo


Combobox Object - Overview

ComboBox Object

Overview Pane Dialog Actions

When you want to present a list of options, but need to do it in a compact and efficient manner, the combobox object is your best choice. That's when you need to add the ComboBox object to your AutoPlay Media Studio projects!

The ComboBox object gives you the freedom to offer either a standard dropdown list or a "combo" of dropdown list plus a textual user input field, for those times when you don't want to restrict the user to only the list items.

You can control the look and feel of the object with properties such as font face, text color, size and background color. Features such as auto-sort and events for handling item selection and key presses round it all out. As you'd expect, there are ample actions included for adding, removing, inserting and updating the list items at runtime.

Note: Keyboard-friendly users can access combobox objects at run time by using the Tab and Shift+Tab keys to cycle through the tab order.

Tip: You can add a combobox object by choosing Object > ComboBox from the menu.


Combobox Object - Pane

ComboBox Object

Overview Pane Dialog Actions

Here are the object's settings as they appear in the properties pane:

Object

Name

The name that is used to identify this object.

Items

The items that are contained in the combobox. Click the edit button to open the ComboBox Contents dialog where you can create or modify your list.

The list consists of a number of items, each one with two parts: item text, which is the visible part that will appear in the combobox, and item data, which is an invisible part that is associated with that item. You can use the item data to store any information that you want to associate with the item text, such as a file path or page name.

Items can be added to the list by clicking on one of the fields and entering the desired text. You can manipulate the list using the buttons at the bottom of the dialog. The insert button can be used to insert an item into the list, essentially inserting a new "row." The remove, up, and down buttons allow you to remove or move items in the list. The ascending and descending buttons can be used to sort the list in ascending or descending order.

Options

Style

How the user will interact with the combobox object:

Dropdown List

Make the combobox selection read-only. (The selected text cannot be edited.)

Dropdown Edit

Make the combobox selection editable. (The selected text can be edited.)

Sort

Sort the combobox items alphabetically at runtime. If this option is unchecked, combobox items will be displayed in the order they appear at design time or added at runtime.

LinesToDisplay

The maximum number of lines to display in the combobox dropdown. The dropdown will only expand to the number of current entries up to this maximum. This value must be a number between 0 and 100 (inclusive).

Font

The font that you want to use for the text. Click the edit button to open the Font dialog where you can edit all of the font settings.

Tip: You can set the default font for this object type by configuring its settings on the Objects tab in Edit > Preferences.

FontFamily

The font family that you want to use.

FontSize

The font size, in points.

FontBold

Make the text bolded.

FontItalic

Make the text appear in italics.

BackgroundColor

The background color to use for the object.

TextColor

The text color to use for the combobox items.

Tip: You can click the select button to bring up a color chooser. Clicking the "More Colors..." button on the color menu allows you to choose either a standard color/custom color, or use the eyedropper to pick a color from somewhere within the AutoPlay application window.

ReadOrder

The order the text will display when typed into the object. Choose from:

Standard

Display the text normally, from left to right.

Right to Left

If the shell language is Hebrew, Arabic, or another language that supports reading-order alignment, the text is displayed using right-to-left reading-order properties. For other languages, this style is ignored.

Attributes

TooltipText

A short string of text that will appear after the mouse hovers over this object for a moment.

Tip: You can choose from several tooltip styles for all tooltips in your project, Standard, Balloon and Extended. This setting can be found on the Appearance tab of the Project > Settings.

Tip: If you want a newline in your tooltip text, use "\r\n". For example, for an Extended tooltip, "My First Line\r\nMy Second Line|My Title". Newlines are not supported in the Title text for Balloon or Extended styles.

Tip: If you want a "&" character in the text, you must enter "&&&".

Enabled

Enable the object so it responds to user interaction. Choose from:

True

The object will respond to mouse overs and clicks and perform any actions assigned to its events.

False

The object will not respond to any mouse overs or clicks and will not perform any actions until it is enabled.

Visible

Set the object's initial visibility. Choose from:

True

The object will be visible when the page or dialog is displayed.

False

The object will be invisible when the page or dialog is displayed.

Position

Left

The distance in pixels from the left edge of the object to the left edge of the page or dialog.

Tip: You can also change the position of an object by dragging it.

Top

The distance in pixels from the top edge of the object to the top edge of the page or dialog.

Width

The width of the object in pixels.

Tip: You can also resize an object by dragging one of the resize handles on its bounding box.

Height

The height of the object in pixels.

Note: The height of a combobox object is determined by the font size, and cannot be set explicitly.

Auto-Resize

ResizeLeft

Whether the left side of the object will move when resized. Choose from:

True

The left side of the object will move when the application is resized.

False

Don't move the left side of the object when the application is resized.

ResizeRight

Whether the right side of the object will move when resized. Choose from:

True

The right side of the object will move when the application is resized.

False

Don't move the right side of the object when the application is resized.

ResizeTop

Whether the top of the object will move when resized. Choose from:

True

The top of the object will move when the application is resized.

False

Don't move the top of the object when the application is resized.

ResizeBottom

Whether the bottom of the object will move when resized. Choose from:

True

The bottom of the object will move when the application is resized.

False

Don't move the bottom of the object when the application is resized.

Actions

On Select

Fires when the combobox selection changes. Click the edit button to open the script editor.

On Key

Fires whenever the combobox has focus and the user presses a key. Click the edit button to open the script editor.

On Focus

Fires when the combobox receives input focus. Click the edit button to open the script editor.


Combobox Object - Dialog

ComboBox Object

Overview Pane Dialog Actions

Here are the object's settings as they appear on the "double-click" Properties dialog.

There are three tabs on the Properties dialog:

Settings

Attributes

Script

Settings Tab

Object

ComboBox items:

The items that are contained in the combobox.

The list consists of a number of items, each one with two parts: item text, which is the visible part that will appear in the combobox, and item data, which is an invisible part that is associated with that item. You can use the item data to store any information that you want to associate with the item text, such as a file path or page name.

Items can be added to the list by clicking on one of the fields and entering the desired text. You can manipulate the list using the buttons at the bottom of the dialog. The Insert Row button can be used to insert an item into the list, essentially inserting a new "row." The remove, up, and down buttons allow you to remove or move items in the list. The ascending and descending buttons can be used to sort the list in ascending or descending order.

Style

Dropdown list

Make the combobox selection read-only. (The selected text cannot be edited.)

Dropdown edit

Make the combobox selection editable. (The selected text can be edited.)

Options

Sort

Sort the combobox items alphabetically at runtime. If this option is unchecked, combobox items will be displayed in the order they appear at design time or added at runtime.

Lines to display in dropdown

The maximum number of lines to display in the combobox dropdown. The dropdown will only expand to the number of current entries up to this maximum. This value must be a number between 0 and 100 (inclusive).

Font ...

The font that you want to use for the text. Click the Select Font button to open the Font dialog where you can edit all of the font settings.

Tip: You can set the default font for this object type by configuring its settings on the Objects tab in Edit > Preferences.

Special

Background:

The background color to use for the object.

Tip: You can click the select button to bring up a color chooser. Clicking the "More Colors..." button on the color menu allows you to choose either a standard color/custom color, or use the eyedropper to pick a color from somewhere within the AutoPlay application window.

Text:

The text color to use for the combobox items. You can click the select button to bring up a color chooser.

Read order:

The order the text will display when typed into the object. Choose from:

Standard

Display the text normally, from left to right.

Right to Left

If the shell language is Hebrew, Arabic, or another language that supports reading-order alignment, the text is displayed using right-to-left reading-order properties. For other languages, this style is ignored.

Attributes Tab

Identification

Object name:

The name that is used to identify this object.

State

Enabled

Enable the object so it responds to user interaction. When an object is disabled, it will not respond to any mouse overs or clicks and will not perform any actions until it is enabled.

Note: You can use the ComboBox.SetEnabled action to enable this object.

Visible

Set the object's initial visibility (whether it's visible when the page or dialog is displayed).

Note: You can use the ComboBox.SetVisible action to make the object visible or invisible at run time.

Auto-Resize

Left

If checked, the left side of the object will move when the application is resized. If unchecked, the left side of the object will not move.

Right

If checked, the right side of the object will move when the application is resized. If unchecked, the right side of the object will not move.

Top

If checked, the top of the object will move when the application is resized. If unchecked, the top of the object will not move.

Bottom

If checked, the bottom of the object will move when the application is resized. If unchecked, the bottom of the object will not move.

Position

Left:

The distance in pixels from the left edge of the object to the left edge of the page or dialog.

Tip: You can also change the position of an object by dragging it.

Top:

The distance in pixels from the top edge of the object to the top edge of the page or dialog.

Width:

The width of the object in pixels.

Tip: You can also resize an object by dragging one of the resize handles on its bounding box.

Height:

The height of the object in pixels.

Note: The height of a combobox object is determined by the font size, and cannot be set explicitly.

Restore Original

Set's the object's size back to the original values.

Feedback

Tooltip:

A short string of text that will appear after the mouse hovers over this object for a moment.

Tip: You can choose from several tooltip styles for all tooltips in your project, Standard, Balloon and Extended. This setting can be found on the Appearance tab of the Project > Settings.

Tip: If you want a newline in your tooltip text, use "\r\n". For example, for an Extended tooltip, "My First Line\r\nMy Second Line|My Title". Newlines are not supported in the Title text for Balloon or Extended styles.

Tip: If you want a "&" character in the text, you must enter "&&&".

Spelling

Check the spelling of the tooltip text.

Cursor:

Note: This option is not available for combobox objects.

Script Tab

You can use the script editor on this tab to edit the script of actions that will be performed on each of this object's events.

This object supports the following events:

On Select

Fires when the combobox selection changes. The following event variable is automatically set whenever this event is triggered:

e_Selection:

(number) The index of the comboxbox item that is being selected. (The first item in the list has an index of 1.)

On Key

Fires whenever the combobox has focus and the user presses a key. The following event variables are automatically set whenever this event is triggered:

e_Key:

(number) The ASCII code of the key that was pressed.

e_Modifiers:

(table) A table containing three boolean values that describe which modifier keys were held down while the key was pressed. A modifier key is a key that can be held down while another key is pressed, to "modify" it. There are three true/false values in the table, one for each type of modifier key on the keyboard: shift, ctrl, and alt. You can access these values as e_Modifiers.shift, e_Modifiers.ctrl, and e_Modifiers.alt.

On Focus

Fires when the combobox receives input focus.


Combobox Object - Actions

ComboBox Object

Overview Pane Dialog Actions

ComboBox.AddItem

ComboBox.DeleteItem

ComboBox.FindItem

ComboBox.GetCount

ComboBox.GetItemData

ComboBox.GetItemText

ComboBox.GetPos

Combobox.GetProperties

ComboBox.GetSelected

ComboBox.GetSize

ComboBox.GetText

ComboBox.InsertItem

ComboBox.IsEnabled

ComboBox.IsVisible

ComboBox.ResetContent

ComboBox.SetEnabled

ComboBox.SetItemData

ComboBox.SetItemText

ComboBox.SetPos

Combobox.SetProperties

ComboBox.SetSelected

ComboBox.SetSize

ComboBox.SetText

ComboBox.SetUpdate

ComboBox.SetVisible


Listbox Object - Overview

ListBox Object

Overview Pane Dialog Actions

The listbox object allows you to display a list of items on the page or dialog in a scrollable area. For example, you could display a list of song titles (so the user could choose a song to play), or a list of topics (so the user could decide what topic to view next).

Each list item consists of a single line of text, and an optional string of internal data that can be associated with the item. The item text is the visible part; it's what shows up in the list, and it's what the user will see as the item. The item data is an optional invisible part; it doesn't show up in the list, and is only visible when performing actions on the object. Using the listbox object's built-in features, the implementation of a document browser is made easy. For example, the item text could be the title of the document while it's associated item data could be the full path to the file to open. The listbox object can also be shown as a checklistbox, where each item in the list contains a checkbox.

The listbox object has an extensive action set so you can load and manipulate listbox items at run time for full flexibility.

The object also contains a series of visible properties that can be controlled. Some of these settings include color, font, scroll bars, border and tooltips.

Note: Keyboard-friendly users can access listbox objects at run time by using the Tab and Shift+Tab keys to cycle through the tab order.

Tip: You can add a listbox object by choosing Object > Listbox from the menu.


Listbox Object - Pane

ListBox Object

Overview Pane Dialog Actions

Here are the object's settings as they appear in the properties pane:

Object

Name

The name that is used to identify this object.

Items

The items that are contained in the listbox. Click the edit button to open the ListBox Contents dialog where you can create or modify your list.

A list consists of a number of items, each one with two parts: item text, which is the visible part that will appear in the listbox, and item data, which is an invisible part that is associated with that item. You can use the item data to store any information that you want to associate with the item text, such as a file path or page name. If the Type is set to CheckListBox, a checkbox is also shown where you can set its initial state.

Items can be added to the list by clicking on one of the fields and entering the desired text. You can manipulate the list using the buttons at the bottom of the dialog. The insert button can be used to insert an item into the list, essentially inserting a new "row." The remove, up, and down buttons allow you to remove or move items in the list. The ascending and descending buttons can be used to sort the list in ascending or descending order.

Options

Type

The type of listbox control to use. Choose from:

Tip: You can toggle many checkboxes at once by selecting multiple items and pressing the space bar.

ListBox

A "normal' list box type.

CheckListBox

Display a checkbox for each item in the list.

MultipleSelection

Enable multiple listbox items to be selected at one time. Choose from:

True

Multiple items can be selected in the object at one time.

False

Only one listbox item can be selected at one time.

Sort

Sort and display the listbox items alphabetically at runtime. Choose from:

True

Listbox items will be displayed in alphabetical order.

False

Listbox items will be displayed in the order they appear at design time.

VerticalScrollbar

Include a vertical scroll bar for the object. Choose from:

True

Include a vertical scroll bar.

False

Don't include a vertical scroll bar.

HorizontalScrollbar

Include a horizontal scroll bar for the object. Choose from:

True

Include a horizontal scroll bar.

False

Don't include a horizontal scroll bar.

Font

The font that you want to use for the text. Click the edit button to open the Font dialog where you can edit all of the font settings.

Tip: You can set the default font for this object type by configuring its settings on the Objects tab in Edit > Preferences.

FontFamily

The font family that you want to use.

FontSize

The font size, in points.

FontBold

Make the text bolded.

FontItalic

Make the text appear in italics.

BackgroundColor

The background color to use for the object.

TextColor

The text color to use for the listbox items.

Tip: You can click the select button to bring up a color chooser. Clicking the "More Colors..." button on the color menu allows you to choose either a standard color/custom color, or use the eyedropper to pick a color from somewhere within the AutoPlay application window.

BorderMode

The border style to display around the object. Choose from:

None

Don't display any border around the object.

Flat

Display a thin black border around the object.

Sunken

The object will have a "sunken" appearance on the page or dialog.

ReadOrder

The order the text will display when typed into the object. Choose from:

Standard

Display the text normally, from left to right.

Right to Left

If the shell language is Hebrew, Arabic, or another language that supports reading-order alignment, the text is displayed using right-to-left reading-order properties. For other languages, this style is ignored.

Attributes

TooltipText

A short string of text that will appear after the mouse hovers over this object for a moment.

Tip: You can choose from several tooltip styles for all tooltips in your project, Standard, Balloon and Extended. This setting can be found on the Appearance tab of the Project > Settings.

Tip: If you want a newline in your tooltip text, use "\r\n". For example, for an Extended tooltip, "My First Line\r\nMy Second Line|My Title". Newlines are not supported in the Title text for Balloon or Extended styles.

Tip: If you want a "&" character in the text, you must enter "&&&".

Enabled

Enable the object so it responds to user interaction. Choose from:

True

The object will respond to mouse overs and clicks and perform any actions assigned to its events.

False

The object will not respond to any mouse overs or clicks and will not perform any actions until it is enabled.

Note: You can use the ListBox.SetEnabled action to enable this object.

Visible

Set the object's initial visibility. Choose from:

True

The object will be visible when the page or dialog is displayed.

False

The object will be invisible when the page or dialog is displayed.

Note: You can use the ListBox.SetVisible action to make the object visible or invisible at run time.

Position

Left

The distance in pixels from the left edge of the object to the left edge of the page or dialog.

Tip: You can also change the position of an object by dragging it.

Top

The distance in pixels from the top edge of the object to the top edge of the page or dialog.

Width

The width of the object in pixels.

Tip: You can also resize an object by dragging one of the resize handles on its bounding box.

Height

The height of the object in pixels.

Auto-Resize

ResizeLeft

Whether the left side of the object will move when resized. Choose from:

True

The left side of the object will move when the application is resized.

False

Don't move the left side of the object when the application is resized.

ResizeRight

Whether the right side of the object will move when resized. Choose from:

True

The right side of the object will move when the application is resized.

False

Don't move the right side of the object when the application is resized.

ResizeTop

Whether the top of the object will move when resized. Choose from:

True

The top of the object will move when the application is resized.

False

Don't move the top of the object when the application is resized.

ResizeBottom

Whether the bottom of the object will move when resized. Choose from:

True

The bottom of the object will move when the application is resized.

False

Don't move the bottom of the object when the application is resized.

Actions

On Double-Click

The actions that will be performed when the user double-clicks an item in the listbox. Click the edit button to open the script editor.

On Select

The actions that will be performed when the user selects or deselects items in the listbox. Click the edit button to open the script editor.

On Key

The actions that will be performed whenever the listbox object has focus and the user presses a key. Click the edit button to open the script editor.

On Focus

The actions that will be performed whenever the listbox object is given focus. For example, it will be given focus if the user clicks inside the object. Click the edit button to open the script editor.

On Check

The actions that will be performed whenever an item is checked/unchecked in the listbox object. Click the edit button to open the script editor.

Note that clicking on an unselected checkbox in the list will trigger an On Select event before the On Check event is fired. This is the normal behaviour for checklist box controls in Windows. Specifically, clicking on a checkbox in the list toggles the check for all selected items. If the item is currently unselected, it is selected first, then the checkbox is toggled.

Note: If the item is already selected, there will be no On Select event first. Do not depend on there being an On Select every time you toggle a check box.


Listbox Object - Dialog

ListBox Object

Overview Pane Dialog Actions

Here are the object's settings as they appear on the "double-click" Properties dialog.

There are three tabs on the Properties dialog:

Settings

Attributes

Script

Settings Tab

Object

ListBox items:

The items that are contained in the listbox.

A list consists of a number of items, each one with two parts: item text, which is the visible part that will appear in the listbox, and item data, which is an invisible part that is associated with that item. You can use the item data to store any information that you want to associate with the item text, such as a file path or page name. If the Checklist box option is enabled a checkbox is also shown where you can set its initial state.

Items can be added to the list by clicking on one of the fields and entering the desired text. You can manipulate the list using the buttons at the bottom of the dialog. The Insert Row button can be used to insert an item into the list, essentially inserting a new "row." The remove, up, and down buttons allow you to remove or move items in the list. The ascending and descending buttons can be used to sort the list in ascending or descending order.

Options

Checklist box

Whether to display a checkbox for each item in the list control. (Switches between the "normal" list box type and the checklist box type.)

Tip: You can toggle many checkboxes at once by selecting multiple items and pressing the space bar.

Multiple selection

Enable multiple listbox items to be selected at one time.

Sort

Sort and display the listbox items alphabetically at runtime. If this option is unchecked, listbox items will be displayed in the order they appear at design time or added at run time.

Vertical scrollbar

Include a vertical scroll bar for the object.

Horizontal scrollbar

Include a horizontal scroll bar for the object.

Font...

The font that you want to use for the text. Click the Select Font button to open the Font dialog where you can edit all of the font settings.

Tip: You can set the default font for this object type by configuring its settings on the Objects tab in Edit > Preferences.

Special

Background:

The background color to use for the object. You can click the select button to bring up a color chooser.

Tip: Clicking the "More Colors..." button on the color menu allows you to choose either a standard color/custom color, or use the eyedropper to pick a color from somewhere within the AutoPlay application window.

Text:

The text color to use for the listbox items. You can click the select button to bring up a color chooser.

Border mode:

The style of border to display around the object.

None

Don't display any border around the object.

Flat

Display a thin black border around the object.

Sunken

The object will have a "sunken" appearance on the page or dialog.

Read order:

The order the text will display when typed into the object. Choose from:

Standard

Display the text normally, from left to right.

Right to Left

If the shell language is Hebrew, Arabic, or another language that supports reading-order alignment, the text is displayed using right-to-left reading-order properties. For other languages, this style is ignored.

Attributes Tab

Identification

Object name:

The name that is used to identify this object.

State

Enabled

Enable the object so it responds to user interaction. When an object is disabled, it will not respond to any mouse overs or clicks and will not perform any actions until it is enabled.

Note: You can use the ListBox.SetEnabled action to enable this object.

Visible

Set the object's initial visibility (whether it's visible when the page or dialog is displayed).

Note: You can use the ListBox.SetVisible action to make the object visible or invisible at run time.

Auto-Resize

Left

If checked, the left side of the object will move when the application is resized. If unchecked, the left side of the object will not move.

Right

If checked, the right side of the object will move when the application is resized. If unchecked, the right side of the object will not move.

Top

If checked, the top of the object will move when the application is resized. If unchecked, the top of the object will not move.

Bottom

If checked, the bottom of the object will move when the application is resized. If unchecked, the bottom of the object will not move.

Position

Left:

The distance in pixels from the left edge of the object to the left edge of the page or dialog.

Tip: You can also change the position of an object by dragging it.

Top:

The distance in pixels from the top edge of the object to the top edge of the page or dialog.

Width:

The width of the object in pixels.

Tip: You can also resize an object by dragging one of the resize handles on its bounding box.

Height:

The height of the object in pixels.

Restore Original

Set's the object's size back to the original values.

Feedback

Tooltip:

A short string of text that will appear after the mouse hovers over this object for a moment.

Tip: You can choose from several tooltip styles for all tooltips in your project, Standard, Balloon and Extended. This setting can be found on the Appearance tab of the Project > Settings.

Tip: If you want a newline in your tooltip text, use "\r\n". For example, for an Extended tooltip, "My First Line\r\nMy Second Line|My Title". Newlines are not supported in the Title text for Balloon or Extended styles.

Tip: If you want a "&" character in the text, you must enter "&&&".

Spelling

Check the spelling of the tooltip text.

Cursor:

Note: This option is not available for listbox objects.

Script Tab

You can use the script editor on this tab to edit the script of actions that will be performed on each of this object's events.

This object supports the following events:

On Double-click

The actions that will be performed when the user double-clicks an item in the listbox.

On Select

The actions that will be performed when the user selects or deselects items in the listbox.

On Key

The actions that will be performed whenever the listbox object has focus and the user presses a key.

The following event variables are automatically set whenever this event is triggered:

e_Key

(number) The virtual key code of the key that was pressed.

e_Modifiers

(table) A table containing three boolean values that describe which modifier keys were held down while the key was pressed. A modifier key is a key that can be held down while another key is pressed, to "modify" it.

There are three true/false values in the table, one for each type of modifier key on the keyboard: shift, ctrl, and alt. You can access these values as e_Modifiers.shift, e_Modifiers.ctrl, and e_Modifiers.alt.

On Focus

The actions that will be performed whenever the listbox object is given focus. For example, it will be given focus if the user clicks inside the object.

On Check

The actions that will be performed whenever an item is checked/unchecked in the listbox object.

Note that clicking on an unselected checkbox in the list will trigger an On Select event before the On Check event is fired. This is the normal behaviour for checklist box controls in Windows. Specifically, clicking on a checkbox in the list toggles the check for all selected items. If the item is currently unselected, it is selected first, then the checkbox is toggled.

Note: If the item is already selected, there will be no On Select event first. Do not depend on there being an On Select every time you toggle a check box.


Listbox Object - Actions

ListBox Object

Overview Pane Dialog Actions

ListBox.AddItem

ListBox.DeleteItem

ListBox.DeselectItem

ListBox.FindItem

ListBox.GetChecked

ListBox.GetCheckedCount

ListBox.GetCount

ListBox.GetItemCheck

ListBox.GetItemData

ListBox.GetItemText

ListBox.GetPos

ListBox.GetProperties

ListBox.GetSelected

ListBox.GetSelectedCount

ListBox.GetSize

ListBox.GetType

ListBox.InsertItem

ListBox.IsEnabled

ListBox.IsItemSelected

ListBox.IsVisible

ListBox.SelectItem

ListBox.SetEnabled

ListBox.SetItemCheck

ListBox.SetItemData

ListBox.SetItemText

ListBox.SetPos

ListBox.SetProperties

ListBox.SetSize

ListBox.SetType

ListBox.SetUpdate

ListBox.SetVisible


Tree Object - Overview

Tree Object

Overview Pane Dialog Actions

The tree object allows you to display a hierarchal list of items on the page or dialog in the well known 'tree' format. Items can have checkboxes associated with them, or simply be selectable. There are a variety of powerful options making this object extremely robust.

Each item in the tree can hold child elements. Any parent item can be forced to be expanded at runtime by default. You have full control over what the user sees with this object, and how they can interact with it. A plethora of events are included to make this object fully functional. Each item consists of a single line of text, and an optional string of internal data that can be associated with the item. The item text is the visible part; it's what shows up in the tree, and it's what the user will see as the item. The item data is an optional invisible part; it doesn't show up in the list, and is only visible when performing actions on the object.

The tree object has an extensive action set so you can load and manipulate tree items at run time for full flexibility.

The object also contains a series of visible properties that can be controlled. Some of these settings include whether checkboxes will be shown, whether or not the user can edit the items within the tree, and what images (if any) are shown next to each item when the item is either selected or not selected.

Tip: You can add a tree object by choosing Object > Tree from the menu.


Tree Object - Pane

Tree Object

Overview Pane Dialog Actions

Here are the object's settings as they appear in the properties pane:

Object

Name

The name that is used to identify this object.

Items

The items that are contained in the tree. Click the edit button to open the Tree Items dialog where you can create or modify your list.

A tree consists of a number of items, each one with two parts: item text, which is the visible part that will appear in the tree, and item data, which is an invisible part that is associated with that item. You can use the item data to store any information that you want to associate with the item text, such as a file path or page name.

Items can be added to the tree by clicking add button and entering the desired text. You can manipulate structure of the tree using the buttons at the bottom of the dialog.

Options

Checkboxes

Show checkboxes next to each item in the tree.

HasLines

Include lines linking the items in the tree.

LinesAtRoot

Includes lines at the root level of the tree linking sub items.

HasButtons

Include expand/collapse buttons by each item with child elements.

EditLabels

Allow the items in the tree to be edited or renamed, similar to how files and folders are renamed in windows.

AlwaysShowSelection

Causes a selected item to remain selected when the tree-view control loses focus.

Font

The font that you want to use for the text.

Tip: You can set the default font for this object type by configuring its settings on the Objects tab in Edit > Preferences.

FontFamily

The font family that you want to use.

FontSize

The font size, in points.

FontBold

Make the text bolded.

FontItalic

Make the text appear in italics.

BackgroundColor

The background color to use for the object. You can click the select button to bring up a color chooser.

Tip: Clicking the "More Colors..." button on the color menu allows you to choose either a standard color/custom color, or use the eyedropper to pick a color from somewhere within the AutoPlay application window.

TextColor

The text color to use for the items in this object. You can click the select button to bring up a color chooser.

BorderMode

The style of border to display around the object.

None

Don't display any border around the object.

Flat

Display a thin black border around the object.

Sunken

The object will have a "sunken" appearance on the page or dialog.

ReadOrder

The order the text will display when typed into the object. Choose from:

Standard

Display the text normally, from left to right.

Right to Left

If the shell language is Hebrew, Arabic, or another language that supports reading-order alignment, the text is displayed using right-to-left reading-order properties. For other languages, this style is ignored.

UseImageList

True if the specified image list file should be used in the tree object, false if it should not be.

ImageList

A bitmap image (maximum 32bit supported) that contains 16x16 icons to be used by the Tree object as icons for each tree item.

Note: The image used as the image list must be a bitmap image (.bmp).

The following example illustrates a proper image list:

The picture above includes three 16x16 icons. The orange icon (left-most) has an index of 0. The purple icon (middle) has an index of 1. The circle icon (right-most) has an index of 2.

Note: To specify which icon each tree item will display, specify the Image index in each item's properties.

ImageListTransparentColor

The color that will be transparent in the image list. Click the select button to bring up a color chooser. The color that you click on will be used to represent transparency in the image list.

Tip: Clicking the "More Colors..." button on the color menu allows you to choose either a standard color/custom color, or use the eyedropper to pick a color from somewhere within the AutoPlay application window.

Attributes

TooltipText

A short string of text that will appear after the mouse hovers over this object for a moment.

Tip: You can choose from several tooltip styles for all tooltips in your project, Standard, Balloon and Extended. This setting can be found on the Appearance tab of the Project > Settings.

Tip: If you want a newline in your tooltip text, use "\r\n". For example, for an Extended tooltip, "My First Line\r\nMy Second Line|My Title". Newlines are not supported in the Title text for Balloon or Extended styles.

Tip: If you want a "&" character in the text, you must enter "&&&".

Enabled

Enable the object so it responds to user interaction. Choose from:

True

The object will respond to mouse overs and clicks and perform any actions assigned to its events.

False

The object will not respond to any mouse overs or clicks and will not perform any actions until it is enabled.

Note: You can use the Tree.SetEnabled action to enable this object.

Visible

Set the object's initial visibility. Choose from:

True

The object will be visible when the page or dialog is displayed.

False

The object will be invisible when the page or dialog is displayed.

Note: You can use the Tree.SetVisible action to make the object visible or invisible at run time.

Position

Left

The distance in pixels from the left edge of the object to the left edge of the page or dialog.

Tip: You can also change the position of an object by dragging it.

Top

The distance in pixels from the top edge of the object to the top edge of the page or dialog.

Width

The width of the object in pixels.

Tip: You can also resize an object by dragging one of the resize handles on its bounding box.

Height

The height of the object in pixels.

Auto-Resize

ResizeLeft

Whether the left side of the object will move when resized. Choose from:

True

The left side of the object will move when the application is resized.

False

Don't move the left side of the object when the application is resized.

ResizeRight

Whether the right side of the object will move when resized. Choose from:

True

The right side of the object will move when the application is resized.

False

Don't move the right side of the object when the application is resized.

ResizeTop

Whether the top of the object will move when resized. Choose from:

True

The top of the object will move when the application is resized.

False

Don't move the top of the object when the application is resized.

ResizeBottom

Whether the bottom of the object will move when resized. Choose from:

True

The bottom of the object will move when the application is resized.

False

Don't move the bottom of the object when the application is resized.

Actions

On Select

The actions that will be performed when the user selects or deselects items in the tree. Click the edit button to open the action editor.

On Double-Click

The actions that will be performed when the user double-clicks an item in the tree. Click the edit button to open the script editor.

On Key

The actions that will be performed whenever the tree object has focus and the user presses a key. Click the edit button to open the action editor.

On Focus

The actions that will be performed whenever the tree object is given focus. For example, it will be given focus if the user clicks inside the object. Click the edit button to open the script editor.

On EditLabel

The actions that will be performed whenever an item's label is changed in the tree object. Click the edit button to open the action editor.

On Check

The actions that will be performed whenever an item is checked/unchecked in the tree object. Click the edit button to open the action editor.

On Expanded

The actions that will be performed whenever an item is expanded/collapsed in the tree object. Click the edit button to open the action editor.


Tree Object - Dialog

Tree Object

Overview Pane Dialog Actions

Here are the object's settings as they appear on the "double-click" Properties dialog.

There are three tabs on the Properties dialog:

Settings

Attributes

Script

Settings Tab

Object

Tree items

The items that are contained in the tree.

A tree consists of a number of items, each one with two parts: item text, which is the visible part that will appear in the tree, and item data, which is an invisible part that is associated with that item. You can use the item data to store any information that you want to associate with the item text, such as a file path or page name.

Items can be added to the tree by clicking add button and entering the desired text. You can manipulate structure of the tree using the buttons at the bottom of the dialog.

Properties

Opens the Tree Item dialog, allowing you to edit the properties of the currently selected tree item.

Options

Show checkboxes

Show checkboxes next to each item in the tree.

Has lines

Include lines linking the items in the tree.

Lines at root

Includes lines at the root level of the tree linking sub items.

Has buttons

Include expand/collapse buttons by each item with child elements.

Edit labels

Allow the items in the tree to be edited or renamed, similar to how files and folders are renamed in windows.

Always show selection

Causes a selected item to remain selected when the tree-view control loses focus.

Font...

The font that you want to use for the text. Click the Select Font button to open the Font dialog where you can edit all of the font settings.

Tip: You can set the default font for this object type by configuring its settings on the Objects tab in Edit > Preferences.

Special

Background:

The background color to use for the object. You can click the select button to bring up a color chooser.

Tip: Clicking the "More Colors..." button on the color menu allows you to choose either a standard color/custom color, or use the eyedropper to pick a color from somewhere within the AutoPlay application window.

Text:

The text color to use for the items in this object. You can click the select button to bring up a color chooser.

Border mode:

The style of border to display around the object.

None

Don't display any border around the object.

Flat

Display a thin black border around the object.

Sunken

The object will have a "sunken" appearance on the page or dialog.

Read order:

The order the text will display when typed into the object. Choose from:

Standard

Display the text normally, from left to right.

Right to Left

If the shell language is Hebrew, Arabic, or another language that supports reading-order alignment, the text is displayed using right-to-left reading-order properties. For other languages, this style is ignored.

Image List

Use image list

If checked, the specified image list file will be used in the tree object. If unchecked, no image list file will be used.

Image list

A bitmap image (maximum 32bit supported) that contains 16x16 icons to be used by the Tree object as icons for each tree item.

Note: The image used as the image list must be a bitmap image (.bmp).

The following example illustrates a proper image list:

The picture above includes three 16x16 icons. The orange icon (left-most) has an index of 0. The purple icon (middle) has an index of 1. The circle icon (right-most) has an index of 2.

Note: To specify which icon each tree item will display, specify the Image index in each item's properties.

Transparent color:

The color that will be transparent in the image list. Click the select button to bring up a color chooser. The color that you click on will be used to represent transparency in the image list.

Tip: Clicking the "More Colors..." button on the color menu allows you to choose either a standard color/custom color, or use the eyedropper to pick a color from somewhere within the AutoPlay application window.

Attributes Tab

Identification

Object name:

The name that is used to identify this object.

State

Enabled

Enable the object so it responds to user interaction. When an object is disabled, it will not respond to any mouse overs or clicks and will not perform any actions until it is enabled.

Note: You can use the Tree.SetEnabled action to enable this object.

Visible

Set the object's initial visibility (whether it's visible when the page or dialog is displayed).

Note: You can use the Tree.SetVisible action to make the object visible or invisible at run time.

Auto-Resize

Left

If checked, the left side of the object will move when the application is resized. If unchecked, the left side of the object will not move.

Right

If checked, the right side of the object will move when the application is resized. If unchecked, the right side of the object will not move.

Top

If checked, the top of the object will move when the application is resized. If unchecked, the top of the object will not move.

Bottom

If checked, the bottom of the object will move when the application is resized. If unchecked, the bottom of the object will not move.

Position

Left:

The distance in pixels from the left edge of the object to the left edge of the page or dialog.

Tip: You can also change the position of an object by dragging it.

Top:

The distance in pixels from the top edge of the object to the top edge of the page or dialog.

Width:

The width of the object in pixels.

Tip: You can also resize an object by dragging one of the resize handles on its bounding box.

Height:

The height of the object in pixels.

Restore Original

Set's the object's size back to the original values.

Feedback

Tooltip:

A short string of text that will appear after the mouse hovers over this object for a moment.

Tip: You can choose from several tooltip styles for all tooltips in your project, Standard, Balloon and Extended. This setting can be found on the Appearance tab of the Project > Settings.

Tip: If you want a newline in your tooltip text, use "\r\n". For example, for an Extended tooltip, "My First Line\r\nMy Second Line|My Title". Newlines are not supported in the Title text for Balloon or Extended styles.

Tip: If you want a "&" character in the text, you must enter "&&&".

Spelling

Check the spelling of the tooltip text.

Cursor:

Note: This option is not available for tree objects.

Script Tab

You can use the script editor on this tab to edit the script of actions that will be performed on each of this object's events.

This object supports the following events:

On Select

The actions that will be performed when the user selects or deselects items in the tree.

The following event variables are automatically set whenever this event is triggered:

e_NodeIndex

(string) The index of the selected node.

On Double-click

The actions that will be performed when the user double-clicks an item in the tree.

The following event variables are automatically set whenever this event is triggered:

e_NodeIndex

(string) The index of the node that was double-clicked.

On Key

The actions that will be performed whenever the tree object has focus and the user presses a key.

The following event variables are automatically set whenever this event is triggered:

e_Key

(number) The virtual key code of the key that was pressed.

e_Modifiers

(table) A table containing three boolean values that describe which modifier keys were held down while the key was pressed. A modifier key is a key that can be held down while another key is pressed, to "modify" it.

There are three true/false values in the table, one for each type of modifier key on the keyboard: shift, ctrl, and alt. You can access these values as e_Modifiers.shift, e_Modifiers.ctrl, and e_Modifiers.alt.

On Focus

The actions that will be performed whenever the tree object is given focus. For example, it will be given focus if the user clicks inside the object.

On EditLabel

The actions that will be performed whenever an item's label is changed in the tree object.

The following event variables are automatically set whenever this event is triggered:

e_NodeIndex

(string) The index of the node being edited.

e_NewText

(string) The text that has just been set.

e_OldText

(string) The text that existed previously before the user edited the current node.

On Check

The actions that will be performed whenever an item is checked/unchecked in the tree object.

e_NodeIndex

(string) The index of the node being checked/unchecked.

e_Checked

(boolean) True if the node has been checked, false if it has been unchecked.

On Expanded

The actions that will be performed whenever an item is expanded/collapsed in the tree object.

e_NodeIndex

(string) The index of the node being expanded/collapsed.

e_Expanded

(boolean) True if the node has been expanded, false if it has been collapsed.


Tree Object - Actions

Tree Object

Overview Pane Dialog Actions

Tree.CollapseNode

Tree.EnsureVisible

Tree.ExpandNode

Tree.FindNodeByData

Tree.FindNodeByText

Tree.GetChildCount

Tree.GetChildren

Tree.GetNode

Tree.GetPos

Tree.GetProperties

Tree.GetSelectedNode

Tree.GetSize

Tree.InsertNode

Tree.IsEnabled

Tree.IsVisible

Tree.RemoveNode

Tree.SetEnabled

Tree.SetNode

Tree.SetPos

Tree.SetProperties

Tree.SetSelectedNode

Tree.SetSize

Tree.SetVisible


Grid Object - Overview

Grid Object

Overview Pane Dialog Actions

The grid object allows you to add spreadsheets, grids and list controls to your applications. While there are some settings you can configure at design time, most of its settings including the loading of its data are handled through actions at runtime. Even though you can handle the configuration of data on a per item basis, you can also use the Grid.LoadFromFile action to load items from a character delimited file, and even save out any changes made through the object using the Grid.SaveToFile action.

The grid object has an extensive action set including over 110 actions and 2 events so you can load and manipulate grid cells at run time for full flexibility.

The object also contains a series of visible properties that can be controlled. Some of these settings include color, font, and tooltips.

Tip: You can add a grid object by choosing Object > Grid from the menu.


Grid Object - Pane

Grid Object

Overview Pane Dialog Actions

Here are the object's settings as they appear in the properties pane:

Object

Name

The name that is used to identify this object.

Rows

The number of rows initially in the grid object.

Columns

The number of columns initially in the grid object.

FixedRows

The number of fixed rows initially in the grid object.

FixedColumns

The number of fixed columns initially in the grid object.

CSV File

File

The Comma Separated Value (csv) file that you want to display in the grid object at runtime. Click the Browse button to select a file.

FitMethod

Whether the rows and columns displayed will be determined by the CSV file. Choose from:

CSV File

Make the number of rows and columns displayed in the grid object at runtime determined by the contents of the CSV file.

Design-time Settings

Don't change the number of rows and columns displayed in the grid object at runtime based on the contents of the CSV file. Whatever is defined in the object's settings at design-time, or via actions, will control the number of rows and columns.

Options

Editable

Whether the grid object is editable by the user. Choose from:

True

Make the grid object editable by the user.

False

Don't allow the user to edit the grid object.

Selectable

Whether the user can select grid cells with the mouse or keyboard. Choose from:

True

Allow the user to select grid cells with the mouse or keyboard.

False

Don't allow the user to select grid cells.

CellDragAndDrop

Whether cells can be dragged and dropped by the user. Choose from:

True

Allow the user to drag and drop cells.

False

Don't allow the user to drag and drop cells.

ResizableRows

Whether rows can be resized by the user. Choose from:

True

Allow the user to resize rows.

False

Don't allow the user to resize rows.

ResizableColumns

Whether columns can be resized by the user. Choose from:

True

Allow the user to resize columns.

False

Don't allow the user to resize columns.

GridLines

Which grid lines to display in the grid object. Choose from:

None

Don't show any grid lines.

Horizontal

Show horizontal grid lines.

Vertical

Show vertical grid lines.

Both

Show both horizontal and vertical grid lines.

Font

The font that you want to use for the text. Click the edit button to open the Font dialog where you can edit all of the font settings.

Tip: You can set the default font for this object type by configuring its settings on the Objects tab in Edit > Preferences.

FontFamily

The font family that you want to use.

FontSize

The font size, in points.

FontBold

Make the text bolded.

FontItalic

Make the text appear in italics.

Colors

CustomColors

Whether to use custom colors for items in the grid object when initially created, or to use the default colors according to the user's Windows color scheme.

Note: This setting only affects its initial creation; all of these values can be changed at runtime using actions.

True

Use custom colors for the grid object when initially created.

False

Use the default colors according to the user's Windows color scheme.

TextColor

The text color to use in the object.

Tip: You can click the select button to bring up a color chooser. Clicking the "More Colors..." button on the color menu allows you to choose either a standard color/custom color, or use the eyedropper to pick a color from somewhere within the AutoPlay application window.

TextBkColor

The text background color to use in the object.

Tip: You can click the select button to bring up a color chooser.

FixedTextColor

The fixed text color to use in the object.

Tip: You can click the select button to bring up a color chooser.

FixedBkColor

The fixed background color to use in the object.

Tip: You can click the select button to bring up a color chooser.

GridLineColor

The line color to use in the object.

Tip: You can click the select button to bring up a color chooser.

GridBkColor

The grid background color to use in the object.

Tip: You can click the select button to bring up a color chooser.

ToolTipBackColor

The tooltip background color to use in the object.

Tip: You can click the select button to bring up a color chooser.

Note: The tooltip background and tooltip text colors are used for cell tooltips that are displayed within the grid object itself. They are not used to control the color of the tooltip set on the Object's Attributes tab.

ToolTipTextColor

The tooltip text color to use in the object.

Tip: You can click the select button to bring up a color chooser.

Note: The tooltip background and tooltip text colors are used for cell tooltips that are displayed within the grid object itself. They are not used to control the color of the tooltip set on the Object's Attributes tab.

Attributes

TooltipText

A short string of text that will appear after the mouse hovers over this object for a moment.

Tip: You can choose from several tooltip styles for all tooltips in your project, Standard, Balloon and Extended. This setting can be found on the Appearance tab of the Project > Settings.

Tip: If you want a newline in your tooltip text, use "\r\n". For example, for an Extended tooltip, "My First Line\r\nMy Second Line|My Title". Newlines are not supported in the Title text for Balloon or Extended styles.

Tip: If you want a "&" character in the text, you must enter "&&&".

Enabled

Enable the object so it responds to user interaction. Choose from:

True

The object will respond to mouse overs and clicks and perform any actions assigned to its events.

False

The object will not respond to any mouse overs or clicks and will not perform any actions until it is enabled.

Note: You can use the Grid.SetEnabled action to enable this object.

Visible

Set the object's initial visibility. Choose from:

True

The object will be visible when the page or dialog is displayed.

False

The object will be invisible when the page or dialog is displayed.

Note: You can use the Grid.SetVisible action to make the object visible or invisible at run time.

Position

Left

The distance in pixels from the left edge of the object to the left edge of the page or dialog.

Tip: You can also change the position of an object by dragging it.

Top

The distance in pixels from the top edge of the object to the top edge of the page or dialog.

Width

The width of the object in pixels.

Tip: You can also resize an object by dragging one of the resize handles on its bounding box.

Height

The height of the object in pixels.

Auto-Resize

ResizeLeft

Whether the left side of the object will move when resized. Choose from:

True

The left side of the object will move when the application is resized.

False

Don't move the left side of the object when the application is resized.

ResizeRight

Whether the right side of the object will move when resized. Choose from:

True

The right side of the object will move when the application is resized.

False

Don't move the right side of the object when the application is resized.

ResizeTop

Whether the top of the object will move when resized. Choose from:

True

The top of the object will move when the application is resized.

False

Don't move the top of the object when the application is resized.

ResizeBottom

Whether the bottom of the object will move when resized. Choose from:

True

The bottom of the object will move when the application is resized.

False

Don't move the bottom of the object when the application is resized.

Actions

On Cell Changed

The actions that will be performed whenever the text of a cell changes for any reason. This may result from the user editing cell text or from text being pasted in or even from the text changing in response to an action such as Grid.SetCellText. Click the edit button to open the script editor.

On Selection Changed

The actions that will be performed whenever the selection of cells in the grid changes. Click the edit button to open the script editor.


Grid Object - Dialog

Grid Object

Overview Pane Dialog Actions

Here are the object's settings as they appear on the "double-click" Properties dialog.

There are three tabs on the Properties dialog:

Settings

Attributes

Script

Settings Tab

Grid

Rows:

The number of rows initially in the grid object.

Columns:

The number of columns initially in the grid object.

Fixed rows:

The number of fixed rows initially in the grid object.

Fixed columns:

The number of fixed columns initially in the grid object.

Options

Editable

Make the grid object editable by the user.

Selectable

Allow the user to select grid cells with the mouse or keyboard.

Cell drag and drop

Allow cells to be dragged and dropped by the user.

Font...

The font that you want to use for the text. Click the Select Font button to open the Font dialog where you can edit all of the font settings.

Tip: You can set the default font for this object type by configuring its settings on the Objects tab in Edit > Preferences.

Resizable rows

Allow rows to be resized by the user.

Resizable columns

Allow columns to be resized by the user.

Grid lines:

Which grid lines to display in the grid object.

None

Don't show any grid lines.

Horizontal

Show horizontal grid lines.

Vertical

Show vertical grid lines.

Both

Show both horizontal and vertical grid lines.

Colors

Custom colors

Use custom colors for items in the grid object when initially created. If unchecked, the colors will be set to the default colors according to the user's Windows color scheme. This setting only affects its initial creation; all of these values can be changed at runtime using actions.

Tip: Clicking the "More Colors..." button on the color menu allows you to choose either a standard color/custom color, or use the eyedropper to pick a color from somewhere within the AutoPlay application window.

Text background:

The text background color to use in the object. You can click the select button to bring up a color chooser.

Text:

The text color to use in the object. You can click the select button to bring up a color chooser.

Fixed background:

The fixed background color to use in the object. You can click the select button to bring up a color chooser.

Fixed text:

The fixed text color to use in the object. You can click the select button to bring up a color chooser.

Grid background:

The grid background color to use in the object. You can click the select button to bring up a color chooser.

Lines:

The line color to use in the object. You can click the select button to bring up a color chooser.

Tooltip background:

The tooltip background color to use in the object. You can click the select button to bring up a color chooser.

Tooltip text:

The tooltip text color to use in the object. You can click the select button to bring up a color chooser.

CSV File

The Comma Separated Value (csv) file that you want to display in the grid object at runtime. Click the Browse button to select a file.

Use CSV data to specify rows and columns

If selected, the number of rows and columns displayed in the grid object at runtime will be determined by the contents of the CSV file.

Fit CSV data in existing rows and columns

If selected, the number of rows and columns displayed in the grid object at runtime will not be changed by the contents of the CSV file. Whatever is defined in the Grid section of this dialog, or via actions, will control the number of rows and columns.

Attributes Tab

Identification

Object name:

The name that is used to identify this object.

State

Enabled

Enable the object so it responds to user interaction. When an object is disabled, it will not respond to any mouse overs or clicks and will not perform any actions until it is enabled.

Note: You can use the Grid.SetEnabled action to enable this object.

Visible

Set the object's initial visibility (whether it's visible when the page or dialog is displayed).

Note: You can use the Grid.SetVisible action to make the object visible or invisible at run time.

Auto-Resize

Left

If checked, the left side of the object will move when the application is resized. If unchecked, the left side of the object will not move.

Right

If checked, the right side of the object will move when the application is resized. If unchecked, the right side of the object will not move.

Top

If checked, the top of the object will move when the application is resized. If unchecked, the top of the object will not move.

Bottom

If checked, the bottom of the object will move when the application is resized. If unchecked, the bottom of the object will not move.

Position

Left:

The distance in pixels from the left edge of the object to the left edge of the page or dialog.

Tip: You can also change the position of an object by dragging it.

Top:

The distance in pixels from the top edge of the object to the top edge of the page or dialog.

Width:

The width of the object in pixels.

Tip: You can also resize an object by dragging one of the resize handles on its bounding box.

Height:

The height of the object in pixels.

Restore Original

Set's the object's size back to the original values.

Note: This option is not available for grid objects.

Feedback

Tooltip:

A short string of text that will appear after the mouse hovers over this object for a moment.

Tip: You can choose from several tooltip styles for all tooltips in your project, Standard, Balloon and Extended. This setting can be found on the Appearance tab of the Project > Settings.

Tip: If you want a newline in your tooltip text, use "\r\n". For example, for an Extended tooltip, "My First Line\r\nMy Second Line|My Title". Newlines are not supported in the Title text for Balloon or Extended styles.

Tip: If you want a "&" character in the text, you must enter "&&&".

Spelling

Check the spelling of the tooltip text.

Cursor:

Note: This option is not available for grid objects.

Script Tab

You can use the script editor on this tab to edit the script of actions that will be performed on each of this object's events.

This object supports the following events:

On Cell Changed

The actions that will be performed whenever the text of a cell changes for any reason. This may result from the user editing cell text or from text being pasted in or even from the text changing in response to an action such as Grid.SetCellText.

The following event variables are automatically set whenever this event is triggered:

e_Row

(number) The row (0-based) of the cell that changed.

e_Column

(number) The column (0-based) of the cell that changed.

e_OldText

(number) The text that was in the cell before it was changed.

e_NewText

(number) The new text of the cell.

On Selection Changed

The actions that will be performed whenever the selection of cells in the grid changes.

The following event variables are automatically set whenever this event is triggered:

e_Row

(number) The row (0-based) of the cell that now has focus.

e_Column

(number) The column (0-based) of the cell that now has focus.


Grid Object - Actions

Grid Object

Overview Pane Dialog Actions

Grid.AutoSize

Grid.AutoSizeColumn

Grid.AutoSizeColumns

Grid.AutoSizeRow

Grid.AutoSizeRows

Grid.DeleteAllItems

Grid.DeleteColumn

Grid.DeleteNonFixedRows

Grid.DeleteRow

Grid.EditCopy

Grid.EditCut

Grid.EditPaste

Grid.EnsureVisible

Grid.ExpandColumnsToFit

Grid.ExpandLastColumn

Grid.ExpandRowsToFit

Grid.ExpandToFit

Grid.GetCellColors

Grid.GetCellText

Grid.GetCellState

Grid.GetColumnCount

Grid.GetColumnHiding

Grid.GetColumnResize

Grid.GetColumnWidth

Grid.GetDragAndDrop

Grid.GetEditable

Grid.GetFixedColumnCount

Grid.GetFixedColumnSelection

Grid.GetFixedRowCount

Grid.GetFixedRowSelection

Grid.GetFocusCell

Grid.GetFrameFocusCell

Grid.GetGridColors

Grid.GetGridLines

Grid.GetHeaderSort

Grid.GetListMode

Grid.GetModified

Grid.GetNextItem

Grid.GetPos

Grid.GetProperties

Grid.GetRowCount

Grid.GetRowHeight

Grid.GetRowHiding

Grid.GetRowResize

Grid.GetSelectable

Grid.GetSelectedCount

Grid.GetSingleColumnSelection

Grid.GetSingleRowSelection

Grid.GetSize

Grid.GetSortAscending

Grid.GetSortColumn

Grid.GetTabEnabled

Grid.GetToolTipsEnabled

Grid.GetTrackFocusCell

Grid.GetUnhideColumn

Grid.GetUnhideRow

Grid.InsertColumn

Grid.InsertRow

Grid.IsCellEditable

Grid.IsCellFixed

Grid.IsCellSelected

Grid.IsCellValid

Grid.IsCellVisible

Grid.IsEnabled

Grid.IsVisible

Grid.LoadFromFile

Grid.MakeColorRGB

Grid.Print

Grid.RedrawCell

Grid.RedrawColumn

Grid.RedrawRow

Grid.Refresh

Grid.SaveToFile

Grid.SelectAll

Grid.SetCellColors

Grid.SetCellFont

Grid.SetCellText

Grid.SetColumnCount

Grid.SetColumnHiding

Grid.SetColumnResize

Grid.SetColumnWidth

Grid.SetDragAndDrop

Grid.SetEditable

Grid.SetEnabled

Grid.SetFixedColumnCount

Grid.SetFixedColumnSelection

Grid.SetFixedRowCount

Grid.SetFixedRowSelection

Grid.SetFocusCell

Grid.SetFrameFocusCell

Grid.SetGridColors

Grid.SetGridLines

Grid.SetHeaderSort

Grid.SetListMode

Grid.SetModified

Grid.SetPos

Grid.SetProperties

Grid.SetRedraw

Grid.SetRowCount

Grid.SetRowHeight

Grid.SetRowHiding

Grid.SetRowResize

Grid.SetSelectable

Grid.SetSelectedRange

Grid.SetSingleColumnSelection

Grid.SetSingleRowSelection

Grid.SetSize

Grid.SetSortAscending

Grid.SetTabEnabled

Grid.SetToolTipsEnabled

Grid.SetTrackFocusCell

Grid.SetUnhideColumn

Grid.SetUnhideRow

Grid.SetVisible

Grid.SortTextItems


Progress Object - Overview

Progress Object

Overview Pane Dialog Actions

The Progress object makes it incredibly easy to add a powerful progress meter to your projects. Simply add this object to any page or dialog in your project and you've got a very slick looking way to display progress feedback, just like you've seen in many other professional products.

Whether you need to show a percentage of a completed task, or a simple indicator gauge to keep your user's informed, this is a great way to do it. Of course, we didn't stop with just a simple plain looking progress meter - we've made it really easy to customize. You can control the background and bar colors, text, fonts, vertical or horizontal orientation, step size, min and max values, and a variety of styles such as standard or XP.


Progress Object - Pane

Progress Object

Overview Pane Dialog Actions

Here are the object's settings as they appear in the properties pane:

Object

Name

The name that is used to identify this object.

Text

The text you want to appear inside the object.

Note: Text can only be shown if UseCustomColors is enabled.

Font

The font that you want to use for the text. Click the Select Font button to open the Font dialog where you can edit all of the font settings.

Tip: You can set the default font for this object type by configuring its settings on the Objects tab in Edit > Preferences.

FontFamily

The font family that you want to use.

FontSize

The font size, in points.

FontBold

Make the text bolded.

FontItalic

Make the text appear in italics.

Orientation

Choose from:

Horizontal

Orient the progress bar horizontally. The progress meter will move from left to right.

Vertical

Orient the progress bar vertically. The progress meter will move from the bottom to the top.

Style

Choose from:

Bars

Use bars to represent the progress.

Smooth

Use a solid bar to represent the progress.

XPStyle

Whether the progress meter will be styled as a Windows XP progress meter. Choose from:

True

The progress meter will be styled as a Windows XP progress meter.

False

The progress meter will not be styled as a Windows XP progress meter.

Colors

UseCustomColors

Whether to override the default look and feel of the Progress object. When set to true you will be able to control the colors and style of the Progress object. When set to false, the Progress object will use the default Windows style when it draws.

TextColor

The text color to use for the object. You can click the select button to bring up a color chooser.

Tip: Clicking the "More Colors..." button on the color menu allows you to choose either a standard color/custom color, or use the eyedropper to pick a color from somewhere within the AutoPlay application window.

BackgroundColor

The background color to use for the object. You can click the select button to bring up a color chooser.

BarColor

The color to use for the progress meter bars. You can click the select button to bring up a color chooser.

Range

Minimum

The minimum value for the range of the progress meter.

Maximum

The maximum value for the range of the progress meter.

Step

The value to increment each time progress is made.

Attributes

TooltipText

A short string of text that will appear after the mouse hovers over this object for a moment.

Tip: You can choose from several tooltip styles for all tooltips in your project, Standard, Balloon and Extended. This setting can be found on the Appearance tab of the Project > Settings.

Tip: If you want a newline in your tooltip text, use "\r\n". For example, for an Extended tooltip, "My First Line\r\nMy Second Line|My Title". Newlines are not supported in the Title text for Balloon or Extended styles.

Tip: If you want a "&" character in the text, you must enter "&&&".

Enabled

Enable the object so it responds to user interaction. Choose from:

True

The object will respond to mouse overs and clicks and perform any actions assigned to its events.

False

The object will not respond to any mouse overs or clicks and will not perform any actions until it is enabled.

Note: You can use the Progress.SetEnabled action to enable this object.

Visible

Set the object's initial visibility. Choose from:

True

The object will be visible when the page or dialog is displayed.

False

The object will be invisible when the page or dialog is displayed.

Note: You can use the Progress.SetVisible action to make the object visible or invisible at run time.

Position

Left

The distance in pixels from the left edge of the object to the left edge of the page or dialog.

Tip: You can also change the position of an object by dragging it or using the arrow keys.

Top

The distance in pixels from the top edge of the object to the top edge of the page or dialog.

Width

The width of the object in pixels.

Tip: You can also resize an object by dragging one of the resize handles on its bounding box.

Height

The height of the object in pixels.

Auto-Resize

ResizeLeft

Whether the left side of the object will move when resized. Choose from:

True

The left side of the object will move when the application is resized.

False

Don't move the left side of the object when the application is resized.

ResizeRight

Whether the right side of the object will move when resized. Choose from:

True

The right side of the object will move when the application is resized.

False

Don't move the right side of the object when the application is resized.

ResizeTop

Whether the top of the object will move when resized. Choose from:

True

The top of the object will move when the application is resized.

False

Don't move the top of the object when the application is resized.

ResizeBottom

Whether the bottom of the object will move when resized. Choose from:

True

The bottom of the object will move when the application is resized.

False

Don't move the bottom of the object when the application is resized.

Actions

Quick Action

A quick action to perform when the object is clicked. Click the edit button to select a quick action.

On Click

The actions that will be performed when the user clicks on this object. Click the edit button to open the script editor.


Progress Object - Dialog

Progress Object

Overview Pane Dialog Actions

Here are the object's settings as they appear on the "double-click" Properties dialog.

There are four tabs on the Properties dialog:

Settings

Attributes

Quick Action

Script

Settings Tab

Object

Text:

The text you want to appear inside the object.

Note: Text can only be shown if Use custom colors is enabled.

Font...

The font that you want to use for the text. Click the Select Font button to open the Font dialog where you can edit all of the font settings.

Tip: You can set the default font for this object type by configuring its settings on the Objects tab in Edit > Preferences.

Spelling

Check the spelling of the contents of the Text field.

Style

Bars

Use bars to represent the progress.

Smooth

Use a solid bar to represent the progress.

Orientation

Horizontal

Orient the progress bar horizontally. The progress meter will move from left to right.

Vertical

Orient the progress bar vertically. The progress meter will move from the bottom to the top.

Range

Minimum:

The minimum value for the range of the progress meter.

Maximum:

The maximum value for the range of the progress meter.

Step:

The value to increment each time progress is made.

Colors

Use custom colors

This setting allows you to override the default look and feel of the Progress object. When turned on you will be able to control the colors and style of the Progress object. When this setting is turned off, the Progress object will use the default Windows style when it draws.

Background:

The background color to use for the object. You can click the select button to bring up a color chooser.

Tip: Clicking the "More Colors..." button on the color menu allows you to choose either a standard color/custom color, or use the eyedropper to pick a color from somewhere within the AutoPlay application window.

Bar:

The color to use for the progress meter bars. You can click the select button to bring up a color chooser.

Text:

The color to use for the progress meter text. You can click the select button to bring up a color chooser.

XP style

Use an XP style progress meter.

Attributes Tab

Identification

Object name:

The name that is used to identify this object.

State

Enabled

Enable the object so it responds to user interaction. When an object is disabled, it will not respond to any mouse overs or clicks and will not perform any actions until it is enabled.

Note: You can use the Progress.SetEnabled action to enable this object.

Visible

Set the object's initial visibility (whether it's visible when the page or dialog is displayed).

Note: You can use the Progress.SetVisible action to make the object visible or invisible at run time.

Auto-Resize

Left

If checked, the left side of the object will move when the application is resized. If unchecked, the left side of the object will not move.

Right

If checked, the right side of the object will move when the application is resized. If unchecked, the right side of the object will not move.

Top

If checked, the top of the object will move when the application is resized. If unchecked, the top of the object will not move.

Bottom

If checked, the bottom of the object will move when the application is resized. If unchecked, the bottom of the object will not move.

Position

Left:

The distance in pixels from the left edge of the object to the left edge of the page or dialog.

Tip: You can also change the position of an object by dragging it or using the arrow keys.

Top:

The distance in pixels from the top edge of the object to the top edge of the page or dialog.

Width:

The width of the object in pixels.

Tip: You can also resize an object by dragging one of the resize handles on its bounding box.

Height:

The height of the object in pixels.

Restore Original

Set's the object's size back to the original values.

Feedback

Tooltip:

A short string of text that will appear after the mouse hovers over this object for a moment.

Tip: You can choose from several tooltip styles for all tooltips in your project, Standard, Balloon and Extended. This setting can be found on the Appearance tab of the Project > Settings.

Tip: If you want a newline in your tooltip text, use "\r\n". For example, for an Extended tooltip, "My First Line\r\nMy Second Line|My Title". Newlines are not supported in the Title text for Balloon or Extended styles.

Tip: If you want a "&" character in the text, you must enter "&&&".

Spelling

Check the spelling of the tooltip text.

Cursor:

The mouse pointer that will be used while the mouse is over this object.

Note: This option is not available for progress objects.

Quick Action Tab

You can use this tab to perform a simple action when the object is clicked.

When Object is Clicked

Action to run:

The action to perform when the object is clicked. Choose from:

ACTION | DESCRIPTION
None | Does nothing.
Show Page | Jumps to the specified page in your application. Click here for more information.
Show Dialog | Shows a specific dialog in your application. Click here for more information.
Close Dialog | Closes the currently displayed dialog. Click here for more information.
Run Program | Runs an application with optional command line arguments. Click here for more information.
Open Document | Opens a document in an external viewer. Click here for more information.
Print Document | Prints a document on the user's system. Click here for more information.
Send Email | Sends an email through the user's default email program. Click here for more information.
View Website | Opens a website in the user's default web browser. Click here for more information.
Explore Folder | Explores a folder on the user's system. Click here for more information.
Play Multimedia | Plays a multimedia file in the default player on the user's system. Click here for more information.
Play/Pause Background Music | Toggles the play state of the background music. Click here for more information.
Exit/Close | Exits from the AutoPlay application. Click here for more information.

Properties

Any additional settings corresponding to the selected quick action.

Script Tab

You can use the script editor on this tab to edit the script of actions that will be performed on each of this object's events.

This object supports the following events:

On Click

The actions that will be performed when the user clicks on this object.


Progress Object - Actions

Progress Object

Overview Pane Dialog Actions

Progress.GetCurrentPos

Progress.GetPos

Progress.GetProperties

Progress.GetRange

Progress.GetSize

Progress.GetText

Progress.IsEnabled

Progress.IsVisible

Progress.SetCurrentPos

Progress.SetEnabled

Progress.SetPos

Progress.SetProperties

Progress.SetRange

Progress.SetSize

Progress.SetStep

Progress.SetText

Progress.SetVisible

Progress.StepIt


RichText Object - Overview

RichText Object

Overview Pane Dialog Actions

The richtext object allows you display Rich Text (RTF format) on the page or dialog where large amounts of formatted text are needed. Beyond the expected features available in RTF files for text formatting, many properties of the object can be customized so that its integration is seamless. Some of these settings include: horizontal and vertical scroll bars, background transparency, background colors, borders, read-order, read-only, detection of URL hyperlinks, runtime right-click context menu, and a large variety of actions for specialized runtime manipulation.

The richtext object can also respond to mouse overs, hyperlinks, key strokes, focus and selection changes if you need to react to user interaction in a custom way.

Tip: You can add a richtext object by choosing Object > RichText from the menu.

Note: There may be references to the term "twips" in various places when discussing the richtext object. A "twip" is a unit of measurement used in the richtext object. There are 1440 twips to and inch, 567 twips to a centimeter.

Internally the richtext object uses the Rich Edit control available on the user's system. Some advanced runtime features may only be available in certain versions of the control. For a more in-depth discussion of the control, see the topic: MSDN: Rich Edit.


RichText Object - Pane

RichText Object

Overview Pane Dialog Actions

Here are the object's settings as they appear in the properties pane:

Object

Name

The name that is used to identify this object.

Text

The Rich Text (RTF format) you want to display in the RichText object.

Options

VerticalScrollbar

Include a vertical scroll bar for the text. Choose from:

True

Include a vertical scroll bar for the text if the amount of text to be displayed exceeds the vertical visible area.

False

Don't include a vertical scroll bar. Any text exceeding the visible area will be cut off.

HorizontalScrollbar

Include a horizontal scroll bar for the text. Choose from:

True

Include a horizontal scroll bar for the text if the amount of text to be displayed exceeds the horizontal visible area.

False

Don't include a horizontal scroll bar. Any text exceeding the horizontal area will wrap to the next line.

AutoDetectURL

Automatically detect URLs in the object text. Choose from:

True

Automatically detect URLs in the object text. This means URLs will be shown as hyperlinks and will fire the richtext object's On Link event when they are clicked on.

False

Don't automatically detect URLs in the object text, and don't fire the On Link event.

Special

BorderMode

The type of border to display around the object. Choose from:

None

Don't display any border around the object.

Sunken

The object will have a "sunken" appearance on the page or dialog.

ReadOrder

The order the text will display when typed into the object. Choose from:

Standard

Display the text normally, from left to right.

Right to Left

If the shell language is Hebrew, Arabic, or another language that supports reading-order alignment, the text is displayed using right-to-left reading-order properties. For other languages, this style is ignored.

Transparent

Whether to make the background of the object transparent. Choose from:

True

Make the background of the object transparent.

False

Use a solid BackgroundColor for the background of the object.

BackgroundColor

The background color for the object. You can click the select button to bring up a color chooser.

Tip: Clicking the "More Colors..." button on the color menu allows you to choose either a standard color/custom color, or use the eyedropper to pick a color from somewhere within the AutoPlay application window.

ReadOnly

Whether to make the text in the object read-only. Choose from:

True

Make the text in the object read-only so the user cannot type into it. This means the user can copy the text, but cannot modify it.

False

Don't make the object read-only. This means the user can copy or modify the text.

ShowContextMenu

Show a right-click context menu in the object. Choose from:

True

Show a right-click context menu in the object with features such as "Cut," "Copy" and "Paste."

False

Don't show a right-click context menu in the object.

Attributes

TooltipText

A short string of text that will appear after the mouse hovers over this object for a moment.

Tip: You can choose from several tooltip styles for all tooltips in your project, Standard, Balloon and Extended. This setting can be found on the Appearance tab of the Project > Settings.

Tip: If you want a newline in your tooltip text, use "\r\n". For example, for an Extended tooltip, "My First Line\r\nMy Second Line|My Title". Newlines are not supported in the Title text for Balloon or Extended styles.

Tip: If you want a "&" character in the text, you must enter "&&&".

Enabled

Enable the object so it responds to user interaction. Choose from:

True

The object will respond to mouse overs and clicks and perform any actions assigned to its events.

False

The object will not respond to any mouse overs or clicks and will not perform any actions until it is enabled.

Note: You can use the RichText.SetEnabled action to enable this object.

Visible

Set the object's initial visibility. Choose from:

True

The object will be visible when the page or dialog is displayed.

False

The object will be invisible when the page or dialog is displayed.

Note: You can use the RichText.SetVisible action to make the object visible or invisible at run time.

Position

Left

The distance in pixels from the left edge of the object to the left edge of the page or dialog.

Tip: You can also change the position of an object by dragging it or using the arrow keys.

Top

The distance in pixels from the top edge of the object to the top edge of the page or dialog.

Width

The width of the object in pixels.

Tip: You can also resize an object by dragging one of the resize handles on its bounding box.

Height

The height of the object in pixels.

Auto-Resize

ResizeLeft

Whether the left side of the object will move when resized. Choose from:

True

The left side of the object will move when the application is resized.

False

Don't move the left side of the object when the application is resized.

ResizeRight

Whether the right side of the object will move when resized. Choose from:

True

The right side of the object will move when the application is resized.

False

Don't move the right side of the object when the application is resized.

ResizeTop

Whether the top of the object will move when resized. Choose from:

True

The top of the object will move when the application is resized.

False

Don't move the top of the object when the application is resized.

ResizeBottom

Whether the bottom of the object will move when resized. Choose from:

True

The bottom of the object will move when the application is resized.

False

Don't move the bottom of the object when the application is resized.

Actions

On Key

The actions that will be performed whenever the richtext object has focus and the user presses a key. Click the edit button to open the script editor.

On Focus

The actions that will be performed whenever the richtext object is given focus. For example, it will be given focus if the user clicks inside the object. Click the edit button to open the script editor.

On Link

The actions that will be performed when the user clicks on a link in the richtext object. Click the edit button to open the script editor.

Note: To use this event, you must have the Auto-detect URL feature enabled.

On Selection Changed

The actions that will be performed when the selection changes in the richtext object. Click the edit button to open the script editor.


RichText Object - Dialog

RichText Object

Overview Pane Dialog Actions

Here are the object's settings as they appear on the "double-click" Properties dialog.

There are three tabs on the Properties dialog:

Settings

Attributes

Script

Settings Tab

Object

Text:

The Rich Text (RTF format) you want to display in the RichText object.

Bold

Make the text bolded.

Italic

Make the text italic.

Underline

Underline the text.

Bullets

Make the text bulleted.

Font

The font that you want to use for the text. Click the select button to choose a different font.

Font color

The color you want to use for the text.

Font size

The font size to use for the text.

Edit font

Open the Font dialog where you can edit all of the font settings.

Paragraph

Opens the Paragraph dialog where you can specify the indentation and alignment of the paragraph text.

Load RTF file

Opens a browse dialog where you can select a Rich Text (RTF) file to load into the object.

Scrollbars

Vertical scrollbar

Include a vertical scroll bar for the text if the amount of text to be displayed exceeds the vertical visible area. If unchecked, and text exceeding the area will be cut off.

Horizontal scrollbar

Include a horizontal scroll bar for the text if the amount of text to be displayed exceeds the horizontal visible area. If unchecked, any text exceeding the horizontal area will wrap to the next line.

Background Style

Solid

The background color for the object. You can click the select button to bring up a color chooser.

Tip: Clicking the "More Colors..." button on the color menu allows you to choose either a standard color/custom color, or use the eyedropper to pick a color from somewhere within the AutoPlay application window.

Transparent

Make the background of the object transparent.

Special

Border mode:

The type of border to display around the object. Choose from:

None

Don't display any border around the object.

Sunken

The object will have a "sunken" appearance on the page or dialog.

Read order:

The order the text will display when typed into the object. Choose from:

Standard

Display the text normally, from left to right.

Right to Left

If the shell language is Hebrew, Arabic, or another language that supports reading-order alignment, the text is displayed using right-to-left reading-order properties. For other languages, this style is ignored.

Read-only

Make the text in the object read-only so the user cannot type into it. This means the user can copy the text, but cannot modify it.

Auto-detect URL

Automatically detect URLs in the object text. This means URLs will be shown as hyperlinks and will fire the RichText object's On Link event when they are clicked on.

Show context menu

Show a right-click context menu in the object with features such as "Cut," "Copy" and "Paste."

Attributes Tab

Identification

Object name:

The name that is used to identify this object.

State

Enabled

Enable the object so it responds to user interaction. When an object is disabled, it will not respond to any mouse overs or clicks and will not perform any actions until it is enabled.

Note: You can use the RichText.SetEnabled action to enable this object.

Visible

Set the object's initial visibility (whether it's visible when the page or dialog is displayed).

Note: You can use the RichText.SetVisible action to make the object visible or invisible at run time.

Auto-Resize

Left

If checked, the left side of the object will move when the application is resized. If unchecked, the left side of the object will not move.

Right

If checked, the right side of the object will move when the application is resized. If unchecked, the right side of the object will not move.

Top

If checked, the top of the object will move when the application is resized. If unchecked, the top of the object will not move.

Bottom

If checked, the bottom of the object will move when the application is resized. If unchecked, the bottom of the object will not move.

Position

Left:

The distance in pixels from the left edge of the object to the left edge of the page or dialog.

Tip: You can also change the position of an object by dragging it or using the arrow keys.

Top:

The distance in pixels from the top edge of the object to the top edge of the page or dialog.

Width:

The width of the object in pixels.

Tip: You can also resize an object by dragging one of the resize handles on its bounding box.

Height:

The height of the object in pixels.

Restore Original

Sets the object's size back to the original values (not available for the RichText object.)

Feedback

Tooltip:

A short string of text that will appear after the mouse hovers over this object for a moment.

Tip: You can choose from several tooltip styles for all tooltips in your project, Standard, Balloon and Extended. This setting can be found on the Appearance tab of the Project > Settings.

Tip: If you want a newline in your tooltip text, use "\r\n". For example, for an Extended tooltip, "My First Line\r\nMy Second Line|My Title". Newlines are not supported in the Title text for Balloon or Extended styles.

Tip: If you want a "&" character in the text, you must enter "&&&".

Spelling

Check the spelling of the tooltip text.

Cursor:

The mouse pointer that will be used while the mouse is over this object (not available for the RichText object.)

Script Tab

You can use the action editor on this tab to edit the script of actions that will be performed on each of this object's events.

This object supports the following events:

On Key

The actions that will be performed whenever the richtext object has focus and the user presses a key.

The following event variables are automatically set whenever this event is triggered:

e_Key

(number) The virtual key code of the key that was pressed.

e_Modifiers

(table) A table containing three boolean values that describe which modifier keys were held down while the key was pressed. A modifier key is a key that can be held down while another key is pressed, to "modify" it.

There are three true/false values in the table, one for each type of modifier key on the keyboard: shift, ctrl, and alt. You can access these values as e_Modifiers.shift, e_Modifiers.ctrl, and e_Modifiers.alt.

On Focus

The actions that will be performed whenever the richtext object is given focus. For example, it will be given focus if the user clicks inside the object.

On Link

The actions that will be performed when the user clicks on a link in the richtext object.

Note: To use this event, you must have the Auto-detect URL feature enabled.

The following event variables are automatically set whenever this event is triggered:

e_Min

(number) The 1-based character index where the link's text begins.

e_Max

(number) The 1-based character index where the link's text ends.

e_Link

(string) The text of the link that was clicked.

On Selection Changed

The actions that will be performed when the selection changes in the richtext object.

The following event variables are automatically set whenever this event is triggered:

e_Min

(number) The 1-based character index of the start of the selection.

e_Max

(number) The 1-based character index of the end of the selection.


RichText Object - Actions

RichText Object

Overview Pane Dialog Actions

RichText.CanPaste

RichText.CanUndo

RichText.Copy

RichText.Cut

RichText.Delete

RichText.EmptyUndoBuffer

RichText.FindText

RichText.GetLine

RichText.GetParagraphFormat

RichText.GetPos

RichText.GetProperties

RichText.GetSelection

RichText.GetSelectionFormat

RichText.GetSize

RichText.GetText

RichText.GetTextLength

RichText.IsEnabled

RichText.IsVisible

RichText.LoadFromFile

RichText.Paste

RichText.SaveToFile

RichText.ScrollLines

RichText.ScrollToLine

RichText.SetEnabled

RichText.SetParagraphFormat

RichText.SetPos

RichText.SetProperties

RichText.SetSelection

RichText.SetSelectionFormat

RichText.SetSize

RichText.SetText

RichText.SetVisible

RichText.Undo


Hotspot Object - Overview

Hotspot Object

Overview Pane Dialog Actions

The hotspot object allows you to define an area on the page or dialog that will respond to mouse overs and mouse clicks. You can use this object as an invisible "trigger area" on the page or dialog to make some part of your background respond to mouse events.

At design time, the hotspot object's border is represented by a dashed rectangle.

At run time, the hotspot object's border is invisible. (The dashed rectangle is only visible at design time.)

Tip: You can add a hotspot object by choosing Object > Hotspot from the menu.


Hotspot Object - Pane

Hotspot Object

Overview Pane Dialog Actions

Here are the object's settings as they appear in the properties pane:

Object

Name

The name that is used to identify this object.

Attributes

TooltipText

A short string of text that will appear after the mouse hovers over this object for a moment.

Tip: You can choose from several tooltip styles for all tooltips in your project, Standard, Balloon and Extended. This setting can be found on the Appearance tab of the Project > Settings.

Tip: If you want a newline in your tooltip text, use "\r\n". For example, for an Extended tooltip, "My First Line\r\nMy Second Line|My Title". Newlines are not supported in the Title text for Balloon or Extended styles.

Tip: If you want a "&" character in the text, you must enter "&&&".

Enabled

Enable the object so it responds to user interaction. Choose from:

True

The object will respond to mouse overs and clicks and perform any actions assigned to its events.

False

The object will not respond to any mouse overs or clicks and will not perform any actions until it is enabled.

Note: You can use the Hotspot.SetEnabled action to enable this object.

Cursor

The mouse pointer that will be used while the mouse is over this object.

Position

Left

The distance in pixels from the left edge of the object to the left edge of the page or dialog.

Tip: You can also change the position of an object by dragging it.

Top

The distance in pixels from the top edge of the object to the top edge of the page or dialog.

Width

The width of the object in pixels.

Tip: You can also resize an object by dragging one of the resize handles on its bounding box.

Height

The height of the object in pixels.

Auto-Resize

ResizeLeft

Whether the left side of the object will move when resized. Choose from:

True

The left side of the object will move when the application is resized.

False

Don't move the left side of the object when the application is resized.

ResizeRight

Whether the right side of the object will move when resized. Choose from:

True

The right side of the object will move when the application is resized.

False

Don't move the right side of the object when the application is resized.

ResizeTop

Whether the top of the object will move when resized. Choose from:

True

The top of the object will move when the application is resized.

False

Don't move the top of the object when the application is resized.

ResizeBottom

Whether the bottom of the object will move when resized. Choose from:

True

The bottom of the object will move when the application is resized.

False

Don't move the bottom of the object when the application is resized.

Sounds

HighlightSound

The sound that will be played when the mouse moves over this object. Choose from:

None

Don't play any sound.

Standard

Play the default mouse over sound, as configured on the Sound Effects tab of the Audio Settings dialog.

Custom

Play a custom mouse over sound.

HighlightFile

The custom audio file to play. Click the browse button to select an appropriate sound file.

ClickSound

The sound that will be played when the user clicks on this object. Choose from:

None

Don't play any sound.

Standard

Play the default mouse click sound, as configured on the Sound Effects tab of the Audio Settings dialog.

Custom

Play a custom mouse click sound.

ClickFile

The custom audio file to play. Click the browse button to select an appropriate sound file.

Actions

Quick Action

A quick action to perform when the object is clicked. Click the edit button to select a quick action.

On Click

The actions that will be performed when the user clicks on this object. Click the edit button to open the script editor.

On Right-Click

The actions that will be performed when the user right-clicks on this object. Click the edit button to open the script editor.

On Enter

The actions that will be performed when the mouse moves onto this object ("enters" the object's territory). Click the edit button to open the script editor.

On Leave

The actions that will be performed when the mouse moves off of this object ("leaves" the object's territory). Click the edit button to open the script editor.


Hotspot Object - Dialog

Hotspot Object

Overview Pane Dialog Actions

Here are the object's settings as they appear on the "double-click" Properties dialog.

There are three tabs on the Properties dialog:

Attributes

Quick Action

Script

Attributes Tab

Identification

Object name:

The name that is used to identify this object.

State

Enabled

Enable the object so it responds to user interaction. When an object is disabled, it will not respond to any mouse overs or clicks and will not perform any actions until it is enabled.

Note: You can use the Hotspot.SetEnabled action to enable this object.

Auto-Resize

Left

If checked, the left side of the object will move when the application is resized. If unchecked, the left side of the object will not move.

Right

If checked, the right side of the object will move when the application is resized. If unchecked, the right side of the object will not move.

Top

If checked, the top of the object will move when the application is resized. If unchecked, the top of the object will not move.

Bottom

If checked, the bottom of the object will move when the application is resized. If unchecked, the bottom of the object will not move.

Position

Left:

The distance in pixels from the left edge of the object to the left edge of the page or dialog.

Tip: You can also change the position of an object by dragging it.

Top:

The distance in pixels from the top edge of the object to the top edge of the page or dialog.

Width:

The width of the object in pixels.

Tip: You can also resize an object by dragging one of the resize handles on its bounding box.

Height:

The height of the object in pixels.

Restore Original

Set's the object's size back to the original values.

Feedback

Tooltip:

A short string of text that will appear after the mouse hovers over this object for a moment.

Tip: You can choose from several tooltip styles for all tooltips in your project, Standard, Balloon and Extended. This setting can be found on the Appearance tab of the Project > Settings.

Tip: If you want a newline in your tooltip text, use "\r\n". For example, for an Extended tooltip, "My First Line\r\nMy Second Line|My Title". Newlines are not supported in the Title text for Balloon or Extended styles.

Tip: If you want a "&" character in the text, you must enter "&&&".

Spelling

Check the spelling of the tooltip text.

Cursor:

The mouse pointer that will be used while the mouse is over this object.

Sounds

Highlight:

The sound that will be played when the mouse moves over this object. Choose from:

None

Don't play any sound.

Standard

Play the default mouse over sound, as configured on the Sound Effects tab of the Audio Settings dialog.

Custom

Play a custom mouse over sound.

File:

The custom audio file to play. Click the browse button to select an appropriate sound file.

Click:

The sound that will be played when the user clicks on this object. Choose from:

None

Don't play any sound.

Standard

Play the default mouse click sound, as configured on the Sound Effects tab of the Audio Settings dialog.

Custom

Play a custom mouse click sound.

File:

The custom audio file to play. Click the browse button to select an appropriate sound file.

Quick Action Tab

You can use this tab to perform a simple action when the object is clicked.

When Object is Clicked

Action to run:

The action to perform when the object is clicked. Choose from:

ACTION | DESCRIPTION
None | Does nothing.
Show Page | Jumps to the specified page in your application. Click here for more information.
Show Dialog | Shows a specific dialog in your application. Click here for more information.
Close Dialog | Closes the currently displayed dialog. Click here for more information.
Run Program | Runs an application with optional command line arguments. Click here for more information.
Open Document | Opens a document in an external viewer. Click here for more information.
Print Document | Prints a document on the user's system. Click here for more information.
Send Email | Sends an email through the user's default email program. Click here for more information.
View Website | Opens a website in the user's default web browser. Click here for more information.
Explore Folder | Explores a folder on the user's system. Click here for more information.
Play Multimedia | Plays a multimedia file in the default player on the user's system. Click here for more information.
Play/Pause Background Music | Toggles the play state of the background music. Click here for more information.
Exit/Close | Exits from the AutoPlay application. Click here for more information.

Properties

Any additional settings corresponding to the selected quick action.

Script Tab

You can use the script editor on this tab to edit the script of actions that will be performed on each of this object's events.

This object supports the following events:

On Click

The actions that will be performed when the user clicks on this object.

On Right-Click

The actions that will be performed when the user right-clicks this object.

On Enter

The actions that will be performed when the mouse moves onto this object ("enters" the object's territory).

On Leave

The actions that will be performed when the mouse moves off of this object ("leaves" the object's territory).


Hotspot Object - Actions

Hotspot Object

Overview Pane Dialog Actions

Hotspot.GetPos

Hotspot.GetProperties

Hotspot.GetSize

Hotspot.IsEnabled

Hotspot.SetEnabled

Hotspot.SetPos

Hotspot.SetProperties

Hotspot.SetSize


Plugin Object - Overview

Plugin Object

Overview Pane Dialog Actions

Plugin objects are components that are external to the AutoPlay Media Studio program. They are independently developed and distributed and can be integrated into your projects to extend their functionality. Some plugin objects may be developed by Indigo Rose, while others may be developed by third parties. You can view details about the author and it's features by viewing the About Plugin dialog which can be accessed from the About setting of the plugin object's properties.

Note: As of AutoPlay Media Studio 8.0, only plugins created with version 2.0 of the SDK (or higher) are supported.

Note: Any plugin objects that are located in Plugins\Objects within the AutoPlay Media Studio program directory, and that were created with version 2.0 (or higher) of the Plugin SDK, will be available through the design environment by choosing Object > Plugin Objects.


Plugin Object - Pane

Plugin Object

Overview Pane Dialog Actions

Here are the object's settings as they appear in the properties pane:

Object

Name

The name that is used to identify this object.

Settings

Displays the Properties dialog where additional settings for this object can be configured. Click the edit button to open the Properties dialog.

About

Displays information about the plugin object. Click the edit button to open the About Plugin dialog. There you will find information such as the author, name and version. You can also click the plugin help button for detailed information about the object and it's features.

Note: If a plugin object was developed by a third party, extended documentation from the plugin help button may not be available.

Attributes

TooltipText

A short string of text that will appear after the mouse hovers over this object for a moment.

Tip: You can choose from several tooltip styles for all tooltips in your project, Standard, Balloon and Extended. This setting can be found on the Appearance tab of the Project > Settings.

Tip: If you want a newline in your tooltip text, use "\r\n". For example, for an Extended tooltip, "My First Line\r\nMy Second Line|My Title". Newlines are not supported in the Title text for Balloon or Extended styles.

Tip: If you want a "&" character in the text, you must enter "&&&".

Enabled

Enable the object so it responds to user interaction. Choose from:

True

The object will respond to mouse overs and clicks and perform any actions assigned to its events.

False

The object will not respond to any mouse overs or clicks and will not perform any actions until it is enabled.

Note: You can use the Plugin.SetEnabled action to enable this object.

Visible

Set the object's initial visibility. Choose from:

True

The object will be visible when the page or dialog is displayed.

False

The object will be invisible when the page or dialog is displayed.

Note: You can use the Plugin.SetVisible action to make the object visible or invisible at run time.

Cursor

The mouse pointer that will be used while the mouse is over this object.

Note: This feature is not available for windowed Plugin objects.

Position

Left

The distance in pixels from the left edge of the object to the left edge of the page or dialog.

Tip: You can also change the position of an object by dragging it or using the arrow keys.

Top

The distance in pixels from the top edge of the object to the top edge of the page or dialog.

Width

The width of the object in pixels.

Tip: You can also resize an object by dragging one of the resize handles on its bounding box.

Height

The height of the object in pixels.

Auto-Resize

ResizeLeft

Whether the left side of the object will move when resized. Choose from:

True

The left side of the object will move when the application is resized.

False

Don't move the left side of the object when the application is resized.

ResizeRight

Whether the right side of the object will move when resized. Choose from:

True

The right side of the object will move when the application is resized.

False

Don't move the right side of the object when the application is resized.

ResizeTop

Whether the top of the object will move when resized. Choose from:

True

The top of the object will move when the application is resized.

False

Don't move the top of the object when the application is resized.

ResizeBottom

Whether the bottom of the object will move when resized. Choose from:

True

The bottom of the object will move when the application is resized.

False

Don't move the bottom of the object when the application is resized.

Sounds

HighlightSound

The sound that will be played when the mouse moves over this object. Choose from:

None

Don't play any sound.

Standard

Play the default mouse over sound, as configured on the Sound Effects tab of the Audio Settings dialog.

Custom

Play a custom mouse over sound.

HighlightFile

The custom audio file to play. Click the browse button to select an appropriate sound file.

ClickSound

The sound that will be played when the user clicks on this object. Choose from:

None

Don't play any sound.

Standard

Play the default mouse click sound, as configured on the Sound Effects tab of the Audio Settings dialog.

Custom

Play a custom mouse click sound.

ClickFile

The custom audio file to play. Click the browse button to select an appropriate sound file.

Actions

Events are plugin specific. Click the edit button next to any action to open the script editor.

Note: Consult the plugin object's extended documentation for the events it supports.


Plugin Object - Dialog

Plugin Object

Overview Pane Dialog Actions

Here are the object's settings as they appear on the "double-click" Properties dialog.

There are three tabs on the Properties dialog:

Settings

Attributes

Script

Settings Tab

Object

Plugin name:

The name of the plugin.

Properties...

Opens the Properties dialog where additional settings for this object can be configured.

About...

Opens the About Plugin dialog. There you will find information such as the author, name and version. You can also click the Plugin Help button for detailed information about the object and it's features.

Note: If a plugin object was developed by a third party, extended documentation from the plugin help button may not be available.

Attributes Tab

Identification

Object name:

The name that is used to identify this object.

State

Enabled

Enable the object so it responds to user interaction. When an object is disabled, it will not respond to any mouse overs or clicks and will not perform any actions until it is enabled.

Note: You can use the Plugin.SetEnabled action to enable this object.

Visible

Set the object's initial visibility (whether it's visible when the page or dialog is displayed).

Note: You can use the Plugin.SetVisible action to make the object visible or invisible at run time.

Auto-Resize

Left

If checked, the left side of the object will move when the application is resized. If unchecked, the left side of the object will not move.

Right

If checked, the right side of the object will move when the application is resized. If unchecked, the right side of the object will not move.

Top

If checked, the top of the object will move when the application is resized. If unchecked, the top of the object will not move.

Bottom

If checked, the bottom of the object will move when the application is resized. If unchecked, the bottom of the object will not move.

Position

Left:

The distance in pixels from the left edge of the object to the left edge of the page or dialog.

Tip: You can also change the position of an object by dragging it or using the arrow keys.

Top:

The distance in pixels from the top edge of the object to the top edge of the page or dialog.

Width:

The width of the object in pixels.

Tip: You can also resize an object by dragging one of the resize handles on its bounding box.

Height:

The height of the object in pixels.

Restore Original

Set's the object's size back to the original values.

Feedback

Tooltip:

A short string of text that will appear after the mouse hovers over this object for a moment.

Tip: You can choose from several tooltip styles for all tooltips in your project, Standard, Balloon and Extended. This setting can be found on the Appearance tab of the Project > Settings.

Tip: If you want a newline in your tooltip text, use "\r\n". For example, for an Extended tooltip, "My First Line\r\nMy Second Line|My Title". Newlines are not supported in the Title text for Balloon or Extended styles.

Tip: If you want a "&" character in the text, you must enter "&&&".

Spelling

Check the spelling of the tooltip text.

Cursor:

The mouse pointer that will be used while the mouse is over this object.

Note: This feature is not available for windowed Plugin objects.

Sounds

Highlight:

The sound that will be played when the mouse moves over this object. Choose from:

None

Don't play any sound.

Standard

Play the default mouse over sound, as configured on the Sound Effects tab of the Audio Settings dialog.

Custom

Play a custom mouse over sound.

File:

The custom audio file to play. Click the browse button to select an appropriate sound file.

Click:

The sound that will be played when the user clicks on this object. Choose from:

None

Don't play any sound.

Standard

Play the default mouse click sound, as configured on the Sound Effects tab of the Audio Settings dialog.

Custom

Play a custom mouse click sound.

File:

The custom audio file to play. Click the browse button to select an appropriate sound file.

Script Tab

Events are plugin specific. You can use the script editor on this tab to edit the script of actions that will be performed on each of this object's events.

Note: Consult the plugin object's extended documentation for the events it supports.


Plugin Object - Actions

Plugin Object

Overview Pane Dialog Actions

Plugin.GetPos

Plugin.GetSize

Plugin.IsEnabled

Plugin.IsVisible

Plugin.SetEnabled

Plugin.SetPos

Plugin.SetSize

Plugin.SetVisible


Project Menu

Program Menus

Overview File Edit Align Page Dialog Object Project Publish View Tools Help

Settings...

Opens the Project Settings dialog where you can configure all of the project settings for the project.

Menu Bar...

Opens the Menu Bar dialog where you can create a menu bar for your project.

Audio...

Opens the Audio Settings dialog where you can configure the audio that will be used in your project.

Startup Movie...

Opens the Startup Movie dialog where you can configure a video or Flash file to play at the start of your application.

Dependencies...

Opens the Dependencies dialog where you can configure what applications you would like to detect for your application.

Actions...

Opens the script editor where you can create actions that you want to have performed for the following events: On Startup, On Shutdown, On Size, or On Menu.

Databases...

Opens the Databases dialog where you can enable actions to interact with one or more database technologies.

Global Functions...

Opens the Globals dialog where you can include any global functions that will be used in your project.

Plugins...

Opens the Action Plugins dialog where you can add action plugins to your project.

File Layout...

Opens the built in file layout editor where you can manipulate the layout of files within your project.


Project Settings - Overview

Project Settings

Overview Appearance Version Advanced Code Signing Skin

The project settings area is where you can configure the project settings, memory management, code signing and skin you want to use for your AutoPlay application. Some examples of the project settings you can control are: window title text, page size, the window style, taskbar representation, and some other window options.

There are five tabs on the Project Settings dialog:

  • Appearance

  • Version

  • Advanced

  • Code Signing

  • Skin

Tip: To access the Project Settings dialog, choose Project > Settings from the menu.


Project Settings - Appearance

Project Settings

Overview Appearance Version Advanced Code Signing Skin

General

Window title:

The text that will be displayed in the title bar of the application's window.

Movable

Make the application window "movable." If the Standard style is selected, this means the user can left-click the title bar and drag the application window around their screen. If the Flat or Custom Mask style is selected, the user can left-click on the page surface and drag it around their screen. If the Kiosk style is selected, this option has no effect.

Always on top

Make the application window always appear on top of all other windows on the desktop. The window will remain on top even if the user switches to another application.

Dimensions

Page size (presets):

The size that will be used for all pages in the project, in pixels. Choose from:

Tiny

Make the page 200 pixels tall by 320 pixels wide.

Tiny (with Menu Bar)

Make the page 180 pixels tall by 320 pixels wide.

Small

Make the page 300 pixels tall by 480 pixels wide.

Small (with Menu Bar)

Make the page 280 pixels tall by 480 pixels wide.

Medium

Make the page 425 pixels tall by 630 pixels wide. (The largest size that will fit on a standard 640x480 display.)

Medium (with Menu Bar)

Make the page 405 pixels tall by 630 pixels wide. (The largest size that will fit on a standard 640x480 display.)

Large

Make the page 545 pixels tall by 790 pixels wide. (The largest size that will fit on a standard 800x600 display.)

Large (with Menu Bar)

Make the page 525 pixels tall by 790 pixels wide. (The largest size that will fit on a standard 800x600 display.)

Extra Large

Make the page 713 pixels tall by 1014 pixels wide.

Extra Large (with Menu Bar)

Make the page 693 pixels tall by 1014 pixels wide.

Huge

Make the page 969 pixels tall by 1270 pixels wide.

Huge (with Menu Bar)

Make the page 949 pixels tall by 1270 pixels wide.

Custom

Specify a custom size.

Note: The Menu Bar options above are pre-specified page sizes which take into account the size of the menu bar, if enabled. To configure the menu bar, choose Project > Menu Bar.

Width:

The width of the page surface, in pixels.

Note: This setting is only available when the "Custom" page size is selected.

Height:

The height of the page surface, in pixels.

Note: This setting is only available when the "Custom" page size is selected.

Style

Standard

A title bar and border will be displayed for the application window.

Bordered

A border will be displayed around the application window with no title bar.

Flat

The application will be displayed without a title bar or border.

Note: When this option is used, the controls that normally appear on the title bar—such as the "X"-shaped close button in the upper right corner—will not be available. Make sure you provide some other way for your users to exit from the application. (For example, you could have an "Exit" button somewhere on the page.)

Kiosk

Make the application cover the entire screen. If the user's resolution is larger than the page size, the application window will be surrounded with a solid color of your choice that fills the user's entire screen. The application window will be displayed without a title bar or border and will be centered on their screen.

Color:

The color that will surround the page.

Custom mask

Make certain parts of your application's window transparent. You can use this option to make a custom window shape for your application.

To specify the areas that you want to make transparent, you need to create a transparency mask file in your favorite drawing program.

A transparency mask file is just an image where a single color represents the parts that you want to make transparent. Picture this image as being invisibly "placed over" your application's window, like a mask or a stencil.

In AutoPlay, the transparent parts of the mask should all be solid black. Wherever solid black appears in the mask image, the corresponding part of the window will be made transparent. The transparency mask acts like a "cookie cutter," cutting holes in the application's window so the user's desktop can show through.

Click the browse button to select an image file.

Fit to window

Take your transparency mask image and resize it to fit the page. The original image dimensions will be used to mask the page if this option is not selected.

Note: When this option is used, the controls that normally appear on the title bar—such as the "X"-shaped close button in the upper right corner—will not be available. Make sure you provide some other way for your users to exit from the application. (For example, you could have an "Exit" button somewhere on the page.)

Options

Custom icon

Use a custom icon to represent the CD-ROM as seen in Windows. This icon will also appear in the top left corner of your application window if the Standard style is selected. It will also be used to represent the application on the Windows task bar. Lastly, this icon will replace the published autorun.exe icon.

Click the browse button to select a standard icon (.ico) file.

Tip: The custom icon is also applied to any compressed executable generated, should you chose to publish to a compressed executable.

Note: The custom icon replacement occurs at build time and will only take effect when your project is published on an Windows NT/2K/XP/Vista+ system. If your project is published on a Windows 95/98/ME system, the custom icon will appear in the top left corner of your application and on the taskbar, but it will not replace the executable's icon.

A project published on a Windows NT/2K/XP/Vista+ system will function fine on all other OS's. Windows NT/2K/XP/Vista+ is only required for the build process to adjust the executable's icon.

Taskbar

Standard

Display the application's title in the Windows task bar. This is the normal Windows application behavior.

System tray

Display the application's icon in the system tray. The system tray is normally on the right hand side of the Windows task bar.

Hidden

Do not display anything in the task bar or system tray for the application.

Resize

Window is resizable

Make the application window resizable. Enabling this option allows the user to resize the application window either by dragging the title bar, or by pressing the maximize/restore button. This option only applies to projects using the Standard and Bordered window styles.

Tip: To manipulate the size, position, visibility, etc. of objects when the application is resized, use the On Size event of the page's Action tab.

Min. width:

The minimum page width to use at runtime if the window is resizeable.

Note: This is the minimum page width, not the window width. The minimum window width can be set using the global function g_OnGetMinMaxInfo.

Min. height:

The minimum page height to use at runtime if the window is resizable.

Note: This is the minimum page height, not the window height. The minimum window height can be set using the global function g_OnGetMinMaxInfo.

Tooltip Style

Controls the style for all tooltips throughout the runtime.

Standard

The traditional tooltip style.

Balloon

Balloon style tooltips. See note below for information on tooltip titles and text.

Extended

Similar to standard tooltips, except these tooltips are themed and support the title option discussed below.

Note: Balloon tooltips and Extended tooltips allow you to specify a title for your tooltips using "|" as a delimiter. For example: "My Tooltip|My Title". "My tooltip" will be your standard tooltip text, and "My Title" will be presented above "My Tooltip" in bold.

Tip: If you want a newline in your tooltip text, use "\r\n". For example, "My First Line\r\nMy Second Line|My Title". Newlines are not supported in the Title text for Balloon or Extended styles.

Office 2007 Theme

Controls the sub-theme for all xButton objects in the project that use the Office 2007 theme. You can choose from a variety of Office 2007 "looks."


Project Settings - Version

Project Settings

Overview Appearance Version Advanced Code Signing Skin

Stamp executable with custom information

If selected, the information specified on this tab will be added to the published executable's resource information. This information is visible to the user if they choose to view the executable's version information.

Version Information

File version:

The file version of the published executable. For example, "8210".

Product version:

The product version of the published executable. For example, "8210".

Company name:

Your company name. For example, "Indigo Rose Software".

Product name:

The name of the product. For example, "My Nifty Application".

File description:

A short description about the purpose of the published executable. For example, "My Nifty Application runtime".

Copyright:

A copyright notice for the product. For example, "Copyright © 2015 - Indigo Rose Software".

Trademarks:

Trademark notices for the product.

Private build:

Any 'private build' notes that may apply.

Special build:

Any 'special build' notes that may apply.


Project Settings - Advanced

Project Settings

Overview Appearance Version Advanced Code Signing Skin

Memory Management

Automatic

AutoPlay will automatically choose between conserving memory and maximizing speed in order to achieve optimal performance. This is the recommended setting.

Maximize speed

Each page's data will be cached in memory after its initial display. If any of these pages are viewed again, loading time is reduced, however memory usage will increase on the end user's system throughout the application.

Conserve memory

Do not cache page data in memory. Each page's data will be reloaded from disk or drive, minimizing memory usage on the end user's system.

Reading Order

Enable right to left reading order

Enables a right to left reading order throughout your project. When checked, all Button, Label, xButton, Grid, and Paragraph objects throughout your project will have a right to left reading order. As well, all Input, ComboBox, Tree, and List Box objects added after this option is enabled will have their reading order set to right to left by default.

Note: Any Input, ComboBox, Tree, List Box, and RichText objects present in your project before this option is enabled will keep their individual read order settings.

Tip: You can change the read order for Input, ComboBox, Tree, List Box, and RichText objects through their individual Object Properties.

Requested User Privilege Level

This section specifies which requested execution level to include in the AutoPlay application's manifest for running on Windows Vista or later. AutoPlay applications are generally built using the default "As invoker" setting, however may need to be changed given the requirements of your project. For more information to help make this decision, and other required changes and feature limitations, see Running on Windows Vista or Later.

Note: If the user disabled UAC on their system (changed from default), or has configured it differently, these settings will have no effect. If your application requires additional privileges, you must include your own administrator detection and handle how you wish to proceed if the requirement is not met. See the System.GetUserInfo action to perform administrator detection.

Note: Changing the application manifest to "Highest available" or "Require administrator" is only supported on Windows XP SP2 or later in AutoPlay Media Studio's design environment, and only available in the Commercial version.

Note: For more information on the settings below and general Windows Vista or later information, see the Running on Windows Vista or Later topic.

As invoker (default)

The AutoPlay application runs with the same access token as the parent process. For example, if the user is logged in as a standard user, those are the privileges they will inherit during the running of the application. This option is generally used for AutoPlay applications that are presentations or menus, where you are certain you do not need access to protected areas of the operating system (file system/registry). This includes access directly by the AutoPlay application, and the launching of external programs that require these permissions (unless they are designed to handle their own permission detection and notification). See Running on Windows Vista or Later for additional details.

Highest available

The AutoPlay application runs with the highest privileges the current user can obtain. This setting is designed for applications that can be run by all users. It is most useful for applications that require privileges above that of a limited user, but less than a full administrator.

Require administrator

The AutoPlay application requires to be run with the full access token of an Administrator. This setting should be used if your AutoPlay application needs to make changes to protected system locations (file system/registry) that are typically writable to only by Administrator users. This includes access directly by the AutoPlay application, and the launching of external programs that require this access (unless they are designed to handle their own permission detection and notification.)

Note: If the user disabled UAC on their system (changed from default), this setting will have no effect. In addition to this setting, you must include your own administrator detection and how you wish to proceed if the requirement is not met. See the System.GetUserInfo action to perform Administrator detection.


Project Settings - Code Signing

Project Settings

Overview Appearance Version Advanced Code Signing Skin

Tip: See the Code Signing section of the preferences (Edit > Preferences, Code Signing) to configure default values when creating new projects.

Tip: If you want full control over the how the application is code signed, you can leave all fields blank except for Tool location, and specify all options in the Other arguments field. When "SignTool.exe" is the selected tool, AutoPlay Media Studio automatically passes the option "sign".

Code sign applications

If checked, the application will be code signed during the build process using the settings below. See Authenticode Code Signing for more information.

Settings

Code signing tool:

The tool you want to use to digitally sign the application. Choose from:

SignTool.exe

Use SignTool.exe to digitally sign the application executable. This tool could not be distributed, but is available in the \Bin folder of the Platform Software Development Kit (SDK). For more information, see MSDN: SignTool (Windows).

SignCode.exe

Use SignCode.exe to digitally sign the application executable. This tool could not be distributed, and only ships with the .NET Framework SDK version 1.0 and 1.1. For more information, see MSDN: File Signing Tool (Signcode.exe).

Tool location:

The full path and filename of the chosen code signing tool on your system (SignTool.exe or SignCode.exe). You can click the Browse button to select the file.

Certificate filename:

The full path and filename of the certificate to use when signing the application. If SignTool.exe is selected, this file must be a "Personal Information Exchange" file (*.PFX). If SignCode.exe is selected, this file must be a "Software Publisher Certificate" file (*.SPC). You can click the Browse button to select the file.

Tip: If your .PFX file is password protected, you must pass its value in the Other arguments field using the /p option. For example: /p "mypassword". For more information, see MSDN: SignTool (Windows).

Private key filename:

The full path and filename of the "Private Key" file (*.pvk) to use for signing. This file is only used when SignCode.exe is the selected tool. You can click the Browse button to select the file.

Timestamp URL:

The URL of a timestamp DLL on the Web such as: http://timestamp.verisign.com/scripts/timstamp.dll. If you do not want to timestamp the application, leave this field blank.

Description:

The description of the signed content.

Description URL:

A URL that provides further information about the signed content.

Other arguments:

Any additional options you would like to pass to the code signing tool. If you leave any of the above fields blank (except for tool location), you can pass their values as command line options. AutoPlay Media Studio automatically passes the "sign" argument when "SignTool.exe" is the selected tool.


Project Settings - Skin

Project Settings

Overview Appearance Version Advanced Code Signing Skin

Apply skin to runtime

This option controls whether or not the skin file specified in the Skin filename edit field will be applied to the runtime.

Note: Runtime skinning is not compatible with the UPX compression build preference. If UPX runtime is enabled, it will be skipped if skins are applied.

Skin filename:

The path to the skin file that will be applied to the application at runtime. There are two supported files for skins:

  • *.msstyles - A Windows XP Visual Style file. There are many msstyles files freely available online, websites such as www.deviantart.com will even have specific categories for them (http://browse.deviantart.com/customization/skins/windows/visualstyle/).

  • *.cjstyles - A CodeJock style file. This can be one of the style files provided by Indigo Rose or one of the many freely available online. Styles can be easily created using the freely available CodeJock ISSkin tool.

Sub-style:

A list of sub-styles available for the selected skin. Leave this blank to use the default skin style.


Overview

Menu Bar

Overview Dialog Menu Item Sample Menu

The menu bar is an intuitive and easy to use, yet extremely powerful feature to provide your users with. And since it is fully customizable, the possibilities are limitless! Create full-featured applications complete with File, Edit, View, and Tools menus. Or do something completely different that sets you apart from the competition. And the best part? Because the menu works with events and actions, you can interact with objects on your page, or do any other task that the powerful LUA scripting engine and our high level actions allow!

Tip: To enable and configure the Menu Bar, choose Project > Menu Bar.

What is a menu bar?

A menu bar is that thin, often grey bar at the top of most applications within windows that allows you to perform many tasks. Within this help file, whenever you are told to choose, for example, File > Exit, you are being told to interact with the menu bar. In your autoplay application, you can provide your users with a completely customized menu bar:

In AutoPlay, the menu bar is configured through the Menu Bar dialog (Project > Menu Bar).

What are menu bar items?

Each individual spot in a menu bar is known as a menu bar item. Every menu item consists of various properties, all of which are configurable through the Menu Item dialog. This dialog is displayed whenever you add a new item, or edit an existing item's properties.

Menu bar items are referenced in AutoPlay by their Menu ID's, which are unique numeric values associated with each item. Whenever your users interact with the menu bar in your application, the page's On Menu event is fired, and the event variables (e_ID and e_ItemInfo) are populated with the current item's information.

Adding functionality to your menu bar is as easy as adding if statements to the On Menu event. We've even provided a menu bar example to get you headed in the right direction!

Are there any advanced features?

Of course! The easiest way to use a menu is to configure everything at design time, and have each item in the menu launch an action, as our example illustrates. However, the menu bar is fully customizable, which includes being able to enable/disable items, have 'toggle' items with checkboxes, and even change the entire menu dynamically at runtime! To make use of the full power of the menu bar, check out the following resources:

Actions

Application.GetMenu
Application.SetMenu
Application.SetMenuBarActive

Other Features

Menu Bar Global Functions


Dialog

Menu Bar

Overview Dialog Menu Item Sample Menu

Show menu bar

If checked, a menu bar will appear at the top of your application.

Note: The window of your published application will be slightly resized to incorporate the menu bar.

Menu Items

A hierarchical tree view of all elements in your menu bar. You can move any element around in this tree view by using the arrow buttons at the bottom of the dialog.

Image List

Use image list

If checked, the specified image list file will be used in the menu bar or the Application.ShowPopupMenu action. If unchecked, no image list file will be used.

Image list

A bitmap image (maximum 32bit supported) that contains 16x16 icons to be used by the menu bar or Application.ShowPopupMenu action as icons for each menu item.

Note: The image used as the image list must be a bitmap image (.bmp).

The following example illustrates a proper image list:

The picture above includes three 16x16 icons. The orange icon (left-most) has an index of 0. The purple icon (middle) has an index of 1. The circle icon (right-most) has an index of 2.

Note: To specify which icon each menu item will display, specify the Image index in each menu item's properties.

Transparent color:

The color that will be transparent in the image list. Click the select button to bring up a color chooser. The color that you click on will be used to represent transparency in the image list.

Tip: Clicking the "More Colors..." button on the color menu allows you to choose either a standard color/custom color, or use the eyedropper to pick a color from somewhere within the AutoPlay application window.

Menu Item Information

Enabled:

Whether or not the selected item is enabled by default.

Checked:

Whether or not the selected item is checked by default.

ID:

The ID assigned to the selected item.

Properties

Opens the Menu Item dialog where you can view the selected item's properties.

Add

Adds a new menu item by opening the Menu Item dialog.

Delete Item

Removes the selected item from the tree.

Move Item Up

Moves the selected item up one position in the item tree.

Move Item Down

Moves the selected item down one position in the item tree.

Move Item Left

Moves the selected item left one position in the item tree.

Move Item Right

Moves the selected item right one position in the item tree.


Menu Item

Menu Bar

Overview Dialog Menu Item Sample Menu

Each individual spot in a menu bar is known as a menu bar item. Every menu item consists of various properties, all of which are configurable through this dialog.

Menu ID:

The Menu ID to assign to the current item. This is used by the On Menu event to determine which item was interacted with.

Icon ID:

The 0-based icon index from the Image List specified on the Menu Bar dialog that the current item will use. If no icon image should be displayed, set this value to -1.

Note: If a number is specified which is out of range of the image specified in the Image List property of the menu bar, no icon image will be displayed.

Text:

The text of the current menu item.

Enabled

If the current menu item should be enabled by default.

Checked

If the current menu item should be checked by default.

Separator

If the current menu item should be a separator (checked) or a typical menu item (unchecked).


Sample Menu

Menu Bar

Overview Dialog Menu Item Sample Menu

Adding functionality to a menu bar is as easy as adding a few if statements to the On Menu event of your page. For this example, we will be interacting with the following menu bar:

With the above settings, the menu bar will appear as follows:

We have three tasks to perform with this menu bar:

File > Exit

For this task, we'll use the following action:

Application.Exit();

Help > Online Help

For this task, we'll use the following action:

File.OpenURL("http://www.indigorose.com/onlinehelp.htm", SW_SHOWNORMAL);

Help > PDF Help

For this task, we'll use the following action:

File.Open(_SourceFolder .. "\\AutoPlay\\Docs\\PDF_Help.pdf", "", SW_SHOWNORMAL);

Now that we have the scripts that we'll use, the only task left is to tie the actions to the menu bar. This is accomplished by using the page's On Menu event, and a few if statements:

And like magic, your application is now sporting a shiny, fully loaded (and fully functional) menu bar.


Audio Settings - Overview

Audio Settings

Overview Background Music Sound Effects

This is the area where you can add any background audio tracks you wish to play in your application and set the default sound effects that are used for all objects.

Note: The following audio formats are supported in AutoPlay Media Studio: .wav, .ogg, .raw, .aif, .aiff. (See Supported File Types for more information.)

There are two tabs on the Audio Settings dialog:

  • Background Music

  • Sound Effects

Tip: To access the Audio Settings dialog, choose Project > Audio from the menu.


Audio Settings - Background Music

Audio Settings

Overview Background Music Sound Effects

Track List

The background audio tracks you wish to play in your application.

Click the add button to choose an audio file through the Select File dialog. Repeat this step if you wish to include multiple files. You can manipulate the Track List by first highlighting the audio track, then either clicking the delete button or the arrow buttons to achieve the desired audio list.

Note: The following audio formats are supported in AutoPlay Media Studio: .wav, .ogg, .raw, .aif, .aiff. (See Supported File Types for more information.)

Play Mode

Sequential

Play the audio tracks in the order they appear in the Track List. The first track in the list will be the first played, followed by the second until there are no more tracks in the list.

Random

Play the audio tracks in the Track List in random order.

Options

Volume:

The volume level that will be used to play the background tracks. The volume level is defined on a scale of 0 to 255, where 255 is the loudest.

Repeat

Replay the Track List after each audio track has played once. The result will be a looping sequence of audio in the application.


Audio Settings - Sound Effects

Audio Settings

Overview Background Music Sound Effects

Default Object Sounds

The default sound effects are used for all objects whose sound settings are set to "Standard."

Every object has two Sound properties you can set: Highlight and Click. The Highlight sound will be played when the user moves the mouse over the object. The Click sound is played when the user clicks on the object. Within each of these settings, there are three values to choose from: None, Standard, and Custom. When an object's sound setting is set to "Standard," it will use the sound that is defined on this dialog.

Highlight:

The standard mouse-over sound for this project. This sound will be used for any object whose Highlight setting is set to "Standard."

Click the browse button to select an audio file.

Click:

The standard mouse-click sound for this project. This sound will be used for any object whose Click setting is set to "Standard."

Click the browse button to select an audio file.

Options

Volume:

The volume level for all highlight and click sounds in the project. The volume level is defined on a scale of 0 to 255, where 255 is the loudest.


Startup Movie - Overview

Startup Movie

Overview Settings

The startup movie area is where you can add an intro video or Flash movie to your AutoPlay application. The startup movie will begin to play as soon as your application starts. There are several settings available for this feature such as setting the window size, media size, the style of the window and allowing the user to skip the video's playback so they can proceed to the application.

Note: You can use the built-in variable _ShowIntroVideo to control whether the Startup Movie is shown at runtime.

There is one tab on the Startup Movie dialog:

  • Settings

Tip: To access the Startup Movie dialog, choose Project > Startup Movie from the menu.


Startup Movie - Settings

Startup Movie

Overview Settings

Play startup movie

Play a video or Flash movie at the start of the application.

Startup Movie

Video file

Start the application with a video movie.

Note: The movie window will close automatically once the video reaches the end.

Flash file

Start the application with a Flash movie.

Note: When a Flash movie is used, the movie window will only close automatically if the Flash movie fires the FSCommand "quit". The word "quit" is case insensitive. For example, fscommand ("quit").

Filename:

The video or Flash file to play at the beginning of your application.

Click the browse button to select the media file.

Window Size

Full screen

If the media's original dimensions are smaller than the user's screen, fill the background with a solid Background Color.

Tip: The Background Color can be set in the Style section on this tab.

Size to media

Size the window to the original dimensions of the media file. There will be no background area for the window.

Custom

Use a custom window size for the movie.

W:

The width of the window, in pixels.

H:

The height of the window, in pixels.

Note: These settings are only available when the Custom option is selected.

Media Size

The size of the media inside the window.

50%

Reduce the media's original dimensions by 50%.

100%

Maintain the original dimensions of the media file.

200%

Increase the media's original dimensions by 200%.

Fit to window

Expand the media so that it fills the entire window.

Custom

Define custom dimensions for the movie.

W:

The width of the media, in pixels.

H:

The height of the media, in pixels.

Note: These settings are only available when the Custom option is selected.

Style

Allow click to skip

Provide the option of left-clicking on the movie in order to skip to the application.

Title bar:

Include a title bar and custom text on the Startup Movie window.

Note: The Border option will automatically be selected.

Border

Include a border around the Startup Movie window.

Note: The Border option is automatically selected when a Title Bar is included. The Title Bar option will automatically be unchecked if the Border option is unchecked.

Background color:

The background color of the Startup Movie window.


Dependencies - Overview

Dependencies

Overview Applications Dialog

AutoPlay applications often require the presence of third party applications in order to function properly. This feature was designed to provide you with an easy method of checking the end user's system for some common applications that may be needed for a successful viewing experience.

Not only can you check for the existence of certain applications, you can make sure your users have a minimum version of that required application. If one or more of these requirements are not met on the end user's system, AutoPlay will automatically present the user with a Missing Technologies dialog. This dialog reflects the fact that the minimum version of one or more of these applications could not be located on their system. It also contains a button the user can click that can either open a web site where the application can be downloaded, or even directly launch an install if you wish. An example of the Missing Technologies dialog at runtime can be seen below.

Note: The function called from the dependency detection script is run in a loop so that once the user installs the missing technology, the "Missing Technologies" dialog will close automatically and the main application will open. If you are creating your own dependency scripts, you must ensure that the script does not contain any actions that you want executed multiple times, for example Dialog.Message actions.

There are two tabs on the Dependencies dialog in the AutoPlay design environment:

  • Applications

  • Dialog

Tip: To access the Dependencies dialog, choose Project > Dependencies from the menu.


Dependencies - Applications

Dependencies

Overview Applications Dialog

Choose applications to detect

The available list of technologies that can be detected on the end user's system. Check the box for each application you would like to detect for your application.

Highlight any application in the list to view it's properties.

Properties

Display Name

The name used to describe the application.

Minimum Version

The minimum version of the application that is required by your application.

Message

The instructional message you wish to display to the user.

Download/Install Link

The URL or path to open when the user clicks the button to request the technology.

Note: To open a file in your project, you must use the relative path to the file. For example, if your file is located in the root of the project (in the CD_Root folder), you can reference it as myfile.exe. If your file is located in your project's Docs folder, you can reference it as AutoPlay\Docs\myfile.exe.

Variable

The variable the detected version number will be stored in. If the technology is not found and the user ignores the warning, the version number "0.0.0.0" will be stored.

Required

Require the installation of the technology before continuing. Choose from:

True

Do not allow the user to proceed unless the application is installed and the detection succeeds.

False

Allow the user to continue if they choose to ignore the requirement.

Module Information

This section is for informational purposes only. Here you will find information such as a description of the module, the author, email and Web addresses and copyright information.


Dependencies - Dialog

Dependencies

Overview Applications Dialog

Window title:

The text that will be displayed in the title bar of the Missing Applications dialog.

Message:

The message text that will be displayed for the application that has been detected as missing.

Abort button text:

The text that will displayed on the Abort button. When the user clicks this button, the dialog will close and the application will not be launched.

Continue button text:

The text that will be displayed on the Continue button. When the user clicks this button, the Missing Applications dialog will close and the application will be launched.

Show help button

Display a help button on the Missing Applications dialog. This button can be used to open a help document, or open a web site in the user's default browser.

Help button text:

The text that will be displayed on the Help button.

Help button link:

The help document path, or URL to open when the user clicks the Help button.

Click the browse button to select a file.


Databases

Databases

The Databases tab allows you to enable actions to interact with one or more database technologies. Enabling a checkbox will add the corresponding action categories to the Action Wizard, automatically add any necessary DLL files to your project when you build it, and include the (hidden) Lua script required to make those database actions available at run time.

See Database Actions for more information on how to use these databases in AutoPlay.

Database Support

MySQL

Enable support for MySQL databases. Selecting this option will automatically add the LuaSQL-MySQL module functionality to your project and make it available at run time. It will also add the MySQL, MySQLConnection, and MySQLCursor action categories to the Action Wizard.

Note that selecting this will cause 2 .dll files to be added to your Scripts folder at build time: libmysql.dll, and luasql\mysql.dll.

SQLite3

Enable support for SQLite3 databases. Selecting this option will automatically add the LuaSQL-SQLite3 module functionality to your project and make it available at run time. It will also add the SQLite3, SQLite3Connection, and SQLite3Cursor action categories to the Action Wizard.

Note that selecting this will cause 1 .dll file to be added to your Scripts folder at build time: luasql\sqlite3.dll.

Oracle

Enable support for Oracle databases. Selecting this option will automatically add the LuaSQL-OCI8 module functionality to your project and make it available at run time. It will also add the Oracle, OracleConnection, and OracleCursor action categories to the Action Wizard.

Note that selecting this will cause 2 .dll files to be added to your Scripts folder at build time: oci.dll and luasql\oci8.dll.

ODBC

Enable support for ODBC databases. Selecting this option will automatically add the LuaSQL-ODBC module functionality to your project and make it available at run time. It will also add the ODBC, ODBCConnection, and ODBCCursor action categories to the Action Wizard.

Note that selecting this will cause 1 .dll file to be added to your Scripts folder at build time: luasql\odbc.dll.

PostgreSQL

Enable support for PostgreSQL databases. Selecting this option will automatically add the LuaSQL-PostgreSQL module functionality to your project and make it available at run time. It will also add the PostgreSQL, PostgreSQLConnection, and PostgreSQLCursor action categories to the Action Wizard.

Note that selecting this will cause the following 10 .dll files to be added to your Scripts folder at build time:

luasql\postgre.dll
comerr32.dll
gssapi32.dll
k5sprt32.dll
krb5_32.dll
libeay32.dll
libiconv-2.dll
libintl-8.dll
libpq.dll
ssleay32.dll

Notice

The database functionality makes use of the LuaSQL library designed and implemented by the Kepler Project team.

Copyright © 2003-2007 The Kepler Project.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

PostgreSQL Data Base Management System

Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
Portions Copyright (c) 1994-1996 Regents of the University of California

Permission to use, copy, modify, and distribute this software and its documentation for any purpose, without fee, and without a written agreement is hereby granted, provided that the above copyright notice and this paragraph and the following two paragraphs appear in all copies.

IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.


Globals - Overview

Globals

Overview Global Functions Built In

The Globals dialog is a convenient place to include any functions or variables that you want to make available throughout your project. Any functions or variables that you add here will be available right after your AutoPlay application is launched.

AutoPlay Media Studio comes with some built-in global functions to make certain runtime tasks simpler. For a list of these functions, view the Built In functions topic.

Note: Any script that you add on this dialog will be performed before the project's On Startup event is triggered.

There is one tab on the Globals dialog:

  • Global Functions

Tip: To access the Globals dialog, choose Project > Global Functions from the menu.


Globals - Global Functions

Globals

Overview Global Functions Built In

Global Functions:

The area (code window) where you can either type in your actions, or add them through the action wizard to create your global functions.

Note: Any script entered here is loaded at runtime before anything else occurs. Therefore, any global script that interacts in any way with the Application window (e.g. Application.Exit) will not function correctly unless it is in a function, and is called from other events within your application. It is recommended that any script entered here is placed inside of a function.

Tip: To perform a task at the very beginning of your application, use the On Startup event.

Quick Help:

When the cursor is on an action in the code window, its action definition will be displayed in this field.

Action Help

When the cursor is on an action in the code window, its online help will be opened.

Add Action

Adds a new action to the current event through the action wizard.

Add Code

Displays a variety of code templates you can add to the code window.

Edit

Edit the action's properties after it has been added to the code window. When the cursor is on an action in the code window, the Edit button will display its properties dialog where you can modify its settings.

Bookmarks

Create and manage bookmarks in the code window so you can easily jump to specific spots in your code.

Macros

Allows you to record and play macros so you can replicate frequent code scripts in the code window.

Advanced

Advanced options that are available in the Globals dialog:

Syntax Check

This option checks the current script to make sure it is syntactically correct. It does not check for logical or other programming errors, simply syntax.

Note: You can turn on automatic syntax checking from Edit > Preferences on the Script Editor page.

Double-click Edit

Allow double-clicking on actions in the code window to edit their properties (Properties dialog will be displayed).

Note: If Double-click Edit is unchecked, double-clicking any text in the action editor simply selects the text, as in most other text editors. This option can also be set in Edit > Preferences on the Script Editor page.

Show Whitespace

If checked, any whitespace in the code window will be identified by special characters.

Import Registry Values...

Opens the Import Registry Key/Values dialog where you can import keys or values from the Registry on your development system.

Import .REG Files...

Opens a file browse dialog where you can select a .REG file that you would like to recreate using Setup Factory Registry actions.

Import...

Imports a script file (*.lua) and displays its contents in the code window.

Export...

Exports the current script in the code window as a script file (*.lua).

Print...

Prints the action script currently in the code window.

Editor Settings...

Opens the Window Properties dialog where you can customize the Globals dialog's settings.


Globals - Built In

Globals

Overview Global Functions Built In

AutoPlay Media Studio comes with some built-in global functions to make certain runtime tasks simpler.

Note: These optional functions are automatically called by your application. You do not call them in your script, only define them.

General Project Functions

General project functions are called by the application whenever something project-wide happens. These functions allow the developer to control how certain aspects of the published application behave.

g_OnSystemTrayMenu (number X, number Y)

Called whenever the user right-clicks on your application's system tray icon. Typically, you would use Application.ShowPopupMenu in this function to create a right-click popup menu from the system tray.

X:

The X coordinate, in pixels, in relation to the top left corner of the user's screen.

Y:

The Y coordinate, in pixels, in relation to the top left corner of the user's screen.

Returns:

Nothing.

Example:

function g_OnSystemTrayMenu(X, Y)
tblMenu = {};
tblMenu[1] ={};
tblMenu[1].Text = "&New Menu";
tblMenu[1].ID = 100;
tblMenu[1].Checked = false;
tblMenu[1].Enabled = true;
tblMenu[1].SubMenu = {};
tblMenu[1].SubMenu[1] = {};
tblMenu[1].SubMenu[1].Text = "&SubItem 1";
tblMenu[1].SubMenu[1].ID = 101;
tblMenu[1].SubMenu[1].Checked = false;
tblMenu[1].SubMenu[1].Enabled = true;
tblMenu[1].SubMenu[2] = {};
tblMenu[1].SubMenu[2].Text = "S&ubItem 2";
tblMenu[1].SubMenu[2].ID = 102;
tblMenu[1].SubMenu[2].Checked = false;
tblMenu[1].SubMenu[2].Enabled = true;

result = Application.ShowPopupMenu(X, Y, tblMenu, TPM_RIGHTALIGN, TPM_BOTTOMALIGN, true, false);

if(result ~= -1)then
Dialog.Message("Menu Item Selected",result);
end
end

QueryAllowProjectClose ( )

Called whenever the project is 'told' to close. Using this function, you can control how the user can close the application, such as confirming with the user that they intended to close the application.

Returns:

True if the application should close, false if it should not close.

Example:

function QueryAllowProjectClose()
result= Dialog.Message("Application Exit", "Are you sure that you want to quit?", MB_YESNO, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
--if they choose yes
if result == IDYES then
--allow the app to close
return true;
else
--cancel close
return false;
end
end

g_OnGetMinMaxInfo ( )

Called whenever the application is resized at runtime. Using this function, you can set the minimum and maximum application window size for your project. If 'Resizable' is not checked in your application's Project Settings, this function is ignored.

Note: If this function is not defined then window size during a resize will not be restricted.

Note: The Min. height and Min. width settings on the Appearance tab of the Project Settings dialog can also be used to set a minimum page height and width, however this function will override those values.

Returns:

A table indexed by the following keys:

KEY | TYPE | DESCRIPTION
MinX | number | The minimum window width in pixels. Note that there is an absolute minimum size allowed by Windows if you have a title bar displayed.
MinY | number | The minimum window height in pixels. Note that there is an absolute minimum size allowed by Windows if you have a title bar displayed.
MaxX | number | The maximum window width in pixels.
MaxY | number | The maximum window height in pixels.

Tip: Do not set any of the values above which you do not want to restrict. For example, if you only want to set a minimum height but not restrict sizing in any other way then only define the MinY value.

Example:

-- Restrict the window size to 200x100 minimum
-- and 800x600 maximum:
function g_OnGetMinMaxInfo()
tbReturn = {};
tbReturn.MinX = 200;
tbReturn.MinY = 100;
tbReturn.MaxX = 800;
tbReturn.MaxY = 600;

return tbReturn;
end

Dialog Functions

Dialog functions are called by the application whenever dialogs are used. These functions allow the developer to control how certain aspects of the dialog behave.

QueryAllowDialogClose (string DialogName )

Called whenever the dialog is 'told' to close. Using this function, you can control how the user can close the dialog, such as confirming with the user that they intended to close the dialog. This function will be called before the dialog's On Close event.

DialogName

A string containing the name of the dialog you want this function to be used on.

Returns:

True to allow the dialog to close, false to not close it.

Example:

function QueryAllowDialogClose(strDialogName)
result= Dialog.Message("Close Dialog", "Are you sure that you want to close the dialog?", MB_YESNO, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
--if they choose yes
if result == IDYES then
--allow the dialog to close
return true;
else
--cancel close
return false;
end
end

Menu Bar Functions

Menu Bar functions are called by the application at runtime to allow the developer to dynamically enable/disable and check/uncheck menu items. By default these functions are not defined (and therefore will do nothing). These functions will only perform tasks if they are defined by the developer at design time.

boolean g_OnUpdateMenuEnabled (number CommandID, table ItemInfo)

Accepts both a Command ID and a table of item information from the AutoPlay runtime. Should return true if the current item should be enabled, and false if the current item should be disabled.

CommandID:

The ID of the currently selected menu item.

ItemInfo:

A table of information about the currently selected item, indexed by the following keys:

KEY | TYPE | DESCRIPTION
ID | number | The numeric ID of the menu item.
Text | string | The text of the menu item. Note that a separator item's Text is set to "---".
IconID | number | The 0-based icon index from the Image List specified on the Menu Bar for the menu item.
Enabled | boolean | Whether the menu item is enabled.
Checked | boolean | Whether the menu item is checked.
SubTable | table | A numerically indexed table of menu item tables if child elements exist, or nil if no child elements exist.

Returns:

True if the current item should be enabled, false if the current item should not be enabled.

Example:

function g_OnUpdateMenuEnabled(CommandID,tblInfo)
-- Disable command 2000
if (CommandID == 2000) then
return false;
else
return true;
end
end

boolean g_OnUpdateMenuCheck (number CommandID, table ItemInfo)

Accepts both a Command ID and a table of item information from the AutoPlay runtime. Should return true if the current item should be checked, and false if the current item should not be checked.

CommandID

The ID of the currently selected menu item.

ItemInfo

A table of information about the currently selected item, indexed by the following keys:

KEY | TYPE | DESCRIPTION
ID | number | The numeric ID of the menu item.
Text | string | The text of the menu item. Note that a separator item's Text is set to "---".
IconID | number | The 0-based icon index from the Image List specified on the Menu Bar for the menu item.
Enabled | boolean | Whether the menu item is enabled.
Checked | boolean | Whether the menu item is checked.
SubTable | table | A numerically indexed table of menu item tables if child elements exist, or nil if no child elements exist.

Returns:

True if the current item should be checked, false if the current item should not be checked.

Example:

function g_OnUpdateMenuCheck(CommandID,tblInfo)
-- Uncheck command 2000
if (CommandID == 2000) then
return false;
else
return true;
end
end


Plugins - Overview

Plugins

Overview Action Plugins

Action plugins are actions that are external to the AutoPlay Media Studio program. They are independently developed and distributed and can be integrated into your projects to extend their functionality. Some action plugins may be developed by Indigo Rose, while others may be developed by third parties. You can refer to the action plugin's documentation (click the about plugin button on the Action Plugins dialog) for information on what features it adds and how to use them.

Note: As of AutoPlay Media Studio 8.0, only plugins created with version 2.0 of the SDK (or higher) are supported.

Note: Any action plugins that are located in Plugins\Actions within the AutoPlay Media Studio program directory, and that were created with version 2.0 (or higher) of the Plugin SDK, will be available through the design environment by choosing Project > Plugins.

Tip: To access the Action Plugins dialog, choose Project > Plugins from the menu.


Plugins - Action Plugins

Plugins

Overview Action Plugins

Available action plugins:

These are the available action plugins that can be added to your project. You can add an action plugin to your project by checking the box beside its title in the list.

About Plugin

You can view information about any of the added plugins by first highlighting one, then clicking the about plugin button. This will open the About Plugin dialog where you will find information such as the name, file, version and copyright information. On the About Plugin dialog you will also find a plugin help button which will open a document that provides details about its features and usage.

Note: If the action plugin was developed by a third party, details about its features and usage may vary.

Plugin information:

A display of information about the plugin such as its name, author and copyright. This information may vary between authors.

More Plugins...

Clicking this button opens the Indigo Rose website in your default browser, where you can purchase plugins for AutoPlay Media Studio.


File Layout - Overview

File Layout

Overview

While Autoplay Media Studio automatically manages all of the files in your project, there may be situations where you need to add additional files to certain locations on the CD-ROM such as installers containing additional dependency files, or files that are not referenced in your project. The File Layout dialog is designed to let you see the directory structure that will be created on the CD-ROM, and let you add and remove files and folders as you need.

The dialog is organized into two areas:

My Computer

The My Computer area contains a Windows folder view of your system. It is split into a folder view on the left hand side and a file view on the right hand side containing the contents each folder. This allows you to browse your local system to select the files you want to add to your project.

Up

Move up one level in the folder view's hierarchy.

My Project

The My Project area contains a Windows folder view of your project as it will be created on the CD-ROM. It is split into a folder view on the left hand side and a file view on the right hand side containing the contents of each folder. This allows you to select a file in the My Computer area and add it to a specific folder in your project.

Note: The CD_Root folder can be seen as the root of the finished CD-ROM. Any files that are referenced in your project through actions should include relative paths, such as _SourceFolder .. "\\AutoPlay".

Up

Move up one level in the folder view's hierarchy.

Add to Project

Add the selected files from the My Computer panel to the selected folder in the My Project panel.

Tip: You can also drag and drop files from the My Computer panel to the My Project panel.

Delete

Remove the selected files or folders from your project.

Note: You cannot remove the default project folders such as "Docs", "Images" etc.

New folder

Create a new folder in the project's layout.


Publish Menu

Program Menus

Overview File Edit Align Page Dialog Object Project Publish View Tools Help

Preview

Previews the current project.

Build...

Opens the Publish Project dialog where you can choose the publishing method you want to use.


Publishing - Overview

Publishing

Overview

Publishing is the process of building your project into a final application.

There are 4 publishing methods you can choose from:

  • Burn data CD/DVD/Blu-Ray

  • Hard drive folder

  • Web/Email executable

  • ISO image

Tip: To access the Publish Project dialog, choose Publish > Build from the menu, or press F7.

Tip: You can compress the AutoPlay runtime executable during the build process using the UPX runtime (not compatible with runtime skins) build preference. You can find this setting on the Build page of Edit > Preferences.


Hard Drive Folder

Publishing

Overview Hard Drive Folder

Tip: You can compress the AutoPlay runtime executable during the build process using the UPX runtime (not compatible with runtime skins) build preference. You can find this setting on the Build page of Edit > Preferences.

Target: Hard Drive Folder

Output folder:

The folder on your system where you want to publish your AutoPlay application. Click the browse button to select a folder.

Executable filename:

The filename you want for your AutoPlay application executable. This is what the executable file will be named after it is built.

Note: If you have the Enable AutoPlay Feature selected, the executable filename cannot contain spaces.

Options

Enable AutoPlay feature

Select this option if you want AutoPlay Media Studio to include the autorun.inf file for you.

Windows searches for the autorun.inf file whenever you insert a CD into a CD-ROM drive. The file tells Windows what program to run if the user has autorun enabled on their system. AutoPlay Media Studio will automatically configure the file to launch your AutoPlay application.

Timestamp files

Stamp the files being published with the current date and time.

Rename resource files

Rename your resource files when you publish your AutoPlay application. This option is designed to obscure the filenames of your resource files during publishing. Caution should be taken when using this feature. We strongly suggest testing your application fully after publishing to ensure everything still works correctly.

Any resources that you reference directly in your project will automatically be copied and renamed when you publish your project. This feature is available for the following project resource directories:

Audio
Buttons
Flash
Images
Videos

All resource files located in the above directories will be copied from their project directories, renamed and placed into a main data directory. The naming convention used for the resource files has the prefix "ap" followed by a number and ending with the ".dat" file extension. For example, "ap1.dat", "ap2.dat" etc. All files will be copied into a data directory called "dat01".

Note: Resources located within the following folders will NOT be renamed: "Docs", "Icons", "Plugins" and "Scripts". There are also a couple situations where renaming resource files may fail:

If a resource is referenced from an external Lua file, it's reference may not be changed causing it to fail at runtime.
If a resource file path is composed of variables that are concatenated together to form a path to a resource file, the file may not be found.

Normally when a project is published, the *.cdd file (by default called autorun.cdd) is copied to the AutoPlay directory of the output folder. If the Rename Resource Files option is selected, the *.cdd file is copied into the root of the output folder.

Data folder name:

The folder name you want to create that will contain your resource data directories when you publish your project. This option is only available when Rename Resource Files is selected.


Web/Email Executable

Publishing

Overview Web/Email Executable

Tip: Occasionally you may need the location your compressed executable was launched from. For this reason a command line argument is passed into your AutoPlay application in the form: SFXSOURCE:SFE EXE NAME where "SFE EXE NAME" is the full path to the compressed executable. For example, "SFXSOURCE:C:\Temp\launcher.exe". In your AutoPlay application you can access this command line argument using the Global Variable _CommandLineArgs. If any command line arguments are passed to the compressed executable, they will also be passed into the AutoPlay application.

Tip: You can compress the AutoPlay runtime executable during the build process using the UPX runtime (not compatible with runtime skins) build preference. You can find this setting on the Build page of Edit > Preferences.

Target: Compressed Executable

Filename:

The name of the executable you want to compress your project into. Click the browse button to show the Save As dialog.

Note: If you have the Enable AutoPlay Feature selected, the executable filename cannot contain spaces.

Progress Window

Show progress window

Display a progress meter while your AutoPlay application loads.

Window title

The progress window's title bar text to display while your AutoPlay application loads.

Options

Encrypt data segment

Encrypt the project data that is stored in the compressed executable. This prevents the project's files from being extracted directly from the executable with a zip utility like WinZip.

Note: This feature is only meant to deter casual users from accessing the files. Even with this option enabled, the files must still be extracted to a temporary location on the hard drive as the application loads. A savvy user could use this fact to gain access to the files from that temporary location. If you require a more secure solution, you will need to take additional measures.

Enable AutoPlay feature

Select this option if you want AutoPlay Media Studio to include the autorun.inf file for you.

Windows searches for the autorun.inf file whenever you insert a CD into a CD-ROM drive. The file tells Windows what program to run if the user has autorun enabled on their system. AutoPlay Media Studio will automatically configure the file to launch your AutoPlay application.


Data CD/DVD

Publishing

Overview Data CD/DVD/Blu-Ray

Note: CDs are published in Joliet format. Joliet is a more common format among Windows users because it supports greater file and directory lengths. We recommend the Joliet format for Windows users.

To prevent pathing and file inclusion errors when burning, you are required to conform to the rules in the Joliet specification.

Tip: You can compress the AutoPlay runtime executable during the build process using the UPX runtime (not compatible with runtime skins) build preference. You can find this setting on the Build page of Edit > Preferences.

Target: Data CD/DVD/Blu-Ray

CD/DVD/Blu-Ray writer drive:

The drive you want to use to burn your CD-R/CD-RW, DVD±R/DVD±RW or BD-R/RE. Click the select button to choose an available drive.

Executable filename:

The filename you want for your AutoPlay application executable. This is what the executable file will be named after it is built.

Note: If you have the Enable AutoPlay Feature selected, the executable filename cannot contain spaces.

Options

Volume identifier:

The volume identifier to use for the CD/DVD-ROM/Blu-Ray. This is the name that Windows will use to identify the CD/DVD/Blu-Ray.

Enable AutoPlay feature

Select this option if you want AutoPlay Media Studio to burn the autorun.inf file for you.

Windows searches for the autorun.inf file whenever you insert a CD/DVD/Blu-Ray into a CD/DVD-ROM/Blu-Ray drive. The file tells Windows what program to run if the user has autorun enabled on their system. AutoPlay Media Studio will automatically configure the file to launch your AutoPlay application.

Cache file data

If this option is enabled, the CD/DVD/Blu-Ray image will be created in a temporary directory first, and then the image will be written to the disc from the temporary file. If you are writing from a network location, including many smaller files (under 1K), or using a slower system, this setting is recommended to help avoid buffer underrun errors.

Note: Using this feature can result in usage of up to 800MB of temporary hard drive space.

Use burn proof

This option prevents the write operation from being aborted if a buffer underrun is encountered. A buffer underrun occurs when your computer cannot keep up with the steady stream of data it needs to supply while burning your CD. If the supply of data from your computer is interrupted long enough for the CD writer's internal buffer to be emptied, the burn process will fail. Newer drives typically provide some form of "burn proof" technology that allows the burn process to continue after a buffer underrun.

Note: Some CD writers do not employ any burn proof technology. If your drive does not, the Use Burn Proof option will be disabled.


ISO Image

Publishing

Overview ISO Image

Note: ISO images are published in Joliet format. Joliet is a more common format among Windows users because it supports greater file and directory lengths. We recommend the Joliet format for Windows users.

To prevent pathing and file inclusion errors when generating and burning the ISO, you are required to conform to the rules in the Joliet specification.

Tip: You can compress the AutoPlay runtime executable during the build process using the UPX runtime (not compatible with runtime skins) build preference. You can find this setting on the Build page of Edit > Preferences.

Target: ISO Image

Filename:

The name of the ISO image file that you want to save your AutoPlay application as. Click the browse button to display the Save As dialog.

Executable filename:

The filename you want for your AutoPlay application executable. This is what the executable file will be named after it is built.

Note: If you have the Enable AutoPlay feature selected, the executable filename cannot contain spaces.

Options

Volume identifier:

The volume identifier to use for the CD/DVD-ROM/Blu-Ray. This is the name that Windows will use to identify the CD/DVD/Blu-Ray.

Enable AutoPlay feature

Select this option if you want AutoPlay Media Studio to include the autorun.inf file for you.

Windows searches for the autorun.inf file whenever you insert a CD/DVD/Blu-Ray into a CD/DVD-ROM/Blu-Ray drive. The file tells Windows what program to run if the user has autorun enabled on their system. AutoPlay Media Studio will automatically configure the file to launch your AutoPlay application.


View Menu

Program Menus

Overview File Edit Align Page Dialog Object Project Publish View Tools Help

Toolbars

Shows or hides the available toolbars.

Standard

Shows or hides the standard program toolbar.

Objects

Shows or hides the objects toolbar.

Pages

Shows or hides the pages toolbar.

Alignment

Shows or hides the alignment toolbar.

Panes

Shows or hides the available panes.

Properties

Shows or hides the properties pane.

Project Explorer

Shows or hides the Project Explorer pane.

Project Size

Shows or hides the Project Size pane.

Gallery Browser

Shows or hides the Gallery pane.

System Browser

Show or hide the System pane.

Project Browser

Shows or hides the Project pane.

Resource Preview

Shows or hides the Resource Preview pane.

Object Browser

Shows or hides the Object pane.

Script Editor

Shows or hides the Script Editor pane.

Tabs

Shows or hides the page or dialog tabs.

Status Bar

Show or hide the status bar.

Layouts

Allows you to customize the workspace layout for the AutoPlay design environment.

Default

The default AutoPlay Media Studio layout.

AutoPlay Menu Studio 3.0

A layout modeled after the design environment of AutoPlay Menu Studio 3.0.

AutoPlay Media Studio 4.0

A layout modeled after the design environment of AutoPlay Media Studio 4.0.

AutoPlay Media Studio 5.0

A layout modeled after the design environment of AutoPlay Media Studio 5.0.

AutoPlay Media Studio 7.0

A layout modeled after the design environment of AutoPlay Media Studio 7.0.

Save...

Saves the current workspace layout.

Remove...

Removes a workspace layout.

Previous Tab

Displays the previous page or dialog in your project.

Next Tab

Displays the next page or dialog in your project.

Find Page/Dialog...

Opens the Goto Page/Dialog dialog where you can enter the name of the page or dialog you would like to jump to in your project at design time.

Refresh

Refreshes the AutoPlay Media Studio design window.

Grid

Shows or hides the grid.

Snap to Grid

Turns the snap to grid feature on or off. The snap to grid feature snaps objects to the grid when the objects are moved or resized.

Tip: Even with this option enabled, holding down the shift key while dragging an object will temporarily disable snapping.

Snap to Page/Dialog

Turns the snap to page/dialog feature on or off. The snap to page/dialog feature snaps objects to the page or dialog edges when the objects are moved or resized.

Tip: Even with this option enabled, holding down the shift key while dragging an object will temporarily disable snapping.

Guidelines

Turns the guidelines on or off.

Ruler

Shows or hides the ruler.


Tools Menu

Program Menus

Overview File Edit Align Page Dialog Object Project Publish View Tools Help

Button Maker

Opens the AutoPlay Media Studio Button Maker. The button maker allows you to create custom buttons to use in your projects.

Optimize Resources...

Opens the Remove Unused Resources dialog where you can remove any unused files from your project's resources.

Script Explorer...

Opens the Script Explorer dialog where you can edit all scripts within your project from one central location.

Script Editor

Opens the Indigo Rose Script Editor application. This is a stand-alone program allowing you to edit action scripts outside of AutoPlay with support for syntax highlighting, intellisense code completion and help file integration. This application is named "IRScriptEditor.exe" and can be found in the AutoPlay program folder.

Open Source File

Open's the source file, if any, of the currently selected object for editing.

Note: By default, choosing this option will open the selected object's source file exactly as the file would be opened if the user had double-clicked it in windows. However if you want to use a specific program to open a specific file extension (e.g. Photoshop for .jpg files), you can define a list of programs that can be used to open the selected file and even pass the program specific command line arguments using the File Association Preferences.

Customize...

Opens the Customize dialog where you can create custom toolbars, shortcut keys or link to external programs.


Script Explorer - Overview

Script Explorer

Overview Interface

The script explorer is a dialog allowing you to edit any script in your project from one central location. This dialog is divided into four sections: two script editors and two tree views containing all of the scripts from your project in hierarchical lists.

The script editor sections are areas within the script explorer dialog where you can add actions or scripts to the selected event. For more information on the overall interface of this dialog, see the interface topic.

Tip: An easy way to access the script explorer dialog is to choose Tools > Script Explorer.


Help Menu

Program Menus

Overview File Edit Align Page Dialog Object Project Publish View Tools Help

AutoPlay Media Studio Help

Opens the online help for AutoPlay Media Studio.

User's Guide

Opens the online help to the user's guide for AutoPlay Media Studio.

Ordering Information

Opens your web browser to a web page where you can find ordering information for AutoPlay Media Studio.

Buy Now

Opens your web browser to a web page where you can order AutoPlay Media Studio and other Indigo Rose products online.

Home Page

Opens the your web browser to the Indigo Rose web site.

Technical Support

Opens your web browser to the Technical Support and Software Maintenance page.

User Forums

Opens your web browser to a web page where you can find our online user forums.

Check for Update...

Checks the Internet to see if a newer version of AutoPlay Media Studio is available.

About AutoPlay Media Studio...

Opens the About dialog which shows the copyright and version information for AutoPlay Media Studio. Use this whenever you need to find out what version of AutoPlay Media Studio you currently have.


General Info

Contents

Please select one of the following subjects:

Tips

Windows Basics

ASCII Table

Using International Character Sets

Authenticode Code Signing

Callback Functions

Drag and Drop Assistant

Guidelines

Hidden Global Functions

Input Mask

Language ID Codes

Project Explorer

Supported File Types

System Restore Monitored File Extensions

Tab Order

Virtual Key Codes

XML Actions Concepts

Z-Order

XAML Syntax


Tips

Helpful Tips

Contents

Please select one of the following subjects:

Planning Your Project

Naming Objects

Naming Variables

Using Variables

Using Comments

Using Whitespace


Planning Your Project

Helpful Tips

Contents Planning Your Project

(A guest topic by AutoPlay beta tester Derek Johnson.)

Before you start your project you need to consider whom the project is for and what is required of it.

If the project is for your own use, it is a good idea to compose a list of what it will do, the type of media you want to include in it, and how it is to be designed. A quick sketch of the basics is always a good place to start.

If the project is for a customer, you have much more to include. The basics are the same, of course. In this project, the customer may want to be involved to a certain degree. There are times the customer will give you the go-ahead to create a project using your own initiative and will only be interested in the finished product. You should get into a habit of discussing the idea behind the project and what it will be used for. Will the project form part of an application for the work they carry out, or will it be used for presentation? And for whom? Some companies may need the project for their own use only, while others will surely be showing it to their customers.

Additionally, you should seek out the ideas that your customer has for the project. Some customers will already have an idea in mind as to how they want the project to run—and may even have a sketch for you to use. Company media, too, may need to be included in the project, such as a company logo. All this needs to be acquired in advance, along with any other content they want in the project. After all, they are the customer!

Once you have all the information necessary from the customer and have acquired any media that needs to be included, you should go through your sketch again to ensure that you are happy with the overall layout and design. Once you are happy that the project will work in theory, it is time to create it.

Included Media

There is a lot of media that can be included in Autoplay Media Studio. You might find it easier to edit any graphics and video before you start.

Internet web pages are also something you may want to consider. If you are linking to the Internet for information, make sure you have the necessary permission and licenses before starting your project. Don't forget, too, that a web page on the Internet today, may not be there tomorrow. The internet is changing daily and it might be a preferable strategy to include a copy of the web pages in you project instead of linking to them—if this is permissible!


Naming Objects

Helpful Tips

Contents Naming Objects

Every object has a name. The name is what identifies the object on the page. Every object on a page must have a unique name—in fact, AutoPlay Media Studio won't let you give two objects on a page the same name.

When you add a new object, it is automatically given a default name like "Label1" or "Image8." Each time you add another image of the same type, AutoPlay adjusts the number to make sure the new object's name is unique. For example, when you add two button objects in a row to a blank page, the first object would be named Button1, and the second object would be named Button2.

Now, suppose you added 12 more button objects to the page. You would have 14 objects with names from Button1 all the way to Button14. Which is okay, if you don't need to refer to those objects at all...and some objects are like that, just sitting on the page, never needing to be the target of an action like Button.SetVisible or Button.SetText. But as soon as you want to perform an action on an object, things can get tricky if they all have relatively meaningless names.

The problem with the default names is that they don't give you any indication of what the object is used for. Sure, you could remember that "Button9" is the one with "Install Files" in it, and "Label4" is the one that you display the user's name in. But chances are, you'll forget which object is which, or you'll come back to your project after an especially long weekend and find yourself wishing you gave the objects better names.

Which is exactly what you should do whenever you add an object: give it a meaningful name.

Giving objects names that you can easily recognize helps you make sure that the object you're working on is the object you wanted to be working on. So, give each object a name that you can remember...and make sure it's an object name that will still make sense to you three months from now when you come back to make changes to the project.

(The only exception is if you know for sure that the object will never need to be the target of an action, or if you're working on a simple project that only has three objects in it.)

So What Makes a Good Object Name?

There are no hard and fast rules for naming objects—other than the fact that you can't have two objects on a page with the same name, the sky's the limit on what you call the little critters. Before you start naming everything after your late great uncle's exotic collection of sea shells, though, it pays to consider the following bits of advice.

  • Use simple, descriptive, meaningful names for your objects. Don't call an image object that has a picture of a rose in it "Smells Better Than My Socks." Call a rose a rose, and name the object something like "Rose Image" or even just "Rose." If you have more than one rose image on the page, try making the names a bit more specific: "Pink Rose," "Red Rose 3," etc.

  • Using the object type in the name is an easy way to prevent two different types of objects from having the same name. You can't name a label object "Starship" if you already have an image object named "Starship" on the same page. Instead, either name everything with a prefix or suffix that identifies the object type ("Label - Starship" or "Starship Label"), or simply be more specific ("Starship Name").

  • Of course, don't feel like you have to mention the object type in the name (e.g. "Songs ListBox" vs. "Songs"). You can always use the object browser to view the list of objects by object type, no matter what you name your objects.

  • It's perfectly okay to use spaces...you don't have to name your objects things like "MyNameHasNoSpacesInIt" or "I_am_a_l33t_programmer_look_at_my_nifty_object_name" unless you've worn out the space bar on your keyboard.

  • Be descriptive. Shorter names will not make your application run faster. You don't have to use cryptic abbreviations in your names.

  • All else being equal, shorter names are usually easier to type. If you plan to do any scripting with the object, you might want to avoid overly long names, just to avoid having to type all the letters over and over again. (If you're a touch typist, though, full words are usually easier to type than abbreviations.)

  • Have fun with the names. Go ahead...call your exit button "Exit button...tally-ho!" Name an image "Jose's favorite sunset photo" in honor of your pet iguana. No one but you will ever see them. Well, except perhaps your coworkers, and maybe your boss, and Indigo Rose tech support...okay, on second thought, don't have too much fun with your names.

  • Try to pick names that will sort the way you want them to. Instead of "Left Image" and "Right Image", use "Image - Left" and "Image - Right." This way, related objects will appear next to each other when you select a name in the New Action wizard or view the objects in the object browser (a.k.a. the "Objects" panel).


Naming Variables

Helpful Tips

Contents Naming Variables

You can name your variables almost anything you like, but there are a few rules and guidelines you should follow:

  1. Variable names can only contain letters, digits and underscores.

    Variable names can be made up of any combination of letters, digits and underscores as long as they do not begin with a number and do not conflict with any reserved keywords.

  2. Variable names are case sensitive.

    The names MyVar and myvar each refer to a different variable.

  3. Don't use any hyphens (-) in your variable names.

    The hyphen is used as an operator in AutoPlay. If you put an operator in a variable name, it will "break up" the variable into two separate variables, resulting in a syntax error (if you're lucky) or some kind of unexpected behaviour at run time. For example, Foo-Bar would be seen as subtracting the value of "Bar" from the value of "Foo" using the "-" operator.

  4. Try to use meaningful names.

    For example, if you read a product's installation date from the Registry, naming the variable Greegleborg452sx probably isn't a good idea. Use a variable name like InstallDate instead.

  5. Use prefixes to your advantage.

    A common tactic among programmers is to use short prefixes like "str" and "n" to mark variables according to what kind of data they contain—such as string or numeric values. Although AutoPlay's variables can hold any type of value at any time, it can still be helpful to use prefixes in your variable names. For example, using this system the name strResult would be used to contain a string, and the name nResult would be used to store a number. Prefixes help make your intentions clear in such cases where the name is somewhat ambiguous on its own.

  6. Be consistent.

    If you start out with UserName and UserAge, don't name your third variable WhereTheUserGoesToWork. A name like UserCompany will be easier to remember when you find yourself asking "what did I name that variable, again?"

  7. Don't use any of the action category names.

    Action names are made up of a category, like Application or File, followed by a dot and a function name, like Exit or Copy. For example, the Application.Exit action is located in the "Application" category, and the File.Copy action is located in the "File" category.

    Using a variable name like "Application" or "File" will cause all of the actions in that category to be inaccessible. This is because the action names are implemented as tables containing functions. For example, the File category is internally represented by a table containing the various file functions like Copy, Find, and Open.

    Since assigning a value to a variable overwrites any value that is already in the variable, assigning a value to a variable named "File" will replace the File category with your value.

    So, as a general rule, never name your variables anything that appears to the left of a period in an action name.

  8. Don't assign a value to a built-in variable by mistake.

    For example, assigning a value to a variable called _SystemFolder would override the built-in variable with the same name. Take time to familiarize yourself with the list of built-in global variables so you don't use any of them by accident.

  9. Don't use the same variable name twice unless you mean to.

    Using a name twice is fine if you're assigning a value to a variable in one place, and accessing that value in another. Just be careful not to unintentionally give the same name to two variables if they're being used to represent two different things.

    Of course, it's okay to assign a value to a variable twice if you want its value to change. In that case, the first value will only be in effect until the second one "overwrites" it.

  10. Avoid using accented characters in variable names.

    We recommend avoiding variable names with accented characters. Some characters have been known to cause issues.

  11. When in doubt, double-check.

    A common mistake is to name a variable one thing in one part of your project, and start calling it something else later. If you're not sure what name you used, double-check by going back to the place where you defined the variable.


Using Variables

Helpful Tips

Contents Using Variables

Here are some general notes on using variables:

  1. Variables are automatically "created" the first time a value is assigned to them.

  2. Variables are essentially typeless. You don't have to "declare" variables to be of a specific type, like in some programming languages. Instead, variables can hold any type of value. You can freely assign a string to a variable that currently contains a number, and vice-versa. (This doesn't mean that types aren't important...the type of the value itself still matters for actions and functions and such.)

  3. Variables are global by default. This means that once a variable is created, it is available throughout your project (unless you specifically make it a local variable).

Note: Variables persist across pages and dialogs. This means that variables hold their values across pages and dialogs. If you assign a value to a variable on one page or dialog, it will still have that value on another page or dialog—and another—and another—until eventually you assign something else to that variable.

  4. Once a value has been assigned to a variable, it will continue to contain that value until you assign something else to it.

    It's important to remember this when you're using variables to control the "state" of things on a page or dialog (like remembering whether the user turned the background music off).     If you need a variable to have a default value whenever a page or dialog is shown, you'll need to set that default value yourself, by assigning a value to the variable in that page's On Preload event.

  5. Order is important.

    When creating and using variables, be sure to think about when and where they will be used, and what their values will be at that point in time. A variable that is only assigned a value on the last page of your AutoPlay application won't have a value when your application starts up.

    For example, let's say you use a Dialog.Input action that asks the user for their name and stores it in a variable called UserName. It's important to realize that UserName won't contain the user's name until after that Dialog.Input action is performed. If the action is only performed when Page2 opens, UserName won't have a value earlier on when Page1 is shown. In this case, using UserName in a Label.SetText action on Page1 would result in an error because Label.SetText is expecting a string value, but UserName doesn't contain a string. (It contains nothing, represented by the keyword "nil.")

    The same is true for using variables within a script. When you assign a value to a variable, the value doesn't get assigned to the variable until that line of script is performed; in other words, it's value is only available to the actions that come "later." If you try to use the variable in an action higher "up" in the same script, or use it in another event that happens "earlier," the variable either won't have a value yet, or it won't have the value you expected it to have, and your AutoPlay application will either generate an error or not behave as you intended. (This is why it's important to test your application thoroughly before releasing it to the public.)

    A variable is only available to the parts of the your application that are performed after the variable is created. If you want to use a variable in an action on Page4, make sure a value is assigned to the variable before that action is performed.

  6. The built-in variables are listed along with all of the actions and constants when you press Ctrl+Space in the script editor. Since all of the built-in variables start with an underscore, if you type _ and then press Ctrl+Space, you'll be taken right to the first built-in variable in the list.


Using Comments

Helpful Tips

Contents Using Comments

Comments are just bits of text that are completely ignored by AutoPlay. You can use comments to add notes to your scripts in order to make them easier to understand.

Note: Because the text will be ignored, you can write anything you want in a comment, and it will have no effect on how your application operates.

In AutoPlay, anything after two dashes (--) on a line is a comment. You can either put comments on their own line, like this:

-- Assign 10 to variable abc
abc = 10;

...or put them at the end of a line, like this:

abc = 10; -- assign 10 to abc

Both of the above examples do the exact same thing—the comments do not affect the script in any way.

You can also create multi-line comments by putting paired square brackets ([[ and ]]) around the comment text, like this:

--[[ This is
a multi-line
comment ]]
abc = 10;

Note: Comments are displayed in a different color that makes them easy to recognize in the script editor. (The comments are displayed in green by default, but you can change this color in the script editor settings.)

Comments Save You Time and Effort

You should make a habit of adding comments to your scripts as you build them. If adding comments seems like a waste of time, consider how much time you will spend working on these scripts in the future. Complex scripts that make perfect sense to you now might take a few minutes to interpret the next time you need to make changes to a project. A few comments written while things are fresh in your mind can minimize the amount of re-thinking required.

Comments are especially important in a multi-user environment. If it's foreseeable at all that someone else may need to work on your project in the future, do your organization a favor and document your actions well.

Here are some tips for using comments:

  • Use comments to summarize large blocks of actions. This way, you only have to read the comment to know what the actions do. It's easier to read one line of text than it is to decipher a long list of actions.

  • Use comments to explain why an action is needed. This is especially important when the purpose of an action isn't obvious.

  • Use comments to highlight important actions, or to label different parts of your scripts so they're easier to find.

  • Use comments in a team environment to help keep track of changes (and who made them).

  • Use comments to document the decision process that led you to choose one approach over another. This could save you time if you ever find yourself considering other approaches again.

  • Use comments appropriately. Don't waste time explaining simple actions that are readily apparent.

Think of comments as investing a little bit of time now to save you a lot of time over the long run. You only have to write a comment once, but you will benefit from the comment many times over. In the long run, well-written comments will save you time, time and time again.

Tip: Use comments. You'll thank us later.

An Example of Good Comments

Here's a real-world example showing how a few comments can help clarify even a short, simple script.

First, the script without any comments:

nPos = String.ReverseFind(e_URL, "#", true);

if nPos then
strPage = String.Mid(e_URL, nPos + 1, -1);
Page.Jump(strPage);
end

The script is simple enough, but it becomes even clearer once some comments have been added:

----------------------------------------------------------------------
-- jump to a page when the user clicks on a link in this web object --
----------------------------------------------------------------------

-- search the target URL from right to left for a number sign (#)
nPos = String.ReverseFind(e_URL, "#", true);

-- did we find a # ?
if nPos then

-- get everything to the right of the #
strPage = String.Mid(e_URL, nPos + 1, -1);

--[[ jump to the page name that we extracted from
the URL. If there is no page by that name,
this Page.Jump won't do anything. ]]
Page.Jump(strPage);
end


Using Whitespace

Helpful Tips

Contents Using Whitespace

"Whitespace" is a term programmers use to describe things like blank lines, tab characters and spaces that are used to improve the readability of their code. You can use whitespace to make your AutoPlay scripts easier to read.

Unless they are contained within a string, whitespace characters (like spaces and tabs) are completely ignored by the AutoPlay application at run time. Their only purpose is to allow you to separate and format your actions a little and make your scripts easier to read.

For example, separating groups of actions with one or more blank lines makes it easier to recognize that the actions are meant to work together as a group. This is especially useful when combined with comments...a single comment can explain an entire group actions this way. Take a look at the following script:

Debug.ShowWindow(true);
file = _TempFolder .. "\\MyTempFile.tmp";
-- convert that path into its various parts
path_parts = String.SplitPath(file);
-- display the parts on the debug window
Debug.Print("Drive: " .. path_parts.Drive .. "\r\n");
Debug.Print("Folder: " .. path_parts.Folder .. "\r\n");
Debug.Print("Filename: " .. path_parts.Filename .. "\r\n");
Debug.Print("Extension: " .. path_parts.Extension .. "\r\n");
-- get the file's current attributes
attrib = File.GetAttributes( file );
-- override a couple of the values in the table
attrib.ReadOnly = true;
attrib.Hidden = false;
-- set the modified attributes back to the file
File.SetAttributes( file, attrib );

A bit hard to read, isn't it?

Now here's the same script with a few blank lines added:

Debug.ShowWindow(true);

file = _TempFolder .. "\\MyTempFile.tmp";

-- convert that path into its various parts
path_parts = String.SplitPath(file);

-- display the parts on the debug window
Debug.Print("Drive: " .. path_parts.Drive .. "\r\n");
Debug.Print("Folder: " .. path_parts.Folder .. "\r\n");
Debug.Print("Filename: " .. path_parts.Filename .. "\r\n");
Debug.Print("Extension: " .. path_parts.Extension .. "\r\n");

-- get the file's current attributes
attrib = File.GetAttributes( file );

-- override a couple of the values in the table
attrib.ReadOnly = true;
attrib.Hidden = false;

-- set the modified attributes back to the file
File.SetAttributes( file, attrib );

The whitespace makes it much easier to read.

Block Indentation

Another common use of whitespace is to make script blocks easier to see.

A block is a section of script that is controlled or affected by a control structure, such as an if statement or a while loop. For example, in an if statement, the block consists of the lines of script "inside" the if statement, that are only executed if that if statement's test is found to be true:

if(foo == true) then
-- tell the user foo is true
Dialog.Message("Hey User", "foo is true!");
end

In the example above, the two indented lines form a script "block." Technically, a block doesn't have to be indented, but it's common practice to do so, and it really makes it easier to see the part that will be affected by the if statement in the script.

AutoPlay's script editor makes it easy to add this kind of indentation to your scripts. To indent your first line in a block, just press the tab key at the start of the line. This will move the cursor over by one "level" of indentation to the right. Then continue adding lines to the block. Whenever you press Enter on a line that is indented, the editor automatically positions your cursor at the same level of indentation on the next line.

Tip: You can even indent or unindent multiple lines at once, by selecting the lines and pressing Tab (to increase the level of indentation) or pressing Shift+Tab (to decrease the level of indentation).

Indentation is especially important when there are multiple levels involved. For example, here is a short script that has a nested for loop (i.e. one for loop inside another) and a bunch of if statements. First let's see the script with no indentation:

Debug.ShowWindow(true);
if bCount then
Debug.Print("\r\nCounting to a hundred five times...\r\n");
for j = 5, 1, -1 do
if(j == 1) then
Debug.Print("\r\n\r\nThis is the last time!\r\n");
else
Debug.Print("\r\n\r\n" .. j - 1 .. " more times to go!");
end
for i = 1, 100 do
Debug.Print(i.."\r\n");
if count == 50 then
Debug.Print("We're half way to a hundred!\r\n")
end
end
end
end

Now here's the script with standard block formatting:

Debug.ShowWindow(true);
if bCount then
Debug.Print("\r\nCounting to a hundred five times...\r\n");
for j = 5, 1, -1 do
if(j == 1) then
Debug.Print("\r\n\r\nThis is the last time!\r\n");
else
Debug.Print("\r\n\r\n" .. j - 1 .. " more times to go!");
end
for i = 1, 100 do
Debug.Print(i.."\r\n");
if count == 50 then
Debug.Print("We're half way to a hundred!\r\n")
end
end
end
end

See how the indentation makes it easier to see the different blocks?

Here's another example from an On Click script used in a tic-tac-toe application. First with no indentation:

Hotspot.SetEnabled("5", false);
if (player == "o") then
Label.SetVisible("o5", true);
pos5 = "o";
player = "x";
skip = "true";
if (pos1 == "o" and pos9 == "o") then
Dialog.Message("Game Over", "O Wins! Click to restart");
clicked = 0;
Page.Jump("Page1");
end
if (pos7 == "o" and pos3 == "o") then
Dialog.Message("Game Over", "O Wins! Click to restart");
clicked = 0;
Page.Jump("Page1");
end
if (pos2 == "o" and pos8 == "o") then
Dialog.Message("Game Over", "O Wins! Click to restart");
clicked = 0;
Page.Jump("Page1");
end
if (pos4 == "o" and pos6 == "o") then
Dialog.Message("Game Over", "O Wins! Click to restart");
clicked = 0;
Page.Jump("Page1");
end
end
if (player == "x" and skip ~= "true") then
Label.SetVisible("x5", true);
pos5 = "x";
player = "o";
if (pos1 == "x" and pos9 == "x") then
Dialog.Message("Game Over", "X Wins! Click to restart");
clicked = 0;
Page.Jump("Page1");
end
if (pos7 == "x" and pos3 == "x") then
Dialog.Message("Game Over", "X Wins! Click to restart");
clicked = 0;
Page.Jump("Page1");
end
if (pos2 == "x" and pos8 == "x") then
Dialog.Message("Game Over", "X Wins! Click to restart");
clicked = 0;
Page.Jump("Page1");
end
if (pos4 == "x" and pos6 == "x") then
Dialog.Message("Game Over", "X Wins! Click to restart");
clicked = 0;
Page.Jump("Page1");
end
end
skip = "false";
clicked = clicked + 1;
if (clicked == 9) then
result = Dialog.Message("Game Over", "Cat's game (tie) Click to restart", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
Page.Jump("Page1");
end

Now, the same script with some whitespace added:

Hotspot.SetEnabled("5", false);

if (player == "o") then
Label.SetVisible("o5", true);
pos5 = "o";
player = "x";
skip = "true";
if (pos1 == "o" and pos9 == "o") then
Dialog.Message("Game Over", "O Wins! Click to restart");
clicked = 0;
Page.Jump("Page1");
end
if (pos7 == "o" and pos3 == "o") then
Dialog.Message("Game Over", "O Wins! Click to restart");
clicked = 0;
Page.Jump("Page1");
end
if (pos2 == "o" and pos8 == "o") then
Dialog.Message("Game Over", "O Wins! Click to restart");
clicked = 0;
Page.Jump("Page1");
end
if (pos4 == "o" and pos6 == "o") then
Dialog.Message("Game Over", "O Wins! Click to restart");
clicked = 0;
Page.Jump("Page1");
end
end

if (player == "x" and skip ~= "true") then
Label.SetVisible("x5", true);
pos5 = "x";
player = "o";
if (pos1 == "x" and pos9 == "x") then
Dialog.Message("Game Over", "X Wins! Click to restart");
clicked = 0;
Page.Jump("Page1");
end
if (pos7 == "x" and pos3 == "x") then
Dialog.Message("Game Over", "X Wins! Click to restart");
clicked = 0;
Page.Jump("Page1");
end
if (pos2 == "x" and pos8 == "x") then
Dialog.Message("Game Over", "X Wins! Click to restart");
clicked = 0;
Page.Jump("Page1");
end
if (pos4 == "x" and pos6 == "x") then
Dialog.Message("Game Over", "X Wins! Click to restart");
clicked = 0;
Page.Jump("Page1");
end
end

skip = "false";
clicked = clicked + 1;
if (clicked == 9) then
result = Dialog.Message("Game Over", "Cat's game (tie) Click to restart", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
Page.Jump("Page1");
end

The second version is much easier to follow.


Windows Basics

Overview

In order to use AutoPlay Media Studio to its full potential, you need to have a solid understanding of some basic (and a few not-so-basic) Windows concepts. This chapter is meant to serve as a quick overview of these Windows basics, to help you gauge your current level of knowledge, and to establish some of the terminology used in the AutoPlay Media Studio documentation.

If you need further help on these subjects, please consult your Windows documentation.

Mouse Maneuvers

Files, Folders and Paths

Shortcuts

Shortcut Folders

File Associations

The Registry

Command Line Arguments

The Windows Clipboard

The AutoRun Feature

CRC Values


Mouse Maneuvers

Overview

There are eight basic maneuvers you should be able to perform with your mouse:

Click
Double-click
Right-click
Ctrl-click
Shift-click
Drag
Drag Select
Drag and Drop

Back to: Windows Basics


Click

Mouse Maneuvers

Overview Click

Clicking the mouse is as simple as it gets. Simply position the mouse pointer over the item that you want to "click" on, and then press and release the left mouse button once. The trick is to do this without moving the mouse.

(If you move the mouse while you click, Windows might think that you meant to perform a drag and drop instead.)

Tip: If you find it difficult to click on something without moving the mouse at the same time, try changing how you grasp the mouse with your hand. Some people like to rest their whole hand on the mouse; others prefer to cradle their hand over the mouse and move it with their thumb and ring finger. If you're right-handed, your index (first) finger should rest softly on the left mouse button, and your middle (second) finger should rest softly on the right mouse button. You don't want to let go of the mouse before you click, or the mouse might move, causing you to click on the wrong thing.

Next: Double-click


Double-click

Mouse Maneuvers

Overview Double-click

Double-clicking is a lot like clicking. You position the mouse pointer over the item that you want to "double-click" on, and then press and release the left mouse button twice, quickly, without moving the mouse.

You have to click twice quickly, or Windows will see your clicks as two normal clicks, instead of one double-click. And you mustn't move the mouse between clicks, or Windows will think you wanted to click two different things really fast.

Tip: Windows actually "detects" a double-click whenever you click twice in the same place within a certain amount of time. You can lengthen or shorten this time by adjusting the "double-click speed" in your Mouse settings, which you can access from the Windows Control Panel (usually by choosing Start > Settings > Control Panel).

Next: Right-click


Right-click

Mouse Maneuvers

Overview Right-click

A right click is just like a normal click, but instead of pressing the left mouse button, you press the right mouse button instead.

Right-clicking usually displays a pop-up menu with a list of menu items specific to whatever you right-clicked on. We often refer to this pop-up menu as a "right-click menu" or "right-click context menu."

Note: If you're right-handed, you should press the right mouse button with your middle finger (the second finger from the left). Using your index finger (the first finger on the left) for both left-clicking and right-clicking is not only slower, it may actually lead to muscle cramps or more serious medical conditions.

Next: Ctrl-click


Ctrl-click

Mouse Maneuvers

Overview Ctrl-click

Ctrl-clicking (pronounced "control clicking") is easy. To do it, you just press and hold the Ctrl key down while you click the mouse.

In AutoPlay Media Studio (as in Windows), you can ctrl-click to add individual items to your current selection. For example, ctrl-clicking on a list item will select that item in addition to any items that are already selected. Similarly, ctrl-clicking on an object will select that object in addition to any other objects that are already selected.

Normally, when you click on five items in a row, you select each of the five items separately, one at a time. But if you ctrl-click on five items in a row, each item is added to your selection, so you end up having all five items selected at once. (Having more than one thing selected at once is known as "multiple selection.")

Tip: You can subtract individual items from your current selection by ctrl-clicking on items that are selected; ctrl-clicking on a selected item will deselect that item (i.e. it will remove that item from the current selection).

Next: Shift-click


Shift-click

Mouse Maneuvers

Overview Shift-click

Shift-clicking is easy. To do it, you just press and hold the Shift key down while you click the mouse.

In AutoPlay Media Studio (as in Windows), you can shift-click to extend your current selection in a list box. In other words, shift-clicking lets you select a range of items, or "all of the items between point A and point B."

For example, if you click on a list item and then shift-click on another list item, you will automatically select all of the items between the first item you clicked and the item that you shift-clicked.

Note: This is only true for selecting items in lists boxes. Shift-clicking has no effect on objects in AutoPlay.

Next: Drag


Drag

Mouse Maneuvers

Overview Drag

Dragging is simply the act of "grabbing onto" an item with the mouse pointer and dragging it somewhere else.

To drag something, first position the mouse pointer over the item you want to drag. Then, "grab onto" the item by pressing (and holding) the left mouse button. Hold the left mouse button down while you "drag" the item by moving the mouse. When you've positioned the item where you want it, "let go" of it by releasing the mouse button.

You will use this technique often in AutoPlay Media Studio to reposition objects and resize them. (Resizing an object involves dragging one of the drag handles on the "bounding box" that defines the object's width and height.)

Tip: You can abort a drag by pressing the Esc key.

Next: Drag Select


Drag Select

Mouse Maneuvers

Overview Drag Select

Drag selecting is a technique you can use to select multiple items at once. It basically involves drawing a temporary "box" around the items that you want to select by dragging the mouse pointer from one point to another.

To drag select a bunch of items, position the mouse pointer somewhere on the "surface" that the items are located on. (Don't position it on an item, or you'll just end up moving that item instead.) Press the left mouse button and hold it down while you move the mouse—the temporary drag-select box will appear to outline the selection area. "Stretch" the drag-select box by dragging the mouse until the selection area includes all of the items that you want to select, and let go of the mouse button. When you release the mouse button, any items within the drag-select box will be selected, and the drag-select box will disappear.

Drag selecting two label objects on an AutoPlay Media Studio page

Next: Drag and Drop


Drag and Drop

Mouse Maneuvers

Overview Drag and Drop

Dragging and dropping simply means dragging an item from outside AutoPlay Media Studio and "dropping" it into the design environment. You can use this technique to "drag" things like image files or Internet shortcuts onto a page or dialog. (For example, you can drag a text file onto the page or dialog surface to create a paragraph object.)

Tip: To drag an item between applications when their windows are maximized, select the item in the source application, drag it to the task bar at the bottom of your screen, and hold it over the tray button for the desired window. After a moment, that window will come to the front, and you can continue dragging the item to wherever you wanted it to go.

Next: Overview


Files, Folders and Paths

Overview

Working with AutoPlay Media Studio is a lot easier if you have a solid understanding of files, folders, and the "paths" that are used to describe them. If you're new to Windows and hierarchical file systems, you should pay extra attention to this section.

Files
Extensions
Folders
Drives
Partitions
Root Folder
Paths

Back to: Windows Basics


Files

Files, Folders and Paths

Overview Files

Information on computers is stored in files. A file is simply a collection of data that a computer stores under a specific name, known as the filename. (In other words, a file is a bunch of data that the computer stores as one unit and that you can access by name.)

When you save a file, the data that makes up the file is written out to the hard drive, and whatever name you provided for the file is assigned to that collection of data on the hard drive.

When you load a file, you provide the name of the file that you want to load, and the corresponding data is read off the hard drive.

Warning: It's important to take special care when saving files. If you provide the name of a file that already exists, the new file will replace or "overwrite" the old file. Most applications will warn you before this happens, asking you to verify that you really want to overwrite the existing file. Be sure to heed the warning; once a file is overwritten, it can't be restored.

Files vary in size and can contain all sorts of data, from text, images and sounds, to database records and the "machine language" code that programs are made of.

Next: Extensions


Extensions

Files, Folders and Paths

Overview Extensions

An extension is the part of a filename that is used to indicate what kind or "type" of data is contained within a file.

A file extension consists of a period (.) followed by one or more characters at the end of a filename. Windows uses the file extension to determine what kind of information is contained in a file. For example, in the filename myfile.txt, .txt is the file extension that identifies myfile.txt as a text file.

Tip: When reading filenames out loud, the period in the extension is usually pronounced "dot." So myfile.txt would be pronounced "myfile dot text" or "myfile dot tee ex tee."

Next: Folders


Folders

Files, Folders and Paths

Overview Folders

Files are usually organized into groups using folders. Folders are essentially just containers for files. Like files, folders have names that you can use to access them. Each folder can contain any number of files, and even other folders (or "sub-folders").

Note: A "sub-folder" is just a folder that happens to be located in another folder. You can make any folder a sub-folder by placing it in another folder.

Windows uses a hierarchical file system. This means that storage space can be organized into multiple levels of folders and sub-folders, forming what is often referred to as a "directory tree." The base of the directory structure is known as the root folder, or just the "root" for short. Within this root folder there can be files and sub-folders, and within those sub-folders there can be other files and sub-folders as well.

Note: Every file on your computer is located in a folder, whether it's the root folder on one of your drives, or some other folder located inside the root folder. (Or a folder inside a folder that is inside the root folder, or a folder inside a folder that is inside a folder that is...well, you get the idea.)

This hierarchy of folders is why every file has a path. A path is a string of text that describes where a file is stored. It's basically just a list of the different folders that you would need to open in order to reach the file.

Each folder acts like a container for all the files and folders that are "in" it. The files and sub-folders in a folder can be copied, moved or deleted all at once by copying, moving or deleting the folder that contains them.

Much like hanging folders in a filing cabinet, folders make it easier to organize and locate your files. If the files on a computer were all kept in one place, it would be very difficult to find a particular file. Folders allow related files to be grouped together so it's easier to find them.

Note: Folders are also often called directories. In Windows, the terms "folder" and "directory" both refer to the same thing.

Next: Drives


Drives

Files, Folders and Paths

Overview Drives

A drive is a form of fixed, networked or removable media used as a storage device.

The term "drive" can also refer to the drive letter, which is the letter assigned to the drive during the computer boot process. A single letter of the alphabet is assigned to each drive as it is detected at startup. The letters "A" and "B" are reserved for floppy drives, and the rest of the letters (from C to Z) are assigned in order to the various hard drives, CD-ROM drives, and any other drives attached to the system.

For example, if your system has a single hard drive and a CD-ROM drive, your C: drive is your hard drive, and your D: drive is your CD-ROM. If your hard drive is split into two logical drives or "partitions," then C: and D: would refer to those partitions, and your CD-ROM drive would be E:.

Next: Partitions


Partitions

Files, Folders and Paths

Overview Partitions

A partition is a logical division of a hard drive into smaller parts, where each part is seen as a separate "drive" by the operating system. For example, a single 30 GB hard drive could be separated into three 10 GB partitions, which would appear to the operating system as three drives (C:, D: and E:).

Next: Root Folder


Root Folder

Files, Folders and Paths

Overview Root Folder

The root folder (or "root" for short) is the "base" or "main" folder on any drive. The root folder is where all of the other folders on a drive are located. When you double-click on the C: drive in My Computer, you're opening the root folder of the C: drive. All the folders on the C: drive are located in the "root" of C:.

The root folder is always named "\" in Windows. For example, the path to the root of the D: drive is:

D:\

Next: Paths


Paths

Files, Folders and Paths

Overview Paths

A path is a string of text that describes where a file or folder is stored in a hierarchical directory structure. There are three kinds of paths you can use in AutoPlay Media Studio: full paths, relative paths and UNC paths.

Full Paths

Full or "absolute" paths provide "complete" directions to locate a file, starting right from the drive letter that the file is located on. A full path begins with the drive letter and includes the name of each folder that would need to be opened, in turn, in order to access the desired folder or file. The folder names are separated by backslash characters (\). Full paths have the following general format:

<drive letter>:\<folder name>\<folder name>\<filename>

For example:

  • The path to the root folder on the C: drive is:
    C:\

  • The path where AutoPlay Media Studio is installed by default is:
    C:\Program Files\AutoPlay Media Studio X

  • The path to Notepad.exe on your system is probably something like:
    C:\Windows\Notepad.exe

Relative Paths

Relative paths provide "partial" directions to locate a file starting from a given folder (often the current working directory). Relative paths look just like full paths, but they're missing the drive name and possibly some folder names too. The simplest relative paths consist of a single folder or filename. Relative paths have the following general format:

<folder name>\<folder name>\<filename>

For example:

  • The relative path to a Data folder in the current working directory would be:
    Data

  • The relative path to the AutoPlay Media Studio application from the Program Files folder would be:
    AutoPlay Media Studio X\AutoPlayDesign.exe

  • The relative path to a readme file in a sub-folder named Docs would be:
    Docs\readme.txt

  • The relative path to the root folder on the same drive is always:
    \

Dots and dot-dots

There are two special folder names that you can use in relative paths:

One dot (.) always refers to the current folder.
Two dots (..) refers to the folder that is one level higher than the current folder.

For example:

  • The relative path to a program named foo.exe in a folder two levels above the current folder is:
    ..\..\foo.exe

  • The relative path to a folder named Images in a folder three levels above the current folder is:
    ..\..\..\Images

  • The relative path to a file named whatsup.doc in the current folder can either be written as:
    whatsup.doc

    or as:
    .\whatsup.doc

UNC Paths

The Universal Naming Convention (UNC) is a standard method of describing the location of files and other resources shared over a network. In Windows, UNC paths begin with two backslashes (\\), followed by the server name, which is the name assigned to the computer where the shared resources are located. The server name is followed by another backslash (\) and the share name, which is simply the name that was given to the volume or storage device when it was shared. This is then followed by the path to the desired file or folder on that shared volume.

UNC paths have the following general format:

\\<server name>\<share name>\<folder name>\<filename>

For example:

  • The UNC path to the AutoPlay Media Studio X folder on a C: drive which is shared as "D2" on a computer named "R2" would be:
    \\R2\D2\Program Files\AutoPlay Media Studio X

  • The UNC path to a file named foo.txt in the temp folder of a drive which is shared as "MAIN" on a computer named "DOROTHY" would be:
    \\DOROTHY\MAIN\temp\foo.txt

Next: Overview


Shortcuts

Windows Basics

Overview Shortcuts

A shortcut is a very small file in the Windows operating system that points or "links" to a web site or another file.

Here's what a shortcut to notepad.exe looks like:

Notice the little curly arrow on the icon that tells you this is a shortcut.

Each shortcut file contains information about where the file or web site that it "points" to is located. When a user double-clicks on a shortcut file, the file or web site that it points to is opened instead.

Shortcut files have a .lnk, .url or .pif extension that is hidden by the Windows operating system:

.lnk - shortcuts to files and folders
.url - shortcuts to web sites
.pif - shortcuts to DOS batch files

It's easy to forget that shortcuts are files. Normally the only indication you have that an item is a shortcut is the little curly arrow on its icon, or the fact that it's located in the Start menu or on the Quick Launch desktop toolbar. The fact that shortcuts are actually regular files is very well hidden by Windows.

In fact, the items in your Favorites menu and the "programs" in your Start menu are all shortcuts. Adding a shortcut to the Start menu is nothing more than copying a shortcut file into the designated "Start menu" folder on the user's system.

Next: Shortcut Folders


Shortcut Folders

Windows Basics

Overview Shortcut Folders

Shortcuts are often organized into folders, known as shortcut folders. A shortcut folder is simply a folder that contains shortcut files.

A good example of shortcut folders are the "program groups" that keep your Start -> Programs menu organized. For instance, by default all Indigo Rose product-specific shortcut folders are installed in a shortcut folder named "Indigo Rose Corporation" inside the "Programs" shortcut folder.

Next: File Associations


File Associations

Windows Basics

Overview File Associations

File associations tell Windows what actions can be performed on different types of files, what programs should be used to carry out each of those actions, and the paths to where those programs can be found.

Each file association associates a specific file extension with a command to use a program to do something to that file. For example, a file association can tell Windows that when files ending with .doc are double-clicked, they should be opened with Microsoft Word.

The program that is associated with a file extension is known as the default viewer for that type of file. For instance, Notepad is the default viewer for .txt files when Windows is installed.

File associations are stored in the Registry under HKEY_CLASSES_ROOT.

Next: The Registry


The Registry

Windows Basics

Overview The Registry

The Registry is a central database provided by the Windows operating system where system and software configuration details are stored. It's arranged into a hierarchical structure that is similar to the way folders and files are organized on a hard drive.

The Registry is organized into six main folders, called main keys. Each of these main keys can contain any number of sub-folders, called sub keys. Information in the Registry is stored inside the main keys and sub keys as values.

There are three different types of values that can be stored in the Registry: String, Binary, and DWORD. String values contain strings of characters, Binary values contain binary data, and each DWORD value contains a single 32-bit ("double word") value.

Each main key in the Registry contains a different kind of information.

The six main keys are:

HKEY_CLASSES_ROOT

HKEY_CLASSES_ROOT is used to store information on different aspects of shell integration, like file associations, OLE, DDE, and drag-and-drop operations.

This key is actually a link to HKEY_LOCAL_MACHINE\SOFTWARE\Classes. Storing information in HKEY_CLASSES_ROOT is the same as storing information in HKEY_LOCAL_MACHINE\SOFTWARE\Classes, and vice-versa.

HKEY_CURRENT_USER

Like HKEY_CLASSES_ROOT, this is actually a link to another key. In this case, it points to the key in HKEY_USERS that belongs to the user who is currently logged onto the system. This is where configuration information for the current user is stored.

HKEY_LOCAL_MACHINE

HKEY_LOCAL_MACHINE contains information about system hardware, peripherals, installed software, OLE and software configuration, and other Windows configuration details.

HKEY_USERS

This is where user-specific configuration information is stored. Individual sub keys hold settings for each user, and the default settings are kept in a sub key named .Default.

HKEY_CURRENT_CONFIG

HKEY_CURRENT_CONFIG stores information for plug-and-play devices and the various hardware configurations that have been defined.

HKEY_DYN_DATA

HKEY_DYN_DATA is used by Windows to store dynamic information that changes frequently during the normal operation of Windows. It's usually best to leave this key alone.

Tip: You can use the Registry actions to read from and write to the Registry.

Next: Command Line Arguments


Command Line Arguments

Windows Basics

Overview Command Line Arguments

Command line arguments are just values that are passed to an executable file when it is run. Also known as "command line switches" or "command line options," command line arguments are usually used to set program options, or to pass along the location of a file that the program should load.

They're called command line arguments because they are generally used when launching a program from a command line (also known as the "DOS prompt" in Windows). In fact, command line arguments go way back, to the days before computers had fancy graphical user interfaces, when typing stuff into a command line was the only way to run a program.

When a program is running, it can access any command line arguments that were passed to it and make decisions about them. Every executable accepts different arguments and interprets them in different ways.

For example, entering C:\abc.exe /W /F on a command line would run a program called abc.exe and pass two command line arguments to it: /W and /F. The abc.exe program would see those arguments and handle them internally.

Note: Not all executables use command line arguments, and the list of meaningful command line arguments is specific to each program. /W might mean "wait for return" in one program, but it could mean "enable wacky walk animation" in another—or it might not even be recognized at all.

Tip: Many programs will display a list of the command line arguments they support if you run them with the /? option.

You can test command line arguments by running an executable from the "Command Prompt" in XP, Vista or later, or from the "DOS prompt" in older versions of Windows. You can also use command line arguments in program shortcuts, or when running an application by using Start -> Run.

For example, to run notepad on a typical Windows XP system, you can go to Start > Run and type in:

C:\Windows\notepad.exe

This will start notepad with a blank document. In this case, there are no command line arguments being passed to the program (notepad).

But, if you go to Start > Run and also type in the path to an existing text file:

C:\Windows\notepad.exe C:\Docs\Info.txt

...then notepad will open up with that C:\Docs\Info.txt document loaded into it. In this case, "C:\Docs\Info.txt" is a command line argument being passed to notepad.exe. Notepad detects the argument, sees that it's the path to a text file, and loads that file automatically (which is what notepad does when you pass it the path to an existing text file).

Tip: Note that command line arguments are separated by spaces. If you need to pass a command line argument that contains one or more spaces, you can surround the argument with quotes. The quotes will make the spaces part of the argument. For example:

abc.exe D:\open this file.txt

...would be seen as 3 arguments: "D:\open", "this" and "file.txt". To pass the path as a single argument, you need to surround it with quotes, like this:

abc.exe "D:\open this file.txt"

Next: The Windows Clipboard


The Windows Clipboard

Windows Basics

Overview The Windows Clipboard

The Windows clipboard is a storage area for items the have been cut or copied. Whenever you cut or copy something, it is automatically placed in the clipboard for you. You can then "paste" a copy of the item from the clipboard to anywhere you want.

Note: If you've ever cut, copied or pasted anything in a Windows application, you've already used the Windows clipboard.

Technically, the clipboard is just a bit of physical memory (i.e. RAM) that has been set aside to hold any stuff that you might happen to copy or cut. It can only hold one item at a time, so when you cut or copy something, it replaces anything that is already in the clipboard.

You can keep pasting the contents of the clipboard as often as you like. Anything you put in the clipboard will remain there until you overwrite the contents by cutting or copying something else into the clipboard. (Or until you empty the clipboard by rebooting Windows.)

Note: You can cut, copy and paste items from one place to another in the same application, or even to a different application altogether.

There are three clipboard functions that can be performed in virtually all Windows applications: cut, copy and paste.

Cut

When you cut something, it is removed from its current location, and placed in the Windows clipboard.

Tip: The easiest way to cut something is by selecting it and pressing Ctrl+X on your keyboard. You can also right-click on it and select Cut from the context menu.

Copy

When you copy something, it remains in its current location, and a duplicate of it is placed in the Windows clipboard.

Tip: The easiest way to copy something is by selecting it and pressing Ctrl+C on your keyboard. You can also right-click on it and select Copy from the context menu.

Paste

When you paste something, it is copied "back" from the Windows clipboard to the location you have selected. (This assumes that the location you're pasting to is able to hold whatever is on the clipboard; you can't paste an MPEG video into a text editor, for instance, because the text editor is made to hold text, and not video files.)

If you have something selected at the destination when you paste, the clipboard contents will replace that stuff, so be careful not to overwrite things by mistake. For example, if you have a bunch of text selected and you paste the word "bamboozled" in from the clipboard, the text you had selected will be replaced by the word "bamboozled."

You can keep pasting copies of the clipboard contents as long as you want. In fact, pasting is a great way to make multiple copies of something. Just cut or copy an item into the clipboard, and then paste it back as many times as you want.

Tip: The easiest way to paste is by pressing Ctrl+V on your keyboard. You can also right-click and select Paste from the context menu.

Next: The AutoRun Feature


The AutoRun Feature

Windows Basics

Overview The AutoRun Feature

The AutoRun or "AutoPlay" feature in Windows allows a program to be launched automatically when a CD is inserted.

Note: Some users may choose to disable the AutoRun feature on their system. On these systems, an AutoRun-enabled CD will not launch automatically.

How It Works

When Windows senses that a CD has been inserted into a CD-ROM drive, it checks for a file named autorun.inf in the root folder of the CD.

The autorun.inf file contains standard ASCII text that looks something like this:

[autorun]
open=autorun.exe
icon=autorun.ico

The open command tells Windows the location of the executable to launch automatically (in this case, it says to run the file named autorun.exe in the root folder of the CD).

The icon command tells Windows the location of an icon file (.ico) to use as the image for the inserted CD in Windows.

The icon command is optional. If the icon file contains more than one icon, you can specify an icon in the file by providing a zero-based index, like so:

icon=autorun.ico 1

Note: AutoPlay Media Studio can generate a fully-configured autorun.inf file for you as part of the build process.

Next: CRC Values


CRC Values

Windows Basics

Overview CRC Values

CRC values are calculated using an algorithm known as the Cyclic Redundancy Check, or "CRC" for short. Basically, this involves generating a 32-bit number (or "CRC value") based on the contents of a file. If the contents of a file change, its CRC value changes as well. This allows the CRC number to be used as a "checksum" in order to identify whether or not the file has changed. It also allows you to distinguish between different versions of a file by comparing its CRC value to the CRC values of the originals.

The basic idea of the CRC algorithm is to treat all the bits in a file as one big binary number, and then divide that number by a standard value. The remainder from the division is the CRC value.

You can think of this value as being like a fingerprint for each file. Unlike human fingerprints, however, it isn't impossible for two files to have the same CRC-32 value. AutoPlay Media Studio uses an industry-standard CRC-32 algorithm which generates CRC values that are 32 bits in length. This means that one in every 4,294,967,296 files could have the same CRC "fingerprint."

A file doesn't have to change much for its CRC value to be different. In fact, if even just one bit in a file changes, the CRC value for that file will change as well. If all you did was change one letter in a readme.txt file between version 1 and version 2, the CRC value for that readme.txt file would be completely different.

CRC values can be calculated for any type of file.

Although the chances of any two files having the same CRC value are incredibly small, the CRC value alone isn't enough to guarantee an accurate identification. If you need to be absolutely sure, check the CRC in addition to other information about the file, such as the size of the file in bytes and its location on the user's system.

Next: Overview


ASCII Table

General Info

Contents ASCII Table

ASCII stands for American Standard Code for Information Interchange. Computers can only understand numbers, so an ASCII code is the numerical representation of a character such as 'a' or '@' or an action of some sort. Below is the standard ASCII character set and includes descriptions of the first 32 non-printing characters.

Decimal | Hex | Character |
0 | 0 | NUL | (null)
1 | 1 | SOH | (start of heading)
2 | 2 | STX | (start of text)
3 | 3 | ETX | (end of text)
4 | 4 | EOT | (end of transmission)
5 | 5 | ENQ | (enquiry)
6 | 6 | ACK | (acknowledge)
7 | 7 | BEL | (bell)
8 | 8 | BS | (backspace)
9 | 9 | TAB | (horizontal tab)
10 | A | LF | (NL line feed, new line)
11 | B | VT | (vertical tab)
12 | C | FF | (NP form feed, new page)
13 | D | CR | (carriage return)
14 | E | SO | (shift out)
15 | F | SI | (shift in)
16 | 10 | DLE | (data link escape)
17 | 11 | DC1 | (device control 1)
18 | 12 | DC2 | (device control 2)
19 | 13 | DC3 | (device control 3)
20 | 14 | DC4 | (device control 4)
21 | 15 | NAK | (negative acknowledge)
22 | 16 | SYN | (synchronous idle)
23 | 17 | ETB | (end of trans. block)
24 | 18 | CAN | (cancel)
25 | 19 | EM | (end of medium)
26 | 1A | SUB | (substitute)
27 | 1B | ESC | (escape)
28 | 1C | FS | (file separator)
29 | 1D | GS | (group separator)
30 | 1E | RS | (record separator)
31 | 1F | US | (unit separator)
32 | 20 | Space |
33 | 21 | ! |
34 | 22 | " |
35 | 23 | # |
36 | 24 | $ |
37 | 25 | % |
38 | 26 | & |
39 | 27 | ' |
40 | 28 | ( |
41 | 29 | ) |
42 | 2A | * |
43 | 2B | + |
44 | 2C | , |
45 | 2D | - |
46 | 2E | . |
47 | 2F | / |
48 | 30 | 0 |
49 | 31 | 1 |
50 | 32 | 2 |
51 | 33 | 3 |
52 | 34 | 4 |
53 | 35 | 5 |
54 | 36 | 6 |
55 | 37 | 7 |
56 | 38 | 8 |
57 | 39 | 9 |
58 | 3A | : |
59 | 3B | ; |
60 | 3C | < |
61 | 3D | = |
62 | 3E | > |
63 | 3F | ? |
64 | 40 | @ |
65 | 41 | A |
66 | 42 | B |
67 | 43 | C |
68 | 44 | D |
69 | 45 | E |
70 | 46 | F |
71 | 47 | G |
72 | 48 | H |
73 | 49 | I |
74 | 4A | J |
75 | 4B | K |
76 | 4C | L |
77 | 4D | M |
78 | 4E | N |
79 | 4F | O |
80 | 50 | P |
81 | 51 | Q |
82 | 52 | R |
83 | 53 | S |
84 | 54 | T |
85 | 55 | U |
86 | 56 | V |
87 | 57 | W |
88 | 58 | X |
89 | 59 | Y |
90 | 5A | Z |
91 | 5B | [ |
92 | 5C | \ |
93 | 5D | ] |
94 | 5E | ^ |
95 | 5F | _ |
96 | 60 | ` |
97 | 61 | a |
98 | 62 | b |
99 | 63 | c |
100 | 64 | d |
101 | 65 | e |
102 | 66 | f |
103 | 67 | g |
104 | 68 | h |
105 | 69 | i |
106 | 6A | j |
107 | 6B | k |
108 | 6C | l |
109 | 6D | m |
110 | 6E | n |
111 | 6F | o |
112 | 70 | p |
113 | 71 | q |
114 | 72 | r |
115 | 73 | s |
116 | 74 | t |
117 | 75 | u |
118 | 76 | v |
119 | 77 | w |
120 | 78 | x |
121 | 79 | y |
122 | 7A | z |
123 | 7B | { |
124 | 7C | | |
125 | 7D | } |
126 | 7E | ~ |
127 | 7F | DEL |


General Info

Contents Using International Character Sets

Using International Character Sets

AutoPlay Media Studio is capable of creating applications for almost all languages and locales. This article outlines what you need to know about the support of international character sets in AutoPlay Media Studio.

Unicode vs. MBCS

AutoPlay Media studio is not Unicode compliant. It is compiled with multi-byte character sets (MBCS) enabled. That means that languages that require Unicode support cannot be directly supported in AutoPlay Media Studio when using text and fonts. However, some users have worked around this restriction in the following ways:

  • Use Image objects that contain images of Unicode text instead of using Label and Paragraph objects.

  • Incorporate Unicode text into buttons as part of the button image. You can edit button files using the Button Editor program that ships with AutoPlay Media Studio.

  • Use Web objects. The Web object is a host for Internet Explorer and as such gains from the Unicode support inherent in Internet Explorer.

Using International Codepages

AutoPlay Media studio does support international codepages through the use of the character set option when specifying fonts. When specifying a font for an object, go into the Font dialog and select the appropriate character set in the "Script" field. This will enable the appropriate codepage for the object.

One thing to note when using international code pages is that while the international characters will always show up fine in "drawn" objects such as the Label, Paragraph and Button, they will only appear properly in "Windowed" objects (Input, ListBox, etc.) if you have the respective version of the Windows Common Control library installed on your system. So, for example, if I am working on an English language system (without Greek language support also installed) and I use the Greek character set in a Label object, the text will appear properly with Greek characters. However, if I do the same thing with an Input object, the characters will not appear properly on my English system although they will on a system with Greek language support installed.

Setting a Character Set in the Script Editor

If you want to change the character set used in the script editor at design time, open a script edit window (on the "Script" tab of object or page properties), right-click on the script editor and choose "Editor Settings…" from the menu. On the Color/Font tab, press the Change button in the Font section and select the appropriate script.

Using Right to Left Read Order

If you are designing an application for a language that uses right to left read order such as Arabic or Hebrew, you can set the read order for objects in the following ways:

  • The following objects have a Read order setting on their properties dialogs: CheckBox, ComboBox, Input, ListBox, Tree, RadioButton and RichText.

  • The Button, Label, and Paragraph objects will use the setting from the Reading Order setting on the Advanced tab of the Project Settings dialog. If you are developing an application for right to left languages, you should always turn on this option even if you are not specifically using those objects.

Another thing to keep in mind if you are developing for right to left languages is to layout the page from right to left. Even the shadows on buttons should generally be on the left side of the object, if possible.

Filenames

It is generally advisable that you use Latin characters in your file, object and page names within your project. This is not a strict requirement but it is a best practice that will help avoid unforeseen errors down the road.


Authenticode Code Signing

Overview

Using Authenticode Code Signing

Background

How can users trust code that is published on the Internet? Two issues that must be addressed are those of ensuring integrity and authenticity. Authenticity assures users that they know where the code came from. Integrity verifies that the code hasn't been tampered with since its publication.

In the Microsoft article titled Introduction to Code Signing, they write:

Microsoft's solution to these issues is Microsoft Authenticode coupled with an infrastructure of trusted entities. Authenticode, which is based on industry standards, allows developers to include information about themselves and their code with their programs through the use of digital signatures.

While Authenticode itself cannot guarantee that signed code is safe to run, Authenticode is the mechanism by which users can be informed of whether the software publisher is participating in the infrastructure of trusted entities. Thus, Authenticode serves the needs of both software publishers and users who rely upon the Internet for the downloading of software.

Why Should I Care?

If you plan to distribute your software over the Internet and you expect that some of your users will be using Windows XP Service Pack 2, Windows Vista or later you may want to consider signing your applications. Due to the changes made to Internet Explorer in Windows XP SP2, and the Windows Vista or later OS's, when a customer downloads and runs your software, they will be presented with a warning dialog asking the user if they really want to run your software. On that dialog, they will see "Unknown Publisher" if it is not signed. On the other hand, if you do sign your code, they will instead see your company name and an optional web link to follow for more information. If you plan to distribute on Windows Vista or later, another point of consideration beyond user experience, is the fact that Windows Vista or later has the ability to prevent any unsigned applications from launching with full privileges. This may impact the application functionality.

Getting a Code Signing Certificate

If you would like to purchase a code signing certificate, they are available from a number of companies, including Verisign, Thawte and Comodo.

During the purchase process, you will be instructed on creating and saving a "private key" file, which will later be used along with your certificate to actually "sign" your software. You will also be asked for a password to protect your private key. Do not misplace any of this information. Each piece is extremely important!

It will take about 3-5 days for your application to be approved and your certificate issued. Keep in mind that you will likely need to provide supporting documentation to prove you actually are who you say you are. It's not something to be taken lightly and will likely require senior management to be involved.

Download SignCode.exe or SignTool.exe

Now that you have a code signing certificate, you'll need to download some software from Microsoft so you can start using it.

  1. The current tool available from Microsoft to digitally sign files is called "SignTool.exe". This tool is installed in the \Bin folder of the Platform Software Development Kit (SDK). You can download the Platform SDK from: http://www.microsoft.com/downloads/details.aspx?FamilyId=A55B6B43-E24F-4EA3-A93E-40C0EC4F68E5
    The tool previous to signtool.exe available for signing files was called "SignCode.exe" and only ships with the .NET Framework SDK version 1.0 and 1.1.

  2. Install the package to your system and locate one of the two tools (SignCode.exe or SignTool.exe).

Signing your AutoPlay application

Once the Authenticode file signing tool is installed on your system, you are ready to start signing your AutoPlay applications.

  1. Before publishing your final application, select Project > Settings from the menu and click on the Code Signing tab.

  2. Check the "Code sign applications" checkbox and fill in the available fields including selecting the desired tool's location on your system.

  3. Publish your final AutoPlay application by selecting Publish > Build and choosing the desired output option and settings.

Tip: See the Code Signing Preferences page for configuring defaults to use for code signing your AutoPlay applications every time you start a new project.

Testing your Signature

To verify that everything went according to plan and view your signature, SignTool.exe contains the verify command that determines whether the signing certificate was issued by a trusted authority, whether the signing certificate has been revoked, and, optionally, whether the signing certificate is valid for a specific policy. Simply run SignTool.exe and pass it the option verify followed by the full path to the generated AutoPlay application executable.

Alternatively, you could simply upload the application to a web site and then download and run it from a computer using Windows XP SP2, or Windows Vista or later. You'll see the same information.

Getting More Information

There are many good resources on the Internet for finding out more about code signing, Authenticode, Windows XP/Vista or later, Security and related issues. Here are a few places to start.

  • MSDN: Introduction to Code Signing

  • Certify your Software Integrity with Thawte Code Signing Certificates

  • MSDN: Cryptography Tools (Windows)

  • MSDN: SignTool (Windows)

  • MSDN: File Signing Tool (Signcode.exe)

  • Microsoft: Signing and Checking Code with Authenticode

Copyright © 2015 Indigo Rose Software. All rights reserved.


Callback Functions

General Info

Contents Callback Functions Example

A Callback Function is just a function that is automatically called at certain intervals during the execution of an action, typically so you can report on the action's progress. It's called a "callback function" because the action is said to be "calling back" to your function.

Callback Functions are mostly useful for actions that may take longer to complete. In those cases, it is nice to let the end user know what is happening so they don't start to worry. All actions that contain a callback function are automatically configured to pass the action's progress information to the built-in status dialog if the default value nil is passed as the CallbackFunction parameter. The status dialog can then be shown, hidden and manipulated using the available status dialog actions. Another purpose of the callback function is to provide the ability to interrupt the action's progress if required.

While using the status dialog may be the most common use of Callback Functions, there may be other tasks that need to be performed based on the progress of the action. In these cases you can create your own function to handle the action's progress in a custom way. Each Callback Function requires specific parameters to receive information from the action. Each action's callback parameters can be found in the action's help topic.

The following actions contain a Callback Function parameter:

  • File.Copy

  • File.Delete

  • File.Find

  • File.Install

  • File.Move

  • Folder.DeleteTree

  • Folder.Find

  • HTTP.Download

  • HTTP.DownloadSecure

  • HTTP.GetFileSize

  • HTTP.GetFileSizeSecure

  • Zip.Add

  • Zip.Extract


Drag and Drop Assistant

General Info

Contents Drag and Drop Assistant

The drag and drop assistant is a feature designed to maximize work flow by applying the Windows drag and drop features to AutoPlay's design environment.

Note: Some of the drag and drop behaviour described below can be modified in the Drag and Drop Preferences.

Replace an Object’s Media File

This is a quick way to replace the file that is displayed in an object without affecting its other settings. For example, you can replace the image in an image object, or the video in a video object. To do this, drag and drop the media file onto the object while holding the Shift key.

Note: If you drag a file that is not supported by the object, nothing will happen.

Replace a Paragraph Object’s Text

This is a convenient way to replace a paragraph object’s text without affecting its other settings. To do this, drag and drop the text file onto the paragraph object while holding the Shift key.

Replace a RichText Object’s Text

This is a convenient way to replace a richtext object’s text without affecting its other settings. To do this, drag and drop the *.rtf file onto the richtext object while holding the Shift key.

Replace a ListBox Object’s Entries

This is a nice way to replace a listbox object's entries without affecting its other settings. Create a text file where each line represents one listbox entry. You can then drag and drop the text file onto the listbox object while holding the Shift key.

Add an Audio.Load Action

This is a quick way to load an audio file when an object is clicked in your project at runtime. If you drag and drop and audio file onto an object, a Yes/No dialog will appear. If you click Yes, an Audio.Load(CHANNEL_NARRATION, "Filename", true, false) action will be added to the object's On Click event.

Note: If the object does not have an On Click event, nothing will happen.

Add a Background Audio Track

An easy way to add background audio tracks to your project is to drag and drop an audio file onto the project work area. When you drop the file, a Yes/No dialog will appear. If you click Yes, the file will be added to the end of the Background Music list.

Add a File.Open Action

This is a handy way to create a File.Open action on an object's On Click event, without manually creating it. If you drag and drop a file onto an object, you will be presented with a Yes/No dialog. If you click Yes, a File.Open action will automatically be added to the object's On Click event.

Note: If the object does not have an On Click event, nothing will happen.

Add a Page.Jump Action

This is an easy way to create a Page.Jump action on an object without using the script editor. If you drag and drop a page from the Page Manager onto an object, a Yes/No dialog will appear. If you click Yes, a Page.Jump action will be added to the On Click event of the object.

Note: If the object does not have an On Click event, nothing will happen.

Add a DialogEx.Show Action

This is an easy way to create a DialogEx.Show action on an object without using the script editor. If you drag and drop a dialog from the Dialog Manager onto an object, a Yes/No dialog will appear. If you click Yes, a DialogEx.Show action will be added to the On Click event of the object.

Note: If the object does not have an On Click event, nothing will happen.

Add a Scriptlet

This is a quick way to add script from a .lua file to your project without pasting the code. To do this just drag and drop the file onto the script editor.

Use an Image as your Background

This is an easy way to add a background image. The Image Becomes Background setting in the Drop on Page/Dialog category of Edit > Preferences controls the behavior of an image that is dropped onto a page or dialog. If the image is greater than a certain percentage (75% by default), AutoPlay will display a Yes/No dialog to determine if you want the image to become the page's or dialog's background. If you don't, it will be added as an image object.

Add an Object

This is an intuitive way to add an object to your project. If you drag and drop a media file onto your work area that is viewable through one of the available objects, it will automatically be created. For example, a *.btn file will create a button object, an *.HTML or *.htm file will create web object, a *.text or *.txt file will create a paragraph object, and an *.rtf file will create a richtext object.


Guidelines Overview

Guidelines

Overview Add / Edit Dialog

Guidelines are an excellent tool used to align objects in your project. In AutoPlay Media Studio there are two types of guidelines: page/dialog and project guidelines. Page/dialog guidelines can be used to align objects on a single page or dialog in your project. You can have different page or dialog guidelines on different pages/dialogs in your project.

Project guidelines persist across every page or dialog in your project. These guidelines are useful if, for example, you wanted to define margins throughout your project, or if you wanted to align objects in the exact same place on different pages or dialogs in your project.

When you drag an object near a guideline, the object's closest bounding box edge will 'snap' to the guideline. Objects will only snap to guidelines when the guidelines are visible. Hiding the guidelines disables the snapping feature.

Note: You can disable snapping temporarily by holding the Shift key while you drag an object.

To add a page/dialog guideline in your project, simply click on the ruler at the approximate location you want the guideline to appear. Click on the top ruler to create a vertical guideline, click on the left ruler to create a horizontal guideline. Alternatively, you can 'drag' a guideline onto your project by 'dragging' from either the top or left ruler onto your project. Give it a try!

Note: Creating a project guideline is done in the same way, with one exception: hold down the Shift key on your keyboard when creating a guideline.

Tip: You can right click on any ruler in the project and choose Add Guideline to bring up the Add Guideline dialog.

To adjust the positioning of any guideline on your page or dialog, drag the guideline's placeholder on the ruler to a different spot on the same ruler. To remove a guideline from your project, drag the placeholder off of the ruler, away from the page or dialog. If you are removing a horizontal guideline, drag the placeholder to the left of the left ruler. If you are removing a vertical guideline, drag the placeholder above the top ruler.

Note: If a guideline is locked, you cannot drag it's placeholder along the ruler, or off of the ruler; however, you can still adjust it through the Edit Guideline dialog.

Tip: You can right click on any guideline's placeholder and choose Edit Guideline to bring up the Edit Guideline dialog, or choose Delete to remove the guideline. You can also right-click on any placeholder and choose Delete All to remove all guidelines from the current page or dialog (and all displayed project guidelines).

To adjust how guidelines function, choose Edit > Preferences, expand the Environment category, and click on Guidelines.


Input Mask

General Info

Contents Input Mask

An input mask is a special pattern that controls what the user can type into a MaskedInput dialog or input object at run time. The mask can be any combination of regular text characters (literal characters) and special characters. Each special character, as outlined below, represents one "place" in the edit field where the user can type a character. Different special characters allow different kinds of characters to be typed in their "place" by the user. For example, the # character only allows a digit between 0 and 9 to be typed in its place, and the ? character only allows a letter between a and Z.

Note: The special characters you use in the input mask determine what the user will be allowed to type into the edit field.

You can use any literal characters to include "normal" characters in the edit field. The user will type "around" the literal characters as they fill in the "blanks" created by the special characters.

Here are the special characters that you can use in an input mask:

Note: Some of these special literal characters adapt to the user's system settings, so they may need to be forced on all systems using "\" before the character.

. | Decimal. (Special literal.) This will be replaced by the character specified as the decimal in the user's international settings. To force a period on all systems, use \. instead.
, | Thousands separator. (Special literal.) This will be replaced by the character specified as the thousands separator in the user's international settings. To force a comma on all systems, use \, instead.
: | Time separator. (Special literal.) This will be replaced by the character specified as the time separator in the user's international settings. To force a colon on all systems, use \: instead.
/ | Date separator. (Special literal.) This will be replaced by the character specified as the date separator in the user's international settings. To force a slash on all systems, use \/ instead.
# | Digit character (0-9). For every # in the input mask, the user will only be able to enter a digit between 0 and 9. To display a literal number sign (#), use \# instead.
A | Alphanumeric character (0-9 and a-Z). For every A in the input mask, the user will be able to enter any letter from a to Z or any digit between 0 and 9. To display a literal "A", use \A instead.
? | Alphabetic character (a-Z). For every ? in the input mask, the user will only be able to enter a letter from a to Z. To display a literal question mark, use \? instead.
> | Alphabetic character, but forces any letters typed to uppercase (A-Z). For every > in the input mask, the user will only be able to enter a letter from A to Z, and whatever letter they type will be converted to uppercase. To display a literal greater-than sign, use \> instead.
< | Alphabetic character, but forces any letters typed to lowercase (a-z). For every < in the input mask, the user will only be able to enter a letter from a to z, and whatever letter they type will be converted to lowercase. To display a literal less-than sign, use \< instead.
& | ANSI Character. Allows any ANSI character in the following ranges: 32-126 and 128-255. To display a literal ampersand, use \& instead.
\ | Literal escape. Use this to make a special character act as a literal in the input mask. For example, you could create a mask for an IP address: IP \Address\: ###\.###\.###\.### ...which would appear as: IP Address: . . . (Note that we needed to use the literal escape for the 'A' in Address, the colon, and all three decimal points.)


Language ID Codes

General Info

Contents Language ID Codes

Below is a list of the Windows operating system language ID codes:

Note: Any language that does not specify a secondary ID will return either 0x00, 0x01, or 0x02.

Primary ID Hex (Dec) | Secondary ID Hex (Dec) | Language
0x00 (0) | 0x00 (0) | Neutral
 | 0x01 (1) | Default
 | 0x02 (2) | System Default
0x01 (1) | 0x01 (1) | Arabic (Saudi Arabia)
 | 0x02 (2) | Arabic (Iraq)
 | 0x03 (3) | Arabic (Egypt)
 | 0x04 (4) | Arabic (Libya)
 | 0x05 (5) | Arabic (Algeria)
 | 0x06 (6) | Arabic (Morocco)
 | 0x07 (7) | Arabic (Tunisia)
 | 0x08 (8) | Arabic (Oman)
 | 0x09 (9) | Arabic (Yemen)
 | 0x0a (10) | Arabic (Syria)
 | 0x0b (11) | Arabic (Jordan)
 | 0x0c (12) | Arabic (Lebanon)
 | 0x0d (13) | Arabic (Kuwait)
 | 0x0e (14) | Arabic (U.A.E.)
 | 0x0f (15) | Arabic (Bahrain)
 | 0x10 (16) | Arabic (Qatar)
0x02 (2) |  | Bulgarian
0x03 (3) |  | Catalan
0x04 (4) | 0x01 (1) | Chinese (Traditional)
 | 0x02 (2) | Chinese (Simplified)
 | 0x03 (3) | Chinese (Hong Kong SAR, PRC)
 | 0x04 (4) | Chinese (Singapore)
 | 0x05 (5) | Chinese (Macau SAR)
0x05 (5) |  | Czech
0x06 (6) |  | Danish
0x07 (7) | 0x01 (1) | German
 | 0x02 (2) | German (Swiss)
 | 0x03 (3) | German (Austrian)
 | 0x04 (4) | German (Luxembourg)
 | 0x05 (5) | German (Liechtenstein)
0x08 (8) |  | Greek
0x09 (9) | 0x01 (1) | English (US)
 | 0x02 (2) | English (UK)
 | 0x03 (3) | English (Australian)
 | 0x04 (4) | English (Canadian)
 | 0x05 (5) | English (New Zealand)
 | 0x06 (6) | English (Ireland)
 | 0x07 (7) | English (South Africa)
 | 0x08 (8) | English (Jamaica)
 | 0x09 (9) | English (Caribbean)
 | 0x0a (10) | English (Belize)
 | 0x0b (11) | English (Trinidad)
 | 0x0c (12) | English (Zimbabwe)
 | 0x0d (13) | English (Philippines)
0x0a (10) | 0x01 (1) | Spanish (Castilian)
 | 0x02 (2) | Spanish (Mexican)
 | 0x03 (3) | Spanish (Modern)
 | 0x04 (4) | Spanish (Guatemala)
 | 0x05 (5) | Spanish (Costa Rica)
 | 0x06 (6) | Spanish (Panama)
 | 0x07 (7) | Spanish (Dominican Republic)
 | 0x08 (8) | Spanish (Venezuela)
 | 0x09 (9) | Spanish (Colombia)
 | 0x0a (10) | Spanish (Peru)
 | 0x0b (11) | Spanish (Argentina)
 | 0x0c (12) | Spanish (Ecuador)
 | 0x0d (13) | Spanish (Chile)
 | 0x0e (14) | Spanish (Uruguay)
 | 0x0f (15) | Spanish (Paraguay)
 | 0x10 (16) | Spanish (Bolivia)
 | 0x11 (17) | Spanish (El Salvador)
 | 0x12 (18) | Spanish (Honduras)
 | 0x13 (19) | Spanish (Nicaragua)
 | 0x14 (20) | Spanish (Puerto Rico)
0x0b (11) |  | Finnish
0x0c (12) | 0x01 (1) | French
 | 0x02 (2) | French (Belgian)
 | 0x03 (3) | French (Canadian)
 | 0x04 (4) | French (Swiss)
 | 0x05 (5) | French (Luxembourg)
 | 0x06 (6) | French (Monaco)
0x0d (13) |  | Hebrew
0x0e (14) |  | Hungarian
0x0f (15) |  | Icelandic
0x10 (16) | 0x01 (1) | Italian
 | 0x02 (2) | Italian (Swiss)
0x11 (17) |  | Japanese
0x12 (18) | 0x01 (1) | Korean
0x13 (19) | 0x01 (1) | Dutch
 | 0x02 (2) | Dutch (Belgian)
0x14 (20) | 0x01 (1) | Norwegian (Bokmal)
 | 0x02 (2) | Norwegian (Nynorsk)
0x15 (21) |  | Polish
0x16 (22) | 0x01 (1) | Portuguese (Brazilian)
 | 0x02 (2) | Portuguese (Portugal)
0x18 (24) |  | Romanian
0x19 (25) |  | Russian
0x1a (26) |  | Croatian
0x1a (26) | 0x02 (2) | Serbian (Latin)
 | 0x03 (3) | Serbian (Cyrillic)
0x1b (27) |  | Slovak
0x1c (28) |  | Albanian
0x1d (29) | 0x01 (1) | Swedish
 | 0x02 (2) | Swedish (Finland)
0x1e (30) |  | Thai
0x1f (31) |  | Turkish
0x20 (32) | 0x01 (1) | Urdu (Pakistan)
 | 0x02 (2) | Urdu (India)
0x21 (33) |  | Indonesian
0x22 (34) |  | Ukrainian
0x23 (35) |  | Belarusian
0x24 (36) |  | Slovenian
0x25 (37) |  | Estonian
0x26 (38) |  | Latvian
0x27 (39) | 0x01 (1) | Lithuanian
0x29 (41) |  | Farsi
0x2a (42) |  | Vietnamese
0x2b (43) |  | Armenian
0x2c (44) | 0x01 (1) | Azeri (Latin)
 | 0x02 (2) | Azeri (Cyrillic)
0x2d (45) |  | Basque
0x2f (47) |  | FYRO Macedonian
0x36 (54) |  | Afrikaans
0x37 (55) |  | Georgian
0x38 (56) |  | Faeroese
0x39 (57) |  | Hindi
0x3e (62) | 0x01 (1) | Malay (Malaysia)
 | 0x02 (2) | Malay (Brunei Darassalam)
0x3f (63) |  | Kazak
0x40 (64) |  | Kyrgyz
0x41 (65) |  | Swahili
0x43 (67) | 0x01 (1) | Uzbek (Latin)
 | 0x02 (2) | Uzbek (Cyrillic)
0x44 (68) |  | Tatar
0x45 (69) |  | Bengali
0x46 (70) |  | Punjabi
0x47 (71) |  | Gujarati
0x48 (72) |  | Oriya
0x49 (73) |  | Tamil
0x4a (74) |  | Telugu
0x4b (75) |  | Kannada
0x4c (76) |  | Malayalam
0x4d (77) |  | Assamese
0x4e (78) |  | Marathi
0x4f (79) |  | Sanskrit
0x50 (80) |  | Mongolian
0x56 (86) |  | Galician
0x57 (87) |  | Konkani
0x58 (88) |  | Manipuri
0x59 (89) |  | Sindhi
0x5a (90) |  | Syriac
0x60 (96) |  | Kashmiri
0x61 (97) |  | Nepali
0x65 (101) |  | Divehi


Project Explorer

Overview

The project explorer pane is a hierarchical tree view of all pages, dialogs, objects, and optionally events in your project. From here you can modify many attributes of your project by first selecting an item in the tree view, and then right-clicking on the object. For example, right-clicking on the 'project' item at the top of the tree will present you with many project-wide options to choose from. Likewise, you can remove, duplicate a page by right-clicking on it. You can also add objects and open up a page's, or dialog's properties through the right-click menu.

The order in which objects and pages appear in the project explorer is the order in which they will appear in your project. The top-most page in the project explorer is the first page that will be displayed in your project. Dialogs are not order specific in your project.

As far as objects are concerned, their top-down order in the project explorer is directly related to their z-order; to change an object's z-order, simply drag it higher or lower in the project explorer.

Show Events

If checked, all available events in your project will be visible in the project explorer. You can double-click on any event shown in the project explorer to open its script editor.

When events are visible in the project explorer, each event's icon is either grayed out or highlighted. A highlighted icon indicates that script exists on that event. A grayed out icon indicates that there is absolutely no script on that event (not even comments!).


Supported File Types

General Info

Contents Supported File Types

This topic describes the various file types that are supported in AutoPlay Media Studio:

Audio Formats

Image Formats

Video Formats

Additional Embeddable Formats

QuickTime Supported Formats

Audio Formats

After careful consideration, Indigo Rose has decided not to support the MP3 audio format in this product. This decision was made to avoid the complicated and costly licensing that is involved with the patented format, both in AutoPlay Media Studio, and in the applications created with AutoPlay Media Studio. For more information about the licensing of the MP3 format, visit: http://www.mp3licensing.com.

For this reason, we recommend using the new compressed audio format Ogg Vorbis. Ogg Vorbis has been designed to completely replace proprietary, patented audio formats such as the MP3 format. Ogg Vorbis will also offer greater compression and sound quality than the MP3 format in most cases.

Ogg Vorbis (*.ogg) is an audio compression format developed by Xiph.org that is roughly comparable to other formats used to store and play digital music, such as MP3, VQF, AAC, and other digital audio formats. What’s different is that the Ogg Vorbis format is completely free, open, and unpatented.

You can find further information about the Ogg Vorbis format and available conversion tools by visiting:
http://www.vorbis.com
http://www.xiph.org/ogg/vorbis

The following audio formats are fully supported for playback in AutoPlay Media Studio:

Filename Extension | Format
.ogg | Ogg Vorbis
.raw | PCM signed raw audio
.aif, .aiff | Audio Interchange File Format
.wav | WAV

Note: .wma and .asf audio formats use Windows Media Player, and may require a codec on the end user's system. Therefore Windows Media Player needs to be installed on the user's system. For example, if you are using a Windows Media Player 9 codec, the end user will need to have Windows Media Player 9 installed in order to play the track.

Image Formats

The following image formats are supported for backgrounds, image objects, and slideshow objects in AutoPlay Media Studio:

Filename Extension | Format | Notes
.apm | Aldus Placeable Metafile | A desktop publishing image format.
.bmp | Microsoft Bitmap | An uncompressed file format, so it takes up lots of disk space.
.emf | Windows Enhanced Metafile | A Windows vector image format converted to bitmap.
.gif | Graphic Interchange Format | A 256 color image format. Animated GIFs are not supported.
.jpg | Joint Photographic Experts Group | Primarily used for photographs.
.pcd | Photo-CD (Kodak) | Designed to store multi-resolution images.
.pcx | ZSoft Paintbrush | Can store images in 24 bits and 8-bit or less.
.png | Portable Network Graphics | Decent at compression. Ability to store an alpha channel.
.psd | Adobe Photoshop | Professional image editing format.
.tga | Truevision | 24-bit color image format.
.tif | Aldus Corporation format TIFF | A popular loss-less image format.
.wmf | Windows Metafile | Common in Windows 3.1, usage discouraged.

Video Formats

The following video formats are supported for playback through the video object in AutoPlay Media Studio:

Filename Extensions | Format
.asf, .asx, .wax, .wmv, .wvx, .wmp, .wmx | Windows Media
.avi | Windows formats
.mpg, .mpeg, .m1v, .mpa, .mpe, .mpv2 | Moving Picture Experts Group (MPEG)

Additional Embeddable Formats

The following are some additional formats that can be viewed through objects in AutoPlay Media Studio:

Filename Extension | Object
.btn | Button object
.htm | Web object
.rtf | RichText object
.txt | Paragraph object
.swf | Flash object
.pdf | PDF object

QuickTime Supported Formats

The following media formats can be viewed through the QuickTime object:

Filename Extension | Media Type
.386 | Video
.3g2 | Video
.3gp | Video
.3gp2 | Video
.3gpp | Video
.aac | Audio
.ac3 | Audio
.adts | Audio
.aif | Audio
.aifc | Audio
.aiff | Audio
.amc | Video
.AMR | Video
.au | Audio
.avi | Video
.bmp | Image
.bwf | Audio
.caf | Audio
.cdda | Audio
.cel | Audio
.dib | Image
.dif | Video
.dv | Video
.flc | Video
.fli | Video
.gif | Video
.gsm | Audio
.jp2 | Image
.jpe | Image
.jpeg | Image
.jpg | Image
.kar | Audio
.m15 | Video
.m1a | Audio
.m1s | Video
.m1v | Video
.m3u | Audio
.m3url | Audio
.m4a | Audio
.m4b | Audio
.m4p | Audio
.m4v | Video
.m75 | Video
.mac | Image
.mid | Audio
.midi | Audio
.mov | Video
.mp2 | Audio
.mp3 | Audio
.mp4 | Video
.mpa | Video
.mpeg | Video
.mpg | Video
.mpm | Video
.mpv | Video
.mqv | Video
.pct | Image
.pic | Image
.pict | Image
.png | Image
.pnt | Image
.pntg | Image
.psd | Image
.qcp | Audio
.qht | Docs
.qhtm | Docs
.qt | Video
.qti | Image
.qtif | Image
.qtl | Video
.rgb | Image
.rts | Video
.rtsp | Video
.sd2 | Audio
.sdp | Video
.sdv | Video
.sgi | Image
.smf | Audio
.smi | Video
.smil | Video
.sml | Video
.snd | Audio
.swa | Audio
.targa | Image
.tga | Image
.tif | Image
.tiff | Image
.ulw | Audio
.vfw | Video


System Restore Monitored File Extensions

Miscellaneous

Contents System Restore Monitored File Extensions

The following is a list of monitored file extensions. Files with these extensions are monitored by System Restore:

~~C

~~D

12A

1PA

1ST

386

8BA

8BY

8LI

A2A

AAS

AAX

ABM

ABR

ACF

ACG

ACO

ACS

ADK

ADW

ADX

AFM

AID

AIP

ALT

AM

AMB

APL

APM

APP

APV

AR

ARX

AS

AT

ATC

ATL

ATM

ATN

AW

AWE

AWX

AX

B0

BAT

BCF

BD

BDR

BE

BGB

BGR

BID

BIT

BK1

BLD

BM

BMA

BND

BNF

BOF

BPP

BPT

BPX

BT

BTN

BUC

CAG

CAO

CAT

CBS

CC

CF

CFG

CHA

CIK

CL

CLW

CLX

CLY

CMD

CNT

CNV

COL

COM

CPB

CPL

CQM

CR

CRL

CRS

CRV

CS

CSB

CSI

CSL

CSW

CTB

CTG

CTY

CUS

CW_

D01

D02

D03

D04

D05

D32

DATA

DB0

DB1

DB2

DC2

DCA

DCF

DCI

DCL

DDB

DDD

DEP

DES

DESKLINK

DET

DGM

DIALOG

DID

DIR

DISABLED

DIX

DLL

DOB

DOS

DRC

DRS

DRV

DS

DSC

DSK

DSN

DSR

DSX

DT

DTT

DUN

DVB

DWT

DXT

DYNCMD

ECF

EFF

EFM

EID

EL

ELM

END

ENU

ENV

EOT

EPF

ET

EX_

EXA

EXCLUDE

EXE

EXL

F32

FAE

FAM

FAS

FFP

FIN

FIO

FLL

FLW

FMC

FMP

FNT

FON

FSG

FSS

GCS

GDB

GI_

GMS

GNG

GPD

GS

GSF

GST

GUIATN

GUICMD

GVT

GWD

H16

HCT

HDC

HDI

HDP

HFX

HGD

HHC

HHK

HK0

HK1

HK2

HK3

HLP

HM

HTA

HTC

HTZ

HU

HWL

HYP

IAT

IBD

ICD

ICM

ICO

ICR

ICW

ID

IDS

IFA

ILF

ILG

ILM

IN_

INCL

INF

INI

INK

INL

INO

INS

INV

IP

IRS

ISA

ISS

ISU

ITF

J0

JA

JBR

JCM

JGD

K01

K02

K03

KBD

KNN

KO

L0

L2L

L2P

LAB

LAM

LAST

LCA

LCK

LDA

LEX

LGC

LGD

LGE

LGF

LIC

LID

LIM

LIVEREG

LLI

LMC

LMG

LMP

LNK

LO~

LRD

LRS

LSM

LSO

LSQ

LSS

LSX

LT

LTS

LV

M20

MANIFEST

MAPIMAIL

MC

MCD

MCM

MD2

MDM

MDP

ME

MFL

MHK

MIL

MLN

MMC

MMM

MMX

MNC

MNL

MNR

MNS

MOF

MOR

MP

MPD

MPT

MSB

MSC

MSE

MSI

MST

MSK

MSO

MXT

MYDOCS

N0

NAM

NAME

NDX

NEW

NFO

NIB

NMD

NOD

NPM

NQM

NQV

NSI

NSW

NTE

NU4

NUM

NUS

NV

OBE

OCM

OCX

ODE

ODL

OLB

OLD

OLE

OP

OPG

OR5

OSD

OUT

P2A

PAG

PBC

PBK

PBV

PC3

PCI

PDI

PDR

PEN

PER

PFB

PFM

PFR

PH

PHO

PHX

PID

PIF

PL3

PLY

PMT

PNF

POC

POF

POL

PPD

PR4

PROPERTIES

PRX

PSC

PSF

PSP

PT

PTH

PTX

PV

Q0

Q32

Q3X

QDAT

QJF

QRS

QTC

QTD

QTW

QUE

QUF

QUT

R0

R98

RAD

RAT

RC2

RCP

RCT

RDB

RDC

REF

REG

RGS

RH

RI

RJS

RO

ROB

RPR

RPS

RSD

RSP

RSRC

RTA

RTR

RU

S98

SAM

SAX

SCK

SCR

SCS

SECURITY

SELFREG

SFP

SG

SG0

SG1

SHARED

SHR

SHX

SIF

SK

SLL

SMC

SMM

SNP

SOF

SPC

SPE

SPM

SPT

SPX

SR

SRC

SRG

SRT

SSM

SST

ST4

STB

STD

STF

STP

SWB

SYM

SYN

SYS

T32

TAG

TB

TDF

TH

THE

THK

THS

TID

TIE

TIP

TLB

TLD

TLF

TLT

TLU

TLX

TMC

TNL

TOL

TPA

TR

TRE

TRG

TRO

TSK

TSP

TTF

TTS

TUB

TUM

TUW

TV

TVC

TWD

TXR

TYM

TZD

UBM

UCM

UCP

UCT

UDC

UDI

UDL

UDT

UID

UIL

UK

ULG

ULK

UNT

US

USA

USERPROFILE

USP

USR

UTX

V10

VBS

VBX

VBZ

VCPREF

VDB

VER

VFM

VFX

VIL

VLX

VM

VOF

VPH

VPX

VQA

VQM

VSC

VSH

VWP

VXD

W32

W98

WA_

WBD

WBM

WCD

WDL

WDS

WINSYS

WIPEINFO

WIPESLACK

WMZ

WPC

WPX

WRF

WSL

WTB

WTR

XLL

XMX

XRS

XTU

ZFSENDTOTARGET

ZH

ZH_TW

ZRW


Tab Order

General Info

Contents Tab Order

When you have input objects, listbox objects, tree objects, radiobutton objects, checkbox objects, richtext objects, and combobox objects on the page or dialog, the user can use the Tab and Shift+Tab keys to switch from one object to another. This "sequence" of objects is known as the tab order. In AutoPlay Media Studio, the tab order is determined by where the objects are arranged in the z-order.

The easiest way to "see" the z-order is to look at the list of objects in the object browser (the "Objects" pane).

Note: If the object browser isn't visible, you can display it by choosing View > Panes > Object Browser from the menu.

The tab order basically follows the order that the input, listbox, combobox, checkbox, radiobutton, richtext and tree objects are listed in on the object browser. Note that any "other" types of objects are skipped completely, and the list "wraps around" when it reaches the end.

Alternate Tab Order

In AutoPlay Media Studio, there is a global variable called _AutoTabOrder that is set to true by default. When it's set to true, the tab order will work as described above.

If you don't want the tab order for these objects to automatically follow the z-order on the page or dialog, you can set _AutoTabOrder to false. When _AutoTabOrder is false, the application will not handle tabbing for you at all. Instead, you will have to implement the Tab and Shift+Tab behaviors yourself by using Page.GetFocus and Page.SetFocus actions and on your pages' On Key events, or DialogEx.GetFocus and DialogEx.SetFocus actions on your dialog's On Key events.

Note: When _AutoTabOrder is true, the page's, or dialog's On Key event is triggered after the default application tab order handling is done.


Virtual Key Codes

General Info

Contents Virtual Key Codes

Virtual key codes provide a hardware- and language-independent method of identifying keyboard keys. The following table contains the list of key codes that you can use to identify what key was pressed in an On Key event:

Note: These values are based on the US standard keyboard and may vary by keyboard or country/region. For a full list, see the MSDN documentation.

Decimal | Hex | Character
8 | 8 | Backspace
9 | 9 | Tab
13 | D | Enter
16 | 10 | Shift (both)
17 | 11 | Ctrl (both)
18 | 12 | Alt (both)
19 | 13 | Pause
20 | 14 | Caps Lock
27 | 1B | Esc
32 | 20 | Spacebar
33 | 21 | Page Up
34 | 22 | Page Down
35 | 23 | End
36 | 24 | Home
37 | 25 | (left arrow)
38 | 26 | (up arrow)
39 | 27 | (right arrow)
40 | 28 | (down arrow)
45 | 2D | Insert
46 | 2E | Delete
48 | 30 | 0
49 | 31 | 1
50 | 32 | 2
51 | 33 | 3
52 | 34 | 4
53 | 35 | 5
54 | 36 | 6
55 | 37 | 7
56 | 38 | 8
57 | 39 | 9
65 | 41 | A or a
66 | 42 | B or b
67 | 43 | C or c
68 | 44 | D or d
69 | 45 | E or e
70 | 46 | F or f
71 | 47 | G or g
72 | 48 | H or h
73 | 49 | I or i
74 | 4A | J or j
75 | 4B | K or k
76 | 4C | L or l
77 | 4D | M or m
78 | 4E | N or n
79 | 4F | O or o
80 | 50 | P or p
81 | 51 | Q or q
82 | 52 | R or r
83 | 53 | S or s
84 | 54 | T or t
85 | 55 | U or u
86 | 56 | V or v
87 | 57 | W or w
88 | 58 | X or x
89 | 59 | Y or y
90 | 5A | Z or z
91 | 5B | (left Windows key)
92 | 5C | (right Windows key)
93 | 5D | (application key - located between the right Windows and Ctrl keys on most keyboards)
96 | 60 | 0 (numpad with Num Lock on)
97 | 61 | 1 (numpad with Num Lock on)
98 | 62 | 2 (numpad with Num Lock on)
99 | 63 | 3 (numpad with Num Lock on)
100 | 64 | 4 (numpad with Num Lock on)
101 | 65 | 5 (numpad with Num Lock on)
102 | 66 | 6 (numpad with Num Lock on)
103 | 67 | 7 (numpad with Num Lock on)
104 | 68 | 8 (numpad with Num Lock on)
105 | 69 | 9 (numpad with Num Lock on)
106 | 6A | * (numpad)
107 | 6B | + (numpad)
109 | 6D | - (numpad)
110 | 6E | . (numpad)
111 | 6F | / (numpad)
112 | 70 | F1
113 | 71 | F2
114 | 72 | F3
115 | 73 | F4
116 | 74 | F5
117 | 75 | F6
118 | 76 | F7
119 | 77 | F8
120 | 78 | F9
121 | 79 | F10
122 | 7A | F11
123 | 7B | F12
144 | 90 | Num Lock
145 | 91 | Scroll Lock
186 | BA | ;
187 | BB | =
188 | BC | ,
189 | BD | -
190 | BE | .
191 | BF | /
192 | C0 | `
219 | DB | [
220 | DC | \
221 | DD | ]
222 | DE | '


XML Actions Concepts

Contents Overview

Description

The XML actions allow you to efficiently and effectively work with any valid XML (Extensible Markup Language) file.

We've made the XML actions extremely powerful, yet remarkably easy to use. Using an innovative XML referencing scheme which we've named "XML Paths," these actions make reading, writing and manipulating XML files simple and straightforward.

If you need to work with XML data, these actions are for you.

XML Paths

Many of the XML actions contain a parameter called XMLPath. This path is used to locate a specific element in the XML file. For example, in the sample XML document, the "address" element inside the first "customer" element can be accessed using:

database/customer/address_info/address

Since an XML document can contain multiple elements with the same name, you often cannot access every element in a document by name alone. For example, what if you need to access the information in the second customer element?

The secret is to add an optional index to each element name in order to specify which occurrence of that name the path refers to. In XML paths, an index consists of a single colon (:) followed by a number. (If no index is specified, the index is assumed to be 1.)

For example, to access the second "customer" element in the first "database" element of the sample XML document, you could use:

database/customer:2

As another example, to access the second "phone" element in the second "customer" element, you would use:

database/customer:2/phone:2

Matching Any Element Name

An asterisk (*) can be used in an XML path to find the first matching element at a given level.

For example, you can use paths like this:

*/customer

...which refers to the first customer element in the first root element, no matter what the root element is named. In other words, the above path wouldn't care whether the root element was "database" or "moonbase_alpha."

You can use an asterisk with an index to refer to an element by position instead of by name. For example, you could use the following path to access the second element inside the customer element, no matter what that element is named:

database/customer/*:2

Using the above path, it wouldn't matter what the first two elements inside customer were named; they could be "first_name" and "last_name" or they could be "nose_length" and "hair_color"...either way, it would be the second element that would be referenced.

You can even form a path with nothing but asterisks. For example, the following path would refer to the third child element within the second root element:

*:2/*:3

Note: An asterisk always matches a single element. It doesn't match "all" elements at that level.

Using a Different Index Delimiter

If you need to, you can change the index delimiter from ':' to something else by assigning a different value to the special Lua variable XML.Delimiter. For example, if your XML document has element names with ':' characters in them, you could change the delimiter to '|' instead by using this script:

XML.Delimiter = "|";

...after which you would specify paths like this:

database/customer|2/phone|2

Sample XML

Note: Most of the examples assume the following XML to be already loaded into memory. To test the examples you can save the text below as an .xml file and then use an XML.Load action to load it into memory.

<database>
<customer id="1010" product="AutoPlay">
<first_name>John</first_name>
<last_name>Smith</last_name>
<company>Indigo Rose</company>
<address_info>
<address>100 Mystreet</address>
<city>Winnipeg</city>
<province>Manitoba</province>
<country>Canada</country>
<postal_code>R3B 0R3</postal_code>
</address_info>
<phone location="daytime">(204)946-0263</phone>
<phone location="evening">(204)946-0242</phone>
<fax>(204)942-3421</fax>
<email>sales@indigorose.com</email>
</customer>
<customer id="1040" product="Setup Factory">
<first_name>Sara</first_name>
<last_name>Winters</last_name>
<company>Indigo Rose</company>
<address_info>
<address>200 Secondstreet</address>
<city>Winnipeg</city>
<province>Manitoba</province>
<country>Canada</country>
<postal_code>R3B 0R4</postal_code>
</address_info>
<phone location="daytime">(204)946-0244</phone>
<phone location="evening">(204)946-0289</phone>
<fax>(204)942-3422</fax>
<email>sales@indigorose.com</email>
</customer>
</database>

The following XML actions are available:

XML.Count
XML.GetAttribute
XML.GetAttributeNames
XML.GetElementNames
XML.GetElementXML
XML.GetValue
XML.GetXML
XML.InsertXML
XML.Load
XML.RemoveAttribute
XML.RemoveElement
XML.Save
XML.SetAttribute
XML.SetValue
XML.SetXML


Z-Order

General Info

Contents Z-Order

The z-order controls how overlapping objects are displayed on a page or dialog. It's called the "z-order" because it deals with how objects are arranged along a page's or dialog's Z axis.

In AutoPlay Media Studio, changing the z-order involves moving individual objects along the Z axis—either "forward" (further from the page/dialog) or "back" (closer to the page/dialog). You can do this easily by selecting an object and using the z-order tools in the menu under Edit > Arrange.

Objects that are further from the page or dialog ("in front") are displayed on top of objects that are closer to the page or dialog. Objects that are closer to the page or dialog ("further back") are displayed behind objects that are further from the page or dialog. Depending on the objects in question, an object in the foreground can completely or partially hide any objects that are "behind" it. (Transparent parts of an image, for example, will let other objects "show through.")

Using the Object Browser

You can also change the z-order by dragging objects up or down in the list on the object browser.

Note: If the object browser isn't visible, you can display it by choosing View > Panes > Object Browser from the menu.

Objects are listed on the object browser according to the z-order. Dragging an object up in this list moves it "higher" in the z-order, i.e. it brings it "closer" to you and further from the page.

"Windowed" Objects

Some objects (the listbox, input, combobox, checkbox, radiobutton, richtext, tree, video, web, flash, pdf, quicktime and xbutton objects) will always appear on top of other kinds of objects, even if they are lower than those other objects in the z-order. The nature of these objects requires them to be drawn onto a separate "window" surface, above the normal, well-behaved objects like images, labels and buttons. For technical reasons, these stubborn lone-wolf objects are commonly referred to as "windowed" objects.

Unfortunately, there isn't anything you can do to force a label object to appear in front of a video object or flash object. Even if the label object is in front of the video object in the z-order, the video object will just keep rendering itself in front of the label object.

To ensure that all of your objects display correctly, you should generally avoid overlapping any of these "windowed" objects on the page or dialog:

  • Video

  • Input

  • Flash

  • ListBox

  • Web

  • ComboBox

  • Tree

  • RadioButton

  • CheckBox

  • RichText

  • PDF

  • QuickTime

  • xButton

Finally, keep in mind that things can happen a bit differently at run time than they do in the design environment. There are times when the z-order might make things look like a big mess at design time, but still show up fine at run time; and there are situations where everything will look fine at design time, but the objects will start fighting it out at run time. Naturally, how things look at run time is more important, so make sure you test things out vigorously. Also don't be afraid to experiment—getting the end result you want may take some trial and error.


XAML Syntax

General Info

Contents XAML Syntax

Extensible Application Markup Language (XAML) is a markup language used in markup enabled xButton objects for advanced text formatting such as highlighting, hyperlinks and more. For further information, see the MSDN XAML Overview.

Supported XAML Tags

Examples

Supported XAML Tags

The following is a list of supported XAML tags and their attributes:

Tags | Attributes
Page | (Style, Margin, ClipToBound, HorizontalAlignment, VerticalAlignment, Width, Height,MinWidth, MaxWidth, MinHeight, MaxHeight,)
Border | (Cursor, Style, Margin, ClipToBound, HorizontalAlignment, VerticalAlignment, Width, Height, MinWidth, MaxWidth,MinHeight, MaxHeight, Padding, Background, BorderThickness, BorderBrush)
TextBlock | (Cursor, Style, Margin, ClipToBound, HorizontalAlignment, VerticalAlignment, Width, Height, MinWidth, MaxWidth, MinHeight, MaxHeight, Padding, Background, Foreground, TextWrapping, TextAlignment, TextDecorations, FontSize, FontWeight, FontFamily, FontStyle, BaselineAlignment, Text)
Image | (Style, Margin, ClipToBound, HorizontalAlignment, VerticalAlignment, Width, Height, MinWidth, MaxWidth, MinHeight, MaxHeight, Source)
Run | (Cursor, Background, Foreground, TextDecorations, FontSize, FontWeight, FontFamily, FontStyle, BaselineAlignment, Text)
LineBreak | no attributes
Span | (Background, Foreground, TextDecorations, FontSize, FontWeight, FontFamily, FontStyle)
Bold | (Background, Foreground, TextDecorations, FontSize, FontWeight, FontFamily, FontStyle)
Italic | (Background, Foreground, TextDecorations, FontSize, FontWeight, FontFamily, FontStyle)
Underline | (Background, Foreground, TextDecorations, FontSize, FontWeight, FontFamily, FontStyle)
InlineUIContainer | (Background, Foreground, TextDecorations, FontSize, FontWeight, FontFamily, FontStyle)
Hyperlink | (Background, Foreground, TextDecorations, FontSize, FontWeight, FontFamily, FontStyle)
Panel | (Style, Margin, ClipToBound, HorizontalAlignment, VerticalAlignment, Width, Height, MinWidth, MaxWidth, MinHeight, MaxHeight, Background)
StackPanel | (Style, Margin, ClipToBound, HorizontalAlignment, VerticalAlignment, Width, Height, MinWidth, MaxWidth, MinHeight, MaxHeight, Background, Orientation)
WrapPanel | (Style, Margin, ClipToBound, HorizontalAlignment, VerticalAlignment, Width, Height, MinWidth, MaxWidth, MinHeight, MaxHeight, Background, Orientation, ItemHeight, ItemWidth)
Canvas | (Style, Margin, ClipToBound, HorizontalAlignment, VerticalAlignment, Width, Height, MinWidth, MaxWidth, MinHeight, MaxHeight, Background, Left, Right, Top, Bottom)
Grid | (Style, Margin, ClipToBound, HorizontalAlignment, VerticalAlignment, Width, Height, MinWidth, MaxWidth, MinHeight, MaxHeight, Background, ColumnDefinitions, RowDefinitions)
ColumnDefinition | (Width, MinWidth, MaxWidth)
RowDefinition | (Height, MinHeight, MaxHeight)
Polygon | (Width, Margin, ClipToBound, HorizontalAlignment, VerticalAlignment, Width, Height, MinWidth, MaxWidth, MinHeight, Points)
Polyline | (Width, Margin, ClipToBound, HorizontalAlignment, VerticalAlignment, Width, Height, MinWidth, MaxWidth, MinHeight, Points)
Rectangle | (IsMouseOver, Width, Margin, ClipToBound, HorizontalAlignment, VerticalAlignment, Width, Height, MinWidth, MaxWidth, MinHeight)
Ellipse | (Width, Margin, ClipToBound, HorizontalAlignment, VerticalAlignment, Width, Height, MinWidth, MaxWidth, MinHeight)
Line | (Width, Margin, ClipToBound, HorizontalAlignment, VerticalAlignment, Width, Height, MinWidth, MaxWidth, MinHeight, X1, Y1, X2, Y2)
Button | (IsPressed, Style, Width, Margin, ClipToBound, HorizontalAlignment, VerticalAlignment, Width, Height, MinWidth, MaxWidth, MinHeight, Content)
CheckBox | no attributes
RadioButton | no attributes
ScrollViewer | (Style, VerticalScrollBarVisibility, HorizontalScrollBarVisibility)
SolidColorBrush | (Color)
LinearGradientBrush | (StartPoint, EndPoint, GradientStops)
GradientStop | (Color, Offset)
Style | (TargetType, BasedOn, Resources)
Setter | (Property, Value)

Examples

The following are examples of xButton object XAML text that can be used when Enable markup is selected.

Example 1

<TextBlock>Button with <Hyperlink>Hyperlink</Hyperlink></TextBlock>

This example shows the text "Button with Hyperlink" when used on a markup enabled xButton object.

Example 2

<TextBlock><Run FontWeight='Bold'>This text is </Run> <Run Foreground='Red'>colored red</Run></TextBlock>

This example shows the text "This text is colored red" where 'colored red' is shown in red while the remaining text is shown in black.

Example 3

<TextBlock>This is <Italic>italic</Italic> text and this is <Bold>bold</Bold> text.</TextBlock>

This example shows the text "This is italic text and this is bold text."

Example 4

<TextBlock>This is <Italic>italic</Italic> text and this is <Bold>bold</Bold> text.</TextBlock>

This example shows the text "This is italic text and this is bold text."

Example 5

<TextBlock FontSize="32" Padding = "3" VerticalAlignment="Center">Install <Image Cursor="Hand" Source="file://AutoPlay/Images/check.png"/></TextBlock>

This example shows the text "Install" followed by an image. The mouse cursor changes to a hand when you mouse over the image.

Example 6

<StackPanel TextBlock.FontFamily="Tahoma">
<TextBlock Padding="1, 3, 1, 3" FontWeight="Bold">Install</TextBlock>
<TextBlock Padding="9, 6, 30, 7" TextWrapping="Wrap">Click to install the software.</TextBlock>
<Border Height="1" Background="#9ebbdd" />
<Border Height="1" Background="White" />
<StackPanel Margin="1, 7, 0, 3" Orientation="Horizontal">
<TextBlock Margin="7, 0, 0, 0" VerticalAlignment="Center" FontWeight="Bold"><Hyperlink>More Info</Hyperlink></TextBlock>
</StackPanel>
</StackPanel>

This example shows an xButton with the text "Install" in bold, on the next line the indented text "Click to install the software." followed by a separator and a hyperlink labeled "More Info.

Example 7

<Page>
<StackPanel>
<Border Cursor="Hand" BorderThickness="1" BorderBrush="#bdcaea">
<Border.Background>
<LinearGradientBrush EndPoint="1, 0.5" StartPoint="0, 0.5">
<GradientStop Color="#c3d6ff" Offset="0"/>
<GradientStop Color="#eef2ff" Offset="1"/>
</LinearGradientBrush>
</Border.Background>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="Install" Foreground="#30486e" FontSize="18" Margin="12,2,2,2"/>
<TextBlock Grid.Column="1" Margin="2,2,12,2"><Hyperlink Foreground="#047c05" FontSize="18">More Info</Hyperlink></TextBlock>
</Grid>
</Border>
<Border Margin="0, 0, 0, 0" BorderThickness="1, 0, 1, 1" BorderBrush="#bdcaea" Background="#eff3ff">
<TextBlock TextWrapping="Wrap" Margin="12, 4, 12, 4"><Run>Click to install the software from D:\install</Run></TextBlock>
</Border>
</StackPanel>
</Page>

This example shows an xButton with a panel within the button containing the formatted text "Install", beside it a hyperlink "More Info" and below the text "Click to install the software from D:\install."


Ordering Information

Ordering Information

Benefits of Ordering

When you order AutoPlay Media Studio you will receive:

  • AutoPlay Media Studio program with the latest revisions and enhancements.

  • A license to distribute, royalty-free, the applications that you create with AutoPlay Media Studio.

  • A professionally written electronic User's Guide and Program Reference.

Please visit www.indigorose.com for available support resources and policies.

Pricing

Current pricing information can be obtained from our web site at www.indigorose.com.

AutoPlay Media Studio is licensed on a royalty-free, per developer basis. Multiple license discounts and site licenses are available. Purchase orders from qualified government, corporate, and educational institutions are terms Net 30 and subject to approval. Please contact our sales department for details.

Contact Information:

Our friendly sales staff is ready to answer any questions you may have. Please visit at www.indigorose.com for full contact details.


Changes from 3 to 8

Introduction

Contents Changes from 3 to 8

Familiar with AutoPlay Menu Studio 3?
Here’s what you need to know to get right up to speed with v8!

New Scripting Language

AutoPlay Media Studio now uses a free-form scripting language. This allows you to type in your actions as well as create your own functions. This new scripting language gives you greater freedom and makes it much easier to accomplish many tasks. Language features such as IF statements and FOR loops give you far greater control over the actions than was possible in 3. For example, conditions are handled in a much more natural (and powerful) way using IF statements, allowing you to apply a single condition to many actions.

The excellent built-in script editor includes features like syntax highlighting, search-and-replace, bookmarks and macro support. You can either type your actions straight into the editor, or you can add and edit them using the helpful action wizard interface, complete with descriptive text for each action parameter.

More Actions

In 3 you were limited to 34 actions. In AutoPlay 8, you have many more actions at your disposal. This means you can create even more advanced projects.

Note that if you convert a 3 project to 8, the actions will not be converted. Please see Importing AutoPlay Menu Studio 3 Projects for more details. You can read more about the new scripting language in the Scripting Guide.

More Events

There are now many more events to assign actions to—including the new "On Preload" page and dialog event that lets you make changes to a page or dialog before it's even displayed. There's also a handy "On Timer" event that lets you incorporate timed actions into your projects.

Customizable Dialogs

Application development has been raised to a new level in AutoPlay Media Studio 8 with the addition of customizable dialogs. Dialogs support the same background settings, objects and events as pages do...but the options don't stop there. Dialogs have features above and beyond pages including custom sizes, multiple windows styles, and even a custom icon. Complemented by both its own "DialogEx" action category containing 21 actions, as well as 6 additional "Application" actions, you'll surely find this powerful new feature a welcome addition to your design arsenal.

Changes to Objects

There have been several changes to AutoPlay Media Studio's objects.

Objects which are available in AutoPlay Media Studio 8 are as follows:

  • The button object allows you to use single-file .btn files to create multi-state buttons. The button object is similar to the v3.0 image object, but much more advanced and even easier to use. Just drag a .btn file onto the page or dialog, and it comes complete with images for each of the different states—up, down, highlighted and disabled—already built into the object.

  • The new xButton object is similar to the Button object, but is instead an extension of the Windows button. It contains features such as setting text, images, using visual themes and styles, and even supports markup so you can incorporate text highlighting, hyperlinks and more.

  • AutoPlay Media Studio 8's image object is now used simply for single images. One big change is that the image object is now resizable (like all of the objects in 8), so you can resize an image without using an external paint program. In addition, both the image and button objects support 32-bit images that contain alpha channel information. This allows you to create smooth transparent and shadowed images.

  • The new slideshow object allows you to show a series of images in a set area. It supports automatic resizing and scaling as well as transitions between images.

  • AutoPlay Menu Studio 3's text box object has been replaced with the paragraph object. The paragraph object does not allow the selection of text, but does allow custom "skinned" scrollbars as well as transparent backgrounds. If you want to simulate AutoPlay Media Studio 3's text box object, just use AutoPlay Media Studio 8's input object.

  • The new rich text object allows you to display rich text (.rtf) in an object. Supports transparent background as well as design-time and runtime character and paragraph formatting.

  • The new PDF object allows you to display PDF files directly on the page or dialog, just like it would appear in the Adobe Reader application or web browser. It does this by taking advantage of the Adobe Reader ActiveX control.

  • The AVI Video object has been replaced with an all-purpose video object. In addition to playing AVIs, the new video object is able to play many more formats, including WMP and MPEG. AutoPlay Media Studio 8's video object is built directly on top of low-level DirectX interfaces, which maximizes system compatibility. As an added bonus, the video object supports custom "skins" for the transport controls.

  • The new QuickTime object lets you play audio, video or show images on the page or dialog by taking advantage of the QuickTime ActiveX control.

  • The new label object is designed for placing static text on the page or dialog. When you resize a label object, the size of its text changes automatically. And like all objects in 8 that can display text, the label object fully supports anti-aliasing.

  • The Flash object allows you to display Flash files directly on the page or dialog, complete with animation and interactivity.

  • The hotspot object replaces the old hyperlink object, but no longer supports swapping of page background image areas. In fact, the ability to switch between multiple page background images has been removed. (This type of functionality can be better achieved with the button object.)

  • The web object lets you display a web site on the page or dialog, just like it would appear in Internet Explorer.

  • The input object allows you to add a single or multi-line input field on the page or dialog, so your users can type information right into your project. It even has the ability to hide text as it's typed, so you can use it to collect a password from the user without the risk of giving it away to anyone peeking over their shoulders.

  • The listbox object allows you to display a list of items on the page or dialog in a scrollable area. For example, you could display a list of song titles (so the user could choose a song to play), or a list of topics (so the user could decide what topic to view next).

  • The combobox object allows you to display a list of items on the page or dialog in a 'dropdown' menu list. For example, you could display a list of countries that the user may live in on a registration screen.

  • The new checkbox object wraps the standard Windows checkbox control but takes it to a new level by allowing transparent background and mouse state text color changes.

  • The new radio button object is great for quiz and test applications. Radio buttons support transparent backgrounds and changing text color as the mouse passes over them. Radio button selection and grouping is also handled automatically.

  • The new grid object allows you to add spreadsheets, grids and list controls to your applications.

  • The progress object allows you to display some type of progress on the page or dialog. This could be used to visually indicate progression through a linear menu, as a movie position status indicator, or any other implementation that gives your application that professional finish.

  • The tree object allows you to display a selection tree on the page or dialog. Parent elements can be expanded/collapsed to show/hide options.

The way objects are created and destroyed at run time has changed as well. In 8, the objects on a page or dialog exist from the moment the page or dialog is created, until the moment the it is closed. This means objects can respond to actions even while they're hidden. They will also continue to trigger their events. (Except for mouse events, of course.)

Managed Project Resource Files

AutoPlay Media Studio 8 has a brand new resource file management system in place. Now any time you add a file to your project, a copy of the file is made and used in the project. This ensures that you never lose resource files (images, videos, documents, etc.) that are used by your project. This feature also dramatically speeds up project previewing and the build process in general.

New Audio System

AutoPlay Menu Studio 3's single-sound player has been replaced with an all-new state of the art audio system. The new audio system allows real-time mixing of multiple audio channels—each of which can be controlled independently. With the addition of new audio actions, you can do everything that the v3 player did and much, much more. As well, the new background music playlist makes it incredibly simple to add project-wide background music that will mix automatically with foreground audio.

No More Virtual CD-ROM Folder

AutoPlay Menu Studio 3's Virtual CD-ROM feature has been done away with. You don't have to specify a folder any more. Instead, the resource file management system takes care of it for you automatically. Every project has its own "project folder" that contains all of the files that will be burned to your CD. It's all done behind the scenes, so you still enjoy all of the benefits, without even having to think about it.

Product Extensibility

AutoPlay Media Studio 8 has now added the ability to extend the product through the use of plugins. Object plugins allow the seamless addition of new objects to the product. Action plugins allow the actions to be extended to do most anything. Plugins will become available by both Indigo Rose and third party developers.

Startup Movies

AutoPlay Media Studio 8 now allows you to specify a movie that will be displayed when your application starts up. You can use either videos or flash files as your startup movie.

Enhanced Technology Detection

AutoPlay Media Studio 8 includes a feature that makes it easy to check for various technologies that your project might depend on. You can choose from many different types of technologies to detect, such as Adobe Flash, Microsoft PowerPoint or Adobe Acrobat. The best part is that new detection scripts can be dynamically added to the product.

Improved Design Environment

AutoPlay Media Studio 8's design environment has been dramatically improved with a panel system that allows docking panels to be tabbed, pinned and hidden. You can even configure your own custom workspace layouts. There are too many new design environment features to mention here. Please read the User’s Guide to discover them all.

NEW! Faster & More Powerful Lua 5.1 Scripting Engine

AutoPlay Media Studio 8's scripting engine is now faster, more powerful and much more extensible. The Lua 5.1 system features a new module system, incremental garbage collection, new mechanism for varargs, new syntax for long strings and comments, mod and length operators, metatables for all types and a fully reentrant parser.

NEW! Support for Lua 5.1 Code Modules

With the new scripting engine upgrade comes compatibility with Lua 5.1 modules. You now have access to a wealth of free Lua code you can download and use in your AutoPlay Media Studio 8 projects. In most cases you simply copy the module files into your project and "require" them in your script. Just some of the useful modules out there include Bit Operation, Date, Canvas Draw, Imaging Tool, GD, Crypto, Colors, Speech, Alien, Social (Twitter), CURL, Regular Expression Parsing and so much more. It’s a whole treasure chest of addons and tools just waiting for you!

NEW! Blu-ray Disc Support

Do your projects contain huge database and video files? AutoPlay Media Studio 8 now includes full support for burning directly to Blu-Ray media (BD-R, BD-RE). The integrated Bluray disc burning allows you to publish your project directly to single layer and dual-layer BD-R and BD-RE media, supporting 25 GB, 50 GB and even 100 GB formats.

NEW! Application Styles / Skinning

AutoPlay Media Studio 8 gives you the freedom to create applications that look exactly the way you want. Perhaps you prefer that your programs to take on the same appearance as the operating system (e.g. Windows XP, Vista, Windows 7 Aero...)? Or do you want them to be entirely customized with completely custom drawn background images, buttons and window shapes? Or perhaps you'd like to simply make use of the hundreds of ready-to-use MSSTYLES themes (like OS/X Tiger and Panther) that you can download on the Internet? In any case, AutoPlay Media Studio makes it possible – and easy!

NEW! Integrated Database Access

It's never been easier to write database applications using AutoPlay Media Studio! Easily connect to a variety of popular local and remote/Internet database systems including MySQL, SQLite3, ODBC, Oracle and PostgreSQL. Execute any SQL statements you desire like CREATE, INSERT and more – even easily retrieve data results using a row-by-row cursor system. Features full integration with our fill-in-the-blanks style Action Wizard, plus intelligent code completion.

NEW! PDF Object

AutoPlay Media Studio now features integrated support for displaying PDF documents right in your application. This highly requested feature also gives you full control over the display and formatting. You can show/hide toolbars, scrollbars and borders. Layout options include "Single Page", "One Column", "Two Columns" and "User Preference". View options include "Fit Page", "Fit Page Width", "Fit Page Height" and "Actual Size".

NEW! PDF Actions

Take control of the PDF object with 18 easy-to-use actions. Fully integrated into the fill-in-the-blanks Action Wizard, you'll be able to easily create dynamic applications to work with PDF files. Actions are provided to Print, Load, Navigate, Zoom, Resize, Hide and much more.

NEW! QuickTime Object

Thanks to the new Apple QuickTime object, your AutoPlay Media Studio applications are now compatible with over 80 video, audio and image formats. Video formats include .MOV, .DV, .M4V, .MP4 and dozens more – including the amazing h.264 format. Audio formats include .AAC, .AIF, .M4A, .MP3, etc. Visual formatting options let you lock an aspect ratio, resize the media to fit the object dimensions or center it within the object area. Border styles include 3D, plain or none.

NEW! QuickTime Actions

The Quicktime object by itself is great - but a Quicktime object plus 22 built-in high-level actions is just plain awesome! Brought together, your AutoPlay Media Studio actions have exceptional control over the QuickTime object. Using simple script commands you can Play, Seek, Set Volume, Load, Mute, View Full Screen, Hide, Show and much more. Your only limit is your imagination.

NEW! xButton Object

If you're trying to create an application that blends in beautifully with the operating system, the new xButton object is just what the doctor ordered. However, that's just the beginning! The new xButton object supports far more customization than was previously possible. Now you can modernize your applications by adding "icon" images to your buttons, plus you can "markup" the text however you desire! This object lets you control the relative placement of button text and button images; choose between normal and toggle styles; adjust fonts and colors; and even markup you text using dozens of XAML tags – including hyperlinks right on your buttons! By default, the xButton styles itself according to whatever operating system it is being run on. If your application is running on Vista, the button looks like a standard Vista button. If you're running it on Windows 7, it looks like Windows 7. However, you can easily override this and choose from many included styles like Flat, Office 2000, Office XP or many different Office 2007 styles. Or hundreds of MSSTYLES themes… The options are endless.

NEW! Checkbox List Object

Checkbox lists are a long awaited addition to AutoPlay Media Studio! We've integrated this feature into the existing Listbox object – you just need to turn it on. Once you do, you can easily present lists of items with corresponding checkboxes. Actions are included to get and set the checkbox state for any listbox item with ease. You'll find dozens of great uses for this one!

NEW! Rolling Code Data Security

AutoPlay Media Studio 8 adds another layer of protection to your applications and scripts. A unique random encryption code is now generated every time you build your project, making "hacking" of your applications much more difficult. As we all know, anyone determined enough can break any protection system given enough time and resources, but the use of rolling codes renders generic attacks ineffective. You can now sleep a little easier!

NEW! Multiple Timers

You're no longer limited to just one timer event per page! You can now set as many "named" timers as you want. Having multiple timers running really opens up the creative possibilities for animations, games, status updates and dozens of other applications.

NEW! Service Actions

Easily control Windows Services using the seven new actions included in AutoPlay Media Studio 8. Everything you need is included, such as Create, Start, Stop, Pause, Delete, Query and Continue.

NEW! FTPWI Actions

AutoPlay Media Studio 8 includes a set of built-in FTP actions, enabling your application to easily download files over the Internet from FTP servers. These new FTP actions make use of the WinINet API to ensure compliance with the RFC 959 File Transfer Protocol specifications. Actions include FTPWI.Download, FTPWI.GetErrorInfo and FTPWI.GetFileSize.

NEW! System Restore Actions

This trio of system restore actions are extremely powerful and essential for any application that might want to make system changes or install software in a failsafe manner. By creating a system restore point using System.SetRestorePoint before making changes to the computer, the user can easily rollback those changes using the operating system's "restore" feature (found on Windows Vista or later). Actions include System.IsSystemRestoreAvailable, System.SetRestorePoint and System.RemoveRestorePoint.

NEW! Dialog.ComboBox Action

Here's an action that'll find a lot of use! The Dialog.ComboBox action is used to pop up a dialog box presenting the user with a drop-down list of items they can choose from. You simply pass in a list of items to select from, choose if you'd like them sorted or not and whether or not to restrict the user to just the items in the list, or allow them to type in their own text response. It's a fast and compact way to get user input, while offering suggestions to them at the same time!

NEW! Balloon Tooltips and Extended Tooltips

In addition to the standard popup tooltips you're used to from previous versions, AutoPlay Media Studio 8 now lets you display Balloon tooltips! It's an extremely attractive option for presenting context sensitive help within your application. It's also much more useful than the old style tooltips, as you can use multiple lines of text to present your instructions. In fact, multi-line tooltips were so useful, we also added the feature to the standard looking popup as "extended" tooltips.

NEW! Modernized Visual Workspace

AutoPlay Media Studio has always looked pretty slick, but that wasn't good enough. The entire project workspace has been overhauled. Selection boxes, toolbars, context menus – everything has been redone using a consistent color palette, light source and 3D perspective. You spend a lot of time working on your projects. Your tools should serve to increase your productivity, rather than distract you. With AutoPlay Media Studio 8, you'll find everything is more logically arranged and attractively presented – so you can get more done.

NEW! Plugin SDK v2

Action Plugins and Object Plugins are one of the best features of AutoPlay Media Studio. They allow 3rd party software developers to extend and expand the product in an extremely integrated and seamless fashion. By simply dropping a plugin into your project, you can easily save yourself hours of work and add significant functionality to your application. The great news is that with AutoPlay Media Studio 8, plugin developers can now fully leverage the advantages of the Lua 5.1 language. The Plugin SDK v2 is available for free download on the indigorose.com website.

Improved! Grid Object

Working with data grids in AutoPlay Media Studio is more useful than ever, especially with the new integrated database features in v8. As always, the grid object allows you to add spreadsheets, grids and list controls to your applications. With over 110 scriptable actions, it is extremely powerful. To help you easily preload data, you can now even specify a CSV (comma separated value) data file at design time.

Improved! Flash Object with ExternalInterface Support

The Adobe Flash object now supports calling and responding to Flash actionscript functions with the addition of the new "Flash.CallFunction" and "Flash.SetReturnValue" actions and new "On FlashCall" event. Access to Flash's external API opens up many new uses for the Flash object and advanced interaction with your AutoPlay Media Studio application such as playing FVL video files using a Flash loader.

Improved! Web Object

The web object now uses the latest Microsoft Internet Explorer SDK. New scrollbar and border options have been added to give you increased visual control over the object - allowing you to better integrate web pages into your AutoPlay Media Studio applications.

NEW! Stack Traceback for Syntax Errors

We've made it easier for you to debug syntax errors in your scripts by providing you with better error reports. Error messages now include additional details about exactly where the problem occurred – right down to the event name and line number!

NEW! Debug Message Logging

Testing and debugging your projects is much easier in AutoPlay Media Studio 8. You can now send all debug message to a human-readable text format log file, to a debug window or simultaneously to both locations. Between the automatic "Trace Mode" logging, "Event Context" information and "Last Error" actions, you've got a formidable collection of tools to help squash those pesky bugs and logic errors!

NEW! Eyedropper Color Picker

Easily match colors thanks to the new eyedropper style color picker. Integrated into all color choosers, simply move your mouse pointer off the dialog and watch it turn into an eyedropper cursor. Click on the color of any pixel on your screen and voila – you've automatically set the color to match.

NEW! Updated Dependency Modules

All of the dependency modules have been updated in AutoPlay Media Studio 8. Dependency Modules make it fast and easy to detect whether or not common 3rd party software applications and technologies are installed on the user's computer. AutoPlay Media Studio 8 can detect the current versions of such products as Microsoft PowerPoint, Adobe Flash, Microsoft Word, Microsoft Excel, Adobe Acrobat, Apple QuickTime, Windows Media Player and more. If the required product is not detected, the user will be alerted to the problem and conveniently directed to the appropriate website for download and installation.

NEW! Windows Object Styles

In order to enable you to create applications that can look and feel exactly like those created using traditional Windows platform SDK development tools, we went through all of our existing objects and updated them. For example, objects like the Checkbox, Radio Button and Progress Bar will now take on the look that users expect to see on their operating system. On Windows 7, they'll look consistent with the standard operating system theme. On Windows XP, they'll look like XP – and so on. The best part though is that they'll also now respond correctly to changes in the application theme or MSSTYLES skin files that are supported in AutoPlay Media Studio 8. It all adds up to a 100% professional look!

NEW! Visually Identify Plugin Actions

The Action Wizard now marks any actions that are contained in Action Plugins with a "plugin" identifier. This makes it much easier to quickly identify what is built-in to AutoPlay Media Studio and what you've added later through 3rd party additions. It's especially handy when you're looking for documentation, help files, samples and technical support.

Improved! Video Object Transport Skins

The Video object has been modernized with a variety of new graphic styles. Choose from attractive new blue, green and gray skins. If you don't find a style you like, it's super easy to create your own video transport skins using Photoshop or any other graphics editor. We've also made the skin format more flexible, removing the constraining height restrictions that may have hampered your creativity in the past.

Improved! Paragraph Object Scrollbar Styles

The Paragraph object in AutoPlay Media Studio 8 has been updated to default to Windows 7 style scrollbars. This will give any of your scrolling textboxes a much more up-to-date visual appearance. Of course, you can still make your own scrollbar styles from scratch (or download shared skins from http://www.autoplaymediastudio.com) or choose from old favorites such as Chrome, Euro, Corporate, Charcoal, Industrial and more.

Improved! Application Startup Dialog

AutoPlay Media Studio 8 is all about helping you get things done faster and easier. Even small things like the startup welcome screen have been improved! The startup screen now gives you fast access to multiple recently used projects, one-click restore of the last used project, or simply creating a new project using a template or blank project. Additionally, an integrated RSS feed keeps you updated on product improvements, updates, bug fixes and news!

Improved! Project Explorer Window

The Project Explorer in AutoPlay Media Studio 8 has been revamped to give you a better overall view of your project. Things like better icons, collapsible Dialog and Page categories and better visual indications for hidden and locked objects will be much appreciated. Additional context-sensitive right-click menus have been added and reworked to present you with only the most appropriate commands for working with objects, pages, dialogs and events.

Improved! Quick Script Snippets

A variety of changes were made to the script editor to help more quickly write your code. Of course the popular Action Wizard, Code Completion and Intellisense are still there to guide you. We've also expanded and reorganized the one-click "Quick Script" feature. Many common programming "snippets" are included, making it super easy to add loops, control structures and other often-used bits of script. Additionally, "object tables" have been moved into their own category in order to help you find what you’re looking for at a glance.

NEW! Centralized Repository for Plugins, Templates and Addons

With all the new possibilities available to AutoPlay Media Studio 8 developers, we've put together a centralized archive to help organize everything. At http://www.autoplaymediastudio.com you'll find an easy-to-navigate repository for everything related to AutoPlay Media Studio. You'll find action plugins, object plugins, application themes, Lua modules, video transport skins, scrollbar skins, MSSTYLES skins, custom .BTN format button files, background images, project templates, example projects, scripts, audio files, tutorials, tools and lots more.


Changes from 4 to 8

Introduction

Contents Changes from 4 to 8

Familiar with AutoPlay Media Studio 4?
Here’s what you need to know to get right up to speed with v8!

New Scripting Language

AutoPlay Media Studio 8 now uses a new free-form scripting language. This allows you to type in your actions as well as create your own functions. Although similar to the v4 actions, they are not the same. If you convert a project, the actions will not be converted. Please see the conversion topic in the Help file for more details. You can read more about the new scripting language in the Scripting Guide.

Customizable Dialogs

Application development has been raised to a new level in AutoPlay Media Studio 8 with the addition of customizable dialogs. Dialogs support the same background settings, objects and events as pages do...but the options don't stop there. Dialogs have features above and beyond pages including custom sizes, multiple windows styles, and even a custom icon. Complemented by both its own "DialogEx" action category containing 21 actions, as well as 6 additional "Application" actions, you'll surely find this powerful new feature a welcome addition to your design arsenal.

Changes to Objects

There have been several changes to AutoPlay Media Studio's objects. The biggest change is the addition of the button object. The button object allows you to use single-file .btn files to create multi-state buttons. The button object is roughly equivalent to the v4 image object. AutoPlay Media Studio 8's image object is now used simply for single images. Both the image and button objects support 32-bit images that contain alpha channel information. This allows you to create smooth transparent and shadowed images.

AutoPlay Media Studio 4's text box object has now been replaced with the paragraph object. The paragraph object does not allow the selection of text but does allow custom "skinned" scrollbars as well as transparent backgrounds. If you want to simulate an AutoPlay Media Studio 4's text box object, just use AutoPlay Media Studio 8's input object.

The Media Player object has been replaced with the video object. AutoPlay Media Studio 8's video object does not rely on the Media Player ActiveX control but retains most of the same functionality and video format compatibility. The video object is built directly on top of low-level DirectX interfaces, which maximizes system compatibility. As an added bonus, the video object supports custom "skins" for the transport controls. AutoPlay Media Studio 4's AVI object has been done away with since it is now quite obsolete. The video object can do everything that the AVI object could and much more.

The hotspot object no longer supports swapping of page background image areas. Multiple page background images have also been removed. This type of functionality can be better achieved with the button object.

There has been a change in the way objects are created at runtime. In version 4, objects were created internally whenever they were shown (made visible), and destroyed whenever they were hidden. This meant objects could only respond to actions if they were visible. In version 8, objects are always created when the page or dialog is created, even if the objects are hidden. The objects aren't destroyed until the page or dialog is closed. Since objects are no longer created and destroyed as they're hidden and shown, they can now respond to actions even while they're hidden. They will also continue to trigger their events.

Lastly, new objects have been added, such as the combobox object, the progress object, the tree object, the richtext object, the radiobutton object, the checkbox object, the slideshow object, the grid object, the QuickTime object, the PDF object, and the xButton object to make your applications more powerful than ever!

Managed Project Resource Files

AutoPlay Media Studio 8 has a brand new resource file management system in place. Now any time you add a file to your project, a copy of the file is made and used in the project. This ensures that you never lose resource files (images, videos, documents, etc.) that are used by your project. This feature also dramatically speeds up project previewing and the build process in general.

New Audio System

AutoPlay Media Studio 4's single-sound player has been replaced with an all-new state of the art audio system. The new audio system allows real-time mixing of multiple audio channels—each of which can be controlled independently. With the addition of new audio actions, you can do everything that the v4 player did and much, much more. As well, the new background music playlist makes it incredibly simple to add project-wide background music that will mix automatically with foreground audio.

No More Global Lists

AutoPlay Media Studio 4's global lists feature has been done away with. The new scripting language allows the use of much more flexible and useful "tables" (arrays). It is a much better way to manage data lists.

Product Extensibility

AutoPlay Media Studio 8 has now added the ability to extend the product through the use of plugins. Object plugins allow the seamless addition of new objects to the product. Action plugins allow the actions to be extended to do most anything. Plugins will become available by both Indigo Rose and third party developers.

Startup Movies

AutoPlay Media Studio 8 now allows you to specify a movie that will be displayed when your application starts up. You can use either videos or flash files as your startup movie.

Enhanced Technology Detection

Instead of just allowing you to automatically detect Flash, Media Player and Internet Explorer like AutoPlay Media Studio 4 did, AutoPlay Media Studio 8 takes technology detection to a whole new level. You can now choose from many different types of technologies to detect. The best part is that new detection scripts can be dynamically added to the product.

Improved Design Environment

AutoPlay Media Studio 8's design environment has been dramatically improved with a panel system that allows docking panels to be tabbed, pinned and hidden. You can even configure your own custom workspace layouts. There are too many new design environment features to mention here. Please read the User’s Guide to discover them all.

NEW! Faster & More Powerful Lua 5.1 Scripting Engine

AutoPlay Media Studio 8's scripting engine is now faster, more powerful and much more extensible. The Lua 5.1 system features a new module system, incremental garbage collection, new mechanism for varargs, new syntax for long strings and comments, mod and length operators, metatables for all types and a fully reentrant parser.

NEW! Support for Lua 5.1 Code Modules

With the new scripting engine upgrade comes compatibility with Lua 5.1 modules. You now have access to a wealth of free Lua code you can download and use in your AutoPlay Media Studio 8 projects. In most cases you simply copy the module files into your project and "require" them in your script. Just some of the useful modules out there include Bit Operation, Date, Canvas Draw, Imaging Tool, GD, Crypto, Colors, Speech, Alien, Social (Twitter), CURL, Regular Expression Parsing and so much more. It’s a whole treasure chest of addons and tools just waiting for you!

NEW! Blu-ray Disc Support

Do your projects contain huge database and video files? AutoPlay Media Studio 8 now includes full support for burning directly to Blu-Ray media (BD-R, BD-RE). The integrated Bluray disc burning allows you to publish your project directly to single layer and dual-layer BD-R and BD-RE media, supporting 25 GB, 50 GB and even 100 GB formats.

NEW! Application Styles / Skinning

AutoPlay Media Studio 8 gives you the freedom to create applications that look exactly the way you want. Perhaps you prefer that your programs to take on the same appearance as the operating system (e.g. Windows XP, Vista, Windows 7 Aero...)? Or do you want them to be entirely customized with completely custom drawn background images, buttons and window shapes? Or perhaps you'd like to simply make use of the hundreds of ready-to-use MSSTYLES themes (like OS/X Tiger and Panther) that you can download on the Internet? In any case, AutoPlay Media Studio makes it possible – and easy!

NEW! Integrated Database Access

It's never been easier to write database applications using AutoPlay Media Studio! Easily connect to a variety of popular local and remote/Internet database systems including MySQL, SQLite3, ODBC, Oracle and PostgreSQL. Execute any SQL statements you desire like CREATE, INSERT and more – even easily retrieve data results using a row-by-row cursor system. Features full integration with our fill-in-the-blanks style Action Wizard, plus intelligent code completion.

NEW! PDF Object

AutoPlay Media Studio now features integrated support for displaying PDF documents right in your application. This highly requested feature also gives you full control over the display and formatting. You can show/hide toolbars, scrollbars and borders. Layout options include "Single Page", "One Column", "Two Columns" and "User Preference". View options include "Fit Page", "Fit Page Width", "Fit Page Height" and "Actual Size".

NEW! PDF Actions

Take control of the PDF object with 18 easy-to-use actions. Fully integrated into the fill-in-the-blanks Action Wizard, you'll be able to easily create dynamic applications to work with PDF files. Actions are provided to Print, Load, Navigate, Zoom, Resize, Hide and much more.

NEW! QuickTime Object

Thanks to the new Apple QuickTime object, your AutoPlay Media Studio applications are now compatible with over 80 video, audio and image formats. Video formats include .MOV, .DV, .M4V, .MP4 and dozens more – including the amazing h.264 format. Audio formats include .AAC, .AIF, .M4A, .MP3, etc. Visual formatting options let you lock an aspect ratio, resize the media to fit the object dimensions or center it within the object area. Border styles include 3D, plain or none.

NEW! QuickTime Actions

The Quicktime object by itself is great - but a Quicktime object plus 22 built-in high-level actions is just plain awesome! Brought together, your AutoPlay Media Studio actions have exceptional control over the QuickTime object. Using simple script commands you can Play, Seek, Set Volume, Load, Mute, View Full Screen, Hide, Show and much more. Your only limit is your imagination.

NEW! xButton Object

If you're trying to create an application that blends in beautifully with the operating system, the new xButton object is just what the doctor ordered. However, that's just the beginning! The new xButton object supports far more customization than was previously possible. Now you can modernize your applications by adding "icon" images to your buttons, plus you can "markup" the text however you desire! This object lets you control the relative placement of button text and button images; choose between normal and toggle styles; adjust fonts and colors; and even markup you text using dozens of XAML tags – including hyperlinks right on your buttons! By default, the xButton styles itself according to whatever operating system it is being run on. If your application is running on Vista, the button looks like a standard Vista button. If you're running it on Windows 7, it looks like Windows 7. However, you can easily override this and choose from many included styles like Flat, Office 2000, Office XP or many different Office 2007 styles. Or hundreds of MSSTYLES themes… The options are endless.

NEW! Checkbox List Object

Checkbox lists are a long awaited addition to AutoPlay Media Studio! We've integrated this feature into the existing Listbox object – you just need to turn it on. Once you do, you can easily present lists of items with corresponding checkboxes. Actions are included to get and set the checkbox state for any listbox item with ease. You'll find dozens of great uses for this one!

NEW! Rolling Code Data Security

AutoPlay Media Studio 8 adds another layer of protection to your applications and scripts. A unique random encryption code is now generated every time you build your project, making "hacking" of your applications much more difficult. As we all know, anyone determined enough can break any protection system given enough time and resources, but the use of rolling codes renders generic attacks ineffective. You can now sleep a little easier!

NEW! Multiple Timers

You're no longer limited to just one timer event per page! You can now set as many "named" timers as you want. Having multiple timers running really opens up the creative possibilities for animations, games, status updates and dozens of other applications.

NEW! Service Actions

Easily control Windows Services using the seven new actions included in AutoPlay Media Studio 8. Everything you need is included, such as Create, Start, Stop, Pause, Delete, Query and Continue.

NEW! FTPWI Actions

AutoPlay Media Studio 8 includes a set of built-in FTP actions, enabling your application to easily download files over the Internet from FTP servers. These new FTP actions make use of the WinINet API to ensure compliance with the RFC 959 File Transfer Protocol specifications. Actions include FTPWI.Download, FTPWI.GetErrorInfo and FTPWI.GetFileSize.

NEW! System Restore Actions

This trio of system restore actions are extremely powerful and essential for any application that might want to make system changes or install software in a failsafe manner. By creating a system restore point using System.SetRestorePoint before making changes to the computer, the user can easily rollback those changes using the operating system's "restore" feature (found on Windows Vista or later). Actions include System.IsSystemRestoreAvailable, System.SetRestorePoint and System.RemoveRestorePoint.

NEW! Dialog.ComboBox Action

Here's an action that'll find a lot of use! The Dialog.ComboBox action is used to pop up a dialog box presenting the user with a drop-down list of items they can choose from. You simply pass in a list of items to select from, choose if you'd like them sorted or not and whether or not to restrict the user to just the items in the list, or allow them to type in their own text response. It's a fast and compact way to get user input, while offering suggestions to them at the same time!

NEW! Balloon Tooltips and Extended Tooltips

In addition to the standard popup tooltips you're used to from previous versions, AutoPlay Media Studio 8 now lets you display Balloon tooltips! It's an extremely attractive option for presenting context sensitive help within your application. It's also much more useful than the old style tooltips, as you can use multiple lines of text to present your instructions. In fact, multi-line tooltips were so useful, we also added the feature to the standard looking popup as "extended" tooltips.

NEW! Modernized Visual Workspace

AutoPlay Media Studio has always looked pretty slick, but that wasn't good enough. The entire project workspace has been overhauled. Selection boxes, toolbars, context menus – everything has been redone using a consistent color palette, light source and 3D perspective. You spend a lot of time working on your projects. Your tools should serve to increase your productivity, rather than distract you. With AutoPlay Media Studio 8, you'll find everything is more logically arranged and attractively presented – so you can get more done.

NEW! Plugin SDK v2

Action Plugins and Object Plugins are one of the best features of AutoPlay Media Studio. They allow 3rd party software developers to extend and expand the product in an extremely integrated and seamless fashion. By simply dropping a plugin into your project, you can easily save yourself hours of work and add significant functionality to your application. The great news is that with AutoPlay Media Studio 8, plugin developers can now fully leverage the advantages of the Lua 5.1 language. The Plugin SDK v2 is available for free download on the indigorose.com website.

Improved! Grid Object

Working with data grids in AutoPlay Media Studio is more useful than ever, especially with the new integrated database features in v8. As always, the grid object allows you to add spreadsheets, grids and list controls to your applications. With over 110 scriptable actions, it is extremely powerful. To help you easily preload data, you can now even specify a CSV (comma separated value) data file at design time.

Improved! Flash Object with ExternalInterface Support

The Adobe Flash object now supports calling and responding to Flash actionscript functions with the addition of the new "Flash.CallFunction" and "Flash.SetReturnValue" actions and new "On FlashCall" event. Access to Flash's external API opens up many new uses for the Flash object and advanced interaction with your AutoPlay Media Studio application such as playing FVL video files using a Flash loader.

Improved! Web Object

The web object now uses the latest Microsoft Internet Explorer SDK. New scrollbar and border options have been added to give you increased visual control over the object - allowing you to better integrate web pages into your AutoPlay Media Studio applications.

NEW! Stack Traceback for Syntax Errors

We've made it easier for you to debug syntax errors in your scripts by providing you with better error reports. Error messages now include additional details about exactly where the problem occurred – right down to the event name and line number!

NEW! Debug Message Logging

Testing and debugging your projects is much easier in AutoPlay Media Studio 8. You can now send all debug message to a human-readable text format log file, to a debug window or simultaneously to both locations. Between the automatic "Trace Mode" logging, "Event Context" information and "Last Error" actions, you've got a formidable collection of tools to help squash those pesky bugs and logic errors!

NEW! Eyedropper Color Picker

Easily match colors thanks to the new eyedropper style color picker. Integrated into all color choosers, simply move your mouse pointer off the dialog and watch it turn into an eyedropper cursor. Click on the color of any pixel on your screen and voila – you've automatically set the color to match.

NEW! Updated Dependency Modules

All of the dependency modules have been updated in AutoPlay Media Studio 8. Dependency Modules make it fast and easy to detect whether or not common 3rd party software applications and technologies are installed on the user's computer. AutoPlay Media Studio 8 can detect the current versions of such products as Microsoft PowerPoint, Adobe Flash, Microsoft Word, Microsoft Excel, Adobe Acrobat, Apple QuickTime, Windows Media Player and more. If the required product is not detected, the user will be alerted to the problem and conveniently directed to the appropriate website for download and installation.

NEW! Windows Object Styles

In order to enable you to create applications that can look and feel exactly like those created using traditional Windows platform SDK development tools, we went through all of our existing objects and updated them. For example, objects like the Checkbox, Radio Button and Progress Bar will now take on the look that users expect to see on their operating system. On Windows 7, they'll look consistent with the standard operating system theme. On Windows XP, they'll look like XP – and so on. The best part though is that they'll also now respond correctly to changes in the application theme or MSSTYLES skin files that are supported in AutoPlay Media Studio 8. It all adds up to a 100% professional look!

NEW! Visually Identify Plugin Actions

The Action Wizard now marks any actions that are contained in Action Plugins with a "plugin" identifier. This makes it much easier to quickly identify what is built-in to AutoPlay Media Studio and what you've added later through 3rd party additions. It's especially handy when you're looking for documentation, help files, samples and technical support.

Improved! Video Object Transport Skins

The Video object has been modernized with a variety of new graphic styles. Choose from attractive new blue, green and gray skins. If you don't find a style you like, it's super easy to create your own video transport skins using Photoshop or any other graphics editor. We've also made the skin format more flexible, removing the constraining height restrictions that may have hampered your creativity in the past.

Improved! Paragraph Object Scrollbar Styles

The Paragraph object in AutoPlay Media Studio 8 has been updated to default to Windows 7 style scrollbars. This will give any of your scrolling textboxes a much more up-to-date visual appearance. Of course, you can still make your own scrollbar styles from scratch (or download shared skins from http://www.autoplaymediastudio.com) or choose from old favorites such as Chrome, Euro, Corporate, Charcoal, Industrial and more.

Improved! Application Startup Dialog

AutoPlay Media Studio 8 is all about helping you get things done faster and easier. Even small things like the startup welcome screen have been improved! The startup screen now gives you fast access to multiple recently used projects, one-click restore of the last used project, or simply creating a new project using a template or blank project. Additionally, an integrated RSS feed keeps you updated on product improvements, updates, bug fixes and news!

Improved! Project Explorer Window

The Project Explorer in AutoPlay Media Studio 8 has been revamped to give you a better overall view of your project. Things like better icons, collapsible Dialog and Page categories and better visual indications for hidden and locked objects will be much appreciated. Additional context-sensitive right-click menus have been added and reworked to present you with only the most appropriate commands for working with objects, pages, dialogs and events.

Improved! Quick Script Snippets

A variety of changes were made to the script editor to help more quickly write your code. Of course the popular Action Wizard, Code Completion and Intellisense are still there to guide you. We've also expanded and reorganized the one-click "Quick Script" feature. Many common programming "snippets" are included, making it super easy to add loops, control structures and other often-used bits of script. Additionally, "object tables" have been moved into their own category in order to help you find what you’re looking for at a glance.

NEW! Centralized Repository for Plugins, Templates and Addons

With all the new possibilities available to AutoPlay Media Studio 8 developers, we've put together a centralized archive to help organize everything. At http://www.autoplaymediastudio.com you'll find an easy-to-navigate repository for everything related to AutoPlay Media Studio. You'll find action plugins, object plugins, application themes, Lua modules, video transport skins, scrollbar skins, MSSTYLES skins, custom .BTN format button files, background images, project templates, example projects, scripts, audio files, tutorials, tools and lots more.


Changes from 5 to 8

Introduction

Contents Changes from 5 to 8

Familiar with AutoPlay Media Studio 5?
Here’s what you need to know to get right up to speed with v8!

Full Support for v5 Projects

AutoPlay Media Studio 8 was developed with v5 users in mind. While a plethora of new features have been added, v8 remains almost 100% compatible with v5 projects.

Lua Language Changes

AutoPlay Media Studio now contains an updated version of the Lua scripting library, version 5.1 (previously 5.0). AutoPlay's version has been compiled to try to maintain compatibility, however there are some minor syntax changes/deprecations made to the language that you need to be aware of for future development as well as previously created projects and lua scripts.

When importing a project made with an earlier version of AutoPlay Media Studio, AutoPlay Media Studio 8 will automatically analyze your project file and create a report detailing any areas where it thinks the old style for loop is in use. If there are any old for loops found the report will automatically be saved in the same folder as your new 8 project file and opened in your default web-browser. We recommend analyzing each line of code found in the report to ensure that you only use the new for loop syntax.

Table Iterating For Loops

The syntax for iterating a table using for loop using in has changed (has been deprecated) If the syntax is not changed, a runtime error will be thrown when executed.

Old syntax:

mytable = {"One","Two","Three"};

for k, v in mytable do
Dialog.Message("Table Item", k .. "=" .. v);
end -- for

Needs to be changed to:

mytable = {"One","Two","Three"};

for k, v in pairs (mytable) do
Dialog.Message("Table Item", k .. "=" .. v);
end -- for

The functions table.foreach and table.foreachi are also deprecated. You can use a for loop as above with pairs or ipairs instead. While these two are deprecated, they still work (unlike the example above), however you are advised to also rework these types of loops in case they are removed from future versions.

If you commonly use Lua functions (non-AutoPlay actions) in your scripts, you may also want to review the list of other changes to the language in case other changes affect you. You can find this information in the Lua 5.1 Reference Manual found on http://www.lua.org.

Plugin Changes

As of AutoPlay Media studio 8, only plugins created with version 2 of the Plugin SDK (or higher) are compatible. When a version 5 project is opened in version 8, the project is analyzed to determine if it contains any plugin objects or actions. A list of these can be viewed in the analysis report that is automatically generated under the heading "Legacy Plugins."

In order for your project to work you will need to obtain updated versions of the plugins listed. Once you have the updated version of these plugins, simply install them into the correct plugin directory and your project should work properly. If you have already installed versions of the listed plugins that were created using version 2 of the Indigo Rose Plugin SDK then no further action is necessary.

Customizable Dialogs

Application development has been raised to a new level in AutoPlay Media Studio 8 with the addition of customizable dialogs. Dialogs support the same background settings, objects and events as pages do...but the options don't stop there. Dialogs have features above and beyond pages including custom sizes, multiple windows styles, and even a custom icon. Complemented by both its own "DialogEx" action category containing 21 actions, as well as 6 additional "Application" actions, you'll surely find this powerful new feature a welcome addition to your design arsenal.

New Objects

A combobox object, progress object, tree object, richtext object, radiobutton object, checkbox object, slideshow object, grid object, QuickTime object, PDF object, and xButton object have been added to the army of objects available in AutoPlay. The combobox object allows you to present users with a dropdown list of choices; the progress object allows you to display progress in your project; the tree object allows you to display information and choices in a collapsible tree view; the richtext object allows you to display rich text (.rtf) in an object; the radiobutton object provides the functionality of a Windows radio button; the checkbox object provides the functionality of a Windows checkbox; the slideshow object allows you to show a series of images in a set area; the grid object allows you to add spreadsheets, grids and list controls to your applications; the QuickTime object lets you play audio, video or show images supporting a wide variety of formats; the PDF object allows you to display a PDF file on the page or dialog; and the xButton is an extension of the Windows button containing configurable features such as text, images, themes and styles and support for markup text for text highlighting and hyperlinks.

New Actions

AutoPlay Media Studio 8 contains over 865 actions right out of the box. All of the actions existing in version 5 exist, as well as some new very powerful ones. For example, it is now possible to change almost any property of any object at runtime using a SetProperties action. Likewise, any object can now be created at runtime (through script) by using a Page.CreateObject or DialogEx.CreateObject action.

Quick Actions

When you want to perform a quick task, such as closing the application when the user clicks on an 'exit' button, or pausing the background music when the user clicks on a pause button, you can make use of the Quick Actions. Quick actions allow you to perform some of the most common tasks with zero scripting knowledge.

New Scripting Events

In addition to performing actions whenever objects are clicked or otherwise interacted with, AutoPlay Media Studio 8 now allows you to perform tasks every time the mouse is moved or a button is clicked. You can also perform actions whenever the user right-clicks with the mouse. As well, any time the window is resized you can perform actions (moving / resizing objects) with the On Size event.

Resizable Applications

Perhaps the most anticipated features of AutoPlay Media Studio is the ability to create dynamically-resizing applications. While previous versions of AutoPlay restricted the created application to a pre-specified size, applications created with v8 can be resized by the user. If you enable this feature, you can even control how you want the specific objects on each page or dialog to resize using their "Auto-Resize" settings.

Page Keyword Searching

Specify a list of keywords associated with each page. Then at runtime use the new actions to search for keywords on pages, create an indexed table of keywords, or even show a common dialog to allow the user to perform keyword searches.

Print Pages/Dialogs at Runtime

The addition of the Page.Print and DialogEx.Print actions allow you to print pages and dialogs at runtime including options for whether or not to show a print dialog and whether to scale the pages/dialogs to fit the paper.

Centralized Script Explorer

Choosing Tools > Script Explorer in v8 allows you to edit all scripts in your project from one central location. Need to copy a script from a button on page 1 to a label object on page 6? No problem! Just open the script editor, and you are ready to go!

Project Explorer

The Object and Pages panes have been replaced in v8 by the project explorer. The project explorer is a tree view of all pages, dialogs and objects in your project. As well, you can display all available events in the project explorer.

File Layout Viewer

Included in v8 is the file layout viewer. From this dialog, you can view both your project layout as well as your local system. Adding new files to your project is a breeze!

Thumbnail Support in File Browsers

The file browsers in the product now support thumbnail view, making it much faster and easier to locate files.

Dynamic Object Creation and Interaction

Objects can now be created and modified at runtime. Using GetProperties and SetProperties actions, you can change almost every aspect of existing objects. As well, using Page.CreateObject or DialogEx.CreateObject, you can create an object right from script!

Custom Executable Stamping

Up until now, any published application created with AutoPlay Media Studio has been stamped with Indigo Rose's information and forced to use a generic icon for the exe file itself. In version 8, we allow you to set your own custom file properties information, and use a custom icon for the exe. While we still hold the copyright for the runtime, many of our users have requested this feature, and we listened!

Automatic Code Signing

Now your applications can be automatically code signed during publishing. This provides more secure experience for users and helps make applications Windows Vista or later compliant.

Guidelines

Most high-quality professional design programs have some form of guidelines that can be used to line up objects. Now, AutoPlay Media Studio 8 has guidelines too! With both page-specific guidelines and project-wide guidelines, you can line up objects on just one page, or use a project-wide guideline and have it show up on all of your pages at design-time. Objects snap to the guidelines by default, allowing you to easily align them; however, you can disable this feature if you prefer.

Tray Menus

By default, right-clicking on your application’s system tray icon will present three options: Restore, Minimize, and Exit. If these options don't suit your needs, add more! AutoPlay Media Studio 8 allows you complete control over what items are displayed in that right click menu, if a menu is displayed at all.

Menu Bars

It's now possible to add a standard Windows style menu bar to your project. It’s easy to configure and edit, even letting you configure nested items. When a menu item is selected, it fires a project event telling you what was chosen, allowing you to take whatever action you desire.

NEW! Faster & More Powerful Lua 5.1 Scripting Engine

AutoPlay Media Studio 8's scripting engine is now faster, more powerful and much more extensible. The Lua 5.1 system features a new module system, incremental garbage collection, new mechanism for varargs, new syntax for long strings and comments, mod and length operators, metatables for all types and a fully reentrant parser.

NEW! Support for Lua 5.1 Code Modules

With the new scripting engine upgrade comes compatibility with Lua 5.1 modules. You now have access to a wealth of free Lua code you can download and use in your AutoPlay Media Studio 8 projects. In most cases you simply copy the module files into your project and "require" them in your script. Just some of the useful modules out there include Bit Operation, Date, Canvas Draw, Imaging Tool, GD, Crypto, Colors, Speech, Alien, Social (Twitter), CURL, Regular Expression Parsing and so much more. It’s a whole treasure chest of addons and tools just waiting for you!

NEW! Blu-ray Disc Support

Do your projects contain huge database and video files? AutoPlay Media Studio 8 now includes full support for burning directly to Blu-Ray media (BD-R, BD-RE). The integrated Bluray disc burning allows you to publish your project directly to single layer and dual-layer BD-R and BD-RE media, supporting 25 GB, 50 GB and even 100 GB formats.

NEW! Application Styles / Skinning

AutoPlay Media Studio 8 gives you the freedom to create applications that look exactly the way you want. Perhaps you prefer that your programs to take on the same appearance as the operating system (e.g. Windows XP, Vista, Windows 7 Aero...)? Or do you want them to be entirely customized with completely custom drawn background images, buttons and window shapes? Or perhaps you'd like to simply make use of the hundreds of ready-to-use MSSTYLES themes (like OS/X Tiger and Panther) that you can download on the Internet? In any case, AutoPlay Media Studio makes it possible – and easy!

NEW! Integrated Database Access

It's never been easier to write database applications using AutoPlay Media Studio! Easily connect to a variety of popular local and remote/Internet database systems including MySQL, SQLite3, ODBC, Oracle and PostgreSQL. Execute any SQL statements you desire like CREATE, INSERT and more – even easily retrieve data results using a row-by-row cursor system. Features full integration with our fill-in-the-blanks style Action Wizard, plus intelligent code completion.

NEW! PDF Object

AutoPlay Media Studio now features integrated support for displaying PDF documents right in your application. This highly requested feature also gives you full control over the display and formatting. You can show/hide toolbars, scrollbars and borders. Layout options include "Single Page", "One Column", "Two Columns" and "User Preference". View options include "Fit Page", "Fit Page Width", "Fit Page Height" and "Actual Size".

NEW! PDF Actions

Take control of the PDF object with 18 easy-to-use actions. Fully integrated into the fill-in-the-blanks Action Wizard, you'll be able to easily create dynamic applications to work with PDF files. Actions are provided to Print, Load, Navigate, Zoom, Resize, Hide and much more.

NEW! QuickTime Object

Thanks to the new Apple QuickTime object, your AutoPlay Media Studio applications are now compatible with over 80 video, audio and image formats. Video formats include .MOV, .DV, .M4V, .MP4 and dozens more – including the amazing h.264 format. Audio formats include .AAC, .AIF, .M4A, .MP3, etc. Visual formatting options let you lock an aspect ratio, resize the media to fit the object dimensions or center it within the object area. Border styles include 3D, plain or none.

NEW! QuickTime Actions

The Quicktime object by itself is great - but a Quicktime object plus 22 built-in high-level actions is just plain awesome! Brought together, your AutoPlay Media Studio actions have exceptional control over the QuickTime object. Using simple script commands you can Play, Seek, Set Volume, Load, Mute, View Full Screen, Hide, Show and much more. Your only limit is your imagination.

NEW! xButton Object

If you're trying to create an application that blends in beautifully with the operating system, the new xButton object is just what the doctor ordered. However, that's just the beginning! The new xButton object supports far more customization than was previously possible. Now you can modernize your applications by adding "icon" images to your buttons, plus you can "markup" the text however you desire! This object lets you control the relative placement of button text and button images; choose between normal and toggle styles; adjust fonts and colors; and even markup you text using dozens of XAML tags – including hyperlinks right on your buttons! By default, the xButton styles itself according to whatever operating system it is being run on. If your application is running on Vista, the button looks like a standard Vista button. If you're running it on Windows 7, it looks like Windows 7. However, you can easily override this and choose from many included styles like Flat, Office 2000, Office XP or many different Office 2007 styles. Or hundreds of MSSTYLES themes… The options are endless.

NEW! Checkbox List Object

Checkbox lists are a long awaited addition to AutoPlay Media Studio! We've integrated this feature into the existing Listbox object – you just need to turn it on. Once you do, you can easily present lists of items with corresponding checkboxes. Actions are included to get and set the checkbox state for any listbox item with ease. You'll find dozens of great uses for this one!

NEW! Rolling Code Data Security

AutoPlay Media Studio 8 adds another layer of protection to your applications and scripts. A unique random encryption code is now generated every time you build your project, making "hacking" of your applications much more difficult. As we all know, anyone determined enough can break any protection system given enough time and resources, but the use of rolling codes renders generic attacks ineffective. You can now sleep a little easier!

NEW! Multiple Timers

You're no longer limited to just one timer event per page! You can now set as many "named" timers as you want. Having multiple timers running really opens up the creative possibilities for animations, games, status updates and dozens of other applications.

NEW! Service Actions

Easily control Windows Services using the seven new actions included in AutoPlay Media Studio 8. Everything you need is included, such as Create, Start, Stop, Pause, Delete, Query and Continue.

NEW! FTPWI Actions

AutoPlay Media Studio 8 includes a set of built-in FTP actions, enabling your application to easily download files over the Internet from FTP servers. These new FTP actions make use of the WinINet API to ensure compliance with the RFC 959 File Transfer Protocol specifications. Actions include FTPWI.Download, FTPWI.GetErrorInfo and FTPWI.GetFileSize.

NEW! System Restore Actions

This trio of system restore actions are extremely powerful and essential for any application that might want to make system changes or install software in a failsafe manner. By creating a system restore point using System.SetRestorePoint before making changes to the computer, the user can easily rollback those changes using the operating system's "restore" feature (found on Windows Vista or later). Actions include System.IsSystemRestoreAvailable, System.SetRestorePoint and System.RemoveRestorePoint.

NEW! Dialog.ComboBox Action

Here's an action that'll find a lot of use! The Dialog.ComboBox action is used to pop up a dialog box presenting the user with a drop-down list of items they can choose from. You simply pass in a list of items to select from, choose if you'd like them sorted or not and whether or not to restrict the user to just the items in the list, or allow them to type in their own text response. It's a fast and compact way to get user input, while offering suggestions to them at the same time!

NEW! Balloon Tooltips and Extended Tooltips

In addition to the standard popup tooltips you're used to from previous versions, AutoPlay Media Studio 8 now lets you display Balloon tooltips! It's an extremely attractive option for presenting context sensitive help within your application. It's also much more useful than the old style tooltips, as you can use multiple lines of text to present your instructions. In fact, multi-line tooltips were so useful, we also added the feature to the standard looking popup as "extended" tooltips.

NEW! Modernized Visual Workspace

AutoPlay Media Studio has always looked pretty slick, but that wasn't good enough. The entire project workspace has been overhauled. Selection boxes, toolbars, context menus – everything has been redone using a consistent color palette, light source and 3D perspective. You spend a lot of time working on your projects. Your tools should serve to increase your productivity, rather than distract you. With AutoPlay Media Studio 8, you'll find everything is more logically arranged and attractively presented – so you can get more done.

NEW! Plugin SDK v2

Action Plugins and Object Plugins are one of the best features of AutoPlay Media Studio. They allow 3rd party software developers to extend and expand the product in an extremely integrated and seamless fashion. By simply dropping a plugin into your project, you can easily save yourself hours of work and add significant functionality to your application. The great news is that with AutoPlay Media Studio 8, plugin developers can now fully leverage the advantages of the Lua 5.1 language. The Plugin SDK v2 is available for free download on the indigorose.com website.

Improved! Grid Object

Working with data grids in AutoPlay Media Studio is more useful than ever, especially with the new integrated database features in v8. As always, the grid object allows you to add spreadsheets, grids and list controls to your applications. With over 110 scriptable actions, it is extremely powerful. To help you easily preload data, you can now even specify a CSV (comma separated value) data file at design time.

Improved! Flash Object with ExternalInterface Support

The Adobe Flash object now supports calling and responding to Flash actionscript functions with the addition of the new "Flash.CallFunction" and "Flash.SetReturnValue" actions and new "On FlashCall" event. Access to Flash's external API opens up many new uses for the Flash object and advanced interaction with your AutoPlay Media Studio application such as playing FVL video files using a Flash loader.

Improved! Web Object

The web object now uses the latest Microsoft Internet Explorer SDK. New scrollbar and border options have been added to give you increased visual control over the object - allowing you to better integrate web pages into your AutoPlay Media Studio applications.

NEW! Stack Traceback for Syntax Errors

We've made it easier for you to debug syntax errors in your scripts by providing you with better error reports. Error messages now include additional details about exactly where the problem occurred – right down to the event name and line number!

NEW! Debug Message Logging

Testing and debugging your projects is much easier in AutoPlay Media Studio 8. You can now send all debug message to a human-readable text format log file, to a debug window or simultaneously to both locations. Between the automatic "Trace Mode" logging, "Event Context" information and "Last Error" actions, you've got a formidable collection of tools to help squash those pesky bugs and logic errors!

NEW! Eyedropper Color Picker

Easily match colors thanks to the new eyedropper style color picker. Integrated into all color choosers, simply move your mouse pointer off the dialog and watch it turn into an eyedropper cursor. Click on the color of any pixel on your screen and voila – you've automatically set the color to match.

NEW! Updated Dependency Modules

All of the dependency modules have been updated in AutoPlay Media Studio 8. Dependency Modules make it fast and easy to detect whether or not common 3rd party software applications and technologies are installed on the user's computer. AutoPlay Media Studio 8 can detect the current versions of such products as Microsoft PowerPoint, Adobe Flash, Microsoft Word, Microsoft Excel, Adobe Acrobat, Apple QuickTime, Windows Media Player and more. If the required product is not detected, the user will be alerted to the problem and conveniently directed to the appropriate website for download and installation.

NEW! Windows Object Styles

In order to enable you to create applications that can look and feel exactly like those created using traditional Windows platform SDK development tools, we went through all of our existing objects and updated them. For example, objects like the Checkbox, Radio Button and Progress Bar will now take on the look that users expect to see on their operating system. On Windows 7, they'll look consistent with the standard operating system theme. On Windows XP, they'll look like XP – and so on. The best part though is that they'll also now respond correctly to changes in the application theme or MSSTYLES skin files that are supported in AutoPlay Media Studio 8. It all adds up to a 100% professional look!

NEW! Visually Identify Plugin Actions

The Action Wizard now marks any actions that are contained in Action Plugins with a "plugin" identifier. This makes it much easier to quickly identify what is built-in to AutoPlay Media Studio and what you've added later through 3rd party additions. It's especially handy when you're looking for documentation, help files, samples and technical support.

Improved! Video Object Transport Skins

The Video object has been modernized with a variety of new graphic styles. Choose from attractive new blue, green and gray skins. If you don't find a style you like, it's super easy to create your own video transport skins using Photoshop or any other graphics editor. We've also made the skin format more flexible, removing the constraining height restrictions that may have hampered your creativity in the past.

Improved! Paragraph Object Scrollbar Styles

The Paragraph object in AutoPlay Media Studio 8 has been updated to default to Windows 7 style scrollbars. This will give any of your scrolling textboxes a much more up-to-date visual appearance. Of course, you can still make your own scrollbar styles from scratch (or download shared skins from http://www.autoplaymediastudio.com) or choose from old favorites such as Chrome, Euro, Corporate, Charcoal, Industrial and more.

Improved! Application Startup Dialog

AutoPlay Media Studio 8 is all about helping you get things done faster and easier. Even small things like the startup welcome screen have been improved! The startup screen now gives you fast access to multiple recently used projects, one-click restore of the last used project, or simply creating a new project using a template or blank project. Additionally, an integrated RSS feed keeps you updated on product improvements, updates, bug fixes and news!

Improved! Project Explorer Window

The Project Explorer in AutoPlay Media Studio 8 has been revamped to give you a better overall view of your project. Things like better icons, collapsible Dialog and Page categories and better visual indications for hidden and locked objects will be much appreciated. Additional context-sensitive right-click menus have been added and reworked to present you with only the most appropriate commands for working with objects, pages, dialogs and events.

Improved! Quick Script Snippets

A variety of changes were made to the script editor to help more quickly write your code. Of course the popular Action Wizard, Code Completion and Intellisense are still there to guide you. We've also expanded and reorganized the one-click "Quick Script" feature. Many common programming "snippets" are included, making it super easy to add loops, control structures and other often-used bits of script. Additionally, "object tables" have been moved into their own category in order to help you find what you’re looking for at a glance.

NEW! Centralized Repository for Plugins, Templates and Addons

With all the new possibilities available to AutoPlay Media Studio 8 developers, we've put together a centralized archive to help organize everything. At http://www.autoplaymediastudio.com you'll find an easy-to-navigate repository for everything related to AutoPlay Media Studio. You'll find action plugins, object plugins, application themes, Lua modules, video transport skins, scrollbar skins, MSSTYLES skins, custom .BTN format button files, background images, project templates, example projects, scripts, audio files, tutorials, tools and lots more.


Changes from 6 to 8

Introduction

Contents Changes from 6 to 8

Familiar with AutoPlay Media Studio 6?
Here’s what you need to know to get right up to speed with v8!

Full Support for v6 Projects

AutoPlay Media Studio 8 was developed with v6 users in mind. While a plethora of new features have been added, v8 remains almost 100% compatible with v6 projects.

Lua Language Changes

AutoPlay Media Studio now contains an updated version of the Lua scripting library, version 5.1 (previously 5.0). AutoPlay's version has been compiled to try to maintain compatibility, however there are some minor syntax changes/deprecations made to the language that you need to be aware of for future development as well as previously created projects and lua scripts.

When importing a project made with an earlier version of AutoPlay Media Studio, AutoPlay Media Studio 8 will automatically analyze your project file and create a report detailing any areas where it thinks the old style for loop is in use. If there are any old for loops found the report will automatically be saved in the same folder as your new 8 project file and opened in your default web-browser. We recommend analyzing each line of code found in the report to ensure that you only use the new for loop syntax.

Table Iterating For Loops

The syntax for iterating a table using for loop using in has changed (has been deprecated) If the syntax is not changed, a runtime error will be thrown when executed.

Old syntax:

mytable = {"One","Two","Three"};

for k, v in mytable do
Dialog.Message("Table Item", k .. "=" .. v);
end -- for

Needs to be changed to:

mytable = {"One","Two","Three"};

for k, v in pairs (mytable) do
Dialog.Message("Table Item", k .. "=" .. v);
end -- for

The functions table.foreach and table.foreachi are also deprecated. You can use a for loop as above with pairs or ipairs instead. While these two are deprecated, they still work (unlike the example above), however you are advised to also rework these types of loops in case they are removed from future versions.

If you commonly use Lua functions (non-AutoPlay actions) in your scripts, you may also want to review the list of other changes to the language in case other changes affect you. You can find this information in the Lua 5.1 Reference Manual found on http://www.lua.org.

Plugin Changes

As of AutoPlay Media studio 8, only plugins created with version 2 of the Plugin SDK (or higher) are compatible. When a version 6 project is opened in version 8, the project is analyzed to determine if it contains any plugin objects or actions. A list of these can be viewed in the analysis report that is automatically generated under the heading "Legacy Plugins."

In order for your project to work you will need to obtain updated versions of the plugins listed. Once you have the updated version of these plugins, simply install them into the correct plugin directory and your project should work properly. If you have already installed versions of the listed plugins that were created using version 2 of the Indigo Rose Plugin SDK then no further action is necessary.

Customizable Dialogs

Application development has been raised to a new level in AutoPlay Media Studio 8 with the addition of customizable dialogs. Dialogs support the same background settings, objects and events as pages do...but the options don't stop there. Dialogs have features above and beyond pages including custom sizes, multiple windows styles, and even a custom icon. Complemented by both its own "DialogEx" action category containing 21 actions, as well as 6 additional "Application" actions, you'll surely find this powerful new feature a welcome addition to your design arsenal.

New Objects

A richtext object, radiobutton object, checkbox object, slideshow object, grid object, QuickTime object, PDF object, and xButton object have been added to the army of objects available in AutoPlay. The richtext object allows you to display rich text (.rtf) in an object; the radiobutton object provides the functionality of a Windows radio button; the checkbox object provides the functionality of a Windows checkbox; the slideshow object allows you to show a series of images in a set area; the grid object allows you to add spreadsheets, grids and list controls to your applications; the QuickTime object lets you play audio, video or show images supporting a wide variety of formats; the PDF object allows you to display a PDF file on the page or dialog; and the xButton is an extension of the Windows button containing configurable features such as text, images, themes and styles and support for markup text for text highlighting and hyperlinks.

New Actions

AutoPlay Media Studio 8 contains over 865 actions right out of the box. All of the actions existing in version 6 exist, as well as some new very powerful ones. For example, there are over 35 MSI actions that leverage the Windows Installer service technology on the user's system for querying the state of products, features and components on the end-user's system that were installed with a Windows Installer package.

Multiline Text on Button Objects

Button objects now support multiline text. You can have multiple lines of text with word-wrap and specify custom left and right margins.

Thumbnail Support in File Browsers

The file browsers in the product now support thumbnail view, making it much faster and easier to locate files.

Print Pages/Dialogs at Runtime

The addition of the Page.Print and DialogEx.Print actions allow you to print pages and dialogs at runtime including options for whether or not to show a print dialog and whether to scale the page/dialog to fit the paper.

Automatic Sizing and Positioning of Objects

The new Auto-Resize options for each object allow you to control how each side of the object responds to the page or dialog being resized at runtime. This makes it very easy to have resizable applications look right at different sizes.

Page Keyword Searching

Specify a list of keywords associated with each page. Then at runtime use the new actions to search for keywords on pages, create an indexed table of keywords, or even show a common dialog to allow the user to perform keyword searches.

New and Enhanced Templates

Includes many new project templates that demonstrate many of the new features in version 8.

CD / DVD / Blu-Ray Burning on Vista

You can now burn CD/DVD/Blu-Ray projects on Windows Vista or later systems.

Get and Set Page/Dialog Properties at Runtime

New actions, Application.GetPageProperties, Application.SetPageProperties, Application.GetDialogProperties and Application.SetDialogProperties allow you to query and modify page or dialog properties such background colors and images dynamically at runtime.

Automatic Code Signing

Automatically have your applications code signed during publishing. This provides a more secure experience for users and helps make applications Windows Vista or later compliant.

Dynamic Passwords for Encrypted Data Segments

Now when you build to a Web/Email executable and turn on the Encrypt data segment option, a unique key is used to protect the data ensuring that your data cannot be decrypted using a common key.

Instructions for Project Templates

Now when you export a project to a project template and enter instructions in the Description field of the Project Template Information dialog, the text will be displayed for the developer to read when a project is created from that template.

Support for Alternate Templates Folder

The new project dialog now scans the "My Documents\AutoPlay Media Studio 8\Templates" folder for project template files as well as the "Program Files\AutoPlay Media Studio 8\Templates" folder. This allows the storage and use of project templates from a per-user folder.

Minimum Page Size

Added support for minimum page sizes for resizable projects. These dimensions can be entered on the Appearance tab of the Project Settings dialog.

CDATA Support for Writing to XML

The XML.SetValue action now has an extra parameter that allows you to specify whether the data should be written out as a CDATA section.

NEW! Faster & More Powerful Lua 5.1 Scripting Engine

AutoPlay Media Studio 8's scripting engine is now faster, more powerful and much more extensible. The Lua 5.1 system features a new module system, incremental garbage collection, new mechanism for varargs, new syntax for long strings and comments, mod and length operators, metatables for all types and a fully reentrant parser.

NEW! Support for Lua 5.1 Code Modules

With the new scripting engine upgrade comes compatibility with Lua 5.1 modules. You now have access to a wealth of free Lua code you can download and use in your AutoPlay Media Studio 8 projects. In most cases you simply copy the module files into your project and "require" them in your script. Just some of the useful modules out there include Bit Operation, Date, Canvas Draw, Imaging Tool, GD, Crypto, Colors, Speech, Alien, Social (Twitter), CURL, Regular Expression Parsing and so much more. It’s a whole treasure chest of addons and tools just waiting for you!

NEW! Blu-ray Disc Support

Do your projects contain huge database and video files? AutoPlay Media Studio 8 now includes full support for burning directly to Blu-Ray media (BD-R, BD-RE). The integrated Bluray disc burning allows you to publish your project directly to single layer and dual-layer BD-R and BD-RE media, supporting 25 GB, 50 GB and even 100 GB formats.

NEW! Application Styles / Skinning

AutoPlay Media Studio 8 gives you the freedom to create applications that look exactly the way you want. Perhaps you prefer that your programs to take on the same appearance as the operating system (e.g. Windows XP, Vista, Windows 7 Aero...)? Or do you want them to be entirely customized with completely custom drawn background images, buttons and window shapes? Or perhaps you'd like to simply make use of the hundreds of ready-to-use MSSTYLES themes (like OS/X Tiger and Panther) that you can download on the Internet? In any case, AutoPlay Media Studio makes it possible – and easy!

NEW! Integrated Database Access

It's never been easier to write database applications using AutoPlay Media Studio! Easily connect to a variety of popular local and remote/Internet database systems including MySQL, SQLite3, ODBC, Oracle and PostgreSQL. Execute any SQL statements you desire like CREATE, INSERT and more – even easily retrieve data results using a row-by-row cursor system. Features full integration with our fill-in-the-blanks style Action Wizard, plus intelligent code completion.

NEW! PDF Object

AutoPlay Media Studio now features integrated support for displaying PDF documents right in your application. This highly requested feature also gives you full control over the display and formatting. You can show/hide toolbars, scrollbars and borders. Layout options include "Single Page", "One Column", "Two Columns" and "User Preference". View options include "Fit Page", "Fit Page Width", "Fit Page Height" and "Actual Size".

NEW! PDF Actions

Take control of the PDF object with 18 easy-to-use actions. Fully integrated into the fill-in-the-blanks Action Wizard, you'll be able to easily create dynamic applications to work with PDF files. Actions are provided to Print, Load, Navigate, Zoom, Resize, Hide and much more.

NEW! QuickTime Object

Thanks to the new Apple QuickTime object, your AutoPlay Media Studio applications are now compatible with over 80 video, audio and image formats. Video formats include .MOV, .DV, .M4V, .MP4 and dozens more – including the amazing h.264 format. Audio formats include .AAC, .AIF, .M4A, .MP3, etc. Visual formatting options let you lock an aspect ratio, resize the media to fit the object dimensions or center it within the object area. Border styles include 3D, plain or none.

NEW! QuickTime Actions

The Quicktime object by itself is great - but a Quicktime object plus 22 built-in high-level actions is just plain awesome! Brought together, your AutoPlay Media Studio actions have exceptional control over the QuickTime object. Using simple script commands you can Play, Seek, Set Volume, Load, Mute, View Full Screen, Hide, Show and much more. Your only limit is your imagination.

NEW! xButton Object

If you're trying to create an application that blends in beautifully with the operating system, the new xButton object is just what the doctor ordered. However, that's just the beginning! The new xButton object supports far more customization than was previously possible. Now you can modernize your applications by adding "icon" images to your buttons, plus you can "markup" the text however you desire! This object lets you control the relative placement of button text and button images; choose between normal and toggle styles; adjust fonts and colors; and even markup you text using dozens of XAML tags – including hyperlinks right on your buttons! By default, the xButton styles itself according to whatever operating system it is being run on. If your application is running on Vista, the button looks like a standard Vista button. If you're running it on Windows 7, it looks like Windows 7. However, you can easily override this and choose from many included styles like Flat, Office 2000, Office XP or many different Office 2007 styles. Or hundreds of MSSTYLES themes… The options are endless.

NEW! Checkbox List Object

Checkbox lists are a long awaited addition to AutoPlay Media Studio! We've integrated this feature into the existing Listbox object – you just need to turn it on. Once you do, you can easily present lists of items with corresponding checkboxes. Actions are included to get and set the checkbox state for any listbox item with ease. You'll find dozens of great uses for this one!

NEW! Rolling Code Data Security

AutoPlay Media Studio 8 adds another layer of protection to your applications and scripts. A unique random encryption code is now generated every time you build your project, making "hacking" of your applications much more difficult. As we all know, anyone determined enough can break any protection system given enough time and resources, but the use of rolling codes renders generic attacks ineffective. You can now sleep a little easier!

NEW! Multiple Timers

You're no longer limited to just one timer event per page! You can now set as many "named" timers as you want. Having multiple timers running really opens up the creative possibilities for animations, games, status updates and dozens of other applications.

NEW! Service Actions

Easily control Windows Services using the seven new actions included in AutoPlay Media Studio 8. Everything you need is included, such as Create, Start, Stop, Pause, Delete, Query and Continue.

NEW! FTPWI Actions

AutoPlay Media Studio 8 includes a set of built-in FTP actions, enabling your application to easily download files over the Internet from FTP servers. These new FTP actions make use of the WinINet API to ensure compliance with the RFC 959 File Transfer Protocol specifications. Actions include FTPWI.Download, FTPWI.GetErrorInfo and FTPWI.GetFileSize.

NEW! System Restore Actions

This trio of system restore actions are extremely powerful and essential for any application that might want to make system changes or install software in a failsafe manner. By creating a system restore point using System.SetRestorePoint before making changes to the computer, the user can easily rollback those changes using the operating system's "restore" feature (found on Windows Vista or later). Actions include System.IsSystemRestoreAvailable, System.SetRestorePoint and System.RemoveRestorePoint.

NEW! Dialog.ComboBox Action

Here's an action that'll find a lot of use! The Dialog.ComboBox action is used to pop up a dialog box presenting the user with a drop-down list of items they can choose from. You simply pass in a list of items to select from, choose if you'd like them sorted or not and whether or not to restrict the user to just the items in the list, or allow them to type in their own text response. It's a fast and compact way to get user input, while offering suggestions to them at the same time!

NEW! Balloon Tooltips and Extended Tooltips

In addition to the standard popup tooltips you're used to from previous versions, AutoPlay Media Studio 8 now lets you display Balloon tooltips! It's an extremely attractive option for presenting context sensitive help within your application. It's also much more useful than the old style tooltips, as you can use multiple lines of text to present your instructions. In fact, multi-line tooltips were so useful, we also added the feature to the standard looking popup as "extended" tooltips.

NEW! Modernized Visual Workspace

AutoPlay Media Studio has always looked pretty slick, but that wasn't good enough. The entire project workspace has been overhauled. Selection boxes, toolbars, context menus – everything has been redone using a consistent color palette, light source and 3D perspective. You spend a lot of time working on your projects. Your tools should serve to increase your productivity, rather than distract you. With AutoPlay Media Studio 8, you'll find everything is more logically arranged and attractively presented – so you can get more done.

NEW! Plugin SDK v2

Action Plugins and Object Plugins are one of the best features of AutoPlay Media Studio. They allow 3rd party software developers to extend and expand the product in an extremely integrated and seamless fashion. By simply dropping a plugin into your project, you can easily save yourself hours of work and add significant functionality to your application. The great news is that with AutoPlay Media Studio 8, plugin developers can now fully leverage the advantages of the Lua 5.1 language. The Plugin SDK v2 is available for free download on the indigorose.com website.

Improved! Grid Object

Working with data grids in AutoPlay Media Studio is more useful than ever, especially with the new integrated database features in v8. As always, the grid object allows you to add spreadsheets, grids and list controls to your applications. With over 110 scriptable actions, it is extremely powerful. To help you easily preload data, you can now even specify a CSV (comma separated value) data file at design time.

Improved! Flash Object with ExternalInterface Support

The Adobe Flash object now supports calling and responding to Flash actionscript functions with the addition of the new "Flash.CallFunction" and "Flash.SetReturnValue" actions and new "On FlashCall" event. Access to Flash's external API opens up many new uses for the Flash object and advanced interaction with your AutoPlay Media Studio application such as playing FVL video files using a Flash loader.

Improved! Web Object

The web object now uses the latest Microsoft Internet Explorer SDK. New scrollbar and border options have been added to give you increased visual control over the object - allowing you to better integrate web pages into your AutoPlay Media Studio applications.

NEW! Stack Traceback for Syntax Errors

We've made it easier for you to debug syntax errors in your scripts by providing you with better error reports. Error messages now include additional details about exactly where the problem occurred – right down to the event name and line number!

NEW! Debug Message Logging

Testing and debugging your projects is much easier in AutoPlay Media Studio 8. You can now send all debug message to a human-readable text format log file, to a debug window or simultaneously to both locations. Between the automatic "Trace Mode" logging, "Event Context" information and "Last Error" actions, you've got a formidable collection of tools to help squash those pesky bugs and logic errors!

NEW! Eyedropper Color Picker

Easily match colors thanks to the new eyedropper style color picker. Integrated into all color choosers, simply move your mouse pointer off the dialog and watch it turn into an eyedropper cursor. Click on the color of any pixel on your screen and voila – you've automatically set the color to match.

NEW! Updated Dependency Modules

All of the dependency modules have been updated in AutoPlay Media Studio 8. Dependency Modules make it fast and easy to detect whether or not common 3rd party software applications and technologies are installed on the user's computer. AutoPlay Media Studio 8 can detect the current versions of such products as Microsoft PowerPoint, Adobe Flash, Microsoft Word, Microsoft Excel, Adobe Acrobat, Apple QuickTime, Windows Media Player and more. If the required product is not detected, the user will be alerted to the problem and conveniently directed to the appropriate website for download and installation.

NEW! Windows Object Styles

In order to enable you to create applications that can look and feel exactly like those created using traditional Windows platform SDK development tools, we went through all of our existing objects and updated them. For example, objects like the Checkbox, Radio Button and Progress Bar will now take on the look that users expect to see on their operating system. On Windows 7, they'll look consistent with the standard operating system theme. On Windows XP, they'll look like XP – and so on. The best part though is that they'll also now respond correctly to changes in the application theme or MSSTYLES skin files that are supported in AutoPlay Media Studio 8. It all adds up to a 100% professional look!

NEW! Visually Identify Plugin Actions

The Action Wizard now marks any actions that are contained in Action Plugins with a "plugin" identifier. This makes it much easier to quickly identify what is built-in to AutoPlay Media Studio and what you've added later through 3rd party additions. It's especially handy when you're looking for documentation, help files, samples and technical support.

Improved! Video Object Transport Skins

The Video object has been modernized with a variety of new graphic styles. Choose from attractive new blue, green and gray skins. If you don't find a style you like, it's super easy to create your own video transport skins using Photoshop or any other graphics editor. We've also made the skin format more flexible, removing the constraining height restrictions that may have hampered your creativity in the past.

Improved! Paragraph Object Scrollbar Styles

The Paragraph object in AutoPlay Media Studio 8 has been updated to default to Windows 7 style scrollbars. This will give any of your scrolling textboxes a much more up-to-date visual appearance. Of course, you can still make your own scrollbar styles from scratch (or download shared skins from http://www.autoplaymediastudio.com) or choose from old favorites such as Chrome, Euro, Corporate, Charcoal, Industrial and more.

Improved! Application Startup Dialog

AutoPlay Media Studio 8 is all about helping you get things done faster and easier. Even small things like the startup welcome screen have been improved! The startup screen now gives you fast access to multiple recently used projects, one-click restore of the last used project, or simply creating a new project using a template or blank project. Additionally, an integrated RSS feed keeps you updated on product improvements, updates, bug fixes and news!

Improved! Project Explorer Window

The Project Explorer in AutoPlay Media Studio 8 has been revamped to give you a better overall view of your project. Things like better icons, collapsible Dialog and Page categories and better visual indications for hidden and locked objects will be much appreciated. Additional context-sensitive right-click menus have been added and reworked to present you with only the most appropriate commands for working with objects, pages, dialogs and events.

Improved! Quick Script Snippets

A variety of changes were made to the script editor to help more quickly write your code. Of course the popular Action Wizard, Code Completion and Intellisense are still there to guide you. We've also expanded and reorganized the one-click "Quick Script" feature. Many common programming "snippets" are included, making it super easy to add loops, control structures and other often-used bits of script. Additionally, "object tables" have been moved into their own category in order to help you find what you’re looking for at a glance.

NEW! Centralized Repository for Plugins, Templates and Addons

With all the new possibilities available to AutoPlay Media Studio 8 developers, we've put together a centralized archive to help organize everything. At http://www.autoplaymediastudio.com you'll find an easy-to-navigate repository for everything related to AutoPlay Media Studio. You'll find action plugins, object plugins, application themes, Lua modules, video transport skins, scrollbar skins, MSSTYLES skins, custom .BTN format button files, background images, project templates, example projects, scripts, audio files, tutorials, tools and lots more.


Changes from 7 to 8

Introduction

Contents Changes from 7 to 8

Familiar with AutoPlay Media Studio 7?
Here’s what you need to know to get right up to speed with v8!

Full Support for v7 Projects

AutoPlay Media Studio 8 was developed with v7 users in mind. While a plethora of new features have been added, v8 remains almost 100% compatible with v7 projects.

Lua Language Changes

AutoPlay Media Studio now contains an updated version of the Lua scripting library, version 5.1 (previously 5.0). AutoPlay's version has been compiled to try to maintain compatibility, however there are some minor syntax changes/deprecations made to the language that you need to be aware of for future development as well as previously created projects and lua scripts.

When importing a project made with an earlier version of AutoPlay Media Studio, AutoPlay Media Studio 8 will automatically analyze your project file and create a report detailing any areas where it thinks the old style for loop is in use. If there are any old for loops found the report will automatically be saved in the same folder as your new 8 project file and opened in your default web-browser. We recommend analyzing each line of code found in the report to ensure that you only use the new for loop syntax.

Table Iterating For Loops

The syntax for iterating a table using for loop using in has changed (has been deprecated) If the syntax is not changed, a runtime error will be thrown when executed.

Old syntax:

mytable = {"One","Two","Three"};

for k, v in mytable do
Dialog.Message("Table Item", k .. "=" .. v);
end -- for

Needs to be changed to:

mytable = {"One","Two","Three"};

for k, v in pairs (mytable) do
Dialog.Message("Table Item", k .. "=" .. v);
end -- for

The functions table.foreach and table.foreachi are also deprecated. You can use a for loop as above with pairs or ipairs instead. While these two are deprecated, they still work (unlike the example above), however you are advised to also rework these types of loops in case they are removed from future versions.

If you commonly use Lua functions (non-AutoPlay actions) in your scripts, you may also want to review the list of other changes to the language in case other changes affect you. You can find this information in the Lua 5.1 Reference Manual found on http://www.lua.org.

Plugin Changes

As of AutoPlay Media studio 8, only plugins created with version 2 of the Plugin SDK (or higher) are compatible. When a version 7 project is opened in version 8, the project is analyzed to determine if it contains any plugin objects or actions. A list of these can be viewed in the analysis report that is automatically generated under the heading "Legacy Plugins."

In order for your project to work you will need to obtain updated versions of the plugins listed. Once you have the updated version of these plugins, simply install them into the correct plugin directory and your project should work properly. If you have already installed versions of the listed plugins that were created using version 2 of the Indigo Rose Plugin SDK then no further action is necessary.

NEW! Faster & More Powerful Lua 5.1 Scripting Engine

AutoPlay Media Studio 8's scripting engine is now faster, more powerful and much more extensible. The Lua 5.1 system features a new module system, incremental garbage collection, new mechanism for varargs, new syntax for long strings and comments, mod and length operators, metatables for all types and a fully reentrant parser.

NEW! Support for Lua 5.1 Code Modules

With the new scripting engine upgrade comes compatibility with Lua 5.1 modules. You now have access to a wealth of free Lua code you can download and use in your AutoPlay Media Studio 8 projects. In most cases you simply copy the module files into your project and "require" them in your script. Just some of the useful modules out there include Bit Operation, Date, Canvas Draw, Imaging Tool, GD, Crypto, Colors, Speech, Alien, Social (Twitter), CURL, Regular Expression Parsing and so much more. It’s a whole treasure chest of addons and tools just waiting for you!

NEW! Blu-ray Disc Support

Do your projects contain huge database and video files? AutoPlay Media Studio 8 now includes full support for burning directly to Blu-Ray media (BD-R, BD-RE). The integrated Bluray disc burning allows you to publish your project directly to single layer and dual-layer BD-R and BD-RE media, supporting 25 GB, 50 GB and even 100 GB formats.

NEW! Application Styles / Skinning

AutoPlay Media Studio 8 gives you the freedom to create applications that look exactly the way you want. Perhaps you prefer that your programs to take on the same appearance as the operating system (e.g. Windows XP, Vista, Windows 7 Aero...)? Or do you want them to be entirely customized with completely custom drawn background images, buttons and window shapes? Or perhaps you'd like to simply make use of the hundreds of ready-to-use MSSTYLES themes (like OS/X Tiger and Panther) that you can download on the Internet? In any case, AutoPlay Media Studio makes it possible – and easy!

NEW! Integrated Database Access

It's never been easier to write database applications using AutoPlay Media Studio! Easily connect to a variety of popular local and remote/Internet database systems including MySQL, SQLite3, ODBC, Oracle and PostgreSQL. Execute any SQL statements you desire like CREATE, INSERT and more – even easily retrieve data results using a row-by-row cursor system. Features full integration with our fill-in-the-blanks style Action Wizard, plus intelligent code completion.

NEW! PDF Object

AutoPlay Media Studio now features integrated support for displaying PDF documents right in your application. This highly requested feature also gives you full control over the display and formatting. You can show/hide toolbars, scrollbars and borders. Layout options include "Single Page", "One Column", "Two Columns" and "User Preference". View options include "Fit Page", "Fit Page Width", "Fit Page Height" and "Actual Size".

NEW! PDF Actions

Take control of the PDF object with 18 easy-to-use actions. Fully integrated into the fill-in-the-blanks Action Wizard, you'll be able to easily create dynamic applications to work with PDF files. Actions are provided to Print, Load, Navigate, Zoom, Resize, Hide and much more.

NEW! QuickTime Object

Thanks to the new Apple QuickTime object, your AutoPlay Media Studio applications are now compatible with over 80 video, audio and image formats. Video formats include .MOV, .DV, .M4V, .MP4 and dozens more – including the amazing h.264 format. Audio formats include .AAC, .AIF, .M4A, .MP3, etc. Visual formatting options let you lock an aspect ratio, resize the media to fit the object dimensions or center it within the object area. Border styles include 3D, plain or none.

NEW! QuickTime Actions

The Quicktime object by itself is great - but a Quicktime object plus 22 built-in high-level actions is just plain awesome! Brought together, your AutoPlay Media Studio actions have exceptional control over the QuickTime object. Using simple script commands you can Play, Seek, Set Volume, Load, Mute, View Full Screen, Hide, Show and much more. Your only limit is your imagination.

NEW! xButton Object

If you're trying to create an application that blends in beautifully with the operating system, the new xButton object is just what the doctor ordered. However, that's just the beginning! The new xButton object supports far more customization than was previously possible. Now you can modernize your applications by adding "icon" images to your buttons, plus you can "markup" the text however you desire! This object lets you control the relative placement of button text and button images; choose between normal and toggle styles; adjust fonts and colors; and even markup you text using dozens of XAML tags – including hyperlinks right on your buttons! By default, the xButton styles itself according to whatever operating system it is being run on. If your application is running on Vista, the button looks like a standard Vista button. If you're running it on Windows 7, it looks like Windows 7. However, you can easily override this and choose from many included styles like Flat, Office 2000, Office XP or many different Office 2007 styles. Or hundreds of MSSTYLES themes… The options are endless.

NEW! Checkbox List Object

Checkbox lists are a long awaited addition to AutoPlay Media Studio! We've integrated this feature into the existing Listbox object – you just need to turn it on. Once you do, you can easily present lists of items with corresponding checkboxes. Actions are included to get and set the checkbox state for any listbox item with ease. You'll find dozens of great uses for this one!

NEW! Rolling Code Data Security

AutoPlay Media Studio 8 adds another layer of protection to your applications and scripts. A unique random encryption code is now generated every time you build your project, making "hacking" of your applications much more difficult. As we all know, anyone determined enough can break any protection system given enough time and resources, but the use of rolling codes renders generic attacks ineffective. You can now sleep a little easier!

NEW! Multiple Timers

You're no longer limited to just one timer event per page! You can now set as many "named" timers as you want. Having multiple timers running really opens up the creative possibilities for animations, games, status updates and dozens of other applications.

NEW! Service Actions

Easily control Windows Services using the seven new actions included in AutoPlay Media Studio 8. Everything you need is included, such as Create, Start, Stop, Pause, Delete, Query and Continue.

NEW! FTPWI Actions

AutoPlay Media Studio 8 includes a set of built-in FTP actions, enabling your application to easily download files over the Internet from FTP servers. These new FTP actions make use of the WinINet API to ensure compliance with the RFC 959 File Transfer Protocol specifications. Actions include FTPWI.Download, FTPWI.GetErrorInfo and FTPWI.GetFileSize.

NEW! System Restore Actions

This trio of system restore actions are extremely powerful and essential for any application that might want to make system changes or install software in a failsafe manner. By creating a system restore point using System.SetRestorePoint before making changes to the computer, the user can easily rollback those changes using the operating system's "restore" feature (found on Windows Vista or later). Actions include System.IsSystemRestoreAvailable, System.SetRestorePoint and System.RemoveRestorePoint.

NEW! Dialog.ComboBox Action

Here's an action that'll find a lot of use! The Dialog.ComboBox action is used to pop up a dialog box presenting the user with a drop-down list of items they can choose from. You simply pass in a list of items to select from, choose if you'd like them sorted or not and whether or not to restrict the user to just the items in the list, or allow them to type in their own text response. It's a fast and compact way to get user input, while offering suggestions to them at the same time!

NEW! Balloon Tooltips and Extended Tooltips

In addition to the standard popup tooltips you're used to from previous versions, AutoPlay Media Studio 8 now lets you display Balloon tooltips! It's an extremely attractive option for presenting context sensitive help within your application. It's also much more useful than the old style tooltips, as you can use multiple lines of text to present your instructions. In fact, multi-line tooltips were so useful, we also added the feature to the standard looking popup as "extended" tooltips.

NEW! Modernized Visual Workspace

AutoPlay Media Studio has always looked pretty slick, but that wasn't good enough. The entire project workspace has been overhauled. Selection boxes, toolbars, context menus – everything has been redone using a consistent color palette, light source and 3D perspective. You spend a lot of time working on your projects. Your tools should serve to increase your productivity, rather than distract you. With AutoPlay Media Studio 8, you'll find everything is more logically arranged and attractively presented – so you can get more done.

NEW! Plugin SDK v2

Action Plugins and Object Plugins are one of the best features of AutoPlay Media Studio. They allow 3rd party software developers to extend and expand the product in an extremely integrated and seamless fashion. By simply dropping a plugin into your project, you can easily save yourself hours of work and add significant functionality to your application. The great news is that with AutoPlay Media Studio 8, plugin developers can now fully leverage the advantages of the Lua 5.1 language. The Plugin SDK v2 is available for free download on the indigorose.com website.

Improved! Grid Object

Working with data grids in AutoPlay Media Studio is more useful than ever, especially with the new integrated database features in v8. As always, the grid object allows you to add spreadsheets, grids and list controls to your applications. With over 110 scriptable actions, it is extremely powerful. To help you easily preload data, you can now even specify a CSV (comma separated value) data file at design time.

Improved! Flash Object with ExternalInterface Support

The Adobe Flash object now supports calling and responding to Flash actionscript functions with the addition of the new "Flash.CallFunction" and "Flash.SetReturnValue" actions and new "On FlashCall" event. Access to Flash's external API opens up many new uses for the Flash object and advanced interaction with your AutoPlay Media Studio application such as playing FVL video files using a Flash loader.

Improved! Web Object

The web object now uses the latest Microsoft Internet Explorer SDK. New scrollbar and border options have been added to give you increased visual control over the object - allowing you to better integrate web pages into your AutoPlay Media Studio applications.

NEW! Stack Traceback for Syntax Errors

We've made it easier for you to debug syntax errors in your scripts by providing you with better error reports. Error messages now include additional details about exactly where the problem occurred – right down to the event name and line number!

NEW! Debug Message Logging

Testing and debugging your projects is much easier in AutoPlay Media Studio 8. You can now send all debug message to a human-readable text format log file, to a debug window or simultaneously to both locations. Between the automatic "Trace Mode" logging, "Event Context" information and "Last Error" actions, you've got a formidable collection of tools to help squash those pesky bugs and logic errors!

NEW! Eyedropper Color Picker

Easily match colors thanks to the new eyedropper style color picker. Integrated into all color choosers, simply move your mouse pointer off the dialog and watch it turn into an eyedropper cursor. Click on the color of any pixel on your screen and voila – you've automatically set the color to match.

NEW! Updated Dependency Modules

All of the dependency modules have been updated in AutoPlay Media Studio 8. Dependency Modules make it fast and easy to detect whether or not common 3rd party software applications and technologies are installed on the user's computer. AutoPlay Media Studio 8 can detect the current versions of such products as Microsoft PowerPoint, Adobe Flash, Microsoft Word, Microsoft Excel, Adobe Acrobat, Apple QuickTime, Windows Media Player and more. If the required product is not detected, the user will be alerted to the problem and conveniently directed to the appropriate website for download and installation.

NEW! Windows Object Styles

In order to enable you to create applications that can look and feel exactly like those created using traditional Windows platform SDK development tools, we went through all of our existing objects and updated them. For example, objects like the Checkbox, Radio Button and Progress Bar will now take on the look that users expect to see on their operating system. On Windows 7, they'll look consistent with the standard operating system theme. On Windows XP, they'll look like XP – and so on. The best part though is that they'll also now respond correctly to changes in the application theme or MSSTYLES skin files that are supported in AutoPlay Media Studio 8. It all adds up to a 100% professional look!

NEW! Visually Identify Plugin Actions

The Action Wizard now marks any actions that are contained in Action Plugins with a "plugin" identifier. This makes it much easier to quickly identify what is built-in to AutoPlay Media Studio and what you've added later through 3rd party additions. It's especially handy when you're looking for documentation, help files, samples and technical support.

Improved! Video Object Transport Skins

The Video object has been modernized with a variety of new graphic styles. Choose from attractive new blue, green and gray skins. If you don't find a style you like, it's super easy to create your own video transport skins using Photoshop or any other graphics editor. We've also made the skin format more flexible, removing the constraining height restrictions that may have hampered your creativity in the past.

Improved! Paragraph Object Scrollbar Styles

The Paragraph object in AutoPlay Media Studio 8 has been updated to default to Windows 7 style scrollbars. This will give any of your scrolling textboxes a much more up-to-date visual appearance. Of course, you can still make your own scrollbar styles from scratch (or download shared skins from http://www.autoplaymediastudio.com) or choose from old favorites such as Chrome, Euro, Corporate, Charcoal, Industrial and more.

Improved! Application Startup Dialog

AutoPlay Media Studio 8 is all about helping you get things done faster and easier. Even small things like the startup welcome screen have been improved! The startup screen now gives you fast access to multiple recently used projects, one-click restore of the last used project, or simply creating a new project using a template or blank project. Additionally, an integrated RSS feed keeps you updated on product improvements, updates, bug fixes and news!

Improved! Project Explorer Window

The Project Explorer in AutoPlay Media Studio 8 has been revamped to give you a better overall view of your project. Things like better icons, collapsible Dialog and Page categories and better visual indications for hidden and locked objects will be much appreciated. Additional context-sensitive right-click menus have been added and reworked to present you with only the most appropriate commands for working with objects, pages, dialogs and events.

Improved! Quick Script Snippets

A variety of changes were made to the script editor to help more quickly write your code. Of course the popular Action Wizard, Code Completion and Intellisense are still there to guide you. We've also expanded and reorganized the one-click "Quick Script" feature. Many common programming "snippets" are included, making it super easy to add loops, control structures and other often-used bits of script. Additionally, "object tables" have been moved into their own category in order to help you find what you’re looking for at a glance.

NEW! Centralized Repository for Plugins, Templates and Addons

With all the new possibilities available to AutoPlay Media Studio 8 developers, we've put together a centralized archive to help organize everything. At http://www.autoplaymediastudio.com you'll find an easy-to-navigate repository for everything related to AutoPlay Media Studio. You'll find action plugins, object plugins, application themes, Lua modules, video transport skins, scrollbar skins, MSSTYLES skins, custom .BTN format button files, background images, project templates, example projects, scripts, audio files, tutorials, tools and lots more.

Much More…

Hundreds of other changes have made their way into AutoPlay Media Studio 8. Some visible, some hidden deep within the core… All of them designed to make AutoPlay Media Studio 8 your "go to" tool when you’re on a deadline and need to create graphically rich interactive software applications.


Create New Project

Create New Project

The Create New Project dialog lets you name your project and choose what kind of project you'd like to start.

A project is just the collection of files and settings and everything else that makes up an AutoPlay application. A typical project will consist of several pages, with different objects on each page. Each page, and each object on it, has individual settings that you can edit and adjust to make the application do what you want it to. These settings are all stored in a single file, called the project file.

This file, along with any images, videos, or other files that you add to your project, are collected inside a special folder called the project folder. The project folder contains everything that belongs to the project, including the project file. Each project has its own project folder, which serves as a container for the project.

Select a Template

Allows you to select the project template to use for the new project. The templates are presented as a scrollable list of thumbnail images, where each thumbnail image represents a different project template. A project template is a ready-made "starter project" that you can use to get your own project off the ground.

More Templates:

Opens the online AutoPlay add on and plugin directory in your default web browser.

Project Details

Name your project:

The name you would like to use for the project folder, which is the folder that will be used to keep all of the project's files together, and of the project file, which is the file that contains all of the settings and options that make up your project. (This is the file that you will "open" whenever you want to load the project into AutoPlay.)

Note: All Project folders are created in your Documents\AutoPlay Media Studio 8\Projects folder by default. (You can change the location for new projects in the Preferences.)


Program Reference

Contents

Welcome to the AutoPlay Media Studio 8 program reference!

Please select one of the following subjects:

Introduction

How do I...?

Scripting Guide

Running on Windows Vista or Later

Actions

Script Editor

Events

Variables

File Menu

Edit Menu

Align Menu

Page Menu

Dialog Menu

Object Menu

Project Menu

Publish Menu

View Menu

Tools Menu

Help Menu

Miscellaneous


Application.Exit Examples

Application.Exit

Application.Exit (

number ReturnCode = 0 )

Example 1

Application.Exit();

Immediately closes the application.

Example 2

Application.Exit(4);

Immediately exits the application and returns 4 as a custom return code to the calling process.

Example 3

-- Ask the user if they really want to exit
nChoice = Dialog.Message("Confirm Exit", "Are you sure you wish to exit?", MB_YESNO, MB_ICONQUESTION, MB_DEFBUTTON2);

-- If yes was chosen, exit the application.
if nChoice == 6 then
Application.Exit();
end

Confirm with the user that they wish to exit. If the choice is confirmed, exit the application, otherwise do nothing.


Application.ExitScript Examples

Application.ExitScript

Application.ExitScript (

)

Example 1

Application.ExitScript();

Terminates the currently running script.

Example 2

if (bTerminateScript) then
-- The script should be terminated.
Application.ExitScript();
end

If the boolean variable "bTerminateScript" is set to true, then the script is terminated.

Example 3

-- Get the CRC value from the 'secret' file.
SecretCRC = File.GetCRC("C:\\secret_directory\\secret_file.ext");

-- Check the returned CRC value against the expected value.
if (SecretCRC ~= 123456789) then
-- The values didn't match, terminate the script.
Application.ExitScript();
end

Checks the CRC value of a 'secret file'. If the returned value does not match the expected value, the script is terminated.


Application.GetCurrentDialog Examples

Application.GetCurrentDialog

string Application.GetCurrentDialog (

)

Example 1

dialog_name = Application.GetCurrentDialog();

Gets the name of the current dialog and stores it in the variable "dialog_name."


Application.GetCurrentPage Examples

Application.GetCurrentPage

string Application.GetCurrentPage (

)

Example 1

page_name = Application.GetCurrentPage();

Gets the name of the current page and stores it in the variable "page_name."


Application.GetDialogProperties Examples

Application.GetDialogProperties

table Application.GetDialogProperties (

string DialogName )

Example 1

tbDialogProperties = Application.GetDialogProperties("Dialog1");

if (tbDialogProperties) then
strMessage = "The properties of the dialog are:\r\n\r\n";
for index, value in pairs(tbDialogProperties) do
strMessage = strMessage..index..": "..value.."\r\n";
end

Dialog.Message("Dialog Properties", strMessage);
end

Gets all of the properties for "Dialog1" and shows their values in a dialog message.


Application.GetDialogs Examples

Application.GetDialogs

table Application.GetDialogs (

)

Example 1

all_dialogs = Application.GetDialogs();

Gets the names of all of the dialogs in the application and stores them in a table called "all_dialogs."

Example 2

-- Get the names of all of the dialogs in the application.
dialogs = Application.GetDialogs();

-- Create a string containing all of the dialog names.
dialog_string = "";
for index, dialogname in pairs(dialogs) do
dialog_string = String.Concat(dialog_string, dialogname.."\r\n");
end

-- Display a dialog message with all of the dialog names.
result = Dialog.Message("Application Dialogs", "This application consists of the following dialogs: \r\n"..dialog_string);

Gets the names of all of the dialogs in the application and stores them in a table called "dialogs." Each dialog name from the table is accessed to create a string containing all of the dialogs. The string is then shown in a Dialog.Message action.

Tip: Instead of the "for" loop, the concatenation of the table elements could be accomplished using a Table.Concat action.


Application.GetDialogScript Examples

Application.GetDialogScript

string Application.GetDialogScript (

string DialogName,

string EventName )

Example 1

sScript = Application.GetDialogScript ("Dialog1", "On Show");

Gets the script from the 'On Show' event of 'Dialog1', and stores it in the variable 'sScript'.

Example 2

-- Get the script existing in the event
sPreviousScript = Application.GetDialogScript ("Dialog1", "On Preload");

-- Append an Application.Exit action to the end of the script
sNewScript = sPreviousScript .. "\r\n" .. "Application.Exit()";

-- Set the event's script
Application.SetDialogScript("Dialog1", "On Preload", sNewScript);

Appends an Application.Exit action to the end of the script located in the 'On Preload' event of 'Dialog1'.


Application.GetLastError Examples

Application.GetLastError

number Application.GetLastError (

)

Example 1

nError = Application.GetLastError();

Gets the error code for the last action that was performed, and stores it in a variable named "nError."

Tip: Starting a variable name with "n" is a technique that programmers use to help themselves remember that a variable is supposed to contain a numeric value.

Example 2

errmsg = "Error #" .. Application.GetLastError().. " in " .. Debug.GetEventContext();

Uses the concatenation operator (..) to form an error message containing the last error code and the current event context and stores the error message in a variable named "errmsg."

Example 3

-- Print the specified file.
File.Print("AutoPlay\\Docs\\MyFile.pdf");

--Check to see if an error occurred.
error = Application.GetLastError();

-- If an error occurred, display the error message.
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);
end

Prints the file "MyFile.pdf" with the user's default viewer for PDF files (probably Acrobat). If the action fails, the error code message is displayed in a dialog message.

Example 4

-- Confirm that the installation executable should be launched.
result = Dialog.Message("Confirm", "Are you sure you would like to install now?", MB_YESNO, MB_ICONINFORMATION, MB_DEFBUTTON1);

-- If the user clicked the Yes button.
if (result == IDYES) then

-- Run the installation file.
File.Run("AutoPlay\\Docs\\setup.exe", "", "", SW_SHOWNORMAL, false);

-- Check to see if an error occurred when launching the file.
error = Application.GetLastError();

-- If an error occurred, display an error message to the user.
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
end
end

Asks the user if they would like to run the installation file. If they click the Yes button, the installation file will be launched using the File.Run action. If the action fails, the error code message is displayed in a dialog message.


Application.GetMenu Examples

Application.GetMenu

table Application.GetMenu (

)

Example 1

-- Output all top level menu items:
local strMenuData = "";

-- Store the contents of the menu in a table
tblMenu = Application.GetMenu();

-- Check that the table exists
if(tblMenu)then
local nNumItems = Table.Count(tblMenu);

-- Step through the table row by row
for index = 1, nNumItems do
local tblItemInfo = tblMenu[index];
if(tblItemInfo)then
-- Add the text to the string
strMenuData = strMenuData..tblItemInfo.Text.."\r\n";
end
end

-- Output the created string to the user
Dialog.Message("Top Level Menu Items", strMenuData);
end

Outputs all the top level menu items to the user in a dialog message.

Example 2

--%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
--% Name: OutputMenu (tMenuToOutput, nLevelCount = 0, sMenuString = ""); %
--% Values: tMenuToOutput: REQUIRED - the menu table generated from %
--% Application.GetMenu %
--% nLevelCount: Optional (default to 0), the indent the current item %
--% should have in the output. %
--% sMenuString: Optional (default to ""), a string containing %
--% the menu items. %
--% Returns: A string containing the menu items ready for output. %
--%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function OutputMenu (tMenuToOutput, nLevelCount, sMenuString)
-- Since we don't want to make nLevelCount required (for the first call),
-- we have to initialize it if it is not passed to the function
if not nLevelCount then
nLevelCount = 0;
end

-- sMenuString is not a required variable (for the first call),
-- therefore we must initialize it if it was not passed to the function.
if not sMenuString then
sMenuString = "";
end

-- Menu table is numerically indexed, step through for each node
for nIndex, tMenuItem in pairs(tMenuToOutput) do
-- Add the current menu item to the string to return, whether it has a sub menu or not
sMenuString = sMenuString .. String.Repeat(" ", nLevelCount*4) .. tMenuItem.Text .. " (ID: " .. tMenuItem.ID .. ")".. "\r\n";
-- Check if a sub menu exists at the current menu's location
if type(tMenuItem.SubMenu) == 'table' and tMenuItem.ID == -1 then
-- A sub menu exists. Recursively call this function to include the sub menu.
-- Increasing the level count by 1 controls the indent that the item will have in the output.
sMenuString = OutputMenu (tMenuItem.SubMenu, nLevelCount + 1, sMenuString);
end
end

-- Return the menu string
return sMenuString;
end

-- Get the menu structure and store in a table
tMenu = Application.GetMenu();

-- Set the title and message for the Dialog.Message box
sTitle = "Current Menu Structure";
sMessage = OutputMenu(tMenu);

-- Display a Dialog.Message box to the user
Dialog.Message(sTitle, sMessage);

Outputs the entire menu structure to the user through a dialog message. This example uses an advanced implementation of a function to recursively step through the menu.


Application.GetPageProperties Examples

Application.GetPageProperties

table Application.GetPageProperties (

string PageName )

Example 1

tbPageProperties = Application.GetPageProperties("Page1");

if (tbPageProperties) then
strMessage = "The properties of the page are:\r\n\r\n";
strKeywords = "Keywords: ";
for index, value in pairs(tbPageProperties) do
-- Check if the index is the Keywords table.
if (index == "Keywords") then
-- Check if the keywords table contains values.
if (value) then
for key_index, key_value in pairs(value) do
strKeywords = strKeywords..key_value..", ";
end
-- Trim the last comma.
strKeywords = String.TrimRight(strKeywords, ", ");
end
else
strMessage = strMessage..index..": "..value.."\r\n";
end
end

Dialog.Message("Page Properties", strMessage..strKeywords);
end

Gets all of the properties for "Page1" and shows their values in a dialog message.


Application.GetPages Examples

Application.GetPages

table Application.GetPages (

)

Example 1

all_pages = Application.GetPages();

Gets the names of all of the pages in the application and stores them in a table called "all_pages."

Example 2

-- Get the names of all of the pages in the application.
pages = Application.GetPages();

-- Create a string containing all of the page names.
page_string = "";
for index, pagename in pairs(pages) do
page_string = String.Concat(page_string, pagename.."\r\n");
end

-- Display a dialog message with all of the page names.
result = Dialog.Message("Application Pages", "This application consists of the following pages: \r\n"..page_string);

Gets the names of all of the pages in the application and stores them in a table called "pages." Each page name from the table is accessed to create a string containing all of the pages. The string is then shown in a Dialog.Message action.

Tip: Instead of the "for" loop, the concatenation of the table elements could be accomplished using a Table.Concat action.


Application.GetPageScript Examples

Application.GetPageScript

string Application.GetPageScript (

string PageName,

string EventName )

Example 1

sScript = Application.GetPageScript ("Page1", "On Show");

Gets the script from the 'On Show' event of 'Page1', and stores it in the variable 'sScript'.

Example 2

-- Get the script existing in the event
sPreviousScript = Application.GetPageScript ("Page1", "On Preload");

-- Append an Application.Exit action to the end of the script
sNewScript = sPreviousScript .. "\r\n" .. "Application.Exit()";

-- Set the event's script
Application.SetPageScript("Page1", "On Preload", sNewScript);

Appends an Application.Exit action to the end of the script located in the 'On Preload' event of 'Page1'.


Application.GetWndHandle Examples

Application.GetWndHandle

number Application.GetWndHandle (

)

Example 1

handle = Application.GetWndHandle();

Gets the numeric window handle for the application window and stores it in the variable "handle."

Example 2

-- Get the AutoPlay application's window handle.
handle = Application.GetWndHandle();

-- Hide the AutoPlay application window.
Window.Hide(handle);

-- Sleep for 3 seconds.
Application.Sleep(3000);

-- Show the AutoPlay application window.
Window.Show(handle);

Gets the numeric window handle for the application window and stores it in the variable "handle." The window handle is then used to hide the window for 3 seconds.


Application.LoadActionPlugin Examples

Application.LoadActionPlugin

Application.LoadActionPlugin (

string Filename )

Example 1

Application.LoadActionPlugin("AutoPlay\\Plugins\\AddedFunctionality.lmd");

Loads the action plugin file called "AddedFunctionality.lmd" currently located in "AutoPlay\Plugins."

Example 2

Application.LoadActionPlugin(_SourceFolder.."\\MyPlug.lmd");

Loads the action plugin file called "MyPlug.lmd" into the application.

Note: _SourceFolder is a built-in variable that contains the path to the folder where the autorun.exe file is located.


Application.LoadScript Examples

Application.LoadScript

Application.LoadScript (

string Filename )

Example 1

Application.LoadScript("AutoPlay\\Scripts\\AddedFunctionality.lua");

Loads and executes the external script file called "AddedFunctionality.lua" that is currently located in "AutoPlay\Scripts." This script file will be executed once during the application.

Example 2

Application.LoadScript(_SourceFolder.."\\MyScript.lua");

Loads and executes the script file called "MyScript.lua."

Note: _SourceFolder is a built-in variable that contains the path to the folder where the autorun.exe file is located.


Application.LoadValue Examples

Application.LoadValue

string Application.LoadValue (

string Section,

string Key )

Example 1

first_name = Application.LoadValue("User Info", "First Name");

Loads the current value of the "First Name" key in the "User Info" section, and stores it in a variable called "first_name".

Example 2

address = Application.LoadValue("Company", "Address");

Looks up the value of "Address" in the "Company" section, and stores it in a variable named "address".

Example 3

user_name = "";
-- Loop until a valid user name is entered or the user cancels.
while (user_name == "") and (user_name ~= "CANCEL") do
--Prompt the user for their user name.
user_name = Dialog.Input("User Information", "Please enter your user name:", "", MB_ICONQUESTION);

-- If the user does not enter any text, display an error message. The loop will continue from the beginning.
if user_name == "" then
result = Dialog.Message("Error", "Your information could not be processed as entered. Please try again.", MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);

-- If the user entered a valid user name and didn't cancel, store the value in the Registry.
elseif name ~= "CANCEL" then
Application.SaveValue("Your_User_Name", "Your_Key", user_name);

-- Check to see if there was an error saving.
error = Application.GetLastError();
end
end

-- If the user didn't cancel and there was no error saving,
-- Load the user name from the registry and display a welcome dialog.
if (user_name ~= "CANCEL") and (error == 0) then
loaded_username = Application.LoadValue("Your_User_Name", "Your_Key");

-- If the value loaded successfully.
if (Application.GetLastError() == 0) then
result = Dialog.Message("Hello", "Welcome "..loaded_username.."!", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
end
end

Prompts the user for a user name using the Dialog.Input action and then saves the name in the Registry. The name is then loaded from the Registry and displayed in a dialog.


Application.MakeKeywordIndex Examples

Application.MakeKeywordIndex

table Application.MakeKeywordIndex (

boolean SortPages = true )

Example 1

tbKeywordIndex = Application.MakeKeywordIndex();

if (tbKeywordIndex) then
strTempString = "";
for key_index, page_table in pairs(tbKeywordIndex) do
for page_index, page_value in pairs(page_table) do
strTempString = strTempString .. key_index.." - "..page_index..": "..page_value.."\r\n";
end
end
Dialog.Message("Index Results", strTempString);
end

Makes an index of keywords defined on all pages and shows each keyword and the pages it was found on in a dialog message.


Application.Minimize Examples

Application.Minimize

Application.Minimize (

)

Example 1

Application.Minimize();

Minimizes the application's window to the task bar.


Application.Restore Examples

Application.Restore

Application.Restore (

)

Example 1

Application.Restore();

Restores the application's window to the size and position it had before it was minimized.


Application.RunScriptFile Examples

Application.RunScriptFile

Application.RunScriptFile (

string Filename )

Example 1

Application.RunScriptFile("AutoPlay\\Scripts\\AddedFunctionality.lua");

Executes the external script file called "AddedFunctionality.lua" that is currently located in "AutoPlay\Scripts."

Example 2

Application.RunScriptFile(_SourceFolder.."\\MyScript.lua");

Runs the script file called "MyScript.lua."

Note: _SourceFolder is a built-in variable that contains the path to the folder where the autorun.exe file is located.


Application.SaveValue Examples

Application.SaveValue

Application.SaveValue (

string Section,

string Key,

string Value )

Example 1

Application.SaveValue("User Info", "First Name", first_name);

Saves the value that is currently in the variable "first_name" into a section called "User Info" and a key called "First Name".

Example 2

Application.SaveValue("Company", "Address", "123 Bannatyne Avenue");

Saves the value "123 Bannatyne Avenue" into the "Address" key of the "Company" section.

Example 3

user_name = "";
-- Loop until a valid user name is entered or the user cancels.
while (user_name == "") and (user_name ~= "CANCEL") do
--Prompt the user for their user name.
user_name = Dialog.Input("User Information", "Please enter your user name:", "", MB_ICONQUESTION);

-- If the user does not enter any text, display an error message. The loop will continue from the beginning.
if user_name == "" then
result = Dialog.Message("Error", "Your information could not be processed as entered. Please try again.", MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);

-- If the user entered a valid user name and didn't cancel, store the value in the Registry.
elseif name ~= "CANCEL" then
Application.SaveValue("Your_User_Name", "Your_Key", user_name);

-- Check to see if there was an error saving.
error = Application.GetLastError();
end
end

-- If the user didn't cancel and there was no error saving,
-- Load the user name from the registry and display a welcome dialog.
if (user_name ~= "CANCEL") and (error == 0) then
loaded_username = Application.LoadValue("Your_User_Name", "Your_Key");

-- If the value loaded successfully.
if (Application.GetLastError() == 0) then
result = Dialog.Message("Hello", "Welcome "..loaded_username.."!", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
end
end

Prompts the user for a user name using the Dialog.Input action and then saves the name in the Registry. The name is then loaded from the Registry and displayed in a dialog.


Application.SearchKeywords Examples

Application.SearchKeywords

table Application.SearchKeywords (

string SearchFor,

boolean AllowPartialMatch = true,

boolean CaseSensitive = true )

Example 1

tbSearchResults = Application.SearchKeywords("target", true, true);

if (tbSearchResults) then
strTempString = "";
for page_index, page_table in pairs(tbSearchResults) do
for key_index, key_value in pairs(page_table) do
strTempString = strTempString .. page_index.." - "..key_index..": "..key_value.."\r\n";
end
end

Dialog.Message("Search Results", strTempString);
end

Searches all keywords in all pages in the project for the keyword "target" and shows all locations it was found in a dialog message.


Application.SetDialogProperties Examples

Application.SetDialogProperties

Application.SetDialogProperties (

string DialogName,

table Properties )

Example 1

-- Create a table containing the properties to set for the dialog.
tbDialogProperties = {};
nNewColor = Math.HexColorToNumber("FF0000");
tbDialogProperties.BackgroundColor = nNewColor;

-- Set the dialog's properties.
Application.SetDialogProperties("Dialog1", tbDialogProperties);

Sets the background color of the dialog named "Dialog1."

Note: This example assumes you have a dialog called "Dialog1" that currently has a gradient background color.


Application.SetDialogScript Examples

Application.SetDialogScript

Application.SetDialogScript (

string DialogName,

string EventName,

string Script )

Example 1

Application.SetDialogScript("Dialog2", "On Show", "Application.Exit()");

Sets the script for the 'On Show' event of 'Dialog2' to Application.Exit.

Example 2

-- Get the script existing in the event
sPreviousScript = Application.GetDialogScript ("Dialog1", "On Preload");

-- Append an Application.Exit action to the end of the script
sNewScript = sPreviousScript .. "\r\n" .. "Application.Exit()";

-- Set the event's script
Application.SetDialogScript("Dialog1", "On Preload", sNewScript);

Appends an Application.Exit action to the end of the script located in the 'On Preload' event of 'Dialog1'.


Application.SetLastError Examples

Application.SetLastError

Application.SetLastError (

number ErrorCode )

Example 1

Application.SetLastError(0); -- set the last error to "no error occurred"

Sets the last error code to 0, signalling that "the last action was successful." (The text after the "--" in this example is just a comment.)

Example 2

Application.SetLastError(3245);

Sets the last error code to 3245.


Application.SetMenu Examples

Application.SetMenu

Application.SetMenu (

table Menu )

Example 1

-- Create a table containing all menu information
tblMenu = {};
tblMenu[1] ={};
tblMenu[1].Text = "&New Menu";
tblMenu[1].ID = 100;
tblMenu[1].Checked = false;
tblMenu[1].Enabled = true;
tblMenu[1].SubMenu = {};
tblMenu[1].SubMenu[1] = {};
tblMenu[1].SubMenu[1].Text = "&SubItem 1";
tblMenu[1].SubMenu[1].ID = 101;
tblMenu[1].SubMenu[1].Checked = false;
tblMenu[1].SubMenu[1].Enabled = true;
tblMenu[1].SubMenu[2] = {};
tblMenu[1].SubMenu[2].Text = "S&ubItem 2";
tblMenu[1].SubMenu[2].ID = 102;
tblMenu[1].SubMenu[2].Checked = false;
tblMenu[1].SubMenu[2].Enabled = true;

-- Set the menu based on the info in the above table
Application.SetMenu(tblMenu);

Creates a sample menu at runtime right from script. Please note that the "Show menu bar" setting must be checked on Menu Bar dialog in order for this example to work.


Application.SetMenuBarActive Examples

Application.SetMenuBarActive

Application.SetMenuBarActive (

boolean Activate = true )

Example 1

Application.SetMenuBarActive(false);

--Copy all files within the Docs folder on the CD-ROM to the destination.
StatusDlg.Show(MB_ICONNONE, false);
File.Copy("AutoPlay\\Docs\\*.*", _TempFolder.."\\Copied Files\\", true, true, false, true, nil);
StatusDlg.Hide();

Application.SetMenuBarActive(true);

Sets the application's menu bar to be inactive while copying files to the user's temporary directory.


Application.SetPageProperties Examples

Application.SetPageProperties

Application.SetPageProperties (

string PageName,

table Properties )

Example 1

-- Create a table containing the properties to set for the page.
tbPageProperties = {};
tbPageProperties.Description = "Page1 Test Description";
tbPageProperties.Keywords = {"Apple","Orange","Pear"};
nNewColor = Math.HexColorToNumber("FF0000");
tbPageProperties.BackgroundColor = nNewColor;

-- Set the page's properties.
Application.SetPageProperties("Page1", tbPageProperties);

Sets the description, keywords and background color of the page named "Page1."

Note: This example assumes you have a page called "Page1" that currently has a gradient background color.


Application.SetPageScript Examples

Application.SetPageScript

Application.SetPageScript (

string PageName,

string EventName,

string Script )

Example 1

Application.SetPageScript("Page2", "On Show", "Application.Exit()");

Sets the script for the 'On Show' event of 'Page2' to Application.Exit.

Example 2

-- Get the script existing in the event
sPreviousScript = Application.GetPageScript ("Page1", "On Preload");

-- Append an Application.Exit action to the end of the script
sNewScript = sPreviousScript .. "\r\n" .. "Application.Exit()";

-- Set the event's script
Application.SetPageScript("Page1", "On Preload", sNewScript);

Appends an Application.Exit action to the end of the script located in the 'On Preload' event of 'Page1'.


Application.SetRedraw Examples

Application.SetRedraw

Application.SetRedraw (

boolean Redraw = true )

Example 1

Application.SetRedraw(false);
Button.SetVisible("Button1", false);
Button.SetVisible("Button2", false);
Button.SetVisible("Button2", false);
Button.SetVisible("Button3", false);
Button.SetVisible("Button4", false);
Application.SetRedraw(true);

In this example the Button.SetVisible action is used to hide 4 buttons on the page. Normally each button would be hidden and the application window would be redrawn after each action. In this situation, the Application.SetRedraw action is used to delay the redrawing of the objects on the page until all of the actions have completed.


Application.SetSysTrayIcon Examples

Application.SetSysTrayIcon

boolean Application.SetSysTrayIcon (

string IconPath,

number IconIndex = 0 )

Example 1

-- Sets the application's system tray icon using "about.ico".
bSuccess = Application.SetSysTrayIcon("AutoPlay\\Icons\\about.ico", 0);

Sets the application's system tray icon using the file "about.ico."

Example 2

-- Set the system tray icon back to its original.
bSuccess = Application.SetSysTrayIcon("", 0);

Sets the application's system tray icon back to the its original one.


Application.SetSysTrayTooltip Examples

Application.SetSysTrayTooltip

boolean Application.SetSysTrayTooltip (

string TooltipText,

boolean Show = false )

Example 1

-- Sets the application's system tray icon tooltip.
bSuccess = Application.SetSysTrayTooltip("Update Available", true);

Sets the application's system tray icon tooltip to "Update Available" and immediately shows the tooltip window.


Application.ShowPopupMenu Examples

Application.ShowPopupMenu

number Application.ShowPopupMenu (

number X,

number Y,

table Menu,

number HAlign = TPM_LEFTALIGN,

number VAlign = TPM_TOPALIGN,

boolean WaitForReturn = true,

boolean ClientCoordinates = true )

Example 1

if(e_Type == RIGHT_BUTTON_DOWN)then
tblMenu = {};
tblMenu[1] ={};
tblMenu[1].Text = "&New Menu";
tblMenu[1].ID = 100;
tblMenu[1].IconID = 0;
tblMenu[1].Checked = false;
tblMenu[1].Enabled = true;
tblMenu[1].SubMenu = {};
tblMenu[1].SubMenu[1] = {};
tblMenu[1].SubMenu[1].Text = "&SubItem 1";
tblMenu[1].SubMenu[1].ID = 101;
tblMenu[1].SubMenu[1].IconID = 1;
tblMenu[1].SubMenu[1].Checked = false;
tblMenu[1].SubMenu[1].Enabled = true;
tblMenu[1].SubMenu[2] = {};
tblMenu[1].SubMenu[2].Text = "S&ubItem 2";
tblMenu[1].SubMenu[2].ID = 102;
tblMenu[1].SubMenu[2].Checked = false;
tblMenu[1].SubMenu[2].Enabled = true;

nRes = Application.ShowPopupMenu(e_X, e_Y, tblMenu, TPM_LEFTALIGN, TPM_TOPALIGN, true, true);

if(nRes == 0)then
Dialog.Message("Menu Result","Cancelled");
else
Dialog.Message("Menu Result","Menu ID selected = "..nRes);
end
end

Dynamically creates a popup menu and displays it when the user right-clicks anywhere on the application's page surface.


Application.Sleep Examples

Application.Sleep

Application.Sleep (

number Time )

Example 1

Application.Sleep(1000);

Makes the application sleep for 1 second.

Example 2

Application.Sleep(5200);

Makes the application sleep for 5.2 seconds.


Audio.GetCurrentPos Examples

Audio.GetCurrentPos

number Audio.GetCurrentPos (

number Channel )

Example 1

audio_time = Audio.GetCurrentPos(CHANNEL_USER2);

Retrieves the current time position of the audio in user channel 2 and stores it in a variable called audio_time.

Example 2

position = Audio.GetCurrentPos(2);

Stores the current position of the audio in channel 2 in a variable named "position."

Example 3

background_music_pos = Audio.GetCurrentPos(CHANNEL_BACKGROUND);

Gets the current position of the background audio channel and stores it in background_music_pos.


Audio.GetFilename Examples

Audio.GetFilename

string Audio.GetFilename (

number Channel )

Example 1

audiofile = Audio.GetFilename(CHANNEL_BACKGROUND);

Gets the path to the audio file that is currently loaded in the background audio channel and stores it in the variable audiofile.

Example 2

current_song = Audio.GetFilename(CHANNEL_USER1);

Gets the path to the audio file that is currently loaded in user channel 1 and stores it in current_song.


Audio.GetLength Examples

Audio.GetLength

number Audio.GetLength (

number Channel )

Example 1

total_time = Audio.GetLength(CHANNEL_USER3);

Retrieves the length of the audio track in user channel 3 and stores it in a variable called total_time.

Example 2

channel_2_length = Audio.GetLength(2);

Gets the length of the audio in channel 2 and stores it in channel_2_length.

Example 3

background_music_len = Audio.GetLength(CHANNEL_BACKGROUND);

Gets the total length of the background audio channel track and stores it in background_music_len.


Audio.GetOggTags Examples

Audio.GetOggTags

table Audio.GetOggTags (

number Channel )

Example 1

tOggInfo = Audio.GetOggTags(CHANNEL_USER1);
Title = tOggInfo.TITLE;

Gets the Ogg tag information from the Ogg file currently loaded into CHANNEL_USER1 and stores it in a table called "tOggInfo." The track title is then accessed from the table and stored in the variable "Title."

Example 2

-- Load an Ogg Vorbis audio file into a channel
Audio.Load(CHANNEL_NARRATION, "AutoPlay\\Audio\\ShortSong.ogg", false, false);

-- Make sure the Load action was successful
if (Application.GetLastError() == 0) then

-- Check for file description tags
tags = Audio.GetOggTags(CHANNEL_NARRATION);
if (tags ~= nil) then
albumtitle = tags.TITLE;
artist = tags.ARTIST;
album = tags.ALBUM;
end

-- Tell the channel to start playing the audio track
Audio.Play(CHANNEL_NARRATION);
end

This example first loads an Ogg Vorbis audio file into the narration audio channel. Once loaded, the description tags are read using the Audio.GetOggTags action and stored in a table called "tags. Three of these tags are then accessed from the table and stored in variables.


Audio.GetVolume Examples

Audio.GetVolume

number Audio.GetVolume (

number Channel )

Example 1

volume = Audio.GetVolume(CHANNEL_USER3);

Gets the volume of user channel 3 and stores it in a variable called "volume."

Example 2

ch3vol = Audio.GetVolume(3);

Stores the current volume of channel 3 in the ch3vol variable.

Example 3

background_music_volume = Audio.GetVolume(CHANNEL_BACKGROUND);

Gets the volume of the background audio channel and stores it in background_music_volume.


Audio.IsLooping Examples

Audio.IsLooping

boolean Audio.IsLooping (

number Channel )

Example 1

will_loop = Audio.IsLooping(CHANNEL_BACKGROUND);

Gets the current loop setting for the background audio channel and stores it in will_loop.

Example 2

loopyloop = Audio.IsLooping(CHANNEL_USER1);

Gets the current loop setting for user channel 1 and stores it in a variable called loopyloop.


Audio.Load Examples

Audio.Load

Audio.Load (

number Channel,

string Filename,

boolean PlayAutomatic = false,

boolean Loop = false )

Example 1

Audio.Load(CHANNEL_BACKGROUND, "AutoPlay\\Audio\\Soothing Music 3.wav", true, true);

Loads the song "Soothing Music 3.wav" into the background audio channel, starts playing it automatically and tells it to loop back to the start at the end of the song.

Example 2

Audio.Load(CHANNEL_USER1, "AutoPlay\\Audio\\voiceover_012.ogg");

Loads an Ogg Vorbis audio file called "voiceover_012.ogg" into the first user channel.

Example 3

Audio.Load(CHANNEL_NARRATION, "http://www.indigorose.com/songs/myfile.ogg", true, false);
nError = Application.GetLastError();
if (nError~=0) then
Dialog.Message("Error",_tblErrorMessages[nError]);
end

Loads an Ogg Vorbis audio file called "myfile.ogg" from a web address for streaming audio into the narration audio channel. The second line of code uses the Application.GetLastError action to see if the Audio.Load action failed. If it did (error code doesn't equal 0), a dialog message is displayed with the error message for that particular error code.


Audio.Pause Examples

Audio.Pause

Audio.Pause (

number Channel )

Example 1

Audio.Pause(CHANNEL_BACKGROUND);

Pauses the background audio channel.

Example 2

Audio.Pause(CHANNEL_USER1);

Pauses the song in user channel 1.


Audio.Play Examples

Audio.Play

Audio.Play (

number Channel )

Example 1

Audio.Play(CHANNEL_BACKGROUND);

Starts playing whatever's in the background audio channel.

Example 2

Audio.Play(CHANNEL_USER1);

Starts playing the audio file that is loaded in user channel 1.


Audio.Seek Examples

Audio.Seek

Audio.Seek (

number Channel,

number SeekType,

number SeekTime = 0 )

Example 1

Audio.Seek(CHANNEL_USER1, 4, 32.15);

Seeks to the 32.15 second position of the audio file loaded in user channel 1.

Example 2

Audio.Seek(CHANNEL_BACKGROUND, 0);

Rewinds the audio in the background channel (seeks to the beginning).

Example 3

Audio.Seek(CHANNEL_USER1, 2, 5);

Seeks ahead by 5 seconds in user channel 1.


Audio.SetLooping Examples

Audio.SetLooping

Audio.SetLooping (

number Channel,

boolean Looping = true )

Example 1

Audio.SetLooping(CHANNEL_BACKGROUND, true);

Set the background audio channel to loop when the audio file reaches the end.

Example 2

Audio.SetLooping(CHANNEL_BACKGROUND, false);

Set the background audio channel to just stop when the audio file reaches the end.

Example 3

Audio.SetLooping(CHANNEL_EFFECTS, true);

Make the effects channel loop when the audio file in it reaches the end.


Audio.SetVolume Examples

Audio.SetVolume

Audio.SetVolume (

number Channel,

number Volume )

Example 1

Audio.SetVolume(CHANNEL_USER1, 128);

Sets the volume of user channel 1 to 50%.

Example 2

Audio.SetVolume(0, 255);

Sets the volume of the effects channel to 100%.

Example 3

Audio.SetVolume(CHANNEL_BACKGROUND, 220);

Sets the volume of the background audio channel to 220 (about 86%).


Audio.Stop Examples

Audio.Stop

Audio.Stop (

number Channel )

Example 1

Audio.Stop(CHANNEL_BACKGROUND);

Stops playing the audio in the background audio channel.


Audio.ToggleMute Examples

Audio.ToggleMute

Audio.ToggleMute (

number Channel )

Example 1

Audio.ToggleMute(CHANNEL_BACKGROUND);

Toggles the sound in the background audio channel. If the sound is on, it will be muted; or if it is muted, it will be turned back on.

Example 2

Audio.ToggleMute(CHANNEL_USER1);

Toggles the sound in user channel 1.


Audio.TogglePlay Examples

Audio.TogglePlay

Audio.TogglePlay (

number Channel )

Example 1

Audio.TogglePlay(CHANNEL_BACKGROUND);

Toggles the sound in the background audio channel. If the sound is on, it will be paused; or if it is paused, it will start to play again.

Example 2

Audio.TogglePlay(CHANNEL_USER1);

Toggles the sound in user channel 1 between playing and paused.


Button.GetPos Examples

Button.GetPos

table Button.GetPos (

string ObjectName )

Example 1

Mustard = Button.GetPos("Mustard Valve");

Gets the current X, Y coordinates of the "Mustard Valve" button object and stores the results in a table called "Mustard." These values can be accessed by referencing Mustard.X and Mustard.Y.


Button.GetProperties Examples

Button.GetProperties

table Button.GetProperties (

string ObjectName )

Example 1

ButtonProperties = Button.GetProperties("Button1");

if ButtonProperties.Cursor == CURSOR_BLACK_ARROW then
-- The black arrow cursor is being used
end

if Button.GetProperties("Button1").FontItalic then
-- The button text is Italic
end

Retrieve various properties from the button object 'Button1'.


Button.GetSize Examples

Button.GetSize

table Button.GetSize (

string ObjectName )

Example 1

button_size = Button.GetSize("Installer");

Gets the pixel dimensions of the "Installer" button object and stores the width and height values in the "button_size" table. The dimensions can be accessed by referencing button_size.Width and button_size.Height.


Button.GetState Examples

Button.GetState

number Button.GetState (

string ObjectName )

Example 1

Mustard = Button.GetState("Mustard Valve");

Gets the current state of the "Mustard Valve" button object and stores the result in Mustard.

Example 2

music_on = Button.GetState("Music Toggle");

Gets the current state of the "Music Toggle" button object and stores the result (0 or 1) in music_on.


Button.GetText Examples

Button.GetText

string Button.GetText (

string ObjectName )

Example 1

bt = Button.GetText("Woohoo");

Gets the text that is on the button called "Woohoo" and stores it in the variable bt.

Example 2

big_butt_text = Button.GetText("Big Button 4");

Gets the text on the "Big Button 4" button object and stores it in big_butt_text.

Example 3

Button.SetText("Button2", Button.GetText("Button1"));

Sets the text on Button2 to be the same as the text on Button1.


Button.IsEnabled Examples

Button.IsEnabled

boolean Button.IsEnabled (

string ObjectName )

Example 1

enabledus_buttonis = Button.IsEnabled("Fake Latin Toggle");

Stores true in enabledus_buttonis if the "Fake Latin Toggle" button object is enabled, and false if it is disabled.

Example 2

bMustardEnabled = Button.IsEnabled("Mustard Valve");

Checks whether the "Mustard Valve" button object is enabled or disabled, and stores true or false in the bMustardEnabled variable accordingly.

Tip: Starting a variable name with "b" is a technique that programmers use to help themselves remember that a variable contains a boolean value.


Button.IsVisible Examples

Button.IsVisible

boolean Button.IsVisible (

string ObjectName )

Example 1

i_see_dead_people = Button.IsVisible("Sixed Cents");

Checks whether the button object called "Sixed Cents" is visible and stores true or false in the variable called i_see_dead_people.

Example 2

lookylooky = Button.IsVisible("Button21");

Stores true in lookylooky if the "Button21" button object is visible or false if it is not.


Button.SetEnabled Examples

Button.SetEnabled

Button.SetEnabled (

string ObjectName,

boolean Enabled = true )

Example 1

Button.SetEnabled("Button4", true);

Enables the button object named "Button4."

Example 2

Button.SetEnabled("My Lovely Little Button", false);

Disables the button named "My Lovely Little Button."


Button.SetPos Examples

Button.SetPos

Button.SetPos (

string ObjectName,

number X,

number Y )

Example 1

Button.SetPos("Set Me", 100, 150 );

Sets the "Set Me" button object's X coordinate to 100 pixels and the Y coordinate to 150.

Example 2

Button.SetPos("Move Me", 0, 0);

Sets the "Move Me" button object's X coordinate to 0 and the Y coordinate to 0. The button object will be moved to the upper left hand corner of the page from it's current position.


Button.SetProperties Examples

Button.SetProperties

Button.SetProperties (

string ObjectName,

table Properties )

Example 1

-- Changes the font size of Button1 to 99 pt
Button.SetProperties("Button1",{FontSize=99});

-- Change the text to "Hello World" and Width to 100
tblProperties = {Text="Hello World",Width=100};
Button.SetProperties("Button1",tblProperties);

Change the font size, text, and width of the button object 'Button1'.


Button.SetSize Examples

Button.SetSize

Button.SetSize (

string ObjectName,

number Width,

number Height )

Example 1

Button.SetSize("Grower", 100, 150 );

Set the "Grower" button object's width to 100 pixels and it's height to 150 pixels.

Example 2

Button.SetSize("Expand", Button.GetSize("Expand").Width + 200, Button.GetSize("Expand").Height + 100);

Increases the"Expand" button object's current width by 200 pixels and it's current height by 100 pixels. The Button.GetSize action is used here to get the current size of the button object.


Button.SetState Examples

Button.SetState

Button.SetState (

string ObjectName,

number State = BTN_UP )

Example 1

Button.SetState("ToggleButton1", BTN_DOWN);

Sets the "ToggleButton1" button object to the down state.

Example 2

Button.SetState("Homer Donut 3", BTN_UP);

Sets the "Homer Donut 3" button object to the up state.


Button.SetText Examples

Button.SetText

Button.SetText (

string ObjectName,

string Text )

Example 1

Button.SetText("Button1", "Click Here");

Changes the text on the button named "Button1" to "Click Here".

Example 2

Button.SetText("Sound Toggle Button", "Music On");

Changes the text on the button named "Sound Toggle Button" to "Music On".


Button.SetVisible Examples

Button.SetVisible

Button.SetVisible (

string ObjectName,

boolean Visible = true )

Example 1

Button.SetVisible("Button1", false);

Makes the "Button1" button object invisible.

Example 2

Button.SetVisible("LookitMeIAmInvisibleHaHaHAHAHA", true);

Makes the button object called "LookitMeIAmInvisibleHaHaHAHAHA" visible, in spite of its name.

Example 3

Button.SetVisible("Button21")

Makes the button object named "Button21" visible.


CheckBox.GetChecked Examples

CheckBox.GetChecked

boolean CheckBox.GetChecked (

string ObjectName )

Example 1

bChecked = CheckBox.GetChecked("CheckBox1");

Stores true in a variable named "bChecked" if the "CheckBox1" checkbox object is currently checked, and false if it is unchecked.


CheckBox.GetPos Examples

CheckBox.GetPos

table CheckBox.GetPos (

string ObjectName )

Example 1

tbPos = CheckBox.GetPos("Complete Install");

Gets the current X, Y coordinates of the "Complete Install" checkbox object and stores the results in a table called "tbPos." These values can be accessed by referencing tbPos.X and tbPos.Y.


CheckBox.GetProperties Examples

CheckBox.GetProperties

table CheckBox.GetProperties (

string ObjectName )

Example 1

tProperties = CheckBox.GetProperties("CheckBox1");

Gets the properties from the checkbox object 'CheckBox1' and stores them in table 'tProperties'.


CheckBox.GetSize Examples

CheckBox.GetSize

table CheckBox.GetSize (

string ObjectName )

Example 1

check_size = CheckBox.GetSize("CheckBox_Ob");

Gets the pixel dimensions of the "CheckBox_Ob" checkbox object and stores the width and height values in the "check_size" table. The dimensions can be accessed by referencing check_size.Width and check_size.Height.


CheckBox.GetText Examples

CheckBox.GetText

string CheckBox.GetText (

string ObjectName )

Example 1

-- Get the current text from the checkbox
sCurrentText = CheckBox.GetText("CheckBox1");

-- Check to see if any errors occurred calling the CheckBox.GetText action.
-- If any error occurred, display the error message.
error = Application.GetLastError();
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
end

-- Print the current text to the debug window
Debug.Print("CheckBox Text: " .. sCurrentText .. "\r\n");

Gets the current text of the "CheckBox1" checkbox object and outputs it to the debug window.


CheckBox.IsEnabled Examples

CheckBox.IsEnabled

boolean CheckBox.IsEnabled (

string ObjectName )

Example 1

enabled = CheckBox.IsEnabled("CheckBox1");

Stores true in a variable named "enabled" if the "CheckBox1" checkbox object is enabled, and false if it is disabled.

Example 2

b2Enabled = CheckBox.IsEnabled("CheckBox2");

Checks whether the "CheckBox2" checkbox object is enabled or disabled, and sets the "b2Enabled" variable to either true or false accordingly.

Tip: Starting a variable name with "b" is a technique that programmers use to help themselves remember that a variable contains a boolean value.


CheckBox.IsVisible Examples

CheckBox.IsVisible

boolean CheckBox.IsVisible (

string ObjectName )

Example 1

Visible = CheckBox.IsVisible("Check1");

Checks whether the checkbox object called "Check1" is visible and stores true or false in a variable called "Visible."

Example 2

b5isVisible = CheckBox.IsVisible("Check5");

Stores true in "b5isVisible" if the "Check5" checkbox object is visible.

Tip: Starting a variable name with "b" is a technique that programmers use to help themselves remember that a variable contains a boolean value.


CheckBox.SetChecked Examples

CheckBox.SetChecked

CheckBox.SetChecked (

string ObjectName,

boolean Checked = true )

Example 1

CheckBox.SetChecked("CheckBox Two", true);

Checks the checkbox object named "CheckBox Two."

Example 2

CheckBox.SetChecked("Check4", false);

Unchecks the checkbox object named "Check4."


CheckBox.SetEnabled Examples

CheckBox.SetEnabled

CheckBox.SetEnabled (

string ObjectName,

boolean Enabled = true )

Example 1

CheckBox.SetEnabled("CheckBox Two", true);

Enables the checkbox object named "CheckBox Two."

Example 2

CheckBox.SetEnabled("Check4", false);

Disables the checkbox object named "Check4."


CheckBox.SetPos Examples

CheckBox.SetPos

CheckBox.SetPos (

string ObjectName,

number X,

number Y )

Example 1

CheckBox.SetPos("New CheckBox", 100, 150);

Sets the "New CheckBox" checkbox object's X coordinate to 100 pixels and the Y coordinate to 150.

Example 2

CheckBox.SetPos("Move Me", 0, 0);

Sets the "Move Me" checkbox object's X coordinate to 0 and the Y coordinate to 0. The checkbox object will be moved to the upper left hand corner of the page from its current position.


CheckBox.SetProperties Examples

CheckBox.SetProperties

CheckBox.SetProperties (

string ObjectName,

table Properties )

Example 1

-- Create a table containing items to change.
tbProperties = {};
tbProperties.ButtonAlignment = BTN_ALIGN_RIGHT;

-- Set the properties of a checkbox object.
CheckBox.SetProperties("CheckBoxOne", tbProperties);

Sets the properties of the checkbox object 'CheckBoxOne' to the properties contained in the table 'tbProperties'.


CheckBox.SetSize Examples

CheckBox.SetSize

CheckBox.SetSize (

string ObjectName,

number Width,

number Height )

Example 1

CheckBox.SetSize("Grower", 300, 15);

Sets the "Grower" checkbox object's width to 300 pixels and it's height to 15 pixels.

Example 2

CheckBox.SetSize("Expand", CheckBox.GetSize("Expand").Width + 200, CheckBox.GetSize("Expand").Height + 10);

Increases the "Expand" checkbox object's current width by 200 pixels and it's current height by 10 pixels. The CheckBox.GetSize action is used here to get the current size of the checkbox object.


CheckBox.SetText Examples

CheckBox.SetText

CheckBox.SetText (

string ObjectName,

string Text )

Example 1

CheckBox.SetText("CheckBoxOne", "New CheckBox Text");

Sets the text of the checkbox object named "CheckBoxOne" to "New CheckBox Text."


CheckBox.SetVisible Examples

CheckBox.SetVisible

CheckBox.SetVisible (

string ObjectName,

boolean Visible = true )

Example 1

CheckBox.SetVisible("Check3", true);

Makes the "Check3" checkbox object visible.

Example 2

CheckBox.SetVisible("Intro", false);

Hides the checkbox object named "Intro."

Example 3

CheckBox.SetVisible("Custom12");

Makes the checkbox object named "Custom12" visible.


ComboBox.AddItem Examples

ComboBox.AddItem

number ComboBox.AddItem (

string ObjectName,

string Text,

string Data = "" )

Example 1

-- Adds a new item with item text "Item One" and no associated data to the
-- combobox object called "ComboBox1".
ComboBox.AddItem("ComboBox1", "Item One", "");

-- Check to see if any errors occurred calling the ComboBox.AddItem action.
-- If any error occurred, display the error message.
error = Application.GetLastError();
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
end

-- Adds a new item with item text "Item Two" and associated data "C:\\Two.txt"
-- to the combobox object called "ComboBox1".
ComboBox.AddItem("ComboBox1", "Item Two", "C:\\Two.txt");

-- Check to see if any errors occurred calling the ComboBox.AddItem action.
-- If any error occurred, display the error message.
error = Application.GetLastError();
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
end

Adds two items to a ComboBox object "ComboBox1" and checks for errors.


ComboBox.DeleteItem Examples

ComboBox.DeleteItem

ComboBox.DeleteItem (

string ObjectName,

number Item )

Example 1

-- Removes the item at index 1 from the "ComboBox1" combobox object.
ComboBox.DeleteItem("ComboBox1", 1);

-- Check to see if any errors occurred calling the ComboBox.DeleteItem action.
-- If any error occurred, display the error message.
error = Application.GetLastError();
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
end

Deletes an item from the combobox object named ComboBox1 and checks for an error.


ComboBox.FindItem Examples

ComboBox.FindItem

number ComboBox.FindItem (

string ObjectName,

number StartAfter,

number SearchType,

string SearchText )

Example 1

-- Add four new items to the "SelectDropdown" combobox object.
ComboBox.AddItem("SelectDropdown", "Item One", "C:\\One.txt");
ComboBox.AddItem("SelectDropdown", "Item Two", "C:\\Two.txt");
ComboBox.AddItem("SelectDropdown", "Item OneThree", "C:\\OneThree.txt");
ComboBox.AddItem("SelectDropdown", "Item Four", "C:\\Four.txt");

-- Search all items for any item text containing the text "One" and return its index.
search_result = ComboBox.FindItem("SelectDropdown", -1, LB_BYTEXT, "*One*");

-- Check to see if any items were found.
if (search_result ~= -1) then
-- Display its index in a dialog.
Dialog.Message("First Item Found", "The first item found was at index "..search_result, MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);

-- Search for the next item that contains the text "One".
search_result = ComboBox.FindItem("SelectDropdown", search_result, LB_BYTEXT, "*One*");

-- If another item was found, display a dialog message.
if (search_result ~= -1) then
-- Display its index in a dialog.
Dialog.Message("Second Item Found", "The first item found was at index "..search_result, MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
end

-- If no items were found, notify the user.
else
Dialog.Message("None Found", "There were no items found fitting the search criteria.", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
end

-- Search all items for the first item whose item data is "C:\OneThree.txt".
search_result = ComboBox.FindItem("SelectDropdown", -1, LB_BYDATA, "C:\\OneThree.txt");

-- If an item was found, display its index. If it wasn't, inform the user.
if (search_result ~= -1) then
Dialog.Message("First Item Data Found", "The first item data found was at index "..search_result, MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
else
Dialog.Message("None Found", "There waw no item data found fitting the search criteria.", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
end

Searches combobox "SelectDropdown" for various items and processes the results.


ComboBox.GetCount Examples

ComboBox.GetCount

number ComboBox.GetCount (

string ObjectName )

Example 1

-- Get the number of items currently in the "ComboBox1" combobox object.
num_items = ComboBox.GetCount("ComboBox1");

-- Display the number of items in the combobox.
Dialog.Message("Item Count", "There are currently "..num_items.." items in the combobox.", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);

-- Add four new items to the "ComboBox1" combobox object.
ComboBox.AddItem("ComboBox1", "Item One", "C:\\One.txt");
ComboBox.AddItem("ComboBox1", "Item Two", "C:\\Two.txt");
ComboBox.AddItem("ComboBox1", "Item OneThree", "C:\\OneThree.txt");
ComboBox.AddItem("ComboBox1", "Item Four", "C:\\Four.txt");

-- Get the number of items currently in the "ComboBox1" combobox object.
num_items = ComboBox.GetCount("ComboBox1");

-- Display the number of items in the combobox.
Dialog.Message("Item Count", "There are currently "..num_items.." items in the combobox.", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);

Gets the number of items in combobox object "ComboBox1" and displays the result to the user. Four objects are then added, and the count is retrieved again.


ComboBox.GetItemData Examples

ComboBox.GetItemData

string ComboBox.GetItemData (

string ObjectName,

number Index )

Example 1

-- Adds a new item with item text "Item One" and associated data "C:\\One.txt"
-- to the combobox object called "ComboBox1".
ComboBox.AddItem("ComboBox1", "Item One", "C:\\One.txt");

-- Check to see if any errors occurred calling the ComboBox.AddItem action.
-- If any error occurred, display the error message.
error = Application.GetLastError();
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
end

-- Gets the item data of the first item in the combobox object.
item_data = ComboBox.GetItemData("ComboBox1", 1);

-- If the item has item data, display its contents, otherwise notify that there was none.
if (item_data ~= "") then
Dialog.Message("Item Data", "The item data in index 1 is "..item_data, MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
else
Dialog.Message("Item Data", "There is no item data at index 1.", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
end

Adds an item to the combobox object "ComboBox1", and then retrieves the data from the added item. The retrieved data is displayed to the user.


ComboBox.GetItemText Examples

ComboBox.GetItemText

string ComboBox.GetItemText (

string ObjectName,

number Index )

Example 1

-- Add two new items to the "ComboBox1" combobox object.
ComboBox.AddItem("ComboBox1", "Item One", "C:\\One.txt");
ComboBox.AddItem("ComboBox1", "Item Two", "C:\\Two.txt");

-- Get the item text of the second item in the combobox object.
item_text = ComboBox.GetItemText("ComboBox1", 2);

-- If the item is valid display a dialog message. Otherwise display a notification.
if (item_text ~= "") then
Dialog.Message("Item Text", "The item text is '"..item_text.."'.", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
else
Dialog.Message("Item Text", "The item does not contain any item text.", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
end

Adds two items to the combobox object "ComboBox1", retrieves the text from the second item, and displays it to the user.


ComboBox.GetPos Examples

ComboBox.GetPos

table ComboBox.GetPos (

string ObjectName )

Example 1

Mustard = ComboBox.GetPos("Mustard");

Gets the current X, Y coordinates of the "Mustard" combobox object and stores the results in a table called "Mustard." These values can be accessed by referencing Mustard.X and Mustard.Y.


ComboBox.GetProperties Examples

ComboBox.GetProperties

table ComboBox.GetProperties (

string ObjectName )

Example 1

-- Retrieve the tooltip text
sTooltipText = ComboBox.GetProperties("Combo1").TooltipText;

-- Display result to user
Dialog.Message("ToolTip Text", sTooltipText);

Gets the tooltip text from the combobox object 'Combo1' and displays it to the user in a pop-up dialog.


ComboBox.GetSelected Examples

ComboBox.GetSelected

number ComboBox.GetSelected (

string ObjectName )

Example 1

-- Add four new items to the "ComboBox1" combobox object.
ComboBox.AddItem("ComboBox1", "Item One", "C:\\One.txt");
ComboBox.AddItem("ComboBox1", "Item Two", "C:\\Two.txt");
ComboBox.AddItem("ComboBox1", "Item OneThree", "C:\\OneThree.txt");
ComboBox.AddItem("ComboBox1", "Item Four", "C:\\Four.txt");

-- Gets the index of the selected item.
selected_index = ComboBox.GetSelected("ComboBox1");

-- If an item is selected, display it's index, otherwise display a notification message.
if (selected_index ~= -1) then
Dialog.Message("Selected Index","The currently selected item has an index of "..selected_index, MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
else
Dialog.Message("Selected Index","No items are currently selected.", MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
end

Adds four items to the combobox object "ComboBox1" and displays the index of the currently selected item to the user.


ComboBox.GetSize Examples

ComboBox.GetSize

table ComboBox.GetSize (

string ObjectName )

Example 1

combobox_size = ComboBox.GetSize("Installer");

Gets the pixel dimensions of the "Installer" combobox object and stores the width and height values in the "combobox_size" table. The dimensions can be accessed by referencing combobox_size.Width and combobox_size.Height.


ComboBox.GetText Examples

ComboBox.GetText

string ComboBox.GetText (

string ObjectName )

Example 1

-- Get the text of the item currently in the combobox.
combo_text = ComboBox.GetText("ComboBox1");

-- If there is text in the combobox, display a message with its text.
-- If no item is displayed in the combobox, notify the user.
if (combo_text ~= "") then
Dialog.Message("ComboBox Text", "The current text in the combobox is '"..combo_text.."'.", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
else
Dialog.Message("ComboBox Text", "Currently no text is displayed in the combobox.", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
end

Gets the currently displayed text from the combobox object "ComboBox1" and displays it to the user.


ComboBox.InsertItem Examples

ComboBox.InsertItem

number ComboBox.InsertItem (

string ObjectName,

number Index,

string Text,

string Data = "" )

Example 1

-- Add two new items to the "ComboBox1" combobox object.
ComboBox.AddItem("ComboBox1", "Item One", "C:\\One.txt");
ComboBox.AddItem("ComboBox1", "Item Two", "C:\\Two.txt");

-- Insert a new item into the combobox at index 2.
ComboBox.InsertItem("ComboBox1", 2, "New Item", "New Data");

-- Check to see if any errors occurred calling the ComboBox.InsertItem action.
-- If any error occurred, display the error message.
error = Application.GetLastError();
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
end

Adds two items to the combobox object "ComboBox1", then inserts a third item at index 2.


ComboBox.IsEnabled Examples

ComboBox.IsEnabled

boolean ComboBox.IsEnabled (

string ObjectName )

Example 1

enabledus_comboboxis = ComboBox.IsEnabled("Fake Latin Toggle");

Stores true in enabledus_comboboxis if the "Fake Latin Toggle" combobox object is enabled, and false if it is disabled.

Example 2

bMustardEnabled = ComboBox.IsEnabled("Mustard");

Checks whether the "Mustard" combobox object is enabled or disabled, and stores true or false in the bMustardEnabled variable accordingly.

Tip: Starting a variable name with "b" is a technique that programmers use to help themselves remember that a variable contains a boolean value.


ComboBox.IsVisible Examples

ComboBox.IsVisible

boolean ComboBox.IsVisible (

string ObjectName )

Example 1

i_see_dead_people = ComboBox.IsVisible("Sixed Cents");

Checks whether the combobox object called "Sixed Cents" is visible and stores true or false in the variable called i_see_dead_people.

Example 2

lookylooky = ComboBox.IsVisible("ComboBox21");

Stores true in lookylooky if the "ComboBox21" combobox object is visible or false if it is not.


ComboBox.ResetContent Examples

ComboBox.ResetContent

ComboBox.ResetContent (

string ObjectName )

Example 1

-- Clears all items from the "ComboBox1" combobox object.
ComboBox.ResetContent("ComboBox1");

Clears all items from the "ComboBox1" combobox object.


ComboBox.SetEnabled Examples

ComboBox.SetEnabled

ComboBox.SetEnabled (

string ObjectName,

boolean Enabled = true )

Example 1

ComboBox.SetEnabled("ComboBox4", true);

Enables the combobox object named "ComboBox4."

Example 2

ComboBox.SetEnabled("My Lovely Little ComboBox", false);

Disables the combobox named "My Lovely Little ComboBox."


ComboBox.SetItemData Examples

ComboBox.SetItemData

ComboBox.SetItemData (

string ObjectName,

number Index,

string Data )

Example 1

-- Adds a new item with item text "Item One" and associated data "C:\\One.txt"
-- to the combobox object called "ComboBox1".
ComboBox.AddItem("ComboBox1", "Item One", "C:\\One.txt");-- Check to see if any errors occurred calling the ComboBox.AddItem action.

-- If any error occurred, display the error message.
error = Application.GetLastError();
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION,MB_DEFBUTTON1);
end

-- Gets the item data of the first item in the combobox object.
item_data = ComboBox.GetItemData("ComboBox1", 1);

-- If the item has item data, display its contents, otherwise notify that there was none.
if (item_data ~= "") then
Dialog.Message("Item Data", "The item data in index 1 is "..item_data, MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
else
Dialog.Message("Item Data", "There is no item data at index 1.", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
end

-- Set the item data of the item at index 1 to "New Data".
ComboBox.SetItemData("ComboBox1", 1, "New Data");

-- Check to see if any errors occurred calling the ComboBox.SetItemData action.
-- If any error occurred, display the error message.
error = Application.GetLastError();
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
end

-- Gets the item data of the first item in the combobox object.
item_data = ComboBox.GetItemData("ComboBox1", 1);

-- If the item has item data, display its contents, otherwise notify that there was none.
if (item_data ~= "") then
Dialog.Message("New Item Data", "The new item data in index 1 is "..item_data, MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
else
Dialog.Message("Item Data", "There is no item data at index 1.", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
end

Adds an item to the combobox object "ComboBox1" and manipulates the item's data.


ComboBox.SetItemText Examples

ComboBox.SetItemText

ComboBox.SetItemText (

string ObjectName,

number Index,

string Text )

Example 1

-- Adds a new item with item text "Item One" and associated data "C:\\One.txt"
-- to the combobox object called "ComboBox1".
ComboBox.AddItem("ComboBox1", "Item One", "C:\\One.txt");

-- Check to see if any errors occurred calling the ComboBox.AddItem action.
-- If any error occurred, display the error message.
error = Application.GetLastError();
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
end

-- Gets the item text of the first item in the combobox object.
item_text = ComboBox.GetItemText("ComboBox1", 1);

-- If the item has item text, display its contents, otherwise notify that there was none.
if (item_text ~= "") then
Dialog.Message("Item Text", "The item text in index 1 is "..item_text, MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
else
Dialog.Message("Item Text", "There is no item text at index 1.", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
end

-- Set the item data of the item at index 1 to "New Data".
ComboBox.SetItemText("ComboBox1", 1, "New Item Text");

-- Check to see if any errors occurred calling the ComboBox.SetItemText action.
-- If any error occurred, display the error message.
error = Application.GetLastError();

if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
end

-- Gets the item text of the first item in the combobox object.
item_text = ComboBox.GetItemText("ComboBox1", 1);

-- If the item has item text, display its contents, otherwise notify that there was none.
if (item_text ~= "") then
Dialog.Message("New Item Text", "The new item text in index 1 is "..item_text, MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
else
Dialog.Message("Item Text", "There is no item text at index 1.", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
end

Adds an item to the combobox object "ComboBox1" and manipulates the item's text.


ComboBox.SetPos Examples

ComboBox.SetPos

ComboBox.SetPos (

string ObjectName,

number X,

number Y )

Example 1

ComboBox.SetPos("Set Me", 100, 150 );

Sets the "Set Me" combobox object's X coordinate to 100 pixels and the Y coordinate to 150.

Example 2

ComboBox.SetPos("Move Me", 0, 0);

Sets the "Move Me" combobox object's X coordinate to 0 and the Y coordinate to 0. The combobox object will be moved to the upper left hand corner of the page from it's current position.


ComboBox.SetProperties Examples

ComboBox.SetProperties

ComboBox.SetProperties (

string ObjectName,

table Properties )

Example 1

ComboBox.SetProperties("Combo1", {TooltipText="I am a tooltip!"});

Sets the tooltip text of combobox 'Combo1' to 'I am a tooltip!'.


ComboBox.SetSelected Examples

ComboBox.SetSelected

ComboBox.SetSelected (

string ObjectName,

number Index )

Example 1

-- Add two new items to the "ComboBox1" combobox object.
ComboBox.AddItem("ComboBox1", "Item One", "C:\\One.txt");
ComboBox.AddItem("ComboBox1", "Item Two", "C:\\Two.txt");

-- Set the combobox selection to the item at index 2.
ComboBox.SetSelected("ComboBox1", 2);

-- Check to see if any errors occurred calling the ComboBox.SetSelected action.
-- If any error occurred, display the error message.
error = Application.GetLastError();
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
end

Adds two items to the combobox "ComboBox1" and selects the second one.


ComboBox.SetSize Examples

ComboBox.SetSize

ComboBox.SetSize (

string ObjectName,

number Width )

Example 1

ComboBox.SetSize("Grower", 100 );

Set the "Grower" combobox object's width to 100 pixels.

Example 2

ComboBox.SetSize("Expand", ComboBox.GetSize("Expand").Width + 200);

Increases the"Expand" combobox object's current width by 200 pixels. The ComboBox.GetSize action is used here to get the current width of the combobox object.


ComboBox.SetText Examples

ComboBox.SetText

ComboBox.SetText (

string ObjectName,

string Text )

Example 1

-- Add two new items to the "ComboBox1" combobox object.
ComboBox.AddItem("ComboBox1", "Item One", "C:\\One.txt");
ComboBox.AddItem("ComboBox1", "Item Two", "C:\\Two.txt");

-- Sets the displayed text in the combobox object.
ComboBox.SetText("ComboBox1", "New Text");

-- Check to see if any errors occurred calling the ComboBox.SetText action.
-- If any error occurred, display the error message.
error = Application.GetLastError();
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
end

Adds two items to the combobox object "ComboBox1" and then changes the displayed text.


ComboBox.SetUpdate Examples

ComboBox.SetUpdate

ComboBox.SetUpdate (

string ObjectName,

boolean Enabled = true )

Example 1

-- Sets the update state to false.
ComboBox.SetUpdate("ComboBox1", false);

-- Add four new items to the "ComboBox1" combobox object.
ComboBox.AddItem("ComboBox1", "Item One", "C:\\One.txt");
ComboBox.AddItem("ComboBox1", "Item Two", "C:\\Two.txt");
ComboBox.AddItem("ComboBox1", "Item OneThree", "C:\\OneThree.txt");
ComboBox.AddItem("ComboBox1", "Item Four", "C:\\Four.txt");

-- Now that the items have been added, set the update state to true.
ComboBox.SetUpdate("ComboBox1", true);

Disables updating for combobox object "ComboBox1", adds for items, and enables updating.


ComboBox.SetVisible Examples

ComboBox.SetVisible

ComboBox.SetVisible (

string ObjectName,

boolean Visible = true )

Example 1

ComboBox.SetVisible("ComboBox1", false);

Makes the "ComboBox1" combobox object invisible.

Example 2

ComboBox.SetVisible("LookitMeIAmInvisibleHaHaHAHAHA", true);

Makes the combobox object called "LookitMeIAmInvisibleHaHaHAHAHA" visible, in spite of its name.

Example 3

ComboBox.SetVisible("ComboBox21")

Makes the combobox object named "ComboBox21" visible.


Crypto.Base64DecodeFromFile Examples

Crypto.Base64DecodeFromFile

Crypto.Base64DecodeFromFile (

string Source,

string Destination )

Example 1

-- Decodes a base64-encoded text file located in the the user's Temp folder and stores the result as a binary file.
-- The base-64-encoded text file was previously encoded using the Crypto.Base64EncodeToFile action.
Crypto.Base64DecodeFromFile(_TempFolder .."\\myfile_encoded.txt", _TempFolder .."\\myfile_decoded.txt");

-- Check to see if an error occurred in the Crypto.Base64DecodeFromFile action.
-- If an error occurred, display the error message.
error = Application.GetLastError();
if (error ~=0) then
result = Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
end

Decodes a base64-encoded text file located in the user's Temp folder and stores the result as a binary file.


Crypto.Base64DecodeFromString Examples

Crypto.Base64DecodeFromString

Crypto.Base64DecodeFromString (

string Text,

string Filename )

Example 1

-- base64-encodes a small binary file and store the result in encoded_string
encoded_string = Crypto.Base64EncodeToString("C:\\myfile.exe");

-- Check to see if an error occurred using the Crypto.Base64EncodeToString action.
error = Application.GetLastError();
if (error ~=0) then
result = Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
end

-- Display the contents of the string, just to show you what it looks like.
Dialog.Message("This is what the encoded string looks like:", encoded_string);

-- Decode the base64-encoded string and store the result as a binary file.
Crypto.Base64DecodeFromString(encoded_string, _TempFolder.."\\myfile_decoded_string.txt");

-- Check to see if an error occurred using the Crypto.Base64DecodeFromString action.
error = Application.GetLastError();
if (error ~=0) then
result = Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
end

Base64 encodes a binary file and stores the result in a string. The string is then decoded and shown in a dialog message.


Crypto.Base64EncodeToFile Examples

Crypto.Base64EncodeToFile

Crypto.Base64EncodeToFile (

string Source,

string Destination,

number LineLen = 76 )

Example 1

-- Takes a binary file located in the user's Temp folder and stores the result as a base64-encoded text file,
-- also located in the user's Temp folder.
-- This file can then be decoded using the Crypto.Base64DecodeFromFile action.
Crypto.Base64EncodeToFile(_TempFolder.."\\myfile.txt", _TempFolder.."\\myfile_encoded.txt");

-- Check to see if an error occurred in the Crypto.Base64EncodeToFile action.
-- If an error occurred, display the error message.
error = Application.GetLastError();
if (error ~=0) then
result = Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
end

Takes a binary file located in the user's Temp folder and stores the result as a base64-encoded text file, also located in the user's Temp folder.


Crypto.Base64EncodeToString Examples

Crypto.Base64EncodeToString

string Crypto.Base64EncodeToString (

string Source,

number LineLen = 76 )

Example 1

-- Returns the contents of a small binary file as a base64-encoded string.
encoded_string = Crypto.Base64EncodeToString("C:\\MyFolder\\myfile.txt");

-- Check to see if an error occurred using the Crypto.Base64EncodeToString action.
error = Application.GetLastError();
if (error ~=0) then
result = Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
end
-- Display the contents of the string, just to show you what it looks like.
Dialog.Message("This is what the encoded string looks like:", encoded_string);

-- Decode the base64-encoded string and store the result as a binary file.
Crypto.Base64DecodeFromString(encoded_string, _TempFolder.."\\myfile_decoded_string.txt");

-- Check to see if an error occurred using the Crypto.Base64DecodeFromString action.
error = Application.GetLastError();
if (error ~=0) then
result = Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
end

Encodes the contents of a small binary file as a base64-encoded string and shows what it looks like using a dialog message. The string is then decoded to a text file in the user's temp folder.


Crypto.BlowfishDecrypt Examples

Crypto.BlowfishDecrypt

Crypto.BlowfishDecrypt (

string Source,

string Destination,

string Key )

Example 1

-- Create a blowfish-encrypted copy of a text file in the user's temp folder
Crypto.BlowfishEncrypt(_TempFolder.."\\myfile.txt", _TempFolder.."\\myfile_blowfished.txt", "trustno1withthispassword");

-- Check if any errors occurred from calling the Crypto.BlowfishEncrypt action.
-- If an error occurred, display it's error message in a dialog message.
error = Application.GetLastError();
if (error ~=0) then
Dialog.Message("Error", _tblErrorMessages[error] , MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
end

-- Decrypts the blowfish-encrypted file.
Crypto.BlowfishDecrypt(_TempFolder.."\\myfile_blowfished.txt", _TempFolder.."\\myfile_blowfish_decrypted.txt", "trustno1withthispassword");

-- Check if any errors occurred from calling the Crypto.BlowfishDecrypt action.
-- If an error occurred, display it's error message in a dialog message.
error = Application.GetLastError();
if (error ~=0) then
Dialog.Message("Error", _tblErrorMessages[error] , MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
end

-- Open the decrypted file to see its contents.
File.Open(_TempFolder.."\\myfile_blowfish_decrypted.txt");

Creates a blowfish-encrypted copy of a text file in the user's temp folder and then decrypts and opens the file.


Crypto.BlowfishDecryptString Examples

Crypto.BlowfishDecryptString

string Crypto.BlowfishDecryptString (

string Text,

string Key )

Example 1

sDecryptedString = Crypto.BlowfishDecryptString(sEncryptedString, sKey);

Decrypts the string 'sEncryptedString' using the key stored in 'sKey' and stores the decrypted string in the variable 'sDecryptedString'.

Example 2

-- Initialize Registration/Access variables
bRegistrationRequired = true;
bAllowAccess = false;

-- Initialize registry action variables
nMainKey = HKEY_CURRENT_USER;
sSubKey = "SOFTWARE\\Your_Product\\Registration";
sUserNameValue = "UserName";
sSerialValue = "Serial";
sMD5CheckValue = "CheckKey";
sRegisterKeyValue = "RegKey";
bAutoExpand = true;

-- if the user's registration info was stored in the Windows Registry
-- (in the form of blowfish-encrypted strings), decrypt it
if Registry.DoesKeyExist(nMainKey, sSubKey) then
-- Key exists, pull values from registry
sUserName = Registry.GetValue(nMainKey, sSubKey, sUserNameValue, bAutoExpand);
sSerial = Registry.GetValue(nMainKey, sSubKey, sSerialValue, bAutoExpand);
sMD5Check = Registry.GetValue(nMainKey, sSubKey, sMD5CheckValue, bAutoExpand);
sRegisterKey = Registry.GetValue(nMainKey, sSubKey, sRegisterKeyValue, bAutoExpand);

if (sUserName ~= "") and (sSerial ~= "") and (sMD5Check) and (sRegisterKey ~= "") then
-- All four values are present, perform check
sUserNameDecrypted = Crypto.BlowfishDecryptString(sUserName, sRegisterKey);
sSerialDecrypted = Crypto.BlowfishDecryptString(sSerial, sRegisterKey);

if (Crypto.MD5DigestFromString(sUserNameDecrypted) .. Crypto.MD5DigestFromString(sSerialDecrypted)) == sMD5Check then
-- MD5 check passed, we don't need to register
bRegistrationRequired = false;
-- allow access
bAccessAllowed = true;
end
end
end

if bRegistrationRequired then
-- Registration is required
sUserName = Dialog.Input("UserName", "Please enter your username:");
if sUserName ~= "CANCEL" and sUserName ~= "" then
-- User didn't press cancel, get serial
sSerial = Dialog.Input("UserName", "Please enter your serial number:");

if sSerial ~= "CANCEL" and sSerial ~= "" then
-- user didn't press cancel, continue.

-- get install date time in format JULIANsecondsMINUTEShours
sInstallDateTime = System.GetDate(DATE_FMT_JULIAN) .. System.GetTime(TIME_FMT_SEC) ..System.GetTime(TIME_FMT_MIN) .. System.GetTime(TIME_FMT_HOUR);

-- Generate HTTP Submit variables
sURL = "http://www.yourdomain.com/register_app.php"
tSubmitTable = {user = sUserName, serial = sSerial, installed = sInstallDateTime};
nMethod = SUBMITWEB_POST;
nTimeout = 20;
nPort = 80;
tAuth = nil;
tProxy = nil;

-- Submit to web (structure of returned string: UserNameMD5SerialMD5::Key)
sReturnedData = HTTP.Submit(sURL, tSubmitTable, nMethod, nTimeout, nPort, tAuthData, tProxyData);

if sReturnedData == "-1" or sReturnedData == "" then
-- An error occured, deny access
bAccessAllowed = false;
else
-- No error occured, cut apart string
nDelimiterPosition = String.Find(sReturnedData, "::", 1, false);
-- Get everything before the ::
sMD5Check = String.Mid(sReturnedData, 1, nDelimiterPosition - 1);

-- Get everything after the ::
sKey = String.Mid(sReturnedData, nDelimiterPosition + 2, -1);

-- Assign the registry values
Registry.SetValue(nMainKey, sSubKey, sUserNameValue, Crypto.BlowfishEncryptString(sUserName, sKey), REG_SZ);
Registry.SetValue(nMainKey, sSubKey, sSerialValue, Crypto.BlowfishEncryptString(sSerial, sKey), REG_SZ);
Registry.SetValue(nMainKey, sSubKey, sMD5CheckValue, sMD5Check, REG_SZ);
Registry.SetValue(nMainKey, sSubKey, sRegisterKeyValue, sKey, REG_SZ);

-- set register variable to false (so the user isn't prompted to enter info again)
bRegistrationRequired = false;
-- display thank-you message
Dialog.Message("SUCCESS!", "Thank-you for registering. Enjoy the product!");

-- allow access
bAccessAllowed = true;
end
else
-- Cancel was pressed, deny access
bAccessAllowed = false;
end
else
-- Cancel was pressed, deny access
bAccessAllowed = false;
end
end

if not bAccessAllowed then
Dialog.Message("ERROR", "Invalid registration information provided.", MB_OK, MB_ICONSTOP);
Application.Exit();
end

Reads information from the registry and decrypts it. If the information does not exist, the above script will interact with a web-based php script (http://www.yourdomain.com/register_app.php) to verify a serial number. For this example, the following php script will function:

<?
// Check for post data
if ($_POST)
{
// Initialize user array in format "Username"=>"Serial"
$user_array = array(
"John Doe"=>"abc-def-ghi",
"Jane Smith"=>"123-456-789"
);

// Get info from post variables
$user = $_POST['user'];
$serial = $_POST['serial'];
$installed = $_POST['installed'];

// Step through the user array
foreach($user_array as $username=>$serialnumber)
{
// Compare current item to the posted information
if(($user==$username) AND ($serial==$serialnumber))
{
// The current user matched, return info and exit
echo md5($user).md5($serial).'::'.$installed;
exit;
}
}

// If this script makes it this far, nothing matched, return error code
echo -1;
}
else
{
// no post data was sent, return error code
echo -1;
}
?>

Note: The above php script must be hosted on a PHP-enabled web host, and be called from your application using either an HTTP.Submit or an HTTP.SubmitSecure action.


Crypto.BlowfishEncrypt Examples

Crypto.BlowfishEncrypt

Crypto.BlowfishEncrypt (

string Source,

string Destination,

string Key )

Example 1

-- Create a blowfish-encrypted copy of a text file in the user's temp folder
Crypto.BlowfishEncrypt(_TempFolder.."\\myfile.txt", _TempFolder.."\\myfile_blowfished.txt", "trustno1withthispassword");

-- Check if any errors occurred from calling the Crypto.BlowfishEncrypt action.
-- If an error occurred, display it's error message in a dialog message.
error = Application.GetLastError();
if (error ~=0) then
Dialog.Message("Error", _tblErrorMessages[error] , MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
end

-- Open the encrypted file to see its contents.
File.Open(_TempFolder.."\\myfile_blowfished.txt");

Creates a blowfish-encrypted copy of a text file in the user's temp folder and then opens that file in the user's default text editor.


Crypto.BlowfishEncryptString Examples

Crypto.BlowfishEncryptString

string Crypto.BlowfishEncryptString (

string Text,

string Key,

number LineLen = 0 )

Example 1

sEncryptedString = Crypto.BlowfishEncryptString(sTextToEncrypt, sSecretKey);

Encrypts the text stored in 'sTextToEncrypt' with the key stored in 'sSecretKey', and stores the result in 'sEncryptedString'.

Example 2

-- Initialize Registration/Access variables
bRegistrationRequired = true;
bAllowAccess = false;

-- Initialize registry action variables
nMainKey = HKEY_CURRENT_USER;
sSubKey = "SOFTWARE\\Your_Product\\Registration";
sUserNameValue = "UserName";
sSerialValue = "Serial";
sMD5CheckValue = "CheckKey";
sRegisterKeyValue = "RegKey";
bAutoExpand = true;

-- if the user's registration info was stored in the Windows Registry
-- (in the form of blowfish-encrypted strings), decrypt it
if Registry.DoesKeyExist(nMainKey, sSubKey) then
-- Key exists, pull values from registry
sUserName = Registry.GetValue(nMainKey, sSubKey, sUserNameValue, bAutoExpand);
sSerial = Registry.GetValue(nMainKey, sSubKey, sSerialValue, bAutoExpand);
sMD5Check = Registry.GetValue(nMainKey, sSubKey, sMD5CheckValue, bAutoExpand);
sRegisterKey = Registry.GetValue(nMainKey, sSubKey, sRegisterKeyValue, bAutoExpand);

if (sUserName ~= "") and (sSerial ~= "") and (sMD5Check) and (sRegisterKey ~= "") then
-- All four values are present, perform check
sUserNameDecrypted = Crypto.BlowfishDecryptString(sUserName, sRegisterKey);
sSerialDecrypted = Crypto.BlowfishDecryptString(sSerial, sRegisterKey);

if (Crypto.MD5DigestFromString(sUserNameDecrypted) .. Crypto.MD5DigestFromString(sSerialDecrypted)) == sMD5Check then
-- MD5 check passed, we don't need to register
bRegistrationRequired = false;
-- allow access
bAccessAllowed = true;
end
end
end

if bRegistrationRequired then
-- Registration is required
sUserName = Dialog.Input("UserName", "Please enter your username:");
if sUserName ~= "CANCEL" and sUserName ~= "" then
-- User didn't press cancel, get serial
sSerial = Dialog.Input("UserName", "Please enter your serial number:");

if sSerial ~= "CANCEL" and sSerial ~= "" then
-- user didn't press cancel, continue.

-- get install date time in format JULIANsecondsMINUTEShours
sInstallDateTime = System.GetDate(DATE_FMT_JULIAN) .. System.GetTime(TIME_FMT_SEC) ..System.GetTime(TIME_FMT_MIN) .. System.GetTime(TIME_FMT_HOUR);

-- Generate HTTP Submit variables
sURL = "http://www.yourdomain.com/register_app.php"
tSubmitTable = {user = sUserName, serial = sSerial, installed = sInstallDateTime};
nMethod = SUBMITWEB_POST;
nTimeout = 20;
nPort = 80;
tAuth = nil;
tProxy = nil;

-- Submit to web (structure of returned string: UserNameMD5SerialMD5::Key)
sReturnedData = HTTP.Submit(sURL, tSubmitTable, nMethod, nTimeout, nPort, tAuthData, tProxyData);

if sReturnedData == "-1" or sReturnedData == "" then
-- An error occured, deny access
bAccessAllowed = false;
else
-- No error occured, cut apart string
nDelimiterPosition = String.Find(sReturnedData, "::", 1, false);
-- Get everything before the ::
sMD5Check = String.Mid(sReturnedData, 1, nDelimiterPosition - 1);

-- Get everything after the ::
sKey = String.Mid(sReturnedData, nDelimiterPosition + 2, -1);

-- Assign the registry values
Registry.SetValue(nMainKey, sSubKey, sUserNameValue, Crypto.BlowfishEncryptString(sUserName, sKey), REG_SZ);
Registry.SetValue(nMainKey, sSubKey, sSerialValue, Crypto.BlowfishEncryptString(sSerial, sKey), REG_SZ);
Registry.SetValue(nMainKey, sSubKey, sMD5CheckValue, sMD5Check, REG_SZ);
Registry.SetValue(nMainKey, sSubKey, sRegisterKeyValue, sKey, REG_SZ);

-- set register variable to false (so the user isn't prompted to enter info again)
bRegistrationRequired = false;
-- display thank-you message
Dialog.Message("SUCCESS!", "Thank-you for registering. Enjoy the product!");

-- allow access
bAccessAllowed = true;
end
else
-- Cancel was pressed, deny access
bAccessAllowed = false;
end
else
-- Cancel was pressed, deny access
bAccessAllowed = false;
end
end

if not bAccessAllowed then
Dialog.Message("ERROR", "Invalid registration information provided.", MB_OK, MB_ICONSTOP);
Application.Exit();
end

Reads information from the registry and decrypts it. If the information does not exist, the above script will interact with a web-based php script (http://www.yourdomain.com/register_app.php) to verify a serial number. For this example, the following php script will function:

<?
// Check for post data
if ($_POST)
{
// Initialize user array in format "Username"=>"Serial"
$user_array = array(
"John Doe"=>"abc-def-ghi",
"Jane Smith"=>"123-456-789"
);

// Get info from post variables
$user = $_POST['user'];
$serial = $_POST['serial'];
$installed = $_POST['installed'];

// Step through the user array
foreach($user_array as $username=>$serialnumber)
{
// Compare current item to the posted information
if(($user==$username) AND ($serial==$serialnumber))
{
// The current user matched, return info and exit
echo md5($user).md5($serial).'::'.$installed;
exit;
}
}

// If this script makes it this far, nothing matched, return error code
echo -1;
}
else
{
// no post data was sent, return error code
echo -1;
}
?>

Note: The above php script must be hosted on a PHP-enabled web host, and be called from your application using either an HTTP.Submit or an HTTP.SubmitSecure action.


Crypto.MD5DigestFromFile Examples

Crypto.MD5DigestFromFile

string Crypto.MD5DigestFromFile (

string Filename )

Example 1

-- calculate the MD5 message digest for a file
-- note: edit this path so it points to an actual file :)
file = "C:\\MyFolder\\MyFile.htm";
strMD5 = Crypto.MD5DigestFromFile(file);

if (strMD5 ~= "") then
Dialog.Message("MD5DigestFromFile","The MD5 digest for "..file.." is:\r\n\r\n"..strMD5);
else
err = Application.GetLastError();
Dialog.Message("Arooga! Arooga!","ERROR "..err..": ".._tblErrorMessages[err]);
end

Calculates the MD5 message digest for a file and shows the result in a dialog message.


Crypto.MD5DigestFromString Examples

Crypto.MD5DigestFromString

string Crypto.MD5DigestFromString (

string Text )

Example 1

-- Calculate the MD5 message digest for the user's name and display it in a message
strName = Dialog.Input("", "What is your name?", "", MB_ICONQUESTION);
strDigitalSignature = Crypto.MD5DigestFromString(strName);
Dialog.Message("The digital signature for your name is:",strDigitalSignature);

Prompts for the user's name and then generates the MD5 message digest for it and shows it in a dialog message.

Example 2

--[[ note: our app allows the user to password-protect it. If the user
chose to enable password-protection, they were prompted for
a password, we appended a suffix to it (to help prevent
dictionary attacks), and the MD5 digest for the resulting
password + suffix was stored in the Registry.]]

--[[ get the digest that was stored in the Registry at HKEY_CURRENT_USER\Software\SuperDooperApp
note: this was calculated when the user supplied the password,
before it was stored ]]
reg_md5 = Registry.GetValue(HKEY_CURRENT_USER, "Software\\SuperDooperApp", "password")

-- the value only exists when the app is password-protected
if reg_md5 ~= "" then
--[[ ask the user for the password they supplied when they enabled
the password protection feature ]]
pw = Dialog.Input("", "Please enter your password:");

--[[ we added "!$" to their password before it was stored,
to help make the user's password safe from dictionary attacks ]]
pw = pw .. "!$"

-- calculate the MD5 message digest for the password + suffix
pw_md5 = Crypto.MD5DigestFromString(pw);

-- exit the app if the password digests don't match
if pw_md5 ~= reg_md5 then
Dialog.Message("", "Sorry, invalid password!");
Application.Exit();
end
end

Given that the MD5 message digest for a password was previously stored in the Registry, a user is prompted for the password and it is compared to the current password input from the user. If the message digests do not match, the application exits.


Crypto.Rot13 Examples

Crypto.Rot13

string Crypto.Rot13 (

string Text )

Example 1

-- encrypt the user's name
strName = Dialog.Input("", "What is your name?", "", MB_ICONQUESTION);

-- rot13 encrypt the name
strEncrypted = Crypto.Rot13(strName);
Dialog.Message("Your name, rot13 encrypted:",strEncrypted);

-- rot13 decrypt the name
strDecrypted = Crypto.Rot13(strEncrypted);
Dialog.Message("And now rot13 decrypted:",strDecrypted);

Encrypts a user name using "rot13", displays it in a dialog message, then rot13 decrypts it and displays it in a dialog message.


Debug.Clear Examples

Debug.Clear

Debug.Clear (

)

Example 1

Debug.Clear();

Clears the contents of the debug window.

Example 2

-- Show the debug window.
Debug.ShowWindow(true);

-- Print some example text to the debug window.
Debug.Print("This is a test line that will be printed.\r\n");

-- Perform some addition and write it out to the debug window.
total = 6 + 2;
Debug.Print("6 + 2 = "..total.."\r\n");

-- Ask if the debug window should be cleared.
result = Dialog.Message("Question", "Do you want to clear the debug window?", MB_YESNO, MB_ICONINFORMATION, MB_DEFBUTTON1);

-- If the user clicks the Yes button, clear the debug window.
-- If the user clicks the No button, leave it.
if result == IDYES then
Debug.Clear();
end

Outputs some text to the debug window and asks if the window should be cleared using a Dialog.Message action. If they click yes, the debug window will be cleared. If they click no, no action will be taken.


Debug.GetEventContext Examples

Debug.GetEventContext

string Debug.GetEventContext (

)

Example 1

context = Debug.GetEventContext();

Gets the current device context string and stores it in a variable named "context."

Example 2

errmsg = "Error #" .. Application.GetLastError().. " in " .. Debug.GetEventContext();

Uses the concatenation operator (..) to form an error message containing the last error code and the current event context and stores the error message in a variable named "errmsg."

Example 3

-- Show the debug window.
Debug.ShowWindow(true);

-- Turn on the debug trace mode.
Debug.SetTraceMode(true);

-- Print some example text to the debug window.
Debug.Print("This is a test line that will be printed.\r\n");

-- Perform some addition and write it out to the debug window.
total = 6 + 2;
Debug.Print(total.."\r\n");

-- Print the current date to the debug window.
Debug.Print(System.GetDate(DATE_FMT_ISO).."\r\n");

-- Get the event context and print it to the debug window.
context = Debug.GetEventContext();
Debug.Print(context);

-- Determine if trace mode is turned on and print the result to the debug window.
trace_mode = Debug.GetTraceMode();
if trace_mode then
Debug.Print("Trace mode is on.\r\n");
else
Debug.Print("Trace mode is off.\r\n");
end

This example uses a few of the debug actions to output content to the debug window.

Tip: Create a label object and copy this script into one of its events to see how it works.


Debug.GetTraceMode Examples

Debug.GetTraceMode

boolean Debug.GetTraceMode (

)

Example 1

trace_mode = Debug.GetTraceMode();

Stores the current trace mode (true/false) in a variable named "trace_mode."

Example 2

if Debug.GetTraceMode() then Dialog.Message("", "Trace mode is on!") end

Displays a dialog message saying "Trace mode is on!" if trace mode is currently enabled.

Example 3

-- Show the debug window.
Debug.ShowWindow(true);

-- Turn on the debug trace mode.
Debug.SetTraceMode(true);

-- Print some example text to the debug window.
Debug.Print("This is a test line that will be printed.\r\n");

-- Perform some addition and write it out to the debug window.
total = 6 + 2;
Debug.Print(total.."\r\n");

-- Print the current date to the debug window.
Debug.Print(System.GetDate(DATE_FMT_ISO).."\r\n");

-- Get the event context and print it to the debug window.
context = Debug.GetEventContext();
Debug.Print(context);

-- Determine if trace mode is turned on and print the result to the debug window.
trace_mode = Debug.GetTraceMode();
if trace_mode then
Debug.Print("Trace mode is on.\r\n");
else
Debug.Print("Trace mode is off.\r\n");
end

This example uses a few of the debug actions to output content to the debug window.

Tip: Create a label object and copy this script into one of its events to see how it works.


Debug.Print Examples

Debug.Print

Debug.Print (

string Text )

Example 1

Debug.Print("Readme button clicked");

Prints "Readme button clicked" to the debug window. (You could put this action in the "On Click" event for a readme button to find out if the event's actions are being performed.)

Example 2

Debug.Print("Mouse over event fired: " .. Debug.GetEventContext());

Prints a debug message consisting of the string ""Mouse over event fired: " followed by the current event context.

Example 3

Debug.Print("Jumping from page "..page_num.." to page "..next_page_num);

Prints a debug message to log a page jump. Note the use of concatenation operators (..) to include the contents of two variables ("page_num" and "next_page_num") in the message.

Example 4

-- Show the debug window.
Debug.ShowWindow(true);

-- Turn on the debug trace mode.
Debug.SetTraceMode(true);

-- Print some example text to the debug window.
Debug.Print("This is a test line that will be printed.\r\n");

-- Perform some addition and write it out to the debug window.
total = 6 + 2;
Debug.Print(total.."\r\n");

-- Print the current date to the debug window.
Debug.Print(System.GetDate(DATE_FMT_ISO).."\r\n");

-- Get the event context and print it to the debug window.
context = Debug.GetEventContext();
Debug.Print(context);

-- Determine if trace mode is turned on and print the result to the debug window.
trace_mode = Debug.GetTraceMode();
if trace_mode then
Debug.Print("Trace mode is on.\r\n");
else
Debug.Print("Trace mode is off.\r\n");
end

This example uses a few of the debug actions to output content to the debug window.

Tip: Create a label object and copy this script into one of its events to see how it works.


Debug.SendToFile Examples

Debug.SendToFile

number Debug.SendToFile (

string Filename,

boolean Overwrite = true )

Example 1

Debug.SendToFile("C:\\Temp\\DebugOutput\\debug_log.txt", true);
Debug.Print("Readme button clicked");

Prints "Readme button clicked" in the debug log file named "debug_log.txt." (You could put this action in the "On Click" event for a readme button to find out if the event's actions are being performed.)

Example 2

Debug.SendToFile("C:\\Temp\\DebugOutput\\debug_log.txt", false);
Debug.Print("Mouse over event fired: " .. Debug.GetEventContext());

Appends a debug message consisting of the string ""Mouse over event fired: " followed by the current event context to the debug log file named "debug_log.txt."


Debug.SetTraceMode Examples

Debug.SetTraceMode

Debug.SetTraceMode (

boolean Enable = true )

Example 1

Debug.SetTraceMode(true); -- turn it on

Turns trace mode on. (The text after the "--" in this example is just a comment.)

Example 2

Debug.SetTraceMode(false); -- turn it off

Turns trace mode off.

Example 3

-- Show the debug window.
Debug.ShowWindow(true);

-- Turn on the debug trace mode.
Debug.SetTraceMode(true);

-- Print some example text to the debug window.
Debug.Print("This is a test line that will be printed.\r\n");

-- Perform some addition and write it out to the debug window.
total = 6 + 2;
Debug.Print(total.."\r\n");

-- Print the current date to the debug window.
Debug.Print(System.GetDate(DATE_FMT_ISO).."\r\n");

-- Get the event context and print it to the debug window.
context = Debug.GetEventContext();
Debug.Print(context);

-- Determine if trace mode is turned on and print the result to the debug window.
trace_mode = Debug.GetTraceMode();
if trace_mode then
Debug.Print("Trace mode is on.\r\n");
else
Debug.Print("Trace mode is off.\r\n");
end

This example uses a few of the debug actions to output content to the debug window.

Tip: Create a label object and copy this script into one of its events to see how it works.


Debug.ShowWindow Examples

Debug.ShowWindow

Debug.ShowWindow (

boolean Show )

Example 1

Debug.ShowWindow(true);

Shows the debug window.

Example 2

Debug.ShowWindow(false);

Hides the debug window.

Example 3

-- Show the debug window.
Debug.ShowWindow(true);

-- Turn on the debug trace mode.
Debug.SetTraceMode(true);

-- Print some example text to the debug window.
Debug.Print("This is a test line that will be printed.\r\n");

-- Perform some addition and write it out to the debug window.
total = 6 + 2;
Debug.Print(total.."\r\n");

-- Print the current date to the debug window.
Debug.Print(System.GetDate(DATE_FMT_ISO).."\r\n");

-- Get the event context and print it to the debug window.
context = Debug.GetEventContext();
Debug.Print(context);

-- Determine if trace mode is turned on and print the result to the debug window.
trace_mode = Debug.GetTraceMode();
if trace_mode then
Debug.Print("Trace mode is on.\r\n");
else
Debug.Print("Trace mode is off.\r\n");
end

This example uses a few of the debug actions to output content to the debug window.

Tip: Create a label object and copy this script into one of its events to see how it works.


Dialog.ComboBox Examples

Dialog.ComboBox

string Dialog.ComboBox (

string Title,

string Prompt,

table Items,

string DefaultItem,

boolean SortItems = false,

boolean Editable = false,

number Icon = MB_ICONQUESTION )

Example 1

-- The combo box items table.
tbItems = {"Apple", "Orange", "Pear"};

-- Show the dialog combo box.
strSelected = Dialog.ComboBox("Select Lunch","Please select the desired fruit:",tbItems,"Apple",false,false,MB_ICONQUESTION);

if ((strSelected ~= "") and (strSelected ~= "CANCEL")) then
Dialog.Message("Result", "The chosen fruit is "..strSelected);
end

Prompts the user to select a fruit from a combo box on a dialog, and shows the result in a dialog message if they clicked OK.


Dialog.FileBrowse Examples

Dialog.FileBrowse

table Dialog.FileBrowse (

boolean FileOpen,

string Title,

string DefaultFolder,

string FileFilters = "All Files (*.*)|*.*|",

string Filename = "",

string FileExtension = "",

boolean MultipleSelect = false,

boolean FileMustExist = false )

Example 1

files = Dialog.FileBrowse(true, "Open File", _ProgramFilesFolder, "Text File (*.txt)|*.txt|All Files(*.*)|*.*|", "", "", false, false);

Prompts the user to select a single text file in their Program Files folder, and stores the path to the file they select in a table named "files."

Note: _ProgramFilesFolder is a built-in variable that contains the path to the user's "Program Files" folder.

Example 2

-- Display a single-selection file browse dialog
result = Dialog.FileBrowse(true, "Load File", _DesktopFolder, "Microsoft Word Document (*.doc)|*.doc|All Files (*.*)|*.*|", "", "", false, true);

-- If CANCEL was not chosen, then let's get the file path
if (result[1] ~= "CANCEL") then
Dialog.Message("You chose the following file", result[1]);
end

Prompts the user to select a single Word document file (.doc) browsing from their Desktop folder, and stores the path to the file they select in a table named "result." If the cancel button was not chosen, a dialog message is displayed showing the file path that is stored in the table.

Example 3

-- Prompt the user to select files to add to the zip archive.
archive_files = Dialog.FileBrowse(true, "Files to Add", _DesktopFolder, "All Files (*.*)|*.*|", "", "dat", true, false);

-- Check to see if an error occurred, or the user cancelled.
if (archive_files[1] ~= "CANCEL") and (archive_files ~= nil) then

-- Show the status dialog.
StatusDlg.Show();

-- Add the chosen files to the zip archive.
Zip.Add(_DesktopFolder.."\\NewArchive.zip", archive_files, true, "", 5, nil, false);

-- Get the error code of the zip.add action.
error = Application.GetLastError();

-- Hide the status dialog.
StatusDlg.Hide();

-- If it succeeded, display a success message and open the folder. Otherwise display the error message.
if (error == 0) then
Dialog.Message("Success", "The files were successfully archived.", MB_OK, MB_ICONINFORMATION);

-- Open the folder where the zip file was created.
File.ExploreFolder(_DesktopFolder, SW_SHOWNORMAL);
else
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);
end
end

A file browse dialog is displayed allowing the user to select files they would like added to a Zip archive. The selected files are then added to a Zip archive created on their desktop. If the process is successful, a success message is displayed. If there was an error, the error code message is shown.


Dialog.FolderBrowse Examples

Dialog.FolderBrowse

string Dialog.FolderBrowse (

string Prompt,

string DefaultFolder )

Example 1

folder_path = Dialog.FolderBrowse("Select Folder", _SourceFolder .. "\\AutoPlay");

Prompts the user to select a single folder from the "AutoPlay" folder on the CD-ROM and stores the path to the selected folder in a variable named "folder_path."

Note: _SourceFolder is a built-in variable that contains the path to the folder where the autorun.exe file is located.

Example 2

-- Display a folder browse dialog
storage_path = Dialog.FolderBrowse("Store Files In", _ProgramFilesFolder);

-- If CANCEL was not chosen, then let's get the folder path
if (storage_path ~= "CANCEL") then
Dialog.Message("You chose the following folder", storage_path);
end

Asks the user what path to store files in, letting them browse for a folder starting from the Program Files folder. The resulting path is stored in storage_path. The second block of code is a check to see if the user pressed the cancel button. If they didn't, a dialog message is displaying showing the folder that was selected.

Note: _ProgramFilesFolder is a built-in variable that contains the path to the user's Program Files folder.

Example 3

-- Allow the user to select a directory to unzip the files.
target_folder = Dialog.FolderBrowse("Select a Folder", "C:\\");

-- Check to see if the user cancelled or an error occurred.
if (target_folder ~= "CANCEL") and (target_folder ~= "") then
-- Gets a list of the contents of a zip file.
zip_contents = Zip.GetContents("AutoPlay\\Docs\\Info.zip", true);

-- Get the error code of the last action.
error = Application.GetLastError();

-- If an error occurred, display the error code message.
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);
else
-- Take the table and turn it into a string with newlines for displaying.
zip_contents_display = Table.Concat(zip_contents, "\r\n", 1, TABLE_ALL);

-- Ask the user if they are sure they would like to unzip the contents.
result = Dialog.Message("Information", "The following files will be unzipped:\r\nClick the Cancel button to abort the process.\r\n\r\n"..zip_contents_display, MB_OKCANCEL)

-- If the user clicked Ok, unzip the files.
if (result == IDOK) then
-- Show the status dialog.
StatusDlg.Show();
-- Extract the contents of the Zip file.
Zip.Extract("AutoPlay\\Docs\\Info.zip", {"*.*"}, target_folder, true, true, "", ZIP_OVERWRITE_NEVER, nil);

-- Check the error code for the last action.
error = Application.GetLastError();

-- Hide the status dialog.
StatusDlg.Hide();

-- If an error occurred, display the error code message.
if (error ~= 0) then
Dialog.Message("Errror", tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);
else
Dialog.Message("Success", "The unzipping was successful.", MB_OK, MB_ICONINFORMATION);
end
end
end
end

This example first prompts the user to select a folder using the Dialog.FolderBrowse action. This folder will be used to unzip the files to. The user is then presented with a dialog containing the names of the files that will be unzipped and allows them to abort the process. If the user clicks Ok, the files are unzipped to the folder they selected. Notification will be given at the end of the process as to whether or not the procedure was successful.


Dialog.Input Examples

Dialog.Input

string Dialog.Input (

string Title,

string Prompt,

string DefaultText = "",

number Icon = MB_ICONQUESTION )

Example 1

full_name = Dialog.Input("Welcome", "Please enter your full name:");

Prompts the user for their full name, and stores their answer in a variable named "full_name."

Example 2

strAnswer = Dialog.Input("Question "..nQuestion, strQuestion, "", MB_ICONQUESTION);

Asks the user the question contained in the variable strQuestion. The concatenation operator (..) is used to include the question number in the dialog's title bar. The user's answer (which they can type into the dialog's input field) is stored in strAnswer when they click OK.

Tip: The "n" and "str" prefixes used for the variables in this example are a naming technique that programmers use to help themselves remember whether a variable contains a number or a string.

Example 3

name = "";
-- Loop until a valid full name is entered or the user cancels.
while (name == "") and (name ~= "CANCEL") do
-- Prompt the user for their full name
name = Dialog.Input("Personal Information", "Please enter your full name:", "", MB_ICONQUESTION);

-- If the user does not enter any text, display an error message. The loop will continue from the beginning
if name == "" then
result = Dialog.Message("Error", "Your information could not be processed as entered. Please try again.", MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);

-- If the user entered a valid name and didn't cancel, display a welcome message.
elseif name ~= "CANCEL" then
result = Dialog.Message("Welcome", "Welcome "..name.."!", MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
end
end

This example uses a while loop to prompt the user for their full name using a Dialog.Input action. If the user does not enter any text as input, an error message will appear and the input dialog will be displayed again. The loop will only be exited if they enter a name or press the cancel button.


Dialog.MaskedInput Examples

Dialog.MaskedInput

table Dialog.MaskedInput (

string Title = "",

string Prompt,

string Mask,

string DefaultText = "",

number Icon = MB_ICONQUESTION,

string PlaceHolder = " " )

Example 1

postal_code = Dialog.MaskedInput("", "What is your Postal Code?", ">#> #>#", "", MB_ICONQUESTION, " ");

Asks the user for their postal code, making sure that they enter it in the correct format (three capital letters, three numbers, and a space, like this: A9A 9A9), and stores the result in table called postal_code. The raw data can be accessed by referencing postal_code.Data and the string as it was displayed can be accessed by referencing postal_code.Displayed.

Example 2

-- Set the flag variable.
pass = false;

while (not pass) do
-- Prompt the user for their telephone number.
phone = Dialog.MaskedInput("Personal Information", "Please enter your telephone number:", "(###) ###-####", "##########", MB_ICONQUESTION, "#");

-- If there wasn't an error and the user didn't cancel, try to validate the number.
if (phone ~= nil) then
-- Search for the placeholder character "#".
search_result = String.Find(phone.Data, "#", 1, false);

-- If the placeholder character wasn't found...
if (search_result == -1) then
-- Display the telephone number in a dialog.
Dialog.Message("Information", "The telephone number "..phone.Displayed.." will be entered in our records.", MB_OK, MB_ICONINFORMATION);

-- Set the flag to exit the loop.
pass = true;
else
-- Tell the user that the phone number entered was not complete.
Dialog.Message("Notice", "The telephone number entered was not complete. Please re-enter the number.", MB_OK, MB_ICONINFORMATION);
end
else
-- There was an error or the user cancelled. Exit the loop.
pass = true;
end
end

Prompts the user to enter their telephone number using the Dialog.MaskedInput action. In order to help the user enter the information, the telephone mask is used. The placeholder character and default text uses the "#" character. A validation is performed on the user input that checks for the "#" character signalling an incomplete number. If its found, the user is prompted to re-enter the information. The loop will only be exited if the user enters a valid telephone number, or cancels. If they enter a valid number, a dialog is shown with their number as it was displayed.


Dialog.Message Examples

Dialog.Message

number Dialog.Message (

string Title,

string Text,

number Type = MB_OK,

number Icon = MB_ICONINFORMATION,

number DefaultButton = MB_DEFBUTTON1 )

Example 1

btn = Dialog.Message("Error!", "Unable to proceed.", MB_RETRYCANCEL);

Alerts the user that an error occurred and asks them if they want to retry or cancel. Depending on which button they click on, the value represented by the constant IDRETRY or IDCANCEL will be stored in the btn variable.

Example 2

Dialog.Message("Important", "The rain in Spain falls mainly on the plain.", MB_OK, MB_ICONEXCLAMATION);

Gives the user an important (okay, maybe not so important :) message, and waits for them to click the OK button before continuing.

Note: This example doesn't store the return value in a variable because it will always be IDOK. In cases like these, we say that the return value is ignored.

Example 3

ishappy = Dialog.Message("Prying Question #023", "Are you happy?", MB_YESNO, MB_ICONQUESTION, MB_DEFBUTTON1);

Asks the user if they're happy, with Yes and No buttons on the dialog. Since we're asking a question, the MB_ICONQUESTION icon is specified. To encourage happiness in our users, the Yes button is selected by default. The user's response is stored in the variable ishappy as one of two constants, IDYES or IDNO.

Example 4

-- Gets the path to the user's My Documents folder.
my_docs_path = Shell.GetFolder(SHF_MYDOCUMENTS);

-- Check to see if the My Documents folder detection was successful.
if (Application.GetLastError() == 0)then

-- Search the user's My Documents folder for the file "Data.ini".
search_results = File.Find(my_docs_path, "Data.ini", true, false, nil);

--Check to see if an error occurred during the search. If it did, display the error message.
error = Application.GetLastError();
if error ~= 0 then
Dialog.Message("Error",_tblErrorMessages[error]);
else

-- If no files were found, notify the user.
if (search_results == nil) then
Dialog.Message("Notice", "Data.ini was not found in your My Documents folder.");

-- If files were found, display a dialog containing a list of their locations.
-- Also ask for deletion confirmation.
else
message = "Data.ini was found in the following location(s). Click OK to delete the file(s):\r\n\r\n";
for index, path in pairs(search_results) do
message = String.Concat(message, path.."\r\n");
end
proceed = Dialog.Message("File Search Results", message, MB_OKCANCEL, MB_ICONQUESTION, MB_DEFBUTTON1);

-- If the user clicked OK, delete all of the files found.
if proceed == IDOK then

-- Delete each file found in the search.
for index, path in pairs(search_results) do
File.Delete(path, false, false, false, nil);

-- Check to see if any errors occurred during the deletion.
if (Application.GetLastError() ~= 0) then
Dialog.Message("Error", "The file located at: "..path.." could not be deleted.");
end
end
end
end
end
end

This example uses the File.Find action to search for all copies of a particular INI file in the user's My Documents folder. If the file is found in more than one location, the user is presented with the list and asked if they wish to delete them using a Dialog.Message action. If they agree, each copy is deleted using the File.Delete action.


Dialog.PageSearch Examples

Dialog.PageSearch

Dialog.PageSearch (

table DialogText = nil )

Example 1

Dialog.PageSearch();

Shows the page search dialog allowing the user to search for keywords in the application.

Example 2

tbSearchProps = {DialogTitle="Search Catalog", SearchForLabel="Search catalog for:"};
Dialog.PageSearch(tbSearchProps);

Sets the search dialog's "title" text and "search for" text and then shows it allowing the user to search for keywords in the application.


Dialog.PasswordInput Examples

Dialog.PasswordInput

string Dialog.PasswordInput (

string Title,

string Prompt,

number Icon = MB_ICONNONE )

Example 1

password = Dialog.PasswordInput("Enter Password", "Password:");

Asks the user for a password, and stores their answer in a variable called password.

Example 2

-- the correct password "valid"
real_password = "valid";

-- prompt the user to enter a password
user_password = Dialog.PasswordInput("Password", "Please enter the password: ", MB_ICONQUESTION);

-- compare the user's password to the correct password.
-- If the user supplies the wrong password, exit the program.
if real_password ~= user_password then
Application.Exit();
end

This example displays a dialog box requesting a password using the Dialog.PasswordInput action. For this example, the string "valid" is used as the password. Whatever the user types into this dialog box appears as *******. If the correct password "valid" is entered, the program runs normally. However if any other password is entered, the program will close.


Dialog.SplashFlash Examples

Dialog.SplashFlash

Dialog.SplashFlash (

string FlashFile,

number Time = 0,

boolean AllowClickToSkip = true )

Example 1

Dialog.SplashFlash("AutoPlay\\Flash\\Intro.swf", 10, false);

Displays a dialog containing the Flash movie called "Intro.swf" for 10 seconds.

Example 2

Dialog.SplashFlash(_SourceFolder.."\\Extra\\Closing.swf", 25, true);

Displays a dialog containing the Flash movie called "Closing.swf" for 25 seconds. In this example the parameter AllowClickToSkip is set to true which means that the user can click on the movie to close the dialog.

Note: _SourceFolder is a built-in variable that contains the path to the folder where the autorun.exe file is located.


Dialog.SplashImage Examples

Dialog.SplashImage

Dialog.SplashImage (

string MediaFile,

number Time,

boolean AllowClickToSkip = true )

Example 1

Dialog.SplashImage("AutoPlay\\Images\\logo.jpg", 10, false);

Displays a dialog containing the splash image "logo.jpg" for 10 seconds.

Example 2

Dialog.SplashImage(_SourceFolder.."\\Extra\\map.bmp", 25, true);

Displays a dialog containing the image "map.bmp" for 25 seconds. In this example the parameter AllowClickToSkip is set to true which means that the user can click on the image to close the dialog.

Note: _SourceFolder is a built-in variable that contains the path to the folder where the autorun.exe file is located.


Dialog.SplashVideo Examples

Dialog.SplashVideo

Dialog.SplashVideo (

string VideoFile,

number Time = 0,

boolean AllowClickToSkip = true )

Example 1

Dialog.SplashVideo("AutoPlay\\Videos\\Intro.mpg", 10, false);

Displays a dialog containing the splash video "Intro.mpg" for 10 seconds.

Example 2

Dialog.SplashVideo(_SourceFolder.."\\Extra\\Credits.avi", 25, true);

Displays a dialog containing the video "Credits.avi" for 25 seconds. In this example the parameter AllowClickToSkip is set to true which means that the user can click on the video to close the dialog.

Note: _SourceFolder is a built-in variable that contains the path to the folder where the autorun.exe file is located.


Dialog.TimedMessage Examples

Dialog.TimedMessage

Dialog.TimedMessage (

string Title,

string Text,

number Time,

number Icon = MB_ICONINFORMATION )

Example 1

Dialog.TimedMessage("Oh oh...", "Waiting for a miracle", 5000, MB_ICONNONE);

Display a message that says "Waiting for a miracle" for 5 seconds, which is sure to instill confidence in your users.

Example 2

Dialog.TimedMessage("Security Check", "Performing retinal scan...", 6000, MB_ICONEXCLAMATION);

Display a message that says "Performing retinal scan..." for 6 seconds, with an exclamation mark icon on the dialog to make it seem even more important. (This message is most effective if, first, you tell the user to stare into the monitor and DON'T BLINK.)

Example 3

Dialog.TimedMessage("", "Meep meep", 1500, MB_ICONNONE);

Puts up a cryptic road runner impersonation for 1.5 seconds, with no text in the title bar.

Example 4

-- Get the AutoPlay application's window handle.
handle = Application.GetWndHandle();

-- Hide the AutoPlay application window.
Window.Hide(handle);

-- Presents a timed please wait dialog for 3 seconds.
Dialog.TimedMessage("Please Wait...", "Please be patient while processing.", 3000, MB_ICONNONE);

-- Show the AutoPlay application window.
Window.Show(handle);

Hides the application window while displaying a timed dialog message. Once the timed dialog has elapsed, the application window is shown again.


DialogEx.ClickObject Examples

DialogEx.ClickObject

DialogEx.ClickObject (

string ObjectName )

Example 1

DialogEx.ClickObject("Chapter 1");

Fires the On Click event of the object called "Chapter 1." Any actions located on it's On Click event will be executed.


DialogEx.Close Examples

DialogEx.Close

boolean DialogEx.Close (

number ReturnCode )

Example 1

bRet = DialogEx.Close(9999);

Closes the current dialog and returns the value 9999.


DialogEx.CreateObject Examples

DialogEx.CreateObject

DialogEx.CreateObject (

number ObjectType,

string ObjectName,

table Properties )

Example 1

-- Initialize the properties table
tWebProperties = {}
tWebProperties.URL="http://www.amsuser.com";
tWebProperties.Enabled=true;
tWebProperties.Visible=true;
tWebProperties.X=0;
tWebProperties.Y=0;
tWebProperties.Width=630;
tWebProperties.Height=425;

-- Create the web object
DialogEx.CreateObject(OBJECT_WEB, "AC_Web_Created_By_Action", tWebProperties);

Initializes a table of properties for a web object, and then creates the web object "AC_Web_Created_By_Actions" based on these properties. The first three characters in the name ("AC_") were added to differentiate this object from objects on the dialog from design-time (AC_ denotes an 'action created' object). This type of object naming is not required, but it helps to ensure you don't try to create an already created object.

Example 2

-- Initialize the properties table
tImageProperties = {};
tImageProperties.ImageFile = _SourceFolder .. "\\AutoPlay\\Images\\Create_Me.jpg";
tImageProperties.UseTransColor = false;
tImageProperties.Opacity = 75;
tImageProperties.HitTest = HITTEST_STANDARD;
tImageProperties.Enabled = true;
tImageProperties.Visible = true;
tImageProperties.X = 50;
tImageProperties.Y = 50;
tImageProperties.Width = 100;
tImageProperties.Height = 200;
tImageProperties.TooltipText = "I was created by an action!!";
tImageProperties.Cursor = CURSOR_MEDIA;
tImageProperties.HighlightSound = SND_STANDARD;
tImageProperties.ClickSound = SND_STANDARD;

-- Create the image object
DialogEx.CreateObject(OBJECT_IMAGE, "AC_Image_Object", tImageProperties);

Initializes a table of properties for an image object, and then creates the image object "Image_Object" based on these properties.


DialogEx.DeleteObject Examples

DialogEx.DeleteObject

DialogEx.DeleteObject (

string ObjectName )

Example 1

DialogEx.DeleteObject("Status");

Deletes an object from the current dialog named 'Status'.


DialogEx.EnumerateObjects Examples

DialogEx.EnumerateObjects

table DialogEx.EnumerateObjects (

)

Example 1

all_objects = DialogEx.EnumerateObjects( );

Gets the name of each object on the current dialog and stores them in a table called "all_objects."

Example 2

-- Get the names of all of the objects on the dialog.
object_names = DialogEx.EnumerateObjects();

-- Get the error code of the last action.
error = Application.GetLastError();

-- If an error occurred, display the error code message.
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);
else
-- If there are no objects on the current dialog, display a dialog.
if (object_names == nil) then
Dialog.Message("Notice", "There are no objects on the current dialog.", MB_OK, MB_ICONEXCLAMATION);
else
-- Display the names of all of the label objects on the dialog.
output_string = "";
for index, object in pairs(object_names) do
-- Get the type of the object
type = DialogEx.GetObjectType(object);
if (type == OBJECT_LABEL) then
output_string = output_string..object.."\r\n";
end
end
Dialog.Message("Information", "Below are the names of all of the label objects on this dialog.\r\n\r\n"..output_string, MB_OK, MB_ICONINFORMATION)
end
end

Gets the names of all of the objects on the current dialog and displays a dialog listing the names of only the label objects. If there are no objects on the dialog, or an error occurs, a notification dialog is displayed.


DialogEx.GetFocus Examples

DialogEx.GetFocus

string DialogEx.GetFocus (

)

Example 1

object_focus = DialogEx.GetFocus( );

Determines which object currently has focus and stores it's name in the variable "object_focus." If no object has focus at that time, the dialog name will be stored.


DialogEx.GetObjectScript Examples

DialogEx.GetObjectScript

string DialogEx.GetObjectScript (

string ObjectName,

string EventName )

Example 1

-- Get the script from the button's on click event
sScript = DialogEx.GetObjectScript("Button1", "On Click");

-- get the last error code (or success code)
err = Application.GetLastError();

if err ~= 0 then
-- An error occurred
Dialog.Message(err, _tblErrorMessages[err]);
else
-- No error, display output
Dialog.Message("Script from On Click", sScript);
end

Gets the script from the On Click event of the button object "Button1" and outputs it to the user. If an error occurs, the user is notified.

Example 2

-- Get the script from the button's on click event
sPreviousScript = DialogEx.GetObjectScript("Button1", "On Click");

-- Initialize the new script
sNewScript = "Dialog.Message(\"Title\", \"Message\");"

-- Append the new script to the old script
DialogEx.SetObjectScript("Button1", "On Click", sPreviousScript .. "\r\n" .. sNewScript);

Appends a dialog message action to the script existing on the On Click event of the "Button1" button object.


DialogEx.GetObjectType Examples

DialogEx.GetObjectType

number DialogEx.GetObjectType (

string ObjectName )

Example 1

what_type = DialogEx.GetObjectType("MyVideo");

Gets the number representing the type of the "MyVideo" object and stores it in a variable called "what_type." If this object was a video object, the number 5 would be returned.

Example 2

-- Get the names of all of the objects on the dialog.
object_names = DialogEx.EnumerateObjects();

-- Get the error code of the last action.
error = Application.GetLastError();

-- If an error occurred, display the error code message.
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);
else
-- If there are no objects on the current dialog, display a dialog.
if (object_names == nil) then
Dialog.Message("Notice", "There are no objects on the current dialog.", MB_OK, MB_ICONEXCLAMATION);
else
-- Display the names of all of the label objects on the dialog.
output_string = "";
for index, object in pairs(object_names) do
-- Get the type of the object
type = DialogEx.GetObjectType(object);
if (type == OBJECT_LABEL) then
output_string = output_string..object.."\r\n";
end
end
Dialog.Message("Information", "Below are the names of all of the label objects on this dialog.\r\n\r\n"..output_string, MB_OK, MB_ICONINFORMATION)
end
end

Gets the names of all of the objects on the current dialog and displays a dialog listing the names of only the label objects. If there are no objects on the dialog, or an error occurs, a notification dialog is displayed.


DialogEx.GetRadioValue Examples

DialogEx.GetRadioValue

string DialogEx.GetRadioValue (

string GroupID = "",

number Type = RADIOGROUP_VALUE )

Example 1

radio_text = DialogEx.GetRadioValue("", RADIOGROUP_TEXT);

Gets the text of the selected radiobutton in the default radiobutton group.

Example 2

radio_value = DialogEx.GetRadioValue("Group1", RADIOGROUP_VALUE);

Gets the data value of the selected radiobutton in the group named "Group1".


DialogEx.GetSize Examples

DialogEx.GetSize

table DialogEx.GetSize (

)

Example 1

dialog_size = DialogEx.GetSize();

Gets the pixel dimensions of the current dialog and stores the width and height values in the "dialog_size" table. The dimensions can be accessed by referencing dialog_size.Width and dialog_size.Height.


DialogEx.GetWndHandle Examples

DialogEx.GetWndHandle

number DialogEx.GetWndHandle (

)

Example 1

handle = DialogEx.GetWndHandle();

Gets the numeric window handle for the current dialog window and stores it in the variable "handle."

Example 2

-- Get the current dialog's window handle
nHandle = DialogEx.GetWndHandle();

-- Specify the path to use
sMaskFilePath = _SourceFolder .. "\\Masks\\Mask1.jpg";

-- Apply the mask to the window
Window.SetMask(nHandle, sMaskFilePath, true, 0);

Applies the "Mask1.jpg" window mask to the current dialog window.


DialogEx.Print Examples

DialogEx.Print

DialogEx.Print (

boolean ShowPrintDialog = true,

boolean ScaleToFit = true )

Example 1

DialogEx.Print(true,true);

Shows the common print dialog before printing the current dialog in the project using the ScaleToFit setting.


DialogEx.Redraw Examples

DialogEx.Redraw

DialogEx.Redraw (

)

Example 1

DialogEx.Redraw();

Redraws the current dialog (and all of the objects on it).


DialogEx.SetFocus Examples

DialogEx.SetFocus

DialogEx.SetFocus (

string ObjectName )

Example 1

DialogEx.SetFocus("Customer Name");

Sets focus to the "Customer Name" object on the current dialog.


DialogEx.SetObjectScript Examples

DialogEx.SetObjectScript

DialogEx.SetObjectScript (

string ObjectName,

string EventName,

string Script )

Example 1

DialogEx.SetObjectScript("Label1", "On Click", "-- Script removed by action");

Clears out the script from the "Label1" label object's On Click event and replaces it with a comment.

Example 2

-- Get the script from the button's on click event
sPreviousScript = DialogEx.GetObjectScript("Button1", "On Click");

-- Initialize the new script
sNewScript = "Dialog.Message(\"Title\", \"Message\");"

-- Append the new script to the old script
DialogEx.SetObjectScript("Button1", "On Click", sPreviousScript .. "\r\n" .. sNewScript);

Appends a dialog message action to the script existing on the On Click event of the "Button1" button object.


DialogEx.SetObjectZOrder Examples

DialogEx.SetObjectZOrder

DialogEx.SetObjectZOrder (

string ObjectName,

number Position,

string ReferenceObject = "" )

Example 1

DialogEx.SetObjectZOrder("Paragraph1", ZORDER_FRONT);

Moves the paragraph object "Paragraph1" to the front of the z-order.

Example 2

DialogEx.SetObjectZOrder(sObjectToMove, ZORDER_INSERT_BEFORE, sReferenceObject);

Moves the object referenced in variable 'sObjectToMove' to the z-order position directly in front of the object referenced in variable 'sReferenceObject'.


DialogEx.SetRadioValue Examples

DialogEx.SetRadioValue

DialogEx.SetRadioValue (

string Value,

string GroupID = "",

number Type = RADIOGROUP_VALUE )

Example 1

DialogEx.SetRadioValue("RadioButtonInstall", "", RADIOGROUP_TEXT);

Selects the radio button whose text is "RadioButtonInstall".

Example 2

DialogEx.SetRadioValue("RadioButton1", "Group1", RADIOGROUP_OBJECTNAME);

Selects the radio button whose name is "RadioButton1" and that is part of the "Group1" radio button group.

Example 3

DialogEx.SetRadioValue("Data1", "", RADIOGROUP_VALUE);

Selects the radio button whose value is "Data1" and who is part of the default radio button group.


DialogEx.SetRedraw Examples

DialogEx.SetRedraw

DialogEx.SetRedraw (

boolean Redraw = true )

Example 1

DialogEx.SetRedraw(false);
Button.SetVisible("Button1", false);
Button.SetVisible("Button2", false);
Button.SetVisible("Button2", false);
Button.SetVisible("Button3", false);
Button.SetVisible("Button4", false);
DialogEx.SetRedraw(true);

In this example the Button.SetVisible action is used to hide 4 buttons on the dialog. Normally each button would be hidden and the dialog window would be redrawn after each action. In this situation, the DialogEx.SetRedraw action is used to delay the redrawing of the objects on the dialog until all of the actions have completed.


DialogEx.Show Examples

DialogEx.Show

number DialogEx.Show (

string DialogName,

boolean ParentCoordinates = true,

number X = nil,

number Y = nil )

Example 1

nRet = DialogEx.Show("Dialog1");

Shows the dialog named "Dialog1" and stores the result in the variable "nRet."

Example 2

if (DialogEx.Show("Dialog2") == IDCANCEL) then
Dialog.Message("Cancelled", "The dialog was closed.");
end

Shows the dialog named "Dialog2" and if the user closed the window, a notification message is shown.

Example 3

nRet = DialogEx.Show("Dialog1", true, 100, 100);

Shows the dialog named "Dialog1" at a position of (100,100) relative to the application window, and stores the result in the variable nRet.


DialogEx.StartTimer Examples

DialogEx.StartTimer

DialogEx.StartTimer (

number Interval = 1000,

number ID = 10 )

Example 1

DialogEx.StartTimer(1000);

Starts the dialog timer whose ID is 10, and tells it to trigger the On Timer event once every second.

Example 2

DialogEx.StartTimer(250, 50);

Starts the dialog timer whose ID is 50, and tells it to trigger the On Timer event 4 times per second.

Example 3

DialogEx.StartTimer(2500, 100);

Starts the dialog timer whose ID is 100, and tells it to trigger the On Timer event every 2.5 seconds.


DialogEx.StopTimer Examples

DialogEx.StopTimer

DialogEx.StopTimer (

number ID = 10 )

Example 1

DialogEx.StopTimer();

Stops the dialog timer whose ID is 10 on the current dialog.

Example 2

DialogEx.StopTimer(50);

Stops the dialog timer whose ID is 50 on the current dialog.


DLL.CallFunction Examples

DLL.CallFunction

string DLL.CallFunction (

string Filename,

string FunctionName,

string Parameters = "",

number ReturnType = 0,

number CallConvention = 0 )

Example 1

DLLResult = DLL.CallFunction("winmm.dll", "mciSendStringA", "\"Set CDAudio Door Open\",0,0,0", DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL);

Calls the mciSendStringA function in the Windows winmm.dll file to send a "Set CD Audio Door Open" command to the MCI driver (along with two parameters, both 0). This causes the CD-ROM drive tray to open (i.e. it ejects the CD).

Example 2

DLL.CallFunction ( _SystemFolder .. "\\User32.dll", "SetCursorPos", "0,0", DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL);

Calls the SetCursorPos function in the "Windows\System32\User32.dll" file to move the mouse cursor to the upper left corner of the screen (i.e. to coordinates "0,0"). Since no variable is provided to store the return value, if the DLL function returns anything it will just be ignored.


Drive.Eject Examples

Drive.Eject

Drive.Eject (

string Drive )

Example 1

Drive.Eject(_SourceDrive);

Ejects the CD/DVD-ROM drive the application is currently running from.

Note: _SourceDrive is a built-in variable that contains the drive letter where the autorun.exe file is located.

Example 2

Drive.Eject(_SourceFolder);

Ejects the CD/DVD-ROM drive the application is currently running from.

Note: _SourceFolder is a built-in variable that contains the path to the folder where the autorun.exe file is located.

Example 3

-- Eject the current drive.
Drive.Eject(_SourceFolder);

-- Determine if an error occurred.
error = Application.GetLastError();

-- If an error occurred, display the error message.
if (error ~= 0) then
result = Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
end

Ejects the CD/DVD-ROM drive the application is currently running from. If an error occurs, the error code message is shown in a dialog message.

Note: _SourceFolder is a built-in variable that contains the path to the folder where the autorun.exe file is located.

Example 4

-- Get the type of the drive where the application is running from.
drive_type = Drive.GetType(_SourceDrive);

-- If the drive type is a CD/DVD ROM drive, eject it.
if (drive_type == DRIVE_CDROM) then
Drive.Eject(_SourceDrive);
end

Determines what type of drive the application is run from and stores the result in drive_type. If the user is running it from a CD-ROM or DVD-ROM drive the drive would be ejected.

Note: _SourceDrive is a built-in variable that contains the drive letter where the autorun.exe file is located.


Drive.Enumerate Examples

Drive.Enumerate

table Drive.Enumerate (

)

Example 1

Drives = Drive.Enumerate();

Gets all of the drive letters on the user's system and stores them in a numerically indexed table of drive letters. Drives[1] will likely have a value such as A:\ and Drives[2] will likely have a value such as C:\.

Example 2

-- Get a list of the available drives.
drives = Drive.Enumerate();

-- Determine if an error occurred.
error = Application.GetLastError();

-- If an error occurred, display the error message.
-- If no error occurred, display the available drives in a dialog.
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
else

-- Create a string consisting of all of the drive letters and display them.
all_drives = Table.Concat(drives, "\r\n");
Dialog.Message("Notice", "Below is a list of all of your current drives:\r\n"..all_drives);
end

Gets all of the drive letters on the user's system and stores them in a numerically indexed table of drive letters called "drives". If an error occurs, the error code message is displayed. If no error occurs, a dialog message is shown listing all of the current drives.


Drive.GetFreeSpace Examples

Drive.GetFreeSpace

number Drive.GetFreeSpace (

string Drive )

Example 1

Free_Space = Drive.GetFreeSpace("C:\\");

Gets the free disk space on the user's "C:\" drive and stores the result in a variable called "Free_Space."

Example 2

how_big = Drive.GetFreeSpace(Read_Drive);

Takes the variable "Read_Drive" that contains a path with a drive letter and stores the free disk space value in how_big.

Example 3

--space required, in megabytes
space_required = 253

--get free space on the user's system (c:\ drive)
space_available = Drive.GetFreeSpace("C:");

-- Determine if an error occurred.
error = Application.GetLastError();

-- If an error occurred, display the error message.
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
else

--compare free space available to free space required
if space_required > space_available then
Dialog.Message("","You are "..(space_required - space_available).." MB short");
else
Dialog.Message("","You have "..(space_available - space_required).." MB more than you need");
end
end

Determines if the user has enough free space on their system given a space requirement.

Note: The variable space_required must be set by you. 253 is an arbitrary number.


Drive.GetInformation Examples

Drive.GetInformation

table Drive.GetInformation (

string Drive )

Example 1

tDriveInfo = Drive.GetInformation("C:\\");

Gets the drive information from the 'C:' drive, and stores it in the table "tDriveInfo".

Example 2

-- Set this value to the expected serial number of the
-- drive that your application will run from.
Expected_Serial = 123456789;

-- Gets the source drive's current serial number
Current_Serial = Drive.GetInformation(_SourceDrive).SerialNumber;

-- Compares the two serials and, if different, terminates the app.
if (Current_Serial ~= Expected_Serial) then
Dialog.Message("ERROR", "This is an unauthorized copy of the original application, and will shut down.", MB_OK, MB_ICONSTOP);
Application.Exit();
end

Gets the source drive's serial number and compares it to the 'expected' serial number. If they don't match, the application is terminated.


Drive.GetSize Examples

Drive.GetSize

number Drive.GetSize (

string Drive )

Example 1

drive_size = Drive.GetSize("C:\\");

Gets the size of the user's "C:\" drive and stores the result in a variable called "drive_size."

Example 2

how_big = Drive.GetSize(His_Drive);

Takes the variable "His_Drive" that contains a path with a drive letter and stores the drive's size in how_big.

Example 3

--Specify which drive will be checked
sDrive = "C:";

--Get total size of user's C drive:
nTotalSize = Drive.GetSize(sDrive);

-- Determine if an error occurred.
error = Application.GetLastError();
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
else
--Get the used space
nUsedSpace = Drive.GetUsedSpace(sDrive);
-- Determine if an error occurred.
error = Application.GetLastError();
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
else
-- Calculate the drive percentage used, and round up
nPercentageUsed = (nUsedSpace / nTotalSize) * 100;
nPercentageUsed = Math.Ceil(nPercentageUsed);

-- Output percentage to the user
Dialog.Message("","Your drive is "..nPercentageUsed.."% full.");
end
end

This example determines what percentage of the user's C: drive is currently full of data.


Drive.GetType Examples

Drive.GetType

number Drive.GetType (

string Drive )

Example 1

drive_type = Drive.GetType("C:\\");

Gets the type of drive given the drive letter "C:\" and stores the numeric result in a variable called "drive_type." Normally a value of 3 would be returned meaning their "C:" drive is a fixed drive.

Example 2

what_type = Drive.GetType(_SourceDrive);

Determines what type of drive the application is run from and stores the result in what_type. If the user was running it from a CD-ROM or DVD-ROM drive, the variable what_type would contain the value 5.

Note: _SourceDrive is a built-in variable that contains the drive letter where the autorun.exe file is located.

Example 3

-- Get the type of the drive where the application is running from.
drive_type = Drive.GetType(_SourceDrive);

-- If the drive type is a CD/DVD ROM drive, eject it.
if (drive_type == DRIVE_CDROM) then
Drive.Eject(_SourceDrive);
end

Determines what type of drive the application is run from and stores the result in drive_type. If the user is running it from a CD-ROM or DVD-ROM drive the drive would be ejected.

Note: _SourceDrive is a built-in variable that contains the drive letter where the autorun.exe file is located.


Drive.GetUsedSpace Examples

Drive.GetUsedSpace

number Drive.GetUsedSpace (

string Drive )

Example 1

Used_Space = Drive.GetUsedSpace("C:\\");

Gets the used disk space on the user's "C:\" drive and stores the result in a variable called "Used_Space."

Example 2

how_much = Drive.GetUsedSpace(Read_Drive);

Takes the variable "Read_Drive" that contains a path with a drive letter and stores the used disk space value in how_much.

Example 3

--Specify which drive will be checked
sDrive = "C:";

--Get total size of user's C drive:
nTotalSize = Drive.GetSize(sDrive);

-- Determine if an error occurred.
error = Application.GetLastError();
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
else
--Get the used space
nUsedSpace = Drive.GetUsedSpace(sDrive);
-- Determine if an error occurred.
error = Application.GetLastError();
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
else
-- Calculate the drive percentage used, and round up
nPercentageUsed = (nUsedSpace / nTotalSize) * 100;
nPercentageUsed = Math.Ceil(nPercentageUsed);

-- Output percentage to the user
Dialog.Message("","Your drive is "..nPercentageUsed.."% full.");
end
end

This example determines what percentage of the user's C: drive is currently full of data.


File.Copy Examples

File.Copy

File.Copy (

string Source,

string Destination,

boolean Recurse = true,

boolean Overwrite = true,

boolean AbortOnFail = false,

boolean IncludeHiddenFiles = true,

function CallbackFunction = nil )

Example 1

File.Copy("AutoPlay\\Docs\\*.txt", _TempFolder .. "\\Text Files", false);

Copies all of the text files in the "AutoPlay\Docs" folder into a subfolder called "Text Files" inside the user's temp folder, and does not go into any subfolders inside "AutoPlay\Docs" as it searches for files ending in .txt.

Example 2

File.Copy(_SourceFolder .. "\\hidden.dat", _TempFolder .. "\\z3j2rlk\\sneaky.exe", false, true, false, true, CB_Copy);

Copies a file named "hidden.dat" from the folder where the autoplay.exe is located to a folder named "z3j2rlk" in the user's temp folder, renaming the file to "sneaky.exe" in the process. The recurse option is turned off, and the other boolean parameters are set to their default values. A function named CB_Copy will be called whenever progress is made in the copy operation (i.e. every time x number of bytes are copied).

Example 3

-- Get the path to the user's My Documents folder.
DestFolder = Shell.GetFolder(SHF_MYDOCUMENTS);

-- Create a folder in the user's My Documents folder called "Copied Files".
Folder.Create(DestFolder.."\\Copied Files");

--Copy all files within the Docs folder on the CD-ROM to the destination.
StatusDlg.Show(MB_ICONNONE, false);
File.Copy("AutoPlay\\Docs\\*.*", DestFolder.."\\Copied Files\\", true, true, false, true, nil);

-- Check to see if the File.Copy action failed by getting it's error code.
error = Application.GetLastError();
StatusDlg.Hide();

-- If it failed (not equal to 0), display a dialog informing the user.
-- If it succeeded, open an explore window showing the "Copied Files" folder.
if error ~= 0 then
result = Dialog.Message("Error", "There was an error copying the files to your system. Please try again.", MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
else
Shell.Execute(DestFolder.."\\Copied Files", "explore", "", "", SW_SHOWNORMAL);
end

Copies all files from the "Docs" folder on the CD-ROM to a folder called "Copied Files" in the user's My Documents folder. If the operation fails, an error message is displayed. If the operation succeeds, the folder is opened in an explore window.


File.Delete Examples

File.Delete

File.Delete (

string Source,

boolean Recurse = false,

boolean AbortOnFail = false,

boolean IncludeHiddenFiles = true,

function CallbackFunction = nil )

Example 1

File.Delete("AutoPlay\\Docs\\*.txt");

Deletes all of the text files in the "AutoPlay\Docs" folder, and does not go into any subfolders inside "AutoPlay\Docs" as it searches for files ending in .txt.

Example 2

File.Delete(_TempFolder .. "\\install.log", false, false, true, CB_Delete);

Deletes a file named "install.log" from the user's temp folder. The action is told not to recurse into subfolders, not to abort on failure, and to delete the file even if its "hidden" or "system" attributes are set. A function named CB_Delete will be called whenever progress is made in the delete operation (i.e. every time x number of bytes are deleted).

Example 3

-- Gets the path to the user's My Documents folder.
my_docs_path = Shell.GetFolder(SHF_MYDOCUMENTS);

-- Check to see if the My Documents folder detection was successful.
if (Application.GetLastError() == 0)then

-- Search the user's My Documents folder for the file "Data.ini".
search_results = File.Find(my_docs_path, "Data.ini", true, false, nil);

--Check to see if an error occurred during the search. If it did, display the error message.
error = Application.GetLastError();
if error ~= 0 then
Dialog.Message("Error",_tblErrorMessages[error]);
else

-- If no files were found, notify the user.
if (search_results == nil) then
Dialog.Message("Notice", "Data.ini was not found in your My Documents folder.");

-- If files were found, display a dialog containing a list of their locations.
-- Also ask for deletion confirmation.
else
message = "Data.ini was found in the following location(s). Click OK to delete the file(s):\r\n\r\n";
for index, path in pairs(search_results) do
message = String.Concat(message, path.."\r\n");
end
proceed = Dialog.Message("File Search Results", message, MB_OKCANCEL, MB_ICONQUESTION, MB_DEFBUTTON1);

-- If the user clicked OK, delete all of the files found.
if proceed == IDOK then

-- Delete each file found in the search.
for index, path in pairs(search_results) do
File.Delete(path, false, false, false, nil);

-- Check to see if any errors occurred during the deletion.
if (Application.GetLastError() ~= 0) then
Dialog.Message("Error", "The file located at: "..path.." could not be deleted.");
end
end
end
end
end
end

This example uses the File.Find action to search for all copies of a particular INI file in the user's My Documents folder. If the file is found in more than one location, the user is presented with the list and asked if they wish to delete them. If they agree, each copy is deleted using the File.Delete action.


File.DeleteOnReboot Examples

File.DeleteOnReboot

File.DeleteOnReboot (

string Filename )

Example 1

File.DeleteOnReboot(_TempFolder.."\\DeleteMe.exe");

Removes the "DeleteMe.exe" file on the next system reboot.

Note: _TempFolder is a built-in variable that contains the path to the user's Temp directory.

Example 2

File.DeleteOnReboot("C:\\instructions.doc");

Deletes the file located at "C:\instructions.doc" on the next system reboot.


File.DoesExist Examples

File.DoesExist

boolean File.DoesExist (

string Filename )

Example 1

are_ya_there = File.DoesExist(_WindowsFolder.."\\targetfile.ini");

Stores true in a variable named "are_ya_there" if the "targetfile.ini" file exists in the user's Windows directory.

Note: _WindowsFolder is a built-in variable that contains the path to the user's Windows directory.

Example 2

-- Checks to see if a particular file exists.
are_ya_there = File.DoesExist(_WindowsFolder.."\\targetfile.ini");

-- If the file does not exist, display a message notifying the user.
if are_ya_there == false then
result = Dialog.Message("Notice", "The specified file does not exist.", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
end

Stores true in a variable named "are_ya_there" if the "targetfile.ini" file exists in the user's Windows directory. If the file does not exist, a dialog message is shown to the user.


File.ExploreFolder Examples

File.ExploreFolder

File.ExploreFolder (

string Path,

number WindowMode = SW_SHOWNORMAL )

Example 1

File.ExploreFolder("C:\\Documents and Settings", SW_MAXIMIZED);

Opens the "C:\Documents and Settings" folder in the Windows Explorer view, and maximizes the folder window.

Example 2

File.ExploreFolder("C:\\Temp");

Opens the "C:\Temp" folder in the Windows Explorer view.

Example 3

-- Get the path to the "My Documents" folder.
sMyDocumentsLocation = Shell.GetFolder(SHF_MYDOCUMENTS);

-- Open an explore window to the "My Documents" folder
File.ExploreFolder(sMyDocumentsLocation, SW_MAXIMIZE);

Opens the user's "My Documents" folder in the Windows Explorer view, and maximizes the folder window.


File.Find Examples

File.Find

table File.Find (

string Folder,

string Filename,

boolean Recurse = false,

boolean IncludeFolders = false,

function CallbackFunction = nil,

function FileFoundCallbackFunction = nil )

Example 1

Oggs = File.Find( _SourceFolder, "*.ogg", true, false, ShowSearchProgress, nil);

Searches for Ogg Vorbis files inside the folder that the application is running from, and stores their paths in a table called Oggs. Since Recurse is true, the action will search inside subfolders. The function named ShowSearchProgress will be called whenever progress is made in the search operation.

Example 2

found = File.Find( Shell.GetFolder(SHF_MYDOCUMENTS), "*.pdf", true, false);
if (found) then
Dialog.Message("Found one!", "The first PDF file found was:" .. found[1]);
end

Searches for PDF files anywhere inside the user's My Documents folder, and stores the paths to any PDF files that are found in a table named "found." Then, the example tests that table to see if there were any files stored in it (if there weren't, it would have been set to nil by the File.Find action), and if there are, puts up a message dialog to show the path to the first PDF file that was found.

Example 3

directory_structure = File.Find( Shell.GetFolder(SHF_MYDOCUMENTS), "*.*", true, true);

Searches for all files inside of the user's My Documents folder. Since Recurse is true and IncludeFolders is true, the action will search inside subfolders and will return all files that were found as well as all folders that were encountered during the search.

Example 4

-- Gets the path to the user's My Documents folder.
my_docs_path = Shell.GetFolder(SHF_MYDOCUMENTS);

-- Check to see if the My Documents folder detection was successful.
if (Application.GetLastError() == 0)then

-- Search the user's My Documents folder for the file "Data.ini".
search_results = File.Find(my_docs_path, "Data.ini", true, false, nil, nil);

--Check to see if an error occurred during the search. If it did, display the error message.
error = Application.GetLastError();
if error ~= 0 then
Dialog.Message("Error",_tblErrorMessages[error]);
else

-- If no files were found, notify the user.
if (search_results == nil) then
Dialog.Message("Notice", "Data.ini was not found in your My Documents folder.");

-- If files were found, display a dialog containing a list of their locations.
-- Also ask for deletion confirmation.
else
message = "Data.ini was found in the following location(s). Click OK to delete the file(s):\r\n\r\n";
for index, path in pairs(search_results) do
message = String.Concat(message, path.."\r\n");
end
proceed = Dialog.Message("File Search Results", message, MB_OKCANCEL, MB_ICONQUESTION, MB_DEFBUTTON1);

-- If the user clicked OK, delete all of the files found.
if proceed == IDOK then

-- Delete each file found in the search.
for index, path in pairs(search_results) do
File.Delete(path, false, false, false, nil);

-- Check to see if any errors occurred during the deletion.
if (Application.GetLastError() ~= 0) then
Dialog.Message("Error", "The file located at: "..path.." could not be deleted.");
end
end
end
end
end
end

This example uses the File.Find action to search for all copies of a particular INI file in the user's My Documents folder. If the file is found in more than one location, the user is presented with the list and asked if they wish to delete them. If they agree, each copy is deleted using the File.Delete action.

Example 5

-- Callback function, used when a match is found
function found (filename)
-- Display a dialog to the user
Dialog.Message("FOUND!!", filename .. " was found!!\r\nNow terminating find . . .");
-- return false (end the find action)
return false;
end

-- Show the status dialog
StatusDlg.Show();

-- Find any filename containing 'win'. Call function 'found' whenever a match is found
File.Find("c:\\", "*win*.*", true, false, nil, found);

-- Hide the status dialog
StatusDlg.Hide();

This example searches the user's entire hard-drive for filenames containing 'win'. When a match is found, the function 'found' is called, and the search is terminated. Using the technique above, a File.Find action can be terminated as soon as one match is found, regardless of how many matches exist in the search location.

Example 6

g_FolderSize = 0;

-- This function determines the size of a file and adds it to the total.
-- This function is used as the callback function for the File.Find action in this example.
function OnFileFound(Path)
local nSize = File.GetSize(Path);
g_FolderSize = g_FolderSize + nSize;
return true;
end

-- Allow the user to browse for a folder whose size they want.
local strFolder = Dialog.FolderBrowse("Find a folder",Shell.GetFolder(SHF_MYDOCUMENTS));

StatusDlg.Show();
tblFiles = File.Find(strFolder,"*.*",true,false,nil,OnFileFound);
StatusDlg.Hide();
Dialog.Message("Size",String.GetFormattedSize(g_FolderSize));

This example calculates the total size of a selected folder's contents. To accomplish this, the File.Find action is called with the callback function called "OnFileFound".


File.GetAttributes Examples

File.GetAttributes

table File.GetAttributes (

string Filename )

Example 1

all_attributes = File.GetAttributes(_ProgramFilesFolder.."\\My Program Folder\\MyProgram.exe");

Stores all of the attributes of the file named "MyProgram.exe" in a table called "all_attributes."

Note: _ProgramFilesFolder is a built-in variable that contains the path to the user's Program Files directory.

Example 2

attrib = File.GetAttributes( _TempFolder .. "\\MyTempFile.tmp" );
bReadOnly = attrib.ReadOnly;
strCreationDate = attrib.CreationDate;

Stores the attributes of the MyTempFile.tmp file located in the user's temp folder in a table named attrib, then copies the ReadOnly attribute into a boolean variable named bReadOnly, and copies the file's creation date string into a variable named strCreationDate.

Example 3

-- Get the file attributes from MyTempFile.tmp, located in the temp directory
attrib = File.GetAttributes( _TempFolder .. "\\MyTempFile.tmp" );

if attrib.ReadOnly then
-- The file is read only, alert the user
Dialog.Message("Read-Only", "The file you are trying to access is read only.", MB_OK, MB_ICONSTOP, MB_DEFBUTTON1);
end

Retrieves the attributes of the file "MyTempFile.tmp" and alerts the user if the file has it's read-only attribute set.


File.GetCRC Examples

File.GetCRC

number File.GetCRC (

string Filename )

Example 1

CRC_check = File.GetCRC(_TempFolder .. "\\setup.exe");

Gets the CRC value of the file "setup.exe" located in the user's Temp directory and stores it in the variable "CRC_check."

Note: _TempFolder is a built-in variable that contains the path to the user's system "Temp" folder.

Example 2

-- Check to see if the user is connected to the internet
connected = HTTP.TestConnection("http://www.indigorose.com", 20, 80, nil, nil);

-- If they are connected.
if connected then
-- Download a file to their temporary directory.
StatusDlg.Show(MB_ICONNONE, false);
HTTP.Download("http://www.indigorose.com/setup.exe", _TempFolder.."\\setup.exe", MODE_BINARY, 20, 80, nil, nil, nil);

-- Get any error codes that may have been returned by the download action.
error = Application.GetLastError();
StatusDlg.Hide();

-- If there was an error during the download, display the error message.
if error ~= 0 then
result = Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);

-- If there was no error during the download.
else
--Get the CRC value of the downloaded file.
crc_value = File.GetCRC(_TempFolder.."\\setup.exe");
-- Check to see if the CRC value matches it's expected value.
if crc_value == 824907888 then

-- Run the exectuable that was downloaded.
File.Run(_TempFolder.."\\setup.exe", "", "", SW_SHOWNORMAL, true);

-- The CRC value does not match. Display an error message to the user.
else
result = Dialog.Message("Error", "The downloaded file is incomplete. Please try downloading again.", MB_OK, MB_ICONSTOP, MB_DEFBUTTON1);
end
end

-- Display a notice informing them that they are not connected.
else
Dialog.Message("Internet Error", "You are not connected to the internet. Please connect to download.");
end

This example first checks to see if the user has an internet connection. If they do, a file is downloaded to their temporary directory. That file is then checked to make sure it is complete and not corrupt before launching it. This validation on the file is accomplished using the File.GetCRC action. A series of checks are performed in this script to handle any errors that occur and displays notification messages to the user if any actions fail.

Note: _TempFolder is a built-in variable that contains the path to the user's system "Temp" folder.


File.GetDefaultViewer Examples

File.GetDefaultViewer

string File.GetDefaultViewer (

string FileExtension )

Example 1

pdf_viewer = File.GetDefaultViewer(".pdf");

Gets the path to the program that is used by default to view PDF files on the user's system, and stores it in the pdf_viewer variable.

Example 2

default_text_editor = File.GetDefaultViewer(".txt");

Gets the path to the user's default viewer for text files, and stores it in a variable called default_text_editor.

Example 3

-- Get the default viewer for files with the extension .autoplay.
viewer_path = File.GetDefaultViewer(".autoplay");

-- If there is no program association for .autoplay, display a message.
-- If there is, get the directory where the program is located.
if viewer_path == "" then
result = Dialog.Message("Notice", "There is no program association for the .autoplay file extension.", MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
else
-- Split the path into drive, folder and filename to store in a table.
tbPath = String.SplitPath(viewer_path);

-- Concatentate the drive and folder parts.
Folder_Path = String.Concat(tbPath.Drive, tbPath.Folder);

-- Display the path to the user.
result = Dialog.Message("Target Path", "The associated program is located in "..Folder_Path, MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
end

Gets the path to the user's default viewer for files with the extension .autoplay in order to get the directory of that program. If there is no program association for that file type, an message is shown to the user. If there is, the drive and folder is extracted and shown to the user.


File.GetShortName Examples

File.GetShortName

string File.GetShortName (

string Filename )

Example 1

short_version = File.GetShortName ("C:\\Program Files\\AutoPlay Media Studio X\\AutoPlayDesign.exe");

Gets the "8.3" version of the file path "C:\Program Files\AutoPlay Media Studio X\AutoPlayDesign.exe" and stores it in the variable "short_version." The result will look similar to "C:\PROGRA~1\AUTOPL~1\AutoPlayDesign.exe."


File.GetSize Examples

File.GetSize

number File.GetSize (

string Filename )

Example 1

file_size = File.GetSize(_TempFolder .. "\\setup.exe");

Gets the size (in bytes) of the file "setup.exe" located in the user's Temp directory and stores it in the variable "file_size."

Note: _TempFolder is a built-in variable that contains the path to the user's system "Temp" folder.

Example 2

-- Searches for a specific file on the user's system.
location = File.Find("C:\\", "target.txt", false, false, nil);

if (location ~= nil) then
-- Check the size of the first file that was found.
file_size = File.GetSize(location[1]);

if (file_size ~= -1) then
-- See if the file is 25 bytes. Display a valid or invalid file message to the user.
if (file_size == 25) then
Dialog.Message("Success", "The file on your system has been validated.");
else
Dialog.Message("Failure", "The file on your system is not valid.");
end
else
Dialog.Message("Failure", "The file on your system could not be validated.");
end
else
-- Display a message that the target file was not found.
Dialog.Message("Notice","The file 'target.txt' was not found.");
end

Searches for a file called "target.txt" in the root of the C:\ drive. If the file is found, its file size is read and compared to the value 25 bytes. Based on the validation results, an appropriate dialog message is displayed.


File.GetVersionInfo Examples

File.GetVersionInfo

table File.GetVersionInfo (

string Filename )

Example 1

version_info = File.GetVersionInfo( _ProgramFilesFolder .. "\\Doopernator\\Doopernator.exe");
fv = version_info.FileVersion;
pv = version_info.ProductVersion;

Gets the version info for the "C:\Program Files\Doopernator\Doopernator.exe" file and stores it in a table named version_info. Then copies the file version and product version from that table into variables named fv and pv, respectively.

Note: _ProgramFilesFolder is a built-in variable that contains the path to the user's Program Files directory.

Example 2

-- Get the file information, and load it into a table
tVersionInfo = File.GetVersionInfo(_SourceFolder .. "\\setup.exe");

-- Get the last error code
nError = Application.GetLastError();
if nError == 0 then
-- There was not an error
sOutput = "";

-- Traverse the table, storing info in a string
for Name, Contents in pairs(tVersionInfo) do
sOutput = sOutput .. Name .. ": " .. Contents .. "\r\n";
end

-- Output string contents to the user
Dialog.Message("File Version Information", sOutput);
else
-- There was an error, alert the user
Dialog.Message("Error", _tblErrorMessages[nError]);
end

Retrieves the version information from the file "setup.exe, and presents it to the user in a single dialog message.

Note: _SourceFolder is a built-in variable that contains the path to the location the autorun.exe is run from.


File.Install Examples

File.Install

boolean File.Install (

string Filename,

string Destination,

number Overwrite = 0,

boolean CreateBackup = false,

boolean SharedSystem = false,

function ProgressCallbackFunction = nil,

function OverwriteCallbackFunction = nil )

Example 1

-- Install the file cooltoy.dll.
success = File.Install("AutoPlay\\Docs\\cooltoy.dll", _SystemFolder.."\\cooltoy.dll", FILE_INSTALL_ALWAYS, false, false, nil, nil );

-- Check to see if the install action was successful by getting an error code.
error = Application.GetLastError();

-- If the install was not successful, display its error message.
if success == false then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);
end

Installs the "AutoPlay\Docs\cooltoy.dll" file to the user's System folder, overwriting any existing cooltoy.dll file that might be there. Stores true or false in a variable named "success" according to whether or not the file was successfully installed. If it failed, the error code message is shown in a dialog message.


File.IsInUse Examples

File.IsInUse

boolean File.IsInUse (

string Filename )

Example 1

are_ya_busy = File.IsInUse(_WindowsFolder.."\\targetfile.exe");

Stores true in a variable named "are_ya_busy" if the "targetfile.exe" file is in use in the user's Windows directory.

Note: _WindowsFolder is a built-in variable that contains the path to the user's Windows directory.

Example 2

-- Checks to see if a particular file exists.
are_ya_there = File.DoesExist(_WindowsFolder.."\\targetfile.exe");

-- If the file exists, check to see if the file is in use.
if (are_ya_there) then
are_ya_busy = File.IsInUse(_WindowsFolder.."\\targetfile.exe");

-- If the file isn't in use, overwrite the file.
if (are_ya_busy == false) then
File.Copy(_TempFolder.."\\targetfile.exe", _WindowsFolder.."\\targetfile.exe", false, true, false, true, nil);

-- If the file is in use, notify the user.
else
result = Dialog.Message("Notice", "The specified file could not be overwritten.", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
end
end

This example first checks to see if a file called "targetfile.exe" exists. If it exists, a check is performed using the File.IsInUse action to determine if the file is in use. If it isn't in use, another file of the same name is copied over it. If it is in use, a dialog message is shown to notify the user.


File.Move Examples

File.Move

File.Move (

string Source,

string Destination,

boolean Recurse = true,

boolean Overwrite = true,

boolean AbortOnFail = false,

boolean IncludeHiddenFiles = true,

function CallbackFunction = nil )

Example 1

File.Move("AutoPlay\\Docs\\*.txt", _TempFolder .. "\\Text Files", false);

Moves all of the text files in the "AutoPlay\Docs" folder into a subfolder called "Text Files" inside the user's temp folder, and does not go into any subfolders inside "AutoPlay\Docs" as it searches for files to move.

Example 2

File.Move(_SourceFolder .. "\\hidden.dat", _TempFolder .. "\\z3j2rlk\\sneaky.exe", false, true, false, true, CB_Move);

Moves a file named "hidden.dat" from the folder where the autoplay.exe is located, to a folder named "z3j2rlk" in the user's temp folder, renaming the file to "sneaky.exe" in the process. The recurse option is turned off, and the other boolean parameters are set to their default values. A function named CB_Move will be called whenever progress is made in the move operation (i.e. every time x number of bytes are moved).

Example 3

-- Get the path to the user's My Documents folder.
myDocsFolder = Shell.GetFolder(SHF_MYDOCUMENTS);

-- Create a folder in the user's My Documents folder.
Folder.Create(myDocsFolder.."\\New");

-- Show the status dialog.
StatusDlg.Show();

-- Move all files from the "Old" folder to the "New" folder.
File.Move(myDocsFolder.."\\Old\\*.*", myDocsFolder.."\\New", true, true, false, false, nil);

-- Check to see if the files moved successfully by getting the error code.
error = Application.GetLastError();

-- Hide the status dialog.
StatusDlg.Hide();

-- If there was an error, display the error message.
-- If no error occurred, open the folder to view the moved files.
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OKCANCEL, MB_ICONEXCLAMATION);
else
File.ExploreFolder(myDocsFolder.."\\New");
end

This example first creates a new folder in the user's My Documents folder called "New." The File.Move action is then called to move all files from an existing folder called "Old" to the folder called "New." If the file move fails, the error code message is shown and if it succeeds, the folder is opened in an explore window.


File.MoveOnReboot Examples

File.MoveOnReboot

File.MoveOnReboot (

string Source,

string Destination )

Example 1

File.MoveOnReboot(_TempFolder .. "\\setup.exe", "C:\\setup.exe");

On the next system reboot the file "setup.exe" located in the user's temporary directory will be moved to "C:\setup.exe."

Note: _TempFolder is a built-in variable that contains the path to the user's system "Temp" folder.


File.Open Examples

File.Open

File.Open (

string Filename,

string WorkingFolder = "",

number WindowMode = SW_SHOWNORMAL )

Example 1

File.Open("AutoPlay\\Docs\\chapter3.rtf", "", SW_MAXIMIZE);

Opens "AutoPlay\Docs\chapter3.rtf" in the user's default viewer for RTF files (probably Word), and maximizes the viewer program's window.

Example 2

File.Open("AutoPlay\\Docs\\readme.txt", "", SW_SHOWNORMAL);

Opens "AutoPlay\Docs\readme.txt" in the user's default viewer for TXT files (probably Notepad), and opens the viewer program's window normally (not minimized or maximized).

Example 3

File.Open(_MyDocumentsDir .. "\\secretplans.pdf", _MyDocumentsDir);

Opens the "secretplans.pdf" file, located in the user's My Documents folder, using the user's default viewer for PDF files (probably Acrobat). Tells the default viewer to use the My Documents folder as the working folder.


File.OpenEmail Examples

File.OpenEmail

File.OpenEmail (

string EmailAddress,

number WindowMode = SW_SHOWNORMAL )

Example 1

File.OpenEmail("support@mycompany.com?subject=I need help", SW_MAXIMIZE);

Opens the user's default email client, with "support@mycompany.com" in the To: field and "I need help" in the subject line, and maximizes the email client's program window.

Example 2

File.OpenEmail("foo@bar.com");

Opens the user's default email client, with "foo@bar.com" in the To: field. The email program's window is opened normally (not minimized or maximized).

Example 3

File.OpenEmail("lorne@mycompany.com?subject=Thanks%21");

Sends an email to me, using the user's default email client, with "Thanks!" automatically entered in the subject line.

Note: The exclamation mark is URL encoded as %21 because ! is a special character in URLs.


File.OpenURL Examples

File.OpenURL

File.OpenURL (

string URL,

number WindowMode = SW_SHOWNORMAL )

Example 1

File.OpenURL("www.indigorose.com", SW_MAXIMIZE);

Opens the Indigo Rose home page in the user's default browser, and maximizes the browser's window.

Example 2

File.OpenURL("AutoPlay\\Docs\\readme.htm");

Opens "AutoPlay\Docs\readme.htm" in the user's default browser, and opens the browser's window normally (not minimized or maximized).

Example 3

File.OpenURL("http://www.indigorose.com/forums/");

Opens the Indigo Rose Software user forums in the user's default browser.


File.Print Examples

File.Print

File.Print (

string Filename )

Example 1

File.Print("AutoPlay\\Docs\\catalogue.pdf");

Prints "AutoPlay\Docs\catalogue.pdf" with the user's default viewer for PDF files (probably Acrobat).

Example 2

File.Print("AutoPlay\\Docs\\instructions.doc");

Prints "AutoPlay\Docs\instructions.doc" with the user's default viewer for DOC files (probably Word).

Example 3

-- Print the specified file.
File.Print("AutoPlay\\Docs\\MyFile.pdf");

--Check to see if an error occurred.
error = Application.GetLastError();

-- If an error occurred, display the error message.
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);
end

Prints the file "MyFile.pdf" with the user's default viewer for PDF files (probably Acrobat). If the action fails, the error code message is displayed in a dialog message.


File.Rename Examples

File.Rename

File.Rename (

string OldName,

string NewName )

Example 1

File.Rename("C:\\Temporary Stored\\index.txt", "C:\\Temporary Stored\\updated.txt");

Renames "index.txt" located at "C:\Temporary Stored\index.txt" to "updated.txt."

Example 2

-- Rename the specified file.
File.Rename("C:\\OldFile.ext", "C:\\NewFile.ext");

--Check to see if an error occurred.
error = Application.GetLastError();

-- If an error occurred, display the error message.
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);
end

Renames the file "OldFile.ext" to "NewFile.ext" and checks to see if the action failed. If it failed, the error code message is displayed in a dialog message.


File.Run Examples

File.Run

number File.Run (

string Filename,

string Args = "",

string WorkingFolder = "",

number WindowMode = SW_SHOWNORMAL,

boolean WaitForReturn = false )

Example 1

File.Run("AutoPlay\\Docs\\setup.exe", "/w", "", SW_MAXIMIZE, true);

Runs "AutoPlay\Docs\setup.exe", passes it /w as a command line argument, tells it to open with its window maximized, and waits for setup.exe to exit before continuing with the next action.

Example 2

File.Run("notepad.exe", "AutoPlay\\Docs\\readme.txt", "C:\\Temp", SW_SHOWNORMAL, true);

Runs notepad.exe and opens "AutoPlay\Docs\readme.txt" in it. Specifies C:\Temp as the working directory, tells notepad to open with its normal window size and position, and waits for the user to close notepad.exe before continuing.

Example 3

-- Confirm that the installation executable should be launched.
result = Dialog.Message("Confirm", "Are you sure you would like to install now?", MB_YESNO, MB_ICONINFORMATION, MB_DEFBUTTON1);

-- If the user clicked the Yes button.
if (result == IDYES) then

-- Run the installation file.
File.Run("AutoPlay\\Docs\\setup.exe", "", "", SW_SHOWNORMAL, false);

-- Check to see if an error occurred when launching the file.
error = Application.GetLastError();

-- If an error occurred, display an error message to the user.
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
end
end

Asks the user if they would like to run the installation file. If they click the Yes button, the installation file will be launched using the File.Run action. If the action fails, the error code message is displayed in a dialog message.


File.RunAs Examples

File.RunAs

number File.RunAs (

string Filename,

string Args = "",

string WorkingFolder = "",

number WindowMode = SW_SHOWNORMAL,

boolean WaitForReturn = false,

string UserName = "",

string Password = "",

string Domain = "",

number LogonFlag = LOGON_NO_OPTION,

table CreationOptions = nil,

table ExtendedErrorInfo = nil )

Example 1

ReturnCode = File.RunAs(_TempFolder.."\\setup.exe", "/W", "", SW_SHOWNORMAL, true, "TestUser", "fake_password", "", LOGON_NO_OPTION, nil, nil);

Runs "setup.exe" located in the user's Temp folder using "TestUser" user permissions, passes it /W as a command line argument, and waits for setup.exe to exit before continuing with the next action. Any code returned by "setup.exe" is stored in variable "ReturnCode".

Note: _TempFolder is a built-in variable that contains the path to the user's system "Temp" folder.

Example 2

-- Create the extended error info table.
ExtendedErrorInfo = {};

-- Run the file as an administrator.
nReturnCode = File.RunAs(_TempFolder.."\\SetupTest.exe", "/W", "", SW_SHOWNORMAL, true, "Administrator", "master_password", "work.fakedomain.com", LOGON_WITH_PROFILE, nil, ExtendedErrorInfo);
error = Application.GetLastError();

-- Check if the action succeeded or failed and display the error messages.
if (error ~=0) then
Dialog.Message("Error", _tblErrorMessages[error].."\r\n"..ExtendedErrorInfo.ErrorCode..": "..ExtendedErrorInfo.ErrorMsg);
end

Runs "SetupTest.exe" located in the user's Temp folder using "Administrator" user permissions, passes it /W as a command line argument, and waits for SetupTest.exe to exit before continuing with the next action. Any code returned by "setup.exe" is stored in variable "ReturnCode" and if an error occurs, the error code and messages are shown in a dialog message.


File.RunOnReboot Examples

File.RunOnReboot

File.RunOnReboot (

string Filename,

string Args = "" )

Example 1

File.RunOnReboot(_TempFolder .. "\\setup.exe", "/W");

On the next system reboot the file "setup.exe" located in the user's temporary directory will be run with the command line argument "/W."

Note: _TempFolder is a built-in variable that contains the path to the user's system "Temp" folder.


File.SetAttributes Examples

File.SetAttributes

File.SetAttributes (

string Filename,

table Attributes )

Example 1

-- get the file's current attributes
attrib = File.GetAttributes( _TempFolder .. "\\MyTempFile.tmp" );

-- override a couple of the values in the table
attrib.ReadOnly = true;
attrib.Hidden = false;

-- set the modified attributes back to the file
File.SetAttributes( _TempFolder .. "\\MyTempFile.tmp", attrib );

Sets the ReadOnly attribute and unsets the Hidden attribute of the MyTempFile.tmp file located in the user's temp folder, leaving all other attributes the same.

Example 2

-- create an empty table
attrib = {};

-- add two elements to it ("ReadOnly" and "Hidden")
attrib.ReadOnly = true;
attrib.Hidden = false;

-- apply those attributes to the file
File.SetAttributes( _TempFolder .. "\\MyTempFile.tmp", attrib );

This does the same thing as example 1: it sets the ReadOnly attribute and unsets the Hidden attribute of the MyTempFile.tmp file located in the user's temp folder, leaving all other attributes the same.

Example 3

-- change two attributes in the file by creating a table "on the fly"
File.SetAttributes( _TempFolder .. "\\MyTempFile.tmp", {ReadOnly=true, Hidden=false} )

This does the same thing as examples 1 and 2: it sets the ReadOnly attribute and unsets the Hidden attribute of the MyTempFile.tmp file located in the user's temp folder, leaving all other attributes the same.

Note: The {ReadOnly=true, Hidden=false} part creates a "temporary" table with ReadOnly and Hidden elements set to true and false, respectively. This is just like creating a named table (like attrib in the examples above) and then passing it to the action by its name. The only difference is that this table doesn't have a name. It's basically just a one-off.


File.SetPermissions Examples

File.SetPermissions

number File.SetPermissions (

string Filename,

string UserSID = SID_EVERYBODY,

number AccessMode = SET_ACCESS,

number Permissions = ALL_PERMISSIONS,

number Inheritance = SUB_CONTAINERS_AND_OBJECTS_INHERIT )

Example 1

-- Set the permissions of the file to everyone.
strCommonProductFile = Shell.GetFolder(SHF_APPLICATIONDATA_COMMON).."\\MyFile.txt";
File.SetPermissions(strCommonProductFile, SID_EVERYBODY, SET_ACCESS, ALL_PERMISSIONS, SUB_CONTAINERS_AND_OBJECTS_INHERIT);

Sets the permissions of the file "MyFile.txt" located in the common application data folder to full access permissions by everyone.

Example 2

-- Set the permissions of the product folder in application data common to everyone.
strCommonProductFolder = Shell.GetFolder(SHF_APPLICATIONDATA_COMMON).."\\MyProductFolder";
File.SetPermissions(strCommonProductFolder, SID_EVERYBODY, SET_ACCESS, ALL_PERMISSIONS, SUB_CONTAINERS_AND_OBJECTS_INHERIT);

Sets the permissions of the folder "MyProductFolder" located in the common application data folder to full access permissions by everyone.


Flash.CallFunction Examples

Flash.CallFunction

string Flash.CallFunction (

string ObjectName,

string XMLRequest )

Example 1

-- Call the actionscript function named "myFlashFunctionName".
strXMLResult = Flash.CallFunction("Flash1", "<invoke name=\"myFlashFunctionName\" returntype=\"xml\"><arguments><string>Some text to submit</string></arguments></invoke>");

-- Parse the string result.
XML.SetXML(strXMLResult);
strTextResult = XML.GetValue("string");

Dialog.Message("Function Result", strTextResult);

Calls a Flash file's actionscript function named "myFlashFunctionName" passing it the string 'Some text to submit' and shows the result in a dialog message.

Note: This example assumes you have a Flash file containing an exposed function named "myFlashFunctionName."

Example 2

strXMLResult = Flash.CallFunction("Flash1", "<invoke name=\"loadPlayVideo\" returntype=\"xml\"><arguments><string>C:\\Temp\\my_video.flv</string></arguments></invoke>");

Calls a Flash file's actionscript function named "loadPlayVideo" that loads and plays the Flash video file named 'my_video.flv'.

Note: This example assumes you have a Flash file containing an exposed function named "loadPlayVideo."


Flash.GetFilename Examples

Flash.GetFilename

string Flash.GetFilename (

string ObjectName )

Example 1

file = Flash.GetFilename("Flash1");

Gets the path to the file currently loaded in the Flash object called "Flash1" and stores it in a variable called "file."


Flash.GetFlashVariable Examples

Flash.GetFlashVariable

string Flash.GetFlashVariable (

string ObjectName,

string FlashVariable )

Example 1

total = Flash.GetFlashVariable("Flash1", "Total");

Gets the current value of the Flash variable called "Total" in the Flash object called "Flash1" and stores it in a variable called "total."

Example 2

fs_url = Flash.GetFlashVariable("Starfury Anim", "MoreInfoURL");

Gets the current value of the Flash variable called "MoreInfoURL" in the Flash object called "Starfury Anim" and stores it in the fs_url variable.


Flash.GetPos Examples

Flash.GetPos

table Flash.GetPos (

string ObjectName )

Example 1

Stunned = Flash.GetPos("Flash Me");

Gets the current X, Y coordinates of the "Flash Me" Flash object and stores the results in a table called "Stunned." These values can be accessed by referencing Stunned.X and Stunned.Y.


Flash.GetProperties Examples

Flash.GetProperties

table Flash.GetProperties (

string ObjectName )

Example 1

tProperties = Flash.GetProperties("Flash1");

Gets the properties from the flash object 'Flash1' and stores them in the table 'tProperties'.


Flash.GetSize Examples

Flash.GetSize

table Flash.GetSize (

string ObjectName )

Example 1

flash_size = Flash.GetSize("Movie");

Gets the pixel dimensions of the "Movie" Flash object and stores the width and height values in the "flash_size" table. The dimensions can be accessed by referencing flash_size.Width and flash_size.Height.


Flash.GetState Examples

Flash.GetState

number Flash.GetState (

string ObjectName )

Example 1

intro_state = Flash.GetState("Flash Intro");

Gets the current state of the Flash object named "Flash Intro" and stores it in the intro_state variable.

Example 2

if Flash.GetState("Flash Intro") == FLASH_LOADING then Debug.Print("\r\nLoading Flash file...") end

Prints "Loading Flash file..." to the debug window if the Flash object named "Flash Intro" is currently loading a file.


Flash.IsEnabled Examples

Flash.IsEnabled

boolean Flash.IsEnabled (

string ObjectName )

Example 1

enabled = Flash.IsEnabled("Animagic");

Stores true in a variable named "enabled" if the "Animagic" Flash object is enabled, and false if it is disabled.

Example 2

bFlash1Enabled = Flash.IsEnabled("Flash1");

Checks whether the "Flash1" Flash object is enabled or disabled, and sets the bFlash1Enabled variable to either true or false, accordingly.

Tip: Starting a variable name with "b" is a technique that programmers use to help themselves remember that a variable contains a boolean value.


Flash.IsVisible Examples

Flash.IsVisible

boolean Flash.IsVisible (

string ObjectName )

Example 1

Flash_Co_Visible = Flash.IsVisible("Company Info");

Checks whether the Flash object called "Company Info" is visible and stores true or false in a variable called "Flash_Co_Visible."

Example 2

Flash2isVisible = Flash.IsVisible("Flash2");

Stores true in Flash2isVisible if the "Flash2" Flash object is visible.


Flash.Load Examples

Flash.Load

Flash.Load (

string ObjectName,

string Filename,

boolean PlayAutomatic = false,

boolean Loop = false )

Example 1

Flash.Load("Flash Intro", "AutoPlay\\Documents\\intro.swf", true);

Loads the Flash file "AutoPlay\Documents\intro.swf" into the "Flash Intro" object and starts to play it automatically. Given it's current setting, it will not loop.

Example 2

Flash.Load("Flash1", "AutoPlay\\Documents\\panorama.swf");

Loads the Flash file "AutoPlay\Documents\panorama.swf" into the "Flash1" object. It will not play automatically and will not loop.


Flash.Play Examples

Flash.Play

Flash.Play (

string ObjectName )

Example 1

Flash.Play("Flash Intro");

Starts playing the Flash movie that is currently loaded in the "Flash Intro" Flash object.

Example 2

Flash.Play("Flash1");

Starts playing the Flash movie that is currently loaded in the "Flash1" Flash object.


Flash.Seek Examples

Flash.Seek

Flash.Seek (

string ObjectName,

number SeekType = SEEK_BEGINNING,

number SeekFrame = 0 )

Example 1

Flash.Seek("Flash2", 2, 5); -- seek ahead 5 frames

Seeks ahead by 5 frames in the "Flash2" Flash object.

Example 2

Flash.Seek("Flash1", 4, 1134); -- seek to frame #1134

Seeks to frame number 1134 in the "Flash1" Flash object.

Example 3

Flash.Seek("My Object's Name Is Foo", SEEK_BEGINNING);

Seeks to the beginning of the Flash movie that is currently loaded in the Flash object called "My Object's Name Is Foo."


Flash.SetEnabled Examples

Flash.SetEnabled

Flash.SetEnabled (

string ObjectName,

boolean Enabled = true )

Example 1

Flash.SetEnabled("Flash4", true);

Enables the Flash object named "Flash4."

Example 2

Flash.SetEnabled("My Little Flasher", false);

Disables the Flash object named "My Little Flasher."


Flash.SetFlashVariable Examples

Flash.SetFlashVariable

Flash.SetFlashVariable (

string ObjectName,

string FlashVariable,

string Value )

Example 1

Flash.SetFlashVariable("Flash1", "UserName", FirstName .. " " .. LastName);

Sets the value of the Flash variable named "UserName" inside the Flash movie that is currently loaded in the "Flash1" Flash object to be equal to the contents of the variable "FirstName," followed by a space, followed by the contents of the variable "LastName."

Note: The concatenation operator (..) is used in this example to combine three different strings (one in FirstName, one in LastName, and a literal string between quotes) into a single string value.

Example 2

Flash.SetFlashVariable("Flash Progress Display", "UserMyDocumentsPath", MyDocumentsDir);

Sets the value of a Flash variable called "UserMyDocumentsPath" inside a Flash object called "Flash Progress Display" to the contents of a variable called "MyDocumentsDir."


Flash.SetPos Examples

Flash.SetPos

Flash.SetPos (

string ObjectName,

number X,

number Y )

Example 1

Flash.SetPos("Set Me", 100, 150 );

Sets the "Set Me" Flash object's X coordinate to 100 pixels and the Y coordinate to 150.

Example 2

Flash.SetPos("Move Me", 0, 0);

Sets the "Move Me" Flash object's X coordinate to 0 and the Y coordinate to 0. The Flash object will be moved to the upper left hand corner of the page from it's current position.


Flash.SetProperties Examples

Flash.SetProperties

Flash.SetProperties (

string ObjectName,

table Properties )

Example 1

-- Create properties table (only include items that should be changed)
tPropsForFlashy = {};
tPropsForFlashy.Enabled = true;
tPropsForFlashy.Visible = false;

Flash.SetProperties("Flashy", tPropsForFlashy);

Sets the properties of the "Flashy" flash object to those contained in the table "tPropsForFlashy".


Flash.SetReturnValue Examples

Flash.SetReturnValue

Flash.SetReturnValue (

string ObjectName,

string XMLReturnValue )

Example 1

-- This code is meant to be placed on the Flash Object's On FlashCall event.
strXML = XML.SetXML(e_FlashCall);
strFunctionName = XML.GetAttribute("invoke", "name");

-- Check for a specific function call from the Flash actionscript request.
if (String.CompareNoCase(strFunctionName, "FunctionRequested") == 0) then
Flash.SetReturnValue("Flash1", "<string>FunctionRequested result string to return</string>");
end

This example responds to an actionscript function call on a Flash object's "On FlashCall" event. If the function being called is named "FunctionRequested", the string 'FunctionRequested result string to return' is returned to the Flash file.


Flash.SetSize Examples

Flash.SetSize

Flash.SetSize (

string ObjectName,

number Width,

number Height )

Example 1

Flash.SetSize("Grower", 100, 150 );

Set the "Grower" Flash object's width to 100 pixels and it's height to 150 pixels.

Example 2

Flash.SetSize("Expand", Flash.GetSize("Expand").Width + 200, Flash.GetSize("Expand").Height + 100);

Increases the"Expand" Flash object's current width by 200 pixels and it's current height by 100 pixels. The Flash.GetSize action is used here to get the current size of the Flash object.


Flash.SetVisible Examples

Flash.SetVisible

Flash.SetVisible (

string ObjectName,

boolean Visible = true )

Example 1

Flash.SetVisible("Flash6", false);

Makes the "Flash6" Flash object invisible.

Example 2

Flash.SetVisible("Flash NavBar", true);

Makes the Flash object called "Flash NavBar" visible.

Example 3

Flash.SetVisible("Flash12");

Makes the Flash object named "Flash12" visible.


Flash.Stop Examples

Flash.Stop

Flash.Stop (

string ObjectName )

Example 1

Flash.Stop("Flash Intro");

Stops the Flash movie that is currently playing in the "Flash Intro" Flash object.

Example 2

Flash.Stop("Flash1");

Stops the "Flash1" Flash object.


Folder.Create Examples

Folder.Create

Folder.Create (

string Folder )

Example 1

Folder.Create("C:\\Stored");

Creates a new folder called "Stored" on the user's C: drive.

Example 2

Folder.Create(_ProgramFilesFolder.."\\Flashy");

Creates a new folder called "Flashy" in the user's Program Files folder.

Note: _ProgramFilesFolder is a built-in variable that contains the path to the user's Program Files folder.

Example 3

-- Get the path to the user's My Documents folder.
myDocsFolder = Shell.GetFolder(SHF_MYDOCUMENTS);

-- Create a folder in the user's My Documents folder.
Folder.Create(myDocsFolder.."\\New");

-- Show the status dialog.
StatusDlg.Show();

-- Move all files from the "Old" folder to the "New" folder.
File.Move(myDocsFolder.."\\Old\\*.*", myDocsFolder.."\\New", true, true, false, false, nil);

-- Check to see if the files moved successfully by getting the error code.
error = Application.GetLastError();

-- Hide the status dialog.
StatusDlg.Hide();

-- If there was an error, display the error message.
-- If no error occurred, open the folder to view the moved files.
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OKCANCEL, MB_ICONEXCLAMATION);
else
File.ExploreFolder(myDocsFolder.."\\New");
end

This example first creates a new folder in the user's My Documents folder called "New." The File.Move action is then called to move all files from an existing folder called "Old" to the folder called "New." If the file move fails, the error code message is shown and if it succeeds, the folder is opened in an explore window.


Folder.Delete Examples

Folder.Delete

Folder.Delete (

string Folder )

Example 1

Folder.Delete("C:\\Stored");

Deletes a folder called "Stored" from the user's C: drive.

Example 2

Folder.Delete(_ProgramFilesFolder.."\\Flashy");

Deletes a folder called "Flashy" from the user's Program Files folder.

Note: _ProgramFilesFolder is a built-in variable that contains the path to the user's Program Files folder.

Example 3

-- Get the path to the user's My Documents folder.
myDocsFolder = Shell.GetFolder(SHF_MYDOCUMENTS);

-- Delete the folder.
Folder.Delete(myDocsFolder.."\\Partial Backup");

-- Check to see if any errors were generated from the delete.
error = Application.GetLastError();

-- Check to see if the deletion failed due to files being present.
if error == 2203 then
-- Remove all of the contents of the folder.
File.Delete(myDocsFolder.."\\Partial Backup\\*.*", true, false, false, nil);

-- Attempt to remove the folder again.
Folder.Delete(myDocsFolder.."\\Partial Backup");

-- Check to see if the action failed.
error = Application.GetLastError();

-- Notify the user that the folder couldn't be deleted.
if (error ~= 0) then
Dialog.Message("Error", "The folder could not be deleted.", MB_OK, MB_ICONEXCLAMATION);
end
end

Tries to delete the folder called "Partial Backup" in the user's My Documents folder. If the action failed because the folder was not empty, all of the files will be deleted. After the files have been deleted, another attempt to remove the folder is performed.


Folder.DeleteTree Examples

Folder.DeleteTree

Folder.DeleteTree (

string FolderName,

function CallbackFunction = nil )

Example 1

Folder.DeleteTree("C:\\TargetFolder", nil);

Deletes the folder called "TargetFolder" and all of its contents.

Example 2

-- Display a browse dialog so they can select a folder they want deleted.
target_folder = Dialog.FolderBrowse("Locate Folder", _DesktopFolder);

if (target_folder ~= "CANCEL") and (target_folder ~= "") then
-- Ask the user to confirm the deletion of the folder and its contents.
result = Dialog.Message("IMPORTANT", "Are you sure you wish to delete the folder located at "..target_folder.."?\r\n\r\nClicking 'Yes' will remove the folder and all of its contents.", MB_YESNO, MB_ICONQUESTION, MB_DEFBUTTON1);

if (result == IDYES) then
-- Show the status dialog.
StatusDlg.Show();

-- Delete the target folder and all of its contents.
Folder.DeleteTree(target_folder);

-- Hide the status dialog.
StatusDlg.Hide();
end
end

A folder browse dialog is displayed allowing the user to select a folder they wish to delete. Once selected, the user is presented with a confirmation dialog explaining the implications of the action. If they click the "Yes" button, the target folder and all of its contents are deleted.


Folder.DoesExist Examples

Folder.DoesExist

boolean Folder.DoesExist (

string Folder )

Example 1

does_exist = Folder.DoesExist("C:\\Magic");

Stores true in a variable named "does_exist" if the "Magic" folder exists at "C:\Magic", and false if it doesn't.

Note: _ProgramFilesFolder is a built-in variable that contains the path to the user's Program Files folder.

Example 2

bIs_There = Folder.DoesExist(_ProgramFilesFolder..\\AutoPlay Media Studio X");

Checks to see if the folder "AutoPlay Media Studio X" exists in the user's Program Files folder and stores either true or false accordingly in the variable "bIs_There." The concatenation operator (..) is used here to concatenate the Program Files folder path with "\\AutoPlay Media Studio X."

Tip: Starting a variable name with "b" is a technique that programmers use to help themselves remember that a variable contains a boolean value.

Example 3

-- Check to see if a specific folder exists.
does_exist = Folder.DoesExist(_ProgramFilesFolder);

-- Display a dialog telling the user whether or not the folder exists.
if does_exist then
Dialog.Message("Notice", "Yes, the folder does exist on your system.", MB_OK, MB_ICONINFORMATION);
else
Dialog.Message("Notice", "No, the folder does not exist on your system.", MB_OK, MB_ICONINFORMATION);
end

Checks to see if the Program Files folder exists on the user's machine and notifies the user using a dialog message.


Folder.Find Examples

Folder.Find

table Folder.Find (

string StartFolder,

string Folder,

boolean Recurse = false,

function CallbackFunction = nil )

Example 1

ImageFolders = Folder.Find( _SourceFolder, "*Images*", true, ShowSearchProgress);

Searches for all folders inside the folder that the application is running, that contain "Images" in the name, and stores their paths in a table called ImageFolders. Since Recurse is true, the action will search inside subfolders. The function named ShowSearchProgress will be called whenever progress is made in the search operation.

Example 2

found = Folder.Find( Shell.GetFolder(SHF_MYDOCUMENTS),"Plant Data", false);
if (found) then
Dialog.Message("Found one!", "The first folder found was:" .. found[1]);
end

Searches for any folders inside the root of the user's My Documents folder that are named "Plant Data", and stores their paths in a table named "found." Then, the example tests that table to see if there were any folders stored in it (if there weren't, it would have been set to nil by the Folder.Find action), and if there are, puts up a message dialog to show the path to the first folder that was found.

Example 3

-- Set the callback function (used by action Folder.Find)
function FindCallBack(CurrentFolder)
-- Show the cancel button
StatusDlg.ShowCancelButton(true, "Cancel");
-- Set the status dialog title, message, and status text
StatusDlg.SetTitle("Searching . . . ");
StatusDlg.SetMessage("Please wait. Search is in progress.");
StatusDlg.SetStatusText("Current Folder: " .. CurrentFolder);
-- Check if the user pressed cancel
cancel = StatusDlg.IsCancelled();
if cancel then
-- Cancel was pressed, stop the current operation
return false;
else
-- Cancel was not pressed, continue
return true;
end
end

-- Set the drive to search
drive = "c:\\";
-- Set the folder to search for
folder = "windows";
-- Search the specified drive for folders named "windows"
-- Display the status dialog
StatusDlg.Show(0, false);
search_results = Folder.Find(drive, folder, true, FindCallBack);
--Check to see if an error occurred during the search. If it did, display the error message.
error = Application.GetLastError();
StatusDlg.Hide();
if error ~= 0 then
Dialog.Message("Error",_tblErrorMessages[error]);
else
-- If no directories were found, inform the user
if (search_results == nil) then
Dialog.Message("Notice", "There are no folders named '" .. folder .. "' on drive '" .. drive .. "'.");
-- If folders were found, display a dialog containing a list of their locations.
else
message = "A folder named '" .. folder .. "' was found at the following location(s):\r\n\r\n";
for index, path in pairs(search_results) do
message = String.Concat(message, path.."\r\n");
end
Dialog.Message("File Search Results", message, MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
end
end

This example uses the Folder.Find action to search for all instances of a particular folder on the user's hard drive. Once the search is complete, the user is presented a list of all the paths found. A callback function is used to customize the 'look' of the status dialog.


Folder.GetCurrent Examples

Folder.GetCurrent

string Folder.GetCurrent (

)

Example 1

current_dir = Folder.GetCurrent( );

Gets the current working directory for the application and stores the path in the variable "current_dir."


Folder.Rename Examples

Folder.Rename

Folder.Rename (

string OldName,

string NewName )

Example 1

Folder.Rename("C:\\Stored", "C:\\OldStored");

Renames the folder located at "C:\Stored" to "C:\OldStored."

Example 2

Folder.Rename(_ProgramFilesFolder .."\\My Application\\Data", _ProgramFilesFolder .."\\My Application\\DataBK");

Renames the "Data" folder located in the My Application folder to "DataBK."

Note: _ProgramFilesFolder is a built-in variable that contains the path to the user's Program Files folder.

Example 3

-- Renames a current folder.
Folder.Rename("C:\\My Folder", "C:\\My New Folder");

-- Get the error code for the rename action.
error = Application.GetLastError();

-- If an error occurred, display the error message.
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);
end

Renames "My Folder" to "My New Folder" and displays an error message if the action fails.


Folder.SetCurrent Examples

Folder.SetCurrent

Folder.SetCurrent (

string Folder )

Example 1

Folder.SetCurrent("AutoPlay\\Docs");

Sets the application's "current directory" (working directory) to be "AutoPlay\Docs" which is the folder that contains the document files in the project.


FTPWI.Download Examples

FTPWI.Download

FTPWI.Download (

string URL,

string Filename,

string Username = "anonymous",

string Password = "guest@",

number Mode = MODE_BINARY,

number Timeout = 20,

number Port = 21,

boolean PassiveMode = true,

function CallbackFunction = nil )

Example 1

FTPWI.Download("ftp://ftp.yourdomain.com/file.exe", _TempFolder .. "\\file.exe", "FTP_USERNAME", "FTP_PASSWORD", MODE_BINARY, 20, 21, true, nil);

err = Application.GetLastError();

if err ~= 0 then
Dialog.Message(err, _tblErrorMessages[err]);
end

Downloads 'file.exe' from an ftp site. An error message is displayed if an error occurs.

Note: _TempFolder is a built-in variable that contains the path to the user's system "Temp" folder.

Example 2

function FTPCallback(BytesRead, FileSize, TransferRate, SecondsLeft, SecondsLeftFormat, Message)
Debug.Clear();
Debug.Print(
"BytesRead: " .. BytesRead .. "\r\n" ..
"FileSize: " .. FileSize .. "\r\n" ..
"TransferRate: " .. TransferRate .. "\r\n" ..
"SecondsLeft: " .. SecondsLeft .. "\r\n" ..
"SecondsLeftFormat: " .. SecondsLeftFormat .. "\r\n" ..
"Message: " .. Message .. "\r\n"
)

return true;
end

Debug.ShowWindow();
FTPWI.Download("ftp://ftp.yourdomain.com/file.exe", _TempFolder .. "\\file.exe", "FTP_USERNAME", "FTP_PASSWORD", MODE_BINARY, 20, 21, true, FTPCallback);
err = Application.GetLastError();
Debug.ShowWindow(false);

if err ~= 0 then
Dialog.Message(err, _tblErrorMessages[err]);
end

Downloads 'file.exe' from an FTP site. An error message is displayed if an error occurs. In the above example, the callback function 'FTPCallback' is used to display download information in the debug window.

Note: _TempFolder is a built-in variable that contains the path to the user's system "Temp" folder.


FTPWI.GetErrorInfo Examples

FTPWI.GetErrorInfo

table FTPWI.GetErrorInfo (

)

Example 1

ErrInfo = FTPWI.GetErrorInfo();

Gets the last FTP error info and stores it in table ErrInfo.

Example 2

FTPWI.Download("ftp://ftp.yourdomain.com/file.exe", _TempFolder .. "\\file.exe", "FTP_USERNAME", "FTP_PASSWORD", MODE_BINARY, 20, 21, true, nil);

err = Application.GetLastError();

if err ~= 0 then
FTP_Error = FTPWI.GetErrorInfo();
Dialog.Message("FTP error", FTP_Error.Number, FTP_Error.Message);
end

Downloads a file. If the returned error is anything other than successful, display the extended FTP error information.


FTPWI.GetFileSize Examples

FTPWI.GetFileSize

number FTPWI.GetFileSize (

string URL,

string Username = "anonymous",

string Password = "guest@",

number Mode = MODE_BINARY,

number Timeout = 20,

number Port = 21,

boolean PassiveMode = true,

function CallbackFunction = nil )

Example 1

nFileSize = FTPWI.GetFileSize("ftp://ftp.myftpsite.com/myfile.txt", "anonymous", "guest@", MODE_BINARY, 20, 21, true, nil);

Gets the size of the file "myfile.txt" and stores the result in nFileSize.

Example 2

-- Settings for FTPWI actions
sFileOnServer = "ftp://ftp.myftpsite.com/myfile.exe";
sLocalFilePath = _TempFolder .. "\\myfile.exe";
sServerUser = "anonymous";
sServerPass = "guest@";
nServerMode = MODE_BINARY;
nServerTimeout = 20;
nServerPort = 21;
bUsePassive = true;

-- Set the max bytes allowed without alerting the user to 2MB (2*1024*1024):
QuestionByteThreshold = 2097152;

-- Assume download should continue
bContinueDownload = true;

-- Get size of file to be downloaded
FileSize = FTPWI.GetFileSize(sFileOnServer, sServerUser, sServerPass, nServerMode, nServerTimeout, nServerPort, bUsePassive, nil);

-- Check if filesize is unknown
if FileSize == -1 then

-- Filesize is unknown, alert user
choice = Dialog.Message("Alert", "Filesize is unknown. Continue Download?", MB_YESNO, MB_ICONQUESTION, MB_DEFBUTTON1);
if choice == 7 then
-- User chose not to continue with download
bContinueDownload = false;
end

-- Check if filesize is greater than threshold
elseif FileSize > QuestionByteThreshold then
-- Filesize is larger than threshold, alert the user
choice = Dialog.Message("Alert", "Filesize is greater than the threshold by " .. FileSize - QuestionByteThreshold .. " bytes. Continue Download?", MB_YESNO, MB_ICONQUESTION, MB_DEFBUTTON1);
if choice == 7 then
-- User chose not to continue with download
bContinueDownload = false;
end
end

-- Check if download should continue
if bContinueDownload then
-- Download File
FTPWI.Download(sFileOnServer, sLocalFilePath, sServerUser, sServerPass, nServerMode, nServerTimeout, nServerPort, bUsePassive, nil);
else
-- Don't download file, alert user that download has been terminated
Dialog.Message("Alert", "Download aborted by user");
end

Checks the size of a file on an FTP server to be downloaded. If the file is larger than a predefined threshold, the user is asked if the download should continue.


Grid.AutoSize Examples

Grid.AutoSize

Grid.AutoSize (

string ObjectName,

number ResizeMode = GVS_DEFAULT,

boolean Redraw = true )

Example 1

-- Resize the grid to fit the data
Grid.AutoSize("Grid1", GVS_DEFAULT, true);

Resize all rows and columns to fit into the grid object


Grid.AutoSizeColumn Examples

Grid.AutoSizeColumn

Grid.AutoSizeColumn (

string ObjectName,

number Column,

number ResizeMode = GVS_DEFAULT,

boolean ResetScroll = true,

boolean Redraw = true )

Example 1

-- Set the text of the top left most cell
Grid.SetCellText("Grid1", 0, 0, "Stats", true);
-- Set auto size for that column
Grid.AutoSizeColumn("Grid1", 0, GVS_DEFAULT, true, true);

Autosize column 0 to fit the data


Grid.AutoSizeColumns Examples

Grid.AutoSizeColumns

Grid.AutoSizeColumns (

string ObjectName,

number ResizeMode = GVS_DEFAULT,

boolean Redraw = true )

Example 1

-- Set auto size for all columns
Grid.AutoSizeColumns("Grid1", GVS_DEFAULT, true);

AutoSize all columns

Example 2

-- Get the total Columns in the grid
ColumnCount = Grid.GetColumnCount("Grid1");

-- loop through each Column and add a numbered message
for i = 0, ColumnCount do
-- Set the text of the Columns
Grid.SetCellText("Grid1", 0, i, "Stats "..i, true);
end

-- Set auto size for all columns
Grid.AutoSizeColumns("Grid1", GVS_DEFAULT, true);

Uses a loop to add a numbered message to each column.


Grid.AutoSizeRow Examples

Grid.AutoSizeRow

Grid.AutoSizeRow (

string ObjectName,

number Row,

boolean ResetScroll = true,

boolean Redraw = true )

Example 1

-- Set row 1 to Auto Size
Grid.AutoSizeRow("Grid1", 1, true, true);

Sets autosize for row 1


Grid.AutoSizeRows Examples

Grid.AutoSizeRows

Grid.AutoSizeRows (

string ObjectName,

boolean Redraw = true )

Example 1

-- AutoSize all rows
Grid.AutoSizeRows("Grid1", true);

Autosize all rows


Grid.DeleteAllItems Examples

Grid.DeleteAllItems

Grid.DeleteAllItems (

string ObjectName )

Example 1

-- Delete everything from the Grid
Grid.DeleteAllItems("Grid1");

Deletes everything from the grid


Grid.DeleteColumn Examples

Grid.DeleteColumn

Grid.DeleteColumn (

string ObjectName,

number Column,

boolean Redraw = true )

Example 1

-- Delete the leftmost column
Grid.DeleteColumn("Grid1", 0, true);

Deletes the leftmost column from the grid

Example 2

-- Get the number of columns
totalColumns = Grid.GetColumnCount("Grid1");
-- Delete the rightmost column
Grid.DeleteColumn("Grid1", totalColumns - 1, true);
-- note: the -1 is because the columns in the grid are zero based.

Deletes the rightmost column from the grid


Grid.DeleteNonFixedRows Examples

Grid.DeleteNonFixedRows

Grid.DeleteNonFixedRows (

string ObjectName,

boolean Redraw = true )

Example 1

-- Deletes all non fixed rows in the grid
Grid.DeleteNonFixedRows("Grid1", true);

Delete all non fixed rows from the column.


Grid.DeleteRow Examples

Grid.DeleteRow

Grid.DeleteRow (

string ObjectName,

number Row,

boolean Redraw = true )

Example 1

-- Delete the top row
Grid.DeleteRow("Grid1", 0, true);

Deletes the top row

Example 2

-- Get the number of rows
totalRows = Grid.GetRowCount("Grid1");
-- Delete the bottom row
Grid.DeleteRow("Grid1", totalRows -1, true);
-- note: the -1 is because the rows in the grid are zero based.

Deletes the bottom row


Grid.EditCopy Examples

Grid.EditCopy

Grid.EditCopy (

string ObjectName )

Example 1

-- Copies the contents of the currently selected cell to the clipboard
Grid.EditCopy("Grid1");

This is the same as the user doing CTRL + C.


Grid.EditCut Examples

Grid.EditCut

Grid.EditCut (

string ObjectName )

Example 1

-- Cuts the contents of the currently selected cell to the clipboard
Grid.EditCut("Grid1");

This is the same as the user doing CTRL + X.


Grid.EditPaste Examples

Grid.EditPaste

Grid.EditPaste (

string ObjectName )

Example 1

-- Pastes the contents of the clipboard to the currently selected cell
Grid.EditCut("Grid1");

This is the same as the user doing CTRL + V.


Grid.EnsureVisible Examples

Grid.EnsureVisible

Grid.EnsureVisible (

string ObjectName,

number Row = 0,

number Column = 0 )

Example 1

-- Reset the scrollbars so that the top-left cell is visible
Grid.EnsureVisible("Grid1", 0, 0);

Ensures that (0,0) is visible.


Grid.ExpandColumnsToFit Examples

Grid.ExpandColumnsToFit

Grid.ExpandColumnsToFit (

string ObjectName,

boolean ExpandFixed = true,

boolean Redraw = true )

Example 1

-- resizes all columns so that they fit in the viewing area
Grid.ExpandColumnsToFit("Grid1", true, true);

Resize all columns so that they fit into the grid object named "Grid1".


Grid.ExpandLastColumn Examples

Grid.ExpandLastColumn

Grid.ExpandLastColumn (

string ObjectName,

boolean Redraw = true )

Example 1

-- Expand or contract the rightmost column to fit the grid window
Grid.ExpandLastColumn("Grid1", true);

Resize the rightmost column so that it fits in the grid object named "Grid1".


Grid.ExpandRowsToFit Examples

Grid.ExpandRowsToFit

Grid.ExpandRowsToFit (

string ObjectName,

boolean ExpandFixed = true,

boolean Redraw = true )

Example 1

-- resizes all rows so that they fit in the viewing area
Grid.ExpandRowsToFit("Grid1", true, true);

Resizes all rows so that they fit in the grid object "Grid1".


Grid.ExpandToFit Examples

Grid.ExpandToFit

Grid.ExpandToFit (

string ObjectName,

boolean ExpandFixed = true,

boolean Redraw = true )

Example 1

-- resizes all rows and columns to fit into the grid viewing area
Grid.ExpandToFit("Grid1", true, true);

Resize everything so that there are no scrollbars.


Grid.GetCellColors Examples

Grid.GetCellColors

table Grid.GetCellColors (

string ObjectName,

number Row,

number Column )

Example 1

-- Display cell colors for cell 1, 1
tbColors = Grid.GetCellColors("DataGrid",1,1);
if tbColors then
if tbColors.Background == GRID_CLR_DEFAULT then
BackgroundColor = "DEFAULT";
else
BackgroundColor = tbColors.Background;
end

if tbColors.Text == GRID_CLR_DEFAULT then
TextColor = "DEFAULT";
else
TextColor = tbColors.Text;
end

Message = "Background = "..BackgroundColor..", Text = "..TextColor;
Dialog.Message("Colors",Message);
end

Gets the cell colors of the grid cell at (1,1) and shows their values in a dialog message.


Grid.GetCellState Examples

Grid.GetCellState

table Grid.GetCellState (

string ObjectName,

number Row,

number Column )

Example 1

-- Determine if the cell 1,1 is selected
tbCellState = Grid.GetCellState("DataGrid",1,1);
if (tbCellState) then
if (tbCellState.Selected) then
Dialog.Message("Cell State", "This cell is selected.");
end
end

Gets the state of the grid cell at (1,1) and shows a dialog message if the cell is selected.


Grid.GetCellText Examples

Grid.GetCellText

string Grid.GetCellText (

string ObjectName,

number Row,

number Column )

Example 1

-- Get the value of 1,1
sValue = Grid.GetCellText("Grid1", 1, 1);

-- Convert it into an integer
nValue = String.ToNumber(sValue);

-- Do a calculation to it
nValue = nValue + 1;

-- Set the cell with the new value
Grid.SetCellText("Grid1", 1, 1, nValue, true);

Increments a cell that contains a number.

Example 2

-- Get the value of 3,2
sThreeTwo = Grid.GetCellText("Grid1", 3, 2);

Gets the value of cell (3,2) and sets it to variable "sThreeTwo".


Grid.GetColumnCount Examples

Grid.GetColumnCount

number Grid.GetColumnCount (

string ObjectName )

Example 1

-- Get the total Columns in the grid
ColumnCount = Grid.GetColumnCount("Grid1");

-- loop through each Column and add a numbered message
for i = 0, ColumnCount do
-- Set the text of the Columns
Grid.SetCellText("Grid1", 0, i, "Stats "..i, true);
end

-- Set auto size for all columns
Grid.AutoSizeColumns("Grid1", GVS_DEFAULT, true);

Labels all columns in the grid to 'Stats #' then resizes the Columns to fit the text

Example 2

-- Get the number of columns
totalColumns = Grid.GetColumnCount("Grid1");
-- Delete the rightmost column
Grid.DeleteColumn("Grid1", totalColumns - 1, true);
-- note: the -1 is because the columns in the grid are zero based.

Deletes the rightmost column from the grid


Grid.GetColumnHiding Examples

Grid.GetColumnHiding

boolean Grid.GetColumnHiding (

string ObjectName )

Example 1

-- determines if the columns can be hidden by the user at runtime
bHide = Grid.GetColumnHiding("Grid1");

-- if it can be hidden then turn this ability off
if bHide then
Grid.SetColumHiding("Grid1",false);
end

Turns off the ability for the user to hide the columns at runtime.


Grid.GetColumnResize Examples

Grid.GetColumnResize

boolean Grid.GetColumnResize (

string ObjectName )

Example 1

-- can the columns be resized
bResize = Grid.GetColumnResize("Grid1");

-- if not then set the column resize to true
if not bResize then
Grid.SetColumnResize("Grid1", true);
end

Turns on the ability for the user to resize column, if it is currently disabled.


Grid.GetColumnWidth Examples

Grid.GetColumnWidth

number Grid.GetColumnWidth (

string ObjectName,

number Column )

Example 1

-- Puts the width (in pixels) of the leftmost column into a variable
nPixelsWide = Grid.GetColumnWidth("Grid1", 0);

Returns the width of the leftmost column.


Grid.GetDragAndDrop Examples

Grid.GetDragAndDrop

boolean Grid.GetDragAndDrop (

string ObjectName )

Example 1

-- get the drag and drop status
bCanDrag = Grid.GetDragAndDrop("Grid1");

if bCanDrag then
Grid.SetDragAndDrop("Grid1", false);
else
Grid.SetDragAndDrop("Grid1", true);
end

Toggles the ability to drag and drop.


Grid.GetEditable Examples

Grid.GetEditable

boolean Grid.GetEditable (

string ObjectName )

Example 1

-- Get the current editable status
bEditable = Grid.GetEditable("Grid1");

if bEditable then
Grid.SetEditable("Grid1", false);
else
Grid.SetEditable("Grid1", true);
end

Toggles the ability for the user to edit the contents of the grid

Example 2

-- Find out if the grid is editable
bEditable = Grid.GetEditable("Grid1");
-- find out if 3,2 exists
bValid = Grid.IsCellValid("Grid1", 3, 2);

-- if it is not editable and cell 3,2 exists
if (not bEditable) and (bValid) then
-- make the grid editable
Grid.SetEditable("Grid1", true);
end

Make the grid editable if it is not and if a certain cell exists


Grid.GetFixedColumnCount Examples

Grid.GetFixedColumnCount

number Grid.GetFixedColumnCount (

string ObjectName )

Example 1

-- get the number of fixed columns
nFixedColumns = Grid.GetFixedColumnCount("Grid1");
-- Add one more fixed column
Grid.SetFixedColumnCount("Grid1", nFixedColumns + 1);

Add one fixed column to the existing fixed column(s)


Grid.GetFixedColumnSelection Examples

Grid.GetFixedColumnSelection

boolean Grid.GetFixedColumnSelection (

string ObjectName )

Example 1

-- get the state of the fixed column selection
bFixedSelect = Grid.GetFixedColumnSelection("Grid1");

-- set it to the opposite
Grid.SetFixedColumnSelection("Grid1", not bFixedSelect);

Toggles the ability to select all data in a column by clicking on a fixed column


Grid.GetFixedRowCount Examples

Grid.GetFixedRowCount

number Grid.GetFixedRowCount (

string ObjectName )

Example 1

-- get the number of fixed rows
nFixed = Grid.GetFixedRowCount("Grid1");

if nFixed > 0 then
-- remove one fixed row
Grid.SetFixedRowCount("Grid1", nFixed - 1);
end

Removes one fixed row


Grid.GetFixedRowSelection Examples

Grid.GetFixedRowSelection

boolean Grid.GetFixedRowSelection (

string ObjectName )

Example 1

-- get the state of the fixed row selection
bFixedSelect = Grid.GetFixedRowSelection("Grid1");

-- set it to the opposite
Grid.SetFixedRowSelection("Grid1", not bFixedSelect);

Toggles the ability to select all data in a row by clicking on the fixed row


Grid.GetFocusCell Examples

Grid.GetFocusCell

table Grid.GetFocusCell (

string ObjectName )

Example 1

-- Get the address of the cell that has focus
tblCellFocus = Grid.GetFocusCell("Grid1");

-- if there is room to move focus to the right
if tblCellFocus.Column < Grid.GetColumnCount("Grid1") then
-- set the focus one space to the right
Grid.SetFocusCell("Grid1", tblCellFocus.Row, tblCellFocus.Column + 1);
end

Sets the focus cell one column to the right (if it is not already there)


Grid.GetFrameFocusCell Examples

Grid.GetFrameFocusCell

boolean Grid.GetFrameFocusCell (

string ObjectName )

Example 1

bresult = Grid.GetFrameFocusCell("Grid1");

Returns true if the focus cell is highlighted with a framed border


Grid.GetGridColors Examples

Grid.GetGridColors

table Grid.GetGridColors (

string ObjectName )

Example 1

-- Get the colors of the background, lines and tooltips.
tblGridColors = Grid.GetGridColors("Grid1");

-- if they are not the default
if tblGridColors.GridBackground ~= GRID_CLR_DEFAULT then
-- create a table to store the defaults
tblDefaults = {};
tblDefaults.GridBackground = GRID_CLR_DEFAULT;
tblDefaults.GridLines = GRID_CLR_DEFAULT;
tblDefaults.TooltipBackground = GRID_CLR_DEFAULT;
tblDefaults.TooltipText = GRID_CLR_DEFAULT;
-- Set these values back to the windows defaults
Grid.SetGridColors("Grid1", tblDefaults);
end

-- refresh the grid
Grid.Refresh("Grid1");

Sets the grid background, lines and tooltip colors to the default Windows colors.


Grid.GetGridLines Examples

Grid.GetGridLines

number Grid.GetGridLines (

string ObjectName )

Example 1

intGridLines = Grid.GetGridLines("Grid1");
if intGridLines == GVL_BOTH then
-- Both Horizontal and Vertical lines are shown
end

Determines if both Horizontal and Vertical lines are currently shown


Grid.GetHeaderSort Examples

Grid.GetHeaderSort

boolean Grid.GetHeaderSort (

string ObjectName )

Example 1

-- Determine if Header sort is enabled
bSort = Grid.GetHeaderSort("Grid1");
-- Set the header sort to the opposite value
Grid.SetHeaderSort("Grid1", not bSort);

Toggles the Header sort option


Grid.GetListMode Examples

Grid.GetListMode

boolean Grid.GetListMode (

string ObjectName )

Example 1

bListMode = Grid.GetListMode("Grid1");

Returns true if list mode is enabled


Grid.GetModified Examples

Grid.GetModified

boolean Grid.GetModified (

string ObjectName,

number Row = -1,

number Column = -1 )

Example 1

bModified = Grid.GetModified("Grid1", -1, -1);
if not bModified then
-- Set the modified flag to true for the entire grid
Grid.SetModified("Grid1", true, -1, -1);
end

Set the modified flag for the entire grid


Grid.GetNextItem Examples

Grid.GetNextItem

table Grid.GetNextItem (

string ObjectName,

number Row,

number Column,

number SearchType,

number SearchDirection )

Example 1

tblresult = Grid.GetNextItem("Grid1", 1, 2, GVNI_FOCUSED, GVNI_ALL);
if tblresult == nil then
Dialog.Message("Warning", "No Cells have focus", MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
else
Dialog.Message("Focus Found", "Focus Cell = "..tblresult.Row..","..tblresult.Column, MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
end

Searches for a cell that has focus and reports the findings


Grid.GetPos Examples

Grid.GetPos

table Grid.GetPos (

string ObjectName )

Example 1

position = Grid.GetPos("TestData");

Gets the current X, Y coordinates of the "TestData" grid object and stores the results in a table called "position." These values can be accessed by referencing position.X and position.Y.


Grid.GetProperties Examples

Grid.GetProperties

table Grid.GetProperties (

string ObjectName )

Example 1

tProperties = Grid.GetProperties("Grid12");

Gets the properties of the "Grid12" grid object and stores them in table "tProperties".


Grid.GetRowCount Examples

Grid.GetRowCount

number Grid.GetRowCount (

string ObjectName )

Example 1

-- Get the number of rows
totalRows = Grid.GetRowCount("Grid1");
-- Delete the bottom row
Grid.DeleteRow("Grid1", totalRows -1, true);
-- note: the -1 is because the rows in the grid are zero based.

Deletes the bottom row


Grid.GetRowHeight Examples

Grid.GetRowHeight

number Grid.GetRowHeight (

string ObjectName,

number Row )

Example 1

RowHeight = Grid.GetRowHeight("Grid1", 1);

Get the height of row 1


Grid.GetRowHiding Examples

Grid.GetRowHiding

boolean Grid.GetRowHiding (

string ObjectName )

Example 1

bCanHide = Grid.GetRowHiding("Grid1");

Returns true if the rows can be contracted to 0


Grid.GetRowResize Examples

Grid.GetRowResize

boolean Grid.GetRowResize (

string ObjectName )

Example 1

bCanResize = Grid.GetRowResize("Grid1");

Returns true if the rows of a grid can be resized by the user


Grid.GetSelectable Examples

Grid.GetSelectable

boolean Grid.GetSelectable (

string ObjectName )

Example 1

bSelectable = Grid.GetSelectable("Grid1");

Returns true if the grid object is selectable


Grid.GetSelectedCount Examples

Grid.GetSelectedCount

number Grid.GetSelectedCount (

string ObjectName )

Example 1

nSelected = Grid.GetSelectedCount("Grid1");

Returns the number of cells that are selected


Grid.GetSingleColumnSelection Examples

Grid.GetSingleColumnSelection

boolean Grid.GetSingleColumnSelection (

string ObjectName )

Example 1

-- Get single column selection
bSingle = Grid.GetSingleColumnSelection("Grid1");
-- Set it to the opposite
Grid.SetSingleColumnSelection("Grid1", not bSingle);

Toggles the single column selection option


Grid.GetSingleRowSelection Examples

Grid.GetSingleRowSelection

boolean Grid.GetSingleRowSelection (

string ObjectName )

Example 1

-- Get single row selection
bSingle = Grid.GetSingleRowSelection("Grid1");
-- Set it to the opposite
Grid.SetSingleRowSelection("Grid1", not bSingle);

Toggles the single row selection option


Grid.GetSize Examples

Grid.GetSize

table Grid.GetSize (

string ObjectName )

Example 1

scores_size = Grid.GetSize("Scores");

Gets the pixel dimensions of the "Scores" grid object and stores the width and height values in the "scores_size" table. The dimensions can be accessed by referencing scores_size.Width and scores_size.Height.


Grid.GetSortAscending Examples

Grid.GetSortAscending

boolean Grid.GetSortAscending (

string ObjectName )

Example 1

bIsAscending = Grid.GetSortAscending("Grid1");

Returns true if the grid is set to sort in ascending order


Grid.GetSortColumn Examples

Grid.GetSortColumn

number Grid.GetSortColumn (

string ObjectName )

Example 1

nSortedColumn = Grid.GetSortColumn("Grid1");

Returns the column index of the sorted column


Grid.GetTabEnabled Examples

Grid.GetTabEnabled

boolean Grid.GetTabEnabled (

string ObjectName )

Example 1

bIsTab = Grid.GetTabEnabled("Grid1");

Returns true if Tab will navigate the grid


Grid.GetToolTipsEnabled Examples

Grid.GetToolTipsEnabled

boolean Grid.GetToolTipsEnabled (

string ObjectName )

Example 1

bToolTip = Grid.GetToolTipsEnabled("Grid1");

Returns true if tool tips are enabled on "Grid1"


Grid.GetTrackFocusCell Examples

Grid.GetTrackFocusCell

boolean Grid.GetTrackFocusCell (

string ObjectName )

Example 1

bTrack = Grid.GetTrackFocusCell("Grid1");

Returns true if the fixed cells on the same row/column as the current focus cell are highlighted with a sunken border


Grid.GetUnhideColumn Examples

Grid.GetUnhideColumn

boolean Grid.GetUnhideColumn (

string ObjectName )

Example 1

bUnHide = Grid.GetUnhideColumn("Grid1");

Returns true if columns of 0 width can be restored by the user


Grid.GetUnhideRow Examples

Grid.GetUnhideRow

boolean Grid.GetUnhideRow (

string ObjectName )

Example 1

bUnHide = Grid.GetUnhideRow("Grid1");

Returns true if rows of 0 width can be restored by the user


Grid.InsertColumn Examples

Grid.InsertColumn

number Grid.InsertColumn (

string ObjectName,

number InsertPosition,

boolean Redraw = true )

Example 1

nIndex = Grid.InsertColumn("Grid1", 2, true);

Adds a new column in position 2

Example 2

result = Grid.InsertColumn("Grid1", -1, true);

Adds a new column to the end of the grid


Grid.InsertRow Examples

Grid.InsertRow

number Grid.InsertRow (

string ObjectName,

number InsertPosition,

boolean Redraw = true )

Example 1

nIndex = Grid.InsertRow("Grid1", 2, true);

Adds a new row in position 2

Example 2

result = Grid.InsertRow("Grid1", -1, true);

Adds a new row to the end of the grid


Grid.IsCellEditable Examples

Grid.IsCellEditable

boolean Grid.IsCellEditable (

string ObjectName,

number Row,

number Column )

Example 1

bEditable = Grid.IsCellEditable("Grid1", 3, 0);

Returns true if the cell in row 3 column 0 is editable


Grid.IsCellFixed Examples

Grid.IsCellFixed

boolean Grid.IsCellFixed (

string ObjectName,

number Row,

number Column )

Example 1

bFixed = Grid.IsCellFixed("Grid1", 4, 4);

Returns true if the cell in row 4 column 4 is fixed


Grid.IsCellSelected Examples

Grid.IsCellSelected

boolean Grid.IsCellSelected (

string ObjectName,

number Row,

number Column )

Example 1

bFixed = Grid.IsCellSelected("Grid1", 2, 5);

Returns true of the cell in row 2 column 5 is selected


Grid.IsCellValid Examples

Grid.IsCellValid

boolean Grid.IsCellValid (

string ObjectName,

number Row,

number Column )

Example 1

-- Find out if the grid is editable
bEditable = Grid.GetEditable("Grid1");
-- find out if 3,2 exists
bValid = Grid.IsCellValid("Grid1", 3, 2);

-- if it is not editable and cell 3,2 exists
if (not bEditable) and (bValid) then
-- make the grid editable
Grid.SetEditable("Grid1", true);
end

Make the grid editable if it is not and if a certain cell exists


Grid.IsCellVisible Examples

Grid.IsCellVisible

boolean Grid.IsCellVisible (

string ObjectName,

number Row,

number Column )

Example 1

bIsVisible = Grid.IsCellVisible("Grid1", 0, 0);

Returns true if the top-left cell is visible.


Grid.IsEnabled Examples

Grid.IsEnabled

boolean Grid.IsEnabled (

string ObjectName )

Example 1

contents_enabled = Grid.IsEnabled("Contents");

Stores true in a variable named "contents_enabled" if the "Contents" grid object is enabled, and false if it is disabled.

Example 2

bGrid4Enabled = Grid.IsEnabled("Grid4");

Checks whether the "Grid4" grid object is enabled or disabled, and sets the "bGrid4Enabled" variable to either true or false, accordingly.

Tip: Starting a variable name with "b" is a technique that programmers use to help themselves remember that a variable contains a boolean value.


Grid.IsVisible Examples

Grid.IsVisible

boolean Grid.IsVisible (

string ObjectName )

Example 1

second_visible = Grid.IsVisible("Second Quarter");

Checks whether the grid object called "Second Quarter" is visible and stores true or false in a variable called "second_visible."

Example 2

Grid2isVisible = Grid.IsVisible("Grid2");

Stores true in "Grid2isVisible" if the "Grid2" grid object is visible.


Grid.LoadFromFile Examples

Grid.LoadFromFile

boolean Grid.LoadFromFile (

string ObjectName,

string FullPath,

string SeparatorCharacter = ",",

boolean AutoSize = true )

Example 1

-- Load values from a csv file into the grid.
Grid.LoadFromFile("Grid1", "AutoPlay\\Docs\\gridfile.csv", ",", false);
-- Set the fixed column up again since this will not be stored in the csv file.
Grid.SetFixedColumnCount("Grid1", 1);
-- Set the fixed row up again since this will not be stored in the csv file.
Grid.SetFixedRowCount("Grid1", 1);

Loads values from a .csv file.

Example 2

-- Load values from a txt file into the grid.
-- Also note that this uses a semicolon rather than a comma as the separator
Grid.LoadFromFile("Grid1", "AutoPlay\\Docs\\config.txt", ";", true);

Loads a text file that is semi colon delimited.


Grid.MakeColorRGB Examples

Grid.MakeColorRGB

number Grid.MakeColorRGB (

number Red,

number Green,

number Blue )

Example 1

-- Make blue:
blue = Grid.MakeColorRGB(0,0,255);

-- Make white:
white = Grid.MakeColorRGB(255,255,255);

-- Make black:
black = Grid.MakeColorRGB(0,0,0);

-- Make grey:
grey = Grid.MakeColorRGB(192,192,192);

Provides some examples of creating colors using the Grid.MakeColorRGB action.


Grid.Print Examples

Grid.Print

Grid.Print (

string ObjectName,

boolean WYSIWYG = false,

boolean ShadedPrintOut = true,

table MarginInfo = nil )

Example 1

Grid.Print("Grid1", false, true, nil);

Prints the contents of "Grid1"


Grid.RedrawCell Examples

Grid.RedrawCell

Grid.RedrawCell (

string ObjectName,

number Row,

number Column )

Example 1

Grid.RedrawCell("Grid1", 2, 2);

Redraws the cell located at (2,2)


Grid.RedrawColumn Examples

Grid.RedrawColumn

Grid.RedrawColumn (

string ObjectName,

number Column )

Example 1

Grid.RedrawColumn("Grid1", 2);

Redraws column 2


Grid.RedrawRow Examples

Grid.RedrawRow

Grid.RedrawRow (

string ObjectName,

number Row )

Example 1

Grid.RedrawRow("Grid1", 0);

Redraws the top row


Grid.Refresh Examples

Grid.Refresh

Grid.Refresh (

string ObjectName )

Example 1

Grid.SetRowHeight("Grid1", 1, 42, false);
Grid.SetColumnWidth("Grid1", 1, 42, false);
Grid.Refresh("Grid1");

Set the width and height of row 1 and column 1 and the redraw the entire grid


Grid.SaveToFile Examples

Grid.SaveToFile

boolean Grid.SaveToFile (

string ObjectName,

string FullPath,

string SeparatorCharacter = "," )

Example 1

bSave = Grid.SaveToFile("Grid1", "AutoPlay\\Docs\\grid.txt", ",");

if bSave then
Dialog.Message("Save To File", "Data successfully Saved", MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
else
Dialog.Message("Save To File", "Failed to save Data", MB_OK, MB_ICONSTOP, MB_DEFBUTTON1);
end

Saves the data in "Grid1" to a text file named "grid.txt" and displays a message with the result.


Grid.SelectAll Examples

Grid.SelectAll

Grid.SelectAll (

string ObjectName )

Example 1

Grid.SelectAll("Grid1")

Select all non fixed cells in a grid object


Grid.SetCellColors Examples

Grid.SetCellColors

Grid.SetCellColors (

string ObjectName,

number Row,

number Column,

table Colors,

boolean Redraw = true )

Example 1

-- Change cell colors for cell 1, 1
-- Make the background white and the text black
tbColors = {Background=16777215,Text=0};
Grid.SetCellColors("Grid1",1,1,tbColors);

Makes the "Grid1" grid object's (1,1) cell background color white and text black.


Grid.SetCellFont Examples

Grid.SetCellFont

Grid.SetCellFont (

string ObjectName,

number Row,

number Column,

table FontData = nil,

boolean Redraw = true )

Example 1

tblFont = {};
tblFont.FaceName = "Verdana";
tblFont.Height = 7;
tblFont.Weight = FW_THIN;
tblFont.Italic = true;
tblFont.Underline = true;
Grid.SetCellFont("Grid1", 3, 2, tblFont, true);

Sets the font properties for cell 3,2

Note: You can change the font settings for the entire grid using Grid.SetProperties().


Grid.SetCellText Examples

Grid.SetCellText

Grid.SetCellText (

string ObjectName,

number Row,

number Column,

string Text,

boolean Redraw = true )

Example 1

-- Change cell text for cell 10, 23
Grid.SetCellText("Grid1",10,23,"Hello, world.");

Sets the text of cell (10,23) in the "Grid1" grid object to "Hello, world."

Example 2

-- Get the total Columns in the grid
ColumnCount = Grid.GetColumnCount("Grid1");

-- loop through each Column and add a numbered message
for i = 0, ColumnCount do
-- Set the text of the Columns
Grid.SetCellText("Grid1", 0, i, "Stats "..i, true);
end

-- Set auto size for all columns
Grid.AutoSizeColumns("Grid1", GVS_DEFAULT, true);

Labels all columns in the grid to 'Stats #' then resizes the Columns to fit the text

Example 3

-- Get the value of 1,1
sValue = Grid.GetCellText("Grid1", 1, 1);

-- Convert it into an integer
nValue = String.ToNumber(sValue);

-- Do a calculation to it
nValue = nValue + 1;

-- Set the cell with the new value
Grid.SetCellText("Grid1", 1, 1, nValue, true);

Increments a cell that contains a number


Grid.SetColumnCount Examples

Grid.SetColumnCount

Grid.SetColumnCount (

string ObjectName,

number ColumnCount )

Example 1

Grid.SetColumnCount("Grid1", 2);

Sets the grid to have 2 columns. This includes fixed columns


Grid.SetColumnHiding Examples

Grid.SetColumnHiding

Grid.SetColumnHiding (

string ObjectName,

boolean AllowHiding = true )

Example 1

-- determines if the columns can be hidden by the user at runtime
bHide = Grid.GetColumnHiding("Grid1");

-- if it can be hidden then turn this ability off
if bHide then
Grid.SetColumHiding("Grid1",false);
end

Turns off the ability for the user to hide the columns at runtime.


Grid.SetColumnResize Examples

Grid.SetColumnResize

Grid.SetColumnResize (

string ObjectName,

boolean Resizable = true )

Example 1

-- can the columns be resized
bResize = Grid.GetColumnResize("Grid1");

-- if not then set the column resize to true
if not bResize then
Grid.SetColumnResize("Grid1", true);
end

Turns on the ability for the user to resize column, if it is currently disabled.


Grid.SetColumnWidth Examples

Grid.SetColumnWidth

Grid.SetColumnWidth (

string ObjectName,

number Column,

number Width,

boolean Redraw = true )

Example 1

Grid.SetRowHeight("Grid1", 1, 42, false);
Grid.SetColumnWidth("Grid1", 1, 42, false);
Grid.Refresh("Grid1");

Set the width and height of row 1 and column 1 and the redraw the entire grid


Grid.SetDragAndDrop Examples

Grid.SetDragAndDrop

Grid.SetDragAndDrop (

string ObjectName,

boolean Enable = true )

Example 1

-- get the drag and drop status
bCanDrag = Grid.GetDragAndDrop("Grid1");

if bCanDrag then
Grid.SetDragAndDrop("Grid1", false);
else
Grid.SetDragAndDrop("Grid1", true);
end

Toggles the ability to drag and drop


Grid.SetEditable Examples

Grid.SetEditable

Grid.SetEditable (

string ObjectName,

boolean Editable )

Example 1

-- Get the current editable status
bEditable = Grid.GetEditable("Grid1");

if bEditable then
Grid.SetEditable("Grid1", false);
else
Grid.SetEditable("Grid1", true);
end

Toggles the ability for the user to edit the contents of the grid

Example 2

-- Find out if the grid is editable
bEditable = Grid.GetEditable("Grid1");
-- find out if 3,2 exists
bValid = Grid.IsCellValid("Grid1", 3, 2);

-- if it is not editable and cell 3,2 exists
if (not bEditable) and (bValid) then
-- make the grid editable
Grid.SetEditable("Grid1", true);
end

Make the grid editable if it is not and if a certain cell exists


Grid.SetEnabled Examples

Grid.SetEnabled

Grid.SetEnabled (

string ObjectName,

boolean Enabled = true )

Example 1

Grid.SetEnabled("Grid4", true);

Enables the grid object named "Grid4."

Example 2

Grid.SetEnabled("Results", false);

Disables the grid object named "Results."


Grid.SetFixedColumnCount Examples

Grid.SetFixedColumnCount

Grid.SetFixedColumnCount (

string ObjectName,

number ColumnCount )

Example 1

-- get the number of fixed columns
nFixedColumns = Grid.GetFixedColumnCount("Grid1");
-- Add one more fixed column
Grid.SetFixedColumnCount("Grid1", nFixedColumns + 1);

Add one fixed column to the existing fixed column(s)


Grid.SetFixedColumnSelection Examples

Grid.SetFixedColumnSelection

Grid.SetFixedColumnSelection (

string ObjectName,

boolean Enable )

Example 1

-- get the state of the fixed column selection
bFixedSelect = Grid.GetFixedColumnSelection("Grid1");

-- set it to the opposite
Grid.SetFixedColumnSelection("Grid1", not bFixedSelect);

Toggles the ability to select the column by clicking on a fixed column


Grid.SetFixedRowCount Examples

Grid.SetFixedRowCount

Grid.SetFixedRowCount (

string ObjectName,

number RowCount )

Example 1

-- get the number of fixed rows
nFixed = Grid.GetFixedRowCount("Grid1");

if nFixed > 0 then
-- remove one fixed row
Grid.SetFixedRowCount("Grid1", nFixed - 1);
end

Removes one fixed row


Grid.SetFixedRowSelection Examples

Grid.SetFixedRowSelection

Grid.SetFixedRowSelection (

string ObjectName,

boolean Enable )

Example 1

-- get the state of the fixed row selection
bFixedSelect = Grid.GetFixedRowSelection("Grid1");

-- set it to the opposite
Grid.SetFixedRowSelection("Grid1", not bFixedSelect);

Toggles the ability to select all data in a row by clicking on the fixed row


Grid.SetFocusCell Examples

Grid.SetFocusCell

Grid.SetFocusCell (

string ObjectName,

number Row,

number Column )

Example 1

-- Get the address of the cell that has focus
tblCellFocus = Grid.GetFocusCell("Grid1");

-- if there is room to move focus to the right
if tblCellFocus.Column < Grid.GetColumnCount("Grid1") then
-- set the focus one space to the right
Grid.SetFocusCell("Grid1", tblCellFocus.Row, tblCellFocus.Column + 1);
end

Sets the focus cell one column to the right (if it is not already there)


Grid.SetFrameFocusCell Examples

Grid.SetFrameFocusCell

Grid.SetFrameFocusCell (

string ObjectName,

boolean Enable,

boolean Redraw = true )

Example 1

Grid.SetFrameFocusCell("Grid1", false, true);

Turn off the frame focus cell option.


Grid.SetGridColors Examples

Grid.SetGridColors

Grid.SetGridColors (

string ObjectName,

table Colors )

Example 1

-- Get the colors of the background, lines and tooltips.
tblGridColors = Grid.GetGridColors("Grid1");

-- if they are not the default
if tblGridColors.GridBackground ~= GRID_CLR_DEFAULT then
-- create a table to store the defaults
tblDefaults = {};
tblDefaults.GridBackground = GRID_CLR_DEFAULT;
tblDefaults.GridLines = GRID_CLR_DEFAULT;
tblDefaults.TooltipBackground = GRID_CLR_DEFAULT;
tblDefaults.TooltipText = GRID_CLR_DEFAULT;
-- Set these values back to the windows defaults
Grid.SetGridColors("Grid1", tblDefaults);
end

-- refresh the grid
Grid.Refresh("Grid1");

Sets the grid background, lines and tooltip colors to the default Windows colors.


Grid.SetGridLines Examples

Grid.SetGridLines

Grid.SetGridLines (

string ObjectName,

number GridLines )

Example 1

Grid.SetGridLines("Grid1", GVL_BOTH);

Turns on both horizontal and vertical grid lines.

Example 2

Grid.SetGridLines("Grid1", GVL_HORZ);

Turns on horizontal grid lines.


Grid.SetHeaderSort Examples

Grid.SetHeaderSort

Grid.SetHeaderSort (

string ObjectName,

boolean SortOnClick )

Example 1

-- Determine if Header sort is enabled
bSort = Grid.GetHeaderSort("Grid1");
-- Set the header sort to the opposite value
Grid.SetHeaderSort("Grid1", not bSort);

Toggles the Header sort option

Example 2

-- Enable header sort
Grid.SetHeaderSort("Grid1", true);
-- Enable listmode
Grid.SetListMode("Grid1", true);

Turn on 'Header Sort' and 'List Mode'


Grid.SetListMode Examples

Grid.SetListMode

Grid.SetListMode (

string ObjectName,

boolean ListMode )

Example 1

Grid.SetListMode("Grid1", true);

Enables List Mode in "Grid1"

Example 2

-- Enable header sort
Grid.SetHeaderSort("Grid1", true);
-- Enable listmode
Grid.SetListMode("Grid1", true);

Turn on 'Header Sort' and 'List Mode'


Grid.SetModified Examples

Grid.SetModified

Grid.SetModified (

string ObjectName,

boolean Modified = true,

number Row = -1,

number Column = -1 )

Example 1

bModified = Grid.GetModified("Grid1", -1, -1);
if not bModified then
-- Set the modified flag to true for the entire grid
Grid.SetModified("Grid1", true, -1, -1);
end

Set the modified flag for the entire grid


Grid.SetPos Examples

Grid.SetPos

Grid.SetPos (

string ObjectName,

number X,

number Y )

Example 1

Grid.SetPos("Set Me", 100, 150 );

Sets the "Set Me" grid object's X coordinate to 100 pixels and the Y coordinate to 150.

Example 2

Grid.SetPos("Move Me", 0, 0);

Sets the "Move Me" grid object's X coordinate to 0 and the Y coordinate to 0. The grid object will be moved to the upper left hand corner of the page from it's current position.


Grid.SetProperties Examples

Grid.SetProperties

Grid.SetProperties (

string ObjectName,

table Properties )

Example 1

Grid.SetProperties("Custom_Report", tReport);

Sets the properties of the "Custom_Report" grid object to those contained in table "tReport."

Example 2

-- Grid object properties table.
tblGridProps = {};
tblGridProps.Rows = 10;
tblGridProps.Columns = 10;
tblGridProps.FixedRows = 1;
tblGridProps.FixedColumns = 1;
tblGridProps.Editable = true;
tblGridProps.Selectable = true;
tblGridProps.CellDragAndDrop = false;
tblGridProps.ResizableRows = true;
tblGridProps.ResizableColumns = true;
tblGridProps.GridLines = GVL_BOTH;
tblGridProps.FontName = "Arial";
tblGridProps.FontSize = 10;
tblGridProps.FontUnderline = false;
tblGridProps.FontScript = ANSI_CHARSET;
tblGridProps.FontAntiAlias = true;
tblGridProps.FontWeight = FW_NORMAL;
tblGridProps.FontItalic = false;
tblGridProps.FontStrikeout = false;
tblGridProps.TextColor = Math.HexColorToNumber("000000");
tblGridProps.TextBackgroundColor = Math.HexColorToNumber("FFFFFF");
tblGridProps.FixedTextColor = Math.HexColorToNumber("000000");
tblGridProps.FixedBackgroundColor = Math.HexColorToNumber("ECE9D8");
tblGridProps.GridLineColor = Math.HexColorToNumber("C0C0C0");
tblGridProps.GridBackgroundColor = Math.HexColorToNumber("ACA899");
tblGridProps.TitleTipBackgroundColor = Math.HexColorToNumber("FFFFE1");
tblGridProps.TitleTipTextColor = Math.HexColorToNumber("000000");
tblGridProps.TooltipText = "";
tblGridProps.ResizeLeft = false;
tblGridProps.ResizeRight = false;
tblGridProps.ResizeTop = false;
tblGridProps.ResizeBottom = false;
tblGridProps.Width = 250;
tblGridProps.Height = 250;
tblGridProps.Y = 0;
tblGridProps.X = 0;
tblGridProps.Enabled = true;
tblGridProps.Visible = true;
Grid.SetProperties("Grid1", tblGridProps);

Create a custom table and set the grid


Grid.SetRedraw Examples

Grid.SetRedraw

Grid.SetRedraw (

string ObjectName,

boolean Redraw = true,

boolean RedrawScrollbars = true )

Example 1

-- Turn off redraw
Grid.SetRedraw("Grid1", false, false);

Turn off redraw


Grid.SetRowCount Examples

Grid.SetRowCount

Grid.SetRowCount (

string ObjectName,

number RowCount )

Example 1

Grid.SetRowCount("Grid1", 2);

Set the "Grid1" object to have 2 rows


Grid.SetRowHeight Examples

Grid.SetRowHeight

Grid.SetRowHeight (

string ObjectName,

number Row,

number Height,

boolean Redraw = true )

Example 1

Grid.SetRowHeight("Grid1", 1, 42, false);
Grid.SetColumnWidth("Grid1", 1, 42, false);
Grid.Refresh("Grid1");

Set the width and height of row 1 and column 1 and the redraw the entire grid


Grid.SetRowHiding Examples

Grid.SetRowHiding

Grid.SetRowHiding (

string ObjectName,

boolean AllowHiding = true )

Example 1

Grid.SetRowHiding("Grid1", true);

Allow rows to be contracted to size zero at runtime by the user


Grid.SetRowResize Examples

Grid.SetRowResize

Grid.SetRowResize (

string ObjectName,

boolean Resizable = true )

Example 1

Grid.SetRowResize("Grid1", true);

Allow rows to be resized by the user at runtime


Grid.SetSelectable Examples

Grid.SetSelectable

Grid.SetSelectable (

string ObjectName,

boolean Selectable )

Example 1

Grid.SetSelectable("Grid1", false);

Turn off the ability to select cells in the object "Grid1"


Grid.SetSelectedRange Examples

Grid.SetSelectedRange

Grid.SetSelectedRange (

string ObjectName,

number MinRow,

number MinColumn,

number MaxRow,

number MaxColumn,

boolean SelectCells = true,

boolean Redraw = true )

Example 1

TotalColumn = Grid.GetColumnCount("Grid1");
TotalRow = Grid.GetRowCount("Grid1");
-- Set the selected cells
Grid.SetSelectedRange("Grid1", 0, 0, TotalColumn / 2, TotalRow / 2, true, true);

Select half of the cells in the object "Grid1"


Grid.SetSingleColumnSelection Examples

Grid.SetSingleColumnSelection

Grid.SetSingleColumnSelection (

string ObjectName,

boolean SingleColumnSelection )

Example 1

-- Get single column selection
bSingle = Grid.GetSingleColumnSelection("Grid1");
-- Set it to the opposite
Grid.SetSingleColumnSelection("Grid1", not bSingle);

Toggles the single column selection option


Grid.SetSingleRowSelection Examples

Grid.SetSingleRowSelection

Grid.SetSingleRowSelection (

string ObjectName,

boolean SingleRowSelection )

Example 1

-- Get single row selection
bSingle = Grid.GetSingleRowSelection("Grid1");
-- Set it to the opposite
Grid.SetSingleRowSelection("Grid1", not bSingle);

Toggles the single row selection option


Grid.SetSize Examples

Grid.SetSize

Grid.SetSize (

string ObjectName,

number Width,

number Height )

Example 1

Grid.SetSize("Grower", 100, 150 );

Set the "Grower" grid object's width to 100 pixels and it's height to 150 pixels.

Example 2

Grid.SetSize("Expand", Grid.GetSize("Expand").Width + 200, Grid.GetSize("Expand").Height + 100);

Increases the "Expand" grid object's current width by 200 pixels and it's current height by 100 pixels. The Grid.GetSize action is used here to get the current size of the grid object.


Grid.SetSortAscending Examples

Grid.SetSortAscending

Grid.SetSortAscending (

string ObjectName,

boolean Ascending )

Example 1

Grid.SetSortAscending("Grid1", true);

Set "Grid1" to sort ascending


Grid.SetTabEnabled Examples

Grid.SetTabEnabled

Grid.SetTabEnabled (

string ObjectName,

boolean UseTabKey = true )

Example 1

Grid.SetTabEnabled("Grid1", false);

Turn off the tab enabled option

Example 2

Grid.SetTabEnabled("Grid1", true);

Turn on the tab enabled option


Grid.SetToolTipsEnabled Examples

Grid.SetToolTipsEnabled

Grid.SetToolTipsEnabled (

string ObjectName,

boolean Tooltips )

Example 1

Grid.SetToolTipsEnabled("Grid1", false);

Turn off tooltips


Grid.SetTrackFocusCell Examples

Grid.SetTrackFocusCell

Grid.SetTrackFocusCell (

string ObjectName,

boolean TrackFocus,

boolean Redraw = true )

Example 1

Grid.SetTrackFocusCell("Grid1", false, true);

Turn off the track focus cell option. This is enabled by default.


Grid.SetUnhideColumn Examples

Grid.SetUnhideColumn

Grid.SetUnhideColumn (

string ObjectName,

boolean AllowUnhide = true )

Example 1

Grid.SetUnhideColumn("Grid1", false);

Turn off the unhide option


Grid.SetUnhideRow Examples

Grid.SetUnhideRow

Grid.SetUnhideRow (

string ObjectName,

boolean AllowUnhide = true )

Example 1

Grid.SetUnhideRow("Grid1", false);

Turn off the row unhide option


Grid.SetVisible Examples

Grid.SetVisible

Grid.SetVisible (

string ObjectName,

boolean Visible = true )

Example 1

Grid.SetVisible("Grid7", false);

Makes the "Grid7" grid object invisible.

Example 2

Grid.SetVisible("Scores", true);

Makes the grid object called "Scores" visible.

Example 3

Grid.SetVisible("Grid12");

Makes the grid object named "Grid12" visible.


Grid.SortTextItems Examples

Grid.SortTextItems

Grid.SortTextItems (

string ObjectName,

number Column,

boolean Ascending,

boolean Redraw = true )

Example 1

Grid.SortTextItems("Grid1", 1, true, true);

Sort column 1 alphabetically.


Hotspot.GetPos Examples

Hotspot.GetPos

table Hotspot.GetPos (

string ObjectName )

Example 1

position = Hotspot.GetPos("Hot Area");

Gets the current X, Y coordinates of the "Hot Area" hotspot object and stores the results in a table called "position." These values can be accessed by referencing position.X and position.Y.


Hotspot.GetProperties Examples

Hotspot.GetProperties

table Hotspot.GetProperties (

string ObjectName )

Example 1

-- Get the tooltip text in use by the hotspot object
sTooltip = Hotspot.GetProperties("Hotspot1").TooltipText;

-- Display this text to the user
Dialog.Message("Tooltip", sTooltip);

Get the currently displayed tooltip text from the hotspot object 'Hotspot1' and display it to the user.


Hotspot.GetSize Examples

Hotspot.GetSize

table Hotspot.GetSize (

string ObjectName )

Example 1

spot_size = Hotspot.GetSize("Hot Water");

Gets the pixel dimensions of the "Hot Water" hotspot object and stores the width and height values in the "spot_size" table. The dimensions can be accessed by referencing spot_size.Width and spot_size.Height.


Hotspot.IsEnabled Examples

Hotspot.IsEnabled

boolean Hotspot.IsEnabled (

string ObjectName )

Example 1

enabled = Hotspot.IsEnabled("Magic Area");

Stores true in a variable named "enabled" if the "Magic Area" hotspot object is enabled, and false if it is disabled.

Example 2

bHot1Enabled = Hotspot.IsEnabled("Hotspot1");

Checks whether the "Hotspot1" hotspot object is enabled or disabled, and sets the bHot1Enabled variable to either true or false, accordingly.

Tip: Starting a variable name with "b" is a technique that programmers use to help themselves remember that a variable contains a boolean value.


Hotspot.SetEnabled Examples

Hotspot.SetEnabled

Hotspot.SetEnabled (

string ObjectName,

boolean Enabled = true )

Example 1

Hotspot.SetEnabled("Hotspot4", true);

Enables the hotspot object named "Hotspot4."

Example 2

Hotspot.SetEnabled("My Little Spot", false);

Disables the hotspot object named "My Little Spot."


Hotspot.SetPos Examples

Hotspot.SetPos

Hotspot.SetPos (

string ObjectName,

number X,

number Y )

Example 1

Hotspot.SetPos("Set Me", 100, 150 );

Sets the "Set Me" hotspot object's X coordinate to 100 pixels and the Y coordinate to 150.

Example 2

Hotspot.SetPos("Move Me", 0, 0);

Sets the "Move Me" hotspot object's X coordinate to 0 and the Y coordinate to 0. The hotspot object will be moved to the upper left hand corner of the page from it's current position.


Hotspot.SetProperties Examples

Hotspot.SetProperties

Hotspot.SetProperties (

string ObjectName,

table Properties )

Example 1

-- Change the tooltip text in use by a hotspot object
Hotspot.SetProperties("Hotspot1", {TooltipText = "I am a tooltip!!"});

Change the tooltip text of the hotspot object 'Hotspot1'.


Hotspot.SetSize Examples

Hotspot.SetSize

Hotspot.SetSize (

string ObjectName,

number Width,

number Height )

Example 1

Hotspot.SetSize("Grower", 100, 150 );

Set the "Grower" hotspot object's width to 100 pixels and it's height to 150 pixels.

Example 2

Hotspot.SetSize("Expand", Hotspot.GetSize("Expand").Width + 200, Hotspot.GetSize("Expand").Height + 100);

Increases the"Expand" hotspot object's current width by 200 pixels and it's current height by 100 pixels. The Hotspot.GetSize action is used here to get the current size of the hotspot object.


HTTP.Download Examples

HTTP.Download

HTTP.Download (

string URL,

string Filename,

number Mode = MODE_BINARY,

number Timeout = 20,

number Port = 80,

table AuthData = nil,

table ProxyData = nil,

function CallbackFunction = nil )

Example 1

HTTP.Download("http://www.indigorose.com/downloads/sample.zip", _TempFolder.."\\sample.zip", MODE_BINARY, 20, 80, nil, nil, nil);

Downloads the file "sample.zip" from "http://www.indigorose.com/downloads" into the user's Temporary folder.

Note: _TempFolder is a built-in variable that contains the path to the user's system "Temp" folder.

Example 2

-- Check to see if the user is connected to the internet
connected = HTTP.TestConnection("http://www.indigorose.com", 20, 80, nil, nil);

-- If they are connected.
if connected then
-- Download a file to their temporary directory.
StatusDlg.Show(MB_ICONNONE, false);
HTTP.Download("http://www.indigorose.com/setup.exe", _TempFolder.."\\setup.exe", MODE_BINARY, 20, 80, nil, nil, nil);

-- Get any error codes that may have been returned by the download action.
error = Application.GetLastError();
StatusDlg.Hide();

-- If there was an error during the download, display the error message.
if error ~= 0 then
result = Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);

-- If there was no error during the download.
else
--Get the CRC value of the downloaded file.
crc_value = File.GetCRC(_TempFolder.."\\setup.exe");
-- Check to see if the CRC value matches it's expected value.
if crc_value == 824907888 then

-- Run the exectuable that was downloaded.
File.Run(_TempFolder.."\\setup.exe", "", "", SW_SHOWNORMAL, true);

-- The CRC value does not match. Display an error message to the user.
else
result = Dialog.Message("Error", "The downloaded file is incomplete. Please try downloading again.", MB_OK, MB_ICONSTOP, MB_DEFBUTTON1);
end
end

-- Display a notice informing them that they are not connected.
else
Dialog.Message("Internet Error", "You are not connected to the internet. Please connect to download.");
end

This example first checks to see if the user has an internet connection. If they do, a file is downloaded to their temporary directory. That file is then checked to make sure it is complete and not corrupt before launching it. A series of checks are performed in this script to handle any errors that occur and displays notification messages to the user if any actions fail.

Note: _TempFolder is a built-in variable that contains the path to the user's system "Temp" folder.

Example 3

-- Callback function for HTTP.Download
function DownloadCallback (nDownloaded, nTotal, TransferRate, SecondLeft, SecondsLeftFormat, Message)
-- Convert total and downloaded bytes into formatted strings
sDownloaded = String.GetFormattedSize(nDownloaded, FMTSIZE_AUTOMATIC, true);
sTotal = String.GetFormattedSize(nTotal, FMTSIZE_AUTOMATIC, true);

-- Output time left, formatted.
StatusDlg.SetMessage("Currently downloading file . . . Time Left: " .. SecondsLeftFormat);

-- Output formatted sizes to user through statusdlg status text
StatusDlg.SetStatusText("Downloaded: " .. sDownloaded .. " / " .. sTotal);

-- Set meter position (fraction downloaded * max meter range)
StatusDlg.SetMeterPos((nDownloaded / nTotal) * 65534);
end

-- Show the StatusDlg
StatusDlg.Show(0, false);

-- Set statusdlg title and message
StatusDlg.SetTitle("Downloading . . . ");

-- Set meter range (max range = 65534)
StatusDlg.SetMeterRange(0, 65534);

-- Download a file from the internet to the user's computer
-- Uses DownloadCallback() as the callback function
HTTP.Download("http://www.yourdomain.com/downloads/update.exe", _TempFolder.."\\update.exe", MODE_BINARY, 20, 80, nil, nil, DownloadCallback);

-- Hide the StatusDlg
StatusDlg.Hide();

Downloads a file from the internet onto the user's computer. The callback function "DownloadCallback" controls the Status Dialog.


HTTP.DownloadSecure Examples

HTTP.DownloadSecure

HTTP.DownloadSecure (

string URL,

string Filename,

number Mode = MODE_BINARY,

number Timeout = 20,

number Port = 443,

table AuthData = nil,

table ProxyData = nil,

function CallbackFunction = nil )

Example 1

HTTP.DownloadSecure("https://www.indigorose.com/downloads/sample.zip", _TempFolder.."\\sample.zip", MODE_BINARY, 20, 443, nil, nil, nil);

Downloads the file "sample.zip" from "http://www.indigorose.com/downloads" into the user's Temporary folder.

Note: _TempFolder is a built-in variable that contains the path to the user's system "Temp" folder.

Example 2

-- Check to see if the user is connected to the internet
connected = HTTP.TestConnection("http://www.indigorose.com", 20, 80, nil, nil);

-- If they are connected.
if connected then
-- Download a file to their temporary directory.
StatusDlg.Show(MB_ICONNONE, false);
HTTP.DownloadSecure("https://www.indigorose.com/update.exe", _TempFolder.."\\update.exe", MODE_BINARY, 20, 443, nil, nil, nil);

-- Get any error codes that may have been returned by the download action.
error = Application.GetLastError();
StatusDlg.Hide();

-- If there was an error during the download, display the error message.
if error ~= 0 then
result = Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);

-- If there was no error during the download.
else
--Get the CRC value of the downloaded file.
crc_value = File.GetCRC(_TempFolder.."\\update.exe");
-- Check to see if the CRC value matches it's expected value.
if crc_value == 824907888 then

-- Run the exectuable that was downloaded.
File.Run(_TempFolder.."\\update.exe", "", "", SW_SHOWNORMAL, true);

-- The CRC value does not match. Display an error message to the user.
else
result = Dialog.Message("Error", "The downloaded file is incomplete. Please try downloading again.", MB_OK, MB_ICONSTOP, MB_DEFBUTTON1);
end
end

-- Display a notice informing them that they are not connected.
else
Dialog.Message("Internet Error", "You are not connected to the internet. Please connect to download.");
end

This example first checks to see if the user has an internet connection. If they do, a file is downloaded to their temporary directory. That file is then checked to make sure it is complete and not corrupt before launching it. A series of checks are performed in this script to handle any errors that occur and displays notification messages to the user if any actions fail.

Note: _TempFolder is a built-in variable that contains the path to the user's system "Temp" folder.

Example 3

-- Callback function for HTTP.DownloadSecure
function DownloadCallback (nDownloaded, nTotal, TransferRate, SecondLeft, SecondsLeftFormat, Message)
-- Convert total and downloaded bytes into formatted strings
sDownloaded = String.GetFormattedSize(nDownloaded, FMTSIZE_AUTOMATIC, true);
sTotal = String.GetFormattedSize(nTotal, FMTSIZE_AUTOMATIC, true);

-- Output time left, formatted.
StatusDlg.SetMessage("Currently downloading file . . . Time Left: " .. SecondsLeftFormat);

-- Output formatted sizes to user through statusdlg status text
StatusDlg.SetStatusText("Downloaded: " .. sDownloaded .. " / " .. sTotal);

-- Set meter position (fraction downloaded * max meter range)
StatusDlg.SetMeterPos((nDownloaded / nTotal) * 65534);
end

-- Set statusdlg title and message
StatusDlg.SetTitle("Downloading . . . ");
StatusDlg.SetMessage("Currently downloading file . . . ");

-- Set meter range (max range = 65534)
StatusDlg.SetMeterRange(0, 65534);

-- Show the StatusDlg
StatusDlg.Show(0, false);

-- Download a file from the internet to the user's computer
-- Uses DownloadCallback() as the callback function
HTTP.DownloadSecure("https://www.yourdomain.com/downloads/update.exe", _TempFolder .. "\\update.exe", MODE_BINARY, 20, 443, nil, nil, DownloadCallback);

-- Hide the StatusDlg
StatusDlg.Hide();

Downloads a file from the internet onto the user's computer. The callback function "DownloadCallback" controls the Status Dialog.


HTTP.GetConnectionState Examples

HTTP.GetConnectionState

table HTTP.GetConnectionState (

)

Example 1

tConnectedState = HTTP.GetConnectionState();

Gets the connection state, and store it in table 'tConnectedState'.

Example 2

-- Used to generate 100 spaces. This allows lining up of boolean values later
function AddSpaces()
strReturn = ""
for nCount = 1, 100 do
strReturn = strReturn .. " ";
end
return strReturn;
end

-- converts boolean value to string (true = True, false = False)
function BoolToString(Value)
if type (Value) == "boolean" then
if Value then return "True" else return "False" end;
else
return Value;
end
end

-- Get the current connection state
tConnectionState = HTTP.GetConnectionState();

-- Initialize string used to store the broken-down details
strStateDetails = "";

-- traverse through tConnectionState, fill in string strStateDetails
for sIndex, vDetails in pairs(tConnectionState) do
strStateDetails = strStateDetails .. String.Mid(sIndex..": ".. AddSpaces(),1, 30).. " " .. BoolToString(vDetails) .. "\r\n";
end

-- Output to user
Dialog.Message("Connection State Results", strStateDetails);

Tests the connection state and outputs the results to the user.


HTTP.GetFileSize Examples

HTTP.GetFileSize

number HTTP.GetFileSize (

string URL,

number Mode = MODE_BINARY,

number Timeout = 20,

number Port = 80,

table AuthData = nil,

table ProxyData = nil,

function CallbackFunction = nil )

Example 1

nSize = HTTP.GetFileSize("http://www.mydomain.com/myfile.exe", MODE_BINARY, 20, 80, nil, nil, nil);

Gets the size of the file "myfile.exe" located at "http://www.mydomain.com" and stores it in the variable nSize.

Example 2

-- Settings for HTTP actions
sFileOnServer = "http://www.yourdomain.com/pub/file.ext";
sLocalFilePath = _TempFolder .. "file.ext";
nServerMode = MODE_BINARY;
nServerTimeout = 20;
nServerPort = 80;
tAuthData = nil;
tProxyData = nil;

-- Set the max bytes allowed without alerting the user to 2MB (2*1024*1024):
QuestionByteThreshold = 2097152;

-- Assume download should continue
bContinueDownload = true;

-- Get Filesize of file to be downloaded
FileSize = HTTP.GetFileSize(sFileOnServer, nServerMode, nServerTimeout, nServerPort, tAuthData, tProxyData, nil);

-- Check if filesize is unknown
if FileSize == -1 then
-- Filesize is unknown, alert user
choice = Dialog.Message("Alert", "Filesize is unknown. Continue Download?", MB_YESNO, MB_ICONQUESTION, MB_DEFBUTTON1);
if choice == 7 then
-- User chose not to continue with download
bContinueDownload = false;
end
-- Check if file size is greater than threshold
elseif FileSize > QuestionByteThreshold then
-- Filesize is larger than threshold, alert the user
choice = Dialog.Message("Alert", "Filesize is greater than the threshold by " .. FileSize - QuestionByteThreshold .. " bytes. Continue Download?", MB_YESNO, MB_ICONQUESTION, MB_DEFBUTTON1);
if choice == 7 then
-- User chose not to continue with download
bContinueDownload = false;
end
end

-- Check if download should continue
if bContinueDownload then
-- Download File, using built in status dialog
StatusDlg.Show();
StatusDlg.ShowCancelButton();
HTTP.Download(sFileOnServer, sLocalFilePath, nServerMode, sServerPass, nServerPort, tAuthData, tProxyData, nil);
StatusDlg.Hide();
else
-- Don't download file, alert user that download has been terminated
Dialog.Message("Alert", "Download aborted by user");
end

Checks the size of a file on a HTTP server to be downloaded. If the file is larger than a predefined threshold, the user is asked if the download should continue.


HTTP.GetFileSizeSecure Examples

HTTP.GetFileSizeSecure

number HTTP.GetFileSizeSecure (

string URL,

number Mode = MODE_BINARY,

number Timeout = 20,

number Port = 443,

table AuthData = nil,

table ProxyData = nil,

function CallbackFunction = nil )

Example 1

nFileSize = HTTP.GetFileSizeSecure("https://www.mydomain.com/myfile.exe", MODE_BINARY, 20, 443, nil, nil, nil);

Gets the size of the file "myfile.exe" on the secure Web site and stores it in the variable nFileSize.

Example 2

-- Settings for HTTP actions
sFileOnServer = "https://www.yourdomain.com/pub/file.ext";
sLocalFilePath = _TempFolder .. "file.ext";
nServerMode = MODE_BINARY;
nServerTimeout = 20;
nServerPort = 443;
tAuthData = nil;
tProxyData = nil;

-- Set the max bytes allowed without alerting the user to 2MB (2*1024*1024):
QuestionByteThreshold = 2097152;

-- Assume download should continue
bContinueDownload = true;

-- Get Filesize of file to be downloaded
FileSize = HTTP.GetFileSizeSecure(sFileOnServer, nServerMode, nServerTimeout, nServerPort, tAuthData, tProxyData, nil);

-- Check if filesize is unknown
if FileSize == -1 then
-- Filesize is unknown, alert user
choice = Dialog.Message("Alert", "Filesize is unknown. Continue Download?", MB_YESNO, MB_ICONQUESTION, MB_DEFBUTTON1);
if choice == 7 then
-- User chose not to continue with download
bContinueDownload = false;
end
-- Check if filesize is greater than threshold
elseif FileSize > QuestionByteThreshold then
-- Filesize is larger than threshold, alert the user
choice = Dialog.Message("Alert", "Filesize is greater than the threshold by " .. FileSize - QuestionByteThreshold .. " bytes. Continue Download?", MB_YESNO, MB_ICONQUESTION, MB_DEFBUTTON1);
if choice == 7 then
-- User chose not to continue with download
bContinueDownload = false;
end
end

-- Check if download should continue
if bContinueDownload then
-- Download File, using built in status dialog
StatusDlg.Show();
StatusDlg.ShowCancelButton();
HTTP.DownloadSecure(sFileOnServer, sLocalFilePath, nServerMode, sServerPass, nServerPort, tAuthData, tProxyData, nil);
StatusDlg.Hide();
else
-- Don't download file, alert user that download has been terminated
Dialog.Message("Alert", "Download aborted by user");
end

Checks the size of a file on a HTTPS server to be downloaded. If the file is larger than a predefined threshold, the user is asked if the download should continue.


HTTP.GetHTTPErrorInfo Examples

HTTP.GetHTTPErrorInfo

table HTTP.GetHTTPErrorInfo (

)

Example 1

ErrInfo = HTTP.GetHTTPErrorInfo();

Gets the last HTTP error info and stores it in table ErrInfo.

Example 2

HTTP.Download("http://www.asitehere.com/file.ext", "c:\\file.ext",MODE_BINARY, 20, 80, nil, nil, nil);

if (Application.GetLastError()~= 0) then
-- An Error Occurred
HTTP_Error = HTTP.GetHTTPErrorInfo();
Dialog.Message("HTTP error " .. HTTP_Error.Number, HTTP_Error.Message);
end

Downloads a file. If the returned error is anything other than successful, display the extended HTTP error information.

Example 3

HTTP.Download("http://www.asitehere.com/file.ext", "c:\\file.ext",MODE_BINARY, 20, 80, nil, nil, nil);

local http_error = HTTP.GetHTTPErrorInfo();

if (http_error.Status < 200 or http_error.Status > 299) then

-- Show two dialogs containing the HTTP error info
Dialog.Message("Error Info", "HTTP Download Error Info: " .. http_error.Number .. " - " .. http_error.Message);
Dialog.Message("Error Info", "HTTP Download Server Status: " .. http_error.Status);
end

Downloads a file. If the server status indicates that an error occurred, shows a couple of dialog messages.


HTTP.Submit Examples

HTTP.Submit

string HTTP.Submit (

string URL,

table Values,

number Method = SUBMITWEB_GET,

number Timeout = 20,

number Port = 80,

table AuthData = nil,

table ProxyData = nil )

Example 1

myvalues = {Name="Brian", Company="Indigo Rose"};
result = HTTP.Submit("http://www.indigorose.com/myscript.php", myvalues, SUBMITWEB_GET, 20, 80, nil, nil);

The first line of code creates a table called "myvalues" containing two named value pairs. The first index of the table is "Name,"and has the associated value "Brian." The second index is "Company" and it's associated value is "Indigo Rose." The named value pairs in this table are then submitted to the script located at "http://www.indigorose.com/myscript.php" using an HTTP.Submit action.

Example 2

sResult = HTTP.Submit("http://www.mysearchengine.com/search.php", {search="AutoPlay"}, SUBMITWEB_GET, 20, 80, nil, nil);

This example submits the query "AutoPlay" to a script found at http://www.mysearchengine.com. The parameter is passed using an inline table, and the results are stored in the variable sResult.


HTTP.SubmitSecure Examples

HTTP.SubmitSecure

string HTTP.SubmitSecure (

string URL,

table Values,

number Method = SUBMITWEB_GET,

number Timeout = 20,

number Port = 443,

table AuthData = nil,

table ProxyData = nil )

Example 1

myvalues = {Name="Brian", Company="Indigo Rose"};
result = HTTP.SubmitSecure("https://www.indigorose.com/myscript.php", myvalues, SUBMITWEB_GET, 20, 443, nil, nil);

The first line of code creates a table called "myvalues" containing two named value pairs. The first index of the table is "Name,"and has the associated value "Brian." The second index is "Company" and it's associated value is "Indigo Rose." The named value pairs in this table are then submitted to the script located at "https://www.indigorose.com/myscript.php" using an HTTP.SubmitSecure action.

Example 2

sResult = HTTP.SubmitSecure("https://www.mysearchengine.com/search.php", {search="AutoPlay"}, SUBMITWEB_GET, 20, 443, nil, nil);

This example submits the query "AutoPlay" to a script found at https://www.mysearchengine.com. The parameter is passed using an inline table, and the results are stored in the variable sResult.


HTTP.TestConnection Examples

HTTP.TestConnection

boolean HTTP.TestConnection (

string URL,

number Timeout = 20,

number Port = 80,

table AuthData = nil,

table ProxyData = nil )

Example 1

IsConnected = HTTP.TestConnection("http://www.google.ca", 20, 80, nil, nil);

if (IsConnected == false) then
Dialog.Message("Notice", "No Internet connection was detected.");
end

Checks the user's Internet connection by trying to connect to the site "http://www.google.ca." If the connection fails, a dialog would be displayed notifying the user.

Example 2

-- Check to see if the user is connected to the internet
connected = HTTP.TestConnection("http://www.indigorose.com", 20, 80, nil, nil);

-- If they are connected.
if connected then
-- Download a file to their temporary directory.
StatusDlg.Show(MB_ICONNONE, false);
HTTP.Download("http://www.indigorose.com/setup.exe", _TempFolder.."\\setup.exe", MODE_BINARY, 20, 80, nil, nil, nil);

-- Get any error codes that may have been returned by the download action.
error = Application.GetLastError();
StatusDlg.Hide();

-- If there was an error during the download, display the error message.
if error ~= 0 then
result = Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);

-- If there was no error during the download.
else
--Get the CRC value of the downloaded file.
crc_value = File.GetCRC(_TempFolder.."\\setup.exe");
-- Check to see if the CRC value matches it's expected value.
if crc_value == 824907888 then

-- Run the exectuable that was downloaded.
File.Run(_TempFolder.."\\setup.exe", "", "", SW_SHOWNORMAL, true);

-- The CRC value does not match. Display an error message to the user.
else
result = Dialog.Message("Error", "The downloaded file is incomplete. Please try downloading again.", MB_OK, MB_ICONSTOP, MB_DEFBUTTON1);
end
end

-- Display a notice informing them that they are not connected.
else
Dialog.Message("Internet Error", "You are not connected to the internet. Please connect to download.");
end

This example first checks to see if the user has an internet connection using the HTTP.TestConnection action. If they do, a file is downloaded to their temporary directory. That file is then checked to make sure it is complete and not corrupt before launching it. A series of checks are performed in this script to handle any errors that occur and displays notification messages to the user if any actions fail.

Note: _TempFolder is a built-in variable that contains the path to the user's system "Temp" folder.


Image.GetFileInfo Examples

Image.GetFileInfo

table Image.GetFileInfo (

string Filename )

Example 1

image_info = Image.GetFileInfo("Image1");

Gets the pixel dimensions and bit depth of the "Image1" image object and stores the width, height and bit depth values in the "image_info" table. The dimensions can be accessed by referencing image_info.Width and image_info.Height and it's bit depth by image_info.BitDepth.


Image.GetFilename Examples

Image.GetFilename

string Image.GetFilename (

string ObjectName )

Example 1

image_path = Image.GetFilename("Slide Show");

Stores the full path of the image currently loaded in the "Slide Show" image object in the variable called image_path.


Image.GetOpacity Examples

Image.GetOpacity

number Image.GetOpacity (

string ObjectName )

Example 1

opacity_value = Image.GetOpacity("Logo");

Gets the current opacity of the "Logo" image object and stores it's value in the variable "opacity_value."


Image.GetPos Examples

Image.GetPos

table Image.GetPos (

string ObjectName )

Example 1

pic_pos = Image.GetPos("Picture");

Gets the current X, Y coordinates of the "Picture" image object and stores the results in a table called "pic_pos." These values can be accessed by referencing pic_pos.X and pic_pos.Y.


Image.GetProperties Examples

Image.GetProperties

table Image.GetProperties (

string ObjectName )

Example 1

tProperties = Image.GetProperties("Image1");

Gets the properties from the image object 'Image1' and stores them in table tProperties.


Image.GetSize Examples

Image.GetSize

table Image.GetSize (

string ObjectName )

Example 1

image_size = Image.GetSize("Image1");

Gets the pixel dimensions of the "Image1" image object and stores the width and height values in the "image_size" table. The dimensions can be accessed by referencing image_size.Width and image_size.Height.


Image.IsEnabled Examples

Image.IsEnabled

boolean Image.IsEnabled (

string ObjectName )

Example 1

enabled = Image.IsEnabled("Smiling Face");

Stores true in a variable named "enabled" if the "Smiling Face" image object is enabled, and false if it is disabled.

Example 2

bImage4Enabled = Image.IsEnabled("Image4");

Checks whether the "Image4" image object is enabled or disabled, and sets the bImage4Enabled variable to either true or false, accordingly.

Tip: Starting a variable name with "b" is a technique that programmers use to help themselves remember that a variable contains a boolean value.


Image.IsVisible Examples

Image.IsVisible

boolean Image.IsVisible (

string ObjectName )

Example 1

Sunset_Visible = Image.IsVisible("Sunset");

Checks whether the image object called "Sunset" is visible and stores true or false in a variable called Sunset_Visible.

Example 2

Image2isVisible = Image.IsVisible("Image2");

Stores true in Image2isVisible if the "Image2" image object is visible.


Image.Load Examples

Image.Load

Image.Load (

string ObjectName,

string Filename )

Example 1

Image.Load("Thumbnail4", "AutoPlay\\Images\\autumnleaves.jpg");

Loads "AutoPlay\Images\autumnleaves.jpg" into the "Thumbnail4" image object.

Example 2

Image.Load("Image1", "AutoPlay\\Docs\\chocolate_cow.png");

Loads the "AutoPlay\Docs\chocolate_cow.png" file into the image object named "Image1."


Image.SetEnabled Examples

Image.SetEnabled

Image.SetEnabled (

string ObjectName,

boolean Enabled = true )

Example 1

Image.SetEnabled("Image4", true);

Enables the image object named "Image4."

Example 2

Image.SetEnabled("Blue Spruce", false);

Disables the image object named "Blue Spruce."


Image.SetOpacity Examples

Image.SetOpacity

Image.SetOpacity (

string ObjectName,

number Opacity = 100 )

Example 1

Image.SetOpacity("Logo", 0);

Sets the "Logo" image object's opacity to the value 0. This means the object will appear completely transparent (invisible).

Example 2

Image.SetOpacity("Product 1", 100);

Sets the "Product 1" image object's opacity to the value 100. This means the object will appear completely opaque (fully visible).

Example 3

Image.SetOpacity("Info Link", 50);

Sets the "Info Link" image object's opacity to the value 50. This means the object will appear 50% translucent (see through).


Image.SetPos Examples

Image.SetPos

Image.SetPos (

string ObjectName,

number X,

number Y )

Example 1

Image.SetPos("Set Me", 100, 150 );

Sets the "Set Me" image object's X coordinate to 100 pixels and the Y coordinate to 150.

Example 2

Image.SetPos("Move Me", 0, 0);

Sets the "Move Me" image object's X coordinate to 0 and the Y coordinate to 0. The image object will be moved to the upper left hand corner of the page from it's current position.


Image.SetProperties Examples

Image.SetProperties

Image.SetProperties (

string ObjectName,

table Properties )

Example 1

Image.SetProperties("Image1", {Opacity=50});

Sets the image opacity of the image object "Image1" to 50%.


Image.SetSize Examples

Image.SetSize

Image.SetSize (

string ObjectName,

number Width,

number Height )

Example 1

Image.SetSize("Grower", 100, 150 );

Set the "Grower" image object's width to 100 pixels and it's height to 150 pixels.

Example 2

Image.SetSize("Expand", Image.GetSize("Expand").Width + 200, Image.GetSize("Expand").Height + 100);

Increases the"Expand" image object's current width by 200 pixels and it's current height by 100 pixels. The Image.GetSize action is used here to get the current size of the image object.


Image.SetVisible Examples

Image.SetVisible

Image.SetVisible (

string ObjectName,

boolean Visible = true )

Example 1

Image.SetVisible("Image7", false);

Makes the "Image7" image object invisible.

Example 2

Image.SetVisible("Blowing Cloud", true);

Makes the image object called "Blowing Cloud" visible.

Example 3

Image.SetVisible("Image12");

Makes the image object named "Image12" visible.


INIFile.DeleteSection Examples

INIFile.DeleteSection

INIFile.DeleteSection (

string Filename,

string Section )

Example 1

INIFile.DeleteSection(_TempFolder .. "\\Configurations.ini", "NumRuns");

Deletes the section called "NumRuns" from the "Configurations.ini" INI file that is currently located in the user's system temp folder.

Note: _TempFolder is a built-in variable that contains the path to the user's system "Temp" folder.


INIFile.DeleteValue Examples

INIFile.DeleteValue

INIFile.DeleteValue (

string Filename,

string Section,

string Value )

Example 1

INIFile.DeleteValue(_TempFolder .. "\\settings.ini", "Columns", "Name" );

Deletes the value called "Name" from the "Columns" section of the "settings.ini" file located in the user's temp folder.

Note: _TempFolder is a built-in variable that contains the path to the user's system "Temp" folder.


INIFile.GetSectionNames Examples

INIFile.GetSectionNames

table INIFile.GetSectionNames (

string Filename )

Example 1

section_names = INIFile.GetSectionNames(_SourceFolder .. "\\settings.ini");

Gets all of the section names within the INI file named "settings.ini" and stores them in a table called "value_names."

Note: _SourceFolder is a built-in variable that contains the path to the folder where the autorun.exe file is located.

Example 2

-- Get all of the section names in an INI file.
all_sections = INIFile.GetSectionNames("C:\\Data.ini");

-- Check to see if any error occurred.
error = Application.GetLastError();

-- If an error occurred, display the error message.
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);
else
found = false;
-- Check to see if any sections are present.
if (all_sections ~= nil) then
-- Go through each section and try to get a value.
for index_section, section in pairs(all_sections) do
-- Try to get the data of the value you want.
value_data = INIFile.GetValue("C:\\Data.ini", section, "Path");

-- If the value was found, modify it's data.
if value_data ~= "" then
INIFile.SetValue("C:\\Data.ini", section, "Path", _ProgramFilesFolder.."\\MyApplication");

-- Check to see if any error occurred.
error = Application.GetLastError();
-- If an error occurred, display the error message.
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);
end

found = true;
break;
end
end
end

-- If the value was not found.
if (all_sections == nil) or (not found) then
-- Create a new section with a new value and data.
INIFile.SetValue("C:\\Data.ini", "INSTALL", "Path", _ProgramFilesFolder.."\\MyApplication");

-- Check to see if any error occurred.
error = Application.GetLastError();
-- If an error occurred, display the error message.
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);
end
end
end

The purpose of this example is to search for a particular value name in an INI file whose section name is unknown. If that value is found, it's data is updated. If it is not found, a new section, value and data is created in the file.


INIFile.GetValue Examples

INIFile.GetValue

string INIFile.GetValue (

string Filename,

string Section,

string Value )

Example 1

value_data = INIFile.GetValue(_SourceFolder .. "\\images.ini", "Water", "Ocean");

Gets the data found in the "Ocean" value located in the "Water" section of the INI file named "images.ini" and stores the result in a variable called "value_data."

Note: _SourceFolder is a built-in variable that contains the path to the folder where the autorun.exe file is located.

Example 2

-- Get the value data from an INI file.
full_name = INIFile.GetValue("C:\\Data.ini", "PERSONAL", "Name");

-- Check to see if any errors occurred while calling the action.
error = Application.GetLastError();

-- If an error occurred, display it's error message.
if (error ~=0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);
else
-- If the value was not found, notify the user. If it was, use it in a welcome message.
if (full_name == "") then
Dialog.Message("Notice", "You personal information has not been entered yet.", MB_OK, MB_ICONINFORMATION);
else
Dialog.Message("Hello", "Welcome "..full_name.."!", MB_OK, MB_ICONINFORMATION);
end
end

Retrieves the data found in the "Name" value of the "PERSONAL" section in an INI file. If that value is found, it is used in a welcome dialog. If the value is not found, the user is notified that their information has not yet been saved.


INIFile.GetValueNames Examples

INIFile.GetValueNames

table INIFile.GetValueNames (

string Filename,

string Section )

Example 1

value_names = INIFile.GetValueNames(_SourceFolder .. "\\images.ini", "Water");

Gets all of the value names within the "Water" section of the INI file named "images.ini" and stores them in a table called "value_names."

Note: _SourceFolder is a built-in variable that contains the path to the folder where the autorun.exe file is located.

Example 2

-- Get all of the value names in a section of an INI file.
all_values = INIFile.GetValueNames("C:\\Data.ini", "INSTALL");

-- Get the error code of the last action.
error = Application.GetLastError();

-- If an error occurred, display an error message.
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);
else
-- Check to see if there was a value at the second position.
if (all_values[2] ~= nil) then
-- Display the name of the second value in the section.
Dialog.Message("Information", "The second value in the INSTALL section is ".."'"..all_values[2].."'.", MB_OK, MB_ICONINFORMATION);
else
-- Notify the user there is no second value.
Dialog.Message("Information", "There is no second value in the INSTALL section." , MB_OK, MB_ICONINFORMATION);
end
end

Gets all of the value names within the "INSTALL" section of the INI file named "Data.ini" and stores them in a table called "all_values." If there is a second value in the section, it's name is displayed in a dialog. If there is no second value name, a dialog is shown to notify the user.


INIFile.SetValue Examples

INIFile.SetValue

INIFile.SetValue (

string Filename,

string Section,

string Value,

string Data )

Example 1

INIFile.SetValue(_TempFolder .. "\\settings.ini", "Columns", "Name", "Application Path");

-- Get the error code of the last action.
error = Application.GetLastError();

-- If an error occurred, display an error message.
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);
end

Sets the string "Application Path" to be the data for the "Name" value in the INI file called "settings.ini" that is located in the user's temp folder. If an error occurs, a dialog is shown with the error code message.

Note: _TempFolder is a built-in variable that contains the path to the user's system "Temp" folder.


Input.CanUndo Examples

Input.CanUndo

boolean Input.CanUndo (

string ObjectName )

Example 1

can_undo = Input.CanUndo("Input1");
if (can_undo)
Input.Undo("Input1");
end

Determines if an undo operation can be performed on the "Input1" object and if it can, performs an undo operation.


Input.Copy Examples

Input.Copy

Input.Copy (

string ObjectName )

Example 1

Input.Copy("Customer Name");

Copies any selected text in the "Customer Name" input object to the clipboard.


Input.Cut Examples

Input.Cut

Input.Cut (

string ObjectName )

Example 1

Input.Cut("Company");

Cuts any selected text in the "Company" input object to the clipboard.


Input.Delete Examples

Input.Delete

Input.Delete (

string ObjectName )

Example 1

Input.Delete("Email");

Deletes any selected text in the "Email" input object.


Input.GetPos Examples

Input.GetPos

table Input.GetPos (

string ObjectName )

Example 1

Info = Input.GetPos("User Input");

Gets the current X, Y coordinates of the "User Input" input object and stores the results in a table called "Info." These values can be accessed by referencing Info.X and Info.Y.


Input.GetProperties Examples

Input.GetProperties

table Input.GetProperties (

string ObjectName )

Example 1

tProperties = Input.GetProperties("Input1");

Gets the properties from the input object 'Input1' and stores them in table 'tProperties'.


Input.GetSelection Examples

Input.GetSelection

table Input.GetSelection (

string ObjectName )

Example 1

selection_point = Input.GetSelection("User Input");

Gets the indexes of the selected text in the "User Input" input object and stores the start and end points in the "selection_point" table. These values can be accessed by referencing selection_point.Start and selection_point.End.


Input.GetSize Examples

Input.GetSize

table Input.GetSize (

string ObjectName )

Example 1

input_size = Input.GetSize("Input1");

Gets the pixel dimensions of the "Input1" input object and stores the width and height values in the "input_size" table. The dimensions can be accessed by referencing input_size.Width and input_size.Height.


Input.GetText Examples

Input.GetText

string Input.GetText (

string ObjectName )

Example 1

User_Input = Input.GetText("Cust Name");

Gets the text that is currently displayed in the input object called "Cust Name" and stores it in the variable "User_Input."

Example 2

phone = Input.GetText("Input Phone");

Gets the text in the "Input Phone" input object and stores it in phone.


Input.IsEnabled Examples

Input.IsEnabled

boolean Input.IsEnabled (

string ObjectName )

Example 1

enabled = Input.IsEnabled("Serial Input");

Stores true in a variable named "enabled" if the "Serial Input" input object is enabled, and false if it is disabled.

Example 2

bInput4Enabled = Input.IsEnabled("Input4");

Checks whether the "Input4" input object is enabled or disabled, and sets the bInput4Enabled variable to either true or false, accordingly.

Tip: Starting a variable name with "b" is a technique that programmers use to help themselves remember that a variable contains a boolean value.


Input.IsVisible Examples

Input.IsVisible

boolean Input.IsVisible (

string ObjectName )

Example 1

country = Input.IsVisible("Country");

Checks whether the input object called "Country" is visible and stores true or false in a variable called country.

Example 2

Input2isVisible = Input.IsVisible("Input2");

Stores true in Input2isVisible if the "Input2" input object is visible.


Input.Paste Examples

Input.Paste

Input.Paste (

string ObjectName )

Example 1

Input.Paste("Movies");

Pastes the current text in the clipboard into the "Movies" input object.


Input.ScrollLines Examples

Input.ScrollLines

Input.ScrollLines (

string ObjectName,

number Lines )

Example 1

-- Scrolls the text in the "Input1" input object 2 lines.
Input.ScrollLines("Input1", 2);

Scrolls the text in the "Input1" input object 2 lines in a downward direction.

Example 2

-- Scrolls the text in the "Input1" input object -2 lines.
Input.ScrollLines("Input1", -2);

Scrolls the text in the "Input1" input object 2 lines in an upward direction.


Input.ScrollToLine Examples

Input.ScrollToLine

Input.ScrollToLine (

string ObjectName,

number Line )

Example 1

-- Scrolls the text in the "Input1" input object to the third line.
Input.ScrollToLine("Input1", 3);

Scrolls the text in the "Input1" input object to the third line. The third line will appear as the first visible line of text in the object.

Example 2

-- Scrolls the text in the "Input1" input object to the last line.
Input.ScrollToLine("Input1", -1);

Scrolls the text in the "Input1" input object to the last line (-1 is used to specify the last line).


Input.SetEnabled Examples

Input.SetEnabled

Input.SetEnabled (

string ObjectName,

boolean Enabled = true )

Example 1

Input.SetEnabled("Input4", true);

Enables the input object named "Input4."

Example 2

Input.SetEnabled("Email", false);

Disables the input object named "Email."


Input.SetPos Examples

Input.SetPos

Input.SetPos (

string ObjectName,

number X,

number Y )

Example 1

Input.SetPos("Set Me", 100, 150);

Sets the "Set Me" input object's X coordinate to 100 pixels and the Y coordinate to 150.

Example 2

Input.SetPos("Move Me", 0, 0);

Sets the "Move Me" input object's X coordinate to 0 and the Y coordinate to 0. The image object will be moved to the upper left hand corner of the page from it's current position.


Input.SetProperties Examples

Input.SetProperties

Input.SetProperties (

string ObjectName,

table Properties )

Example 1

-- Create properties table (only include items that should be changed)
tProperties = {};
tProperties.Enabled = true;
tProperties.Visible = false;
tProperties.Text = "I am new text!!!";

-- Set the properties of an input object
Input.SetProperties("Input1", tProperties);

Sets the properties of the input object 'Input1' to the properties contained in table 'tProperties'.


Input.SetSelection Examples

Input.SetSelection

Input.SetSelection (

string ObjectName,

number Start,

number End )

Example 1

Input.SetSelection("Serial Number", 1, 5);

Selects the first five characters in the "Serial Number" input object.

Example 2

Input.SetSelection("Serial Number", 1, -1);

Selects all the text in the "Serial Number" input object.

Example 3

Input.SetSelection("Serial Number", -1, 1);

Deselects all the text in the "Serial Number" input object.


Input.SetSize Examples

Input.SetSize

Input.SetSize (

string ObjectName,

number Width,

number Height )

Example 1

Input.SetSize("Grower", 100, 150);

Set the "Grower" input object's width to 100 pixels and it's height to 150 pixels.

Example 2

Input.SetSize("Expand", Input.GetSize("Expand").Width + 200, Input.GetSize("Expand").Height + 100);

Increases the "Expand" input object's current width by 200 pixels and it's current height by 100 pixels. The Input.GetSize action is used here to get the current size of the image object.


Input.SetText Examples

Input.SetText

Input.SetText (

string ObjectName,

string Text )

Example 1

Input.SetText("Info Text", "Enter Here");

Changes the text in the input object named "Info Text" to "Enter Here".

Example 2

Input.SetText("Search Text", "Text to Search");

Changes the text in the input object named "Search Text" to "Text to Search".


Input.SetVisible Examples

Input.SetVisible

Input.SetVisible (

string ObjectName,

boolean Visible = true )

Example 1

Input.SetVisible("Input7", false);

Makes the "Input7" input object invisible.

Example 2

Input.SetVisible("Cust Data", true);

Makes the input object called "Cust Data" visible.

Example 3

Input.SetVisible("Input12");

Makes the input object named "Input12" visible.


Input.Undo Examples

Input.Undo

Input.Undo (

string ObjectName )

Example 1

Input.Undo("Input7");

Undoes the last operation that was performed in the "Input7" input object.


Label.GetPos Examples

Label.GetPos

table Label.GetPos (

string ObjectName )

Example 1

Install_Pos = Label.GetPos("Install");

Gets the current X, Y coordinates of the "Install" label object and stores the results in a table called "Install_Pos." These values can be accessed by referencing Install_Pos.X and Install_Pos.Y.


Label.GetProperties Examples

Label.GetProperties

table Label.GetProperties (

string ObjectName )

Example 1

-- Get the label properties
tProperties = Label.GetProperties("Slogan");

-- Get the currently displayed text
sText = tProperties.Text

-- Display the text to the user in a dialog message
Dialog.Message("Label Object Text", sText);

Displays the contents of the label object "Slogan" to the user in a pop-up dialog.


Label.GetSize Examples

Label.GetSize

table Label.GetSize (

string ObjectName )

Example 1

email_size = Label.GetSize("Email Link");

Gets the pixel dimensions of the "Email Link" label object and stores the width and height values in the "email_size" table. The dimensions can be accessed by referencing email_size.Width and email_size.Height.


Label.GetText Examples

Label.GetText

string Label.GetText (

string ObjectName )

Example 1

text_mex = Label.GetText("Mexico");

Gets the text that is currently displayed in the label object named "Mexico" and stores it in a variable named "text_mex."

Example 2

song = Label.GetText("Current Song Name");

Gets the text in the "Current Song Name" label object and stores it in a variable called "song."


Label.IsEnabled Examples

Label.IsEnabled

boolean Label.IsEnabled (

string ObjectName )

Example 1

welcome_text_enabled = Label.IsEnabled("Welcome Text");

Stores true in a variable named "welcome_text_enabled" if the "Welcome Text" label object is enabled, and false if it is disabled.

Example 2

bLabel4Enabled = Label.IsEnabled("Label4");

Checks whether the "Label4" label object is enabled or disabled, and sets the "bLabel4Enabled" variable to either true or false, accordingly.

Tip: Starting a variable name with "b" is a technique that programmers use to help themselves remember that a variable contains a boolean value.


Label.IsVisible Examples

Label.IsVisible

boolean Label.IsVisible (

string ObjectName )

Example 1

welcome_text_visible = Label.IsVisible("Welcome Text");

Checks whether the label object called "Welcome Text" is visible and stores true or false in a variable called "welcome_text_visible".

Example 2

Label2isVisible = Label.IsVisible("Label2");

Stores true in "Label2isVisible" if the "Label2" label object is visible.


Label.SetEnabled Examples

Label.SetEnabled

Label.SetEnabled (

string ObjectName,

boolean Enabled = true )

Example 1

Label.SetEnabled("Music Toggle", true);

Enables the label object named "Music Toggle."

Example 2

Label.SetEnabled("Label4", false);

Disables the label object named "Label4."


Label.SetPos Examples

Label.SetPos

Label.SetPos (

string ObjectName,

number X,

number Y )

Example 1

Label.SetPos("Set Me", 100, 150);

Sets the "Set Me" label object's X coordinate to 100 pixels and the Y coordinate to 150.

Example 2

Label.SetPos("Move Me", 0, 0);

Sets the "Move Me" label object's X coordinate to 0 and the Y coordinate to 0. The label object will be moved to the upper left hand corner of the page from it's current position.


Label.SetProperties Examples

Label.SetProperties

Label.SetProperties (

string ObjectName,

table Properties )

Example 1

-- Populate table from item properties
tProperties = Label.GetProperties("Slogan");

-- Change the desired items
tProperties.Enabled = true;
tProperties.Visible = false;
tProperties.Text = "I am new text!!!";

-- Set the properties of a label object
Label.SetProperties("Slogan", tProperties);

Sets the properties of the label object 'Slogan' to the properties contained in table 'tProperties'.


Label.SetSize Examples

Label.SetSize

Label.SetSize (

string ObjectName,

number Width,

number Height )

Example 1

Label.SetSize("Grower", 100, 150 );

Set the "Grower" label object's width to 100 pixels and it's height to 150 pixels.

Example 2

Label.SetSize("Expand", Label.GetSize("Expand").Width + 200, Label.GetSize("Expand").Height + 100);

Increases the "Expand" label object's current width by 200 pixels and it's current height by 100 pixels. The Label.GetSize action is used here to get the current size of the label object.


Label.SetText Examples

Label.SetText

Label.SetText (

string ObjectName,

string Text )

Example 1

Label.SetText("Label4", "Hello " .. user_name);

Sets the text in the "Label4" label object to "Hello " followed by the contents of the user_name variable.

Note: The concatenation operator (..) is used to add the contents of the user_name variable to the end of the "Hello " string.

Example 2

Label.SetText("Copyright Notice", "(c) 2015 Indigo Rose Software");

Sets the text in the label object named "Copyright Notice" to "(c) 2015 Indigo Rose Software".


Label.SetVisible Examples

Label.SetVisible

Label.SetVisible (

string ObjectName,

boolean Visible = true )

Example 1

Label.SetVisible("Label4", true);

Makes the "Label4" label object visible.

Example 2

Label.SetVisible("Readme First", false);

Hides the label object named "Readme First."

Example 3

Label.SetVisible("License Agreement");

Makes the label object named "License Agreement" visible.


ListBox.AddItem Examples

ListBox.AddItem

number ListBox.AddItem (

string ObjectName,

string Text,

string Data = "" )

Example 1

ListBox.AddItem("Document List", "Product Description", "product_description_path");

Adds an item to the "Document List" listbox object. The new entry will display the text "Product Description". The associated item data is a variable called "product_description_path" which could contain the path to a file.

Example 2

item_index = ListBox.AddItem("ListBox4", "Photography");

Adds an item with the text "Photography" to the "ListBox4" listbox object.


ListBox.DeleteItem Examples

ListBox.DeleteItem

ListBox.DeleteItem (

string ObjectName,

number Index )

Example 1

ListBox.DeleteItem("PackageList", 2);

Removes the second item from the listbox object called "PackageList."

Example 2

ListBox.DeleteItem("PackageList", -1);

Removes all items from the "PackageList" listbox object.

Example 3

ListBox.DeleteItem("PackageList", LB_ALLITEMS);

Removes all items from the "PackageList" listbox object.


ListBox.DeselectItem Examples

ListBox.DeselectItem

ListBox.DeselectItem (

string ObjectName,

number Index )

Example 1

ListBox.DeselectItem("Movies", 2);

Deselects the second item in the listbox object called "Movies."

Example 2

ListBox.DeselectItem("Slides", -1);

Deselects all items in the "Slides" listbox object.

Example 3

ListBox.DeselectItem("Slides", LB_ALLITEMS);

Deselects all items in the "Slides" listbox object.


ListBox.FindItem Examples

ListBox.FindItem

number ListBox.FindItem (

string ObjectName,

number StartAfter,

number SearchType,

string SearchText )

Example 1

search_index = ListBox.FindItem("ListBox1", -1, 0, "Document");

Searches through all items in the "ListBox1" listbox object for the item text containing the string "Document." The variable "search_index" will store the index of the first item found.

Example 2

dog_index = ListBox.FindItem("PictureShow", 5, 1, "Dog");

Starts searching at index 6 of the "PictureShow" listbox object for item data containing the string "Dog." If found, it's item index will be stored in the variable dog_index.

Example 3

search_index = ListBox.FindItem("ListBox1", -1, LB_BYDATA, "*.txt");

Searches through all items in the "ListBox1" listbox object for item data containing any path string ending with .txt. Notice here that the wildcard "*" is used. If found, it's item index will be stored in the variable search_index.


ListBox.GetChecked Examples

ListBox.GetChecked

table ListBox.GetChecked (

string ObjectName,

number CheckState )

Example 1

List_Checked = ListBox.GetChecked("File List", BST_CHECKED);

Gets the indexes of the checked items in the "File List" listbox object and stores the result in a table called "List_Checked."


ListBox.GetCheckedCount Examples

ListBox.GetCheckedCount

number ListBox.GetCheckedCount (

string ObjectName,

number CheckState )

Example 1

num_checked = ListBox.GetCheckedCount("ListBox3", BST_CHECKED);

Gets the number of checked items in the "ListBox3" listbox object and stores the result in a variable called "num_checked."


ListBox.GetCount Examples

ListBox.GetCount

number ListBox.GetCount (

string ObjectName )

Example 1

num_items = ListBox.GetCount("ListBox2");

Gets the number of items in the "ListBox2" listbox object and stores the result in a variable called "num_items."


ListBox.GetItemCheck Examples

ListBox.GetItemCheck

number ListBox.GetItemCheck (

string ObjectName,

number Index )

Example 1

nChecked = ListBox.GetItemCheck("ListBox1", 5);

Gets the checked state of the item at the 5th index in the "ListBox1" listbox object and stores the result in a variable named "nChecked." The result will be one of the numeric values BST_UNCHECKED, BST_CHECKED or BST_INDETERMINATE.


ListBox.GetItemData Examples

ListBox.GetItemData

string ListBox.GetItemData (

string ObjectName,

number Index )

Example 1

data_string = ListBox.GetItemData("DocumentList", 5);

Gets the associated item data of the fifth item in the "DocumentList" listbox object and stores it in a variable called "data_string."


ListBox.GetItemText Examples

ListBox.GetItemText

string ListBox.GetItemText (

string ObjectName,

number Index )

Example 1

item_display_text = ListBox.GetItemText("Photos", 3);

Gets the item text of the third item in the "Photos" listbox object and stores it in a variable called "item_display_text."


ListBox.GetPos Examples

ListBox.GetPos

table ListBox.GetPos (

string ObjectName )

Example 1

List_Pos = ListBox.GetPos("File List");

Gets the current X, Y coordinates of the "File List" listbox object and stores the results in a table called "List_Pos." These values can be accessed by referencing List_Pos.X and List_Pos.Y.


ListBox.GetProperties Examples

ListBox.GetProperties

table ListBox.GetProperties (

string ObjectName )

Example 1

tProperties = ListBox.GetProperties("List264");

Gets the properties of the "List264" listbox and stores them in table "tProperties".


ListBox.GetSelected Examples

ListBox.GetSelected

table ListBox.GetSelected (

string ObjectName )

Example 1

List_Select = ListBox.GetSelected("File List");

Gets the indexes of all of the currently selected items in the "File List" listbox object and stores the results in a table called "List_Select."

Example 2

-- Get the indexes of the items currently selected in the listbox.
selected_items = ListBox.GetSelected("ListBox1");

-- If there were items selected in the listbox, display a dialog with their indexes.
-- If no items were selected, display a notification message.
if (selected_items ~= nil) then
output = "";
for index, item in pairs(selected_items) do
output = output..item.."\r\n";
end
Dialog.Message("Selected Items", "The indexes of the selected items are:\r\n\r\n"..output);
else
Dialog.Message("Selected Items", "There are no selected items in the listbox.");
end

Gets the indexes of all of the currently selected items in the "ListBox1" listbox object and stores the results in a table called "selected_items." If any items were selected, their indexes are displayed in a dialog message. If no items were selected, a dialog message is shown notifying the user.


ListBox.GetSelectedCount Examples

ListBox.GetSelectedCount

number ListBox.GetSelectedCount (

string ObjectName )

Example 1

num_select = ListBox.GetSelectedCount("ListBox3");

Gets the number of selected items in the "ListBox3" listbox object and stores the result in a variable called "num_select."


ListBox.GetSize Examples

ListBox.GetSize

table ListBox.GetSize (

string ObjectName )

Example 1

list_size = ListBox.GetSize("document list");

Gets the pixel dimensions of the "document list" listbox object and stores the width and height values in the "list_size" table. The dimensions can be accessed by referencing list_size.Width and list_size.Height.


ListBox.GetType Examples

ListBox.GetType

number ListBox.GetType (

string ObjectName )

Example 1

nType = ListBox.GetType("ListBox1");

Gets the type of the listbox object named "ListBox1" and stores it in the variable named "nType."


ListBox.InsertItem Examples

ListBox.InsertItem

number ListBox.InsertItem (

string ObjectName,

number Index,

string Text,

string Data = "" )

Example 1

ListBox.InsertItem("Cars", 5, "Porsche");

Inserts an item into the fifth line of the "Cars" listbox object. The item text that will be displayed is "Porsche" and it will not have any item data associated to it.

Example 2

inserted_index = ListBox.InsertItem("PictureShow", 1, "Mountains", mountain_path);

Inserts an item into the first index of the "PictureShow" listbox object. The item text to display is "Mountains" and the associated item data is a variable called "mountain_path" which could contain a path to a file.


ListBox.IsEnabled Examples

ListBox.IsEnabled

boolean ListBox.IsEnabled (

string ObjectName )

Example 1

contents_enabled = ListBox.IsEnabled("Contents");

Stores true in a variable named "contents_enabled" if the "Contents" listbox object is enabled, and false if it is disabled.

Example 2

bListBox4Enabled = ListBox.IsEnabled("ListBox4");

Checks whether the "ListBox4" listbox object is enabled or disabled, and sets the "bListBox4Enabled" variable to either true or false, accordingly.

Tip: Starting a variable name with "b" is a technique that programmers use to help themselves remember that a variable contains a boolean value.


ListBox.IsItemSelected Examples

ListBox.IsItemSelected

boolean ListBox.IsItemSelected (

string ObjectName,

number Index )

Example 1

is_selected = ListBox.IsItemSelected("ListBox1", 4);

Determines whether or not the fourth item in the "ListBox1" listbox object is selected and stores the true/false result in the variable "is_selected."

Example 2

first_selected = ListBox.IsItemSelected("PictureShow", 1);

Checks to see if the first item in the listbox object called "PictureShow" is selected. If it's selected, true will be stored in the variable "first_selected". If it's not selected, false will be returned.


ListBox.IsVisible Examples

ListBox.IsVisible

boolean ListBox.IsVisible (

string ObjectName )

Example 1

second_visible = ListBox.IsVisible("Second List");

Checks whether the listbox object called "Second List" is visible and stores true or false in a variable called "second_visible."

Example 2

List2isVisible = ListBox.IsVisible("List2");

Stores true in "List2isVisible" if the "List2" listbox object is visible.


ListBox.SelectItem Examples

ListBox.SelectItem

ListBox.SelectItem (

string ObjectName,

number Index )

Example 1

ListBox.SelectItem("ListBox1", 4);

Selects the fourth item in the "ListBox1" listbox object.

Example 2

ListBox.SelectItem("PictureShow", -1);

Selects all items in the "PictureShow" listbox object.

Example 3

ListBox.SelectItem("PictureShow", LB_ALLITEMS);

Selects all items in the "PictureShow" listbox object.


ListBox.SetEnabled Examples

ListBox.SetEnabled

ListBox.SetEnabled (

string ObjectName,

boolean Enabled = true )

Example 1

ListBox.SetEnabled("Install Options", true);

Enables the listbox object named "Install Options."

Example 2

ListBox.SetEnabled("ListBox4", false);

Disables the listbox object named "ListBox4."


ListBox.SetItemCheck Examples

ListBox.SetItemCheck

ListBox.SetItemCheck (

string ObjectName,

number Index,

number CheckboxState )

Example 1

ListBox.SetItemCheck("ListBox1", 5, BST_CHECKED);

Sets the checked state of the 5th item in the listbox object named "ListBox1" to checked.


ListBox.SetItemData Examples

ListBox.SetItemData

ListBox.SetItemData (

string ObjectName,

number Index,

string Data )

Example 1

ListBox.SetItemData("Cars", 5, "Black, Red, Blue, White, Silver");

Sets the string "Black, Red, Blue, White, Silver" to be the fifth item's item data in the "Cars" listbox object.


ListBox.SetItemText Examples

ListBox.SetItemText

ListBox.SetItemText (

string ObjectName,

number Index,

string Text )

Example 1

ListBox.SetItemText("Cars", 5, "Compact");

Sets the fifth item's text to the string "Compact" in the "Cars" listbox object.


ListBox.SetPos Examples

ListBox.SetPos

ListBox.SetPos (

string ObjectName,

number X,

number Y )

Example 1

ListBox.SetPos("Set Me", 100, 150);

Sets the "Set Me" listbox object's X coordinate to 100 pixels and the Y coordinate to 150.

Example 2

ListBox.SetPos("Move Me", 0, 0);

Sets the "Move Me" listbox object's X coordinate to 0 and the Y coordinate to 0. The listbox object will be moved to the upper left hand corner of the page from it's current position.


ListBox.SetProperties Examples

ListBox.SetProperties

ListBox.SetProperties (

string ObjectName,

table Properties )

Example 1

ListBox.SetProperties("Important_List", tImportantItems);

Sets the properties of the "Important_List" listbox to those contained in table "tImportantItems".


ListBox.SetSize Examples

ListBox.SetSize

ListBox.SetSize (

string ObjectName,

number Width,

number Height )

Example 1

ListBox.SetSize("Grower", 100, 150);

Set the "Grower" listbox object's width to 100 pixels and it's height to 150 pixels.

Example 2

ListBox.SetSize("Expand", ListBox.GetSize("Expand").Width + 200, ListBox.GetSize("Expand").Height + 100);

Increases the "Expand" listbox object's current width by 200 pixels and it's current height by 100 pixels. The ListBox.GetSize action is used here to get the current size of the listbox object.


ListBox.SetType Examples

ListBox.SetType

ListBox.SetType (

string ObjectName,

number Type )

Example 1

ListBox.SetType("ListBox1", LB_CHECKLISTBOX);

Sets the "ListBox1" listbox object to be a checklist box.


ListBox.SetUpdate Examples

ListBox.SetUpdate

ListBox.SetUpdate (

string ObjectName,

boolean Enabled = true )

Example 1

ListBox.SetUpdate("Install Options", true);

Enables the update state of the listbox object named "Install Options."

Example 2

ListBox.SetUpdate("Install Options", false);

Disables the update state of the listbox object named "Install Options."


ListBox.SetVisible Examples

ListBox.SetVisible

ListBox.SetVisible (

string ObjectName,

boolean Visible = true )

Example 1

ListBox.SetVisible("ListBox4", true);

Makes the "ListBox4" listbox object visible.

Example 2

ListBox.SetVisible("Options", false);

Hides the listbox object named "Options."

Example 3

ListBox.SetVisible("Image Selector");

Makes the listbox object named "Image Selector" visible.


Math.Abs Examples

Math.Abs

number Math.Abs (

number Num )

Example 1

absolute_num = Math.Abs(-1);

Calculates the absolute value of the number -1 and stores the result in the variable "absolute_num." In this example, the number 1 will be returned.


Math.Acos Examples

Math.Acos

number Math.Acos (

number Num )

Example 1

arccos_num = Math.Acos(0.326960);

Calculates the arccosine of the number 0.326960 and stores the result in the variable "arccos_num." In this example, the number 1.237711350499 will be returned.


Math.Asin Examples

Math.Asin

number Math.Asin (

number Num )

Example 1

arcsine_num = Math.Asin(0.326960);

Calculates the arcsine of the number 0.326960 and stores the result in the variable "arcsine_num." In this example, the number 0.33308497629591 will be returned.


Math.Atan2 Examples

Math.Atan2

number Math.Atan2 (

number Num1,

number Num2 )

Example 1

arctan2_num = Math.Atan2(-862.420000, 78.514900);

Calculates the arctangent of the fraction -862.420000/78.514900 and stores the result in the variable "arctan2_num."

In this example, the number -1.4800063943825 would be returned.


Math.Atan Examples

Math.Atan

number Math.Atan (

number Num )

Example 1

arctan_num = Math.Atan(-862.42);

Calculates the arctangent of the number -862.42 and stores the result in the variable "arctan_num."

In this example, the number -1.5696367994743 will be returned.


Math.Ceil Examples

Math.Ceil

number Math.Ceil (

number Num )

Example 1

ceiling_num = Math.Ceil(2.8);

Calculates the ceiling of the number 2.8 and stores the result in the variable "ceiling_num." In this example, the number 3 will be returned.


Math.Cos Examples

Math.Cos

number Math.Cos (

number Num )

Example 1

cos_num = Math.Cos(1.0);

Calculates the cos of the number 1.0 and stores the result in the variable "cos_num." In this example, the number 0.54030230586814 will be returned.


Math.Deg Examples

Math.Deg

number Math.Deg (

number Radian )

Example 1

rad_to_deg = Math.Deg(1.0);

Converts the radian number 1.0 to a number in degrees and stores the result in the variable "rad_to_deg." In this example the number 57.295779513082 would be returned.


Math.Exp Examples

Math.Exp

number Math.Exp (

number Num )

Example 1

exp_num = Math.Exp(2.302685);

Calculates the exponential of the number 2.302685 and stores the result in the variable "exp_num." In this example, the number 10.000999119968 will be returned.


Math.Floor Examples

Math.Floor

number Math.Floor (

number Num )

Example 1

floor_num = Math.Floor(2.8);

Calculates the floor of the number 2.8 and stores the result in the variable "floor_num." In this example, the number 2 will be returned.


Math.Frexp Examples

Math.Frexp

table Math.Frexp (

number Num )

Example 1

FrExp_num = Math.Frexp(16.4);

Calculates the mantissa and exponent of the number 16.4 and stores them in the table called "FrExp_num." In this example the mantissa value will be 0.5125 and the exponent will be 5. These values can be accessed by referencing FrExp_num.Mantissa and FrExp_num.Exponent.


Math.HexColorToNumber Examples

Math.HexColorToNumber

number Math.HexColorToNumber (

string HexValue )

Example 1

nDecimalValue = Math.HexColorToNumber("FF0000");

Converts the hex value "FFFF00" to the equivalent decimal value (255);


Math.HexToNumber Examples

Math.HexToNumber

number Math.HexToNumber (

string HexValue )

Example 1

nDecimalValue = Math.HexColorToNumber("FF0000");

Converts the hex value 'FFFF00' to the equivalent decimal value (16711680);


Math.Ldexp Examples

Math.Ldexp

number Math.Ldexp (

number Mantissa,

number Exponent )

Example 1

Ldexp_num = Math.Ldexp(4, 3);

Calculates the value x in the equation x = m * 2^n given that the mantissa (m) is the number 4 and the exponent (n) is the number 3. The result of the calculation will be the number 32, which will be stored in the variable Ldexp_num.


Math.Log10 Examples

Math.Log10

number Math.Log10 (

number Num )

Example 1

log10_num = Math.Log10(9000);

Calculates the base-10 logarithm of the number 9000 and stores the result in the variable "log10_num." In this example, the value 3.9542425094393 will be returned.


Math.Log Examples

Math.Log

number Math.Log (

number Num )

Example 1

log_num = Math.Log(9000);

Calculates the logarithm of the number 9000 and stores the result in the variable "log_num." In this example, the value 9.1049798563184 will be returned.


Math.Max Examples

Math.Max

number Math.Max (

number Num1,

number Num2 )

Example 1

max_num = Math.Max(10, 17);

Compares the number 10 to the number 17 and returns the larger of the two values. In this example the number 17 will be stored in the variable "max_num."


Math.Min Examples

Math.Min

number Math.Min (

number Num1,

number Num2 )

Example 1

min_num = Math.Min(10, 17);

Compares the number 10 to the number 17 and returns the smaller of the two values. In this example the number 10 will be stored in the variable "min_num."


Math.Mod Examples

Math.Mod

number Math.Mod (

number Num1,

number Num2 )

Example 1

mod_num = Math.Mod(10, 3);

Calculates the modulus of 10 / 3 and returns the number 1 in a variable called "mod_num."


Math.Pow Examples

Math.Pow

number Math.Pow (

number Base = 2,

number Exponent = 4 )

Example 1

power = Math.Pow(2,3);

Calculates the base 2 to the power 3 and returns the result in the variable "power." In this example, the number 8 would be returned.


Math.Rad Examples

Math.Rad

number Math.Rad (

number Degree )

Example 1

deg_to_rad = Math.Rad(45);

Converts 45 degrees to it's equivalent value in radians and stores the result in the variable "deg_to_rad." In this example the number 0.78539816339745 will be returned.


Math.Random Examples

Math.Random

number Math.Random (

number Rand1 = nil,

number Rand2 = nil )

Example 1

random_num = Math.Random();

Generates a random value between 0 and 1 (inclusive) and stores the result in the variable "random_num."

Example 2

random_num2 = Math.Random(20);

Generates a random number between 1 and 20 (inclusive) and stores the result in the variable "random_num2."

Example 3

random_num3 = Math.Random(20, 100);

Generates a random number between 20 and 100 (inclusive) and stores the result in the variable "random_num3."


Math.RandomSeed Examples

Math.RandomSeed

Math.RandomSeed (

number Seed )

Example 1

Debug.ShowWindow(true);

Math.RandomSeed(225);
result1 = Math.Random(100);
result2 = Math.Random(100);
result3 = Math.Random(100);
Debug.Print(result1 ..", "..result2..", "..result3.."\r\n");

Math.RandomSeed(225);
result4 = Math.Random(100);
result5 = Math.Random(100);
result6 = Math.Random(100);
Debug.Print(result4 ..", "..result5..", "..result6.."\r\n");

Math.RandomSeed(5647);
result7 = Math.Random(100);
result8 = Math.Random(100);
result9 = Math.Random(100);
Debug.Print(result7 ..", "..result8..", "..result9.."\r\n");

This example seeds the random number generator with the number 225, then calls the Math.Random action three times and outputs the three random numbers to the debug window. Each time this sequence of actions is called, it produces the same sequence of random numbers. Further down in the example, we changed the seed number to 5647. You will notice this results in a different sequence of random numbers. The output from this example will be as follows:

3, 4, 32

3, 4, 32

57, 54, 24

Tip: You can copy and paste this code into the script editor to test it.

Example 2

Debug.ShowWindow(true);

seed_time = System.GetTime(TIME_FMT_SEC)..System.GetTime(TIME_FMT_MIN)..System.GetTime(TIME_FMT_HOUR);
seed_time_date = seed_time..System.GetDate(DATE_FMT_JULIAN);
seed_input = Math.Mod(seed_time_date, 2147483647);
Math.RandomSeed(seed_input);
result1 = Math.Random(100);
result2 = Math.Random(100);
result3 = Math.Random(100);
Debug.Print(result1 ..", "..result2..", "..result3.."\r\n");

seed_time = System.GetTime(TIME_FMT_SEC)..System.GetTime(TIME_FMT_MIN)..System.GetTime(TIME_FMT_HOUR);
seed_time_date = seed_time..System.GetDate(DATE_FMT_JULIAN);
seed_input = Math.Mod(seed_time_date, 2147483647);
Math.RandomSeed(seed_input);
result4 = Math.Random(100);
result5 = Math.Random(100);
result6 = Math.Random(100);
Debug.Print(result4 ..", "..result5..", "..result6.."\r\n");

Math.RandomSeed(5647);
result7 = Math.Random(100);
result8 = Math.Random(100);
result9 = Math.Random(100);
Debug.Print(result7 ..", "..result8..", "..result9.."\r\n");

In the first part of this example, the random number generator is seeded with the modulus of a number composed of the current seconds, minutes, hours and date (in Julian format), and the max seed number 2147483647. Using this method ensures that the seed value is always unique, resulting in a random sequence of numbers. However in the last part of the example, the seed value is always the same, therefore it's result will always be the same value.

Tip: You can copy and paste this code into the script editor to test it.


Math.RGBToNumber Examples

Math.RGBToNumber

number Math.RGBToNumber (

number Red,

number Green,

number Blue )

Example 1

nColor = Math.RGBToNumber(255,120,35)

Converts the RGB value (255,120,35) to a number value (2324735).


Math.Round Examples

Math.Round

number Math.Round (

number Num,

number DecimalPlaces = 0 )

Example 1

rounded = Math.Round(3.1415926535, 2);

This example rounds the number "3.1415926535" to two decimal places and stores the result in the variable "rounded". In this case, rounded will equal 3.14.

Example 2

number1 = 234;
number2 = 567;
answer = Math.Round(number1/number2, 4);

Divides two numbers, and calculates the answer, rounded to four decimal places.


Math.Sin Examples

Math.Sin

number Math.Sin (

number Num )

Example 1

sin_num = Math.Sin(1.4315);

Calculates the sine of the number 1.4315 and stores the result (0.99031394379959) in the variable "sin_num."


Math.Sqrt Examples

Math.Sqrt

number Math.Sqrt (

number Num )

Example 1

square_num = Math.Sqrt(9);

Calculates the square root of 9 and stores the result (3) in square_num.

Example 2

square_num = Math.Sqrt(45.35);

Calculates the square root of 45.35 and stores the result (6.7342408629333) in square_num.


Math.Tan Examples

Math.Tan

number Math.Tan (

number Num )

Example 1

tangent_num = Math.Tan(0.795398);

Calculates the tangent of the number 0.795398 and stores the result (1.0202023669685) in the variable "tangent_num."


MSI.ApplyPatch Examples

MSI.ApplyPatch

boolean MSI.ApplyPatch (

string PatchPath,

string InstallPackage,

number InstallType,

string CommandLine = "" )

Example 1

bPatchSuccess = MSI.ApplyPatch(_TempFolder.."\\patch.msp", "", INSTALLTYPE_DEFAULT, "REINSTALL=ALL");

if (bPatchSuccess) then
Dialog.Message("Patch Success", "The patch was applied successfully.");
else
nError = Application.GetLastError();
Dialog.Message("Error", _tblErrorMessages[nError], MB_OK, MB_ICONEXCLAMATION);
end

Uses the MSI.ApplyPatch action to search for all products on the system to apply the "patch.msp" to, and shows either a success, or error message.


MSI.CloseHandle Examples

MSI.CloseHandle

boolean MSI.CloseHandle (

number MSIHandle )

Example 1

-- Get the product handle.
nProductHandle = MSI.OpenProduct("{78B82B0B-9AD9-40C0-B994-F72C21B52723}");

if (nProductHandle) then
tbFeatureInfo = MSI.GetFeatureInfo(nProductHandle, "MyTargetFeature", INSTALLFEATUREATTRIBUTE_FAVORLOCAL);
if (tbFeatureInfo) then
-- Show a dialog with the feature info.
Dialog.Message("Feature Info", "Title: "..tbFeatureInfo.Title.."\r\nDescription: "..tbFeatureInfo.Description);
else
-- An error occurred.
nError = Application.GetLastError();
Dialog.Message("Error", _tblErrorMessages[nError], MB_OK, MB_ICONEXCLAMATION);
end

-- Finished using the product handle, so close it.
if (not MSI.CloseHandle(nProductHandle)) then
Dialog.Message("Error", "Failed to close product handle.");
end
else
Dialog.Message("Error", "Failed to get product handle.");
end

Gets the title and description of the "MyTargetFeature" feature and shows it in a dialog message.


MSI.ConfigureFeature Examples

MSI.ConfigureFeature

boolean MSI.ConfigureFeature (

string ProductCode,

string FeatureID,

number InstallState )

Example 1

bResult = MSI.ConfigureFeature("{78B82B0B-9AD9-40C0-B994-F72C21B52723}", "Core", INSTALLSTATE_LOCAL);

if (not bResult) then
nError = Application.GetLastError();
Dialog.Message("Error", _tblErrorMessages[nError], MB_OK, MB_ICONEXCLAMATION);
end

Configures the feature "Core" as installed locally (INSTALLSTATE_LOCAL) and shows an error dialog if the action fails.


MSI.ConfigureProduct Examples

MSI.ConfigureProduct

boolean MSI.ConfigureProduct (

string ProductCode,

number InstallLevel,

number InstallState )

Example 1

bConfigured = MSI.ConfigureProduct("{78B82B0B-9AD9-40C0-B994-F72C21B52723}", INSTALLLEVEL_DEFAULT, INSTALLSTATE_LOCAL);

if (bConfigured) then
Dialog.Message("Configuration", "Configuration successful.");
else
nError = Application.GetLastError();
Dialog.Message("Error", _tblErrorMessages[nError], MB_OK, MB_ICONEXCLAMATION);
end

Installs the product locally on the user's system with the authored default features and shows either a success, or error message.


MSI.ConfigureProductEx Examples

MSI.ConfigureProductEx

boolean MSI.ConfigureProductEx (

string ProductCode,

number InstallLevel,

number InstallState,

string CommandLine = "" )

Example 1

bConfigured = MSI.ConfigureProductEx("{78B82B0B-9AD9-40C0-B994-F72C21B52723}", INSTALLLEVEL_DEFAULT, INSTALLSTATE_LOCAL, "Runstate=Debug");

if (bConfigured) then
Dialog.Message("Configuration", "Configuration successful.");
else
nError = Application.GetLastError();
Dialog.Message("Error", _tblErrorMessages[nError], MB_OK, MB_ICONEXCLAMATION);
end

Installs the product locally on the user's system with the authored default features and shows either a success, or error message.


MSI.EnableLog Examples

MSI.EnableLog

boolean MSI.EnableLog (

number LogMode,

string LogFile,

boolean Append = false,

boolean FlushEachLine = false )

Example 1

MSI.EnableLog(INSTALLLOGMODE_VERBOSE, _TempFolder.."\\log.txt");

Enables verbose logging of the installation in a log file called "log.txt" created in the user's temporary directory.


MSI.EnumClients Examples

MSI.EnumClients

table MSI.EnumClients (

string ComponentGUID )

Example 1

-- Enumerate the products for the component.
tbProducts = MSI.EnumClients("{1638E94C-DA3C-44BD-88FB-5CC76B59BE46}");

if (tbProducts) then
strMessage = "The following products were found:\r\n\r\n";
for index, value in pairs(tbProducts) do
strMessage = strMessage..value.."\r\n";
end
-- Show a message with all of the products found.
Dialog.Message("Products Found", strMessage);
else
Dialog.Message("Notice", "No products were found.");
end

Enumerates all of the clients for the installed component "{1638E94C-DA3C-44BD-88FB-5CC76B59BE46}" and shows their product codes in a dialog message. If an error occurs, or no products were found, an error message is shown.


MSI.EnumComponents Examples

MSI.EnumComponents

table MSI.EnumComponents (

)

Example 1

-- Enumerate all components.
tbComponents = MSI.EnumComponents();

if (tbComponents) then
strMessage = "The following components were found:\r\n\r\n";
for index, value in pairs(tbComponents) do
strMessage = strMessage..value.."\r\n";
end

-- Show a message with all of the components found.
Dialog.Message("Components Found", strMessage);
else
Dialog.Message("Notice", "No components were found.");
end

Gets a numerically indexed table of all installed components for all products found on the system and shows their GUIDs in a dialog message. If an error occurs, or no components were found, an error message is shown.


MSI.EnumFeatures Examples

MSI.EnumFeatures

table MSI.EnumFeatures (

string ProductCode )

Example 1

-- Enumerate the features for the product.
tbFeatures = MSI.EnumFeatures("{78B82B0B-9AD9-40C0-B994-F72C21B52723}");

if (tbFeatures) then
strMessage = "The following features were found:\r\n\r\n";
for index, subfeature in pairs(tbFeatures) do
strMessage = strMessage.."Feature: "..subfeature.Feature.."\r\n".."Parent Feature: "..subfeature.ParentFeature.."\r\n\r\n";
end
-- Show a message with all of the features detected.
Dialog.Message("Features Found", strMessage);
else
Dialog.Message("Notice", "No features were found.");
end

Enumerates all of the features for a given product and shows their IDs and parent IDs in a dialog message. If an error occurs, or no features were found, an error message is shown.


MSI.EnumPatches Examples

MSI.EnumPatches

table MSI.EnumPatches (

string ProductCode )

Example 1

-- Enumerate the patches for the product.
tbPatches = MSI.EnumPatches("{78B82B0B-9AD9-40C0-B994-F72C21B52723}");

if (tbPatches) then
strMessage = "The following patches were found:\r\n\r\n";
for index, subpatch in pairs(tbPatches) do
strMessage = strMessage.."Patch code: "..subpatch.PatchCode.."\r\n".."Transform list: "..subpatch.TransformList.."\r\n\r\n";
end
-- Show a message with all of the patches found.
Dialog.Message("Patches Found", strMessage);
else
Dialog.Message("Notice", "No patches were found.");
end

Enumerates all of the patches for a given product and shows their patch codes, and transform lists in a dialog message. If an error occurs, or no patches were found, an error message is shown.


MSI.EnumProducts Examples

MSI.EnumProducts

table MSI.EnumProducts (

)

Example 1

-- Enumerate the products.
tbProducts = MSI.EnumProducts();

if (tbProducts) then
strMessage = "The following products were detected:\r\n\r\n";
for index, value in pairs(tbProducts) do
strMessage = strMessage..value.."\r\n";
end

-- Show a message with all of the products detected.
Dialog.Message("Products Found", strMessage);
else
Dialog.Message("Notice", "No products are installed.");
end

Gets a numerically indexed table of product codes found on the system and shows them in a list in a dialog message. If an error occurs, or no products were found, an error message is shown.


MSI.EnumRelatedProducts Examples

MSI.EnumRelatedProducts

table MSI.EnumRelatedProducts (

string UpgradeCode )

Example 1

-- Enumerate the products.
tbProducts = MSI.EnumRelatedProducts("{07F11339-6660-4CEC-9E09-BB2FEA780929}");

if (tbProducts) then
strMessage = "The following products were detected for the upgrade code:\r\n\r\n";
for index, value in pairs(tbProducts) do
strMessage = strMessage..value.."\r\n";
end

-- Show a message with all of the products detected.
Dialog.Message("Products Found", strMessage);
else
Dialog.Message("Notice", "No products were found.");
end

Gets a numerically indexed table of related product codes found on the system given the upgrade code, and shows them in a list in a dialog message. If an error occurs, or no products were found, an error message is shown.


MSI.GetComponentPath Examples

MSI.GetComponentPath

table MSI.GetComponentPath (

string ProductCode,

string ComponentGUID )

Example 1

-- Get the component path.
tbComponent = MSI.GetComponentPath("{78B82B0B-9AD9-40C0-B994-F72C21B52723}", "{1638E94C-DA3C-44BD-88FB-5CC76B59BE46}");

-- Check if it was successful and that the component is installed locally.
if (tbComponent) then
if (tbComponent.InstallState == INSTALLSTATE_LOCAL) then
Dialog.Message("Information", "The component is installed locally.");
end
else
-- Show a message with the error.
nError = Application.GetLastError();
Dialog.Message("Error", _tblErrorMessages[nError], MB_OK, MB_ICONEXCLAMATION);
end

Checks to see if the component "{1638E94C-DA3C-44BD-88FB-5CC76B59BE46}" is installed locally and shows an information message. If the action fails, an error dialog is shown.


MSI.GetFeatureInfo Examples

MSI.GetFeatureInfo

table MSI.GetFeatureInfo (

number Handle,

string FeatureID,

number Attributes )

Example 1

-- Get the product handle.
nProductHandle = MSI.OpenProduct("{78B82B0B-9AD9-40C0-B994-F72C21B52723}");

if (nProductHandle) then
tbFeatureInfo = MSI.GetFeatureInfo(nProductHandle, "MyTargetFeature", INSTALLFEATUREATTRIBUTE_FAVORLOCAL);
if (tbFeatureInfo) then
-- Show a dialog with the feature info.
Dialog.Message("Feature Info", "Title: "..tbFeatureInfo.Title.."\r\nDescription: "..tbFeatureInfo.Description);
else
-- An error occurred.
nError = Application.GetLastError();
Dialog.Message("Error", _tblErrorMessages[nError], MB_OK, MB_ICONEXCLAMATION);
end

-- Finished using the product handle, so close it.
if (not MSI.CloseHandle(nProductHandle)) then
Dialog.Message("Error", "Failed to close product handle.");
end
else
Dialog.Message("Error", "Failed to get product handle.");
end

Gets the title and description of the "MyTargetFeature" feature and shows it in a dialog message.


MSI.GetFeatureUsage Examples

MSI.GetFeatureUsage

table MSI.GetFeatureUsage (

string ProductCode,

string FeatureID )

Example 1

-- Get the usage metrics for the product feature.
tbFeatureMetrics = MSI.GetFeatureUsage("{78B82B0B-9AD9-40C0-B994-F72C21B52723}", "MyFeature");

-- Check if it was successful.
if (tbFeatureMetrics) then
strMessage = "The feature's usage metrics are:\r\n\r\n";
strMessage = strMessage.."Usage Count: "..tbFeatureMetrics.UsageCount.."\r\n";
strMessage = strMessage.."Day: "..tbFeatureMetrics.Day.."\r\n";
strMessage = strMessage.."Month: "..tbFeatureMetrics.Month.."\r\n";
strMessage = strMessage.."Year: "..tbFeatureMetrics.Year.."\r\n";
Dialog.Message("Feature Usage", strMessage);
else
-- Show a message with the error.
Dialog.Message("Error", "Could not get product feature usage metrics.");
end

Gets the usage metrics of a product feature with the ID "MyFeature," and shows its values in a dialog message.


MSI.GetFileVersion Examples

MSI.GetFileVersion

table MSI.GetFileVersion (

string FilePath )

Example 1

tbFileInfo = MSI.GetFileVersion(_TempFolder.."\\Extracted\\setup.exe");

if (tbFileInfo) then
Dialog.Message("File Info", "Version: "..tbFileInfo.Version.." Language: "..tbFileInfo.Language);
else
nError = Application.GetLastError();
Dialog.Message("Error", _tblErrorMessages[nError], MB_OK, MB_ICONEXCLAMATION);
end

Gets the version and language information from the file "setup.exe", and shows it in a dialog message.


MSI.GetMSIVersion Examples

MSI.GetMSIVersion

string MSI.GetMSIVersion (

)

Example 1

strVersion = MSI.GetMSIVersion();
Dialog.Message("MSI Version", "The MSI version installed is "..strVersion);

Gets the version of the Windows Installer that is installed and returns the information in a message box.

Example 2

strVersion = MSI.GetMSIVersion();

nCompare = String.CompareFileVersions(strVersion, "3.0");
if (nCompare == -1) then
Dialog.Message("Requirement Failed", "This setup requires a minimum of version 3.0 of the Windows Installer.");
end

Checks to see if the MSI version is greater than or equal to "3.0" and shows an error dialog if the condition fails.


MSI.GetPatchInfo Examples

MSI.GetPatchInfo

string MSI.GetPatchInfo (

string PatchCode,

string Attribute )

Example 1

strPatchInfo = MSI.GetPatchInfo("{78B82B0B-9AD9-40C0-B994-F72C21B52723}", "INSTALLPROPERTY_LOCALPACKAGE");

if (strPatchInfo) then
Dialog.Message("Patch Info", strPatchInfo);
else
nError = Application.GetLastError();
Dialog.Message("Error", _tblErrorMessages[nError], MB_OK, MB_ICONEXCLAMATION);
end

Gets a patch's "INSTALLPROPERTY_LOCALPACKAGE" attribute value and shows it in a dialog message.


MSI.GetProductCode Examples

MSI.GetProductCode

string MSI.GetProductCode (

string ComponentGUID )

Example 1

strProductCode = MSI.GetProductCode("{1638E94C-DA3C-44BD-88FB-5CC76B59BE46}");

if (strProductCode ~= "") then
Dialog.Message("Information", "The product code is: "..strProductCode);
else
Dialog.Message("Error", "Error. Could not get product code.");
end

Gets the product code given the component GUID "{1638E94C-DA3C-44BD-88FB-5CC76B59BE46}" and shows it in a dialog message. If the action fails, an error dialog is shown.


MSI.GetProductInfo Examples

MSI.GetProductInfo

string MSI.GetProductInfo (

string ProductCode,

string Property )

Example 1

strVersionString = MSI.GetProductInfo("{757DCC82-E2D2-4737-95CB-E864DGH03B23}","VersionString");
Dialog.Message("Version String", strVersionString);

Gets the "VersionString" value from the product with product code "{757DCC82-E2D2-4737-95CB-E864DGH03B23}" and shows it in a dialog message.


MSI.GetProductProperty Examples

MSI.GetProductProperty

string MSI.GetProductProperty (

number Handle,

string Property )

Example 1

-- Get the product handle.
nProductHandle = MSI.OpenProduct("{78B82B0B-9AD9-40C0-B994-F72C21B52723}");

if (nProductHandle) then
strProperty = MSI.GetProductProperty(nProductHandle, "SUFUSERPROFILE");
if (strProperty) then
-- Show a dialog with the feature info.
Dialog.Message("Property", "Property value: "..strProperty);
else
-- An error occurred.
nError = Application.GetLastError();
Dialog.Message("Error", _tblErrorMessages[nError], MB_OK, MB_ICONEXCLAMATION);
end

-- Finished using the product handle, so close it.
if (not MSI.CloseHandle(nProductHandle)) then
Dialog.Message("Error", "Failed to close product handle.");
end
else
Dialog.Message("Error", "Failed to get product handle.");
end

Gets the product property "SUFUSERPROFILE" and shows its value in dialog message.


MSI.GetShortcutTarget Examples

MSI.GetShortcutTarget

table MSI.GetShortcutTarget (

string ShortcutTarget )

Example 1

-- Get the path to the shortcut file.
strShortcutFolder = Shell.GetFolder(SHF_DESKTOP);
strShortcutFolder = strShortcutFolder.."\\MyShortcut.lnk";

-- Get the shortcut product information.
tbShortcutInfo = MSI.GetShortcutTarget(strShortcutFolder);

-- Show the information in a dialog message.
if (tbShortcutInfo) then
strMessage = "The shortcut information is as follows:\r\n\r\n";
strMessage = strMessage.."Product Code: "..tbShortcutInfo.ProductCode.."\r\n";
strMessage = strMessage.."Feature ID: "..tbShortcutInfo.FeatureID.."\r\n";
strMessage = strMessage.."Component Code: "..tbShortcutInfo.ComponentCode.."\r\n";
Dialog.Message("Shortcut Info", strMessage);
else
-- Show an error message
Dialog.Message("Error", "Could not get shortcut info.");
end

Gets product information from a shortcut file and shows it in a dialog message, or if the action fails, an error message is shown.


MSI.GetUserInfo Examples

MSI.GetUserInfo

table MSI.GetUserInfo (

string ProductCode )

Example 1

-- Get the user info for the product.
tbUserInfo = MSIGetUserInfo("{78B82B0B-9AD9-40C0-B994-F72C21B52723}");

-- Check if it was successful.
if (tbUserInfo) then
if (tbUserInfo.UserInfoState == USERINFOSTATE_PRESENT) then
strMessage = "The product user info is as follows:\r\n\r\n";
strMessage = strMessage.."User name: "..tbUserInfo.UserName.."\r\n";
strMessage = strMessage.."Company name: "..tbUserInfo.CompanyName.."\r\n";
strMessage = strMessage.."Serial number: "..tbUserInfo.SerialNumber.."\r\n";
Dialog.Message("Product User Info", strMessage);
else
-- Show an error message
Dialog.Message("Error", "Could not get product user info.");
end
else
-- Show an error message
Dialog.Message("Error", "Could not get product user info.");
end

Gets an installed product's registered user information and shows it in a dialog message. If the information could not be queried or an error occurs, a message is shown notifying the user.


MSI.InstallMissingComponent Examples

MSI.InstallMissingComponent

boolean MSI.InstallMissingComponent (

string ProductCode,

string ComponentGUID,

number InstallState )

Example 1

bResult = MSI.InstallMissingComponent("{78B82B0B-9AD9-40C0-B994-F72C21B52723}", "{1638E94C-DA3C-44BD-88FB-5CC76B59BE46}", INSTALLSTATE_LOCAL);

if (not bResult) then
nError = Application.GetLastError();
Dialog.Message("Error", _tblErrorMessages[nError], MB_OK, MB_ICONEXCLAMATION);
end

Installs the missing component "{1638E94C-DA3C-44BD-88FB-5CC76B59BE46}" locally (INSTALLSTATE_LOCAL) and shows an error dialog if the action fails.


MSI.InstallMissingFile Examples

MSI.InstallMissingFile

boolean MSI.InstallMissingFile (

string ProductCode,

string File )

Example 1

bResult = MSI.InstallMissingFile("{78B82B0B-9AD9-40C0-B994-F72C21B52723}", "myfile.txt");

if (not bResult) then
nError = Application.GetLastError();
Dialog.Message("Error", _tblErrorMessages[nError], MB_OK, MB_ICONEXCLAMATION);
end

Installs the missing file "myfile.txt" and shows an error dialog if the action fails.


MSI.InstallProduct Examples

MSI.InstallProduct

boolean MSI.InstallProduct (

string PackagePath,

string CommandLine)

Example 1

bInstalled = MSI.InstallProduct(_TempFolder.."\\TempMSI\\setup.msi","REMOVE=ALL");
if (not bInstalled) then
nInstallError = Application.GetLastError();
Dialog.Message("Error", _tblErrorMessages[nInstallError], MB_OK, MB_ICONEXCLAMATION);
end

Calls "setup.msi" to uninstall the current copy of the product.


MSI.LocateComponent Examples

MSI.LocateComponent

table MSI.LocateComponent (

string ComponentGUID )

Example 1

-- Get the component path.
tbComponent = MSI.LocateComponent("{1638E94C-DA3C-44BD-88FB-5CC76B59BE46}");

-- Check if it was successful and that the component is installed locally.
if (tbComponent) then
if (tbComponent.InstallState == INSTALLSTATE_LOCAL) then
Dialog.Message("Information", "The component is installed locally.");
end
else
-- Show a message with the error.
nError = Application.GetLastError();
Dialog.Message("Error", _tblErrorMessages[nError], MB_OK, MB_ICONEXCLAMATION);
end

Checks to see if the component with GUID "{1638E94C-DA3C-44BD-88FB-5CC76B59BE46}" is installed locally and shows an information message. If the action fails, an error dialog is shown.


MSI.OpenPackage Examples

MSI.OpenPackage

number MSI.OpenPackage (

string PackagePath )

Example 1

-- Get the package handle.
nPackageHandle = MSI.OpenPackage(_TempFolder.."\\Downloaded\\setup.msi");

if (nPackageHandle ) then
strProperty = MSI.GetProductProperty(nPackageHandle, "SUFUSERPROFILE");
if (strProperty) then
-- Show a dialog with the feature info.
Dialog.Message("Property", "Property value: "..strProperty);
else
-- An error occurred.
nError = Application.GetLastError();
Dialog.Message("Error", _tblErrorMessages[nError], MB_OK, MB_ICONEXCLAMATION);
end

-- Finished using the handle, so close it.
if (not MSI.CloseHandle(nPackageHandle)) then
Dialog.Message("Error", "Failed to close package handle.");
end
else
Dialog.Message("Error", "Failed to get package handle.");
end

Gets the product property "SUFUSERPROFILE" and shows its value in dialog message.


MSI.OpenProduct Examples

MSI.OpenProduct

number MSI.OpenProduct (

string ProductCode )

Example 1

-- Get the product handle.
nProductHandle = MSI.OpenProduct("{78B82B0B-9AD9-40C0-B994-F72C21B52723}");

if (nProductHandle) then
tbFeatureInfo = MSI.GetFeatureInfo(nProductHandle, "MyTargetFeature", INSTALLFEATUREATTRIBUTE_FAVORLOCAL);
if (tbFeatureInfo) then
-- Show a dialog with the feature info.
Dialog.Message("Feature Info", "Title: "..tbFeatureInfo.Title.."\r\nDescription: "..tbFeatureInfo.Description);
else
-- An error occurred.
nError = Application.GetLastError();
Dialog.Message("Error", _tblErrorMessages[nError], MB_OK, MB_ICONEXCLAMATION);
end

-- Finished using the product handle, so close it.
if (not MSI.CloseHandle(nProductHandle)) then
Dialog.Message("Error", "Failed to close product handle.");
end
else
Dialog.Message("Error", "Failed to get product handle.");
end

Gets the title and description of the "MyTargetFeature" feature and shows it in a dialog message.


MSI.QueryFeatureState Examples

MSI.QueryFeatureState

number MSI.QueryFeatureState (

string ProductCode,

string Feature )

Example 1

-- Get the feature state.
nFeatureState = MSI.QueryFeatureState("{C0805078-0A3E-44AE-A696-56088114D161}", "Complete");

if (nFeatureState == INSTALLSTATE_LOCAL) then
Dialog.Message("Feature Installed", "The feature is installed locally.");
else
Dialog.Message("Feature State", "The feature query returned value: "..nFeatureState);
end

Gets the feature state of the "Complete" feature of the product with code "{C0805078-0A3E-44AE-A696-56088114D161}"


MSI.QueryProductState Examples

MSI.QueryProductState

number MSI.QueryProductState (

string ProductCode )

Example 1

-- Get the product's installed state.
nState = MSI.QueryProductState("{78B82B0B-9AD9-40C0-B994-F72C21B52723}");

if (INSTALLSTATE_DEFAULT == nState) then
Dialog.Message("Installed State", "The product is installed for the current user.");
else
Dialog.Message("State Unknown", "The product is either not installed, or an error occurred.");
end

Determines whether or not a product with the product code "{78B82B0B-9AD9-40C0-B994-F72C21B52723}" is installed for the current user showing the result in a dialog message.


MSI.ReinstallFeature Examples

MSI.ReinstallFeature

boolean MSI.ReinstallFeature (

string ProductCode,

string FeatureID,

number ReinstallMode )

Example 1

bResult = MSI.ReinstallFeature("{78B82B0B-9AD9-40C0-B994-F72C21B52723}", "Core", REINSTALLMODE_FILEMISSING);

if (not bResult) then
nError = Application.GetLastError();
Dialog.Message("Error", _tblErrorMessages[nError], MB_OK, MB_ICONEXCLAMATION);
end

Reinstalls the feature "Core" if the file is missing and shows an error dialog if the action fails.


MSI.ReinstallProduct Examples

MSI.ReinstallProduct

boolean MSI.ReinstallProduct (

string ProductCode,

number ReinstallMode )

Example 1

bResult = MSI.ReinstallProduct("{78B82B0B-9AD9-40C0-B994-F72C21B52723}", REINSTALLMODE_FILEMISSING);

if (not bResult) then
nError = Application.GetLastError();
Dialog.Message("Error", _tblErrorMessages[nError], MB_OK, MB_ICONEXCLAMATION);
end

Reinstalls the product if the file is missing and shows an error dialog if the action fails.


MSI.RunMsiexec Examples

MSI.RunMsiexec

number MSI.RunMsiexec (

string Arguments,

boolean WaitForReturn = true )

Example 1

-- The path to extract the file.
strExtractPath = Shell.GetFolder(SHF_APPLICATIONDATA).."\\ExtractedInstallation\\setup.msi";

strCommandLine = "-i \""..strExtractPath.."\" REINSTALL=ALL REINSTALLMODE=vomus";
-- Run the setup.
nResult = MSI.RunMsiexec(strCommandLine);

Runs setup.msi using the MSI.RunMsiexec action.


MSI.SetInternalUI Examples

MSI.SetInternalUI

table MSI.SetInternalUI (

number UILevel,

number WindowHandle = nil )

Example 1

-- Get the extract path using a previously defined function.
strInstallerPathExtracted = g_GetExtractPath(strProductCode);

local tbResult = MSI.SetInternalUI(INSTALLUILEVEL_FULL);

if (not tbResult) then
Dialog.Message("Error", "Failed MSI.SetInternalUI");
end

MSI.InstallProduct(strInstallerPathExtracted,"");

Calls MSI.SetInternalUI to display the full internal interface. If the call fails, an error message is shown to the user. The MSI file is then installed.


MSI.VerifyPackage Examples

MSI.VerifyPackage

boolean MSI.VerifyPackage (

string PackagePath )

Example 1

bResult = MSI.VerifyPackage(_TempFolder.."\\setup.msi");

if (bResult) then
Dialog.Message("Is Package", "Yes, the file is a package.");
else
Dialog.Message("Not Package", "The file is not a package, or an error was encountered.");
end

Checks to see if the file "setup.msi" in the user's temporary folder is an installation package and shows the result in a dialog message.


Page.ClickObject Examples

Page.ClickObject

Page.ClickObject (

string ObjectName )

Example 1

Page.ClickObject("Chapter 1");

Fires the On Click event of the object called "Chapter 1." Any actions located on it's On Click event will be executed.


Page.CreateObject Examples

Page.CreateObject

Page.CreateObject (

number ObjectType,

string ObjectName,

table Properties )

Example 1

-- Initialize the properties table
tWebProperties = {}
tWebProperties.URL="http://www.amsuser.com";
tWebProperties.Enabled=true;
tWebProperties.Visible=true;
tWebProperties.X=0;
tWebProperties.Y=0;
tWebProperties.Width=630;
tWebProperties.Height=425;

-- Create the web object
Page.CreateObject(OBJECT_WEB, "AC_Web_Created_By_Action", tWebProperties);

Initializes a table of properties for a web object, and then creates the web object "AC_Web_Created_By_Actions" based on these properties. The first three characters in the name ("AC_") were added to differentiate this object from objects on the page from design-time (AC_ denotes an 'action created' object). This type of object naming is not required, but it helps to ensure you don't try to create an already created object.

Example 2

-- Initialize the properties table
tImageProperties = {};
tImageProperties.ImageFile = _SourceFolder .. "\\AutoPlay\\Images\\Create_Me.jpg";
tImageProperties.UseTransColor = false;
tImageProperties.Opacity = 75;
tImageProperties.HitTest = HITTEST_STANDARD;
tImageProperties.Enabled = true;
tImageProperties.Visible = true;
tImageProperties.X = 50;
tImageProperties.Y = 50;
tImageProperties.Width = 100;
tImageProperties.Height = 200;
tImageProperties.TooltipText = "I was created by an action!!";
tImageProperties.Cursor = CURSOR_MEDIA;
tImageProperties.HighlightSound = SND_STANDARD;
tImageProperties.ClickSound = SND_STANDARD;

-- Create the image object
Page.CreateObject(OBJECT_IMAGE, "AC_Image_Object", tImageProperties);

Initializes a table of properties for an image object, and then creates the image object "Image_Object" based on these properties.


Page.DeleteObject Examples

Page.DeleteObject

Page.DeleteObject (

string ObjectName )

Example 1

Page.DeleteObject("Status");

Deletes an object from the current page named 'Status'.


Page.EnumerateObjects Examples

Page.EnumerateObjects

table Page.EnumerateObjects (

)

Example 1

all_objects = Page.EnumerateObjects( );

Gets the name of each object on the current page and stores them in a table called "all_objects."

Example 2

-- Get the names of all of the objects on the page.
object_names = Page.EnumerateObjects();

-- Get the error code of the last action.
error = Application.GetLastError();

-- If an error occurred, display the error code message.
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);
else
-- If there are no objects on the current page, display a dialog.
if (object_names == nil) then
Dialog.Message("Notice", "There are no objects on the current page.", MB_OK, MB_ICONEXCLAMATION);
else
-- Display the names of all of the label objects on the page.
output_string = "";
for index, object in pairs(object_names) do
-- Get the type of the object
type = Page.GetObjectType(object);
if (type == OBJECT_LABEL) then
output_string = output_string..object.."\r\n";
end
end
Dialog.Message("Information", "Below are the names of all of the label objects on this page.\r\n\r\n"..output_string, MB_OK, MB_ICONINFORMATION)
end
end

Gets the names of all of the objects on the current page and displays a dialog listing the names of only the label objects. If there are no objects on the page, or an error occurs, a notification dialog is displayed.


Page.GetFocus Examples

Page.GetFocus

string Page.GetFocus (

)

Example 1

object_focus = Page.GetFocus( );

Determines which object currently has focus and stores it's name in the variable "object_focus." If no object has focus at that time, the page name will be stored.


Page.GetObjectScript Examples

Page.GetObjectScript

string Page.GetObjectScript (

string ObjectName,

string EventName )

Example 1

-- Get the script from the button's on click event
sScript = Page.GetObjectScript("Button1", "On Click");

-- get the last error code (or success code)
err = Application.GetLastError();

if err ~= 0 then
-- An error occurred
Dialog.Message(err, _tblErrorMessages[err]);
else
-- No error, display output
Dialog.Message("Script from On Click", sScript);
end

Gets the script from the On Click event of the button object "Button1" and outputs it to the user. If an error occurs, the user is notified.

Example 2

-- Get the script from the button's on click event
sPreviousScript = Page.GetObjectScript("Button1", "On Click");

-- Initialize the new script
sNewScript = "Dialog.Message(\"Title\", \"Message\");"

-- Append the new script to the old script
Page.SetObjectScript("Button1", "On Click", sPreviousScript .. "\r\n" .. sNewScript);

Appends a dialog message action to the script existing on the On Click event of the "Button1" button object.


Page.GetObjectType Examples

Page.GetObjectType

number Page.GetObjectType (

string ObjectName )

Example 1

what_type = Page.GetObjectType("MyVideo");

Gets the number representing the type of the "MyVideo" object and stores it in a variable called "what_type." If this object was a video object, the number 5 would be returned.

Example 2

-- Get the names of all of the objects on the page.
object_names = Page.EnumerateObjects();

-- Get the error code of the last action.
error = Application.GetLastError();

-- If an error occurred, display the error code message.
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);
else
-- If there are no objects on the current page, display a dialog.
if (object_names == nil) then
Dialog.Message("Notice", "There are no objects on the current page.", MB_OK, MB_ICONEXCLAMATION);
else
-- Display the names of all of the label objects on the page.
output_string = "";
for index, object in pairs(object_names) do
-- Get the type of the object
type = Page.GetObjectType(object);
if (type == OBJECT_LABEL) then
output_string = output_string..object.."\r\n";
end
end
Dialog.Message("Information", "Below are the names of all of the label objects on this page.\r\n\r\n"..output_string, MB_OK, MB_ICONINFORMATION)
end
end

Gets the names of all of the objects on the current page and displays a dialog listing the names of only the label objects. If there are no objects on the page, or an error occurs, a notification dialog is displayed.


Page.GetRadioValue Examples

Page.GetRadioValue

string Page.GetRadioValue (

string GroupID = "",

number Type = RADIOGROUP_VALUE )

Example 1

radio_text = Page.GetRadioValue("", RADIOGROUP_TEXT);

Gets the text of the selected radiobutton in the default radiobutton group.

Example 2

radio_value = Page.GetRadioValue("Group1", RADIOGROUP_VALUE);

Gets the data value of the selected radiobutton in the group named "Group1".


Page.GetSize Examples

Page.GetSize

table Page.GetSize (

)

Example 1

page_size = Page.GetSize();

Gets the pixel dimensions of the current page and stores the width and height values in the "page_size" table. The dimensions can be accessed by referencing page_size.Width and page_size.Height.


Page.Jump Examples

Page.Jump

Page.Jump (

string PageName )

Example 1

Page.Jump("Page 2");

Jump to the page named "Page 2."

Example 2

Page.Jump("Table of Contents");

Jump to the page named "Table of Contents."


Page.Navigate Examples

Page.Navigate

Page.Navigate (

number NavigateType )

Example 1

Page.Navigate(PAGE_FIRST);

Navigates to the first page in the application.

Example 2

Page.Navigate(2);

Navigates to the next page in the application (according to the order the pages are listed in the program).

Example 3

Page.Navigate(PAGE_BACKWARD);

Navigates one page "backward" in the user's page-viewing history...i.e. jump to the page the user was on before they came to the current page.


Page.Print Examples

Page.Print

Page.Print (

boolean ShowPrintDialog = true,

boolean ScaleToFit = true )

Example 1

Page.Print(true,true);

Shows the common print dialog before printing the current page in the project using the ScaleToFit setting.


Page.Redraw Examples

Page.Redraw

Page.Redraw (

)

Example 1

Page.Redraw();

Redraws the current page (and all of the objects on it).


Page.SetFocus Examples

Page.SetFocus

Page.SetFocus (

string ObjectName )

Example 1

Page.SetFocus("Customer Name");

Sets focus to the "Customer Name" object on the current page.


Page.SetObjectScript Examples

Page.SetObjectScript

Page.SetObjectScript (

string ObjectName,

string EventName,

string Script )

Example 1

Page.SetObjectScript("Label1", "On Click", "-- Script removed by action");

Clears out the script from the "Label1" label object's On Click event and replaces it with a comment.

Example 2

-- Get the script from the button's on click event
sPreviousScript = Page.GetObjectScript("Button1", "On Click");

-- Initialize the new script
sNewScript = "Dialog.Message(\"Title\", \"Message\");"

-- Append the new script to the old script
Page.SetObjectScript("Button1", "On Click", sPreviousScript .. "\r\n" .. sNewScript);

Appends a dialog message action to the script existing on the On Click event of the "Button1" button object.


Page.SetObjectZOrder Examples

Page.SetObjectZOrder

Page.SetObjectZOrder (

string ObjectName,

number Position,

string ReferenceObject = "" )

Example 1

Page.SetObjectZOrder("Paragraph1", ZORDER_FRONT);

Moves the paragraph object "Paragraph1" to the front of the z-order.

Example 2

Page.SetObjectZOrder(sObjectToMove, ZORDER_INSERT_BEFORE, sReferenceObject);

Moves the object referenced in variable 'sObjectToMove' to the z-order position directly in front of the object referenced in variable 'sReferenceObject'.


Page.SetRadioValue Examples

Page.SetRadioValue

Page.SetRadioValue (

string Value,

string GroupID = "",

number Type = RADIOGROUP_VALUE )

Example 1

Page.SetRadioValue("RadioButtonInstall", "", RADIOGROUP_TEXT);

Selects the radio button whose text is "RadioButtonInstall".

Example 2

Page.SetRadioValue("RadioButton1", "Group1", RADIOGROUP_OBJECTNAME);

Selects the radio button whose name is "RadioButton1" and that is part of the "Group1" radio button group.

Example 3

Page.SetRadioValue("Data1", "", RADIOGROUP_VALUE);

Selects the radio button whose value is "Data1" and who is part of the default radio button group.


Page.StartTimer Examples

Page.StartTimer

Page.StartTimer (

number Interval = 1000,

number ID = 10 )

Example 1

Page.StartTimer(1000);

Starts a page timer whose ID is 10, and tells it to trigger the On Timer event once every second.

Example 2

Page.StartTimer(250, 25);

Starts the page timer whose ID is 25, and tells it to trigger the On Timer event 4 times per second.

Example 3

Page.StartTimer(2500, 100);

Starts the page timer whose ID is 100, and tells it to trigger the On Timer event every 2.5 seconds.


Page.StopTimer Examples

Page.StopTimer

Page.StopTimer (

number ID = 10 )

Example 1

Page.StopTimer();

Stops the page timer whose ID is 10 on the current page.

Example 2

Page.StopTimer(36);

Stops the page timer whose ID is 36 on the current page.


Paragraph.GetPos Examples

Paragraph.GetPos

table Paragraph.GetPos (

string ObjectName )

Example 1

Para_Pos = Paragraph.GetPos("Info Text");

Gets the current X, Y coordinates of the "Info Text" paragraph object and stores the results in a table called "Para_Pos." These values can be accessed by referencing Para_Pos.X and Para_Pos.Y.


Paragraph.GetProperties Examples

Paragraph.GetProperties

table Paragraph.GetProperties (

string ObjectName )

Example 1

-- Prompt the user for a location to save to
sSaveFileName = Dialog.FileBrowse(false, "Save Text As", "", "All Files (*.*)|*.*|", "", "", false, false)[1];

-- Get the paragraph properties
tProperties = Paragraph.GetProperties("Slogan");

-- Get the currently displayed text
sText = tProperties.Text

-- Output the text to a file
TextFile.WriteFromString(sSaveFileName, sText, false);

Saves the contents of a paragraph to a file of the user's choosing.


Paragraph.GetScrollPos Examples

Paragraph.GetScrollPos

number Paragraph.GetScrollPos (

string ObjectName,

boolean Vertical = true )

Example 1

ver_scroll_position = Paragraph.GetScrollPos("Info Text", true);

Gets the current position of the vertical scroll bar in the "Info Text" paragraph object and stores it in the variable "ver_scroll_position."

Example 2

hor_scroll_position = Paragraph.GetScrollPos("License Agreement", false);

Gets the current position of the horizontal scroll bar in the "License Agreement" paragraph object and stores it in the variable "hor_scroll_position."


Paragraph.GetScrollRange Examples

Paragraph.GetScrollRange

table Paragraph.GetScrollRange (

string ObjectName,

boolean Vertical = true )

Example 1

ver_scroll_range = Paragraph.GetScrollRange("Info Text", true);

Gets the range of the vertical scroll bar in the "Info Text" paragraph object and stores the range values in the table called "ver_scroll_range." The range values can be accessed by referencing ver_scroll_range.Min and ver_scroll_range.Max.

Example 2

hor_scroll_range = Paragraph.GetScrollRange("License Agreement", false);

Gets the range of the horizontal scroll bar in the "License Agreement" paragraph object and stores the range values in the table called "hor_scroll_range." The range values can be accessed by referencing hor_scroll_range.Min and hor_scroll_range.Max.


Paragraph.GetSize Examples

Paragraph.GetSize

table Paragraph.GetSize (

string ObjectName )

Example 1

box_size = Paragraph.GetSize("Product Info");

Gets the pixel dimensions of the "Product Info" paragraph object and stores the width and height values in the "box_size" table. The dimensions can be accessed by referencing box_size.Width and box_size.Height.


Paragraph.GetText Examples

Paragraph.GetText

string Paragraph.GetText (

string ObjectName )

Example 1

readme_text = Paragraph.GetText("Readme");

Gets the text that is currently displayed in the paragraph object named "Readme" and stores it in a variable named "readme_text."

Example 2

strLicense = Paragraph.GetText("License Agreement");

Gets the text in the "License Agreement" paragraph object and stores it in a variable called "strLicense."

Tip: Starting a variable name with "str" is a technique that programmers use to help themselves remember that a variable contains a string.


Paragraph.IsEnabled Examples

Paragraph.IsEnabled

boolean Paragraph.IsEnabled (

string ObjectName )

Example 1

license_text_enabled = Paragraph.IsEnabled("License Agreement");

Stores true in a variable named "license_text_enabled" if the "License Agreement" paragraph object is enabled, and false if it is disabled.

Example 2

bPara2Enabled = Paragraph.IsEnabled("Para2");

Checks whether the "Para2" paragraph object is enabled or disabled, and sets the "bPara2Enabled" variable to either true or false accordingly.

Tip: Starting a variable name with "b" is a technique that programmers use to help themselves remember that a variable contains a boolean value.


Paragraph.IsVisible Examples

Paragraph.IsVisible

boolean Paragraph.IsVisible (

string ObjectName )

Example 1

readme_text_visible = Paragraph.IsVisible("Readme");

Checks whether the paragraph object called "Readme" is visible and stores true or false in a variable called "readme_text_visible."

Example 2

bPara2isVisible = Paragraph.IsVisible("Para2");

Stores true in bPara2isVisible if the "Para2" paragraph object is visible.

Tip: Starting a variable name with "b" is a technique that programmers use to help themselves remember that a variable contains a boolean value.


Paragraph.SetEnabled Examples

Paragraph.SetEnabled

Paragraph.SetEnabled (

string ObjectName,

boolean Enabled = true )

Example 1

Paragraph.SetEnabled("License Agreement", true);

Enables the paragraph object named "License Agreement."

Example 2

Paragraph.SetEnabled("Para4", false);

Disables the paragraph object named "Para4."


Paragraph.SetPos Examples

Paragraph.SetPos

Paragraph.SetPos (

string ObjectName,

number X,

number Y )

Example 1

Paragraph.SetPos("Set Me", 100, 150 );

Sets the "Set Me" paragraph object's X coordinate to 100 pixels and the Y coordinate to 150.

Example 2

Paragraph.SetPos("Move Me", 0, 0);

Sets the "Move Me" paragraph object's X coordinate to 0 and the Y coordinate to 0. The paragraph object will be moved to the upper left hand corner of the page from it's current position.


Paragraph.SetProperties Examples

Paragraph.SetProperties

Paragraph.SetProperties (

string ObjectName,

table Properties )

Example 1

-- Prompt the user for a text file to load
sLoadFileName = Dialog.FileBrowse(true, "Load TXT File", "", "All Files (*.*)|*.*|", "", "", false, false)[1];

-- Load the selected file into a string
sString = TextFile.ReadToString(sLoadFileName);

-- Initialize property table
tProperties = {Text=sString};

-- Set the properties of a paragraph object
Paragraph.SetProperties("Slogan", tProperties);

Loads the contents of a file selected by the user into a paragraph object.


Paragraph.SetScrollPos Examples

Paragraph.SetScrollPos

Paragraph.SetScrollPos (

string ObjectName,

number ScrollPos,

boolean Vertical = true )

Example 1

Paragraph.SetScrollPos("Info Text", 25, true);

Sets the "Info Text" paragraph object's vertical scroll bar handle position to line 25.

Example 2

Paragraph.SetScrollPos("License Agreement", 0, false);

Sets the "License Agreement" paragraph object's horizontal scroll bar handle position to the value 0. This means the horizontal scroll bar handle will be moved to the left hand side (beginning) of the scroll bar.


Paragraph.SetSize Examples

Paragraph.SetSize

Paragraph.SetSize (

string ObjectName,

number Width,

number Height )

Example 1

Paragraph.SetSize("Grower", 100, 150 );

Sets the "Grower" paragraph object's width to 100 pixels and it's height to 150 pixels.

Example 2

Paragraph.SetSize("Expand", Paragraph.GetSize("Expand").Width + 200, Paragraph.GetSize("Expand").Height + 100);

Increases the "Expand" paragraph object's current width by 200 pixels and it's current height by 100 pixels. The Paragraph.GetSize action is used here to get the current size of the paragraph object.


Paragraph.SetText Examples

Paragraph.SetText

Paragraph.SetText (

string ObjectName,

string Text )

Example 1

Paragraph.SetText("Paragraph4", readme_text);

Sets the text in the "Paragraph4" paragraph object to the contents of the readme_text variable.

Example 2

Paragraph.SetText("Copyright Notice", "(c) 2015 Indigo Rose Software");

Sets the text in the paragraph object named "Copyright Notice" to "(c) 2015 Indigo Rose Software".


Paragraph.SetVisible Examples

Paragraph.SetVisible

Paragraph.SetVisible (

string ObjectName,

boolean Visible = true )

Example 1

Paragraph.SetVisible("Para3", true);

Makes the "Para3" paragraph object visible.

Example 2

Paragraph.SetVisible("Welcome Text", false);

Hides the paragraph object named "Welcome Text."

Example 3

Paragraph.SetVisible("Para12");

Makes the paragraph object named "Para12" visible.


PDF.GetFile Examples

PDF.GetFile

string PDF.GetFile (

string ObjectName )

Example 1

pdf_file = PDF.GetFile("PDF1");

Gets the path to the file currently loaded in the PDF object called "PDF1" and stores it in a variable called "pdf_file."


PDF.GetPos Examples

PDF.GetPos

table PDF.GetPos (

string ObjectName )

Example 1

tblManual = PDF.GetPos("Manual");

Gets the current X, Y coordinates of the "Manual" PDF object and stores the results in a table called "tblManual." These values can be accessed by referencing tblManual.X and tblManual.Y.


PDF.GetProperties Examples

PDF.GetProperties

table PDF.GetProperties (

string ObjectName )

Example 1

-- Get the state of the scrollbars.
bShowScrollbars = PDF.GetProperties("PDF1").ShowScrollbars;

-- If scrollbars are not visible, show them, otherwise notify user.
if (not bShowScrollbars) then
PDF.SetProperties("PDF1", {ShowScrollbars=true});
else
Dialog.Message("PDF", "Scrollbars are already visible.");
end

If scrollbars are not visible in the "PDF1" PDF object, they are made visible, otherwise a notification message is shown.


PDF.GetSize Examples

PDF.GetSize

table PDF.GetSize (

string ObjectName )

Example 1

ob_size = PDF.GetSize("Manual");

Gets the pixel dimensions of the "Manual" PDF object and stores the width and height values in the "ob_size" table. The dimensions can be accessed by referencing ob_size.Width and ob_size.Height.


PDF.GoToPage Examples

PDF.GoToPage

PDF.GoToPage (

string ObjectName,

number Page )

Example 1

PDF.GoToPage("Guide", 10);

Goes to page 10 in the PDF File currently loaded in the PDF object named "Guide."


PDF.IsEnabled Examples

PDF.IsEnabled

boolean PDF.IsEnabled (

string ObjectName )

Example 1

bEnabled = PDF.IsEnabled("Specification");

Checks whether the "Specification" PDF object is enabled or disabled, and stores true or false in the bEnabled variable accordingly.

Tip: Starting a variable name with "b" is a technique that programmers use to help themselves remember that a variable contains a boolean value.


PDF.IsVisible Examples

PDF.IsVisible

boolean PDF.IsVisible (

string ObjectName )

Example 1

bHardwareVisible = PDF.IsVisible("Hardware");

Checks whether the PDF object called "Hardware" is visible and stores true or false in the variable called bHardwareVisible.


PDF.LoadFile Examples

PDF.LoadFile

PDF.LoadFile (

string ObjectName,

string File )

Example 1

PDF.LoadFile("PDF1", "AutoPlay\\Docs\\Sample.pdf");

Loads the file "Sample.pdf" currently available in the project's "Docs" folder into the PDF object named "PDF1."

Example 2

PDF.LoadFile("PDFWeb", "http://www.myfakedomain.com/docs/web_sample.pdf");

Loads the file "web_sample.pdf" from "http://www.myfakedomain.com/docs/" into the PDF object named "PDFWeb."


PDF.Navigate Examples

PDF.Navigate

PDF.Navigate (

string ObjectName,

number NavigateType )

Example 1

PDF.Navigate("PDF1", PDF_NEXT);

Navigates to the next page in the document loaded in the PDF object named "PDF1."

Example 2

PDF.Navigate("Core", PDF_FIRST);

Navigates to the first page in the document loaded in the PDF object named "Core."

Example 3

PDF.Navigate("Guide", 3);

Navigates to the previous page in the document loaded in the PDF object named "Guide."


PDF.Print Examples

PDF.Print

PDF.Print (

string ObjectName,

number FromPage = 1,

number ToPage = -1,

boolean ShrinkToFit = true )

Example 1

PDF.Print("PDF1", 1, -1, true);

Prints all pages of the document currently loaded in the PDF object named "PDF1."

Example 2

PDF.Print("Resources", 5, 8, true);

Prints pages 5-8 of the document currently loaded in the PDF object named "Resources."


PDF.PrintWithDialog Examples

PDF.PrintWithDialog

PDF.PrintWithDialog (

string ObjectName )

Example 1

PDF.PrintWithDialog("PDF1");

Prints the pages of the PDF File (*.pdf) currently loaded in the PDF object named "PDF1" according to the options selected by the user from a settings dialog.


PDF.SetEnabled Examples

PDF.SetEnabled

PDF.SetEnabled (

string ObjectName,

boolean Enabled = true )

Example 1

PDF.SetEnabled("PDF1", true);

Enables the PDF object named "PDF1."

Example 2

PDF.SetEnabled("Manual", false);

Disables the PDF object named "Manual."


PDF.SetNamedDest Examples

PDF.SetNamedDest

PDF.SetNamedDest (

string ObjectName,

string NamedDest )

Example 1

-- Go to the named destination "Examples".
PDF.SetNamedDest("PDF1", "Examples");

Goes to the named destination called "Examples" in the PDF object named "PDF1."


PDF.SetPos Examples

PDF.SetPos

PDF.SetPos (

string ObjectName,

number X,

number Y )

Example 1

PDF.SetPos("Set Me", 100, 150 );

Sets the "Set Me" PDF object's X coordinate to 100 pixels and the Y coordinate to 150.

Example 2

PDF.SetPos("Move Me", 0, 0);

Sets the "Move Me" PDF object's X coordinate to 0 and the Y coordinate to 0. The object will be moved to the upper left hand corner of the page from it's current position.


PDF.SetProperties Examples

PDF.SetProperties

PDF.SetProperties (

string ObjectName,

table Properties )

Example 1

-- Create the properties table to set for the object.
tbProps = {};
tbProps.Page = PAGE_STANDARD;
tbProps.ShowToolbar = false;

-- Set the properties for the object.
PDF.SetProperties("PDF1", tbProps);

Makes the PDF object named "PDF1" show the page with no bookmarks or thumbs and to not show a toolbar.


PDF.SetSize Examples

PDF.SetSize

PDF.SetSize (

string ObjectName,

number Width,

number Height )

Example 1

PDF.SetSize("Grower", 300, 250 );

Set the "Grower" PDF object's width to 300 pixels and it's height to 250 pixels.

Example 2

PDF.SetSize("Expand", PDF.GetSize("Expand").Width + 200, PDF.GetSize("Expand").Height + 100);

Increases the"Expand" PDF object's current width by 200 pixels and it's current height by 100 pixels. The PDF.GetSize action is used here to get the current size of the object.


PDF.SetVisible Examples

PDF.SetVisible

PDF.SetVisible (

string ObjectName,

boolean Visible = true )

Example 1

PDF.SetVisible("PDF1", false);

Makes the "PDF1" PDF object invisible.

Example 2

PDF.SetVisible("PDF21")

Makes the PDF object named "PDF21" visible.


PDF.SetZoomScroll Examples

PDF.SetZoomScroll

PDF.SetZoomScroll (

string ObjectName,

number Percent,

number Left,

number Top )

Example 1

-- Zoom the document to 100% with a horizontal offset of 100 and a vertical offset of 400.
PDF.SetZoomScroll("ZoomMe", 100, 100, 400);

Zooms the PDF object named "ZoomMe" to 100% and sets the horizontal offset to 100 and vertical offset to 400.


Plugin.GetPos Examples

Plugin.GetPos

table Plugin.GetPos (

string ObjectName )

Example 1

Mystery_Pos = Plugin.GetPos("Added_Object");

Gets the current X, Y coordinates of the "Added_Object" plugin object and stores the results in a table called "Mystery_Pos." These values can be accessed by referencing Mystery_Pos.X and Mystery_Pos.Y.


Plugin.GetSize Examples

Plugin.GetSize

table Plugin.GetSize (

string ObjectName )

Example 1

plug_size = Plugin.GetSize("Plug_Ob");

Gets the pixel dimensions of the "Plug_Ob" plugin object and stores the width and height values in the "plug_size" table. The dimensions can be accessed by referencing plug_size.Width and plug_size.Height.


Plugin.IsEnabled Examples

Plugin.IsEnabled

boolean Plugin.IsEnabled (

string ObjectName )

Example 1

plug1_enabled = Plugin.IsEnabled("Plugin1");

Stores true in a variable named "plug1_enabled" if the "Plugin1" plugin object is enabled, and false if it is disabled.

Example 2

bPlug2Enabled = Plugin.IsEnabled("Plugin2");

Checks whether the "Plugin2" plugin object is enabled or disabled, and sets the "bPlug2Enabled" variable to either true or false accordingly.

Tip: Starting a variable name with "b" is a technique that programmers use to help themselves remember that a variable contains a boolean value.


Plugin.IsVisible Examples

Plugin.IsVisible

boolean Plugin.IsVisible (

string ObjectName )

Example 1

AddOn_Visible = Plugin.IsVisible("Add_On");

Checks whether the plugin object called "Add_On" is visible and stores true or false in a variable called "AddOn_Visible."

Example 2

bPlug5isVisible = Plugin.IsVisible("Plugin5");

Stores true in "bPlug5isVisible" if the "Plugin5" plugin object is visible.

Tip: Starting a variable name with "b" is a technique that programmers use to help themselves remember that a variable contains a boolean value.


Plugin.SetEnabled Examples

Plugin.SetEnabled

Plugin.SetEnabled (

string ObjectName,

boolean Enabled = true )

Example 1

Plugin.SetEnabled("Plugin Two", true);

Enables the plugin object named "Plugin Two."

Example 2

Plugin.SetEnabled("Plugin4", false);

Disables the plugin object named "Plugin4."


Plugin.SetPos Examples

Plugin.SetPos

Plugin.SetPos (

string ObjectName,

number X,

number Y )

Example 1

Plugin.SetPos("New Plug", 100, 150);

Sets the "New Plug" plugin object's X coordinate to 100 pixels and the Y coordinate to 150.

Example 2

Plugin.SetPos("Move Me", 0, 0);

Sets the "Move Me" plugin object's X coordinate to 0 and the Y coordinate to 0. The plugin object will be moved to the upper left hand corner of the page from it's current position.


Plugin.SetSize Examples

Plugin.SetSize

Plugin.SetSize (

string ObjectName,

number Width,

number Height )

Example 1

Plugin.SetSize("Grower", 100, 150);

Sets the "Grower" plugin object's width to 100 pixels and it's height to 150 pixels.

Example 2

Plugin.SetSize("Expand", Plugin.GetSize("Expand").Width + 200, Plugin.GetSize("Expand").Height + 100);

Increases the "Expand" plugin object's current width by 200 pixels and it's current height by 100 pixels. The Plugin.GetSize action is used here to get the current size of the plugin object.


Plugin.SetVisible Examples

Plugin.SetVisible

Plugin.SetVisible (

string ObjectName,

boolean Visible = true )

Example 1

Plugin.SetVisible("Plugin3", true);

Makes the "Plugin3" plugin object visible.

Example 2

Plugin.SetVisible("Intro Plug", false);

Hides the plugin object named "Intro Plug."

Example 3

Plugin.SetVisible("Custom12");

Makes the plugin object named "Custom12" visible.


Progress.GetCurrentPos Examples

Progress.GetCurrentPos

number Progress.GetCurrentPos (

string ObjectName )

Example 1

-- Store the current position in nCurrentPos
nCurrentPos = Progress.GetCurrentPos("Status");

-- Check to see if any errors occurred calling the Progress.GetCurrentPos action.
-- If any error occurred, display the error message.
error = Application.GetLastError();
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
end

Gets the current position of the "Status" progress meter and stores it in variable nCurrentPos.


Progress.GetPos Examples

Progress.GetPos

table Progress.GetPos (

string ObjectName )

Example 1

Mystery_Pos = Progress.GetPos("Added_Object");

Gets the current X, Y coordinates of the "Added_Object" progress object and stores the results in a table called "Mystery_Pos." These values can be accessed by referencing Mystery_Pos.X and Mystery_Pos.Y.


Progress.GetProperties Examples

Progress.GetProperties

table Progress.GetProperties (

string ObjectName )

Example 1

tProperties = Progress.GetProperties("Progress1");

Gets the properties from the progress object 'Progress1' and stores them in table 'tProperties'.


Progress.GetRange Examples

Progress.GetRange

table Progress.GetRange (

string ObjectName )

Example 1

-- Store the current position in nCurrentPos
nCurrentPos = Progress.GetCurrentPos("Status");

-- Store the range in a table: tRange
-- Indexed by tRange.Begin and tRange.End
tRange = Progress.GetRange("Status");

-- Check to see if any errors occurred calling the Progress.GetRange action.
-- If any error occurred, display the error message.
error = Application.GetLastError();
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
end

-- Calculate the percent complete:
nPercentComplete = ((nCurrentPos - tRange.Begin) / (tRange.End - tRange.Begin)) * 100;

Gets the current position and range of the "Status" progress meter and calculates the percent completed.


Progress.GetSize Examples

Progress.GetSize

table Progress.GetSize (

string ObjectName )

Example 1

progress_size = Progress.GetSize("Progress_Ob");

Gets the pixel dimensions of the "Progress_Ob" progress object and stores the width and height values in the "progress_size" table. The dimensions can be accessed by referencing progress_size.Width and progress_size.Height.


Progress.GetText Examples

Progress.GetText

string Progress.GetText (

string ObjectName )

Example 1

-- Get the current text from the Progress Bar
sCurrentText = Progress.GetText("Status");

-- Check to see if any errors occurred calling the Progress.GetText action.
-- If any error occurred, display the error message.
error = Application.GetLastError();
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
end

-- Print the current text to the debug window
Debug.Print("Progress Text: " .. sCurrentText .. "\r\n");

Gets the current text of the "Status" progress meter and outputs it to the debug window.


Progress.IsEnabled Examples

Progress.IsEnabled

boolean Progress.IsEnabled (

string ObjectName )

Example 1

enabled = Progress.IsEnabled("Progress1");

Stores true in a variable named "enabled" if the "Progress1" progress object is enabled, and false if it is disabled.

Example 2

b2Enabled = Progress.IsEnabled("Progress2");

Checks whether the "Progress2" progress object is enabled or disabled, and sets the "b2Enabled" variable to either true or false accordingly.

Tip: Starting a variable name with "b" is a technique that programmers use to help themselves remember that a variable contains a boolean value.


Progress.IsVisible Examples

Progress.IsVisible

boolean Progress.IsVisible (

string ObjectName )

Example 1

Visible = Progress.IsVisible("Progress1");

Checks whether the progress object called "Progress1" is visible and stores true or false in a variable called "Visible."

Example 2

b5isVisible = Progress.IsVisible("Progress5");

Stores true in "b5isVisible" if the "Progress5" progress object is visible.

Tip: Starting a variable name with "b" is a technique that programmers use to help themselves remember that a variable contains a boolean value.


Progress.SetCurrentPos Examples

Progress.SetCurrentPos

Progress.SetCurrentPos (

string ObjectName,

number Pos )

Example 1

-- Get the current position
nCurrentPos = Progress.GetCurrentPos("Status");

-- Increment the current position
Progress.SetCurrentPos("Status", nCurrentPos + 1);

-- Check to see if any errors occurred calling the Progress.SetCurrentPosition action.
-- If any error occurred, display the error message.
error = Application.GetLastError();
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
end

Gets the current position of the "Status" progress meter and increments it by one.


Progress.SetEnabled Examples

Progress.SetEnabled

Progress.SetEnabled (

string ObjectName,

boolean Enabled = true )

Example 1

Progress.SetEnabled("Progress Two", true);

Enables the progress object named "Progress Two."

Example 2

Progress.SetEnabled("Progress4", false);

Disables the progress object named "Progress4."


Progress.SetPos Examples

Progress.SetPos

Progress.SetPos (

string ObjectName,

number X,

number Y )

Example 1

Progress.SetPos("New Progress", 100, 150);

Sets the "New Progress" progress object's X coordinate to 100 pixels and the Y coordinate to 150.

Example 2

Progress.SetPos("Move Me", 0, 0);

Sets the "Move Me" progress object's X coordinate to 0 and the Y coordinate to 0. The progress object will be moved to the upper left hand corner of the page from it's current position.


Progress.SetProperties Examples

Progress.SetProperties

Progress.SetProperties (

string ObjectName,

table Properties )

Example 1

Progress.SetProperties("Progress1", {MinRange = 0, MaxRange = 100});

Sets the range of the progress object 'Progress1' from 0 to 100.


Progress.SetRange Examples

Progress.SetRange

Progress.SetRange (

string ObjectName,

number Begin,

number End )

Example 1

-- Set the progress range from 0 to 100
Progress.SetRange("Status", 0, 100);

-- Check to see if any errors occurred calling the Progress.SetRange action.
-- If any error occurred, display the error message.
error = Application.GetLastError();
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
end

Sets the range of the "Status" progress meter from 0 to 100.


Progress.SetSize Examples

Progress.SetSize

Progress.SetSize (

string ObjectName,

number Width,

number Height )

Example 1

Progress.SetSize("Grower", 100, 150);

Sets the "Grower" progress object's width to 100 pixels and it's height to 150 pixels.

Example 2

Progress.SetSize("Expand", Progress.GetSize("Expand").Width + 200, Progress.GetSize("Expand").Height + 100);

Increases the "Expand" progress object's current width by 200 pixels and it's current height by 100 pixels. The Progress.GetSize action is used here to get the current size of the progress object.


Progress.SetStep Examples

Progress.SetStep

Progress.SetStep (

string ObjectName,

number Step )

Example 1

-- Set the step value to 10
Progress.SetStep("Status", 10);

-- Check to see if any errors occurred calling the Process.SetStep action.
-- If any error occurred, display the error message.
error = Application.GetLastError();
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
end

Sets the step of the "Status" progress meter to 10.


Progress.SetText Examples

Progress.SetText

Progress.SetText (

string ObjectName,

string Text )

Example 1

-- Store the current position in nCurrentPos
nCurrentPos = Progress.GetCurrentPos("Status");

-- Store the range in a table: tRange
-- Indexed by tRange.Begin and tRange.End
tRange = Progress.GetRange("Status");

-- Calculate the percent complete:
nPercentComplete = ((nCurrentPos - tRange.Begin) / (tRange.End - tRange.Begin)) * 100;

-- Set the current text to reflect the percent complete
Progress.SetText("Status", nPercentComplete .. "%");

-- Check to see if any errors occurred calling the Progress.SetText action.
-- If any error occurred, display the error message.
error = Application.GetLastError();
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
end

Gets the current position and range of the "Status" progress meter and calculate the percent complete. Sets the text to the percent complete and checks for errors.


Progress.SetVisible Examples

Progress.SetVisible

Progress.SetVisible (

string ObjectName,

boolean Visible = true )

Example 1

Progress.SetVisible("Progress3", true);

Makes the "Progress3" progress object visible.

Example 2

Progress.SetVisible("Intro Progress", false);

Hides the progress object named "Intro Progress."

Example 3

Progress.SetVisible("Custom12");

Makes the progress object named "Custom12" visible.


Progress.StepIt Examples

Progress.StepIt

Progress.StepIt (

string ObjectName )

Example 1

-- Set the progress bar range from 0 to 50
Progress.SetRange("Status", 0, 50);

-- Set the current position to 0 (the beginning)
Progress.SetCurrentPos("Status", 0);

-- Set the step size to 10
Progress.SetStep("Status", 10);

-- nLoopControl is used to control the loop below
nLoopControl = 5;

-- Do the following as long as nLoopControl is greater than 0
-- In this case, this loop will be performed 5 times
while nLoopControl > 0 do
-- Increment the current progress
Progress.StepIt("Status");

-- Check to see if any errors occurred calling the Progress.StepIt action.
-- If any error occurred, display the error message.
error = Application.GetLastError();
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
end

-- Subtract 1 from nLoopControl
nLoopControl = nLoopControl - 1;
end

Sets the range of the "Status" progress meter from 0 to 50, sets the step size to 10, sets the current position to 0, and steps the progress meter five times.


QuickTime.GetCurrentPos Examples

QuickTime.GetCurrentPos

number QuickTime.GetCurrentPos (

string ObjectName )

Example 1

curr_pos = QuickTime.GetCurrentPos("QuickTime1");
QuickTime.Seek("QuickTime1", SEEK_SPECIFIC, curr_pos - 2);

Retrieves the current time position of the media in the "QuickTime1" QuickTime object and stores it in a variable called cur_time. That time is then used to seek 2 seconds previous to it.


QuickTime.GetFile Examples

QuickTime.GetFile

string QuickTime.GetFile (

string ObjectName )

Example 1

strCurrentFile = QuickTime.GetFile("QuickTime1");
Input.SetText("FileInput", strCurrentFile);

Gets the path to the media file currently loaded in the QuickTime object called "QuickTime1" and stores it in a variable called "strCurrentFile." The path text is then set in the Input object named "FileInput."


QuickTime.GetFullScreen Examples

QuickTime.GetFullScreen

boolean QuickTime.GetFullScreen (

string ObjectName )

Example 1

-- Toggle the full screen state.
bFullScreen = QuickTime.GetFullScreen("QuickTime1");
QuickTime.SetFullScreen("QuickTime1", not bFullScreen, qtFullScreenDefaultFlags, qtFullScreenMovieFitsMonitorMaintainAspectRatio, 1);

Toggles full screen mode in the QuickTime object named "QuickTime1."


QuickTime.GetLength Examples

QuickTime.GetLength

number QuickTime.GetLength (

string ObjectName )

Example 1

nLength = QuickTime.GetLength("Intro Vid");
Label.SetText("LengthLabel", nLength);

Retrieves the length of the media file in the "Intro Vid" QuickTime object and stores it in a variable called nLength. The length is then set as the text of a label object.


QuickTime.GetMute Examples

QuickTime.GetMute

boolean QuickTime.GetMute (

string ObjectName )

Example 1

-- Toggle the mute state.
bMute = QuickTime.GetMute("QuickTime1");
QuickTime.SetMute("QuickTime1", not bMute);

Toggles the mute state of the QuickTime object named "QuickTime1."


QuickTime.GetPos Examples

QuickTime.GetPos

table QuickTime.GetPos (

string ObjectName )

Example 1

Vid_Pos = QuickTime.GetPos("Intro Video");

Gets the current X, Y coordinates of the "Intro Video" QuickTime object and stores the results in a table called "Vid_Pos." These values can be accessed by referencing Vid_Pos.X and Vid_Pos.Y.


QuickTime.GetProperties Examples

QuickTime.GetProperties

table QuickTime.GetProperties (

string ObjectName )

Example 1

tProperties = QuickTime.GetProperties("QuickTime1");

Gets the properties from the QuickTime object 'QuickTime1' and stores them in the table 'tProperties'.


QuickTime.GetSize Examples

QuickTime.GetSize

table QuickTime.GetSize (

string ObjectName )

Example 1

vid_size = QuickTime.GetSize("Product Vid");

Gets the pixel dimensions of the "Product Vid" QuickTime object and stores the width and height values in the "vid_size" table. The dimensions can be accessed by referencing vid_size.Width and vid_size.Height.


QuickTime.GetVolume Examples

QuickTime.GetVolume

number QuickTime.GetVolume (

string ObjectName )

Example 1

vid_volume = QuickTime.GetVolume("Presentation");

Gets the volume of the "Presentation" QuickTime object and stores it in the variable vid_volume.


QuickTime.IsEnabled Examples

QuickTime.IsEnabled

boolean QuickTime.IsEnabled (

string ObjectName )

Example 1

intro_video_enabled = QuickTime.IsEnabled("Intro Video");

Stores true in a variable named "intro_video_enabled" if the "Intro Video" QuickTime object is enabled, and false if it is disabled.


QuickTime.IsVisible Examples

QuickTime.IsVisible

boolean QuickTime.IsVisible (

string ObjectName )

Example 1

tour_visible = QuickTime.IsVisible("Video Tour");

Checks whether the QuickTime object called "Video Tour" is visible and stores true or false in a variable called "tour_visible."


QuickTime.LoadFile Examples

QuickTime.LoadFile

QuickTime.LoadFile (

string ObjectName,

string Filename,

boolean PlayAutomatic = false,

boolean Loop = false )

Example 1

QuickTime.LoadFile("Video Intro", "AutoPlay\\Videos\\intro.mov", true, false);

Loads "AutoPlay\Videos\intro.mov" into the "Video Intro" QuickTime object, and starts to play it automatically.


QuickTime.Pause Examples

QuickTime.Pause

boolean QuickTime.Pause (

string ObjectName )

Example 1

QuickTime.Pause("Intro Video");

Pauses the media that is currently loaded in the "Intro Video" QuickTime object.


QuickTime.Play Examples

QuickTime.Play

boolean QuickTime.Play (

string ObjectName,

number Rate = 1.0 )

Example 1

--Play in slow motion
QuickTime.Play("QuickTime1", 0.5);

Starts playing the media that is currently loaded in the "QuickTime1" QuickTime object at a rate of 0.5.


QuickTime.Seek Examples

QuickTime.Seek

boolean QuickTime.Seek (

string ObjectName,

number SeekType = 0,

number SeekTime = 0 )

Example 1

QuickTime.Seek("QuickTime2", 2, 5); -- seek ahead 5 seconds

Skips ahead to a position 5 seconds later than the current position in the "QuickTime2" QuickTime object.

Example 2

QuickTime.Seek("QuickTime1", SEEK_BEGINNING); -- rewind the media

Seeks to the beginning of the "QuickTime1" QuickTime object.


QuickTime.SetEnabled Examples

QuickTime.SetEnabled

QuickTime.SetEnabled (

string ObjectName,

boolean Enabled = true )

Example 1

QuickTime.SetEnabled("Intro", true);

Enables the QuickTime object named "Intro."


QuickTime.SetFullScreen Examples

QuickTime.SetFullScreen

boolean QuickTime.SetFullScreen (

string ObjectName,

boolean FullScreen,

boolean HideCursor = false,

number Sizing = 2,

number Monitor = 0 )

Example 1

– Toggle full screen
bFullScreen = QuickTime.GetFullScreen("QuickTime1");
QuickTime.SetFullScreen("QuickTime1", not bFullScreen, false, qtFullScreenMovieFitsMonitorMaintainAspectRatio, 1);

Toggles the QuickTime object named "QuickTime1" between full screen mode and normal mode. In other words, if "QuickTime1" is currently in full screen mode, make it normal; and if it's currently in normal mode, make it full screen.

Note: The not operator is used in this example to convert the result of the QuickTime.GetFullScreen action to its logical opposite. If QuickTime.GetFullScreen returns true, the not converts that true into a false; if QuickTime.GetFullScreen returns false, the not converts that false into a true. The result is then used as the second parameter in our QuickTime.SetFullScreen action. So, the QuickTime.SetFullScreen action sets the full screen mode of "QuickTime1" to true or false, based on whether "QuickTime1" is currently in full screen mode or not, essentially toggling its full screen mode between on or off.


QuickTime.SetMute Examples

QuickTime.SetMute

QuickTime.SetMute (

string ObjectName,

boolean Mute = true )

Example 1

– Toggle the mute state.
bMute = QuickTime.GetMute("QuickTime1");
QuickTime.SetMute("QuickTime1", not bMute);

Toggles the mute state of the QuickTime object named "QuickTime1."


QuickTime.SetPos Examples

QuickTime.SetPos

QuickTime.SetPos (

string ObjectName,

number X,

number Y )

Example 1

QuickTime.SetPos("QuickTime1", 0, 0);

Sets the "QuickTime1" QuickTime object's X coordinate to 0 and the Y coordinate to 0. The object will be moved to the upper left hand corner of the page from it's current position.


QuickTime.SetProperties Examples

QuickTime.SetProperties

QuickTime.SetProperties (

string ObjectName,

table Properties )

Example 1

QuickTime.SetProperties("Introduction", tIntroProperties);

Sets the properties of the 'Introduction' QuickTime object to the values contained in table 'tIntroProperties'.


QuickTime.SetSize Examples

QuickTime.SetSize

QuickTime.SetSize (

string ObjectName,

number Width,

number Height )

Example 1

QuickTime.SetSize("Intro", 200, 200);

Sets the "Intro" QuickTime object's width to 200 pixels and it's height to 200 pixels.


QuickTime.SetVisible Examples

QuickTime.SetVisible

QuickTime.SetVisible (

string ObjectName,

boolean Visible = true )

Example 1

QuickTime.SetVisible("QuickTime1", true);

Makes the "QuickTime1" QuickTime object visible.

Example 2

QuickTime.SetVisible("Intro Video", false);

Hides the QuickTime object named "Intro Video."


QuickTime.SetVolume Examples

QuickTime.SetVolume

QuickTime.SetVolume (

string ObjectName,

number Volume )

Example 1

--Get the current volume.
nCurrVolume = QuickTime.GetVolume("QuickTime1");

--Cut the volume in half.
QuickTime.SetVolume("QuickTime1", (nCurrVolume / 2));

Gets the current volume of a QuickTime object and then reduces it by 50%.


RadioButton.GetChecked Examples

RadioButton.GetChecked

boolean RadioButton.GetChecked (

string ObjectName )

Example 1

bChecked = RadioButton.GetChecked("RadioButton1");

Stores true in a variable named "bChecked" if the "RadioButton1" radiobutton object is currently selected, and false if it is unselected.


RadioButton.GetPos Examples

RadioButton.GetPos

table RadioButton.GetPos (

string ObjectName )

Example 1

tbRadio = RadioButton.GetPos("RadioInstall");

Gets the current X, Y coordinates of the "RadioInstall" radiobutton object and stores the results in a table called "tbRadio." These values can be accessed by referencing tbRadio.X and tbRadio.Y.


RadioButton.GetProperties Examples

RadioButton.GetProperties

table RadioButton.GetProperties (

string ObjectName )

Example 1

tProperties = RadioButton.GetProperties("RadioButton1");

Gets the properties from the radiobutton object 'RadioButton1' and stores them in table 'tProperties'.


RadioButton.GetSize Examples

RadioButton.GetSize

table RadioButton.GetSize (

string ObjectName )

Example 1

radio_size = RadioButton.GetSize("Radio_Ob");

Gets the pixel dimensions of the "Radio_Ob" radiobutton object and stores the width and height values in the "radio_size" table. The dimensions can be accessed by referencing radio_size.Width and radio_size.Height.


RadioButton.GetText Examples

RadioButton.GetText

string RadioButton.GetText (

string ObjectName )

Example 1

-- Get the current text from the radiobutton
sCurrentText = RadioButton.GetText("RadioButton1");

-- Check to see if any errors occurred calling the RadioButton.GetText action.
-- If any error occurred, display the error message.
error = Application.GetLastError();
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
end

-- Print the current text to the debug window
Debug.Print("RadioButton Text: " .. sCurrentText .. "\r\n");

Gets the current text of the "RadioButton1" radiobutton object and outputs it to the debug window.


RadioButton.IsEnabled Examples

RadioButton.IsEnabled

boolean RadioButton.IsEnabled (

string ObjectName )

Example 1

enabled = RadioButton.IsEnabled("RadioButton1");

Stores true in a variable named "enabled" if the "RadioButton1" radiobutton object is enabled, and false if it is disabled.

Example 2

b2Enabled = RadioButton.IsEnabled("RadioButton2");

Checks whether the "RadioButton2" radiobutton object is enabled or disabled, and sets the "b2Enabled" variable to either true or false accordingly.

Tip: Starting a variable name with "b" is a technique that programmers use to help themselves remember that a variable contains a boolean value.


RadioButton.IsVisible Examples

RadioButton.IsVisible

boolean RadioButton.IsVisible (

string ObjectName )

Example 1

Visible = RadioButton.IsVisible("Radio1");

Checks whether the radiobutton object called "Radio1" is visible and stores true or false in a variable called "Visible."

Example 2

b5isVisible = RadioButton.IsVisible("Radio5");

Stores true in "b5isVisible" if the "Radio5" radiobutton object is visible.

Tip: Starting a variable name with "b" is a technique that programmers use to help themselves remember that a variable contains a boolean value.


RadioButton.SetChecked Examples

RadioButton.SetChecked

RadioButton.SetChecked (

string ObjectName,

boolean Checked = true )

Example 1

RadioButton.SetChecked("Radio Two", true);

Checks the radiobutton object named "Radio Two."

Example 2

RadioButton.SetChecked("RadioButton4", false);

Unchecks the radiobutton object named "RadioButton4."


RadioButton.SetEnabled Examples

RadioButton.SetEnabled

RadioButton.SetEnabled (

string ObjectName,

boolean Enabled = true )

Example 1

RadioButton.SetEnabled("Radio Two", true);

Enables the radiobutton object named "Radio Two."

Example 2

RadioButton.SetEnabled("RadioButton4", false);

Disables the radiobutton object named "RadioButton4."


RadioButton.SetPos Examples

RadioButton.SetPos

RadioButton.SetPos (

string ObjectName,

number X,

number Y )

Example 1

RadioButton.SetPos("New RadioButton", 100, 150);

Sets the "New RadioButton" radiobutton object's X coordinate to 100 pixels and the Y coordinate to 150.

Example 2

RadioButton.SetPos("Move Me", 0, 0);

Sets the "Move Me" radiobutton object's X coordinate to 0 and the Y coordinate to 0. The radiobutton object will be moved to the upper left hand corner of the page from its current position.


RadioButton.SetProperties Examples

RadioButton.SetProperties

RadioButton.SetProperties (

string ObjectName,

table Properties )

Example 1

-- Create a table containing items to change.
tbProperties = {};
tbProperties.Text = "Brand New Item Text";
tbProperties.Value = "MyNewData";

-- Set the properties of a radiobutton object.
RadioButton.SetProperties("RadioOne", tbProperties);

Sets the properties of the radiobutton object 'RadioOne' to the properties contained in the table 'tbProperties'.


RadioButton.SetSize Examples

RadioButton.SetSize

RadioButton.SetSize (

string ObjectName,

number Width,

number Height )

Example 1

RadioButton.SetSize("Grower", 300, 15);

Sets the "Grower" radiobutton object's width to 300 pixels and it's height to 15 pixels.

Example 2

RadioButton.SetSize("Expand", RadioButton.GetSize("Expand").Width + 200, RadioButton.GetSize("Expand").Height + 10);

Increases the "Expand" radiobutton object's current width by 200 pixels and it's current height by 10 pixels. The RadioButton.GetSize action is used here to get the current size of the radiobutton object.


RadioButton.SetText Examples

RadioButton.SetText

RadioButton.SetText (

string ObjectName,

string Text )

Example 1

RadioButton.SetText("RadioButtonOne", "New Radio Button Text");

Sets the text of the radiobutton object named "RadioButtonOne" to "New Radio Button Text."


RadioButton.SetVisible Examples

RadioButton.SetVisible

RadioButton.SetVisible (

string ObjectName,

boolean Visible = true )

Example 1

RadioButton.SetVisible("Radio3", true);

Makes the "Radio3" radiobutton object visible.

Example 2

RadioButton.SetVisible("Intro", false);

Hides the radiobutton object named "Intro."

Example 3

RadioButton.SetVisible("Custom12");

Makes the radiobutton object named "Custom12" visible.


Registry.CreateKey Examples

Registry.CreateKey

Registry.CreateKey (

number MainKey,

string SubKey )

Example 1

Registry.CreateKey (HKEY_LOCAL_MACHINE, "Software\\My Application");

Creates the sub key "My Application" in HKEY_LOCAL_MACHINE\Software.

Example 2

Registry.CreateKey (2, "Software\\My Application");

Creates the sub key "My Application" in HKEY_CURRENT_USER\Software.


Registry.DeleteKey Examples

Registry.DeleteKey

Registry.DeleteKey (

number MainKey,

string SubKey )

Example 1

Registry.DeleteKey (HKEY_LOCAL_MACHINE, "Software\\My Application");

Deletes the sub key "My Application" from HKEY_LOCAL_MACHINE\Software.

Example 2

Registry.DeleteKey (2, "Software\\My Application");

Deletes the sub key "My Application" from HKEY_CURRENT_USER\Software.


Registry.DeleteValue Examples

Registry.DeleteValue

Registry.DeleteValue (

number MainKey,

string SubKey,

string Value )

Example 1

Registry.DeleteValue (HKEY_LOCAL_MACHINE, "Software\\My Application", "InstallPath");

Deletes the value "InstallPath" from the sub key HKEY_LOCAL_MACHINE\Software\My Application.

Example 2

Registry.DeleteValue (2, "Software\\My Application", "InstallPath");

Deletes the value "InstallPath" from the sub key HKEY_CURRENT_USER\Software\My Application.


Registry.DoesKeyExist Examples

Registry.DoesKeyExist

boolean Registry.DoesKeyExist (

number MainKey,

string SubKey )

Example 1

is_there = Registry.DoesKeyExist (HKEY_LOCAL_MACHINE, "Software\\My Application");

Checks to see if the key "My Application" exists in HKEY_LOCAL_MACHINE\Software and returns either true or false in the variable "is_there."


Registry.GetAccess Examples

Registry.GetAccess

boolean Registry.GetAccess (

number MainKey,

string SubKey,

number Rights = ACCESS_ALL )

Example 1

access = Registry.GetAccess (HKEY_LOCAL_MACHINE, "Software\\My Application", ACCESS_WRITE);

Checks to see if the key "HKEY_LOCAL_MACHINE\Software\My Application" has write access and returns either true or false in the variable "access."


Registry.GetKeyNames Examples

Registry.GetKeyNames

table Registry.GetKeyNames (

number MainKey,

string SubKey )

Example 1

all_names = Registry.GetKeyNames (HKEY_LOCAL_MACHINE, "Software\\My Application");

Gets the names of all of the sub keys under "HKEY_LOCAL_MACHINE\Software\My Application" and stores them in a table called "all_names."


Registry.GetValue Examples

Registry.GetValue

string Registry.GetValue (

number MainKey,

string SubKey,

string Value,

boolean AutoExpand = true )

Example 1

reg_data = Registry.GetValue(HKEY_LOCAL_MACHINE, "Software\\My Application", "InstallPath", false);

Gets the data in the "InstallPath" value found in "HKEY_LOCAL_MACHINE\Software\My Application" and stores it in a variable called "reg_data."

Example 2

-- Set the data "Saved Value" in the user's Registry.
Registry.SetValue(HKEY_CURRENT_USER, "Software\\My Application", "MyValue", "Saved Value", REG_SZ);

-- Read the previously written value.
registry_value = Registry.GetValue(HKEY_CURRENT_USER, "Software\\My Application", "MyValue", true);

-- Display the value read from the Registry in a dialog.
Dialog.Message("Registry Data", "The value read from the Registry is "..registry_value..".");

Sets the "MyValue" value's data to the string "Saved Value". The value is located in "HKEY_CURRENT_USER\Software\My Application" and will have a value of REG_SZ. That value is then read back and displayed in a dialog.

Note: _ProgramFilesFolder is a built-in variable that contains the path to the user's Program Files folder.


Registry.GetValueNames Examples

Registry.GetValueNames

table Registry.GetValueNames (

number MainKey,

string SubKey )

Example 1

value_names = Registry.GetValueNames(HKEY_LOCAL_MACHINE, "Software\\My Application");

Gets all the value names within the sub key "HKEY_LOCAL_MACHINE\Software\My Application" and stores them in a table called "value_names."

Example 2

strRegValues = "";
bFound = false;

tbRegValues = Registry.GetValueNames(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer");
-- Check for error code.
error = Application.GetLastError();

if (tbRegValues) then
for index,value in pairs(tbRegValues) do
-- Create a string of the registry value names with each name on a new line.
strRegValues = strRegValues..value.."\r\n";
if (String.CompareNoCase(value,"Logon User Name") == 0) then
bFound = true;
end
end
else
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);
end

-- Set the string for the found key.
if (bFound) then
strRegValues = strRegValues.."\r\n".."The key 'Logon User Name' was found.";
else
strRegValues = strRegValues.."\r\n".."The key 'Logon User Name' was not found.";
end

-- Show a dialog with the values and whether the key was found.
Dialog.Message("RegValues", strRegValues, MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);

Gets all the value names within the sub key "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer" and stores them in a table called "tbRegValues." It then stores each name in a string and determines whether or not the key "Logon User Name" was found. The results are shown in a dialog message.


Registry.GetValueType Examples

Registry.GetValueType

number Registry.GetValueType (

number MainKey,

string SubKey,

string Value )

Example 1

value_type = Registry.GetValueType (HKEY_LOCAL_MACHINE, "Software\\My Application", "InstallPath");

Gets the type of data stored in the "InstallPath" value located at "HKEY_LOCAL_MACHINE\Software\My Application" and stores the corresponding numeric constant in value_type. If the "InstallPath" value was of type REG_SZ, the number 1 would be returned.

You could test the return value with an if statement, like this:

if value_type == REG_SZ then

-- only do this part if the InstallPath Registry value
-- at HKEY_LOCAL_MACHINE\Software\My Application
-- is of type REG_SZ (a string)

end


Registry.SetValue Examples

Registry.SetValue

Registry.SetValue (

number MainKey,

string SubKey,

string Value,

string Data,

number Type = REG_SZ )

Example 1

Registry.SetValue (HKEY_LOCAL_MACHINE, "Software\\My Application", "InstallPath", _ProgramFilesFolder .. "\\My Application", 1);

Sets the "InstallPath" value's data to the "My Application" folder's path located in the user's Program Files directory (normally C:\ProgramFiles\My Application). The value is located in "HKEY_LOCAL_MACHINE\Software\My Application" and will have a value of REG_SZ.

Note: _ProgramFilesFolder is a built-in variable that contains the path to the user's Program Files folder.

Example 2

-- Set the data "Saved Value" in the user's Registry.
Registry.SetValue(HKEY_CURRENT_USER, "Software\\My Application", "MyValue", "Saved Value", REG_SZ);

-- Read the previously written value.
registry_value = Registry.GetValue(HKEY_CURRENT_USER, "Software\\My Application", "MyValue", true);

-- Display the value read from the Registry in a dialog.
Dialog.Message("Registry Data", "The value read from the Registry is "..registry_value..".");

Sets the "MyValue" value's data to the string "Saved Value". The value is located in "HKEY_CURRENT_USER\Software\My Application" and will have a value of REG_SZ. That value is then read back and displayed in a dialog.

Note: _ProgramFilesFolder is a built-in variable that contains the path to the user's Program Files folder.


RichText.CanPaste Examples

RichText.CanPaste

boolean RichText.CanPaste (

string ObjectName )

Example 1

bCanPaste = RichText.CanPaste("RichText1");

Determines whether or not the contents of the clipboard can be pasted into the richtext object named "RichText1" and stores the result in the variable "bCanPaste."


RichText.CanUndo Examples

RichText.CanUndo

boolean RichText.CanUndo (

string ObjectName )

Example 1

bCanUndo = RichText.CanUndo("RichText1");

Determines whether or not the last editing operation in the richtext object named "RichText1" can be undone and stores the result in the variable "bCanUndo."


RichText.Copy Examples

RichText.Copy

RichText.Copy (

string ObjectName )

Example 1

RichText.Copy("RichText1");

Copies the current selection in a richtext object named "RichText1" to the clipboard.


RichText.Cut Examples

RichText.Cut

RichText.Cut (

string ObjectName )

Example 1

RichText.Cut("RichText1");

Cuts the current selection in a richtext object named "RichText1" to the clipboard.


RichText.Delete Examples

RichText.Delete

RichText.Delete (

string ObjectName )

Example 1

RichText.Delete("RichText1");

Deletes the currently selected text in a richtext object named "RichText1."


RichText.EmptyUndoBuffer Examples

RichText.EmptyUndoBuffer

RichText.EmptyUndoBuffer (

string ObjectName )

Example 1

RichText.EmptyUndoBuffer("RichText1");

Empties the undo buffer for the richtext object named "RichText1."


RichText.FindText Examples

RichText.FindText

table RichText.FindText (

string ObjectName,

string SearchFor,

number Start = 1,

number End = -1,

boolean CaseSensitive = false,

boolean WholeWord = false )

Example 1

-- Search for the text "apple".
tbSearchResult = RichText.FindText("RichText1", "apple", 1, -1, false, false);

if (tbSearchResult) then
strMessage = "Apple was found starting at position "..tbSearchResult.Start;
strMessage = strMessage.." and ending at position "..tbSearchResult.End;
Dialog.Message("Search Result", strMessage);
else
Dialog.Message("Search Results", "Apple was not found in the search.");
end

Searches the entire text in the richtext object named "RichText1" for the text "apple" and shows the indexes where it was found in a dialog message. If it was not found, a notification message is also shown.


RichText.GetLine Examples

RichText.GetLine

string RichText.GetLine (

string ObjectName,

number Line = 1 )

Example 1

strText = RichText.GetLine("RichText1", 2);

Gets the text on line 2 in the richtext object named "RichText1" and stores the result in the variable "strText."


RichText.GetParagraphFormat Examples

RichText.GetParagraphFormat

table RichText.GetParagraphFormat (

string ObjectName,

boolean OnlyConsistentAttributes = true )

Example 1

tbFormat = RichText.GetParagraphFormat("RichText1", true);

if (tbFormat) then
if (tbFormat.Bulleted) then
Dialog.Message("Format", "The text is bulleted.");
else
Dialog.Message("Format", "The text is not bulleted.");
end
end

Determines if the selection text in the richtext object named "RichText1" is bulleted and returns the result in a dialog message.


RichText.GetPos Examples

RichText.GetPos

table RichText.GetPos (

string ObjectName )

Example 1

tbRichText = RichText.GetPos("RichText1");

Gets the current X, Y coordinates of the "RichText1" richtext object and stores the results in a table called "tbRichText." These values can be accessed by referencing tbRichText.X and tbRichText.Y.


RichText.GetProperties Examples

RichText.GetProperties

table RichText.GetProperties (

string ObjectName )

Example 1

tbProperties = RichText.GetProperties("RichText1");

if (tbProperties) then
Dialog.Message("RichText text", tbProperties.Text);
end

Gets the properties of the richtext object named "RichText1" and shows its text referenced by its "Text" table item, in a dialog message.


RichText.GetSelection Examples

RichText.GetSelection

table RichText.GetSelection (

string ObjectName )

Example 1

selection_point = RichText.GetSelection("Information");

Gets the indexes of the selected text in the "Information" richtext object and stores the start and end points in the "selection_point" table. These values can be accessed by referencing selection_point.Start and selection_point.End.


RichText.GetSelectionFormat Examples

RichText.GetSelectionFormat

table RichText.GetSelectionFormat (

string ObjectName,

boolean OnlyConsistentAttributes = true )

Example 1

tbFormat = RichText.GetSelectionFormat("RichText1", true);

if (tbFormat) then
if (tbFormat.Bold) then
Dialog.Message("Format", "The selected characters are all bold.");
else
Dialog.Message("Format", "The selected characters are not all bold.");
end
end

Determines if the selected characters in the "RichText1" richtext object are all bold and shows the result in a dialog message. This is done using the RichText.GetSelectionFormat action and checking the "Bold" table item.


RichText.GetSize Examples

RichText.GetSize

table RichText.GetSize (

string ObjectName )

Example 1

rt_size = RichText.GetSize("RichText_Ob");

Gets the pixel dimensions of the "RichText_Ob" richtext object and stores the width and height values in the "rt_size" table. The dimensions can be accessed by referencing rt_size.Width and rt_size.Height.


RichText.GetText Examples

RichText.GetText

string RichText.GetText (

string ObjectName,

boolean RawRTF = true )

Example 1

raw_object_text = RichText.GetText("RichText5", true);

Gets the raw RTF text from the richtext object named "RichText5" and stores it in a variable called "raw_object_text."

Example 2

object_text = RichText.GetText("RichText5", false);

Gets the displayed text in the richtext object named "RichText5" and stores it in the variable "object_text."


RichText.GetTextLength Examples

RichText.GetTextLength

number RichText.GetTextLength (

string ObjectName )

Example 1

nLength = DriveRichText.GetTextLength("RichText_Ob");

Gets the length of the text in the richtext object named "RichText_Ob" and stores it in the variable "nLength."


RichText.IsEnabled Examples

RichText.IsEnabled

boolean RichText.IsEnabled (

string ObjectName )

Example 1

enabled = RichText.IsEnabled("RichText1");

Stores true in a variable named "enabled" if the "RichText1" richtext object is enabled, and false if it is disabled.

Example 2

b2Enabled = RichText.IsEnabled("RichText2");

Checks whether the "RichText2" richtext object is enabled or disabled, and sets the "b2Enabled" variable to either true or false accordingly.

Tip: Starting a variable name with "b" is a technique that programmers use to help themselves remember that a variable contains a boolean value.


RichText.IsVisible Examples

RichText.IsVisible

boolean RichText.IsVisible (

string ObjectName )

Example 1

Visible = RichText.IsVisible("RichText1");

Checks whether the richtext object called "RichText1" is visible and stores true or false in a variable called "Visible."

Example 2

b5isVisible = RichText.IsVisible("RichText5");

Stores true in "b5isVisible" if the "RichText5" richtext object is visible.

Tip: Starting a variable name with "b" is a technique that programmers use to help themselves remember that a variable contains a boolean value.


RichText.LoadFromFile Examples

RichText.LoadFromFile

RichText.LoadFromFile (

string ObjectName,

string Filename )

Example 1

-- Load the license text document.
RichText.LoadFromFile("RichText1", "AutoPlay\\Docs\\License.rtf");

-- Test for error
error = Application.GetLastError();
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);
end

Loads the RTF file "License.rtf" into the "RichText1" richtext object and displays an error if encountered.


RichText.Paste Examples

RichText.Paste

RichText.Paste (

string ObjectName )

Example 1

-- Check if the clipboard content can be pasted.
if (RichText.CanPaste("RichText1")) then
-- Paste the clipboard contents into the object.
RichText.Paste("RichText1");
end

Checks if the clipboard contents can be pasted into the object using the RichText.CanPaste action, and then pastes it into the richtext object named "RichText1."


RichText.SaveToFile Examples

RichText.SaveToFile

RichText.SaveToFile (

string ObjectName,

string Filename )

Example 1

-- Saves the modified license text document.
RichText.SaveToFile("RichText1", Shell.GetFolder(SHF_MYDOCUMENTS).."\\License.rtf");

-- Test for error
error = Application.GetLastError();
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);
end

Saves the text in the "RichText1" richtext object to an RTF file called "License.rtf" in the 'My Documents' folder.


RichText.ScrollLines Examples

RichText.ScrollLines

RichText.ScrollLines (

string ObjectName,

number Lines )

Example 1

RichText.ScrollLines("RichText1", 10);

Scrolls the "RichText1" richtext object down 10 lines.

Example 2

RichText.ScrollLines("RichText1", -10);

Scrolls the "RichText1" richtext object up 10 lines.


RichText.ScrollToLine Examples

RichText.ScrollToLine

RichText.ScrollToLine (

string ObjectName,

number Line )

Example 1

RichText.ScrollToLine("RichText1", 10);

Scrolls to line 10 in the richtext object named "RichText1."


RichText.SetEnabled Examples

RichText.SetEnabled

RichText.SetEnabled (

string ObjectName,

boolean Enabled = true )

Example 1

RichText.SetEnabled("RichText Two", true);

Enables the richtext object named "RichText Two."

Example 2

RichText.SetEnabled("RichText4", false);

Disables the richtext object named "RichText4."


RichText.SetParagraphFormat Examples

RichText.SetParagraphFormat

RichText.SetParagraphFormat (

string ObjectName,

table ParagraphFormat )

Example 1

-- Create the formatting table.
tbFormat = {};
tbFormat.Bulleted = true;

-- Set the formatting to bulleted.
RichText.SetParagraphFormat("RichText1", tbFormat);

Sets the current paragraph selection to bulleted in the richtext object named "RichText1."


RichText.SetPos Examples

RichText.SetPos

RichText.SetPos (

string ObjectName,

number X,

number Y )

Example 1

RichText.SetPos("New RichText", 100, 150);

Sets the "New RichText" richtext object's X coordinate to 100 pixels and the Y coordinate to 150.

Example 2

RichText.SetPos("Move Me", 0, 0);

Sets the "Move Me" richtext object's X coordinate to 0 and the Y coordinate to 0. The richtext object will be moved to the upper left hand corner of the page from its current position.


RichText.SetProperties Examples

RichText.SetProperties

RichText.SetProperties (

string ObjectName,

table Properties )

Example 1

-- Create a table to set the properties.
tbProperties = {ReadOnly=false};

-- Set the object to not be read-only
RichText.SetProperties("RichText1", tbProperties);

Set the richtext object called "RichText1" to not be read-only.


RichText.SetSelection Examples

RichText.SetSelection

RichText.SetSelection (

string ObjectName,

number Start,

number End )

Example 1

RichText.SetSelection("RichText1", 1, -1);

Selects all of the text in the richtext object named "RichText1."


RichText.SetSelectionFormat Examples

RichText.SetSelectionFormat

RichText.SetSelectionFormat (

string ObjectName,

table CharacterFormat,

boolean ApplyToWord = false )

Example 1

-- Create a table for the formatting.
tbFormat = {Bold=true};

-- Set the selected text to bold.
RichText.SetSelectionFormat("RichText1", tbFormat, false);

Sets the selected text in the "RichText1" richtext object to Bold.


RichText.SetSize Examples

RichText.SetSize

RichText.SetSize (

string ObjectName,

number Width,

number Height )

Example 1

RichText.SetSize("Grower", 100, 150);

Sets the "Grower" richtext object's width to 100 pixels and it's height to 150 pixels.

Example 2

RichText.SetSize("Expand", RichText.GetSize("Expand").Width + 200, RichText.GetSize("Expand").Height + 100);

Increases the "Expand" richtext object's current width by 200 pixels and it's current height by 100 pixels. The RichText.GetSize action is used here to get the current size of the richtext object.


RichText.SetText Examples

RichText.SetText

RichText.SetText (

string ObjectName,

string Text,

boolean RawRTF = true )

Example 1

-- Get the raw RTF text from "RichText1".
raw_object_text1 = RichText.GetText("RichText1", true);

-- Set "RichText2" object text to the first objects.
RichText.SetText("RichText2", raw_object_text1, true);

Gets the raw RTF text from the "RichText1" richtext object, and sets a second object called "RichText2" to its text from the variable "raw_object_text1".


RichText.SetVisible Examples

RichText.SetVisible

RichText.SetVisible (

string ObjectName,

boolean Visible = true )

Example 1

RichText.SetVisible("RichText3", true);

Makes the "RichText3" richtext object visible.

Example 2

RichText.SetVisible("Intro", false);

Hides the richtext object named "Intro."

Example 3

RichText.SetVisible("Custom12");

Makes the richtext object named "Custom12" visible.


RichText.Undo Examples

RichText.Undo

RichText.Undo (

string ObjectName )

Example 1

-- Check if an undo can be performed.
if (RichText.CanUndo("RichText1")) then
-- Undo the last operation.
RichText.Undo("RichText1");
end

Determines if an undo can be performed using the RichText.CanUndo action, and performs an undo on the last operation for the "RichText1" object.


Service.Continue Examples

Service.Continue

Service.Continue (

string DisplayName,

string KeyName = "" )

Example 1

Service.Continue("Service1", "");

Continues the service "Service1".

Example 2

-- Specify the antivirus service display name
VirusScannerServiceName = "AntiVirus";

-- Pause the virus scanner
Service.Pause(VirusScannerServiceName, "");

-- Run the setup which cannot be run while a virus scanner is active
File.Run(_SourceFolder.."\\setup2.exe", "", "", SW_SHOWNORMAL, true);

-- Resume the virus scanner
Service.Continue(VirusScannerServiceName, "");

Pauses the specified virus scanner service before launching a separate setup file.

Example 3

-- Specify the service to query
ServiceToQueryDisplay = "Service1";
ServiceToQueryKey = "Boom";

-- Query the specified service
QueryResult = Service.Query(ServiceToQueryDisplay, ServiceToQueryKey);
if not (QueryResult == SERVICE_RUNNING) then
-- Set err to 0
err = 0;
-- The service is not running.
if (QueryResult == SERVICE_PAUSED) then
-- The service is paused, try continue
Service.Continue(ServiceToQueryDisplay, ServiceToQueryKey);
err = Application.GetLastError();
elseif (QueryResult == SERVICE_STOPPED) then
-- The service is stopped, try start
Service.Start(ServiceToQueryDisplay, ServiceToQueryKey, nil);
err = Application.GetLastError();
end
if not (err == 0) then
-- An error happened with Continue/Start
Dialog.Message("Error (" .. err .. ")", "Unable to start/restart the service.\r\nService is not running");
else
Dialog.Message("PERFECTION!", "The service was started/restarted fine.");
end
else
-- The service is running
Dialog.Message("PERFECTION!", "The service is running fine.");
end

Queries the specified service. If it is running, a dialog is displayed. If it is not running, it is restarted and either a successful or error dialog is displayed.


Service.Create Examples

Service.Create

Service.Create (

string Filename,

string DisplayName = "Service1",

string KeyName = "",

number ServiceType = SERVICE_WIN32_OWN_PROCESS,

boolean AllowDesktopInteraction = false,

number StartType = SERVICE_DEMAND_START,

number ErrorControl = SERVICE_ERROR_NORMAL,

string LoadOrderGroup = "",

number GroupTag = nil,

table Dependencies = nil,

string ServiceStartName = "",

string Password = "" )

Example 1

-- Create a Service1.exe service
Service.Create("C:\\WINDOWS\\Service1.exe", "Service1", "Service1", SERVICE_WIN32_OWN_PROCESS, true, SERVICE_DEMAND_START, SERVICE_ERROR_NORMAL, "", "", nil, "", "");

-- Get the last error (0 == success)
err = Application.GetLastError();

if err ~= 0 then
-- If there was an error, output to user
Dialog.Message(err, _tblErrorMessages[err]);
end

Creates a service named Service1 using Service1.exe from C:\WINDOWS.


Service.Delete Examples

Service.Delete

Service.Delete (

string DisplayName,

string KeyName = "" )

Example 1

Service.Delete("Service1", "Service1");

Removes 'Service1' from the user's system.


Service.Pause Examples

Service.Pause

Service.Pause (

string DisplayName,

string KeyName = "" )

Example 1

Service.Pause("Service1", "");

Pauses the service "Service1".

Example 2

-- Specify the antivirus service display name
VirusScannerServiceName = "AntiVirus";

-- Pause the virus scanner
Service.Pause(VirusScannerServiceName, "");

-- Run the setup which cannot be run while a virus scanner is active
File.Run(_SourceFolder.."\\setup2.exe"), "", "", SW_SHOWNORMAL, true);

-- Resume the virus scanner
Service.Continue(VirusScannerServiceName, "");

Pauses the specified virus scanner service before launching a separate setup file.


Service.Query Examples

Service.Query

number Service.Query (

string DisplayName,

string KeyName = "" )

Example 1

result = Service.Query("Service1", "");

Queries the service with display name 'Service1' and stores the result in variable 'result'.

Example 2

-- Specify the service to query
ServiceToQueryDisplay = "Service1";
ServiceToQueryKey = "Boom";

-- Query the specified service
QueryResult = Service.Query(ServiceToQueryDisplay, ServiceToQueryKey);
if not (QueryResult == SERVICE_RUNNING) then
-- Set err to 0
err = 0;
-- The service is not running.
if (QueryResult == SERVICE_PAUSED) then
-- The service is paused, try continue
Service.Continue(ServiceToQueryDisplay, ServiceToQueryKey);
err = Application.GetLastError();
elseif (QueryResult == SERVICE_STOPPED) then
-- The service is stopped, try start
Service.Start(ServiceToQueryDisplay, ServiceToQueryKey, nil);
err = Application.GetLastError();
end
if not (err == 0) then
-- An error happened with Continue/Start
Dialog.Message("Error (" .. err .. ")", "Unable to start/restart the service.\r\nService is not running");
else
Dialog.Message("PERFECTION!", "The service was started/restarted fine.");
end
else
-- The service is running
Dialog.Message("PERFECTION!", "The service is running fine.");
end

Queries the specified service. If it is running, a dialog is displayed. If it is not running, it is restarted and either a successful or error dialog is displayed.


Service.Start Examples

Service.Start

Service.Start (

string DisplayName,

string KeyName = "",

table Arguments = nil )

Example 1

Service.Start("StartMe", "", nil);

Starts the service "StartMe".

Example 2

-- specify the service's display name and location
ServiceDisplayName = "Service1";
ServiceFilePath = "C:\\WINDOWS\\SERVICE1.EXE";

-- Stop the specified service
Service.Stop(ServiceDisplayName, "");

-- Copy the replacement service exe
File.Copy(_SourceFolder.."\\SERVICES\\SERVICE1.EX_"), ServiceFilePath, false, true, false, true, nil);

-- Start the service
Service.Start(ServiceDisplayName, "", nil);

Stops the specified service, replaces the exe file, and starts the service.

Example 3

-- Specify the service to query
ServiceToQueryDisplay = "Service1";
ServiceToQueryKey = "Boom";

-- Query the specified service
QueryResult = Service.Query(ServiceToQueryDisplay, ServiceToQueryKey);
if not (QueryResult == SERVICE_RUNNING) then
-- Set err to 0
err = 0;
-- The service is not running.
if (QueryResult == SERVICE_PAUSED) then
-- The service is paused, try continue
Service.Continue(ServiceToQueryDisplay, ServiceToQueryKey);
err = Application.GetLastError();
elseif (QueryResult == SERVICE_STOPPED) then
-- The service is stopped, try start
Service.Start(ServiceToQueryDisplay, ServiceToQueryKey, nil);
err = Application.GetLastError();
end
if not (err == 0) then
-- An error happened with Continue/Start
Dialog.Message("Error (" .. err .. ")", "Unable to start/restart the service.\r\nService is not running");
else
Dialog.Message("PERFECTION!", "The service was started/restarted fine.");
end
else
-- The service is running
Dialog.Message("PERFECTION!", "The service is running fine.");
end

Queries the specified service. If it is running, a dialog is displayed. If it is not running, it is restarted and either a successful or error dialog is displayed.


Service.Stop Examples

Service.Stop

Service.Stop (

string DisplayName,

string KeyName = "",

number WaitTime = 0 )

Example 1

Service.Stop ("Freeze", "");

Stops the service "Freeze".

Example 2

-- specify the service's display name and location
ServiceDisplayName = "Service1";
ServiceFilePath = "C:\\WINDOWS\\SERVICE1.EXE";

-- Stop the specified service
Service.Stop(ServiceDisplayName, "", 5);

-- Copy the replacement service exe
File.Copy(_SourceFolder.."\\SERVICES\\SERVICE1.EX_"), ServiceFilePath, false, true, false, true, nil);

-- Start the service
Service.Start(ServiceDisplayName, "", nil);

Stops the specified service, replaces the exe file, and starts the service.


Shell.CreateShortcut Examples

Shell.CreateShortcut

Shell.CreateShortcut (

string Folder,

string Description,

string Target,

string CmdLine = "",

string WorkingFolder = "",

string IconPath = "",

number IconIndex = 0,

number WindowMode = SW_SHOWNORMAL,

table HotKey = nil,

string Comment = "",

number StartPinOption = START_OPTION_DEFAULT )

Example 1

Shell.CreateShortcut(_DesktopFolder, "My Shortcut", "C:\\Program Files\\MyApp\\app.exe", "", "", "C:\\Program Files\\MyApp\\myicon.ico", 0, SW_MAXIMIZE, nil);

Creates a shortcut on the user's Desktop with the "myicon.ico" file icon and the label "My Shortcut." The shortcut is set to point to the file "app.exe" and will launch it in "maximized" mode.

Note: _DesktopFolder is a built-in variable that contains the path to the user's "Desktop" folder.

Example 2

Shell.CreateShortcut(_DesktopFolder, "My Shortcut", "C:\\Program Files\\MyApp\\app.exe", "", "", "C:\\Program Files\\MyApp\\myicon.ico", 0, SW_MAXIMIZE, {shift=true,ctrl=true,keycode=72});

Creates a shortcut on the user's Desktop with the "myicon.ico" file icon and the label "My Shortcut." The shortcut is set to point to the file "app.exe" and will launch it in "maximized" mode. A hotkey is also assigned to the shortcut so that when you hold down the shift key, the alt key and press the "h" key (Virtual Key Code 72) the application pointed to by the shortcut will be launched.

Note: _DesktopFolder is a built-in variable that contains the path to the user's "Desktop" folder.


Shell.DeleteShortcut Examples

Shell.DeleteShortcut

Shell.DeleteShortcut (

string Folder,

string Description )

Example 1

Shell.DeleteShortcut(_DesktopFolder, "My Shortcut");

Removes the shortcut from the user's Desktop, whose name (description) is "My Shortcut."

Note: _DesktopFolder is a built-in variable that contains the path to the user's "Desktop" folder.


Shell.Execute Examples

Shell.Execute

number Shell.Execute (

string Filename,

string Verb = "open",

string Arguments = "",

string WorkingFolder = "",

number WindowMode = SW_SHOWNORMAL,

boolean WaitForReturn = false )

Example 1

MyDocs = Shell.GetFolder(SHF_MYDOCUMENTS); -- Gets the path to the user's My Documents folder
Shell.Execute(MyDocs .. "\\CompanyInfo.htm", "edit", "", "", SW_SHOWNORMAL);

The first line uses the Shell.GetFolder action to get the path to the user's My Documents folder and stores it in the variable "MyDocs." The file "CompanyInfo.htm" is then opened using the "edit" verb of the Shell.Execute action. This will open the file in the user's associated editor for .htm files.


Shell.GetFolder Examples

Shell.GetFolder

string Shell.GetFolder (

number Type )

Example 1

Desktop_Folder = Shell.GetFolder(SHF_DESKTOP_COMMON);

Gets the path to the user's Desktop folder and stores the string in the variable "Desktop_Folder."

Example 2

My_Docs = Shell.GetFolder(SHF_MYDOCUMENTS);

Gets the path to the user's "My Documents" folder and stores the string in the variable "My_Docs."

Example 3

My_Docs = Shell.GetFolder(5);

Gets the path to the user's "My Documents" folder and stores the string in the variable "My_Docs." Example 2 used the SHF_MYDOCUMENTS constant, however this example shows that you can also use it's numeric value.

Example 4

-- Get the path to the user's My Documents folder.
myDocs = Shell.GetFolder(SHF_MYDOCUMENTS);

-- Open the user's My Documents folder in an explore window.
File.ExploreFolder(myDocs, SW_SHOWNORMAL);

Gets the path to the user's "My Documents" folder and stores the string in the variable "myDocs." The folder is then opened in a explore window using the File.ExploreFolder action.


SlideShow.AddSlide Examples

SlideShow.AddSlide

number SlideShow.AddSlide (

string ObjectName,

string FilePath,

number Position = -1 )

Example 1

nPos = SlideShow.AddSlide("SlideShow1", "AutoPlay\\Images\\new_image.png", -1);

Adds the slide image "new_image.png" to the slideshow object called "SlideShow1" at the end of the list, and stores its insertion position in the variable "nPos."

Example 2

nPos = SlideShow.AddSlide("SlideShow1", "AutoPlay\\Images\\new_image2.png", 5);

Adds the slide image "new_image2.png" to the slideshow object called "SlideShow1" at position 5, and stores its insertion position in the variable "nPos."


SlideShow.DeleteSlide Examples

SlideShow.DeleteSlide

SlideShow.DeleteSlide (

string ObjectName,

number Position )

Example 1

SlideShow.DeleteSlide("SlideShow1", 8);

Removes the slide image at position 8 from the slideshow object called "SlideShow1."

Example 2

SlideShow.DeleteSlide("SlideShow1", -1);

Removes all slide images from the slideshow object called "SlideShow1."


SlideShow.FillFromFolder Examples

SlideShow.FillFromFolder

SlideShow.FillFromFolder (

string ObjectName,

string FolderPath,

boolean EmptyFirst = false,

boolean Recurse = false )

Example 1

SlideShow.FillFromFolder("SlideShow1", "AutoPlay\\Docs\\CustomSlides", true, false);

Fills the "SlideShow1" slideshow object with all slides found in the "CustomSlides" folder. Before adding the slides, the object is emptied.

Example 2

SlideShow.FillFromFolder("UserShow", Shell.GetFolder(SHF_MYDOCUMENTS), false, true);

Adds all slides recursively found in the user's 'My Documents' folder to the slideshow object named "UserShow."


SlideShow.GetCurrentSlide Examples

SlideShow.GetCurrentSlide

number SlideShow.GetCurrentSlide (

string ObjectName )

Example 1

nCurrent = SlideShow.GetCurrentSlide("SlideShow1");

Gets the index of the current slide in the slideshow object named "SlideShow1" and stores the result in the variable "nCurrent."


SlideShow.GetImagePath Examples

SlideShow.GetImagePath

string SlideShow.GetImagePath (

string ObjectName,

number Position )

Example 1

-- Get the path to slide 5.
path = SlideShow.GetImagePath("SlideShow1", 5);

-- Show the path in a dialog message.
Dialog.Message("Slide Path", path);

Gets the path to the slide image at index 5 in the "SlideShow1" slideshow object and shows its value in a dialog message.


SlideShow.GetPos Examples

SlideShow.GetPos

table SlideShow.GetPos (

string ObjectName )

Example 1

tbPos = SlideShow.GetPos("SlideShow1");

Gets the current X, Y coordinates of the "SlideShow1" slideshow object and stores the results in a table called "tbPos." These values can be accessed by referencing tbPos.X and tbPos.Y.


SlideShow.GetProperties Examples

SlideShow.GetProperties

table SlideShow.GetProperties (

string ObjectName )

Example 1

tProperties = SlideShow.GetProperties("SlideShow1");

Gets the properties from the slideshow object 'SlideShow1' and stores them in table 'tProperties'.

Example 2

sFiles = "";
tbProps = SlideShow.GetProperties("SlideShow1");

if (tbProps) then
if (tbProps.ImageFiles) then
for index, path in pairs(tbProps.ImageFiles) do
sFiles = sFiles..path.."\r\n";
end
Dialog.Message("Image Files", sFiles);
end
end

Gets the properties from the slideshow object 'SlideShow1' and stores them in table 'tbProps'. Then a dialog message is shown containing the paths of all of the image files in the object.


SlideShow.GetSize Examples

SlideShow.GetSize

table SlideShow.GetSize (

string ObjectName )

Example 1

slideshow_size = SlideShow.GetSize("SlideShow_Ob");

Gets the pixel dimensions of the "SlideShow_Ob" slideshow object and stores the width and height values in the "slideshow_size" table. The dimensions can be accessed by referencing slideshow_size.Width and slideshow_size.Height.


SlideShow.GetSlideCount Examples

SlideShow.GetSlideCount

number SlideShow.GetSlideCount (

string ObjectName )

Example 1

nTotal = SlideShow.GetSlideCount("SlideShow1");

Gets the number of slides in the "SlideShow1" slideshow object and stores the result in a variable called "nTotal."


SlideShow.GoToSlide Examples

SlideShow.GoToSlide

SlideShow.GoToSlide (

string ObjectName,

number Position )

Example 1

SlideShow.GoToSlide("SlideShow1", 10);

Navigates to the slide at position 10 in the slideshow object named "SlideShow1."


SlideShow.IsEnabled Examples

SlideShow.IsEnabled

boolean SlideShow.IsEnabled (

string ObjectName )

Example 1

enabled = SlideShow.IsEnabled("SlideShow1");

Stores true in a variable named "enabled" if the "SlideShow1" slideshow object is enabled, and false if it is disabled.

Example 2

b2Enabled = SlideShow.IsEnabled("SlideShow2");

Checks whether the "SlideShow2" slideshow object is enabled or disabled, and sets the "b2Enabled" variable to either true or false accordingly.

Tip: Starting a variable name with "b" is a technique that programmers use to help themselves remember that a variable contains a boolean value.


SlideShow.IsVisible Examples

SlideShow.IsVisible

boolean SlideShow.IsVisible (

string ObjectName )

Example 1

Visible = SlideShow.IsVisible("SlideShow1");

Checks whether the slideshow object called "SlideShow1" is visible and stores true or false in a variable called "Visible."

Example 2

b5isVisible = SlideShow.IsVisible("SlideShow5");

Stores true in "b5isVisible" if the "SlideShow5" slideshow object is visible.

Tip: Starting a variable name with "b" is a technique that programmers use to help themselves remember that a variable contains a boolean value.


SlideShow.Navigate Examples

SlideShow.Navigate

SlideShow.Navigate (

string ObjectName,

number Position )

Example 1

SlideShow.Navigate("SlideShow1", SLIDESHOW_NEXT);

Navigates to the next slide in the "SlideShow1" slideshow object.


SlideShow.Pause Examples

SlideShow.Pause

SlideShow.Pause (

string ObjectName )

Example 1

SlideShow.Pause("SlideShow1");

Pauses the slideshow object named "SlideShow1."


SlideShow.Play Examples

SlideShow.Play

SlideShow.Play (

string ObjectName )

Example 1

SlideShow.Play("SlideShow1");

Plays the slideshow object named "SlideShow1."


SlideShow.SetEnabled Examples

SlideShow.SetEnabled

SlideShow.SetEnabled (

string ObjectName,

boolean Enabled = true )

Example 1

SlideShow.SetEnabled("SlideShow Two", true);

Enables the slideshow object named "SlideShow Two."

Example 2

SlideShow.SetEnabled("SlideShow4", false);

Disables the slideshow object named "SlideShow4."


SlideShow.SetPos Examples

SlideShow.SetPos

SlideShow.SetPos (

string ObjectName,

number X,

number Y )

Example 1

SlideShow.SetPos("New SlideShow", 100, 150);

Sets the "New SlideShow" slideshow object's X coordinate to 100 pixels and the Y coordinate to 150.

Example 2

SlideShow.SetPos("Move Me", 0, 0);

Sets the "Move Me" slideshow object's X coordinate to 0 and the Y coordinate to 0. The slideshow object will be moved to the upper left hand corner of the page from its current position.


SlideShow.SetProperties Examples

SlideShow.SetProperties

SlideShow.SetProperties (

string ObjectName,

table Properties )

Example 1

-- Create a table of the properties you want to set.
tbProps = {};
tbProps.Loop=true;
tbProps.Transitions=true;

-- Set the object's properties.
SlideShow.SetProperties("SlideShow1",tbProps);

Sets the "SlideShow1" slideshow object to loop and to have a transition effect between slides.


SlideShow.SetSize Examples

SlideShow.SetSize

SlideShow.SetSize (

string ObjectName,

number Width,

number Height )

Example 1

SlideShow.SetSize("Grower", 400, 350);

Sets the "Grower" slideshow object's width to 400 pixels and it's height to 350 pixels.

Example 2

SlideShow.SetSize("Expand", SlideShow.GetSize("Expand").Width + 200, SlideShow.GetSize("Expand").Height + 100);

Increases the "Expand" slideshow object's current width by 200 pixels and it's current height by 100 pixels. The SlideShow.GetSize action is used here to get the current size of the slideshow object.


SlideShow.SetVisible Examples

SlideShow.SetVisible

SlideShow.SetVisible (

string ObjectName,

boolean Visible = true )

Example 1

SlideShow.SetVisible("SlideShow3", true);

Makes the "SlideShow3" slideshow object visible.

Example 2

SlideShow.SetVisible("Intro", false);

Hides the slideshow object named "Intro."

Example 3

SlideShow.SetVisible("Custom12");

Makes the slideshow object named "Custom12" visible.


Status Dialog

Overview

The Status Dialog in AutoPlay Media Studio is a Windows dialog containing a progress meter and some optional elements such as a cancel button, icon, title bar text and status text. It was designed to allow you to optionally display a graphical representation of the progress made in an Autoplay action or any other element of your project. An example of the dialog can be seen below:

There are several actions in AutoPlay Media Studio that automatically use this dialog to show their progress (if you wish to show it):

File.Copy

File.Delete

File.Find

File.Install

File.Move

Folder.DeleteTree

Folder.Find

HTTP.Download

HTTP.DownloadSecure

HTTP.GetFileSize

HTTP.GetFileSizeSecure

Zip.Add

Zip.Extract

Each action above automatically sends progress information to the Status Dialog in order to display it's meter progress. By default, the Status Dialog is hidden, but you can show it by preceding the action with a StatusDlg.Show action and following it with a StatusDlg.Hide action. The StatusDlg.Show action is used to show the Status Dialog and the StatusDlg.Hide action is used to hide it, usually after the action has completed. You can find other available actions in the StatusDlg action category.

For this group of actions, this functionality is handled automatically, however you also have the ability to override it. Each action contains a parameter called CallbackFunction. By default the CallbackFunction parameter is set to nil. This means it will automatically pass progress information to the Status Dialog. However in some cases you may need further control over what, and how it is displayed. In this situation you can pass a function as the CallbackFunction parameter (you will need to consult the action being used for the required parameters of the function). You can find an example illustrating this method in the article, Create a custom callback function.

Until this point, the Status Dialog has been described in relation to specific actions in AutoPlay Media Studio. However due to its flexibility and power, it can be used in many other ways. The Status Dialog contains it's own category of actions called StatusDlg and can be used to provide a representation for any type of progress you need. You can find an example of this in the article, Use the status dialog window.


StatusDlg.GetAutoSize Examples

StatusDlg.GetAutoSize

boolean StatusDlg.GetAutoSize (

)

Example 1

bAutoSize = StatusDlg.GetAutoSize();

Stores the built-in status dialog's auto-size settings in the variable "bAutoSize."


StatusDlg.GetMeterPos Examples

StatusDlg.GetMeterPos

number StatusDlg.GetMeterPos (

)

Example 1

meter_position = StatusDlg.GetMeterPos();

Gets the current status meter position on the status dialog and stores it in a variable called "meter_position."


StatusDlg.Hide Examples

StatusDlg.Hide

StatusDlg.Hide (

)

Example 1

StatusDlg.Hide();

Hides the built-in status dialog that is currently displayed.

Example 2

-- Allow the user to select a directory to unzip the files.
target_folder = Dialog.FolderBrowse("Select a Folder", "C:\\");

-- Check to see if the user cancelled or an error occurred.
if (target_folder ~= "CANCEL") and (target_folder ~= "") then
-- Gets a list of the contents of a zip file.
zip_contents = Zip.GetContents("AutoPlay\\Docs\\Info.zip", true);

-- Get the error code of the last action.
error = Application.GetLastError();

-- If an error occurred, display the error code message.
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);
else
-- Take the table and turn it into a string with newlines for displaying.
zip_contents_display = Table.Concat(zip_contents, "\r\n", 1, TABLE_ALL);

-- Ask the user if they are sure they would like to unzip the contents.
result = Dialog.Message("Information", "The following files will be unzipped:\r\nClick the Cancel button to abort the process.\r\n\r\n"..zip_contents_display, MB_OKCANCEL)

-- If the user clicked Ok, unzip the files.
if (result == IDOK) then
-- Show the status dialog.
StatusDlg.Show();
-- Extract the contents of the Zip file.
Zip.Extract("AutoPlay\\Docs\\Info.zip", {"*.*"}, target_folder, true, true, "", ZIP_OVERWRITE_NEVER, nil);

-- Check the error code for the last action.
error = Application.GetLastError();

-- Hide the status dialog.
StatusDlg.Hide();

-- If an error occurred, display the error code message.
if (error ~= 0) then
Dialog.Message("Errror", tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);
else
Dialog.Message("Success", "The unzipping was successful.", MB_OK, MB_ICONINFORMATION);
end
end
end
end

This example first prompts the user to select a folder using the Dialog.FolderBrowse action. This folder will be used to unzip the files to. The user is then presented with a dialog containing the names of the files that will be unzipped and allows them to abort the process. If the user clicks Ok, the files are unzipped to the folder they selected. Notification will be given at the end of the process as to whether or not the procedure was successful.


StatusDlg.IsCancelled Examples

StatusDlg.IsCancelled

boolean StatusDlg.IsCancelled (

)

Example 1

clicked = StatusDlg.IsCancelled();

Determines whether or not the cancel button on the built-in status dialog has been clicked and stores either true or false in the variable "clicked."


StatusDlg.SetAutoSize Examples

StatusDlg.SetAutoSize

StatusDlg.SetAutoSize (

boolean AutoSize )

Example 1

StatusDlg.SetAutoSize(true);

Allows the built-in status dialog to automatically resize if needed.

Example 2

StatusDlg.SetAutoSize(false);

Prevents the built-in status dialog from automatically resizing.


StatusDlg.SetCancelled Examples

StatusDlg.SetCancelled

StatusDlg.SetCancelled (

boolean Cancelled )

Example 1

StatusDlg.SetCancelled(true);

Sets the status dialog's cancel button state to clicked.


StatusDlg.SetMessage Examples

StatusDlg.SetMessage

StatusDlg.SetMessage (

string Text )

Example 1

StatusDlg.SetMessage("Please wait while we process your request.");

Sets the built-in status dialog's main description to the string, "Please wait while we process your request."


StatusDlg.SetMeterPos Examples

StatusDlg.SetMeterPos

StatusDlg.SetMeterPos (

number Position )

Example 1

StatusDlg.SetMeterPos(25);

Sets the status dialog's status meter to a position of 25.


StatusDlg.SetMeterRange Examples

StatusDlg.SetMeterRange

StatusDlg.SetMeterRange (

number Begin,

number End )

Example 1

StatusDlg.SetMeterRange(0, 100);

Sets the meter range of the built-in status dialog to a beginning value of 0 and an end value of 100.

Example 2

StatusDlg.SetMeterRange(0, 5000);

Sets the meter range of the built-in status dialog to a beginning value of 0 and an end value of 5000.


StatusDlg.SetStatusText Examples

StatusDlg.SetStatusText

StatusDlg.SetStatusText (

string Text )

Example 1

StatusDlg.SetStatusText("Copying files...");

Sets the built-in status dialog's status text to the string, "Copying files..."


StatusDlg.SetTitle Examples

StatusDlg.SetTitle

StatusDlg.SetTitle (

string Text )

Example 1

StatusDlg.SetTitle("Verifying information...");

Sets the built-in status dialog's title bar text to the string "Verifying information..."


StatusDlg.Show Examples

StatusDlg.Show

StatusDlg.Show (

number Icon = 0,

boolean Cancelled = false )

Example 1

StatusDlg.Show(MB_ICONINFORMATION, false);

Displays the built-in status dialog with the information icon. The "false" parameter indicates that the cancel button hasn't been pressed.

Example 2

StatusDlg.Show(MB_ICONNONE, true);

Displays the built-in status dialog with no icon. The "true" parameter indicates that the cancel button has been pressed.

Example 3

-- Allow the user to select a directory to unzip the files.
target_folder = Dialog.FolderBrowse("Select a Folder", "C:\\");

-- Check to see if the user cancelled or an error occurred.
if (target_folder ~= "CANCEL") and (target_folder ~= "") then
-- Gets a list of the contents of a zip file.
zip_contents = Zip.GetContents("AutoPlay\\Docs\\Info.zip", true);

-- Get the error code of the last action.
error = Application.GetLastError();

-- If an error occurred, display the error code message.
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);
else
-- Take the table and turn it into a string with newlines for displaying.
zip_contents_display = Table.Concat(zip_contents, "\r\n", 1, TABLE_ALL);

-- Ask the user if they are sure they would like to unzip the contents.
result = Dialog.Message("Information", "The following files will be unzipped:\r\nClick the Cancel button to abort the process.\r\n\r\n"..zip_contents_display, MB_OKCANCEL)

-- If the user clicked Ok, unzip the files.
if (result == IDOK) then
-- Show the status dialog.
StatusDlg.Show();
-- Extract the contents of the Zip file.
Zip.Extract("AutoPlay\\Docs\\Info.zip", {"*.*"}, target_folder, true, true, "", ZIP_OVERWRITE_NEVER, nil);

-- Check the error code for the last action.
error = Application.GetLastError();

-- Hide the status dialog.
StatusDlg.Hide();

-- If an error occurred, display the error code message.
if (error ~= 0) then
Dialog.Message("Errror", tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);
else
Dialog.Message("Success", "The unzipping was successful.", MB_OK, MB_ICONINFORMATION);
end
end
end
end

This example first prompts the user to select a folder using the Dialog.FolderBrowse action. This folder will be used to unzip the files to. The user is then presented with a dialog containing the names of the files that will be unzipped and allows them to abort the process. If the user clicks Ok, the files are unzipped to the folder they selected. Notification will be given at the end of the process as to whether or not the procedure was successful.


StatusDlg.ShowCancelButton Examples

StatusDlg.ShowCancelButton

StatusDlg.ShowCancelButton (

boolean ShowCancel = true,

string ButtonText = "Cancel" )

Example 1

StatusDlg.ShowCancelButton(true, "Abort");

Shows the cancel button on the built-in status dialog and sets it's text to "Abort."

Example 2

StatusDlg.ShowCancelButton(false);

Hides the cancel button on the built-in status dialog.


StatusDlg.ShowProgressMeter Examples

StatusDlg.ShowProgressMeter

StatusDlg.ShowProgressMeter (

boolean Show = true )

Example 1

StatusDlg.ShowProgressMeter(true);

Shows the progress meter on the status dialog.

Example 2

StatusDlg.ShowProgressMeter(false);

Hides the progress meter on the status dialog.


String.AbbreviateFilePath Examples

String.AbbreviateFilePath

string String.AbbreviateFilePath (

string FilePath,

number Characters )

Example 1

internal_path = "c:\\windows\\system32\\drivers\\ta_da\\foldername\\driver.vxd";
display_path = String.AbbreviateFilePath(internal_path, 30);

Converts the lengthy internally used path into a more managable size to display to the user (c:\windows\...\driver.vxd)

Example 2

-- callback function for File.Delete action
function DeleteCallBack(source, deleted, total)
-- set the message and status text
StatusDlg.SetMessage("Delete: " .. String.AbbreviateFilePath(source, 10));
StatusDlg.SetStatusText("File " .. deleted .. " of " .. total .. ".");

-- show the cancel button
StatusDlg.ShowCancelButton(true, "Cancel");

-- check if the cancel button was pressed
bCancel = StatusDlg.IsCancelled();

-- if the cancel button was pressed, return false, else return true.
if bCancel then
return false;
else
return true;
end
end

-- show the status dialog
StatusDlg.Show();

-- delete all files in folder c:\temp, using the DeleteCallBack function
File.Delete("c:\\temp\\*.*", true, true, true, DeleteCallBack);

-- Hide the status dialog
StatusDlg.Hide();

Deletes all files and folders from c:\temp, and uses a callback function to display status to the user.


String.Asc Examples

String.Asc

number String.Asc (

string Char )

Example 1

code = String.Asc("h");

Gets the ASCII code of the character "h" and stores it in the variable "code." The number 104 will be stored as a result.


String.Char Examples

String.Char

string String.Char (

number ASCII )

Example 1

character = String.Char(104);

Gets the character value of the ASCII code 104 and stores the result in the variable "character." The character "h" will be stored as a result.


String.Compare Examples

String.Compare

number String.Compare (

string Text,

string CompareTo )

Example 1

compare_result = String.Compare("John", "Mary");

Compares the string "John" to the string "Mary" and stores the result in the variable "compare_result." Since "John" is less than "Mary", the number -1 would be returned.

Example 2

IsBigger = String.Compare("Bob", "Bob");

Compares the string "Bob" to the second string "Bob" and stores the result in the variable "IsBigger." Since both strings are the same, the number 0 would be returned.

Example 3

IsBigger = String.Compare("Bob", "bob");

Compares the string "Bob" to the second string "bob" and stores the result in the variable "IsBigger." Since the comparison is case-sensitive, the strings are not the same. The string "Bob" is less than the string "bob", therefore the number -1 would be returned.


String.CompareFileVersions Examples

String.CompareFileVersions

number String.CompareFileVersions (

string Version,

string CompareTo )

Example 1

compare_version = String.CompareFileVersions("1.0.20.3", "1.0.2.3");

Compares the file version string "1.0.20.3" to version "1.0.2.3" and stores the result in the variable "compare_version." Since "1.0.20.3" is greater than "1.0.2.3", the number 1 would be returned.

Example 2

IsBigger = String.CompareFileVersions("1.0.0.1", "1.0.0.1");

Compares the file version "1.0.0.1" to "1.0.0.1" and stores the result in the variable "IsBigger." Since the version strings are identical, the number 0 would be returned.


String.CompareNoCase Examples

String.CompareNoCase

number String.CompareNoCase (

string Text,

string CompareTo )

Example 1

compare_result = String.CompareNoCase("John", "Mary");

Compares the string "John" to the string "Mary" and stores the result in the variable "compare_result." Since "John" is less than "Mary", the number -1 would be returned.

Example 2

IsBigger = String.CompareNoCase("Bob", "Bob");

Compares the string "Bob" to the second string "Bob" and stores the result in the variable "IsBigger." Since both strings are the same, the number 0 would be returned.

Example 3

IsSame = String.CompareNoCase("BOB", "bob");

Compares the string "BOB" to the second string "bob" and stores the result in the variable "IsSame." Since the comparison is case-insensitive, the strings are the same, therefore the number 0 would be returned.


String.Concat Examples

String.Concat

string String.Concat (

string StartString,

string EndString )

Example 1

result_string = String.Concat("One", "Two");

Creates the new string "OneTwo" by appending the string "Two" to the string "One." The new string is returned in the variable "result_string."


String.Find Examples

String.Find

number String.Find (

string SearchString,

string Pattern,

number StartAt = 1,

boolean CaseSensitive = false )

Example 1

target_index = String.Find("Indigo Rose, the company who cares.", "company", 1, false);

Searches the string "Indigo Rose, the company who cares." for the sub-string "company" and returns the first position it was found. In this example, the variable "target_index" would contain the number 18.

Example 2

target_index = String.Find("The mean Boy popped my balloon. I think that Boy needs therapy.", "Boy", 13, true);

Performs a case-sensitive search on the string "That mean boy popped my balloon. I think that boy needs therapy." for the sub-string "Boy" starting at position 13 in the string. In this example, the variable "target_index" would contain the number 46 since it is the first occurrence of "Boy" after position 13 in the string.


String.GetFormattedSize Examples

String.GetFormattedSize

string String.GetFormattedSize (

number SizeInBytes,

number Format = FMTSIZE_AUTOMATIC,

boolean ShowCommas = true )

Example 1

sFormatted = String.GetFormattedSize(nBytes, FMTSIZE_AUTOMATIC, true);

Converts the value in nBytes from number of bytes to a formatted string. The best format based on the size is automatically chosen, and is stored in sFormatted.

Example 2

-- Callback function for HTTP.Download
function DownloadCallback (nDownloaded, nTotal, TransferRate, SecondLeft, SecondsLeftFormat, Message)
-- Convert total and downloaded bytes into formatted strings
sDownloaded = String.GetFormattedSize(nDownloaded, FMTSIZE_AUTOMATIC, true);
sTotal = String.GetFormattedSize(nTotal, FMTSIZE_AUTOMATIC, true);

-- Set statusdlg title and message
StatusDlg.SetTitle("Downloading . . . ");

-- Output time left, formatted.
StatusDlg.SetMessage("Currently downloading file . . . Time Left: " .. SecondsLeftFormat);

-- Output formatted sizes to user through statusdlg status text
StatusDlg.SetStatusText("Downloaded: " .. sDownloaded .. " / " .. sTotal);

-- Set meter range (max range = 65534)
StatusDlg.SetMeterRange(0, 65534);

-- Set meter position (fraction downloaded * max meter range)
StatusDlg.SetMeterPos((nDownloaded / nTotal) * 65534);
end

-- Show the StatusDlg
StatusDlg.Show(0, false);

-- Download a file from the internet to the user's computer
-- Uses DownloadCallback() as the callback function
HTTP.Download("http://www.yourdomain.com/downloads/update.exe", _TempFolder .. "\\update.exe", MODE_BINARY, 20, 80, nil, nil, DownloadCallback);

-- Hide the StatusDlg
StatusDlg.Hide();

Downloads a file from the internet onto the user's computer. The callback function "DownloadCallback" controls the Status Dialog.


String.Left Examples

String.Left

string String.Left (

string LeftString,

number NumChar )

Example 1

left_string = String.Left("Hey There", 3);

Returns a string containing the first three characters of "Hey There." Therefore the string "Hey" will be stored in the variable "left_string."


String.Length Examples

String.Length

number String.Length (

string LengthString )

Example 1

size = String.Length("Hey There");

Gets the length of the string "Hey There" and stores it in the variable "size." In this example, the number 9 would be returned.


String.Lower Examples

String.Lower

string String.Lower (

string ToLower )

Example 1

string_small = String.Lower("Indigo Rose");

Takes the string "Indigo Rose" and returns an all lowercase version of the string in the variable "string_small." The variable "string_small" would contain the new string "indigo rose."


String.MakePath Examples

String.MakePath

string String.MakePath (

table PathParts )

Example 1

Debug.ShowWindow(true); --Shows the debug window.
path_parts = {Drive="C:",Folder="\\MyFolder1\\MyFolder2\\",Filename="myfile",Extension=".exe"};
result_path = String.MakePath(path_parts);
Debug.Print(result_path);

In this example, a table called "path_parts" is first created containing each part of a path. The String.MakePath action is then used to create a path string based upon the elements of the table and then printed to the debug window. The created string would look like this:

C:\MyFolder1\MyFolder2\myfile.exe

Example 2

Debug.ShowWindow(true); --Shows the debug window.
path_parts = {Drive="C:",Folder="\\",Filename="myfile",Extension=".exe"};
result_path = String.MakePath(path_parts);
Debug.Print(result_path);

This example is the same as example 1, however the Folder element only contains the required backslash. The debug window output would look like this:

C:\myfile.exe

Note: A backslash must be added to the Folder value, even if no folders are present in the path.


String.Mid Examples

String.Mid

string String.Mid (

string MidString,

number CharStart,

number NumChar )

Example 1

color_string = String.Mid("The red balloon", 5, 3);

Copies 3 characters from the string "The red balloon" starting at position 5. This will store "red" in the variable named color_string.

Example 2

strEnd = String.Mid("The red balloon", 12, -1);

Copies everything from the 12th character in "The red balloon" to the end of the string. This will store "loon" in a variable named strEnd.

Example 3

filename = String.Mid(filepath, String.ReverseFind(filepath, "\\") + 1, -1);

Copies the filename from the path stored in the variable "filepath" and stores it in a variable named "filename."


String.Repeat Examples

String.Repeat

string String.Repeat (

string RepeatString,

number NumRepeat )

Example 1

multi_string = String.Repeat("One", 4);

Repeats the string "One" four times to create the new string "OneOneOneOne", and stores it in the variable "multi_string."


String.Replace Examples

String.Replace

string String.Replace (

string SearchString,

string Pattern,

string ReplaceString,

boolean CaseSensitive = false )

Example 1

replaced_string = String.Replace("My red balloon matches my red hat.", "red", "blue", false);

Searches the source string "My red balloon matches my red hat." for the sub-string "red" and replaces it with the new sub-string "blue". The new string "My blue balloon matches my blue hat." will be returned in the variable "replaced_string."

Example 2

replaced_string = String.Replace("My Red balloon matches my red hat.", "Red", "blue", true);

Performs a case-sensitive search on the source string "My red balloon matches my red hat." for the sub-string "Red" and replaces it with the new sub-string "blue". The new string "My blue balloon matches my red hat." will be returned in the variable "replaced_string." You will notice that the second occurrence of the string "red" was not replaced due to the difference in character case.

Example 3

-- Read the contents of a text file into a string.
contents = TextFile.ReadToString("C:\\MyFile.txt");

-- Check the error code of the last example.
error = Application.GetLastError();
-- If an error occurred, display the error message.
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);
else
-- Replace every occurrence of the string "Robert" with the string "Adam".
new_contents = String.Replace(contents, "Robert", "Adam", true);

-- Write out the modified contents of the text file.
TextFile.WriteFromString("C:\\MyFile.txt", new_contents, false);

-- Check the error code of the last example.
error = Application.GetLastError();
-- If an error occurred, display the error message.
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);
end
end

Reads the contents of the file "MyFile.txt" and stores the string in the variable "contents." Every occurrence of the string "Robert" in "contents" is replaced with the string "Adam" and then written back to the text file "MyFile.txt".


String.ReverseFind Examples

String.ReverseFind

number String.ReverseFind (

string SearchString,

string Pattern,

boolean CaseSensitive = false )

Example 1

target_index = String.ReverseFind("The mean Boy popped my balloon. I think that Boy needs therapy.", "Boy", true);

Performs a case-sensitive search on the string "That mean boy popped my balloon. I think that boy needs therapy." for the sub-string "Boy" starting from the end of the string. In this example, the variable "target_index" would contain the number 46 since it is the first occurrence of "Boy" when searched from right to left.


String.Right Examples

String.Right

string String.Right (

string RightString,

number NumChar )

Example 1

right_string = String.Right("Hey There", 5);

Returns a string containing the last five characters of "Hey There." Therefore the string "There" will be stored in the variable "right_string."


String.SplitPath Examples

String.SplitPath

table String.SplitPath (

string Path )

Example 1

Debug.ShowWindow(true); --Shows the debug window.
path_parts = String.SplitPath("C:\\MyFolder1\\MyFolder2\\myfile.exe");
Debug.Print(path_parts.Drive.."\r\n");
Debug.Print(path_parts.Folder.."\r\n");
Debug.Print(path_parts.Filename.."\r\n");
Debug.Print(path_parts.Extension.."\r\n");

Takes a file path and splits it up into it's drive, folders, filename and file extension components using the String.SplitPath action. Each part of the path is stored in the table named "path_parts." In this example, each table value is printed to the debug window and would look like this:

C:
\MyFolder1\MyFolder2\
myfile
.exe

Example 2

Debug.ShowWindow(true); --Shows the debug window.
path_parts = String.SplitPath("C:\\myfile.exe");
Debug.Print(path_parts.Drive.."\r\n");
Debug.Print(path_parts.Folder.."\r\n");
Debug.Print(path_parts.Filename.."\r\n");
Debug.Print(path_parts.Extension.."\r\n");

This example is the same as example 1, however this path does not contain any folders. The debug window output would look like this:

C:
\
myfile
.exe

Example 3

Debug.ShowWindow(true); --Shows the debug window.
path_parts = String.SplitPath("C:\\MyFolder1\\MyFolder2\\");
Debug.Print(path_parts.Drive.."\r\n");
Debug.Print(path_parts.Folder.."\r\n");
Debug.Print(path_parts.Filename.."\r\n");
Debug.Print(path_parts.Extension.."\r\n");

Again, this example is the same as above, however this path does not contain a filename. The debug window output would look like this:

C:
\MyFolder1\MyFolder2\

Note: The Filename and Extension values will return blank. In order for this action to work on partial paths, there must be a trailing backslash in the source path to indicate it is a folder and not a filename.


String.ToNumber Examples

String.ToNumber

number String.ToNumber (

string NumericString )

Example 1

number_format = String.ToNumber("84");

if number_format < 100 then
Dialog.Message("Successful", "Yes, the number "..number_format.." is less than 100.");
end

Converts the string "84" to the number 84 so it can be used in a numeric comparison that will display a message to the user.


String.TrimLeft Examples

String.TrimLeft

string String.TrimLeft (

string SourceString,

string CharactersToTrim = nil )

Example 1

trimmed = String.TrimLeft("12324", "21");

Removes the characters in the string "21" from the source string "12324" and stores the resulting string "324" in the variable "trimmed."

Example 2

trimmed_space = String.TrimLeft(" Bob", nil);

Removes the beginning spaces from the source string and returns the string "Bob" in the variable "trimmed_space."


String.TrimRight Examples

String.TrimRight

string String.TrimRight (

string SourceString,

string CharactersToTrim = nil )

Example 1

trimmed = String.TrimRight("14345", "54");

Removes the characters in the string "54" from the source string "14345" and stores the resulting string "143" in the variable "trimmed."

Example 2

trimmed_space = String.TrimRight("Bob ", nil);

Removes the trailing spaces from the source string and returns the string "Bob" in the variable "trimmed_space."


String.Upper Examples

String.Upper

string String.Upper (

string ToUpper )

Example 1

string_large = String.Upper("Indigo Rose");

Takes the string "Indigo Rose" and returns an all uppercase version of the string in the variable "string_large." The variable "string_large" would contain the new string "INDIGO ROSE."


System.EnumerateProcesses Examples

System.EnumerateProcesses

table System.EnumerateProcesses (

)

Example 1

open_processes = System.EnumerateProcesses();

Gets the process IDs and executable file paths for every process that is currently running and stores them in a table named open_processes.

Example 2

instances_of_file = 0;
file_to_check_for = "autorun.exe"; --have all lowercase
processes = System.EnumerateProcesses();

for j, file_path in pairs(processes) do
file = String.SplitPath(file_path);
if (String.Lower(file.Filename..file.Extension)) == file_to_check_for then
System.TerminateProcess(j);
end
end

Terminates all processes that were spawned by the executable "autorun.exe."


System.GetDate Examples

System.GetDate

string System.GetDate (

number DateType )

Example 1

current_date_sortable = System.GetDate(2); -- ISO date format sorts nicely

Get's the current date in ISO format (YYYY-MM-DD) and stores it in the variable "current_date_sortable."

Example 2

days_since_Jan_15_2003 = System.GetDate(3)-2452655; -- 2452655 is the Julian date for Jan 15, 2003

Subtracts the Julian date for Jan 15, 2003 from the current Julian date and stores the result in the variable "days_since_Jan_15_2003". The Julian date format is perfect for date comparisons.

Example 3

nWeekday = System.GetDate(7);

Returns the current day of the week (1-7) in the variable "nWeekday."

Example 4

-- Specify the length of the trial period, in days
time_limit = 30;

-- Initialize days_left
days_left = 0;

-- Retrieve previous value stored
date_installed = Application.LoadValue("My Application", "Date Installed");-- Convert loaded value into a number
date_installed = String.ToNumber(date_installed);

-- If there is no previous value (date_installed == 0), create a value
if date_installed == 0 then
Application.SaveValue("My Application", "Date Installed", System.GetDate(DATE_FMT_JULIAN));
days_left = time_limit;
else
days_left = (date_installed + time_limit) - System.GetDate(DATE_FMT_JULIAN);
end

-- Check if there is time left
if String.ToNumber(days_left) < 1 then
Dialog.Message("Trial Period Over", "This software has expired");
Application.Exit();
else
Dialog.Message("Trial Period", "You have "..days_left.." days left in your trial period.");
end

Notifies the user after thirty days that the application has expired and exits.


System.GetDefaultLangID Examples

System.GetDefaultLangID

table System.GetDefaultLangID (

)

Example 1

language_info = System.GetDefaultLangID();

Gets the primary and secondary language ID code and stores them in the table called "language_info." These values could be accessed by referencing language_info.Primary and language_info.Secondary.

Example 2

-- Retrieve the system's default language ID's
tLangID = System.GetDefaultLangID();

-- Check if default primary language is english (English = 9)
if tLangID.Primary == 9 then
-- Default primary language is english
Dialog.Message("Default Language", "Your default language is English!");
else
-- Default primary language is not english
Dialog.Message("Default Language", "Your default language is not English!");
end

Retrieves the system's default language ID's, compares the primary ID to the value representing English (9), and displays an appropriate message.


System.GetDisplayInfo Examples

System.GetDisplayInfo

table System.GetDisplayInfo (

)

Example 1

screen_info = System.GetDisplayInfo();

Gets the screen width, height and color depth of the user's system and stores the information in a table called "screen_info." This information can be accessed by referencing screen_info.Width, screen_info.Height and screen_info.ColorDepth. If the user's resolution was set to 800 x 600, screen_info.Width would contain the value 800 and screen_info.Height would contain 600. It's color depth may be a value such as 32.

Example 2

-- Get the user's display information.
display = System.GetDisplayInfo();

if (display ~= nil) then
-- If the user's running less than 800 x 600, display a dialog.
if (display.Height < 600) then
Dialog.Message("Notice", "Your resolution is currently set to "..display.Width.." x "..display.Height..".\r\n"..
"You must have at least 800 x 600 to view this application properly.", MB_OK, MB_ICONINFORMATION);
end
end

Gets the user's screen resolution and stores it in a table called "display." If the user has a resolution that is less than 800 x 600, a dialog is displayed notifying them of the application requirement.


System.GetLANInfo Examples

System.GetLANInfo

table System.GetLANInfo (

)

Example 1

LAN_info = System.GetLANInfo();

Gets the system's LAN information and stores it in a table called "LAN_info." If you wanted the network domain the user was logged into, you could access it by referencing LAN_info.Domain.

Example 2

lan = System.GetLANInfo();
lan_exist = true;
for j in pairs(lan) do
if lan[j] == "Unknown" then
lan_exist = false;
end
end

if lan_exist then
Dialog.Message("", "You are connected to a LAN");
else
Dialog.Message("", "You are not connected to a LAN");
end

Determines whether or not the user is connected to a LAN and displays the result in a dialog message.


System.GetMemoryInfo Examples

System.GetMemoryInfo

table System.GetMemoryInfo (

)

Example 1

-- Get the memory information from the user's system.
tbMemory = System.GetMemoryInfo();

-- Display an error message if their RAM is less than 500 MB.
if (tbMemory.TotalRAM < 500) then
Dialog.Message("Warning", "This application requires at least 512 MB of RAM.\r\nYou currently only have "..tbMemory.TotalRAM.." MB RAM.");
end

Gets the amount of RAM on the user's system and warns them if their RAM is less than 500 MB.


System.GetMousePosition Examples

System.GetMousePosition

table System.GetMousePosition (

boolean ClientCoordinates = true,

number WndHandle = nil )

Example 1

tMousePos = System.GetMousePosition(true);
tPageSize = {W=640,H=480};

if tMousePos.X < 0 or tMousePos.X > tPageSize.W then
-- Mouse is outside the left or right side of the page
end

if tMousePos.Y < 0 or tMousePos.Y > tPageSize.H then
-- Mouse is outside the top or bottom side of the page
end

Determines if the mouse cursor is outside the bounds of the page.

Example 2

tMousePos = System.GetMousePosition(true,DialogEx.GetWndHandle());
Label.SetText("Label1", tMousePos.X.." , "..tMousePos.Y);

Updates a label object on a dialog with the current mouse position coordinates.


System.GetOSName Examples

System.GetOSName

string System.GetOSName (

)

Example 1

OS_Name = System.GetOSName();

Get's the name of the OS the user is running and stores the string in the variable "OS_Name."

Example 2

-- Get the name of the OS.
os_name = System.GetOSName();

-- Display the name of the OS in a dialog.
Dialog.Message("Information", "Your operating system is "..os_name..".", MB_OK, MB_ICONINFORMATION);

Get's the name of the OS the user is running and displays it in a dialog message.


System.GetOSProductInfo Examples

System.GetOSProductInfo

number System.GetOSProductInfo (

)

Example 1

nInfo = System.GetOSProductInfo();

if (nInfo == PRODUCT_HOME_BASIC) then
Dialog.Message("Product Info", "The operating system is Home Basic.");
end

Determines whether the operating system is Home Basic and shows a dialog message.


System.GetOSVersionInfo Examples

System.GetOSVersionInfo

table System.GetOSVersionInfo (

)

Example 1

OS_info = System.GetOSVersionInfo();

Get's the version information of the OS the user is running and stores it's results in a table called "OS_info." If you wanted the major version number, you could access it by referencing OS_info.MajorVersion.

Example 2

-- Get the current OS Version information
tVersionInfo = System.GetOSVersionInfo();

-- Combine Version information into a file-version string
sCurrentWindowsVersion = tVersionInfo.MajorVersion .. "." .. tVersionInfo.MinorVersion.. "." .. tVersionInfo.BuildNumber;

-- Specify the minimum required file version
sRequiredWindowsVersion = "5.1.2600";

-- Compare the current file version to the minimum requirement
nCompareResult = String.CompareFileVersions (sRequiredWindowsVersion, sCurrentWindowsVersion);

-- If the minimum requirement is greater than the current version, display an error and exit.
if (nCompareResult == 1) then
Dialog.Message("Error", "Windows XP or later is required to use this software.", MB_OK, MB_ICONSTOP, MB_DEFBUTTON1);
Application.Exit();
end

Gets the Operating System's version information, and compares it to a minimum value. If the installed operating system is not Windows XP or later (version 5.1.2600 or newer), an error message is displayed.


System.GetTime Examples

System.GetTime

string System.GetTime (

number TimeType )

Example 1

current_time = System.GetTime(0);

Stores the current military time (HH:MM:SS) in the variable "current_time."

Example 2

mmhh = System.GetTime(3) ..":".. System.GetTime(4);

Stores the current minute, followed by a colon and the current hour in the variable "mmhh."

Note: The concatenation operator (..) is used to add the current minute followed by the ":" character and the current hour.

Example 3

wordytime = System.GetTime(4) .." hours, ".. System.GetTime(3) .." minutes and ".. System.GetTime(2) .." seconds";

Stores a string containing the current hour, minute, and second in the variable "wordytime." The result may look something like, "6 hours 42 minutes and 30 seconds."


System.GetUserInfo Examples

System.GetUserInfo

table System.GetUserInfo (

)

Example 1

user_info = System.GetUserInfo();

Gets the current user's information and stores it in the "user_info" table.

Example 2

user_info = System.GetUserInfo();
if (not user_info.IsAdmin) then
Dialog.Message("Warning", "You are not logged in with the appropriate permissions.");
end

Checks to see if the current user is logged in with administrator permissions and if they are not, displays a dialog box informing them.

In this example, the registered user and organization could be accessed by referencing user_info.RegOwner and user_info.RegOrganization.

Example 3

user_info = System.GetUserInfo();
if (user_info.IsAdmin or user_info.IsVistaAdminLimitedToken) then
Shell.Execute("AutoPlay\\Docs\\MyProg.exe", "open", "", "", SW_SHOWNORMAL);
else
Dialog.Message("Warning", "You are not logged in with the appropriate permissions.");
end

Checks to see if the current user is a member of the Administrators group who is either running with full privileges, or can be elevated to these privileges on Vista or later in order to run "MyProg.exe." If they are not, a dialog box is shown informing them.


System.GetUserSID Examples

System.GetUserSID

string System.GetUserSID (

string UserName )

Example 1

strUserName = "test_user1";
strUserSID = System.GetUserSID(strUserName);
if (strUserSID == "") then
strMessage = "ERROR: Unable to get SID for \""..strUserName.."\" code: "..System.UserSIDError.. "\r\n";
SetupData.WriteToLogFile(strMessage, false);
end

Gets the SID value for the user name "test_user1" and if it fails, writes the system error code to the setup log file.


System.Is64BitOS Examples

System.Is64BitOS

boolean System.Is64BitOS (

)

Example 1

if (System.Is64BitOS()) then
-- The user's system is running a 64 bit operating system.
end

Checks if the user's OS is 64 bit.

Example 2

-- Check if the OS is 64 bit
b64Bit = System.Is64BitOS();

if b64Bit then
-- The OS is 64 bit
else
-- The OS is not 64 bit.
end

Performs specific tasks based on whether or not the user's system is running a 64 bit OS.


System.IsKeyDown Examples

System.IsKeyDown

boolean System.IsKeyDown (

number Key )

Example 1

if System.IsKeyDown(13) then
-- The user is holding down the 'enter' key
end

Checks if the 'enter' key is down.

Example 2

-- Check if the left mouse button is down (Virtual Key Code = 1)
bisLeftDown = System.IsKeyDown(1);

if bisLeftDown then
-- The left mouse button is currently pressed
else
-- The left mouse button is NOT currently pressed
end

Checks if the left mouse button is down.


System.IsSystemRestoreAvailable Examples

System.IsSystemRestoreAvailable

boolean System.IsSystemRestoreAvailable (

)

Example 1

bRestore = System.IsSystemRestoreAvailable();

Stores true in the variable "bRestore" if the system restore service is available, or false if not.

Example 2

-- Check to see if the system has system restore capability
bSysRestoreAvailable = System.IsSystemRestoreAvailable();

if bSysRestoreAvailable then
-- Restore is available, mark start point
nSequenceNum = System.SetRestorePoint(SYSTEM_CHANGE_BEGIN, SYS_RESTORE_APP_INSTALL, 0, "Installed Sample Product v. 3.7")
else
-- Restore is unavailable, confirm with the user to continue
nChoice = Dialog.Message("Restore Unavailable", "Your system does not support System Restore. Do you want to continue with the setup?", MB_YESNO, MB_ICONSTOP);

if nChoice == 7 then
-- The user chose not to continue, exit the script
Application.ExitScript();
end
end

-- DO UPDATE TASKS HERE

if bSysRestoreAvailable then
-- Restore is available, mark end point
nSequenceNum = System.SetRestorePoint(SYSTEM_CHANGE_END, SYS_RESTORE_APP_INSTALL, nSequenceNumber, "Installed Sample Product v. 3.7")

-- Write sequence number to the registry for later use
Registry.SetValue(HKEY_LOCAL_MACHINE, "Software\\CompanyName\\ProductName\\RestorePointInfo", "SequenceNumber", nSequenceNum, REG_SZ)
end

Checks if the user's system supports system restore. If it does not, the user is asked if the setup should continue. If the system supports system restore, or the user chooses to continue, a restore point is set and the setup tasks are completed.


System.Reboot Examples

System.Reboot

System.Reboot (

)

Example 1

System.Reboot();

Reboots the user's system.


System.RegisterActiveX Examples

System.RegisterActiveX

System.RegisterActiveX (

string Filename )

Example 1

System.RegisterActiveX(_SystemFolder .. "\\mycontrol.ocx");

Registers the ActiveX control named "mycontrol.ocx" located in the user's system folder.

Note: _SystemFolder is a built-in variable that contains the path to the user's "System" folder.


System.RegisterFont Examples

System.RegisterFont

System.RegisterFont (

string Filename,

string Fontname,

boolean Permanent = true )

Example 1

fonts_dir = Shell.GetFolder(SHF_FONTS); -- Gets the path to the user's Font directory.
System.RegisterFont(fonts_dir .. "\\myfont.ttf", "Crazy Font", true);

The first line uses the Shell.GetFolder action to get the path to the user's Font directory and stores it's path in the variable "fonts_dir." The second action permanently registers the font file named "myfont.ttf" on the user's local system with the name "Crazy Font."


System.RegisterTypeLib Examples

System.RegisterTypeLib

System.RegisterTypeLib (

string Filename )

Example 1

System.RegisterTypeLib(_SystemFolder .. "\\myfile.tlb");

Registers the type library file named "myfile.tlb" located in the user's system folder.

Note: _SystemFolder is a built-in variable that contains the path to the user's "System" folder.


System.RemoveRestorePoint Examples

System.RemoveRestorePoint

System.RemoveRestorePoint (

number SequenceNum )

Example 1

System.RemoveRestorePoint(107);

Removes the system restore point whose sequence number is 107.

Example 2

-- Get the sequence number of the restore point to remove
nSequenceNum = Registry.GetValue(HKEYHKEY_LOCAL_MACHINE, "Software\\CompanyName\\ProductName\\RestorePointInfo", "SequenceNumber", false)

-- Remove the restore point
System.RemoveRestorePoint(nSequenceNum);

Gets a sequence number from the registry, and removes the corresponding restore point.


System.SetRestorePoint Examples

System.SetRestorePoint

number System.SetRestorePoint (

number EventType,

number RestorePointType,

number SequenceNum,

string Description )

Example 1

nSeqNum = System.SetRestorePoint(SYSTEM_CHANGE_BEGIN, SYS_RESTORE_APP_INSTALL, 0, "My Program Install");

Begins a system restore point of an application install and returns the sequence number in the variable "nSeqNum."

Example 2

-- Check to see if the system has system restore capability
bSysRestoreAvailable = System.IsSystemRestoreAvailable();

if bSysRestoreAvailable then
-- Restore is available, mark start point
nSequenceNum = System.SetRestorePoint(SYSTEM_CHANGE_BEGIN, SYS_RESTORE_APP_INSTALL, 0, "Installed Sample Product v. 3.7")
else
-- Restore is unavailable, confirm with the user to continue
nChoice = Dialog.Message("Restore Unavailable", "Your system does not support System Restore. Do you want to continue with the setup?", MB_YESNO, MB_ICONSTOP);

if nChoice == 7 then
-- The user chose not to continue, exit the script
Application.ExitScript();
end
end

-- DO UPDATE TASKS HERE

if bSysRestoreAvailable then
-- Restore is available, mark end point
nSequenceNum = System.SetRestorePoint(SYSTEM_CHANGE_END, SYS_RESTORE_APP_INSTALL, nSequenceNumber, "Installed Sample Product v. 3.7")

-- Write sequence number to the registry for later use
Registry.SetValue(HKEY_LOCAL_MACHINE, "Software\\CompanyName\\ProductName\\RestorePointInfo", "SequenceNumber", nSequenceNum, REG_SZ)
end

Checks if the user's system supports system restore. If it does not, the user is asked if the setup should continue. If the system supports system restore, or the user chooses to continue, a restore point is set and the setup tasks are completed.


System.TerminateProcess Examples

System.TerminateProcess

boolean System.TerminateProcess (

number ProcessID )

Example 1

terminate_status = System.TerminateProcess(3444);

Terminates the process whose process ID is 3444 and stores the result in the variable "terminate_status."

Example 2

instances_of_file = 0;
file_to_check_for = "autorun.exe"; --have all lowercase
processes = System.EnumerateProcesses();

for j, file_path in pairs(processes) do
file = String.SplitPath(file_path);
if (String.Lower(file.Filename..file.Extension)) == file_to_check_for then
System.TerminateProcess(j);
end
end

Terminates all processes that were spawned by the executable "autorun.exe."


System.UnregisterActiveX Examples

System.UnregisterActiveX

System.UnregisterActiveX (

string Filename )

Example 1

System.UnregisterActiveX(_SystemFolder .. "\\mycontrol.ocx");

Unregisters the ActiveX control named "mycontrol.ocx" located in the user's system folder.

Note: _SystemFolder is a built-in variable that contains the path to the user's "System" folder.


System.UnregisterFont Examples

System.UnregisterFont

System.UnregisterFont (

string Filename,

string Fontname,

boolean Permanent = true )

Example 1

fonts_dir = Shell.GetFolder(SHF_FONTS); -- Gets the path to the user's Font directory.
System.UnregisterFont(fonts_dir .. "\\myfont.ttf", "Crazy Font", true);

The first line uses the Shell.GetFolder action to get the path to the user's Font directory and stores it's path in the variable "fonts_dir." The second action permanently unregisters the font file named "myfont.ttf" on the user's local system with the name "Crazy Font."


Table.Concat Examples

Table.Concat

string Table.Concat (

table SourceTable,

string Separator,

number Start = 1,

number End = TABLE_ALL )

Example 1

target_table = {"John","Mary","George","Sally"}; --Creates a table whose values are 4 strings.
table_values = Table.Concat(target_table, ";;", 2, 3);

Creates a string by concatenating target_table's values starting at position 2 and ending at position 3. In this example the string "Mary;;George" will be created and stored in the variable "table_values."

Example 2

target_table = {"John","Mary","George","Sally"}; --Creates a table whose values are 4 strings.
table_values = Table.Concat(target_table, ";;", 1, TABLE_ALL);

Creates a string by concatenating all of target_table's values. In this example the string "John;;Mary;;George;;Sally" will be created and stored in the variable "table_values."


Table.Count Examples

Table.Count

number Table.Count (

table SourceTable )

Example 1

target_table = {"John","Mary","George","Sally"}; --Creates a table whose values are 4 strings.
count = Table.Count(target_table);

Gets the total number of items in the table called "target_table" and stores it in the variable "count." In this example, the number 4 will be returned.


Table.Insert Examples

Table.Insert

Table.Insert (

table SourceTable,

number Position,

variant Value )

Example 1

Debug.ShowWindow(true);
target_table = {"One","Two","Three"}; --Creates a table whose values are 3 strings.
Table.Insert(target_table, 2, "Four");
for x,y in pairs(target_table) do
Debug.Print("Index "..x.." = "..y.."\r\n");
end

Inserts the string "Four" into index 2 of the table called "target_table." For this example, a loop has been created to output the new contents of the table to the debug window. The output would be the following:

Index 1 = One
Index 2 = Four
Index 3 = Two
Index 4 = Three

Tip: You can copy the action code from these examples and paste it into the Action Editor to test it.

Example 2

Debug.ShowWindow(true);
target_table = {"One","Two","Three"}; --Creates a table whose values are 3 strings.
Table.Insert(target_table, Table.Count(target_table)+1, "Four");
for x,y in pairs(target_table) do
Debug.Print("Index "..x.." = "..y.."\r\n");
end

Inserts the string "Four" into index 4 of the table called "target_table." In this example the Table.Count action is used to get the number of items in the table so the new item can be inserted at the end. Here is what would be printed in the debug window:

Index 1 = One
Index 2 = Two
Index 3 = Three
Index 4 = Four


Table.Remove Examples

Table.Remove

variant Table.Remove (

table SourceTable,

number Position )

Example 1

Debug.ShowWindow(true);
mytable = {"One", "Two", "Three", "Four"} ; --Creates a table whose values are 4 strings.
removed_item = Table.Remove(mytable, 2);
for x,y in pairs(mytable) do
Debug.Print("Index "..x.." = "..y.."\r\n");
end
Debug.Print("Removed Item ="..removed_item);

Removes the item at index 2 from the table called "mytable" and stores it's value in the variable "removed_item." In this example, the new contents of the table are printed to the debug window along with the value of the removed item. Here is what would be printed in the debug window:

Index 1 = One
Index 2 = Three
Index 3 = Four
Removed Item =Two

Tip: You can copy the action code from this example and paste it into the Script Editor to test it.


Table.Sort Examples

Table.Sort

Table.Sort (

table SourceTable,

function Compare = nil )

Example 1

Debug.ShowWindow(true);
MyTable = {46,102,12,85};
Table.Sort(MyTable, nil)
for x,y in pairs(MyTable) do
Debug.Print(y.."\r\n");
end

Sorts the items in "MyTable" in ascending order and then prints the sorted table to the debug window. Here is what would be printed in the debug window:

12
46
85
102

Example 2

function sorter(v1,v2)
if (v1 > v2)then
return true;
else
return false;
end
end

Debug.ShowWindow(true);
MyTable = {"Hockey","Baseball","Football", "Soccer"};
Table.Sort(MyTable, sorter);
for x,y in pairs(MyTable) do
Debug.Print(y.."\r\n");
end

The first block of code defines a function "sorter" that compares two values and returns true if the first item is greater than the second item. The "sorter" function is then used in the Table.Sort action to sort the items in descending alphabetical order (z - a). Here is what would be printed in the debug window:

Soccer
Hockey
Football
Baseball


TextFile.ReadToString Examples

TextFile.ReadToString

string TextFile.ReadToString (

string Filename )

Example 1

text_contents = TextFile.ReadToString(_SourceFolder .. "\\Information.txt");

Reads the contents of the file "Information.txt" and stores the string in the variable text_contents.

Note: _SourceFolder is a built-in variable that contains the path to the folder where the autorun.exe file is located.

Example 2

-- Read the contents of a text file into a string.
contents = TextFile.ReadToString("C:\\MyFile.txt");

-- Check the error code of the last example.
error = Application.GetLastError();
-- If an error occurred, display the error message.
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);
else
-- Replace every occurrence of the string "Robert" with the string "Adam".
new_contents = String.Replace(contents, "Robert", "Adam", true);

-- Write out the modified contents of the text file.
TextFile.WriteFromString("C:\\MyFile.txt", new_contents, false);

-- Check the error code of the last example.
error = Application.GetLastError();
-- If an error occurred, display the error message.
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);
end
end

Reads the contents of the file "MyFile.txt" and stores the string in the variable "contents." Every occurrence of the string "Robert" in "contents" is replaced with the string "Adam" and then written back to the text file "MyFile.txt".


TextFile.ReadToTable Examples

TextFile.ReadToTable

table TextFile.ReadToTable (

string Filename )

Example 1

text_table = TextFile.ReadToTable(_SourceFolder .. "\\Information.txt");

Reads the contents of the file "Information.txt" and stores each line in the table "text_table."

Note: _SourceFolder is a built-in variable that contains the path to the folder where the autorun.exe file is located.

Example 2

-- Read the contents of a text file to a table.
text_contents = TextFile.ReadToTable("C:\\MyFile.txt");

-- Get the error code of the last action.
error = Application.GetLastError();

-- If an error occurred, display the error code message.
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);
else
-- Remove the second item in the table (second line in the text file).
Table.Remove(text_contents, 2);

-- Write out the modified text file.
TextFile.WriteFromTable("C:\\MyFile.txt", text_contents, false);

-- Get the error code of the last action.
error = Application.GetLastError();
-- If an error occurred, display the error code message.
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);
end
end

Reads the contents of a text file to a table. The second table entry (second line) is then removed and written back to the text file overwriting its current contents.


TextFile.WriteFromString Examples

TextFile.WriteFromString

TextFile.WriteFromString (

string Filename,

string Text,

boolean Append = false )

Example 1

TextFile.WriteFromString(_TempFolder .. "\\Information.txt", "Blue", false);

Writes the string "Blue" to the file "Information.txt" located in the user's temporary folder. The file's current contents will be overwritten.

Note: _TempFolder is a built-in variable that contains the path to the user's system "Temp" folder.

Example 2

TextFile.WriteFromString(_TempFolder .. "\\Information.txt", "Blue", true);

Appends the string "Blue" to the current contents of the file "Information.txt" located in the user's temporary folder.

Note: _TempFolder is a built-in variable that contains the path to the user's system "Temp" folder.

Example 3

-- Read the contents of a text file into a string.
contents = TextFile.ReadToString("C:\\MyFile.txt");

-- Check the error code of the last example.
error = Application.GetLastError();
-- If an error occurred, display the error message.
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);
else
-- Replace every occurrence of the string "Robert" with the string "Adam".
new_contents = String.Replace(contents, "Robert", "Adam", true);

-- Write out the modified contents of the text file.
TextFile.WriteFromString("C:\\MyFile.txt", new_contents, false);

-- Check the error code of the last example.
error = Application.GetLastError();
-- If an error occurred, display the error message.
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);
end
end

Reads the contents of the file "MyFile.txt" and stores the string in the variable "contents." Every occurrence of the string "Robert" in "contents" is replaced with the string "Adam" and then written back to the text file "MyFile.txt".


TextFile.WriteFromTable Examples

TextFile.WriteFromTable

TextFile.WriteFromTable (

string Filename,

table Table,

boolean Append = false )

Example 1

TextFile.WriteFromTable(_TempFolder .. "\\Information.txt", table_input, false);

Writes out the contents of the "table_input" table to the file "Information.txt" located in the user's temporary folder. The table consists of one line of text per table item. Any current text within "Information.txt" will be overwritten.

Note: _TempFolder is a built-in variable that contains the path to the user's system "Temp" folder.

Example 2

TextFile.WriteFromTable(_TempFolder .. "\\Information.txt", table_input, true);

Appends the contents of the "table_input" table to the file "Information.txt" located in the user's temporary folder. The table consists of one line of text per table item.

Note: _TempFolder is a built-in variable that contains the path to the user's system "Temp" folder.

Example 3

-- Read the contents of a text file to a table.
text_contents = TextFile.ReadToTable("C:\\MyFile.txt");

-- Get the error code of the last action.
error = Application.GetLastError();

-- If an error occurred, display the error code message.
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);
else
-- Remove the second item in the table (second line in the text file).
Table.Remove(text_contents, 2);

-- Write out the modified text file.
TextFile.WriteFromTable("C:\\MyFile.txt", text_contents, false);

-- Get the error code of the last action.
error = Application.GetLastError();
-- If an error occurred, display the error code message.
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);
end
end

Reads the contents of a text file to a table. The second table entry (second line) is then removed and written back to the text file overwriting its current contents.


Tree.CollapseNode Examples

Tree.CollapseNode

Tree.CollapseNode (

string ObjectName,

string NodeIndex )

Example 1

Tree.CollapseNode("Tree1", "1.1");

Collapses the first sub-node of the first node in the "Tree1" tree object.


Tree.EnsureVisible Examples

Tree.EnsureVisible

Tree.EnsureVisible (

string ObjectName,

string NodeIndex )

Example 1

Tree.EnsureVisible("Tree1", "2.1.3");

Ensures the node with index "2.1.3" is visible in the "Tree1" tree object.


Tree.ExpandNode Examples

Tree.ExpandNode

Tree.ExpandNode (

string ObjectName,

string NodeIndex )

Example 1

Tree.ExpandNode("Tree1", "1");

Expands the node with index "1" in the "Tree1" tree object.


Tree.FindNodeByData Examples

Tree.FindNodeByData

string Tree.FindNodeByData (

string ObjectName,

string StartNodeIndex,

string Data )

Example 1

sNodeIndex = Tree.FindNodeByData("Tree1", "I am data!!");

Retrieves the node index of a node in the tree "Tree1", with the data "I am data!!".


Tree.FindNodeByText Examples

Tree.FindNodeByText

string Tree.FindNodeByText (

string ObjectName,

string StartNodeIndex,

string Text )

Example 1

-- Search for the text
NodeFound = Tree.FindNodeByText("Tree1", "Some Item");

-- check if there was a result
if NodeFound == "" then
-- The node was not found
else
-- The node was found and its index is stored in NodeFound
end

Searches the "Tree1" tree object for a node with text matching "Some Item".


Tree.GetChildCount Examples

Tree.GetChildCount

number Tree.GetChildCount (

string ObjectName,

string ParentNodeIndex )

Example 1

-- Get the child count of 'Tree1'
ChildCount = Tree.GetChildCount("Tree1", "1");

-- Check for number of elements
if ChildCount > 0 then
-- The node has at least one child
else
-- The node has no children
end

Gets the number of children under the node "1" of the "Tree1" tree object.


Tree.GetChildren Examples

Tree.GetChildren

table Tree.GetChildren (

string ObjectName,

string ParentNodeIndex )

Example 1

tChildrenOfNode1 = Tree.GetChildren("Tree1", "1");

Gets the children of node "1" from the tree object "Tree1" and stores them in the numerically indexed table "tChildrenOfNode1".


Tree.GetNode Examples

Tree.GetNode

table Tree.GetNode (

string ObjectName,

string NodeIndex )

Example 1

-- Get the node properties
NodeProperties = Tree.GetNode("Tree1", "2");

-- Check if selected
if NodeProperties.Selected then
-- Node is currently selected
else
-- Node is currently NOT selected
end

Gets the node properties of node "2" from the "Tree1" tree object, and checks if the node is selected.


Tree.GetPos Examples

Tree.GetPos

table Tree.GetPos (

string ObjectName )

Example 1

tPosition = Tree.GetPos("Tree1");

Gets the current X, Y coordinates of the "Tree1" tree object and stores the results in a table called "tPosition." These values can be accessed by referencing tPosition.X and tPosition.Y.


Tree.GetProperties Examples

Tree.GetProperties

table Tree.GetProperties (

string ObjectName )

Example 1

tTreeProperties = Tree.GetProperties("Tree1");

Gets the properties of the "Tree1" tree object and stores them in table "tTreeProperties".

Example 2

tProps = Tree.GetProperties("CanYouSeeMe");

if tProps.Visible and tProps.Enabled then
-- The tree object is both enabled and visible
else
-- The tree object is either not visible, not enabled, or both
tProps.Visible = true;
tProps.Enabled = true;

-- Apply the new properties to the tree object.
Tree.SetProperties("CanYouSeeMe", tProps);

end

Checks the properties of the "CanYouSeeMe" tree object to see if it is enabled and visible. If it is not both enabled and visible, it is made to be both enabled and visible.


Tree.GetSelectedNode Examples

Tree.GetSelectedNode

string Tree.GetSelectedNode (

string ObjectName )

Example 1

-- Get the selected item's node index
sNodeIndex = Tree.GetSelectedNode("Tree1");

-- Get the properties of the currently selected item
tProps = Tree.GetNode("Tree1", sNodeIndex);

Gets the properties of the currently selected item in the "Tree1" tree object and stores them in table "tProps".


Tree.GetSize Examples

Tree.GetSize

table Tree.GetSize (

string ObjectName )

Example 1

Size = Tree.GetSize("Tree1");

if Size.Width > 100 then
-- the object is currently greater than 100 pixels wide
end

Gets the size of the "Tree1" tree object and compares its width to a predetermined value.


Tree.InsertNode Examples

Tree.InsertNode

string Tree.InsertNode (

string ObjectName,

string NodeIndex,

table NodeData )

Example 1

sInsertedIndex = Tree.InsertNode("Tree1", "2.1", tInsertNodeData);

Inserts a node with data "tInsertNodeData" into the tree object "Tree1" at node index "2.1".

Example 2

-- Initialize node data table
tblNodeData = {};
tblNodeData.Text = "IndigoRose";
tblNodeData.Data = "Makes Quality Software";
tblNodeData.Expanded = true;
tblNodeData.NodeIndex = "1.5.1";
tblNodeData.ImageIndex = 1;
tblNodeData.SelectedImageIndex = 2;

-- Insert the node
Tree.InsertNode("Tree1", "1.5.1",tblNodeData);

Inserts a node into the "Tree1" tree object at index "1.5.1" consisting of the data found in table tblNodeData.

Example 3

sInsertedIndex = Tree.InsertNode("MyTree", "1", {Text="test",Data="test",Checked=true});

Inserts a node with the data as an inline table into the tree object "MyTree" at node index "1".


Tree.IsEnabled Examples

Tree.IsEnabled

boolean Tree.IsEnabled (

string ObjectName )

Example 1

tree_enabled = Tree.IsEnabled("Tree1");

Stores true in a variable named "tree_enabled" if the "Tree1" tree object is enabled, and false if it is disabled.

Example 2

bTree2Enabled = Tree.IsEnabled("Tree2");

Checks whether the "Tree2" video object is enabled or disabled, and sets the "bTree2Enabled" variable to either true or false accordingly.

Tip: Starting a variable name with "b" is a technique that programmers use to help themselves remember that a variable contains a boolean value.


Tree.IsVisible Examples

Tree.IsVisible

boolean Tree.IsVisible (

string ObjectName )

Example 1

visible = Tree.IsVisible("Tree1");

Checks whether the tree object called "Tree" is visible and stores true or false in a variable called "visible."

Example 2

bTree5isVisible = Tree.IsVisible("Tree5");

Stores true in "bTree5isVisible" if the "Tree5" tree object is visible.

Tip: Starting a variable name with "b" is a technique that programmers use to help themselves remember that a variable contains a boolean value.


Tree.RemoveNode Examples

Tree.RemoveNode

Tree.RemoveNode (

string ObjectName,

string NodeIndex )

Example 1

Tree.RemoveNode("Tree1", "2.1");

Removes the node at index "2.1" from the "Tree1" tree object.

Example 2

-- Count the number of items
nItemCount = Tree.GetChildCount("Tree1", "0");

-- Check that no error occured (-1) and that items exist (0)
if nItemCount ~= -1 and nItemCount ~= 0 then
-- Moving from the last item to the first, remove items
for nCount=nItemCount, 1, -1 do
Dialog.Message(nCount, nCount);
Tree.RemoveNode("Tree1", nCount);
end
end

Removes all parent nodes in reverse order.


Tree.SetEnabled Examples

Tree.SetEnabled

Tree.SetEnabled (

string ObjectName,

boolean Enabled = true )

Example 1

Tree.SetEnabled("Tree1", true);

Enables the tree object named "Tree1."

Example 2

Tree.SetEnabled("Tree4", false);

Disables the tree object named "Tree4."


Tree.SetNode Examples

Tree.SetNode

Tree.SetNode (

string ObjectName,

string NodeIndex,

table Data )

Example 1

Tree.SetNode("Tree1", "2.1", tNodeDataToSet);

Sets the node at "2.1" in the "Tree1" tree object to use the data/properties found in the table "tNodeDataToSet".


Tree.SetPos Examples

Tree.SetPos

Tree.SetPos (

string ObjectName,

number X,

number Y )

Example 1

Tree.SetPos("Set Me", 100, 150);

Sets the "Set Me" tree object's X coordinate to 100 pixels and the Y coordinate to 150.

Example 2

Tree.SetPos("Move Me", 0, 0);

Sets the "Move Me" tree object's X coordinate to 0 and the Y coordinate to 0. The tree object will be moved to the upper left hand corner of the page from it's current position.


Tree.SetProperties Examples

Tree.SetProperties

Tree.SetProperties (

string ObjectName,

table Properties )

Example 1

Tree.SetProperties("Deciduous", tProperties);

Sets the properties of the "Deciduous" tree object to those found in table "tProperties".

Example 2

tProps = Tree.GetProperties("CanYouSeeMe");

if tProps.Visible and tProps.Enabled then
-- The tree object is both enabled and visible
else
-- The tree object is either not visible, not enabled, or both
tProps.Visible = true;
tProps.Enabled = true;

-- Apply the new properties to the tree object.
Tree.SetProperties("CanYouSeeMe", tProps);
end

Checks the properties of the "CanYouSeeMe" tree object to see if it is enabled and visible. If it is not both enabled and visible, it is made to be both enabled and visible.


Tree.SetSelectedNode Examples

Tree.SetSelectedNode

Tree.SetSelectedNode (

string ObjectName,

string NodeIndex )

Example 1

Tree.SetSelectedNode("Tree1", "2.1.3");

Sets the selected node of "Tree1" to node index "2.1.3".

Example 2

Tree.SetSelectedNode("Tree1", "");

Clears the selection of "Tree1".


Tree.SetSize Examples

Tree.SetSize

Tree.SetSize (

string ObjectName,

number Width,

number Height )

Example 1

Tree.SetSize("Grower", 100, 150);

Sets the "Grower" tree object's width to 100 pixels and it's height to 150 pixels.

Example 2

Tree.SetSize("Expand", Tree.GetSize("Expand").Width + 200, Tree.GetSize("Expand").Height + 100);

Increases the "Expand" tree object's current width by 200 pixels and it's current height by 100 pixels. The Tree.GetSize action is used here to get the current size of the tree object.


Tree.SetVisible Examples

Tree.SetVisible

Tree.SetVisible (

string ObjectName,

boolean Visible = true )

Example 1

Tree.SetVisible("Tree3", true);

Makes the "Tree3" tree object visible.

Example 2

Tree.SetVisible("Tree1", false);

Hides the tree object named "Tree1."

Example 3

Tree.SetVisible( "Oak", not Tree.IsVisible("Oak") );

Toggles the visibility of the tree object named "Oak." In other words, if "Oak" is visible, hide it; and if it's not visible, show it.

Note: The not operator is used in this example to convert the result of the Tree.IsVisible action to its logical opposite. If Tree.IsVisible returns true, the not converts that true into a false; if Tree.IsVisible returns false, the not converts that false into a true. The result is then used as the second parameter in our Tree.SetVisible action. So, the Tree.SetVisible action sets the visibility of "Oak" to true or false, based on whether "Oak" is currently visible or not, essentially toggling its visibility between on or off.


Tree_[Node_Index]

Node Index

Overview

In a tree object, a node is an item in the tree. Every node in a tree can be referenced to in actions by its node index. Each node index is made up of numbers and periods, with the exception of top-level node indexes, which are numbers only.

As the following example illustrates, each node in a tree has a unique node index:

Note: If a sub item (Sub Item 2a) were to be added to Sub Item 2, its node index would be "1.2.1". Likewise, if a second sub item (Sub Item 1b) were to be added to Sub Item 1 in the example above, its node index would be "1.1.2". Lastly, if a third top-level node (Item 3) were added, its node index would be "3".


Video.GetCurrentPos Examples

Video.GetCurrentPos

number Video.GetCurrentPos (

string ObjectName )

Example 1

cur_time = Video.GetCurrentPos("Movie");

Retrieves the current time position of the video in the "Movies" video object and stores it in a variable called cur_time.


Video.GetFilename Examples

Video.GetFilename

string Video.GetFilename (

string ObjectName )

Example 1

file = Video.GetFilename("Video1");

Gets the path to the file currently loaded in the video object called "Video1" and stores it in a variable called "file."


Video.GetLength Examples

Video.GetLength

number Video.GetLength (

string ObjectName )

Example 1

total_time = Video.GetLength("Intro Vid");

Retrieves the length of the video in the "Intro Vid" video object and stores it in a variable called total_time.


Video.GetPos Examples

Video.GetPos

table Video.GetPos (

string ObjectName )

Example 1

Vid_Pos = Video.GetPos("Intro Video");

Gets the current X, Y coordinates of the "Intro Video" video object and stores the results in a table called "Vid_Pos." These values can be accessed by referencing Vid_Pos.X and Vid_Pos.Y.


Video.GetProperties Examples

Video.GetProperties

table Video.GetProperties (

string ObjectName )

Example 1

tProperties = Video.GetProperties("Video1");

Gets the properties from the video object 'Video1' and stores them in the table 'tProperties'.


Video.GetSize Examples

Video.GetSize

table Video.GetSize (

string ObjectName )

Example 1

vid_size = Video.GetSize("Product Vid");

Gets the pixel dimensions of the "Product Vid" video object and stores the width and height values in the "vid_size" table. The dimensions can be accessed by referencing vid_size.Width and vid_size.Height.


Video.GetState Examples

Video.GetState

number Video.GetState (

string ObjectName )

Example 1

intro_state = Video.GetState("Intro Video");

Gets the current state of the video object named "Intro Video" and stores it in the "intro_state" variable.

Example 2

if Video.GetState("Intro Video") == VIDEO_PLAYING then Debug.Print("\r\nIntro Video playing ok...") end

Prints "Intro Video playing ok..." to the debug window if the video object named "Intro Video" is currently playing.


Video.GetVolume Examples

Video.GetVolume

number Video.GetVolume (

string ObjectName )

Example 1

vid_volume = Video.GetVolume("Presentation");

Gets the volume of the "Presentation" video object and stores it in the variable vid_volume.


Video.IsEnabled Examples

Video.IsEnabled

boolean Video.IsEnabled (

string ObjectName )

Example 1

intro_video_enabled = Video.IsEnabled("Intro Video");

Stores true in a variable named "intro_video_enabled" if the "Intro Video" video object is enabled, and false if it is disabled.

Example 2

bVideo2Enabled = Video.IsEnabled("Video2");

Checks whether the "Video2" video object is enabled or disabled, and sets the "bVideo2Enabled" variable to either true or false accordingly.

Tip: Starting a variable name with "b" is a technique that programmers use to help themselves remember that a variable contains a boolean value.


Video.IsFullScreen Examples

Video.IsFullScreen

boolean Video.IsFullScreen (

string ObjectName )

Example 1

full_screen = Video.IsFullScreen("Intro Video");

Stores true in a variable named "full_screen" if the "Intro Video" video object is running in full screen mode, and false if it isn't.

Example 2

bVideo2FullScreen = Video.IsFullScreen("Video2");

Checks whether the "Video2" video object is in full screen mode, and sets the "bVideo2FullScreen" variable to either true or false accordingly.

Tip: Starting a variable name with "b" is a technique that programmers use to help themselves remember that a variable contains a boolean value.


Video.IsVisible Examples

Video.IsVisible

boolean Video.IsVisible (

string ObjectName )

Example 1

tour_visible = Video.IsVisible("Video Tour");

Checks whether the video object called "Video Tour" is visible and stores true or false in a variable called "tour_visible."

Example 2

bVideo5isVisible = Video.IsVisible("Video5");

Stores true in "bVideo5isVisible" if the "Video5" video object is visible.

Tip: Starting a variable name with "b" is a technique that programmers use to help themselves remember that a variable contains a boolean value.


Video.Load Examples

Video.Load

Video.Load (

string ObjectName,

string Filename,

boolean PlayAutomatic = false,

boolean Loop = false )

Example 1

Video.Load("Video Intro", "AutoPlay\\Videos\\intro.mpg", true);

Loads "AutoPlay\Videos\intro.mpg" into the "Video Intro" video object, and starts to play it automatically.

Example 2

Video.Load("Video1", "AutoPlay\\Extended Movies\\why_cows_hate_snow.avi");

Loads the "AutoPlay\Extended Movies\why_cows_hate_snow.avi" file into the video object named "Video1."


Video.Pause Examples

Video.Pause

Video.Pause (

string ObjectName )

Example 1

Video.Pause("Intro Video");

Pauses the video that is currently loaded in the "Intro Video" video object.

Example 2

Video.Pause("Video1");

Pauses the "Video1" video object.


Video.Play Examples

Video.Play

Video.Play (

string ObjectName )

Example 1

Video.Play("Intro Video");

Starts playing the video that is currently loaded in the "Intro Video" video object.

Example 2

Video.Play("Video2");

Starts playing the "Video2" video object.


Video.Seek Examples

Video.Seek

Video.Seek (

string ObjectName,

number SeekType,

number SeekTime = 0 )

Example 1

Video.Seek("Video2", 2, 5); -- seek ahead 5 seconds

Skips ahead to a position 5 seconds later than the current position in the "Video2" video object.

Example 2

Video.Seek("Intro Video", 0); -- rewind the video

Seeks to the beginning of the "Intro Video" video object.

Example 3

Video.Seek("Video1", 4, 42.35);

Seeks directly to 42.35 seconds from the start of the "Video1" video object.


Video.SetEnabled Examples

Video.SetEnabled

Video.SetEnabled (

string ObjectName,

boolean Enabled = true )

Example 1

Video.SetEnabled("License Agreement", true);

Enables the video object named "License Agreement."

Example 2

Video.SetEnabled("Video4", false);

Disables the video object named "Video4."


Video.SetFullScreen Examples

Video.SetFullScreen

Video.SetFullScreen (

string ObjectName,

boolean Fullscreen = true )

Example 1

Video.SetFullScreen("Video3", true);

Sets the "Video3" video object to play in full screen mode.

Example 2

Video.SetFullScreen("Intro Video", false);

Sets the video object named "Intro Video" to just play normally.

Example 3

Video.SetFullScreen("Video12");

Sets the video object named "Video12" to play in full screen mode.

Example 4

Video.SetFullScreen( "Running Dude", not Video.IsFullScreen("Running Dude") );

Toggles the video object named "Running Dude" between full screen mode and normal mode. In other words, if "Running Dude" is currently in full screen mode, make it normal; and if it's currently in normal mode, make it full screen.

Note: The not operator is used in this example to convert the result of the Video.IsFullScreen action to its logical opposite. If Video.IsFullScreen returns true, the not converts that true into a false; if Video.IsFullScreen returns false, the not converts that false into a true. The result is then used as the second parameter in our Video.SetFullScreen action. So, the Video.SetFullScreen action sets the full screen mode of "Running Dude" to true or false, based on whether "Running Dude" is currently in full screen mode or not, essentially toggling its full screen mode between on or off.


Video.SetPos Examples

Video.SetPos

Video.SetPos (

string ObjectName,

number X,

number Y )

Example 1

Video.SetPos("Set Me", 100, 150);

Sets the "Set Me" video object's X coordinate to 100 pixels and the Y coordinate to 150.

Example 2

Video.SetPos("Move Me", 0, 0);

Sets the "Move Me" video object's X coordinate to 0 and the Y coordinate to 0. The video object will be moved to the upper left hand corner of the page from it's current position.


Video.SetProperties Examples

Video.SetProperties

Video.SetProperties (

string ObjectName,

table Properties )

Example 1

Video.SetProperties("Introduction", tIntroProperties);

Sets the properties of the introduction video object to the values contained in table 'tIntroProperties'.


Video.SetSize Examples

Video.SetSize

Video.SetSize (

string ObjectName,

number Width,

number Height )

Example 1

Video.SetSize("Grower", 100, 150);

Sets the "Grower" video object's width to 100 pixels and it's height to 150 pixels.

Example 2

Video.SetSize("Expand", Video.GetSize("Expand").Width + 200, Video.GetSize("Expand").Height + 100);

Increases the "Expand" video object's current width by 200 pixels and it's current height by 100 pixels. The Video.GetSize action is used here to get the current size of the video object.


Video.SetVisible Examples

Video.SetVisible

Video.SetVisible (

string ObjectName,

boolean Visible = true )

Example 1

Video.SetVisible("Video3", true);

Makes the "Video3" video object visible.

Example 2

Video.SetVisible("Intro Video", false);

Hides the video object named "Intro Video."

Example 3

Video.SetVisible("Video12");

Makes the video object named "Video12" visible.

Example 4

Video.SetVisible( "Running Dude", not Video.IsVisible("Running Dude") );

Toggles the visibility of the video object named "Running Dude." In other words, if "Running Dude" is visible, hide it; and if it's not visible, show it.

Note: The not operator is used in this example to convert the result of the Video.IsVisible action to its logical opposite. If Video.IsVisible returns true, the not converts that true into a false; if Video.IsVisible returns false, the not converts that false into a true. The result is then used as the second parameter in our Video.SetVisible action. So, the Video.SetVisible action sets the visibility of "Running Dude" to true or false, based on whether "Running Dude" is currently visible or not, essentially toggling its visibility between on or off.


Video.SetVolume Examples

Video.SetVolume

Video.SetVolume (

string ObjectName,

number Volume )

Example 1

Video.SetVolume("Overview", 50);

Sets the volume of the video object called "Overview" to 50%.


Video.Stop Examples

Video.Stop

Video.Stop (

string ObjectName )

Example 1

Video.Stop("Video Intro");

Stops playing the video in the "Video Intro" video object.

Example 2

Video.Stop("Video1");

Stops playing the "Video1" video object.


Web.Back Examples

Web.Back

Web.Back (

string ObjectName )

Example 1

Web.Back("Web1");

Navigates one page back in the web object named "Web1."

Example 2

Web.Back("Forum");

Navigates one page back in the "Forum" web object.


Web.Forward Examples

Web.Forward

Web.Forward (

string ObjectName )

Example 1

Web.Forward("Web1");

Navigates one page forward in the web object named "Web1."

Example 2

Web.Forward("Forum");

Navigates one page forward in the "Forum" web object.


Web.GetPos Examples

Web.GetPos

table Web.GetPos (

string ObjectName )

Example 1

Web_Pos = Web.GetPos("Web Viewer");

Gets the current X, Y coordinates of the "Web Viewer" web object and stores the results in a table called "Web_Pos." These values can be accessed by referencing Web_Pos.X and Web_Pos.Y.


Web.GetProperties Examples

Web.GetProperties

table Web.GetProperties (

string ObjectName )

Example 1

-- get the currently loaded URL
sURL = Web.GetProperties("Web1").URL;

-- Open the url in an external web browser
File.OpenURL(sURL, SW_SHOWNORMAL);

Opens a URL displayed in a web object in an external web browser.


Web.GetSize Examples

Web.GetSize

table Web.GetSize (

string ObjectName )

Example 1

web_size = Web.GetSize("Product Site");

Gets the pixel dimensions of the "Product Site" web object and stores the width and height values in the "web_size" table. The dimensions can be accessed by referencing web_size.Width and web_size.Height.


Web.GetURL Examples

Web.GetURL

string Web.GetURL (

string ObjectName )

Example 1

current_url = Web.GetURL("Web1");

Gets the URL of the web page that is currently displayed in the web object named "Web1" and stores it in a variable named "current_url."

Example 2

urlOrderForm = Web.GetURL("Online Order Form");

Gets the URL of the page that is currently loaded in the "Online Order Form" web object and stores it in a variable called "urlOrderForm."

Tip: Starting a variable name with a prefix like "url" is a technique that programmers use to help themselves remember what kind of data a variable contains—in this case, the "url" in the variable name is a reminder that the variable contains a URL.


Web.IsEnabled Examples

Web.IsEnabled

boolean Web.IsEnabled (

string ObjectName )

Example 1

order_form_enabled = Web.IsEnabled("Online Order Form");

Stores true in a variable named "order_form_enabled" if the "Online Order Form" web object is enabled, and false if it is disabled.

Example 2

bWeb2Enabled = Web.IsEnabled("Web2");

Checks whether the "Web2" web object is enabled or disabled, and sets the "bWeb2Enabled" variable to either true or false accordingly.

Tip: Starting a variable name with "b" is a technique that programmers use to help themselves remember that a variable contains a boolean value.


Web.IsSilent Examples

Web.IsSilent

boolean Web.IsSilent (

string ObjectName )

Example 1

order_form_silent = Web.IsSilent("Online Order Form");

Checks whether the web object called "Online Order Form" is silent and stores true or false in a variable called "order_form_silent."


Web.IsVisible Examples

Web.IsVisible

boolean Web.IsVisible (

string ObjectName )

Example 1

order_form_visible = Web.IsVisible("Online Order Form");

Checks whether the web object called "Online Order Form" is visible and stores true or false in a variable called "order_form_visible."

Example 2

bWeb2isVisible = Web.IsVisible("Web2");

Stores true in bWeb2isVisible if the "Web2" web object is visible.

Tip: Starting a variable name with "b" is a technique that programmers use to help themselves remember that a variable contains a boolean value.


Web.LoadHTML Examples

Web.LoadHTML

boolean Web.LoadHTML (

string ObjectName,

string HTML )

Example 1

Web.LoadHTML("Web1", "<html><body><p>No need for a temp file.</p></body></html>");

Sets the HTML of the "Web1" web object to be: <html><body><p>No need for a temp file.</p></body></html>. This will display the following text to the end user in the web object: "No need for a temp file."

Example 2

local strHTML = ParseRSSXML(GetPluginRSSXML(__tbComboData[strItem]), HTMLChannelParser, HTMLItemParser)

if ((strHTML) and (strHTML ~= "")) then
Web.LoadHTML("webOutput", strHTML)
end

Loads the HTML returned by the ParseRSSXML() function into the "webOutput" web object, after ensuring that the returned value is valid and not a blank string.


Web.LoadURL Examples

Web.LoadURL

Web.LoadURL (

string ObjectName,

string URL )

Example 1

Web.LoadURL("Web1", "www.indigorose.com");

Loads "www.indigorose.com" into the "Web1" web object.

Example 2

Web.LoadURL("Forum", "http://www.indigorose.com/ubbthreads/ubbthreads.php");

Loads "http://www.indigorose.com/ubbthreads/ubbthreads.php" (which is the URL for the IndigoRose user forums) into the "Forum" web object.

Example 3

Web.LoadURL("Web1", _SourceFolder.."\\AutoPlay\\Docs\\index.html#intro");

Loads a local file named "index.html" into the "Web1" web object and navigates to the anchor named "intro" within that file.

Note: Since navigating to a named anchor within a file requires the full path, the global variable _SourceFolder is used.


Web.Print Examples

Web.Print

Web.Print (

string ObjectName,

boolean DefaultPrinter = true )

Example 1

Web.Print("Online Order Form", false);

Prints the current contents of the web object named "Online Order Form," displaying a "Print" dialog first so the user can select the printer they want to use.

Example 2

Web.Print("Web4");

Automatically prints the web page that is currently in the "Web4" web object, using the user's default printer.


Web.Refresh Examples

Web.Refresh

Web.Refresh (

string ObjectName )

Example 1

Web.Refresh("Web1");

Refreshes the web page that is currently displayed in the web object named "Web1."

Example 2

Web.Refresh("Online Order Form");

Refreshes the page that is currently loaded in the "Online Order Form" web object.


Web.SetEnabled Examples

Web.SetEnabled

Web.SetEnabled (

string ObjectName,

boolean Enabled = true )

Example 1

Web.SetEnabled("Online Order Form", true);

Enables the web object named "Online Order Form."

Example 2

Web.SetEnabled("Web4", false);

Disables the web object named "Web4."


Web.SetPos Examples

Web.SetPos

Web.SetPos (

string ObjectName,

number X,

number Y )

Example 1

Web.SetPos("Set Me", 100, 150);

Sets the "Set Me" web object's X coordinate to 100 pixels and the Y coordinate to 150.

Example 2

Web.SetPos("Move Me", 0, 0);

Sets the "Move Me" web object's X coordinate to 0 and the Y coordinate to 0. The web object will be moved to the upper left hand corner of the page from it's current position.


Web.SetProperties Examples

Web.SetProperties

Web.SetProperties (

string ObjectName,

table Properties )

Example 1

Web.SetProperties("Web1", {URL="www.indigorose.com"});

Change the currently loaded website in the web object 'Web1'.


Web.SetSilent Examples

Web.SetSilent

Web.SetSilent (

string ObjectName,

boolean Silent = true )

Example 1

Web.SetSilent("Web3", true);

Makes the "Web3" web object silent.


Web.SetSize Examples

Web.SetSize

Web.SetSize (

string ObjectName,

number Width,

number Height )

Example 1

Web.SetSize("Grower", 100, 150);

Sets the "Grower" web object's width to 100 pixels and it's height to 150 pixels.

Example 2

Web.SetSize("Expand", Web.GetSize("Expand").Width + 200, Web.GetSize("Expand").Height + 100);

Increases the "Expand" web object's current width by 200 pixels and it's current height by 100 pixels. The Web.GetSize action is used here to get the current size of the web object.


Web.SetVisible Examples

Web.SetVisible

Web.SetVisible (

string ObjectName,

boolean Visible = true )

Example 1

Web.SetVisible("Web3", true);

Makes the "Web3" web object visible.

Example 2

Web.SetVisible("Readme", false);

Hides the web object named "Readme."

Example 3

Web.SetVisible("Web12");

Makes the web object named "Web12" visible.


Web.Stop Examples

Web.Stop

Web.Stop (

string ObjectName )

Example 1

Web.Stop("Web1");

Stops downloading the web page in the web object named "Web1."

Example 2

Web.Stop("Online Order Form");

Stops downloading the page that is currently being downloaded in the "Online Order Form" web object.


Window.Close Examples

Window.Close

Window.Close (

number WndHandle,

number Method = CLOSEWND_SENDMESSAGE )

Example 1

Window.Close(app_handle, CLOSEWND_SENDMESSAGE);

Sends a close message to the program whose window handle is stored in the variable "app_handle."

Example 2

Window.Close(app_handle, CLOSEWND_TERMINATE);

Terminates the process of the program whose window handle is stored in the variable "app_handle."

Example 3

-- Get the titles and window handles of all open windows.
windows = Window.EnumerateTitles();

-- A variable containing text in the title you want to search for.
window_name = "Notepad";

-- Loop through the table of windows.
for handle, title in pairs(windows) do

-- Check if the window title has the target text.
result = String.Find(title, window_name, 1, false);

-- if the string was found in the title, send the window a close message.
if (result ~= -1) then
Window.Close(handle, CLOSEWND_SENDMESSAGE);
end
end

Finds all open windows with the string "Notepad" in the title and sends each of them a close message.


Window.EnumerateProcesses Examples

Window.EnumerateProcesses

table Window.EnumerateProcesses (

boolean TopLevel = true )

Example 1

open_processes = Window.EnumerateProcesses();

Gets the window handles and executable file paths for every process that is currently running and stores them in a table named open_processes.

Example 2

instances_of_file = 0;
file_to_check_for = "autorun.exe"; --have all lowercase
processes = Window.EnumerateProcesses();

for j, file_path in pairs(processes) do
file = String.SplitPath(file_path);
if (String.Lower(file.Filename..file.Extension)) == file_to_check_for then
instances_of_file = instances_of_file + 1;
end
end

if instances_of_file > 1 then
Window.Hide(Application.GetWndHandle());
Dialog.Message("Error", "Autorun already running: code: already running");
Window.Close(Application.GetWndHandle(), CLOSEWND_TERMINATE);
else
Window.Show(Application.GetWndHandle());
end

As an example, let us assume that you want to run your program, only if there is not another autorun.exe running on the system. To accomplish this, use the Window.EnumerateProcesses action, and check every process against the filename autorun.exe.


Window.EnumerateTitles Examples

Window.EnumerateTitles

table Window.EnumerateTitles (

boolean TopLevel = true )

Example 1

all_titles = Window.EnumerateTitles();

Gets the window handles and titles of all of the open windows on the user's system and stores them in a table called "all_titles."

Example 2

-- Get the titles and window handles of all open windows.
windows = Window.EnumerateTitles();

-- A variable containing text in the title you want to search for.
window_name = "Notepad";

-- Loop through the table of windows.
for handle, title in pairs(windows) do

-- Check if the window title has the target text.
result = String.Find(title, window_name, 1, false);

-- if the string was found in the title, send the window a close message.
if (result ~= -1) then
Window.Close(handle, CLOSEWND_SENDMESSAGE);
end
end

Finds all open windows with the string "Notepad" in the title and sends each of them a close message.


Window.GetPos Examples

Window.GetPos

table Window.GetPos (

number WndHandle )

Example 1

Acro_Pos = Window.GetPos(Acrobat_Handle);

Gets the current X, Y coordinates of the program whose window handle is stored in the variable "Acrobat_Handle" and stores the results in a table called "Acro_Pos." These values can be accessed by referencing Acro_Pos.X and Acro_Pos.Y.

Example 2

tPos = Window.GetPos(Application.GetWndHandle());

Gets the current X, Y coordinates of the AutoPlay application window and stores the results in a table called "tPos." These values can be accessed by referencing tPos.X and tPos.Y. This example uses the Application.GetWndHandle action to get the AutoPlay application's window handle.


Window.GetSize Examples

Window.GetSize

table Window.GetSize (

number WndHandle )

Example 1

app_size = Window.GetSize(app_handle);

Gets the pixel dimensions of the window whose handle is stored in "app_handle" and stores the width and height values in the "app_size" table. The dimensions can be accessed by referencing app_size.Width and app_size.Height.

Example 2

tWindowSize = Window.GetSize(Application.GetWndHandle());

Gets the pixel dimensions of the AutoPlay application window and stores the width and height values in the "tWindowSize" table. The dimensions can be accessed by referencing tWindowSize.Width and tWindowSize.Height. This action uses the Application.GetWndHandle to get the AutoPlay application's window handle.


Window.Hide Examples

Window.Hide

Window.Hide (

number WndHandle )

Example 1

Window.Hide(app_handle);

Hides the window of a program whose window handle is stored in the variable "app_handle."

Example 2

-- Get the AutoPlay application's window handle.
handle = Application.GetWndHandle();

-- Hide the AutoPlay application window.
Window.Hide(handle);

-- Sleep for 3 seconds.
Application.Sleep(3000);

-- Show the AutoPlay application window.
Window.Show(handle);

Gets the numeric window handle for the application window and stores it in the variable "handle." The window handle is then used to hide the window for 3 seconds.


Window.Maximize Examples

Window.Maximize

Window.Maximize (

number WndHandle )

Example 1

Window.Maximize(app_handle);

Maximizes the window of a program whose window handle is stored in the variable "app_handle."


Window.Minimize Examples

Window.Minimize

Window.Minimize (

number WndHandle )

Example 1

Window.Minimize(app_handle);

Minimizes the window of a program whose window handle is stored in the variable "app_handle."


Window.Restore Examples

Window.Restore

Window.Restore (

number WndHandle )

Example 1

Window.Restore(app_handle);

Restores the window of a program whose window handle is stored in the variable "app_handle."


Window.SetMask Examples

Window.SetMask

Window.SetMask (

number WindowHandle,

string MaskFile,

boolean FitToWindow = true,

number TransparentColor = 0 )

Example 1

-- Get the current application's window handle
nHandle = Application.GetWndHandle();

-- Specify the path to use
sMaskFilePath = _SourceFolder .. "\\Masks\\Mask1.jpg";

-- Apply the mask to the window
Window.SetMask(nHandle, sMaskFilePath, true, 0);

Applies the "Mask1.jpg" window mask to the current autoplay application.

Example 2

-- Apply the mask.jpg mask to the application window.
Window.SetMask(Application.GetWndHandle(), "Autoplay\\Images\\mask.jpg", true, 0);

Applies the "mask.jpg" window mask to the current autoplay application.


Window.SetOrder Examples

Window.SetOrder

Window.SetOrder (

number WndHandle,

number InsertAfter )

Example 1

Window.SetOrder(app_handle, after_me);

Sets the window whose handle is "app_handle" to be above the window whose handle is "after_me" in Z-Order.

Example 2

Window.SetOrder(app_handle, HWND_TOP);

Set's the window whose handle is stored in "app_handle" to have the highest Z-Order.


Window.SetPos Examples

Window.SetPos

Window.SetPos (

number WndHandle,

number X,

number Y )

Example 1

Window.SetPos(app_handle, 100, 150);

Sets a program window's X coordinate to 100 pixels and the Y coordinate to 150. The program's window handle is passed to the action through the variable "app_handle."

Example 2

Window.SetPos(app_handle, 0, 0);

Sets a program window's X coordinate to 0 and the Y coordinate to 0. The window will be moved to the upper left hand corner of the page from it's current position. The program's window handle is passed to the action through the variable "app_handle."


Window.SetSize Examples

Window.SetSize

Window.SetSize (

number WndHandle,

number Width,

number Height )

Example 1

Window.SetSize(app_handle, 100, 150);

Sets a program's window to a width of 100 pixels and a height of 150 pixels. The program's window handle is passed to the action through the variable "app_handle."


Window.SetText Examples

Window.SetText

Window.SetText (

number WndHandle,

string Text )

Example 1

Window.SetText(app_handle, "Mystery Application");

Sets a program's title bar text to the string "Mystery Application." The program's window handle is passed to the action through the variable "app_handle." This new text will display in the program's title bar and task bar.


Window.Show Examples

Window.Show

Window.Show (

number WndHandle )

Example 1

Window.Show(app_handle);

Shows the window of a program whose window handle is stored in the variable "app_handle."

Example 2

-- Get the AutoPlay application's window handle.
handle = Application.GetWndHandle();

-- Hide the AutoPlay application window.
Window.Hide(handle);

-- Sleep for 3 seconds.
Application.Sleep(3000);

-- Show the AutoPlay application window.
Window.Show(handle);

Gets the numeric window handle for the application window and stores it in the variable "handle." The window handle is then used to hide the window for 3 seconds.


xButton.GetImage Examples

xButton.GetImage

string xButton.GetImage (

string ObjectName )

Example 1

button_image = xButton.GetImage("xButton1");

Gets the path to the button image file currently displayed on the "xButton1" xButton object.


xButton.GetPos Examples

xButton.GetPos

table xButton.GetPos (

string ObjectName )

Example 1

Mustard = xButton.GetPos("Mustard Valve");

Gets the current X, Y coordinates of the "Mustard Valve" xButton object and stores the results in a table called "Mustard." These values can be accessed by referencing Mustard.X and Mustard.Y.


xButton.GetProperties Examples

xButton.GetProperties

table xButton.GetProperties (

string ObjectName )

Example 1

ButtonProperties = xButton.GetProperties("xButton1");

if ButtonProperties.Cursor == CURSOR_BLACK_ARROW then
-- The black arrow cursor is being used
end

if xButton.GetProperties("xButton1").FontItalic then
-- The xButton text is Italic
end

Retrieve various properties from the xButton object 'xButton1'.


xButton.GetSize Examples

xButton.GetSize

table xButton.GetSize (

string ObjectName )

Example 1

button_size = xButton.GetSize("Installer");

Gets the pixel dimensions of the "Installer" xButton object and stores the width and height values in the "button_size" table. The dimensions can be accessed by referencing button_size.Width and button_size.Height.


xButton.GetState Examples

xButton.GetState

number xButton.GetState (

string ObjectName )

Example 1

Mustard = xButton.GetState("Mustard Valve");

Gets the current state of the "Mustard Valve" xButton object and stores the result in Mustard.

Example 2

music_on = xButton.GetState("Music Toggle");

Gets the current state of the "Music Toggle" xButton object and stores the result (0 or 1) in music_on.


xButton.GetText Examples

xButton.GetText

string xButton.GetText (

string ObjectName )

Example 1

bt = xButton.GetText("Woohoo");

Gets the text that is on the xButton called "Woohoo" and stores it in the variable bt.

Example 2

big_butt_text = xButton.GetText("Big Button 4");

Gets the text on the "Big Button 4" xButton object and stores it in big_butt_text.

Example 3

xButton.SetText("xButton2", xButton.GetText("xButton1"));

Sets the text on xButton2 to be the same as the text on xButton1.


xButton.IsEnabled Examples

xButton.IsEnabled

boolean xButton.IsEnabled (

string ObjectName )

Example 1

enabledus_buttonis = xButton.IsEnabled("Fake Latin Toggle");

Stores true in enabledus_buttonis if the "Fake Latin Toggle" xButton object is enabled, and false if it is disabled.

Example 2

bMustardEnabled = xButton.IsEnabled("Mustard Valve");

Checks whether the "Mustard Valve" xButton object is enabled or disabled, and stores true or false in the bMustardEnabled variable accordingly.

Tip: Starting a variable name with "b" is a technique that programmers use to help themselves remember that a variable contains a boolean value.


xButton.IsVisible Examples

xButton.IsVisible

boolean xButton.IsVisible (

string ObjectName )

Example 1

i_see_dead_people = xButton.IsVisible("Sixed Cents");

Checks whether the xButton object called "Sixed Cents" is visible and stores true or false in the variable called i_see_dead_people.

Example 2

lookylooky = xButton.IsVisible("xButton21");

Stores true in lookylooky if the "xButton21" xButton object is visible or false if it is not.


xButton.SetEnabled Examples

xButton.SetEnabled

xButton.SetEnabled (

string ObjectName,

boolean Enabled = true )

Example 1

xButton.SetEnabled("xButton4", true);

Enables the xButton object named "xButton4."

Example 2

xButton.SetEnabled("My Lovely Little Button", false);

Disables the xButton named "My Lovely Little Button."


xButton.SetImage Examples

xButton.SetImage

xButton.SetImage (

string ObjectName,

string ButtonImage )

Example 1

xButton.SetImage("xButton1", "AutoPlay\\Images\\button_image.png");

Sets the image on the "xButton1" xButton object to "AutoPlay\Images\button_image.png."


xButton.SetPos Examples

xButton.SetPos

xButton.SetPos (

string ObjectName,

number X,

number Y )

Example 1

xButton.SetPos("Set Me", 100, 150 );

Sets the "Set Me" xButton object's X coordinate to 100 pixels and the Y coordinate to 150.

Example 2

xButton.SetPos("Move Me", 0, 0);

Sets the "Move Me" xButton object's X coordinate to 0 and the Y coordinate to 0. The xButton object will be moved to the upper left hand corner of the page from it's current position.


xButton.SetProperties Examples

xButton.SetProperties

xButton.SetProperties (

string ObjectName,

table Properties )

Example 1

-- Changes the font size of xButton1 to 99 pt
xButton.SetProperties("xButton1",{FontSize=99});

-- Change the text to "Hello World" and Width to 100
tblProperties = {Text="Hello World",Width=100};
xButton.SetProperties("xButton1",tblProperties);

Change the font size, text, and width of the xButton object 'xButton1'.


xButton.SetSize Examples

xButton.SetSize

xButton.SetSize (

string ObjectName,

number Width,

number Height )

Example 1

xButton.SetSize("Grower", 100, 150 );

Sets the "Grower" xButton object's width to 100 pixels and it's height to 150 pixels.

Example 2

xButton.SetSize("Expand", xButton.GetSize("Expand").Width + 200, xButton.GetSize("Expand").Height + 100);

Increases the"Expand" xButton object's current width by 200 pixels and it's current height by 100 pixels. The xButton.GetSize action is used here to get the current size of the xButton object.


xButton.SetState Examples

xButton.SetState

xButton.SetState (

string ObjectName,

number State = BTN_UP )

Example 1

xButton.SetState("TogglexButton1", BTN_DOWN);

Sets the "TogglexButton1" xButton object to the down state.

Example 2

xButton.SetState("Homer Donut 3", BTN_UP);

Sets the "Homer Donut 3" xButton object to the up state.


xButton.SetText Examples

xButton.SetText

xButton.SetText (

string ObjectName,

string Text )

Example 1

xButton.SetText("xButton1", "Click Here");

Changes the text on the xButton named "xButton1" to "Click Here".

Example 2

xButton.SetText("Sound Toggle Button", "Music On");

Changes the text on the xButton named "Sound Toggle Button" to "Music On".

Example 3

xButton.SetText("xButton1","<TextBlock>Button with <Hyperlink>Hyperlink</Hyperlink></TextBlock>");

This example sets the "xButton1" xButton object text to "Button with Hyperlink" assuming the object has markup enabled. See XML Syntax for more markup examples.


xButton.SetVisible Examples

xButton.SetVisible

xButton.SetVisible (

string ObjectName,

boolean Visible = true )

Example 1

xButton.SetVisible("xButton1", false);

Makes the "xButton1" xButton object invisible.


XML.Count Examples

XML.Count

number XML.Count (

string XMLPath,

string ElementName )

Example 1

-- This example assumes the sample XML is already loaded into memory.
-- Count the total number of elements in "database".
count = XML.Count("database", "*");

-- Display the count in a dialog message if no errors occurred.
if (count ~= -1) then
Dialog.Message("Count", "There are "..count.." elements in the database.");
end

Counts the total number of elements in "database" and shows the result in a dialog message.

Example 2

-- This example assumes the sample XML is already loaded into memory.
-- Count the number of "phone" elements in the first customer element.
count = XML.Count("database/customer", "phone");

-- Display the count in a dialog message if no errors occurred.
if (count ~= -1) then
Dialog.Message("Count", "There are "..count.." phone elements in the first customer element.");
end

Counts the number of "phone" elements in the first customer element and shows the result in a dialog message.


XML.GetAttribute Examples

XML.GetAttribute

string XML.GetAttribute (

string XMLPath,

string AttributeName )

Example 1

-- This example assumes the sample XML is already loaded into memory.

-- Get the value of the first customer id attribute.
attribute_result = XML.GetAttribute("database/customer", "id");

-- Perform some error checking.
error = Application.GetLastError();
if (error == 0) then
Dialog.Message("Attribute Value", "The first customer id is: "..attribute_result);
else
Dialog.Message("Error", _tblErrorMessages[error]);
end

Gets the value of the first customer id attribute and displays it in a dialog message.

Example 2

-- This example assumes the sample XML is already loaded into memory.

-- Get the value of the second customer product attribute.
attribute_result = XML.GetAttribute("database/customer:2", "product");

-- Perform some error checking.
error = Application.GetLastError();
if (error == 0) then
Dialog.Message("Attribute Value", "The second customer's product is: "..attribute_result);
else
Dialog.Message("Error", _tblErrorMessages[error]);
end

Gets the value of the second customer product attribute and displays it in a dialog message.


XML.GetAttributeNames Examples

XML.GetAttributeNames

table XML.GetAttributeNames (

string XMLPath )

Example 1

-- This example assumes the sample XML is already loaded into memory.

-- Return the names of the customer element's attributes.
customer_attributes = XML.GetAttributeNames("database/customer");

-- Perform some error checking.
error = Application.GetLastError();
if (error == 0) then
Dialog.Message("Element Attributes", "The two attribute names are: \r\n\r\n"..customer_attributes[1].."\r\n"..customer_attributes[2]);
else
Dialog.Message("Error", _tblErrorMessages[error]);
end

Gets the names of the customer element's attributes and displays them in a dialog message.


XML.GetElementNames Examples

XML.GetElementNames

table XML.GetElementNames (

string XMLPath,

boolean FullPaths = false

boolean IncludeIndices = false )

Example 1

-- This example assumes the sample XML is already loaded into memory.

-- Return the names of all of the child elements of address_info.
tbChild_elements = XML.GetElementNames("database/customer/address_info", false, true);

-- Perform some error checking.
error = Application.GetLastError();
-- If no errors occurred...
if (error == 0) then
if (tbChild_elements ~= nil) then

-- Convert the table to a return/newline delimited string to display in a dialog.
strChild_elements = Table.Concat(tbChild_elements, "\r\n", 1, TABLE_ALL);

-- Display a dialog message containing all child names.
Dialog.Message("Child Element Names", strChild_elements);
end
else
Dialog.Message("Error", _tblErrorMessages[error]);
end

Gets the names of all of the child elements of "addresss_info" including indices and shows them in a dialog message.


XML.GetElementXML Examples

XML.GetElementXML

string XML.GetElementXML (

string XMLPath )

Example 1

-- This example assumes the sample XML is already loaded into memory.

-- get the raw XML text of the 2nd customer element
strCustomerXML = XML.GetElementXML("database/customer:2");

error = Application.GetLastError();
if (error ~= XML.OK) then
Dialog.Message("Error", _tblErrorMessages[error]);
end

-- get the customer's name from the XML
strCustomerName = XML.GetValue("database/customer:2/first_name") ..
XML.GetValue("database/customer:2/last_name");

-- save the customer record as a separate XML document in C:\customer_records
TextFile.WriteFromString( "C:\\customer_records\\"..strCustomerName..".xml"
, strCustomerXML
, false );

Gets the customer's name from the XML and then saves the customer record as a separate XML document.


XML.GetValue Examples

XML.GetValue

string XML.GetValue (

string XMLPath )

Example 1

-- This example assumes the sample XML is already loaded into memory.

-- Gets the value in database/customer/first_name.
customer_name = XML.GetValue("database/customer/first_name");

-- If a value was returned, display it in a dialog message.
if (customer_name ~= "") then
Dialog.Message("Value","The customer's first name is "..customer_name);
else
Dialog.Message("Problem", "The customer name could not be located.");
end

Gets the value in "/database/customer/first_name" and shows it in a dialog message.

Example 2

-- This example assumes the sample XML is already loaded into memory.

-- Gets the second customer's second phone number.
customer_phone = XML.GetValue("database/customer:2/phone:2");

-- If a value was returned, display it in a dialog message.
if (customer_phone ~= "") then
Dialog.Message("Value","The customer's second phone number is "..customer_phone);
else
Dialog.Message("Problem", "The telephone number could not be located.");
end

Gets the second customer's second phone number and shows it in a dialog message.


XML.GetXML Examples

XML.GetXML

string XML.GetXML (

)

Example 1

-- Load an XML file into memory.
XML.Load(_TempFolder.."\\Sample2.xml");

-- Check if an error was returned.
error = Application.GetLastError();
-- If no errors occurred...
if (error == 0) then
-- Return the currently loaded XML in a string.
strXML = XML.GetXML();

-- See if any errors occurred. If no errors occurred, display the string.
error = Application.GetLastError();
if (error == 0) then
Dialog.Message("XML contents",strXML);
else
Dialog.Message("Error", _tblErrorMessages[error]);
end
else
Dialog.Message("Error", _tblErrorMessages[error]);
end

Loads an XML file into memory, gets that XML as a string and then shows it in a dialog message.


XML.InsertXML Examples

XML.InsertXML

XML.InsertXML (

string XMLPath,

string Text,

number InsertionMode )

Example 1

-- This example assumes the sample XML is already loaded into memory.

-- we'll use the debug window to show what's happening
Debug.ShowWindow(true);

-- get the raw XML for the first customer's address_info and display it in the debug window
strAddress = XML.GetElementXML("database/customer/address_info");

Debug.Print(strAddress.."\r\n\r\n");
-- insert a planet element right after the country element
Debug.Print("Inserting planet...\r\n");

XML.InsertXML("database/customer/address_info/country", "<planet>Earth</planet>", XML.INSERT_AFTER);

-- check for errors
error = Application.GetLastError();
-- If an error occurred, display the error message.
if (error == 0) then
Debug.Print("Planet inserted.\r\n\r\n");
else
Debug.Print("Error: ".. _tblErrorMessages[error] .. "\r\n");
end

-- get the raw XML again and display it in the debug window to show what has changed
strAddress = XML.GetElementXML("database/customer/address_info");
Debug.Print(strAddress.."\r\n\r\n");

Gets the raw XML for the first customer's address_info, inserts some new information in it and then gets the raw XML again to show the changes. All output is shown in the debug window.


XML.Load Examples

XML.Load

XML.Load (

string Filename )

Example 1

-- Load an XML file into memory.
XML.Load(_TempFolder.."\\Sample2.xml");

-- Check whether an error occurred
error = Application.GetLastError();
-- If no errors occurred...
if (error == XML.OK) then
-- get the current XML document as a string
strXML = XML.GetXML();

-- if no errors occurred, display the XML in a popup dialog
error = Application.GetLastError();
if (error == XML.OK) then
Dialog.Message("XML contents",strXML);
else
Dialog.Message("Error", _tblErrorMessages[error]);
end
else
Dialog.Message("Error", _tblErrorMessages[error]);
end

Loads an XML file into memory, gets that XML as a string, and then shows it in a dialog message.


XML.RemoveAttribute Examples

XML.RemoveAttribute

XML.RemoveAttribute (

string XMLPath,

string AttributeName )

Example 1

-- This example assumes the sample XML is already loaded into memory.

-- Return the currently loaded XML in a string.
strXML = XML.GetXML();

if (strXML ~= "") then
Dialog.Message("Original XML contents",strXML);
end

-- Removes the "product" attribute from the first customer.
XML.RemoveAttribute("database/customer", "product");

-- See if any errors occurred. If no errors occurred, display the string.
error = Application.GetLastError();
if (error == 0) then
-- Return the currently loaded(modified) XML in a string.
strXML = XML.GetXML();
if (strXML ~= "") then
Dialog.Message("Modified XML contents",strXML);
end
else
Dialog.Message("Error", _tblErrorMessages[error]);
end

Gets the contents of the currently loaded XML as a string and first shows it in a dialog message. The "product" attribute is then removed from the first customer and the new XML is then shown in a dialog message.


XML.RemoveElement Examples

XML.RemoveElement

XML.RemoveElement (

string XMLPath )

Example 1

-- This example assumes the sample XML is already loaded into memory.

-- Return the currently loaded XML in a string.
strXML = XML.GetXML();

if (strXML ~= "") then
Dialog.Message("Original XML contents",strXML);
end

-- Removes the address info element from the first customer entry.
XML.RemoveElement("database/customer/address_info");

-- See if any errors occurred. If no errors occurred, display the string.
error = Application.GetLastError();
if (error == 0) then
-- Return the currently loaded (modified) XML in a string.
strXML = XML.GetXML();
if (strXML ~= "") then
Dialog.Message("Modified XML contents",strXML);
end
else
Dialog.Message("Error", _tblErrorMessages[error]);
end

Gets the currently loaded XML as a string and first shows it in a dialog message. Next, the address info element is removed from the first customer entry and the XML is reloaded as a string. The final XML is then shown in a dialog message.


XML.Save Examples

XML.Save

XML.Save (

string Filename )

Example 1

-- This example assumes the sample XML is already loaded into memory.

-- Saves the currently loaded XML to a file in the user's temp folder.
XML.Save(_TempFolder.."\\Sample_XML_Save.xml");

-- Check to see if any errors occurred.
error = Application.GetLastError();
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error]);
end

Saves the currently loaded XML to a file in the user's temp folder.


XML.SetAttribute Examples

XML.SetAttribute

XML.SetAttribute (

string XMLPath,

string AttributeName,

string AttributeValue )

Example 1

-- This example assumes the sample XML is already loaded into memory.

-- Return the currently loaded XML in a string.
strXML = XML.GetXML();

if (strXML ~= "") then
Dialog.Message("Original XML contents",strXML);
end

-- Changes the second customer element's attribute id to "9999".
XML.SetAttribute("database/customer:2", "id", "9999");

-- See if any errors occurred. If no errors occurred, display the string.
error = Application.GetLastError();
if (error == 0) then
-- Return the currently loaded (modified) XML in a string.
strXML = XML.GetXML();
if (strXML ~= "") then
Dialog.Message("Modified XML contents",strXML);
end
else
Dialog.Message("Error", _tblErrorMessages[error]);
end

Gets the currently loaded XML as a string and shows it in a dialog message. Next, the second customer element's attribute id is changed to "9999" and the new XML is shown in a dialog message.


XML.SetValue Examples

XML.SetValue

XML.SetValue (

string XMLPath,

string Value,

boolean WriteCDATA = false )

Example 1

-- This example assumes the sample XML is already loaded into memory.

-- Return the currently loaded XML in a string.
strXML = XML.GetXML();

if (strXML ~= "") then
Dialog.Message("Original XML contents",strXML);
end

-- Sets the first customer element's company name to "New Company Name".
XML.SetValue("database/customer/company", "New Company Name");

-- See if any errors occurred. If no errors occurred, display the string.
error = Application.GetLastError();
if (error == 0) then
-- Return the currently loaded (modified) XML in a string.
strXML = XML.GetXML();
if (strXML ~= "") then
Dialog.Message("Modified XML contents",strXML);
end
else
Dialog.Message("Error", _tblErrorMessages[error]);
end

Gets the currently loaded XML as a string and shows it in a dialog message. Next the first customer element's company name is set to "New Company Name" and the new XML is shown in a dialog message.


XML.SetXML Examples

XML.SetXML

XML.SetXML (

string Text )

Example 1

-- Sets the currently loaded XML document to the text from a string.
XML.SetXML("MyValue1MyValue2");

-- Check if any errors occurred setting the XML.
error = Application.GetLastError();
if (error == 0) then
-- Return the currently loaded XML in a string.
strXML = XML.GetXML();

-- Display the XML contents in a dialog.
if (strXML ~= "") then
Dialog.Message("XML contents",strXML);
end
else
Dialog.Message("Error", _tblErrorMessages[error]);
end

Sets the currently loaded XML document to the text from a string and then shows its contents in a dialog message.


Zip.Add Examples

Zip.Add

Zip.Add (

string ZipFile,

table Files,

boolean IncludeFolderNames = true,

string Password = "",

number CompFactor = 5,

function CallbackFunction = nil,

boolean Recurse = false )

Example 1

FileTable = {_SourceFolder.."\\AutoPlay\\Docs\\Prices.txt", _SourceFolder.."\\AutoPlay\\Docs\\Catalog.txt"};
Zip.Add("C:\\CompanyInformation\\Info.zip", FileTable, false, "", 5, nil, false);

The first line adds the file paths of "Prices.txt" and "Catalog.txt" to the table called "FileTable." The second line contains the Zip.Add action that adds the files from the "FileTable" table to the Zip file called "Info.zip."

Example 2

Zip.Add("C:\\CompanyInformation\\Info.zip", {_SourceFolder.."\\AutoPlay\\Docs\\*.*"}, true, "", 5, nil, true);

Adds all files in the "Docs" folder and all of it's subfolders to the Zip archive called "Info.zip". Since the IncludeFolderNames parameter is set to true, the internal directory structure of the Zip archive will be relative to the "Docs" folder. The Recurse parameter is also set to true, so if the Docs folder contains any subfolders, their contents will also be added with their directory structure maintained relative to the "Docs" folder.

So if the Docs folder discussed in the above example contained:

...\AutoPlay\Docs\One.txt
...\AutoPlay\Docs\MyFolder\Two.txt

the Zip archive would have the following structure:

One.txt
MyFolder\Two.txt

Example 3

-- Prompt the user to select files to add to the zip archive.
archive_files = Dialog.FileBrowse(false, "Files to Add", _DesktopFolder, "All Files (*.*)|*.*|", "", "dat", true, false);

-- Check to see if an error occurred, or the user cancelled.
if (archive_files[1] ~= "CANCEL") and (archive_files ~= nil) then

-- Show the status dialog.
StatusDlg.Show();

-- Add the chosen files to the zip archive.
Zip.Add(_DesktopFolder.."\\NewArchive.zip", archive_files, true, "", 5, nil, false);

-- Get the error code of the zip.add action.
error = Application.GetLastError();

-- Hide the status dialog.
StatusDlg.Hide();

-- If it succeeded, display a success message and open the folder. Otherwise display the error message.
if (error == 0) then
Dialog.Message("Success", "The files were successfully archived.", MB_OK, MB_ICONINFORMATION);

-- Open the folder where the zip file was created.
File.ExploreFolder(_DesktopFolder, SW_SHOWNORMAL);
else
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);
end
end

A file browse dialog is displayed allowing the user to select files they would like added to a Zip archive. The selected files are then added to a Zip archive created on their desktop. If the process is successful, a success message is displayed. If there was an error, the error code message is shown.


Zip.Extract Examples

Zip.Extract

Zip.Extract (

string ZipFile,

table Files,

string Destination,

boolean Recurse = true,

boolean UseInternalFolders = true,

string Password = "",

number Overwrite = 0,

function CallbackFunction = nil )

Example 1

Zip.Extract("AutoPlay\\Docs\\graphics.zip", {"*.*"}, "C:\\Graphics", true, true, "", 3, nil);

Extracts all of the files from the Zip file called "graphics.zip" to "C:\Graphics" on the user's system. If any of the files already exist in the destination, they will be overwritten.

Example 2

-- Allow the user to select a directory to unzip the files.
target_folder = Dialog.FolderBrowse("Select a Folder", "C:\\");

-- Check to see if the user cancelled or an error occurred.
if (target_folder ~= "CANCEL") and (target_folder ~= "") then
-- Gets a list of the contents of a zip file.
zip_contents = Zip.GetContents("AutoPlay\\Docs\\Info.zip", true);

-- Get the error code of the last action.
error = Application.GetLastError();

-- If an error occurred, display the error code message.
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);
else
-- Take the table and turn it into a string with newlines for displaying.
zip_contents_display = Table.Concat(zip_contents, "\r\n", 1, TABLE_ALL);

-- Ask the user if they are sure they would like to unzip the contents.
result = Dialog.Message("Information", "The following files will be unzipped:\r\nClick the Cancel button to abort the process.\r\n\r\n"..zip_contents_display, MB_OKCANCEL)

-- If the user clicked Ok, unzip the files.
if (result == IDOK) then
-- Show the status dialog.
StatusDlg.Show();
-- Extract the contents of the Zip file.
Zip.Extract("AutoPlay\\Docs\\Info.zip", {"*.*"}, target_folder, true, true, "", ZIP_OVERWRITE_NEVER, nil);

-- Check the error code for the last action.
error = Application.GetLastError();

-- Hide the status dialog.
StatusDlg.Hide();

-- If an error occurred, display the error code message.
if (error ~= 0) then
Dialog.Message("Errror", tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);
else
Dialog.Message("Success", "The unzipping was successful.", MB_OK, MB_ICONINFORMATION);
end
end
end
end

This example first prompts the user to select a folder using the Dialog.FolderBrowse action. This folder will be used to unzip the files to. The user is then presented with a dialog containing the names of the files that will be unzipped and allows them to abort the process. If the user clicks Ok, the files are unzipped to the folder they selected. Notification will be given at the end of the process as to whether or not the procedure was successful.


Zip.GetContents Examples

Zip.GetContents

table Zip.GetContents (

string ZipFile,

boolean IncludeFolderNames = true )

Example 1

zip_contents = Zip.GetContents("AutoPlay\\Docs\\Info.zip", true);

Gets a list of the contents within the Zip file "Info.zip" and returns it in the table called "zip_contents."

Example 2

-- Allow the user to select a directory to unzip the files.
target_folder = Dialog.FolderBrowse("Select a Folder", "C:\\");

-- Check to see if the user cancelled or an error occurred.
if (target_folder ~= "CANCEL") and (target_folder ~= "") then
-- Gets a list of the contents of a zip file.
zip_contents = Zip.GetContents("AutoPlay\\Docs\\Info.zip", true);

-- Get the error code of the last action.
error = Application.GetLastError();

-- If an error occurred, display the error code message.
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);
else
-- Take the table and turn it into a string with newlines for displaying.
zip_contents_display = Table.Concat(zip_contents, "\r\n", 1, TABLE_ALL);

-- Ask the user if they are sure they would like to unzip the contents.
result = Dialog.Message("Information", "The following files will be unzipped:\r\nClick the Cancel button to abort the process.\r\n\r\n"..zip_contents_display, MB_OKCANCEL)

-- If the user clicked Ok, unzip the files.
if (result == IDOK) then
-- Show the status dialog.
StatusDlg.Show();
-- Extract the contents of the Zip file.
Zip.Extract("AutoPlay\\Docs\\Info.zip", {"*.*"}, target_folder, true, true, "", ZIP_OVERWRITE_NEVER, nil);

-- Check the error code for the last action.
error = Application.GetLastError();

-- Hide the status dialog.
StatusDlg.Hide();

-- If an error occurred, display the error code message.
if (error ~= 0) then
Dialog.Message("Errror", tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);
else
Dialog.Message("Success", "The unzipping was successful.", MB_OK, MB_ICONINFORMATION);
end
end
end
end

This example first prompts the user to select a folder using the Dialog.FolderBrowse action. This folder will be used to unzip the files to. The user is then presented with a dialog containing the names of the files that will be unzipped and allows them to abort the process. If the user clicks Ok, the files are unzipped to the folder they selected. Notification will be given at the end of the process as to whether or not the procedure was successful.


Organize Dialogs

Dialog

Overview Organize Dialogs

The Organize Dialogs dialog is an easy way to order and re-order the dialogs in your project as you see fit. In this dialog, you are presented with a list of all the available dialogs in your project. You can re-arrange them by first selecting a dialog and then using the up and down arrow buttons at the bottom of the dialog to change the order. The order of the dialogs in your project does not affect how they can be used at runtime, but can be helpful in your work flow.

Tip: Dialog tabs can be shown either to the right or left of the pages in your project. See the Tabs Preferences for more information (Edit > Preferences > Environment > Tabs.)

Move Up

Moves the selected dialog up one place.

Move Down

Moves the selected dialog down one place.


Guidelines Dialog

Guidelines

Overview Add / Edit Dialog

Right clicking on the rulers in AutoPlay Media Studio allows you to add a guideline using the Add Guideline dialog. As well, if you right click on a guideline marker on a ruler, you can choose Properties to open the Guideline Properties dialog. These two dialogs are identical, with the exception of their title bars.

Position:

The position in pixels from the top left corner of your page or dialog. This distance is either horizontal or vertical depending on which ruler the guideline originates from.

Project guideline

Enabling this option sets the guideline to be a project guideline. Project guidelines persist across all pages and dialogs in your project, while page or dialog guidelines apply only to the current page or dialog.

Locked

Enabling this option 'locks' the guideline to the page or dialog, preventing you from moving it around.

Note: Even if a guideline is locked, you can still adjust it by right-clicking on the guideline marker on the ruler and choosing properties. Locking a guideline simply prevents you from changing it by dragging.


Importing AutoPlay Menu Studio 3 Projects

Overview What Is Converted What Is Not Converted

This topic serves as an introduction to the project conversion process from AutoPlay Menu Studio 3 to AutoPlay Media Studio 8. It will describe what the project converter can and cannot convert. It will also explain the reasons behind the decisions made and what to do once your AutoPlay 3 project has been converted to AutoPlay 8.

Introduction

AutoPlay Media Studio 5 was rebuilt from the ground up to be infinitely more powerful and flexible than previous versions. As such, it required an entirely new "scripting engine" to process actions. AutoPlay Media Studio 8 continues to push the boundaries of media development. Because of the immense changes between v3 and v8, an exact and automated one-to-one conversion of actions from the v3 format is impossible.

As a result, the conversion of projects created with v3 is not a fully automated process. In general, your "visual design" will be converted automatically, while your "script actions" must be converted by hand.

Converting Projects from v3 to v8

Given the changes to the scripting engine, the decision you'll need to make is whether or not to convert your v3 projects to v8 projects. Ultimately, the choice is up to you. You'll certainly want to create all of your new projects using v8 - it's just so much better and more powerful. It's whether or not it's worth it to you or your company/client to "upgrade" your v3 projects to take advantage of v8 features.

In many cases, the answer will be to leave your already working v3 projects the way they are and then shift your new development to v8.

That being said, it's not a complicated process to convert your v3 projects to the new v8 platform, but it may be time-consuming to recreate your actions in v8 if you have a particularly complicated project. Of course, it doesn't hurt to try and see what's involved. Simply go to File > Open and select a v3 (*.am3) project. The conversion tool will take over and do its best to create a good-looking v8 compatible project from your v3 source. Take a look at the resulting project and decide for yourself.

Where Do I Go Next?

You'll definitely want to read the rest of the topic, including the "What Is Converted" and "What is Not Converted" sections. That'll give you an exact rundown of what to expect from the automated conversion process. Then you'll want to become more familiar with all of the goodies you'll find in v8. They'll make your projects cooler and more professional!

The first section to read in the help file should be the What’s Different section. This will help explain the major differences between AutoPlay Media Studio 8 and AutoPlay Menu Studio 3. This should also start you on the path to understanding how to accomplish tasks the AutoPlay 8 way.

If you are still not sure how things work in AutoPlay Media Studio 8, the User’s Guide is an indispensable tool. It is aimed squarely at teaching you how to accomplish tasks in AutoPlay 8 by leading you through a step-by-step tutorial. It was written in such a way that you should be able to jump in at any chapter and learn the skills that chapter was meant to teach, but for the most benefit it should be read from start to finish.

If you think that you have a good handle on what “the AutoPlay 8” way entails, but are looking for some specific real world examples, look no further than the How Do I? section in the help file. This section provides over 100 different articles answering some of the most common questions we have been asked about AutoPlay.

At this point you should know almost everything there is to know about AutoPlay Media Studio 8, so it’s time to translate your AutoPlay Menu Studio 3 actions into AutoPlay 8 scripts. For your convenience all of the actions you created in your AutoPlay 3 project have been imported into AutoPlay 8 as comments on the events that they were originally intended for.

Before attempting to translate your actions into AutoPlay Media Studio 8 scripts you should read over the Scripting Guide located in the Help file. This guide will provide you with tips, tricks, and professional-level techniques you should use when writing your AutoPlay 8 scripts.


What Is Converted

Importing AutoPlay Menu Studio 3 Projects

Overview What Is Converted What Is Not Converted

In general all of your media files and common options will be converted from AutoPlay Menu Studio 3 to AutoPlay Media Studio 8. This includes all media files, objects, and pages that were referenced in AutoPlay 3. Even media files that have no translatable existence in AutoPlay Media Studio 8 (for example the Highlight pane image) will be copied into the new AutoPlay 8 project’s resource folders.


What Is Not Converted

Importing AutoPlay Menu Studio 3 Projects

Overview What Is Converted What Is Not Converted

As stated in the previous section, all applicable options and media files will be converted from AutoPlay Menu Studio 3 to AutoPlay Media Studio 8. However given the subtle and dramatic differences between AutoPlay 3 and AutoPlay 8 some options cannot be converted, most notably among these are actions.

Actions

Actions will not be converted from AutoPlay Menu Studio 3 to AutoPlay Media Studio 8. Given the vastly different way in which actions and variables are handle in AutoPlay 8, as opposed to AutoPlay 3, a conversion between the two is next to impossible.

In order to make the conversion process easier for you, all of the actions from your AutoPlay 3 project will be converted as comments on the appropriate events in the converted AutoPlay 8 project. In cases where there is no one-to-one conversion between events (as in the AutoPlay 3 web browser objects and the AutoPlay 8 web objects) the action code from AutoPlay 3 will be converted to the most appropriate AutoPlay 8 event.

Preferences

The preference settings will not be converted from AutoPlay Media Studio 3 to AutoPlay Media Studio 8 since they are program wide, not project specific. The project converter only converts those options that are project specific.

Project Settings

The following project settings cannot be converted from AutoPlay Media Studio 3 to AutoPlay Media Studio 8:

General Tab

  • Splash Screen and Credits screens are not converted, image files specified will be added to the 8 project

  • Initialize %QtVersion% Variable is not converted, as this setting does not exist in 8

Startup Page Tab

  • This feature does not exist in 8 and is not converted from 3 at all.

Intro Video Tab

  • Volume and Speed settings are not converted into 8, all else is.

Security Tab

  • The security settings are not converted as they do not exist in the same fashion in 8.

Page Settings

The following options will not be converted from pages in AutoPlay Media Studio 3 to AutoPlay Media Studio 8:

Background Tab

  • Window Title - This setting from the first page in AutoPlay 3 will be used as the Project Settings > Appearance Tab Window Title in AutoPlay 8. This setting for all other pages will be discarded.

  • Highlight Pane Image - Will not be converted, will be added to the project.

Objects

  • Shortcut keys will not be converted from AutoPlay 3 to 8.

Text Object

  • All properties will be converted.

  • Text objects are converted to 8 paragraph objects.

  • Object size will be slightly larger due to the way the paragraph object works.

Image Object

  • All properties will be converted.

  • If a highlight image is specified, the image object will be converted into a 8 button object.

Hyperlink Object

  • The Show Highlight Pane on Mouse Over setting will not be converted since it does not exist.

AVI Object

  • Converted as a video object.

  • Maintain Original Size - This setting will not be converted into 8 since it does not exist. This settings keeps the object sized to the video and does not allow you to resize it at all. The size will be imported properly.

  • Tool Tip - The video object does not support a tooltip in 8.

Text Box Object

  • Will be imported as a 8 input object with the Read Only setting turned on.

  • All settings will be imported properly.

  • If "Load File At Runtime" is specified and the file can be found, the file will be added to the project, and its contents will be read and set as the input object's text.

Actions

  • Actions will not be imported, but will be visible in 8 as commented-out script. Each action will be converted into a reasonable version of the 3 look.

  • If a file is specified in a 3 action, and it can be found, it will be added to the 8 project. This includes files in the Virtual CD-ROM and files that have full paths provided.

Files

  • All files that can be found (Virtual CD-ROM files and direct links to files) will be added to the 8 project. If they cannot be found a warning will be displayed.


Importing AutoPlay Media Studio 4 Projects

Overview What Is Converted What Is Not Converted (Gotcha's)

This topic serves as an introduction to the project conversion process from AutoPlay Media Studio 4 to AutoPlay Media Studio 8. It will describe what the project converter can and cannot convert. It will also explain the reasons behind the decisions made and what to do once your AutoPlay 4 project has been converted to AutoPlay 8.

Introduction

AutoPlay Media Studio 5 was rebuilt from the ground up to be infinitely more powerful and flexible than previous versions. As such, it required an entirely new "scripting engine" to process actions. AutoPlay Media Studio 8 continues to push the boundaries of media development. Because of the immense changes between v4 and v8, an exact and automated one-to-one conversion of actions from the v4 format is impossible.

As a result, the conversion of projects created with v4 is not a fully automated process. In general, your "visual design" will be converted automatically, while your "script actions" must be converted by hand.

Converting Projects from v4 to v8

Given the changes to the scripting engine, the decision you'll need to make is whether or not to convert your v4 projects to v8 projects. Ultimately, the choice is up to you. You'll certainly want to create all of your new projects using v8 - it's just so much better and more powerful. It's whether or not it's worth it to you or your company/client to "upgrade" your v4 projects to take advantage of v8 features.

In many cases, the answer will be to leave your already working v4 projects the way they are and then shift your new development to v8.

That being said, it's not a complicated process to convert your v4 projects to the new v8 platform, but it may be time-consuming to recreate your actions in v8 if you have a particularly complicated project. Of course, it doesn't hurt to try and see what's involved. Simply go to File > Open and select a v4 (*.am4) project. The conversion tool will take over and do its best to create a good-looking v8 compatible project from your v4 source. Take a look at the resulting project and decide for yourself.

Where Do I Go Next?

You'll definitely want to read the rest of the topic, including the "What Is Converted" and "What is Not Converted" sections. That'll give you an exact rundown of what to expect from the automated conversion process. Then you'll want to become more familiar with all of the goodies you'll find in v8. They'll make your projects cooler and more professional!

The first section to read in the help file should be the What’s Different section. This will help explain the major differences between AutoPlay Media Studio 8 and AutoPlay Media Studio 4. This should also start you on the path to understanding how to accomplish tasks the AutoPlay 8 way.

If you are still not sure how things work in AutoPlay Media Studio 8, the User’s Guide is an indispensable tool. It is aimed squarely at teaching you how to accomplish tasks in AutoPlay 8 by leading you through a step-by-step tutorial. It was written in such a way that you should be able to jump in at any chapter and learn the skills that chapter was meant to teach, but for the most benefit it should be read from start to finish.

If you think that you have a good handle on what “the AutoPlay 8” way entails, but are looking for some specific real world examples, look no further than the How Do I? section in the help file. This section provides over 100 different articles answering some of the most common questions we have been asked about AutoPlay.

At this point you should know almost everything there is to know about AutoPlay Media Studio 8, so it’s time to translate your AutoPlay Media Studio 4 actions into AutoPlay 8 scripts. For your convenience all of the actions you created in your AutoPlay 4 project have been imported into AutoPlay 8 as comments on the events that they were originally intended for.

Before attempting to translate your actions into AutoPlay Media Studio 8 scripts you should read over the Scripting Guide located in the Help file. This guide will provide you with tips, tricks, and professional-level techniques you should use when writing your AutoPlay 8 scripts.


What Is Converted

Importing AutoPlay Media Studio 4 Projects

Overview What Is Converted What Is Not Converted (Gotcha's)

In general all of your media files and common options will be converted from AutoPlay Media Studio 4 to AutoPlay Media Studio 8. This includes all media files, objects, and pages that were referenced in AutoPlay 4. Even media files that have no translatable existence in AutoPlay Media Studio 8 (for example the Mouse Over pane image) will be copied into the new AutoPlay 8 project’s resource folders.

This section will detail all of the information that gets converted from AutoPlay Media Studio 4 to AutoPlay Media Studio 8. For a list of options that will not be converted please see the next section.

Note: The idea of an “external reference” as it was presented in AutoPlay Media Studio 4 does not exist in AutoPlay Media Studio 8. As a result all external references from AutoPlay 4 will be added to the new AutoPlay 8 project’s resource folders. If the file could not be found (i.e. The location specified is a “run-time” location) the original path will be converted and a warning will occur during the conversion process.

Project Settings

The following project settings will be converted from AutoPlay Media Studio 4 to AutoPlay Media Studio 8:

General Tab

  1. The Page Size settings will convert exactly to AutoPlay Media Studio 8.

  2. If a transparent image file is used in your AutoPlay 4 project it will be copied into the resource folder of your new AutoPlay Media Studio 8 project.

  3. The splash and credits screen images (if specified) will be copied into the resource folders of the new AutoPlay 8 project. The rest of the settings will not be converted.

  4. The Window options (Title bar, Border, and Full screen) will be converted to their corresponding AutoPlay Media Studio 8 Project Settings Styles. Note: Since the Full screen window style is not available in AutoPlay 8 this style will convert to the Kiosk style if the Title bar and Border options are disabled, otherwise it will be ignored.

Build Tab

  1. The create Autorun.inf option will be converted to control the “Enable AutoPlay” options for the “Hard Drive Folder”, “CD-R/CD-RW”, and “ISO Image” project publishing options.

Configurations Tab

  1. No settings from the Configuration tab will be converted, this option does not exist in AutoPlay Media Studio 8.

Languages Tab

  1. No settings from the Languages tab will be converted. Languages are handled as an internal table in AutoPlay Media Studio 4 as opposed to external XML files.

Requirements Tab

  1. No settings from the Requirements tab will be converted, however requirement settings can be specified directly in AutoPlay Media Studio 8.

Page Settings

The following AutoPlay Media Studio 4 page settings will be converted into AutoPlay Media Studio 8:

  1. The Background Type options, including the Type and Parent page options will convert directly into AutoPlay Media Studio 8. They can be found in AutoPlay Media Studio 8 in the Page properties as the following options: Background, Image, and Inherit. Note: The Show the parent page at design time option will not convert and will always be enabled in AutoPlay Media Studio 8.

  2. All three background images will be copied into the new project’s resource folders, however only the Normal pane image file will be referenced in the actual project. The Normal pane image file will become the image file used as the page background in AutoPlay 8.

  3. The Foreground and Background colors will be converted into the Gradient color and Back color options in AutoPlay 8 respectively.

Object Settings

Properties Common to Multiple Objects

The following properties are common to more then one object in AutoPlay Media Studio 4, and will therefore be converted in the same manner for all objects they are common to.

The object name, position, and bounding rectangle size are common to all objects and will be converted exactly from AutoPlay Media Studio 4 to AutoPlay Media Studio 8.

The design-time option Lock position will be converted into the “lock” option in AutoPlay Media Studio 8. Note: Locking and unlocking objects is accomplished through the right-click context menu, as opposed to being visible as part of the object’s properties.

All objects in AutoPlay Media Studio 4, except for the Web Browser Object, support tooltips. This option will be converted from AutoPlay 4 to 8 for all objects that supported tooltips, except for the video object, which not longer supports this option.

All objects in AutoPlay Media Studio 4 that support custom font settings (text, image, list box, text box, and edit field) will have their fonts settings converted into AutoPlay 8.

Objects that supported the alternate representations of their ActiveX control was not installed (Flash, Media Player, and Web Browser objects) in AutoPlay 4, will not have their alternate representation settings converted into AutoPlay 8. However if an alternate image is specified it will be added to the new projects resource folders. Note: In AutoPlay Media Studio 8 the default missing controls representation is always used.

The text, image, and hotspot objects support Mouse Over and Mouse Click sounds in AutoPlay Media Studio 4, these sounds will be converted properly into AutoPlay Media Studio 8.

Properties that exist in AutoPlay 8 and not in AutoPlay 4

In general AutoPlay Media Studio 8 object properties that do not exist in the corresponding AutoPlay Media Studio 4 object will be set to their default value. If any other value is used during the conversion process it will be noted in this document.

Text Object

Text Objects are converted into AutoPlay Media Studio 8 as Paragraph Objects. They are not converted as label objects because the font size of label objects resizes to fit the object’s bounding rectangle.

The following options will be converted from the AutoPlay Media Studio 4 text object to the AutoPlay Media Studio 8 paragraph object:

  1. The message text, horizontal alignment, and color options will all be converted into their respective AutoPlay 8 paragraph options.

  2. The Mouse Over and Mouse Click sounds will be converted into the AutoPlay 8 paragraph Highlight and Click sounds.

  3. All paragraph objects that represent converted text object will have the following settings: a transparent background, no horizontal or vertical scrollbars, and no border.

Image Object

AutoPlay Media Studio 4 Image Object can be converted into two different objects in AutoPlay Media Studio 8, either the image or button object. This is because the image object in AutoPlay 8 does not support multiple images or a caption, whereas the button does.

The converter makes the following decision when determining what type of AutoPlay 8 object to convert your AutoPlay 4 image to:

  1. If the AutoPlay 4 image object has only the normal image specified and no caption, it will be converted into an AutoPlay 8 image object.

  2. If the AutoPlay 4 image object has the normal image and one or more of the Mouse Over or Mouse Down images specified it will be converted into an AutoPlay 8 button object.

  3. If the AutoPlay 4 image object has a caption specified, it will be converted into an AutoPlay 8 button object.

If the AutoPlay 4 image object is converted into an AutoPlay 8 image object, the following options will be converted:

  1. The normal image file.

  2. The transparent color. Note: Image objects in AutoPlay Media Studio 8 have a transparent color tolerance level. Due to the nature of the transparent color in AutoPlay Media Studio 4 all converted AutoPlay 8 images objects will have this level set to 100.

If the AutoPlay Media Studio 4 image object is converted into an AutoPlay Media Studio 8 button object the following conversion process will occur:

  1. The normal image and whichever of the Mouse Over and Mouse Down images exist will be converted into an AutoPlay button file. The images used to make up the AutoPlay button file will also be added to the new projects resources.

  2. If a transparent color is specified for any of the three AutoPlay 4 image object images, it will be applied to the corresponding state in the AutoPlay button file.

  3. The caption specified in the AutoPlay 4 image object will then be converted over into identical AutoPlay 8 button object text settings.

Hotspot Object

All properties relevant to the AutoPlay Media Studio 8 hotspot object will be converted.

Note: This does not include the Show mouse over pane and Show mouse down pane.

Edit Field Object

All AutoPlay Media Studio 4 edit field options will import properly into the AutoPlay Media Studio 8 Input Object.

List Box Object

All AutoPlay Media Studio 4 list box object properties and data will convert properly into an AutoPlay Media Studio 8 listbox object.

Text Box Object

AutoPlay Media Studio 4 text box objects will be converted into AutoPlay Media Studio 8 input object. This is done to preserve the settings that were used in AutoPlay 4. Due to the new skinnable Paragraph objects in AutoPlay 8 converting AutoPlay 4 text box objects into Paragraph objects would result in a different look and feel for the new object. Using the AutoPlay 8 input objects guarantees the exact same look and feel that was available in AutoPlay Media Studio 4. Using the AutoPlay Media Studio 8 input object also allows the end user to copy the text during runtime, in the same manner that they were able to using the text box object in AutoPlay Media Studio 4.

If the load file at runtime option is specified the converter will look for the file at conversion time. If the file is found it will be added to the new projects resources, and then file’s contents will be read in and used as the text for the input object. If the file cannot be found the input objects text will be set to the following warning message: “The file could not be found: FILENAME”.

The following options will be converted from the AutoPlay Media Studio 4 text box object to the AutoPlay Media Studio 8 paragraph object:

  1. If the load file at runtime option is specified the converter will look for the file at conversion time. If the file is found it will be added to the new projects resources, and then file’s contents will be read in and used as the text for the input object. If the file cannot be found the input objects text will be set to the following warning message: “The file could not be found: FILENAME”.

  2. If the Specify Now option is selected the text will be converted to the AutoPlay 8 input objects text.

  3. The rest of the Appearance, Options, and Alignment settings from the imported properly. Note: The custom font specified for the AutoPlay 4 text box object will always be used as the font for the AutoPlay 8 input object.

The Read Only option will be set for the AutoPlay Media Studio 8 input object so that it does not allow user input and behaves identically to the AutoPlay Media Studio 4 text box object.

AVI Video Object

The AutoPlay Media Studio 4 AVI video object will be converted into the AutoPlay Media Studio 8 video object. The following properties will be converted:

  1. The video filename specified will be copied into the new project’s resource folders and then used as the AutoPlay 8 video object’s video file.

  2. The Start automatically, Show border, and Show Playbar Option settings will convert directly into the AutoPlay 8 video object Auto Start, Loop, and Control Panel Style options, respectively.

  3. The AutoPlay Media Studio 4 the AVI video object had the ability to specify what frame of the video to display during the design environment; this option is not available in AutoPlay Media Studio 8.

Flash Object

All properties of the AutoPlay Media Studio 4 Flash object will convert properly into the same options for the AutoPlay Media Studio 8 Flash object.

Media Player Object

In AutoPlay Media Studio 8 a move has been made away from the Media Player object to the video object. In accordance with the change the AutoPlay Media Studio 8 video object no longer relies on the Media Player ActiveX control. This has resulted in an increased stability and consistency of appearance for the video objects across different version of Windows, and different versions of the Media Player ActiveX control.

This shift also means that many of the appearance-centered options that were available to the AutoPlay 4 Media Player object are no longer supported in the AutoPlay 8 video object.

The following options will be converted from the AutoPlay 4 Media Player object to the AutoPlay 8 video object:

  1. The Media File Filename/URL will be copied into the new projects resource folders and then used as the AutoPlay 8 video object’s video file. If the file cannot be found at conversion time the originally specified Filename/URL will be used.

  2. The Automatically start playing media option will be converted to the Auto Start option.

  3. If the Customize display colors option is enabled the Foreground and Background will be converted into the Panel and Text color options in the video object. If the Customize option is not enabled the foreground and background colors will be ignored and the default colors will be used in the AutoPlay 8 video object.

  4. The Show Controls option will control whether or not the Control Panel is enabled in the video object.

  5. If the Show Controls option is enabled the Show tracker controls will control the slider option in the video object

  6. The Show status bar option in the Media Player object will control the Time settings in the video object. If the Show status bar option is enabled the Time style will be set to “Both”, if not the Time style will be set to “None”.

Web Browser Object

All applicable options from AutoPlay Media Studio 4’s web browser object will be converted properly into the AutoPlay Media Studio 8 web object.


What Is Not Converted

Importing AutoPlay Media Studio 4 Projects

Overview What Is Converted What Is Not Converted (Gotcha's)

As stated in the previous section, all applicable options and media files will be converted from AutoPlay Media Studio 4 to AutoPlay Media Studio 8. However given the subtle and dramatic differences between AutoPlay 4 and AutoPlay 8 some options cannot be converted, most notably among these are actions.

Actions

Actions will not be converted from AutoPlay Media Studio 4 to AutoPlay Media Studio 8. Given the vastly different way in which actions and variables are handle in AutoPlay 8, as opposed to AutoPlay 4, a conversion between the two is next to impossible.

In order to make the conversion process easier for you, all of the actions from your AutoPlay 4 project will be converted as comments on the appropriate events in the converted AutoPlay 8 project. In cases where there is no one-to-one conversion between events (as in the AutoPlay 4 web browser objects and the AutoPlay 8 web objects) the action code from AutoPlay 4 will be converted to the most appropriate AutoPlay 8 event.

Preferences

The preference settings will not be converted from AutoPlay Media Studio 4 to AutoPlay Media Studio 8 since they are program wide, not project specific. The project converter only converts those options that are project specific.

Project Settings

The following project settings cannot be converted from AutoPlay Media Studio 4 to AutoPlay Media Studio 8:

General Tab:

  1. The Splash and Credits screen. The Splash and Credits screens do not exist in AutoPlay Media Studio 8, however their equivalent can be created using the Dialog.SplashImage action. Any images specified in the Splash or Credits screen section will be added to the new project's resource folders.

  2. The Startup Page option. This can be simulated by using a Page.Jump action on the first page’s “On Preload” event.

  3. The Full Screen Window option does not exist in AutoPlay Media Studio 8. If this option is selected and the Title bar and Border options are not, then the Kiosk window style will be applied to the AutoPlay 8 project.

  4. The Transparent Window option will not be converted, however any image that is specified will be added to the new project resources. To accomplish this in AutoPlay Media Studio 8 simply use a black and white image as your Custom Mask image.

  5. The Distribution Folder option will not be converted because it has no related property in AutoPlay 8.

Build Tab:

  1. The Store support files in sub folder and subfolder name option cannot be converted because of the switch to project resource folders in AutoPlay 8.

  2. The Active Build Configuration option does not exist in AutoPlay Media Studio 8.

  3. The Pre/Post Build Steps do not exist in AutoPlay Media Studio 8.

Configuration Tab:

  1. Build configurations will not be converted to AutoPlay Media Studio 8 as the options does not exist in that version.

Language Tab

  1. Multiple languages are handled in AutoPlay Media Studio 8 using internal tables, so the AutoPlay 4 references to external XML language files cannot be converted.

Requirements Tab

  1. All ActiveX Control Requirements will not be converted into AutoPlay Media Studio 8. The ActiveX requirements that were available in AutoPlay 4 are available in AutoPlay 8 under Project > Dependences, however due to the different format used between both versions it is not possible to convert the settings.

Pages

The following options will not be converted form pages in AutoPlay Media Studio 4 to AutoPlay Media Studio 8:

  1. The Show the parent page at design time option will not be converted. In AutoPlay Media Studio 8 this option is always enabled and cannot be disabled.

  2. The Mouse Over pane image and the Mouse Down page image will be copied into the new project’s resource folders, but since pages in AutoPlay Media Studio 8 do not support these options their functionality will not be converted.

  3. The Window Title option will not convert. To accomplish the same functionality use the Window.SetText and the Application.GetWndHandle actions to set the applications window title on the pages “On Preload” event.

Objects

Properties Common to Multiple Objects

The Shortcut key option is common to all objects in AutoPlay Media Studio 4 that support the “On Click” event, however this option is not available in AutoPlay Media Studio 8. Using the page “On Key” event in conjunction with the Page.ClickObject allows one to achieve the same functionality in AutoPlay 8.

Any AutoPlay Media Studio 4 objects containing Alternate Tab settings will not have the settings imported into AutoPlay Media Studio 8. These settings do not exist in AutoPlay 8, and the default missing control representation will always be used.

The Show Design time frame option does not exist for video or Flash objects in AutoPlay Media Studio 8. As a result these settings will not be imported from the AutoPlay Media Studio 4 AVI, Flash, or Media Player objects

Text Object

The Center text vertically option will not be converted when text objects are converted from AutoPlay Media Studio 4 to AutoPlay Media Studio 8. This option is not converted because it does not exist in AutoPlay 8.

Image Object

All Image Object properties will be converted from AutoPlay Media Studio 4 to AutoPlay Media Studio 8 as either an image or button object.

Hotspot Object

The Show Mouse Over pane and Show Mouse Down pane options will not be converted into AutoPlay Media Studio 8 because pages in AutoPlay 8 no longer support these states.

Edit Field Object

All Edit Field Object properties will be converted properly into AutoPlay Media Studio 8 input objects.

List Box Object

All List Box Object properties will convert properly into listbox objects in AutoPlay Media Studio 8.

Text Box Object

The Load from file at runtime option will not convert directly into AutoPlay Media Studio 8. The project converter will attempt to read the information at convert-time and then use that information to specify the input objects text.

Loading text from a file at runtime can be accomplished in AutoPlay Media Studio 8 by using the TextFile.ReadToString and Input.SetText actions.

AVI Video Object

The Show Menu on Playbar option does not exist for video objects in AutoPlay Media Studio 8 and will therefore not be converted.

Flash Object

All Flash object properties will be converted properly into AutoPlay Media Studio 8, except for the previously mentioned Alternate tab, and design time frame.

Media Player Object

The following properties will not be converted when the AutoPlay Media Studio 4 Media Player object is converted into an AutoPlay Media Studio 8 video object:

  1. The Allow change display size option does not exist in the AutoPlay Media Studio 8 video object. In effect the AutoPlay 8 video object always has this option enabled.

  2. The Allow click on movie to play/pause option does not exist in the AutoPlay Media Studio 8 video object. This functionality can be accomplished using the video’s On Click event and the Video.Play and Video.Pause actions.

  3. The Show context menu option will not be converted, as there is no context menu associated with the AutoPlay Media Studio 8 video object.

  4. The Allow Scanning option has no representation in the AutoPlay Media Studio 8 video object.

  5. The Automatically rewind when clip is stopped option will not be converted, all AutoPlay Media Studio 8 video objects will rewind when they are stopped.

  6. The Show audio controls options cannot be converted to the AutoPlay Media Studio 8 video object, since it has no visible volume settings. However the volume can be controlled using the Video.SetVolume action.

  7. The Show position controls option has no convertible representation in the AutoPlay Media Studio 8 video object.

  8. The AutoPlay Media Studio 8 video object does not support closed captioning, therefore the Show closed captioning display panel will not be converted from the AutoPlay Media Studio 4 Media Player object.

  9. The Show display panel option does not exist in the AutoPlay Media Studio 8 video object, and will therefore not be converted.

  10. The goto bar, and position controls do not exist in the AutoPlay Media Studio 8 video object, and will therefore not be converted.

  11. As stated above the settings from the Alternate tab in AutoPlay Media Studio 4 will not be converted.

Web Browser Object

All web browser object properties will be converted from AutoPlay Media Studio 4 to AutoPlay Media Studio 8 except for those settings on the Alternate tab.

Gotcha’s

The MP3 Player had global scope in AutoPlay Media Studio 4, but in AutoPlay Media Studio 8 audio events are handled on a page-by-page basis. As a result the MP3 Player’s event actions will be converted to comments on the “On Audio” event of the first page in the project. The background music option in AutoPlay Media Studio 8 is what should be used control background music.

Global lists will not be converted into AutoPlay Media Studio 8. Global lists no longer exist in AutoPlay Media Studio 8, the introduction of tables and the actions associated with then duplicate the global lists functionality.


Importing AutoPlay Media Studio 5 Projects

Overview

AutoPlay Media Studio 8 is almost fully reverse-compatible with version 5 projects, however due to an update of the Lua scripting library, there may be some minor changes required after opening your v5 project in version 8.

Lua Language Changes

AutoPlay Media Studio now contains an updated version of the Lua scripting library, version 5.1 (previously 5.0). AutoPlay's version has been compiled to try to maintain compatibility, however there are some minor syntax changes/deprecations made to the language that you need to be aware of for future development as well as previously created projects and lua scripts.

When importing a project made with an earlier version of AutoPlay Media Studio, AutoPlay Media Studio 8 will automatically analyze your project file and create a report detailing any areas where it thinks the old style for loop is in use. If there are any old for loops found the report will automatically be saved in the same folder as your new 8 project file and opened in your default web-browser. We recommend analyzing each line of code found in the report to ensure that you only use the new for loop syntax.

Table Iterating For Loops

The syntax for iterating a table using for loop using in has changed (has been deprecated) If the syntax is not changed, a runtime error will be thrown when executed.

Old syntax:

mytable = {"One","Two","Three"};

for k, v in mytable do
Dialog.Message("Table Item", k .. "=" .. v);
end -- for

Needs to be changed to:

mytable = {"One","Two","Three"};

for k, v in pairs (mytable) do
Dialog.Message("Table Item", k .. "=" .. v);
end -- for

The functions table.foreach and table.foreachi are also deprecated. You can use a for loop as above with pairs or ipairs instead. While these two are deprecated, they still work (unlike the example above), however you are advised to also rework these types of loops in case they are removed from future versions.

If you commonly use Lua functions (non-AutoPlay actions) in your scripts, you may also want to review the list of other changes to the language in case other changes affect you. You can find this information in the Lua 5.1 Reference Manual found on http://www.lua.org.

Plugin Changes

As of AutoPlay Media studio 8, only plugins created with version 2 of the Plugin SDK (or higher) are compatible. When a version 5 project is opened in version 8, the project is analyzed to determine if it contains any plugin objects or actions. A list of these can be viewed in the analysis report that is automatically generated under the heading "Legacy Plugins."

In order for your project to work you will need to obtain updated versions of the plugins listed. Once you have the updated version of these plugins, simply install them into the correct plugin directory and your project should work properly. If you have already installed versions of the listed plugins that were created using version 2 of the Indigo Rose Plugin SDK then no further action is necessary.


Importing AutoPlay Media Studio 6 Projects

Overview

AutoPlay Media Studio 8 is almost fully reverse-compatible with version 6 projects, however due to an update of the Lua scripting library, there may be some minor changes required after opening your v6 project in version 8.

Lua Language Changes

AutoPlay Media Studio now contains an updated version of the Lua scripting library, version 5.1 (previously 5.0). AutoPlay's version has been compiled to try to maintain compatibility, however there are some minor syntax changes/deprecations made to the language that you need to be aware of for future development as well as previously created projects and lua scripts.

When importing a project made with an earlier version of AutoPlay Media Studio, AutoPlay Media Studio 8 will automatically analyze your project file and create a report detailing any areas where it thinks the old style for loop is in use. If there are any old for loops found the report will automatically be saved in the same folder as your new 8 project file and opened in your default web-browser. We recommend analyzing each line of code found in the report to ensure that you only use the new for loop syntax.

Table Iterating For Loops

The syntax for iterating a table using for loop using in has changed (has been deprecated) If the syntax is not changed, a runtime error will be thrown when executed.

Old syntax:

mytable = {"One","Two","Three"};

for k, v in mytable do
Dialog.Message("Table Item", k .. "=" .. v);
end -- for

Needs to be changed to:

mytable = {"One","Two","Three"};

for k, v in pairs (mytable) do
Dialog.Message("Table Item", k .. "=" .. v);
end -- for

The functions table.foreach and table.foreachi are also deprecated. You can use a for loop as above with pairs or ipairs instead. While these two are deprecated, they still work (unlike the example above), however you are advised to also rework these types of loops in case they are removed from future versions.

If you commonly use Lua functions (non-AutoPlay actions) in your scripts, you may also want to review the list of other changes to the language in case other changes affect you. You can find this information in the Lua 5.1 Reference Manual found on http://www.lua.org.

Plugin Changes

As of AutoPlay Media studio 8, only plugins created with version 2 of the Plugin SDK (or higher) are compatible. When a version 6 project is opened in version 8, the project is analyzed to determine if it contains any plugin objects or actions. A list of these can be viewed in the analysis report that is automatically generated under the heading "Legacy Plugins."

In order for your project to work you will need to obtain updated versions of the plugins listed. Once you have the updated version of these plugins, simply install them into the correct plugin directory and your project should work properly. If you have already installed versions of the listed plugins that were created using version 2 of the Indigo Rose Plugin SDK then no further action is necessary.


Importing AutoPlay Media Studio 7 Projects

Overview

AutoPlay Media Studio 8 is almost fully reverse-compatible with version 7 projects, however due to an update of the Lua scripting library, there may be some minor changes required after opening your v7 project in version 8.

Lua Language Changes

AutoPlay Media Studio now contains an updated version of the Lua scripting library, version 5.1 (previously 5.0). AutoPlay's version has been compiled to try to maintain compatibility, however there are some minor syntax changes/deprecations made to the language that you need to be aware of for future development as well as previously created projects and lua scripts.

When importing a project made with an earlier version of AutoPlay Media Studio, AutoPlay Media Studio 8 will automatically analyze your project file and create a report detailing any areas where it thinks the old style for loop is in use. If there are any old for loops found the report will automatically be saved in the same folder as your new 8 project file and opened in your default web-browser. We recommend analyzing each line of code found in the report to ensure that you only use the new for loop syntax.

Table Iterating For Loops

The syntax for iterating a table using for loop using in has changed (has been deprecated) If the syntax is not changed, a runtime error will be thrown when executed.

Old syntax:

mytable = {"One","Two","Three"};

for k, v in mytable do
Dialog.Message("Table Item", k .. "=" .. v);
end -- for

Needs to be changed to:

mytable = {"One","Two","Three"};

for k, v in pairs (mytable) do
Dialog.Message("Table Item", k .. "=" .. v);
end -- for

The functions table.foreach and table.foreachi are also deprecated. You can use a for loop as above with pairs or ipairs instead. While these two are deprecated, they still work (unlike the example above), however you are advised to also rework these types of loops in case they are removed from future versions.

If you commonly use Lua functions (non-AutoPlay actions) in your scripts, you may also want to review the list of other changes to the language in case other changes affect you. You can find this information in the Lua 5.1 Reference Manual found on http://www.lua.org.

Plugin Changes

As of AutoPlay Media studio 8, only plugins created with version 2 of the Plugin SDK (or higher) are compatible. When a version 7 project is opened in version 8, the project is analyzed to determine if it contains any plugin objects or actions. A list of these can be viewed in the analysis report that is automatically generated under the heading "Legacy Plugins."

In order for your project to work you will need to obtain updated versions of the plugins listed. Once you have the updated version of these plugins, simply install them into the correct plugin directory and your project should work properly. If you have already installed versions of the listed plugins that were created using version 2 of the Indigo Rose Plugin SDK then no further action is necessary.


Callback Function Examples

General Info

Contents Callback Functions Example

Create a Custom Callback Function

If you have an action requiring a status dialog, but the standard status dialog (StatusDlg) is not sufficient, it is possible to create a custom callback function for those actions requiring one.

As an example, we will use a custom callback function to show the progress of a file download:

--ShowStatusWindow shows the status window, and sets the dialog's icon
function ShowStatusWindow()
-- Show the Status Dialog
StatusDlg.Show(MB_ICONINFORMATION, false);
-- Show the cancel button
StatusDlg.ShowCancelButton(true, "Stop Download");
end

--DownloadStatus is the callback function to be used.
function DownloadStatus (BytesRead, FileSize, TransferRate, SecondsLeft, SecondsLeftFormat, Message)
-- Set the status meter's range
StatusDlg.SetMeterRange(0, Math.Floor(FileSize/1024));
-- Set the meter position
StatusDlg.SetMeterPos(Math.Floor(BytesRead/1024));

-- Check if the cancel button was pressed
if StatusDlg.IsCancelled() then
-- Cancel button was pressed. Hide status dialog and terminate download
StatusDlg.Hide();
return false;
else
-- Cancel button was not pressed, determine message to be displayed
if FileSize == 0 then
-- Display 'size unknown' message
StatusDlg.SetStatusText("Size Unknown (" .. Math.Floor(BytesRead/1024) .. "kb downloaded so far)");
elseif FileSize > 0 then
-- Display 'downloaded of total' message
StatusDlg.SetStatusText("Downloaded " .. Math.Floor(BytesRead/1024) .. " kb of " .. Math.Floor(FileSize/1024) .. " kb");
end

-- Determine if end of download was reached:
-- Message will = "", the end of the download is a 'busy' state
-- BytesRead will be > 0, because more than 1 byte will have been transferred
-- BytesRead will = FileSize, unless FileSize is unknown (0)
if (Message == "") and (BytesRead > 0) and (BytesRead == FileSize or FileSize == 0) then
-- The download has completed, hide the status dialog and display complete message
StatusDlg.Hide();
Dialog.Message("Download Complete", Math.Floor(BytesRead/1024) .. " kb have been downloaded");
return false;
else
-- The download has not ended, continue to download
return true;
end
end
end

-- Call the ShowStatusWindow() function
ShowStatusWindow();

-- Download the file using a callback function
HTTP.Download("http://www.yourdomain.com/download_folder/file.ext", "c:\\file.ext", MODE_BINARY, 20, 80, nil, nil, DownloadStatus);

Note: ShowStatusWindow() shows the status window and sets the title. DownloadStatus() is the custom callback function, and is called by HTTP.Download.


Import Registry Key/Values

Overview

The Import Registry Key/Values dialog allows you to select Registry keys or values from your development system so they can be automatically converted into Registry actions that will recreate its structure.

Sub keys only

Recreate the sub keys of the selected Registry key using AutoPlay Media Studio Registry actions. Only the sub keys will be recreated, not their values.

Values only

Recreate the values of the selected Registry key using AutoPlay Media Studio Registry actions.

Sub keys and values

Recreate both the values and sub keys of the selected Registry key using AutoPlay Media Studio Registry actions.

Recurse sub keys

Recurse all of the sub keys of the selected Registry key when importing the selected Registry key.


Anti-aliasing

Overview

Anti-aliasing is a process that "smooths" out the jagged edges between solid colors by adding intermediate colors to fill the "gaps." This creates an illusion that gives diagonal lines smooth edges and makes curves seem round instead of "stair-stepped."

In AutoPlay, you can choose whether to enable or disable anti-aliasing for any text displayed in a label, button, paragraph, checkbox or radiobutton object.

To do so, select the object, click on the Font setting, and click the edit button to open the Font dialog. When the Font dialog appears, click on the check box to toggle the Anti-alias option on or off.

Tip: Generally, it's better to leave the Anti-alias option enabled. However, you may want to disable it when you're using very small font sizes, as anti-aliasing can make small text difficult to read.

Note: When the Anti-alias option is disabled, text will be drawn according to the system-wide "font-smoothing" setting on the user's system. So even if the Anti-alias option is disabled in AutoPlay, the text might still be anti-aliased if the user has the "Smooth edges of screen fonts" option enabled in their display settings.


Objects - Overview

Objects

Overview

Objects are the individual elements you can place upon a page or dialog.

The following objects are available in AutoPlay Media Studio:

Button

Image

Label

Paragraph

Video

QuickTime

Flash

SlideShow

PDF

Web

xButton

CheckBox

RadioButton

Input

ComboBox

ListBox

Tree

Grid

Progress

RichText

Hotspot

Plugin


actionscript

ActionScript is the Adobe Flash scripting language that can be used to add interactivity and automation to .swf files.

For more information, see Getting started with ActionScript at Adobe's web site.


Input Mask Settings

Overview

Input Mask:

The input mask you want to use to control the data the user inputs into the object. Input masks let you pre-format the user's response a bit with "guide" characters, and help prevent errors by performing keystroke validation. You can click the select button to display a list of sample input masks.

One of the sample input masks available is a telephone number. It appears in the list as (###) ###-####.
The "#" character in the input mask is a special digit placeholder (0-9). For every # in the input mask, the user will only be able to enter a digit between 0 and 9. At runtime, the user will only be able to enter 10 numeric characters and will appear as a formatted telephone number such as (204) 946-0263.

You can also include alphabetic characters in an input mask. For example, one of the sample input masks is ?#? #?# used to represent a Canadian postal code. The "?" character in the input mask is a special alphabetic placeholder (a-Z). For every ? in the input mask, the user will only be able to enter a letter from a to Z. For example, R3B 0R3 is one valid postal code that the user could enter. The mask would prevent the user from entering two sequential alphabetic characters or numbers.

Note: Some special literal characters adapt to the user's system settings, so they may need to be forced on all systems using "\" before the character. See input mask for details.

Placeholder Character:

Single character used as a placeholder for the input mask. This can be used as sample input until the user fills the input mask. For the telephone number input mask mentioned in the above example, you could include a sample digit as the placeholder such as 9. At runtime it would appear as (999) 999-9999 until the user replaced these digits with their own.

Note: This field accepts a single character only. If the Placeholder is set to '_' in the example above, at runtime it would appear as (___) ___-____. Likewise, if the placeholder is set to '?' at runtime it would appear as (???) ???-????.

Return:

The input text to return. Choose from:

Formatted

Return only the text the user typed. This does not include any Input Mask characters.

As Typed

Return all text displayed in the input object. This includes any text displayed by the Input Mask.


New PDF Object Dialog

PDF Object

Overview New PDF Object Dialog

When you add a new PDF object, you are presented with the New PDF Object dialog. This dialog allows you to browse for a local file, or specify a URL that the object will load at runtime.

File or URL:

The local PDF File (*.pdf) or URL that the object will load at runtime. Specify a web address in this field, or click the Browse button to select a file.


QuickTime Error Codes

Error Codes

The following is a subset of internal error codes that may be returned by the QuickTime ActiveX control. A full list can be found in the QuickTime SDK in the file 'MacErrors.h.'

Error Codes

paramErr = -50, error in user parameter list

noHardwareErr = -200, Sound Manager Error Returns

notEnoughHardwareErr = -201, Sound Manager Error Returns

userCanceledErr = -128,

qErr = -1, queue element not found during deletion

vTypErr = -2, invalid queue element

corErr = -3, core routine number out of range

unimpErr = -4, unimplemented core routine

SlpTypeErr = -5, invalid queue element

seNoDB = -8, no debugger installed to handle debugger command

controlErr = -17, I/O System Errors

statusErr = -18, I/O System Errors

readErr = -19, I/O System Errors

writErr = -20, I/O System Errors

badUnitErr = -21, I/O System Errors

unitEmptyErr = -22, I/O System Errors

openErr = -23, I/O System Errors

closErr = -24, I/O System Errors

dRemovErr = -25, tried to remove an open driver

dInstErr = -26 DrvrInstall couldn't find driver in resources

abortErr = -27, IO call aborted by KillIO

iIOAbortErr = -27, IO abort error (Printing Manager)

notOpenErr = -28, Couldn't rd/wr/ctl/sts cause driver not opened

unitTblFullErr = -29, unit table has no more entries

dceExtErr = -30, dce extension error

slotNumErr = -360, invalid slot # error

gcrOnMFMErr = -400, gcr format on high density media error

dirFulErr = -33, Directory full

dskFulErr = -34, disk full

nsvErr = -35, no such volume

ioErr = -36, I/O error (bummers)

bdNamErr = -37, there may be no bad names in the final system!

fnOpnErr = -38, File not open

eofErr = -39, End of file

posErr = -40, tried to position to before start of file (r/w)

mFulErr = -41, memory full (open) or file won't fit (load)

tmfoErr = -42, too many files open

fnfErr = -43, File not found

wPrErr = -44, diskette is write protected.

fLckdErr = -45 file is locked

vLckdErr = -46, volume is locked

fBsyErr = -47, File is busy (delete)

dupFNErr = -48, duplicate filename (rename)

opWrErr = -49, file already open with with write permission

rfNumErr = -51, refnum error

gfpErr = -52, get file position error

volOffLinErr = -53, volume not on line error (was Ejected)

permErr = -54, permissions error (on file open)

volOnLinErr = -55, drive volume already on-line at MountVol

nsDrvErr = -56, no such drive (tried to mount a bad drive num)

noMacDskErr = -57, not a mac diskette (sig bytes are wrong)

extFSErr = -58, volume in question belongs to an external fs

fsRnErr = -59, file system internal error:during rename the old entry was deleted but could not be restored.

badMDBErr = -60, bad master directory block

wrPermErr = -61, write permissions error

dirNFErr = -120, Directory not found

tmwdoErr = -121, No free WDCB available

badMovErr = -122, Move into offspring error

wrgVolTypErr = -123, Wrong volume type error [operation not supported for MFS]

volGoneErr = -124 Server volume has been disconnected.


Tree Object - Tree Item Dialog

Tree Object

Overview Tree Item Dialog

Item text:

The visible text that will appear in the tree for the current item.

Item data:

Hidden text that is associated with the current item.

Image index:

The 0-based icon index from the Image List specified in the Tree object's properties that the current item will use. If no image should be displayed, set this value to -1.

Note: If a number is specified which is out of range of the image specified in the Image List property of the tree object, no image will be displayed.

Selected image index:

The 0-based icon index from the Image List specified in the Tree object's properties that the current item will use when selected. If no image should be displayed, set this value to -1.

Note: If a number is specified which is out of range of the image specified in the Image List property of the tree object, no image will be displayed.

Expand item

If checked, the current item will be expanded by default when your application is first launched.


New Web Object Dialog

Web Object

Overview New Web Object Dialog

When you add a new web object, you are presented with the New Web Object dialog. This dialog allows you to specify the web page that the web object will load at runtime.

Object

URL:

The Universal Resource Locator (URL) that the web object will load at runtime. Specify a web address in this field, or click the browse button to choose a local file.


Organize Pages Dialog

Page

Overview Organize Pages

The Organize Pages dialog is an easy way to order and re-order the pages in your project as you see fit. In this dialog, you are presented with a list of all the available pages in your project. You can re-arrange them by first selecting a page and then using the up and down arrow buttons at the bottom of the dialog to change the order.

Move Up

Moves the selected page up one place.

Move Down

Moves the selected page down one place.


Insert Dialog

Overview

Position

The dialog position in your project you want to insert the new dialog. Choose from:

Before:

Insert the new dialog "before" the selected dialog. Click the select button to select an existing dialog in your project.

After:

Insert the new dialog "after" the selected dialog. Click the select button to select an existing dialog in your project.

Type

The type of dialog to insert into your project. Choose from:

Blank dialog

Insert a blank dialog.

Exported dialog file:

Insert an Exported AutoPlay Dialog File (*.xdg). Click the Browse button to browse for the dialog file to insert.

Copy of dialog:

Insert a copy of an existing dialog. Click the select button to select an existing dialog in your project.


Insert Page

Overview

Position

The page position in your project you want to insert the new page. Choose from:

Before:

Insert the new page "before" the selected page. Click the select button to select an existing page in your project.

After:

Insert the new page "after" the selected page. Click the select button to select an existing page in your project.

Type

The type of page to insert into your project. Choose from:

Blank page

Insert a blank page.

Exported page file:

Insert an Exported AutoPlay Page File (*.xpg). Click the Browse button to browse for the page file to insert.

Copy of page:

Insert a copy of an existing page. Click the select button to select an existing page in your project.


Program Menus

Overview File Edit Align Page Dialog Object Project Publish View Tools Help

Most of the features of AutoPlay Media Studio can be accessed from the program menus. By default, the program menus are located at the top of the AutoPlay Media Studio program window just under the title bar.

The program menus are organized into the following categories:

  • File

  • Edit

  • Align

  • Page

  • Dialog

  • Object

  • Project

  • Publish

  • View

  • Tools

  • Help


Project Template Information

Overview

The Project Template Information dialog allows you to save the following information inside the exported template:

Template name:

The name of the template. If the template is in the \AutoPlay Media Studio 8\Templates directory, or My Documents\AutoPlay Media Studio 8\Templates, this is the text that will appear below the screen shot when the template is loaded into the new project wizard.

Author name:

The name of the template author.

Contact info:

How users of your template can contact you. This can be an email address, a phone number, a website address, or anything else that you can think of.

Web site:

The URL of your company's website.

Copyright:

Copyright information relating to your template.

Screen shot image (108 x 81):

An image to be displayed in AutoPlay's new project wizard if the template is in the \AutoPlay Media Studio 8\Templates directory or My Documents\AutoPlay Media Studio 8\Templates. Click the Browse... button to browse for an image file.

Categories (comma-separated):

A list of categories that your template relates to.

Description:

A description or set of instructions related to the functionality of your template. This text will be shown to the user on the Template Notes dialog when starting a new project from the selected template. The Template Notes dialog will only be shown if this field contains text.


Remove Unused Resources

Overview

The Remove Unused Resources dialog allows you to specify which resource folders you would like to clean up in your project. Any files within each of the chosen folders that are not currently being used in your project will be removed. This feature helps you avoid distributing files that are no longer used in your project.

Note: This action should be used with caution. Be especially careful if there are files in your project folders that you want to distribute, but that aren't referenced anywhere in your project.

Folders to Clean

Audio Folder

Removes any unreferenced files from your project's Audio folder. (CD_ROOT\AutoPlay\Audio).

Buttons Folder

Removes any unreferenced files from your project's Buttons folder. (CD_ROOT\AutoPlay\Buttons).

Docs Folder

Removes any unreferenced files from your project's Docs folder. (CD_ROOT\AutoPlay\Docs) This option is unchecked by default.

Flash Folder

Removes any unreferenced files from your project's Flash folder. (CD_ROOT\AutoPlay\Flash).

Icons Folder

Removes any unreferenced files from your project's Icons folder. (CD_ROOT\AutoPlay\Icons).

Images Folder

Removes any unreferenced files from your project's Images folder. (CD_ROOT\AutoPlay\Images).

Plugins Folder

Removes any unreferenced files from your Plugins folder. (CD_ROOT\AutoPlay\Plugins).

Note: This option will remove all plugin files from your project. This is to ensure that your project is always built with the latest plugin versions; any missing plugin files are automatically added to your project at build time.

Scripts Folder

Removes any unreferenced files from your project's Scripts folder. (CD_ROOT\AutoPlay\Scripts).

Videos Folder

Removes any unreferenced files from your project's Videos folder. (CD_ROOT\AutoPlay\Videos).

Delete Options

Confirm Deletion

Shows the Confirm Delete dialog listing all of the unreferenced files found in the specified project folders. This allows you to confirm whether or not they should be removed from your project.


Script Explorer - Interface

Script Explorer

Overview Interface

The interface of the Script Explorer dialog is divided into four sections: two tree views containing all of the scripts from your project in hierarchical lists (project event trees) and two script editors. In essence, you can be working on two separate scripts at the same time. This is extremely useful if, for example, you want to work on one script while referencing another for variable names, function prototypes, etc.

Project Event Tree

The project event tree contains all of the scripts from your project in one central location. You can double-click on any item in the project event tree. If the item is a container for scripts, such as the 'Project', 'Page', or 'Dialogs' containers, double-clicking on them will display the items they contain. If the item is an event, double-clicking it will open it in the script editor to the immediate right of the current project tree.

Script Editor

The script editor in the Script Explorer dialog behaves in exactly the same way as the script editor. The only difference is that no event tabs are visible in the Script Explorer. This is because the script editor in the Script Explorer applies only to the event selected in the project event tree.

Event Variables:

The variables that are automatically set whenever the current event is triggered. (See event variables.)

Code Window

The area where you can either type in your actions, or add them through the action wizard.

Note: Once an action has been added to the code window, you can double-click it to show it's properties in the Action Properties dialog. This feature can be enabled or disabled by clicking the Advanced button on the script editor.

Quick Help:

When the cursor is on an action in the code window, it's action definition will be displayed in this field.

Action Help

When the cursor is on an action in the code window, it's online help will be opened.

Add Action

Adds a new action to the current event through the action wizard.

Add Code

Displays a variety of code templates you can add to the code window.

Edit

Edit the action's properties after it has been added to the code window. When the cursor is on an action in the code window, the Edit button will display it's properties dialog where you can modify it's settings.

Bookmarks

Create and manage bookmarks in the code window so you can easily jump to specific spots in your code.

Macros

Allows you to record and play macros so you can replicate frequent code scripts in the script editor.

Advanced

Advanced options that are available in the script editor:

Syntax Checker

This option checks the current script to make sure it is syntactically correct. It does not check for logical or other programming errors, simply syntax.

Note: You can turn on automatic syntax checking from Edit > Preferences on the Script Editor page.

Double-click Edit

Allow double-clicking on actions in the code window to edit their properties (Properties dialog will be displayed).

Note: If Double-click Edit is unchecked, double-clicking any text in the action editor simply selects the text, as in most other text editors. This option can also be set in Edit > Preferences on the Script Editor page.

Show Whitespace

If checked, any whitespace in the code window will be identified by special characters.

Import Registry Values...

Opens the Import Registry Key/Values dialog where you can import keys or values from the Registry on your development system.

Import .REG Files...

Opens a file browse dialog where you can select a .REG file that you would like to recreate using Setup Factory Registry actions.

Import...

Imports a script file (*.lua) and displays its contents in the code window.

Export...

Exports the current script in the code window as a script file (*.lua).

Print...

Prints the action script currently in the code window.

Global Functions ...

Opens the global functions dialog.

Editor Settings...

Opens the Window Properties dialog where you can customize the Globals dialog's settings.