. DirectXtras Home
        Home

DirectCommunication Xtra
DirectConnection Xtra
DirectControl Xtra
DirectEmail Xtra
DirectFTP Xtra
DirectImage Xtra
DirectInteraction Xtra
DirectOS Xtra
Documentation
License Agreement
Licensing Fees
Order Form
DirectSMS Xtra
DirectSound Xtra
DirectTransition Xtra
DirectTransition3D Xtra Set I
DirectTransition3D Xtra Set II
DirectTransition3D Xtra Set III
DirectTTS Xtra
XtrAgent
DirectXport Xtra

SpeechPlugin

Special Discounted Bundles

The Gallery
How To Order
Order Form
Check for Upgrades

Sign in
Change Your Profile

Contact Us
















    .
DirectXtras
Xtra Power for Director & Authorware



DirectOS Xtra
 Directing Windows and MacOS. The OS at your fingertips!

Authorware 4.x Compatible Authorware 5.x CompatibleAuthorware 6.x CompatibleAuthorware 7.x CompatibleDirector 5.x Compatible Director 6.x CompatibleDirector 7.x Compatible Director 8.x CompatibleDirector MX CompatibleDirector MX 2004 Compatible     MacOS 8.x and 9.x CompatibleMacOS X CompatibleWindows Compatible   

DirectOS Xtra Version 3.5 Documentation

Developed by Tomer Berda, Omri Kalinsky and Arnon Ziklik, DirectXtras Inc.
(C) Copyright 1997-2004.
Last updated:
August 31, 2004.

DirectOS Xtra is a powerful cross-platform Scripting Xtra for Macromedia Director and Authorware which provides applications with direct access to the Windows and MacOS operating systems.

The Xtra provides more than 90 functions that perform identically on both Windows and MacOS and which Director and Authorware developers can use to: 

  • Retrieve the operating system type and exact version
  • Get and set the screen resolution, color depth and refresh rate as well as query for all available display settings on the system
  • Launch external applications at a specified state with command line support
  • Synthesize mouse clicks and keystrokes
  • Create, display, and operate a message box
  • Create, display, and operate file and folder selection dialogs
  • Open or print a file using its associated application
  • Find an application associated with a specific file type
  • Log off, shut down, or restart the system
  • Encrypt/Decrypt files and string variables
  • Get and set volume and mute information for multiple sound channels
  • Change the desktop wallpaper and pattern
  • Search for files in a folder or drive with powerful wildcard support
  • Check whether any one or more keys are being held down
  • Set the cursor position or confine it to a rectangular area of the screen
  • Query for all available printers on the system; set the default one as well as its properties
  • Set the system time and date
  • Retrieve a list of subfolders and files in a folder, with powerful wildcard support
  • Create and resolve file or folder links/shortcuts
  • Retrieve a list of all available disk drives on the system
  • Retrieve information about disk drives, such as type, name, size and free space
  • Un-mount and eject disk drives
  • Get and set the current 'working' folder
  • Retrieve the pathname of special system folders
  • Check for the existence of files and folders
  • Retrieve and modify file and folder attributes
  • Get and set file date and time
  • Retrieve the size and version of files
  • Copy, move, delete, and recycle files
  • Copy, move, delete and create folders
  • Retrieve a unique pathname to a nonexistent file or folder that can be used as a temporary file or folder
  • Read from, write to, and delete from INI files
  • Get and set the system time zone information
  • Check whether a sound card is installed
  • Retrieve mouse settings
  • Retrieve the processor speed
  • Refresh the desktop items
  • Query for all running applications on the system
  • Manipulate external applications and their child windows
  • Get and set the state, name, position and size of an external application's windows
  • Switch between applications
  • Block keyboard and mouse input events from reaching applications
  • ... and much more...

In addition, the Xtra provides Windows specific functions that can be used to:

  • Easily read, write, and delete strings, integers and binary data to/from the Windows registry
  • Retrieve the command-line string passed to your application
  • Install, enable or disable screen savers, get and set their time-out duration
  • Convert long pathnames to short pathnames and vice versa
  • Disable/Enable Ctrl-Alt-Del, Alt-Tab, Start Menu key and other system keys
  • Get and set system and local environment variables
  • Open Windows help files

The Xtra also provides MacOS specific functions which can:

  • Get and set the creator and type signatures of files
  • Check whether a specific gestalt selector exists
  • Retrieve the value of a particular gestalt selector

