Basicscript 2.25 Language Reference
Total Page:16
File Type:pdf, Size:1020Kb
BasicScript 2.25 Language Reference May 2, 1996 Information in this document is subject to change without notice. No part of this document may be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without the express written permission of Summit Software Company. Copyright © 1992–1996 Summit Software Company. All rights reserved. BasicScript is a registered trademark of Summit Software Company. All other trademarks are the property of their respective holders. iii Contents Introduction ...........................................................................................................................1 Language Summary ..............................................................................................................3 A-Z Reference ......................................................................................................................25 Index ...................................................................................................................................561 Summit Software Confidential Filename: lr.TOC Template: UGtemp.FM5 Page: iii of iv Printed: 5/2/96 iv BasicScript 2.2 Language Reference Summit Software Confidential Filename: lr.TOC Template: UGtemp.FM5 Page: iv of iv Printed: 5/2/96 Introduction This manual provides a complete reference for the BasicScript 2.25 scripting language. It contains the following: • The Language Summary provides you with a list of all functions, statements, and methods in the BasicScript language. These items are grouped by the task you wish to accomplish, so you can easily find the BasicScript language item that will help you do your work. • The A-Z Reference provides detailed explanations of each item in the BasicScript language. It also provides concise descriptions of important topics. • Appendix A, “Language Elements by Platform,” provides a quick, alphabetic list of the items in the BasicScript language that also shows the platforms supported by each item. Typographic Conventions This manual uses the following typographic conventions. Convention Description Do...Loop Words in monospaced type indicate elements of the BasicScript language. variable Words in italics indicate placeholders for parameters that you replace using the syntax described in this manual. text$ In syntax, the presence of a type-declaration character following a parameter signifies that the parameter must be a variable of that type or an expression that evaluates to that type. If a parameter does not appear with a type-declaration character, then its type is described in the text. [expressionlist] Square brackets indicate that the enclosed items are optional. Summit Software Confidential Filename: lrintro.fm5 Template: LRprint.FM5 Page: 1 of 2 Printed: 5/2/96 2 BasicScript Language Reference Convention Description Note: In BasicScript, you cannot end a statement with a comma, even if the parameters are optional: MsgBox "Hello",,"Message"'OK MsgBox "Hello",,'Not valid {Input | Binary} Braces indicate that you must choose one of the enclosed items, which are separated by a vertical bar. ... Ellipses indicate that the preceding expression can be repeated any number of times. ' Comment An apostrophe (') indicates the start of a comment. Summit Software Confidential Filename: lrintro.fm5 Template: LRprint.FM5 Page: 2 of 2 Printed: 5/2/96 Language Summary The following table summarizes the functions, statements, methods and other items that belong to the BasicScript language. Items are grouped by the tasks you might wish to perform. BasicScript Functions, Statements, and Methods by Category and Task Category Task Language Element(s) Arrays Return the number of dimensions of an array ArrayDims (function) Sort an array ArraySort (statement) Erase the elements in one or more arrays Erase (statement) Return the lower bound of a given array LBound (function) dimension Change the default lower bound for array Option Base (statement) declarations Re-establish the dimensions of an array Redim (statement) Return the upper bound of a dimension of an array UBound (function) Summit Software Confidential Filename: lrsumm.fm5 Template: LRprint.FM5 Page: 3 of 24 Printed: 5/2/96 4 BasicScript Language Reference BasicScript Functions, Statements, and Methods by Category and Task (Continued) Category Task Language Element(s) BasicScript Return the CPU architecture of the current system Basic.Architecture$ (property) information Return the capabilities of the platform Basic.Capability (method) Return the code page for the current locale Basic.CodePage (property) Return the end-of-line character for the platform Basic.Eoln$ (property) Return the available memory Basic.FreeMemory (property) Return the directory where BasicScript is located Basic.HomeDir$ (property) Return the locale of the current system Basic.Locale$ (property) Return the name of the current operating system Basic.OperatingSystem$ (property) Return the name of the vendor of the current Basic.OperatingSystemVendor$ operating system (property) Return the version of the current operating system Basic.OperatingSystemVersion$ (property) Return the platform id Basic.OS (property) Return the path separator character for the Basic.PathSeparator$ (property) platform Return the name of the CPU of the current system Basic.Processor$ (property) Returns the number of CPUs installed on the Basic.ProcessorCount (property) current system Return the version of BasicScript Basic.Version$ (property) Clipboard Return the content of the clipboard as a string Clipboard$ (function) Set the content of the clipboard Clipboard$ (statement) Clear the clipboard Clipboard.Clear (method) Get the type of data stored in the clipboard Clipboard.GetFormat (method) Get text from the clipboard Clipboard.GetText (method) Set the content of the clipboard to text Clipboard.SetText (method) Comments Comment to end-of-line Rem (statement) Add a comment ' (keyword) Summit Software Confidential Filename: lrsumm.fm5 Template: LRprint.FM5 Page: 4 of 24 Printed: 5/2/96 5 BasicScript Functions, Statements, and Methods by Category and Task (Continued) Category Task Language Element(s) Controlling other Activate an application AppActivate (statement) applications Close an application AppClose (statement) Return the filename corresponding to an AppFilename$ (function) application Return the full name of an application AppFind, AppFind$ (functions) Return the name of the active application AppGetActive$ (function) Get the position and size of an application AppGetPosition (statement) Get the window state of an application AppGetState (function) Hide an application AppHide (statement) Fill an array with a list of running applications AppList (statement) Maximize an application AppMaximize (statement) Minimize an application AppMinimize (statement) Move an application AppMove (statement) Restore an application AppRestore (statement) Set the state of an application's window AppSetState (statement) Show an application AppShow (statement) Change the size of an application AppSize (statement) Return the type of an application AppType (function) Simulate keystrokes in another application DoKeys (statement) Send keystrokes to another application SendKeys (statement) Execute another application Shell (function) Controlling menus Execute a menu command in another application Menu (statement) in other Determine if a menu item is checked in another MenuItemChecked (function) applications application Determine if a menu item is enabled in another MenuItemEnabled (function) application Determine if a menu item exists in another MenuItemExists (function) application Summit Software Confidential Filename: lrsumm.fm5 Template: LRprint.FM5 Page: 5 of 24 Printed: 5/2/96 6 BasicScript Language Reference BasicScript Functions, Statements, and Methods by Category and Task (Continued) Category Task Language Element(s) Controlling Activate a window WinActivate (statement) windows in other Close a window WinClose (statement) applications Find a window given its name WinFind (function) Fill an array with window objects, one for each WinList (statement) top-level window Change the size of a window WinMaximize (statement), WinMinimize (statement), WinRestore (statement), WinSize (statement) Move a window WinMove (statement) Scroll the active window left/right by a specified HLine (statement) number of lines Scroll the active window left/right by a specified HPage (statement) number of pages Scroll the active window left/right to a specified HScroll (statement) absolute position Scroll the active window up/down by a specified VLine (statement) number of lines Scroll the active window up/down by a specified VPage (statement) number of pages Scroll the active window up/down to a specified VScroll (statement) absolute position Summit Software Confidential Filename: lrsumm.fm5 Template: LRprint.FM5 Page: 6 of 24 Printed: 5/2/96 7 BasicScript Functions, Statements, and Methods by Category and Task (Continued) Category Task Language Element(s) Conversion Return the value of a character Asc, AscB, AscW(functions) Convert one numeric value to another CBool (function), CCur (function), CDate, CVDate (functions), CDbl (function), CInt (function), CLng (function), CSng (function), CStr (function), CVar (function), Fix (function), Int (function) Convert a character value to a string Chr, Chr$, ChrB, ChrB$, ChrW, ChrW$ (functions) Convert a value to an error CVErr (function) Convert a number to a hexadecimal string Hex, Hex$ (functions) Determine if an expression is convertible to a