DirectOS Xtra is available for Director 5 and above, Authorware 4 and above, and is compatible with Windows 9X, 2000, ME, NT, XP as well as MacOS 8, 9 and X.

Installation Instructions

Registration Instructions

Backward Compatibility Note

While DirectOS Xtra version 3.x was designed similar to versions 2.x, a few functions have changed. In the history section you'd find a list of modified functions. If your application is using one of those functions you'd have to adopt the appropriate calls in your code to the new version. In the history section you'd also find a list of enhanced functions. No changes to your code are necessary if it uses functions from that list, but in some cases you'd have to modify your code in order to take advantage of the new features.

If you're upgrading from version 1.x or 2.x to 3.x, you'd receive a new serial number. Unlike previous versions, the Xtra now accepts serial numbers as strings and not integers so be sure to update the dosRegister() call appropriately.

Sample Code (Cross Platform)

Changing the system's time, date and time zone settings.

Restarting the system upon user confirmation.

Opening a URL using the default browser.

Opening a file using its associated application.

Changing the screen resolution, color depth and refresh rate.

Finding and launching applications.

Finding and launching the default web browser, then controlling the launched application.

Waiting for a CD-ROM to be inserted into the drive.

Creating a shortcut to the application on the desktop folder.

Adding items to the Start -> Programs menu \ Apple Menu.

Associate files with applications.

Sample Code (Windows Only)

Hiding and showing the Windows taskbar.

Obtaining the DirectX version.
 

 

Functions Summary

DirectOS Xtra adds the following, easy to use functions to Director and Authorware.

Clicking on a function name will open a new browser window which includes complete information and more specific details on the function.

All of the DirectOS Xtra functions are global and can be called from anywhere in your script. 

General Functions

dosRegister(string SerialNumber) - Registers DirectOS Xtra for the current authoring or run-time session.
dosGetLastError() - Returns the error code generated by the last call to any DirectOS function.

System Functions

dosGetVersion() - Returns the operating system type and version.
dosSetSystemDate(string NewDate) - Sets the system clock date.
dosSetSystemTime(string NewTime) - Sets the system clock time.
dosGetSystemTimeZone() - Returns the system's time zone, as relative to GMT.
dosSetSystemTimeZone(integer NewTimeZone, integer ChangeTime) - Sets the system time zone, as relative to GMT.
dosIsSoundCardInstalled() - Checks whether a sound card is installed.
dosGetDisplay() - Returns the width, height, color depth and refresh rate of the current display settings.
dosGetDisplayMode(integer DisplayModeNumber)

Returns the width, height, color depth and refresh rate of the specified display settings.
dosSetDisplay(integer Width, integer Height, integer Depth, integer RefreshRate, string Mode) - Sets the width, height, color depth and refresh rate of the display.
dosGetPrinter(string Info) - Returns information about the default settings of the default printer.
dosExitSystem(string Action) - Shuts down, restarts, or logs off the system.
dosGetProcessorSpeed() - Returns the processor cycles per second in MHz.
dosGetVolume(string SoundChannel) - Retrieves the volume and mute information of the specified sound channel.
dosSetVolume(string SoundChannel, integer Volume) - Sets the volume of the specified sound channel.
dosRefreshDesktop() - Refreshes the desktop icons.
dosEncryptText(string Text, string Key) - Encrypts a string.
dosDecryptText(string Text, string Key) - Decrypts an encrypted string.
dosLaunchApp(string Application, string State, integer Wait) - Launches the specified application.
dosFindApp(string FileType) - Finds the pathname of the application associated with the specified file type.
dosGetDrives() - Returns a list of all drives available on the system.
dosGetDriveInfo(string Drive, string Info) - Provides information about the specified drive.
dosEject(string Drive) - Un-mounts and ejects a disk drive.
 

User Interface Functions

dosSetCursorPos(integer X, integer Y) - Sets the position of the mouse cursor.
dosMouseClick(string Type) - Synthesizes a mouse related event.
dosKeyPress(integer KeyCode, integer KeyState) - Synthesizes a keystroke on the active window.
dosGetKeyState(integer KeyCode) - Returns the state of the specified key.
dosBlockInput(integer State) - Blocks keyboard and mouse input events from reaching applications.
dosGetDoubleClickTime() - Returns the maximum double click time.
dosMessageBox(string Text, string Caption, string Buttons, string Icon, string DefaultButton) - Displays a message box, prompting the user to select an option.
dosGetWallpaper() - Retrieves the full pathname of the desktop wallpaper image file.
dosSetWallpaper(string FileName, string DisplayMode) - Sets the image file of the desktop wallpaper.

File And Folder Functions

dosSelectFile(string Operation, string StartFolder, string FileName, any FileTypes, string Message) - Presents the user with a file selection dialog box.
dosSelectFolder() - Presents the user with a folder selection dialog box.
dosSetCurrentFolder(string PathName) - Sets the current folder.
dosGetCurrentFolder() - Returns the pathname of the current folder.
dosIsFileExist(string FileName) - Checks whether the specified file exists.
dosIsFolderExist(string PathName) - Checks whether the specified folder exists.
dosGetFileDate(string FileName, string Info) - Returns the date of the specified file, folder or drive.
dosSetFileDate(string fileName, string info, string Date) - Sets the date of the specified file, folder or drive.
dosGetFileTime(string FileName, string Info) - Returns the time of the specified file, folder or drive.
dosSetFileTime(string FileName, string Info, string Time) - Sets the time of the specified file, folder or drive.
dosGetFileAttribute(string FileName, string Attribute) - Checks whether the specified file or folder has the specified attribute.
dosSetFileAttribute(string FileName, string Attribute, integer Value) - Sets or disables the specified attribute for the specified file or folder.
dosGetFileSize(string FileName) - Returns the size of the specified file.
dosGetFileVersion(string FileName) - Returns the file version.
dosMoveFile(string SourceFileName, string TargetFileName) - Moves the specified source file to the specified target file location.
dosCopyFile(string SourceFileName, string TargetFileName) - Copies the specified source file to the specified target file location.
dosDeleteFile(string FileName) - Deletes the specified file.
dosTrashFile(string FileName) - Puts the specified file in the trash.
dosCreateFolder(string PathName) - Creates the specified folder.
dosDeleteFolder(string PathName) - Deletes the specified folder.
dosMoveFolder(string SourceFolderName, string TargetFolderName) - Moves the specified source folder to the specified target folder location.
dosCopyFolder(string SourceFolderName, string TargetFolderName) - Copies the specified source folder to the specified target folder location.
dosGetSpecialFolder(string Folder) - Returns the pathname of the specified special folder.
dosOpenFile(string FileName, string State) - Opens the specified file, folder or URL with its associated application.
dosPrintFile(string FileName) - Prints the specified file using its associated application.
dosEncryptFile(string FileName, string EncryptedFileName, string Key) - Encrypts a file.
dosDecryptFile(string FileName, string DecryptedFileName, string Key) - Decrypts a file.
dosGetTempFileName() - Returns a pathname that can be used as a temporary file or folder.
dosGetFilesInFolder(string PathName) - Returns the names of all files in a specified folder matching the specified wildcard pattern.
dosGetFoldersInFolder(string PathName) - Returns the names of all folders in a specified folder.
dosSearchFiles(string PathName) - Searches for files in the specified folder, including the folder's sub folders.
dosCreateLink(string LinkAtName, string LinkToName, string Args, string WorkingFolder, string IconLocation, integer HotKey, string State) - Creates a link at the specified location to the specified target location.
dosResolveLink(string FileName) - Resolves the link at the specified location and returns the target's pathname as well as the link properties.
dosReadINI(string FileName, string SectionName, string KeyName) - Returns the value of the specified key from a specified section of a specified INI file.
dosWriteINI(string FileName, string SectionName, string KeyName, string Data) - Sets the value of the specified key from a specified section of a specified INI file
dosDeleteINI(string FileName, string SectionName, string KeyName) - Deletes the specified key from a specified section of a specified INI file.
dosListSectionsINI(string FileName) - Returns the names of all sections in the specified INI file.
dosListKeysINI(string FileName, string SectionName) - Returns the names of all keys in the specified section of the specified INI file.

 

Windowing Functions

dosGetTopWindowIDs() - Returns the window IDs of all top level windows.
dosGetAppWindowID() - Returns the window ID of the host application's main window.
dosGetWindowName(integer WindowID)
- Returns the name of the specified window.
dosGetFrontWindowID() - Returns the window ID of the front most window.
dosSetFrontWindow(integer WindowID) - Sets the front most window.
dosIsWindowExist(integer WindowID) - Checks whether the specified window exists.
dosCloseWindow(integer WindowID) - Closes the specified window.
dosGetWindowState(integer WindowID, string State) - Gets the state of the specified window.
dosSetWindowState(integer WindowID, string State) - Sets the state of the specified window.
dosGetWindowClassName(integer WindowID) - Returns the class name / creator type of the specified window.
 

Windowing Functions for Windows Only

dosGetChildWindowIDs(integer WindowID) - Returns the window IDs of the specified window's child windows.
dosGetParentWindowID(integer WindowID) - Returns the window ID of the specified window's parent window.
dosSetWindowName(integer WindowID, string NewName) - Sets the name of the specified window.
dosGetWindowRect(integer WindowID) - Returns the size and position of the specified window.
dosSetWindowRect(integer WindowID, integer Left, integer Top, integer Right, integer Bottom) - Sets the size and position of the specified window.
dosSetWindowZOrderPos(integer WindowID) - Sets the Z order position of the specified window.
dosDisableWindowInput(integer WindowID, integer State) - Disables or enables mouse and keyboard input to the specified window.
dosIsWindowInputDisabled(integer WindowID) - Determines whether the specified window is disabled for mouse and keyboard input.

Windows Only Functions

dosReadReg(string Key, string SubKey, string ValueName) - Reads and returns a value from the registry.
dosWriteReg(string Key, string SubKey, string ValueName, any Value) - Writes a value into the registry.
dosDeleteReg(string Key, string SubKey, string ValueName) - Deletes a key or value from the registry.
dosKeyListReg(string Key, string SubKey) - Returns the names of all immediate sub keys of the specified key.
dosValueListReg(string Key, string SubKey) - Returns the names of all values of the specified key.
dosSetPattern(any Pattern) - Sets the desktop pattern.
dosGetScreenSaver() - Returns the screen saver executable's pathname.
dosSetScreenSaver(string FileName) - Sets the current screen saver executable.
dosGetScreenSaverTimeOut() - Returns the screen saver timeout.
dosSetScreenSaverTimeOut(integer Seconds) - Sets the screen saver timeout.
dosGetScreenSaverActive() - Checks whether the screen saver is enabled or disabled.
dosSetScreenSaverActive(integer Active) - Enables or disables the screen saver.
dosClipCursor(integer Left, integer Top, integer Right, integer Bottom) - Confines the cursor to a rectangular area of the screen.
dosReleaseCursor() - Releases the cursor to move freely anywhere on the screen.
dosDisableSystemKeys( integer State ) - Disables or enables system key combinations.
dosSetPrinter(string Info, any Setting) - Sets the default printer or a property of the default printer.
dosGetCommandLine() - Returns the command line used to invoke the host application.
dosGetShortFileName(string FileName) - Returns the short pathname form of a specified file or folder pathname.
dosGetLongFileName(string FileName) - Returns the long pathname form of a specified file or folder pathname.
dosWinHelp(string FileName, string Command, string Info) - Opens the specified help file.
dosGetEnvironmentVariable(string EnvVarName) - Retrieves the contents of the specified system or local environment variable.
dosSetEnvironmentVariable(string envVarName, any values) - Sets the contents of the specified system or local environment variable.

MacOS Only Functions

dosGetFileType(string FileName) - Returns the four character file type signature of the specified file.
dosSetFileType(string FileName, string FileType) - Sets the four character file type signature of the specified file.
dosGetFileCreator(string FileName) - Returns the four character file creator signature of the specified file.
dosSetFileCreator(string FileName, string FileCreator) - Sets the four character file creator signature of the specified file.
dosGetGestaltValue(string Selector, integer Info) - Retrieves the value of a particular gestalt selector.

 

Error Code Reference

 

History



DirectXtras Inc.
P.O Box 2645, Menlo Park, CA, 94026, U.S.A
Voice: +1-415-5058249, Fax: +1-801-8585841
Toll Free: 1-800-4453093
E-mail General Information: info@directxtras.com
E-mail Technical Support: support@directxtras.com

Copyright 1996-2004 DirectXtras Inc. All Rights Reserved.
WebMaster: tamar@directxtras.com
Last Updated: 9/18/2004 8:33:09 AM.