Document Body Page Navigation Panel Document Outline
Page 1 2
Revolution Reference
Revolution version 2. 1. 2
Engine version 2.5.1
Table of Contents Language
Dictionary
How to… Why…?
Menu Reference Glossary
Shortcuts Reference Vocabulary Listings
Original PDF presentation dated 26 th
March 2004
By www. FlexibleLearning. com
This presentation dated
April 2004
By www. howsoft. com
Page 2
Table of Contents Revolution Reference 1 Table of Contents
2
2 Page 3 4
absolute coordinates ...............2594
absolute file path.................... 2595
active control ......................... 2596
active window ........................ 2597
AIFF...................................... 2598
alias...................................... 2599
alpha channel......................... 2600
alphanumeric character ........... 2601
Alt key .................................. 2602
animated GIF ......................... 2603
Animation library .................... 2604
anomaly ................................ 2605
antialiasing ............................ 2606
appearance............................ 2607
append.................................. 2608
Apple Event ........................... 2609
Apple menu ........................... 2610
AppleScript ............................ 2611
AppleTalk .............................. 2612
Application Browser ................ 2613
application bundle................... 2614
Application menu.................... 2615
application ............................. 2616
Aqua ..................................... 2617
argument .............................. 2618
arm ...................................... 2619
array dimension ..................... 2620
array..................................... 2621
ASCII .................................... 2622
associative array .................... 2623
attribute ................................ 2624
AU ........................................ 2625
audio clip............................... 2626
automatic database query........ 2627
AVI ....................................... 2628
background............................ 2629
backScript ............................. 2630
behavior ................................ 2631
binary data ............................ 2632
binary file .............................. 2633
binary ................................... 2634
BinHex .................................. 2635
bit depth ............................... 2636
bit ........................................ 2637
bitmap .................................. 2638
bitwise .................................. 2639
black-and-white...................... 2640
BLOB .................................... 2641
block comment....................... 2642
blocking ................................ 2643
BMP ...................................... 2644
boolean ................................. 2645
breakpoint ............................. 2646
Browse tool............................ 2647
browse .................................. 2648
browser ................................. 2649
buffer.................................... 2650
build ..................................... 2651
built-in command ................... 2652
built-in function ...................... 2653
built-in message..................... 2654
built-in property ..................... 2655
button menu .......................... 2656
button ................................... 2657
byte order ............................. 2658
byte....................................... 2659
cache..................................... 2660
call ........................................ 2661
callback.................................. 2662
caller ..................................... 2663
Carbon................................... 2664
card control ............................ 2665
card....................................... 2666
cascading menu ...................... 2667
case-insensitive ...................... 2668
case-sensitive ......................... 2669
cell ........................................ 2670
CGI ....................................... 2671
channel .................................. 2672
character set .......................... 2673
character................................ 2674
checkbox................................ 2675
checksum............................... 2676
child node .............................. 2677
chunk expression .................... 2678
chunk .................................... 2679
clipboard ................................ 2680
close box................................ 2681
codec..................................... 2682
collapse box ........................... 2683
collapse.................................. 2684
color palette ........................... 2685
color reference........................ 2686
color table .............................. 2687
column................................... 2688
combo box ............................. 2689
Command key......................... 2690
command line ......................... 2691
command ............................... 2692
comment................................ 2693
Common library ...................... 2694
compile error .......................... 2695
compile .................................. 2696
compress ............................... 2697
concatenate............................ 2698
conditional.............................. 2699
console .................................. 2700
constant................................. 2701
constrain................................ 2702
container................................ 2703
contextual menu ..................... 2704
contiguous.............................. 2705
control structure ..................... 2706
control ................................... 2707
controller bar .......................... 2708
creator signature..................... 2709
cross-platform ........................ 2710
current card............................ 2711
current folder.......................... 2712
current stack .......................... 2713
cursor .................................... 2714
custom command.................... 2715
custom function ...................... 2716
custom property set ................ 2717
custom property...................... 2718
Darwin................................... 2719
data fork ................................ 2720
database driver ....................... 2721
database field ......................... 2722
Database library...................... 2723
Database Query Builder ........... 2724
database ................................ 2725
datagram ............................... 2726
debug .................................... 2727
debugger ............................... 2728
decimal point .......................... 2729
decimal .................................. 2730
declare................................... 2731
decode................................... 2732
decrypt .................................. 2733
default button ......................... 2734
default ................................... 2735
degree ................................... 2736
delimit ................................... 2737
delimiter ................................ 2738
dereference............................
To align control edges.............. 3142
Standard Tokens ..................... 3187 See Also: Summary Syntax Example Code Comments Comments: If you start up the application
from the command line (on OS X, Unix or Windows systems), the command name is
stored in the global variable $0 and any arguments passed on the command line
are stored in numbered variables starting with the $ character. For example, if
you start the application by typing the following shell command: myrevapp -h name myrevapp -in "new info. txt"
-out "new info. xml" On Unix and OS X systems, a
variable whose name begins with the $ character is exported to the
application's environment, and is inherited by processes started up by the
shell function or the open process command. Use this technique to create your
own environment variables. You can access existing
environment variables by prepending the $ character to the environment
variable's name. For example, the following statement gets the contents of the
LOGNAME environment variable: get $LOGNAME 16 Platforms See Also: Summary Syntax Example Code get offset( return & space,
theData) Parameters: Comments: Platforms See Also: Summary Syntax Example Code find it && "Card" Parameters: Comments: The && operator is
equivalent to & space &. In other words, "this" & space &
"that" 18 Platforms See Also: Summary Syntax Example Code 23 * (( 4 / 17) + 60) + (-7) Parameters: Comments: For example, the sin function is
evaluated before the / operator, so the sin of 1/ 4 means "take the sine
of one, then divide Even when they are not needed to
change operator precedence, parentheses are useful in making complex
expressions (quantity * priceEach) + (shippingCost
* weight) evaluates to the same number as quantity * priceEach + shippingCost *
weight But the first example is easier to understand, because the
parentheses break down the expression logically for the reader. Parentheses in expressions must
be used in pairs, each ( with a matching ). Use of unmatched parentheses will
cause a Platforms See Also: Summary Syntax Example Code put (3 + commonFactor) * 4 into
tempVariable Parameters: Comments: If either number1 or number2 is
an array, each of the array elements must be a number. If an array is
multiplied by a If an element of one array is
empty, the * operator treats its contents as zero. Platforms See Also: Summary Syntax Example Code Comments Parameters: Comments: If either number1 or number2 is
an array, each of the array elements must be a number. If a number is added to
an array, If an element of one array is
empty, the + operator treats its contents as zero. Platforms See Also: Summary Syntax Example Code Comments Parameters: Comments: The , operator is equivalent to
& comma &. In other words, "this" & comma &
"that" 22 Platforms See Also: Summary Syntax Example Code put myArray -17 into adjustedValues Parameters: Comments: You cannot use the unary minus
twice in a row. The expression If firstNumber or secondNumber is
an array, each of the array elements must be a number. If a number is
subtracted from If an element of an array is
empty, the -operator treats its contents as zero. Objects Platforms See Also: Summary Syntax Example Code Comments Comments: Comments can be placed anywhere
in a scriptóinside handlers or outside all handlers. In a long script with many
handlers, it Comments can contain any text,
including lines of Transcript code. If the code is within a comment, it's
ignored. You can Platforms See Also: Summary Syntax Example Code Comments Parameters: Comments: If number is an array, each of
the array elements must be a number. If an array is divided by a number, each
element is If an element of an array is
empty, the / operator treats its contents as zero. See Also: Summary Syntax Example Code long, is a single comment. */ Comments: The block comments created by
/**/ differ from the line comments created by --because a block comment can
span Comments can be placed anywhere
in a scriptóinside handlers or outside all handlers. In a long script with many
handlers, it Comments can contain any text,
including lines of Transcript code. If the code is within a comment, it's
ignored. You can See Also: Summary Syntax Example Code Comments Comments: go card 1; beep 2; answer the
date Platforms See Also: Summary Syntax Example Code if thisVariable < 0 then beep Parameters: Comments: If the strings are of different
lengths, so that the trailing characters in one string are compared to missing
characters in the If the two values are equal,
firstValue < secondValue evaluates to false. Objects Platforms See Also: Summary Syntax Example Code "a" <= "a"
--evaluates to true Parameters: Comments: "a" <=" a" If the strings are of different
lengths, so that the trailing characters in one string are compared to missing
characters in the If the caseSensitive property is
true, the comparison between two strings treats uppercase letters as coming
before Cross-platform caution! The
synonym £ can be used only on Mac OS and OS X systems. If you use a script
containing the Objects Platforms See Also: Summary Syntax Example Code field "Old Password" <>
field "Password" Parameters: Comments: Cross-platform caution! The
synonym _ can be used only on Mac OS and OS X systems. If you use a script
containing the Objects Platforms See Also: Summary Syntax Example Code "ABC" = "abc"
--true if and only if caseSensitive is false Parameters: Comments: Platforms See Also: Summary Syntax Example Code repeat while counter > 0 Parameters: Comments: If the strings are of different
lengths, so that the trailing characters in one string are compared to missing
characters in the If the two values are equal,
firstValue > secondValue evaluates to false. Objects Platforms See Also: Summary Syntax Example Code Comments Parameters: Comments: "z" >=" z" If the strings are of different
lengths, so that the trailing characters in one string are compared to missing
characters in the If the caseSensitive property is
true, the comparison between two strings treats uppercase letters as coming
before Cross-platform caution! The
synonym _ can be used only on Mac OS and OS X systems. If you use a script
containing the See Also: Summary Syntax Example Code Comments Comments: The following handler takes a
parameter and simply adds 1 to it: The following handler calls the
"setVariable" handler above: Because the parameter for the
"setVariable" handler is declared with a leading @, the mouseUp
handler passes See Also: Summary Syntax Example Code Comments Comments: put "A" into
myList[" firstLetter"] Square brackets must be used in
pairs, each [ with a matching ]. Using a single square bracket does not cause
an error, but Objects Platforms See Also: Summary Syntax Example Code && "minutes." with
"Keep Waiting" or "Cancel" Comments: The script editor automatically
indents continued lines, as shown in the example above. answer "This is a test. This
is only a test. Cross-platform caution! The
synonym ÿ (option-L) can be used only on Mac OS and OS X systems. If you use a
script Platforms See Also: Summary Syntax Example Code put 2^ bitDepth into numberOfColors Parameters: Comments: If the exponent is zero, the
result of this operator is 1, regardless of what the number is. 37 Objects Platforms See Also: Summary Syntax Example Code Comments Comments: If the useSystemDate property is
set to false, an abbreviated date looks like this: If the useSystemDate property is
set to false, an abbreviated time looks like this: An abbreviated object name consists
of the object type, followed by the name in quotes. For example, an abbreviated
card An abbreviated object ID looks
like this: field ID 2238 Changes to Transcript: See Also: Summary Syntax Example Code abs( firstNum -secondNum) --is equal to
the next example abs( secondNum -firstNum) --is equal to the previous example Comments Parameters: Value: Comments: Objects Platforms See Also: Summary Syntax Example Code set the accelKey of button
"Calc" to field "Key" Value: By default, the acceleratorKey of
a newly created button is empty. The key( s) specified in the
acceleratorMods property must be pressed along with the acceleratorKey. If the insertion point is in a
field, the keypress is sent to the field, and the button does not receive it. Objects Platforms See Also: Summary Syntax Example Code set the accelMods of button it to
command, shift Value: The keys can be any of
"control", "command", "alt", "option",
and "shift". If you use "command" as a key, it is converted
to By default, the
acceleratorModifiers of a newly created button is empty. set the acceleratorKey of button
"Calculate" to "C" When the user presses Alt-Shift-C
(on Unix or Window systems) or Option-Shift-C (on Mac OS systems), the button's
Cross-platform note: On Mac OS
systems, the Control key and Command key are equivalent when used with this Objects Platforms See Also: Summary Syntax Example Code set the accelText of button 9 to
"option-D" set the accelText of the mouseControl to empty --remove
acceleratorText Comments Value: By default, the acceleratorText
of a newly created button is empty. If the button's textAlign
property is set to "right", the button's label overlaps the
acceleratorText string, so you shouldn't set Usually, the string should be the
character in acceleratorKey, but you might want to include additional
characters to hint at Note: Nothing happens when the
user presses the key specified by the acceleratorText property unless the
acceleratorKey Platforms See Also: Summary Syntax Example Code set the accentColor to "#
CC00FF" --violet Value: The colorName is any standard
color name. Comments: The accentColor property is
copied from the system settings every time Revolution starts up, but can be
changed by a See Also: Summary Syntax Example Code Comments Use the datagram option if you
want to accept UDP datagrams. The callbackMessage is the name
of a message to be sent when a connection is made or a datagram is received. host: port[| connectionID] The callbackMessage is sent to
the object whose script contains the accept command. Either one or two
parameters are sent For technical information about
sockets, see RFC 147 at <http:// www. ietf. org/ rfc/ rfc147.txt>. Platforms See Also: Summary Syntax Example Code Comments Value: Comments: If the acceptDrop is set to true,
when you drop data, a dragDrop message is sent to the object that the mouse
pointer is Revolution handles the mechanics
of dragging and dropping text between and within unlocked fields. To support
this type of The acceptDrop property is
automatically set to true when a dragEnter message is received by an unlocked
field (unless the The acceptDrop is automatically
set to false when the mouse pointer enters a locked field, or any other object.
To allow an See Also: Summary Syntax Example Code acos( field "Opposite" +
field "Sine") Parameters: Value: Comments: The result of the acos function
is returned in radians. To get this result in degrees, use the following
function: Platforms See Also: Summary Syntax Example Code Comments Value: By default, the activatePalettes
is true if Revolution is running on a Mac OS system and false otherwise. See Also: Summary Syntax Example Code add qty * price to last line of myOrder
Parameters: The chunk is a chunk expression
specifying a portion of the container. If a number is added to an
arrayContainer, the number is added to each element. If an array is added to an
arrayContainer, If the container or an element of
the arrayContainer is empty, the add command treats its contents as zero. See Also: Summary Syntax Example Code Comments Comments: For example, suppose an object's
color is 30,70,150, and the color of the pixels under the object is 60,40,100.
If the The addMax mode can be used only
on Mac OS systems. On Unix and Windows systems, objects whose ink property is
set See Also: Summary Syntax Example Code Comments Comments: For example, suppose an object's
color is 25,220,150, and the color of the pixels under the object is 60,40,100.
If the The addOver mode can be used only
on Mac OS systems. On Unix and Windows systems, objects whose ink property is
set See Also: Summary Syntax Example Code Comments Comments: For example, suppose an object's
color is 240,0,100, and the color of the pixels under the object is 60,40,20.
If the addPin The addPin mode can be used only
on Mac OS systems. On Unix and Windows systems, objects whose ink property is
set Platforms See Also: Summary Syntax Example Code Comments Value: The address property is read-only
and cannot be set. On Unix systems, the computer's
name is its domain name. On Mac OS systems, the name is the one set in the File
Sharing Changes to Transcript: See Also: Summary Syntax Example Code Comments Comments: For example, suppose an object's
color is 30,70,150, and the color of the pixels under the object is 60,40,100.
If the adMin The adMin mode can be used only
on Mac OS systems. On Unix and Windows systems, objects whose ink property is
set to See Also: Summary Syntax Example Code Comments Comments: When you use the after keyword,
the current contents of the container or chunk is not affected. The text is
added to the See Also: Summary Syntax Example Code Comments Parameters: Value: Comments: Platforms See Also: Summary Syntax Example Code Comments The allowFieldRedraw property is
always set to false. A handler can set it to any value without causing a script
error, but the Platforms See Also: Summary Syntax Example Code Comments Value: By default, the allowInlineInput
is true. If the allowInlineInput is false,
if the insertion point is in a field and a double-byte language is currently
selected, a text-entry Platforms See Also: Summary Syntax Example Code Comments Value: By default, the allowInterrupts
property is true. If the allowInterrupts property
is set to false and the user attempts to interrupt the handler, the interrupt
function returns Setting the allowInterrupts
property to false is functionally equivalent to setting the cantAbort property
to true for each Caution! Before setting the
allowInterrupts property to false, make sure all handlers that may be affected
have been Platforms See Also: Summary Syntax Example Code Comments In Revolution, the
"keyInField" message is not sent. Platforms See Also: Summary Syntax Example Code Comments Value: Comments: A value of zero means the pixel
is fully transparent; a value of 255 is fully opaque; and values in between
indicate a level of Gotcha: Since the alphaData of an
image is binary data rather than text, trying to display the data in a field
may cause Since each pixel is represented
by 8 bits (1 byte or 1 character), you can obtain the numeric value for a given
pixel using Gotcha: When changing the
alphaData property, make sure the new data is the correct size: 1 byte per
pixel in the See Also: Summary Syntax Example Code then do it as AppleScript Value: Comments: Platforms See Also: Summary Syntax Example Code Comments Value: By default, the altID for all
objects is zero. Gotcha: Be careful not to set an
object's altID property to the ID of an object of the same type. Since both
properties are See Also: Summary Syntax Example Code repeat until altKey() = up Value: Comments: The terminology varies depending
on platform. Users of different operating systems may know this key as the
Option key Platforms See Also: Summary Syntax Example Code set the alwaysBuffer of the
templatePlayer to true Value: Comments: Setting a stack's alwaysBuffer
property to true eliminates flicker, but increases memory usage because memory
must be You can find out whether a stack
is currently being buffered by comparing its pixmapID property to its windowID
property: Setting an image's alwaysBuffer
property to true forces the image to uncompress immediately, even if the image
is hidden. Setting a player's alwaysBuffer
property to true forces the movie to be drawn in an offscreen buffer. This
prevents the If a player's movie contains only
sound with no visual track, the setting of its alwaysBuffer property has no
effect. Platforms See Also: Summary Syntax Example Code if the shiftKey is down and myCount
> 1 then exit mouseUp Parameters: Comments: You can combine the logical
operators and, or, and not in an expression. Platforms See Also: Summary Syntax Example Code set the angle of graphic myGraphic to
the angle of myGraphic + 5 Value: By default, the angle property of
a newly created graphic or image is zero. A regular polygon can be rotated
between zero and 360 . . Increasing the angleInDegrees rotates the polygon
clockwise. An image can be rotated between
zero and 360 . . Increasing the angleInDegrees rotates the image
counterclockwise. By default, oval graphics display
their entire arc from zero to 360 . , forming a complete oval. You can use the
angle and Note: For an oval, the angle is
the same as the startAngle. Changing one changes the other. See Also: Summary Syntax Example Code Comments Parameters: The numberOfPeriods is a positive
number. Comments: The numberOfPeriods and the
interestRate must use the same unit of time. For example, if the periods are
months, the You can use the annuity function
to calculate the amount of loan payments as follows: See Also: Summary Syntax [titled windowTitle] [as sheet] answer "Greetings!" with
"Log In" or "Cancel" titled "Login" answer the
currPrompt of me with "OK" or "Cancel" as sheet Comments Parameters: Cross-platform note: On OS X
systems, the image specified by the gRevAppIcon keyword appears if you don't
specify an The prompt is a string (or any
expression that evaluates to a string). The dialog box expands if necessary to
fit the The buttons are strings. You can
specify up to seven buttons, separated by the word "or". The buttons
and the dialog box The windowTitle, if specified,
appears in the title bar of the dialog box. If you don't specify a windowTitle,
the title bar is Comments: The name of the button the user
chooses is placed in the it variable. If the as sheet form is used, the
dialog box appears as a sheet on OS X systems. On other systems, the as sheet
form has Changes to Transcript: The ability to provide formatted
text for the prompt was introduced in version 2. 0. 70 See Also: Summary Syntax Example Code answer color with "# FF0033"
answer color with "AliceBlue" Comments Parameters: Comments: The color the user chooses is
placed in the it variable. If the user cancels the dialog, the it variable is
set to empty, and the If you specify a startingColor,
the dialog box displays that color by default. Changes to Transcript: See Also: Summary Syntax Example Code Comments Comments: An encoded description of the
visual effect the user chooses is placed in the it variable. You can either use
the encoded If the user cancels the dialog,
the it variable is set to empty, and the result function returns
"Cancel". 72 See Also: Summary Syntax [titled windowTitle] [as sheet] answer file (field "Prompt")
of type "RSTK" --shows stacks answer file empty with filter
"JPEGs,*. jpg" --shows JPEGs Comments Parameters: The defaultPath is the name and
location of the folder whose contents are listed when the dialog box appears.
If no The windowTitle, if specified,
appears in the title bar of the dialog box. If no windowTitle is given, the
title bar is blank. (This Use the types parameter to
specify which files should appear and be available for selection. The absolute file path of the
file the user chose is placed in the it variable. If the user cancels the dialog,
the it variable is Important! The answer file
command does not open the file. It only displays the dialog box and retrieves
the path to the If the as sheet form is used, the
dialog box appears as a sheet on OS X systems. On other systems, the as sheet
form has If the systemFileSelector
property is set to false, Revolution's built-in dialog box is used instead of
the operating system's The way file types are specified
depends on the platform: 73 If the types string is shorter
than four characters (on a Mac OS system), the files are not filtered: all
files appear in the Filtering for OS X: Works the
same as filtering for Mac OS, except that if one of the file types is
"APPL", the dialog box Filtering for Unix: You must use
the with filter form if you want to specify one or more types: the of type form
can't be Filtering for Windows: You must
use the with filter form to specify one or more types: the of type form can't
be used on [description], *. extension [; *.
extension...] answer file myPrompt with filter
"Revolution files,*. rev" answer file myPrompt with filter
"Web Graphics,*. jpg;*. gif;*. png" answer file myPrompt with filter
"Text files,*. txt, MS Word files,*. doc" Changes to Transcript: The answer file... as sheet form
was introduced in version 2. 0. 74 Objects Platforms See Also: Summary Syntax Example Code answer folder "Where is the
data?" with "../ data_ stacks/ recent" Parameters: The defaultPath is the name and
location of the folder whose contents are listed when the dialog box appears.
If no Comments: If the as sheet form is used, the
dialog box appears as a sheet on OS X systems. On other systems, the as sheet
form has If the systemFileSelector
property is set to false, Revolution's built-in dialog box is used instead of
the operating system's Changes to Transcript: See Also: Summary Syntax Example Code Comments Comments: The exact options are determined
by the printer driver and the operating system. See Also: Summary Syntax Example Code Comments Comments: The answer record command sets
the recordCompression, recordRate, recordSampleSize, and recordChannels
properties in If the user cancels the dialog,
the result function returns "Cancel", and the recording-related
properties are unchanged. See Also: Summary Syntax Example Code select any button Comments: Platforms See Also: Summary Syntax Example Code request appleEvent data --get the
content of the AppleEvent do URL (" file:" & it) Parameters: The class parameter is the event
class: possible classes include aevt (for required Apple Events such as
"open document" The ID parameter is the name of
the specific Apple event. For more information about Apple
events, see Apple Computer's technical documentation, Inside Macintosh: Interapplication
Platforms See Also: Summary Syntax Example Code Comments Value: By default, the arcAngle property
of a newly created graphic is 360. The arcAngle determines how much
of the oval is used to form the arc, from zero (no arc) to 360 (a full oval).
For example, The global setting of the
arcAngle property controls the appearance of arcs drawn with the paint tools.
Once a paint arc is Platforms See Also: Summary Syntax Example Code if the armBorder of button ID 3 then
add 1 to theCounter Comments: If the button's threeD or border
property is true, the armBorder property has no effect and the border does not
appear. 81 Objects Platforms See Also: Summary Syntax Example Code Comments Comments: The appearance of an armed button
is determined by its armBorder and armFill properties. Platforms See Also: Summary Syntax Example Code Comments Value: By default, the armedIcon
property of newly created buttons is set to zero. Platforms See Also: Summary Syntax Example Code Comments Value: By default, the armFill property
of newly created buttons is set to false. If the button's style property is
not set to "menu", you can set the button's armFill property, but it
has no effect. See Also: Summary Syntax Example Code Comments Comments: set the cursor to arrow However, the first is easier to
read and understand in Transcript code. Platforms See Also: Summary Syntax Example Code else pass arrowKey end arrowKey Comments Parameters: Comments: If the focused control is part of
a group, and the group's tabGroupBehavior property is set to true, no arrowKey
message is Note: Sending an arrowKey message
does nothing unless there is an arrowKey handler in the message path. This is a
Platforms See Also: Summary Syntax Example Code Comments Value: By default, the arrowSize
property of newly created graphics is set to 3. Set the startArrow or endArrow
properties to true to make the arrows visible. See Also: Summary Syntax Example Code go stack "Controls" as
palette save this stack as "../ Backups/ Current. rev" Comments Comments: See Also: Summary Syntax Example Code Comments Comments: See Also: Summary Syntax Example Code asin( pi/ 4 -sin( myAngle)) Parameters: Value: Comments: The result of the asin function
is returned in radians. To get this result in degrees, use the following custom
function: See Also: Summary Syntax [as sheet] ask field "Prompt" with
firstGuess titled "Guess!" ask myPrompt as sheet Comments Parameters: The question is a string (or any
expression that evaluates to a string). The windowTitle appears in the
title bar of the dialog box. If no windowTitle is given, the title bar is
blank. If the ask... as sheet form is
used, the dialog box appears as a sheet on OS X systems. On other systems, the
as sheet form Changes to Transcript: The ask... as sheet form was
introduced in version 2. 0. See Also: Summary Syntax Example Code ask file empty with
"Untitled" --no prompt ask file "Export picture as:" with
filter "JPEG file,*. jpg" Comments Parameters: The defaultFilePath consists of a
folder path, or a suggested file name, or both. The filename is the portion of
the path after The types parameter specifies
which extensions are available at the bottom of the dialog box. A file type
consists of an [description],*. extension Comments: The absolute file path of the
file the user chose is placed in the it variable. If the user cancels the
dialog, the it variable is Important! The ask file command
does not create the file. It only displays the dialog box and retrieves the
path to the file If the as sheet form is used, the
dialog box appears as a sheet on OS X systems. On other systems, the as sheet
form has Cross-platform note: On Mac OS
systems where Navigation Services is in use, if you don't specify a default
file name, the Changes to Transcript: See Also: Summary Syntax [titled windowTitle] [as sheet] ask password empty with savedPassword
as sheet Parameters: The defaultResponse is placed in
the text box when the dialog box appears. If no defaultResponse is specified,
the text box The windowTitle, if specified,
appears in the title bar of the dialog box. If no windowTitle is given, the
title bar is blank. If the ask password clear form is
used, the text box is not encrypted, and the it variable contains whatever the
user If the ask password... as sheet
form is used, the dialog box appears as a sheet on OS X systems. On other
systems, the as Changes to Transcript: See Also: Summary Syntax Example Code read from file myFile at numOfChars
until end Comments: See Also: Summary Syntax Example Code the atan of vectorMagnitude Parameters: Value: Comments: The result of the atan function
is returned in radians. To get this result in degrees, use the following custom
function: See Also: Summary Syntax Example Code Comments Parameters: The xCoordinate is a number or an
expression that evaluates to a number. Comments: The result of the atan2 function
is returned in radians. To get this result in degrees, use the following custom
function: Objects Platforms See Also: Summary Syntax Example Code Comments Comments: Audio clips can be in WAV, AIFF,
or AU format The audio clip object has a
number of properties and messages associated with it. To see a list of messages
that can be sent Platforms See Also: Summary Syntax Example Code Comments Value: By default, the autoArm of newly
created buttons is false. Menu items and cascading menu items created with the
"New Comments: If a button's autoArm property is
true, it receives keyDown and keyUp messages for keypresses that occur while
the mouse Objects Platforms See Also: Summary Syntax Example Code Comments Value: Comments: The button remains highlighted
while the mouse is within it and the mouse button is down. If the user moves
the mouse While the button is highlighted,
its hilite property is also set to true. If a field's autoHilite property
is true, the user can move the text selection by clicking in the field, and
text selected with the If a field whose listBehavior
property is true also has its autoHilite property set to false, list behavior
does not work for the Platforms See Also: Summary Syntax Example Code if the autoTab of the target then go
next card Value: By default, the autoTab property
of newly created fields is set to false. If the autoTab of a field is
true, and the insertion point is already at the last visible line of the field,
then pressing Return Objects Platforms See Also: Summary Syntax Example Code put average( replaceText( field
"Values", return, comma)) into avgValue Parameters: Value: Comments: The average function can also be
written like this: See Also: Summary Syntax Example Code Comments Comments: When used with the insert script
or remove script command, the back keyword designates a backScript which is to
be Platforms See Also: Summary Syntax Example Code set the backdrop to none --removes the
backdrop Value: The colorName is any standard
color name. A patternNumber is a built-in
pattern number between 1 and 164. (These patterns correspond to Revolution's
built-in An imageID is the ID of an image
to use for a pattern. Revolution looks for the specified image first in the
current stack, By default, the backdrop is
"none". Setting the backdrop property to
"none" eliminates the backdrop and lets other windows be seen. Cross-platform note: On Mac OS
systems, if you use the launch or open process commands to start up another If the system has multiple
screens connected, the backdrop property affects only the main screen. Changes to Transcript: Objects Platforms See Also: Summary Syntax Example Code Comments Value: By default, the
backgroundBehavior property of newly created groups is set to false. Comments: When a message is sent to a card,
it is sent next to any groups on the card whose backgroundBehavior property is
set to When you create a new card, any
groups on the current card whose backgroundBehavior is true are automatically
placed on Note: Only groups whose
backgroundBehavior is true appear in the list reported by the backgroundNames
and Objects Platforms See Also: Summary Syntax Example Code set the backgroundColor of word
thisWord of field "Help!" to "# 808080" get the effective
backgroundColor of this card Comments Value: The colorName is any standard
color name. By default, the backgroundColor
for all objects is empty. If an object's backgroundPattern
is set, the pattern is shown instead of the color specified by backgroundColor.
Cross-platform note: On Mac OS,
OS X, and Windows systems, if the backgroundColor of all objects in the object ï The backgroundColor of a group
determines the backgroundColor of each object in the group that does not have
its own Cross-platform note: If the
lookAndFeel is set to "Appearance Manager", standard and rectangle
buttons are drawn by the ï The backgroundColor of a field
fills the area inside the field's outline. If you set the backgroundColor of a
chunk of a field, If a field's backgroundColor is
empty and the lookAndFeel property is set to "Macintosh",
"Appearance Manager", or ï The backgroundColor of a
scrollbar fills the arrow boxes at the ends of the scrollbar. ï The backgroundColor of an EPS
object fills the object's rectangle. The ability to use the system
background color was introduced in version 1. 1. In previous versions, if the
backgroundColor Platforms
To change a control's properties 3143
To change message box mode .. 3144
To clear the message box......... 3145
To close the Error window ........ 3146
To close the script editor .......... 3147
To apply changes and close the script editor ............................ 3148
To apply changes and close the script editor ............................ 3149
To complete words in scripts..... 3150
To display a contextual menu (Pointer tool) .......................... 3151
To display a contextual menu.... 3152
To display a control's property inspector ................................ 3153
To duplicate a control .............. 3154
To edit a control's script ........... 3155
To edit the card script .............. 3156
To edit the selected control's
script.............................................3157
To edit the stack script............. 3158
To equalize height and width of a control ...................................3159
To equalize heights of selected controls.................................. 3160
To equalize widths of selected controls.................................. 3161
To find the selection in scripts... 3162
To format the current handler ... 3163
To go to the next card ............. 3164
To go to the previous card........ 3165
To go to the top or bottom of a field.............................................
3166
To hide Revolution palettes....... 3167
To look up Transcript term ....... 3168
To magnify an image ............... 3169
To make an image transparent.. 3170
To move Revolution windows .... 3171
To navigate in a field ............... 3172
To nudge the selected control ... 3173
To open a stack without the development environment ........ 3174
To open Revolution documentation.............................................3175
To remove font changes from text.............................................3176
To reverse Select Grouped Controls.............................................3177
To review message box history .3178
To review the recent cards list .. 3179
To save all open stacks ............ 3180
To select controls without moving them .....................................3181
To select multiple controls ........ 3182
To step into the next line of a handler .................................. 3183
To step over the next line of a handler .................................. 3184
To stop a running handler......... 3185
To switch between Browse and Pointertool.............................
3186
9
VOCABULARY LISTING 3187
Revolution Specific Tokens ....... 3193
10
10 Page 16 17
Page 16
LANGUAGE DICTIONARY
$ keyword
Platforms
Not supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
@ keyword, function control structure, getProp control structure, on
control structure, param function, paramCount
function, params function, setProp control structure, How to get the location
of the user's home directory
The character $ (dollar sign) is used to indicate an environment variable
on Unix systems and a command-line parameter on
Unix or Windows systems.
put
$LOGNAME into field "Login Name" if $0 is not myAppName then answer
"Problem initializing!"
Use the $ keyword to interact with the system environment and to find out
what arguments were used if the application was started up from the command
line.
The $ character marks two kinds of special variables: command-line
arguments (on OS X, Unix, and Windows systems) and environment variables (on OS
X and Unix systems).
then the global variable $0 contains "myrevapp" (the name of
the application), $1 contains "-h", and $2 contains "name".
If an argument includes spaces, it must be enclosed in quotes on the command
line:
Gotcha: On Windows XP systems, individual arguments passed on the
command line are placed in separate variables ($ 1, $2, and so on) only if they
are quoted on the command line. Otherwise, all arguments are placed in the $1
variable.
16 Page 17 18
Page 17
& operator
Synonyms
Objects
string
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
&& operator, , operator, combine command, Operator Precedence
Reference, Recipe for adding a prefix to each line of a
string, Recipe for an Elizabethan insult generator, Recipe for building a
repeated string
Concatenates two strings.
string1 & string2
put
"foo" & "bar" --evaluates to "foobar" put
myVar & return & return into otherVar
Comments
Use the & operator to create a single string out of two or more parts.
The operands string1 and string2 are literal strings of characters
(delimited with double quotes), or expressions that
evaluate to strings.
The result of the & operator is a string consisting of string1 followed
by string2. 17
17 Page 18 19
Page 18
&& operator
Synonyms
Objects
string
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
& operator, , operator, Operator Precedence Reference, Recipe for an
Elizabethan insult generator, Recipe for finding lines
that are not common to two containers
Concatenates two strings and inserts a space between them.
string1 && string2
put
"my" && "house" --evaluates to "my house"
put field "First" && field "Last" into field
"Name"
Comments
Use the && operator to combine two strings with a space between
themófor example, to combine two words or phrases.
The operands string1 and string2 are literal strings of characters
(delimited with double quotes), or expressions that
evaluate to strings.
The result of the && operator is a string consisting of string1, a
space, and string2.
"this"
&& "that" does the same thing as
18 Page 19 20
Page 19
() operator
Synonyms
Objects
logical, numeric, string
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
* operator, + operator, -operator, [] keyword, / operator, value function,
Operator Precedence Reference
Groups operands together.
(expression)
get
(quantity * priceEach) + shippingCost (" a" is within field 1) or
(" b" is within field 2)
Comments
Use parentheses ( ) to group operands together in order to control the
order operations are performed in, or to make the
structure of a complex expression clearer.
The expression is any Transcript expression.
When Revolution evaluates an expression, operations enclosed within
parentheses are performed first. If parentheses are
nested, the expression within the innermost set of parentheses is evaluated
first.
by four". To obtain the sine of 1/ 4, use parentheses to force the
division to be done first, as in this expression: the sin of
(1/ 4).
more readable. For example,
compile error. 19
19 Page 20 21
Page 20
* operator
Synonyms
Objects
numeric
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
/ operator, ^ operator, multiply command, Operator Precedence Reference
Multiplies two numbers.
number1 * number2
get
3 * 5 --evaluates to 15 put thisNumber * it into field "Result"
Comments
Use the * (times) operator to multiply two numbers.
The operands number2 and number2 are numbers or expressions that evaluate
to numbers, or arrays containing numbers.
To multiply the contents of a container by a number, use the multiply
command instead.
number, each element is multiplied by the number. If an array is multiplied by
an array, both arrays must have the same
number of elements and the same dimension, and each element in one array is
multiplied by the corresponding element of
the other array.
Changes to Transcript:
The option to multiply arrays was introduced in version 1. 1. In previous
versions, only single numbers could be used with
the * operator. 20
20 Page 21 22
Page 21
+ operator
Synonyms
Objects
numeric
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
-operator, add command, Operator Precedence Reference
Adds two numbers.
number1 + number2
put
2 + 2 into fourContainer set the layer of field myNumber to (myNumber + 2)
Use the + (plus) operator to add two numbers, or to add two arrays
containing numbers.
The operands number1 and number2 are literal numbers, or expressions that
evaluate to numbers, or arrays containing
numbers.
To add a number to the contents of a container, use the add command
instead.
the number is added to each element. If an array is added to an array, both
arrays must have the same number of
elements and the same dimension, and each element in one array is added to the
corresponding element of the other array.
Changes to Transcript:
The option to add arrays was introduced in version 1. 1. In previous versions,
only single numbers could be used with the +
operator. 21
21 Page 22 23
Page 22
, operator
Synonyms
Objects
string
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
& operator, && operator, Operator Precedence Reference
Concatenates (joins) two strings and inserts a comma between them.
string1 , string2
put
"first"," second" --evaluates to "first, second"
get lastName, firstName && middleName
Use the , operator to combine two strings with a comma between them.
The operands string1 and string2 are literal strings of characters
(delimited with double quotes), or expressions that
evaluate to strings.
The result of the , operator is a string consisting of string1, a comma,
and string2.
"this"
, "that" does the same thing as
22 Page 23 24
Page 23
-operator
Synonyms
Objects
numeric
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
+ operator, --keyword, subtract command, Operator Precedence Reference
Subtracts one number from another, or designates a number as negative.
firstNumber -secondNumber
numberArray -{number | array}
-negativeNumber
put
-24 into myContainer put theRight -theLeft into theWidth
Comments
The -(minus) operator serves two purposes. When it has a single operand
(unary minus), it negates that number. When it
has two operands (binary minus), it subtracts the second number from the first
number.
The operands firstNumber and secondNumber are numbers, or expressions that
evaluate to numbers, or arrays containing
numbers.
To subtract a number from the contents of a container, use the subtract
command.
--someNumber
causes an error, and the expression
--someNumber
is interpreted as a comment because it starts with the comment keyword --.
an array, the number is subtracted from each element. If an array is subtracted
from an array, both arrays must have the
same number of elements and the same dimension, and each element in one array
is subtracted from the corresponding
element of the other array.
The unary minus cannot be used with an array.
Changes to Transcript:
The option to subtract arrays was introduced in version 1. 1. In previous
versions, only single numbers could be used with
the -operator. 23
23 Page 24 25
Page 24
--keyword
Synonyms
#
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
-operator, /**/ keyword, How to include comments and notes in a script, How
to temporarily remove a portion of a script,
Script menu > Comment (Script Editor), Script menu > Uncomment (Script
Editor), View menu > Default Comment
Character... (Script Editor)
Indicates the start of a comment.
put
2 into myVar --myVar holds the index --everything on this line is a comment
Anything between --and the end of the current script line is treated as a
comment and is ignored by Revolution when
executing the handler.
Comments are useful for documenting and explaining your code, either for
others who might need to read and modify it, or
for yourself. (The code may be clear in your mind now, but in six months,
you'll be glad you included comments.)
may be useful to divide the handlers into sections. Each section starts with a
comment containing the section name and any
other useful information. This practice helps you keep long scripts organized.
Similarly, a lengthy handler can be made more
readable by explanatory comments.
temporarily remove sections of code for debugging by putting those sections
inside a comment. 24
24 Page 25 26
Page 25
/ operator
Synonyms
Objects
numeric
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
* operator, div operator, divide command, mod operator, Operator Precedence
Reference
Divides one number by another number.
number/ divisor
put
22/ 7 into approxPi --approximates pi get thisVariable/( thisVariable + 1)
Use the / (divide) operator to divide one number by another.
The operands number and divisor are numbers, or expressions that evaluate
to numbers, or arrays containing numbers.
To divide the contents of a container by a number, use the divide command
instead.
divided by the number. If an array is divided by an array, both arrays must
have the same number of elements and the
same dimension, and each element in one array is divided by the corresponding
element of the other array.
Attempting to divide by zero causes an execution error.
Changes to Transcript:
The option to divide arrays was introduced in version 1. 1. In previous
versions, only single numbers could be used with the
/ operator. 25
25 Page 26 27
Page 26
/**/ keyword
Synonyms
Objects
Platforms
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
--keyword, How to include comments and notes in a script, How to
temporarily remove a portion of a script
Delimits a block comment.
answer
whichPrompt /* use the prompt that was set earlier */ /* This entire block,
although it is two lines
Comments
Anything between /* and */ is treated as a comment and is ignored by
Revolution when executing the handler.
Comments are useful for documenting and explaining your code, either for
others who might need to read and modify it, or
for yourself. (The code may be clear in your mind now, but in six months,
you'll be glad you included comments.)
multiple lines, as well as a single line or part of a line. (A comment marked
by --extends only to the end of the line.) A
comment that starts with /* does not end until */, even if there are several
lines in between.
may be useful to divide the handlers into sections. Each section starts with a
comment containing the section name and any
other useful information. This practice helps you keep long scripts organized.
Similarly, a lengthy handler can be made more
readable by explanatory comments.
temporarily remove sections of code for debugging by putting those sections
inside a comment. 26
26 Page 27 28
Page 27
; keyword
Synonyms
Objects
Platforms
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
keyword, scriptLimits function
The character ; is used to place two statements on a single line.
go
next card; wait 1 second; go previous card repeat with x = 1 to 10; doSomething
x; end repeat
Use the ; character to compress code into fewer visible lines for easier
reading.
Lines that are split with ; are shown in the script editor as a single
line, but when executed, are treated as multiple lines of
code. The following line counts as three statements:
A ; character which is used within a literal string does not signal a new line,
because the ; is treated as part of the string
instead of being treated as a line break. 27
27 Page 28 29
Page 28
< operator
Synonyms
Objects
logical
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
<= operator, > operator, caseSensitive property, max function, min
function, Operator Precedence Reference
Compares two values and returns true if the first value is less than the
second value, false otherwise.
value1 < value2
3
< 4 --evaluates to true 7 < (2 + 1) --evaluates to false
Comments
Use the < (less than) operator to compare two numbers or to compare the
alphabetical order of two strings.
The operands value1 and value2 can be numbers, literal strings of characters
(delimited with double quotes), or any sources
of value.
When comparing strings, the < operator compares the two values character
by character, using the ASCII value of each
character. For example, "a" comes before "b" in the ASCII
character set, so "a" < "b" and "ab" <
"bb".
other, the missing characters are considered to have lower value than any
character. For example, "ab" < "abc".
If the caseSensitive property is true, the comparison between two strings
treats uppercase letters as coming before
lowercase letters, so "A" < "a". If the caseSensitive
property is false, the comparison is not case-sensitive, so "a" is
considered equivalent to "A". 28
28 Page 29 30
Page 29
<= operator
Synonyms
£
logical
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
< operator, >= operator, caseSensitive property, max function, min
function, Operator Precedence Reference, Why does a
handler stop working when moved to another platform?
Compares two values and returns true if the first value is less than or
equal to the second value, false otherwise.
value1 <= value2
22
<= 21 --evaluates to false 3 <= -3 --evaluates to false
Comments
Use the <= (less than or equal to) operator to compare two numbers or to
compare the alphabetical order of two strings.
The operands value1 and value2 can be numbers, literal strings of
characters (delimited with double quotes), or any sources
of value.
When comparing strings, the <= operator compares the two values
character by character, using the ASCII value of each
character. For example, "a" comes before "b" in the ASCII
character set, so the following are all true:
"a" <= "b"
"ab" <= "bb"
other, the missing characters are considered to have lower value than any
character. For example, "abc" <= "ab" is false.
lowercase letters. If the caseSensitive property is false, the comparison is
not case-sensitive, so "a" is considered equivalent
to "A".
£ character on a Windows or Unix system, a script error may result. To ensure
cross-platform compatibility, use the
synonym <= instead. 29
29 Page 30 31
Page 30
<> operator
Synonyms
_, is not
logical
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
< operator, = operator, > operator, caseSensitive property, contains
operator, Operator Precedence Reference, Why does a
handler stop working when moved to another platform?
Compares two values and returns true if they are not equal, false if they
are equal.
value1 <> value2
3
+ 2 <> 6 --evaluates to true "abc" <> "abd"
--evaluates to true
Comments
Use the <> (inequality) operator to compare two numbers or to compare
two strings.
The operands value1 and value2 can be numbers, literal strings of
characters (delimited with double quotes), or any sources
of value.
When comparing strings, the <> operator compares the two values
character by character, using the ASCII value of each
character. If the caseSensitive property is true, the comparison between two
strings treats uppercase letters as coming
before lowercase letters, so "A" <> "a". If the
caseSensitive property is false, the comparison is not case-sensitive, so
"a" is
considered equivalent to "A".
_ character on a Windows or Unix system, a script error may result. To ensure
cross-platform compatibility, use one of the
synonyms <> or is not instead. 30
30 Page 31 32
Page 31
= operator
Synonyms
is
logical
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
<> operator, caseSensitive property, contains operator, Operator
Precedence Reference
Compares two values and evaluates to true if they are equal, false if they
are not equal.
value1 = value2
1
= 0 --evaluates to false 17 + 9 = 26 --evaluates to true
Comments
Use the = (equality) operator to find out whether two numeric expressions
yield the same number or whether two strings
are equivalent.
The operands value1 and value2 can be numbers, literal strings of
characters (delimited with double quotes), or any sources
of value.
When comparing strings, the = operator compares the two values character by
character. If the caseSensitive property is
true, the comparison between two strings treats uppercase letters as coming
before lowercase letters. If the caseSensitive
property is false, the comparison is not case-sensitive, so "a" =
"A". 31
31 Page 32 33
Page 32
> operator
Synonyms
Objects
logical
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
< operator, >= operator, caseSensitive property, max function, min function,
Operator Precedence Reference
Compares two values and returns true if the first value is greater than the
second value, false otherwise.
value1 > value2
1
> 0 --evaluates to true 2 > -15 --evaluates to true
Comments
Use the > (greater than) operator to compare two numbers or to compare
the alphabetical order of two strings.
The operands value1 and value2 can be numbers, literal strings of
characters (delimited with double quotes), or any sources
of value.
When comparing strings, the > operator compares the two values character
by character, using the ASCII value of each
character. For example, "a" comes before "z" in the ASCII
character set, so "z" > "a" and "az" >
"ab".
other, the missing characters are considered to have lower value than any
character. For example, "DEF" > "DE".
If the caseSensitive property is true, the comparison between two strings
treats uppercase letters as coming before
lowercase letters, so "a" > "A". If the caseSensitive
property is false, the comparison is not case-sensitive, so "a" is
considered equivalent to "A". 32
32 Page 33 34
Page 33
>= operator
Synonyms
_
logical
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
<= operator, > operator, max function, min function, Operator
Precedence Reference, Why does a handler stop working
when moved to another platform?
Compares two values and returns true if the first value is greater than or
equal to the second value, false otherwise.
value1 >= value2
22
>= 23 --evaluates to false myValue >= 0 --evaluates to whether myValue is
non-negative
Use the >= (greater than or equal to) operator to compare two numbers or
to compare the alphabetical order of two
strings.
The operands value1 and value2 can be numbers, literal strings of
characters (delimited with double quotes), or any sources
of value.
When comparing strings, the >= operator compares the two values
character by character, using the ASCII value of each
character. For example, "z" comes after "a" in the ASCII
character set, so the following are all true:
"z" >= "a"
"zz" >= "za"
other, the missing characters are considered to have lower value than any character.
For example, "abc" >= "ab".
lowercase letters. If the caseSensitive property is false, the comparison is
not case-sensitive, so "a" is considered equivalent
to "A".
_ character on a Windows or Unix system, a script error may result. To ensure
cross-platform compatibility, use the
synonym >= instead. 33
33 Page 34 35
Page 34
@ keyword
Synonyms
Objects
Platforms
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
$ keyword, function control structure, getProp control structure, on
control structure, param function, paramCount function,
params function, setProp control structure
The character @ (at sign) is used with a parameter declaration, to indicate
that a reference to the parameter is passed
instead of its value.
on
myHandler thisParameter,@ thatParameter
Pass a parameter by reference when you want a handler to change a variable in
the calling handler, or when you want a
handler to return more than one value.
Parameters to a handler are declared on the first line of the handler. If
the name of a parameter is preceded with the @
character, that parameter's value is interpreted as a variable name, rather
than the value in the variable. Changing the
parameter variable in the called handler changes the value of the variable in
the calling handler.
on setVariable @incomingVar --notice the @ before the parameter name
add 1 to incomingVar
end setVariable
on mouseUp
put 8 into someVariable
setVariable someVariable
answer "someVariable is now:" && someVariable
end mouseUp
"someVariable" by reference. This means that when the
"setVariable" handler makes changes to the parameter, it changes
the actual variable, and those changes affect all further references in the
mouseUp handler to the variable. Executing this
mouseUp handler displays a dialog box that says "someVariable is now:
9". 34
34 Page 35 36
Page 35
[] keyword
Synonyms
Objects
Platforms
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
() operator, combine command, intersect command, keys function, split
command, union command, About containers,
variables, and sources of value, How to access a value in an array variable,
How to change an element in an array variable,
How to create an array variable, How to find out the number of elements in an
array, How to find out whether a container is
an array
The square bracket characters [ ] surround the element name in an array
reference.
put
thisValue into myArray[" someKey"] if myArray["
someOtherKey"] is "A" then beep
Use square brackets [ ] to specify which element in an array you are
referring to.
You access an element of an array by using the name of the array, along
with the key in square brackets:
put "B" into myList[" secondLetter"]
put "C" into myList[" thirdLetter"]
get myList[" secondLetter"] --yields "B"
the bracket is interpreted as part of the variable name, rather than as the
marker for the key of an array reference. 35
35 Page 36 37
Page 36
keyword
Synonyms
ÿ
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
& operator, && operator, ; keyword, Why does a handler stop
working when moved to another platform?
The character is used to break a line in a script for display, while still
having it treated as a single statement.
answer
"You've been waiting for" && numberOfMinutes
Comments
If a line is too long to fit conveniently in the script window, use the
character to break it into two (or more) lines for
viewing.
A line that is split with is shown in the script editor as more than one
line, but when it's executed, it is treated as a single
line of code.
A character which is used within a literal string does not break the line,
because the is treated as part of the quoted string
instead of being treated as a line continuation. For example, the following
statement causes a compile error because the
character is inside the quotes:
Had this been an actual life..." with "OK" --BAD EXAMPLE
The above bad example can be corrected by using the && operator to
break up the long string:
answer "This is a test. This is only a test."
&& "Had this been an actual life..." with "OK"
--good example
The string has been broken into two substrings, so the character is no longer
within a literal string. This second example
does not cause an error.
containing the ÿ character on a Windows or Unix system, a script error may
result. To ensure cross-platform compatibility,
use the synonym instead. 36
36 Page 37 38
Page 37
^ operator
Synonyms
Objects
numeric
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
* operator, exp function, exp1 function, exp10 function, exp2 function,
log10 function, multiply command, sqrt function,
Operator Precedence Reference
Raises a number to a power.
number^ exponent
7^
3 --7 to the 3rd power, or 343 myNumber^( 1/ 2) --the square root of myNumber
Comments
Use the ^ operator to raise a number to a power, or to find a root of a
number.
The number and exponent are numbers, or expressions that evaluate to
numbers.
If the exponent is a fraction, with 1 as the numerator, the ^ operator
finds the specified root of the number. For example, if
the exponent is 1/ 2, the operation yields the square root of number; if the
exponent is 1/ 4, the operation yields the 4th
root of the number, and so on.
37 Page 38 39
Page 38
abbreviated keyword
Synonyms
abbr, abbrev
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
convert command, date function, english keyword, ID property, long keyword,
name property, short keyword, system
keyword, time function
Specifies a format for the date and time functions, the convert command,
and the name, ID, and owner properties.
the
abbreviated date put (the abbreviated name of this card) & return after
cardsList
Use the abbreviated keyword to obtain a date, time, name, or ID with a
moderate amount of detail.
In general, an abbreviated form is longer than the short form, but shorter
than the long form.
Thu, Jan 27, 2000
If the useSystemDate is true, the abbreviated date is formatted according to
the system settings.
11: 22 AM
If the useSystemDate is true, the abbreviated time is formatted according to
the system settings.
name looks like this: card "This Card"
Note: The abbreviated keyword is implemented internally as a property, and
appears in the propertyNames. However, it
cannot be used as a property in an expression, nor with the set command.
The form the abbreviated owner was introduced in version 2. 0. In previous
versions, the form of the owner property could
not be specified and reported only the abbreviated owner. 38
38 Page 39 40
Page 39
abs function
Synonyms
Objects
Platforms
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
round function, trunc function, Recipe for an approximate-equality function
Returns the absolute value of a number.
the abs of number
abs( number)
abs(
14) --returns 14 the abs of -14 --returns 14
Use the abs function to determine the difference between two numbers when
you don't know ahead of time which is
greater.
The number is a positive or negative number, or any expression that
evaluates to a number.
The abs function returns a positive number.
The absolute value of a number is that number's distance from zero. If the
number is positive, its absolute value is just the
number; if the number is negative, its absolute value is the negative of the
number. Because of this, the absolute value of a
number is always positive. 39
39 Page 40 41
Page 40
acceleratorKey property
Synonyms
accelKey
button
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
acceleratorModifiers property, acceleratorText property, commandKeyDown
message, mouseUp message
Specifies a shortcut key combination for a button's mouseUp handler.
set the accel[ erator] Key of button to {empty | letterChar}
set
the acceleratorKey of button 1 to "a" set the acceleratorKey of
button "Switch Order" to "F8"
Comments
Use the acceleratorKey property to give users a shortcut key combination
for often-used buttons, or to provide a keyboard
shortcut to a button that's used as a menu item in a stack menu.
The acceleratorKey of a button is a single lowercase letter from a to z, or a key
name. Setting the acceleratorKey to empty
removes the shortcut.
Comments:
Press the key combination defined in a button's acceleratorKey property to
send a mouseUp message to the button, instead
of clicking.
Gotcha: The acceleratorKey property is case-sensitive. You must specify a
lowercase letter as the letterChar; the
uppercase letter is not equivalent.
On Unix systems, the key names are listed in the file "/ usr/ include/
X11/ keysymdef. h". Don't include the "XK_" prefix in
these key names; for example, use "F8" for the key designated as
"XK_ F8" in the file. 40
40 Page 41 42
Page 41
acceleratorModifiers property
Synonyms
accelMods
button
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
Note: this command works differently across platforms.
acceleratorKey property, acceleratorText property, mnemonic property,
mouseUp message
Specifies one or more modifier keys that must be pressed with the button
shortcut key specified by the acceleratorKey
property.
set the acceleratorModifiers of button to {empty | keys}
set
the acceleratorModifiers of button 1 to shift set the accelMods of button
"Speak" to control, alt
Comments
Use the acceleratorModifiers property, along with the acceleratorKey
property, to specify a shortcut key combination for a
button.
The acceleratorModifiers of a button consists of a list of one or more keys,
separated by commas.
"control". If you use "option" as a key, it is converted to
"alt".
Comments:
The following statements set up a shortcut for a button called
"Calculate":
set the acceleratorModifiers of button "Calculate" to alt, shift
mouseUp handler is executed.
property. 41
41 Page 42 43
Page 42
acceleratorText property
Synonyms
accelText
button
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
acceleratorKey property, acceleratorModifiers property, label property,
mnemonic property, rightMargin property, textAlign
property
Specifies the shortcut hint that appears at the right edge of a button.
set the acceleratorText of button to string
set
the acceleratorText of button 3 to "A" set the accelText of button
"Go" to field "Shortcut Key"
Use the acceleratorText property to provide the user with an onscreen hint
about the shortcut key combination specified by
the button's acceleratorKey property.
The acceleratorText of a button is a string, or an expression that evaluates to
a string.
Comments:
The acceleratorText string appears at the right edge of the button, inside
the button's rightMargin. Revolution does not
automatically make room for the acceleratorText string, so you might need to
enlarge the button to prevent its label from
overlapping the acceleratorText string.
a button's acceleratorText if it has a right-aligned label.
the modifier key needed.
and acceleratorModifiers are set. The acceleratorText property creates a visual
hint, but does not create the actual shortcut
key combination. 42
42 Page 43 44
Page 43
accentColor property
Synonyms
Objects
global
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Not supported on UNIX systems
colorNames function, hiliteColor property, lookAndFeel property, About
colors and color references, Color Names Reference,
Recipe for translating a color name to an RGB numeric triplet
Specifies the highlight color used for the active menu item.
set the accentColor to {colorName | RGBColor}
set
the accentColor to "blue" set the accentColor to 255,0,0 --bright red
Comments
Use the accentColor to hilite a menu item associated with a button, when
the user is in the process of choosing that menu
itemóthat is, when the menu is open and the mouse pointer is over the menu
item.
The accentColor is a color reference.
The RGBColor consists of three comma-separated integers between zero and 255,
specifying the level of each of red, green,
and blue; or an HTML-style color consisting of a hash mark (#) followed by
three hexadecimal numbers, one for each of red,
green, and blue.
This property is used only when the lookAndFeel property is set to
"Macintosh" or "Windows 95". If the lookAndFeel property
is set to "Appearance Manager" or "Motif", the accentColor
has no effect.
handler. 43
43 Page 44 45
Page 44
accept command
Synonyms
Objects
Platforms
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
close socket command, hostNameToAddress function, open socket command,
openSockets function, read from socket
command, write to socket command, How to unwedge upload and download operations
Accepts an Internet connection and creates a socket for that connection.
accept [datagram] connections on port number with message callbackMessage
accept
connections on port 80 with message "webConnect" accept datagram
connections on port it with message myMessage
Use the accept command when running a server, to accept TCP connections or
UDP datagrams from other systems (or other
processes on the same system).
Parameters:
The portNumber is the TCP port number on which to accept connections.
Comments:
When a connection is made or a datagram is received, the accept command
creates a new socket that can be used to
communicate with the other system (or process). When using the close socket,
read from socket, or write to socket
commands, you can refer to this socket with a socket identifier that looks like
this:
where the connectionID is a number assigned by the accept command. (You only
need to specify the connection number if
there is more than one socket connected to a particular port and host.)
with this message. The first parameter is the IP address of the system or
process making the connection. If a datagram is
being accepted, the second parameter is the contents of the datagram.
For technical information about UDP datagrams, see RFC 768 at <http:// www.
ietf. org/ rfc/ rfc0768.txt>.
For technical information about the numbers used to designate standard ports,
see the list of port numbers at
<http:// www. iana. org/ assignments/ port-numbers>, in particular the
section entitled "Well Known Port Numbers". 44
44 Page 45 46
Page 45
acceptDrop property
Synonyms
Objects
global
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Not supported on UNIX systems
dragDrop message, dragEnd message, dragEnter message, How to prevent
dragging and dropping to a field, How to
respond to a drag and drop
Specifies whether a drop will be accepted during a drag and drop.
set the acceptDrop to {true | false}
set
the acceptDrop to true if word 1 of the target is "button" then set
the acceptDrop to false
Set the acceptDrop property in an object's dragEnter handler to allow it to
accept drops.
The acceptDrop is true or false.
Usually, you set the acceptDrop property to true in a dragEnter handler to
indicate that the target of the dragEnter message
will accept a drop of the data being dragged.
over, and a dragEnd message is sent to the object that was dragged from. If the
acceptDrop is false, no dragDrop or
dragEnd message is sent.
drag and drop operation, you don't need to do any scripting. However, drag and
drop of other types of data or between
other object types is not automatic: setting the acceptDrop property to true
does not, by itself, implement dragging and
dropping. It only allows the dragDrop message to be sent.
message is trapped), and is automatically set to false when a dragEnter message
is received by any other object. (When the
dragEnter message reaches the engine, the engine sets the property to true if
the target is an unlocked field and to false
otherwise.) This allows unlocked fields to accept dragged text without
requiring you to do any scripting. To prevent an
unlocked field from accepting a drag, use a dragEnter handler and either set
the acceptDrop to false, or trap the dragEnter
message by not passing the message.
object other than a locked field to accept drops, set the acceptDrop to true in
a dragEnter handler. 45
45 Page 46 47
Page 46
acos function
Synonyms
Objects
Platforms
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
asin function, atan function, cos function, pi constant, sin function, tan
function
Returns the arc cosine of a number, in radians.
the acos of number
acos( number)
acos(-1) --returns pi acos( cos(.
3)) --returns .3
Comments
Use the acos function to find the arc cosine of a number.
The number is a number between -1 and 1, or an expression that evaluates to
such a number.
The acos function returns a number between zero and pi.
The arc cosine of number is an angle whose cosine is equal to number. In
other words, acos is an inverse of the cos
function.
function acosInDegrees theMagnitude
return acos( theMagnitude) * 180 / pi
end acosInDegrees 46
46 Page 47 48
Page 47
activatePalettes property
Synonyms
Objects
global
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
Note: this command works differently across platforms.
hidePalettes property, lookAndFeel property, palette command, raisePalettes
property, style property
Specifies whether palettes have the same appearance when active and
inactive.
set the activatePalettes to {true | false}
set
the activatePalettes to false if the activatePalettes then hideAllPalettes
On Mac OS systems, inactive palettes have the same appearance as the
frontmost palette. Use the activatePalettes property
to control this behavior.
The activatePalettes property is true or false.
Comments:
If the activatePalettes is true, all palettes look the same. If it is
false, the active palette window looks different from the
other palette windows. 47
47 Page 48 49
Page 48
add command
Synonyms
Objects
Platforms
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
+ operator, divide command, multiply command, numberFormat property,
subtract command
Adds a number to a container and places the resulting value in the
container.
add number to [chunk of] container
add {number | array} to arrayContainer
add
7 to field "Previous Amount" add field "New" to
summaryOfInventory
Comments
Use the add command to add a number to a container or a portion of a
container, or to add two arrays containing numbers.
The number is an expression that evaluates to a number.
The container is a field, button, or variable, or the message box.
The arrayContainer is an array variable each of whose elements is a number.
Comments:
The contents of the container (or the chunk of the container) must be a
number or an expression that evaluates to a
number.
both arrays must have the same number of elements and the same dimension, and
each element in the array is added to
the corresponding element of the arrayContainer.
If container is a field or button, the format of the sum is determined by the
numberFormat property.
Changes to Transcript:
The add to arrayContainer form was introduced in version 1. 1. In previous
versions, only single numbers could be used with
the add command. 48
48 Page 49 50
Page 49
addMax keyword
Synonyms
Objects
Platforms
Supported on Mac OS systems
Supported on Mac OS X systems
Not supported on Windows systems
Not supported on UNIX systems
addOver keyword, addPin keyword, adMin keyword, blend keyword, clear
keyword, ink property, noOp keyword, notSrcAnd
keyword, notSrcAndReverse keyword, notSrcBic keyword, notSrcCopy keyword,
notSrcOr keyword, notSrcOrReverse
keyword, notSrcXOr keyword, reverse keyword, set keyword, srcAnd keyword,
srcAndReverse keyword, srcBic keyword,
srcCopy keyword, srcOr keyword, srcOrReverse keyword, srcXOr keyword, subOver
keyword, subPin keyword, transparent
keyword
Specifies one of the transfer modes that can be used with the ink property.
set
the ink of button "Click Here" to addMax
Use the addMax keyword to "wash out" the area under an object.
The ink property determines how an object's colors combine with the colors
of the pixels underneath the object to control
how the object's color is displayed. When the addMax mode is used, each
component of the object coloróred, green, and
blueóis compared with the corresponding component of the color underneath, and
the maximum of each is used for the
displayed color.
addMax mode is used, the object's displayed color is 60,70,150.
to this mode appear as though their ink were set to srcCopy. 49
49 Page 50 51
Page 50
addOver keyword
Synonyms
Objects
Platforms
Supported on Mac OS systems
Supported on Mac OS X systems
Not supported on Windows systems
Not supported on UNIX systems
addMax keyword, adMin keyword, blend keyword, clear keyword, ink property,
noOp keyword, notSrcAnd keyword,
notSrcAndReverse keyword, notSrcBic keyword, notSrcCopy keyword, notSrcOr
keyword, notSrcOrReverse keyword,
notSrcXOr keyword, reverse keyword, set keyword, srcAnd keyword, srcAndReverse
keyword, srcBic keyword, srcCopy
keyword, srcOr keyword, srcOrReverse keyword, srcXOr keyword, subOver keyword,
subPin keyword, transparent keyword,
Object menu > Inks
Specifies one of the transfer modes that can be used with the ink property.
set
the ink of button 2 to addOver
Use the addOver keyword to combine an object's color with the colors
underneath it.
The ink property determines how an object's colors combine with the colors
of the pixels underneath the object to control
how the object's color is displayed. When the addOver mode is used, each
component of the object coloróred, green, and
blueóis added to the corresponding component of the color underneath. If the
result is greater than 255, the component
rolls over, back to zero.
addOver mode is used, the object's displayed color is 85,4,250.
to this mode appears as though their ink were set to srcCopy. 50
50 Page 51 52
Page 51
addPin keyword
Synonyms
Objects
Platforms
Supported on Mac OS systems
Supported on Mac OS X systems
Not supported on Windows systems
Not supported on UNIX systems
addMax keyword, addOver keyword, adMin keyword, blend keyword, clear
keyword, ink property, noOp keyword, notSrcAnd
keyword, notSrcAndReverse keyword, notSrcBic keyword, notSrcCopy keyword,
notSrcOr keyword, notSrcOrReverse
keyword, notSrcXOr keyword, reverse keyword, set keyword, srcAnd keyword,
srcAndReverse keyword, srcBic keyword,
srcCopy keyword, srcOr keyword, srcOrReverse keyword, srcXOr keyword, subOver
keyword, subPin keyword, transparent
keyword
Specifies one of the transfer modes that can be used with the ink property.
set
the ink of button "Bar" to addPin
Use the addPin keyword to combine an object's color with the colors
underneath it.
The ink property determines how an object's colors combine with the colors
of the pixels underneath the object to
determine how the object's color is displayed. When the addPin mode is used,
each component of the object coloróred,
green, and blueóis added to the corresponding component of the color
underneath. If the resulting number is greater than
127 (the maximum), 127 is used for that component.
mode is used, the object's displayed color is 127,40,120.
to this mode appears as though their ink were set to srcCopy. 51
51 Page 52 53
Page 52
address property
Synonyms
Objects
global
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
hostName function, platform function, request appleEvent command, send to
program command
Reports the name of the system the application is running on.
get the address
put
the address into myAddress put last item of the address into theAppName
Use the address property to find out the path to the application, or the
name of the system.
The address reports the computer's name, a colon, and the path to the
application.
Comments:
For example, if Revolution is running on a Mac OS system named
"Heliand", and the Revolution folder is located on a
volume called "Fnord", its address property is Heliand:/ Fnord/
Revolution/ Revolution.
control panel.
Support for AppleTalk zone addresses on Mac OS systems was removed in version
1.1. In previous versions, the address
property reported the application's AppleTalk address, including its zone. 52
52 Page 53 54
Page 53
adMin keyword
Synonyms
Objects
Platforms
Supported on Mac OS systems
Supported on Mac OS X systems
Not supported on Windows systems
Not supported on UNIX systems
addMax keyword, addOver keyword, addPin keyword, blend keyword, clear
keyword, ink property, noOp keyword,
notSrcAnd keyword, notSrcAndReverse keyword, notSrcBic keyword, notSrcCopy
keyword, notSrcOr keyword,
notSrcOrReverse keyword, notSrcXOr keyword, reverse keyword, set keyword, srcAnd
keyword, srcAndReverse keyword,
srcBic keyword, srcCopy keyword, srcOr keyword, srcOrReverse keyword, srcXOr
keyword, subOver keyword, subPin
keyword, transparent keyword
Specifies one of the transfer modes that can be used with the ink property.
set
the ink of field ID 223 to adMin
Use the adMin keyword to darken the area under an object.
The ink property determines how an object's colors combine with the colors
of the pixels underneath the object to
determine how the object's color is displayed. When the adMin mode is used,
each component of the object coloróred,
green, and blueóis compared with the corresponding component of the color
underneath, and the minimum of each is used
for the displayed color.
mode is used, the object's displayed color is 30,40,100.
this mode appears as though their ink were set to srcCopy. 53
53 Page 54 55
Page 54
after keyword
Synonyms
Objects
Platforms
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
before keyword, into keyword, put command, select command, Recipe for
building a repeated string
Used with the put command to place a value at the end of a container or
chunk.
select
after field 1 --puts the insertion point at the end of the field put space
after item 2 of field "Formatted Address"
Use the after keyword to position the insertion point at a selected
location in a field, or to add text at a specific location in a
container.
You can specify either a container, or a chunk within a container. If you
don't specify a chunk, the after keyword specifies
the very end of the container.
container or chunk, instead of replacing it. 54
54 Page 55 56
Page 55
aliasReference function
Synonyms
Objects
Platforms
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
create alias command, defaultFolder property
Returns the name and location of the file or folder that an alias, symbolic
link, or shortcut refers to.
the aliasReference of aliasPath
aliasReference( aliasPath)
the
aliasReference of "/ Disk/ Folder/ Alias" put the aliasReference of
it into fileToOpen
Use the aliasReference function to perform an operation on a file after the
user has selected an alias, symbolic link, or
shortcut to the file.
The filePath is the location and name of the alias whose referenced file or
folder you want to get. If you specify a name but
not a location, Revolution assumes the file is in the defaultFolder.
The aliasReference function returns the name and location of a file or folder.
If the filePath does not exist, the aliasReference function returns empty
and the result is set to "can't get". 55
55 Page 56 57
Page 56
allowFieldRedraw property
Synonyms
Objects
global
Not supported on Mac OS systems
Not supported on Mac OS X systems
Not supported on Windows systems
Not supported on UNIX systems
lock screen command, unlock screen command
Has no effect and is included in Transcript for compatibility with imported
SuperCard projects.
set the allowFieldRedraw to {true | false}
In SuperCard, the allowFieldRedraw property determines whether scrolling
fields are redrawn after scrolling. In Revolution,
scrolling fields are always redrawn.
actual value is not changed. 56
56 Page 57 58
Page 57
allowInlineInput property
Synonyms
Objects
global
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Not supported on UNIX systems
lockText property, textFont property, traversalOn property, useUnicode
property
Specifies whether the user can type non-Roman text directly into a field.
set the allowInlineInput to {true | false}
set
the allowInlineInput to true set the allowInlineInput to the letUsersType of
this stack
Use the allowInlineInput property to determine the method by which the user
can enter double-byte text.
The allowInput property is true or false.
Comments:
If the allowInlineInput property is set to true, the user can type
double-byte characters (used for languages that do not use
the Roman alphabet, such as Chinese, Japanese, and Korean) directly into
fields.
palette appears where the user can enter the characters. (This palette is
displayed by the operating system's
language software, not by Revolution.) When the user presses Enter, the
characters are placed in the field. 57
57 Page 58 59
Page 58
allowInterrupts property
Synonyms
Objects
global
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
cantAbort property, errorDialog message, interrupt function,
lockErrorDialogs property, Why can't I interrupt a handler?,
Shortcut to stop a running handler
Specifies whether the user can halt a handler with a key combination.
set the allowInterrupts to {true | false}
set
the allowInterrupts to false set the allowInterrupts to the hilite of button 1
Use the allowInterrrupts property to prevent users from interrupting
handlers that must run to completion. For example,
some handlers that change data cannot be interrupted safely, because they will
leave data in an inconsistent state if
interrupted.
The allowInterrupts property is true or false.
Comments:
If the allowInterrupts property is set to true, the user can halt handlers
by typing Control-period or Control-break (on
Windows or Unix) or Command-period (on Mac OS). Setting this property to false
disables this capability and ensures that
the user cannot interrupt a handler.
true. To provide a clean exit, check this function and do any needed cleanup
tasks before exiting the handler.
open stack.
thoroughly tested. If allowInterrupts is set to true, you cannot interrupt a
runaway handler with the standard key
combination. 58
58 Page 59 60
Page 59
allowKeyInField property
Synonyms
Objects
field, global
Not supported on Mac OS systems
Not supported on Mac OS X systems
Not supported on Windows systems
Not supported on UNIX systems
enterInField message, keyDown message, returnInField message
Has no effect and is included in Transcript for compatibility with imported
SuperCard projects.
set the allowKeyInField to {true | false}
In SuperCard, the allowKeyInField property determines whether a
"keyInField" message is sent when a key is pressed while
the insertion point is in a field.
The allowKeyInField property is always true. A handler can set it to any value
without causing a script error, but the actual
value is not changed. 59
59 Page 60 61
Page 60
alphaData property
Synonyms
Objects
image
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
blendLevel property, imageData property, import command, maskData property
Specifies the binary data that makes up the alpha channel of the picture in
an image object.
set the alphaData of image to binaryData
set
the alphaData of image "Hellacious" to savedAlphaChannel if
charToNum( char x of the alphaData of image 1) is 255 then next repeat
Use the alphaData property to control the transparency of the pixels in an
image.
The alphaData of an image consists of a sequence of binary values.
Each pixel is represented by 8 bits (1 byte) of alpha channel data, with
pixels numbered from the top left corner of the
image, left to right, then top to bottom.
partial translucency.
unexpected behavior.
the charToNum function. For example, the numeric value of the alphaData for the
tenth pixel is given by the expression
charToNum( char 10 of the alphaData of image).
image. If you set an image's alphaData property to data whose total length is
incorrect, the image appearance may be
distorted. 60
60 Page 61 62
Page 61
alternateLanguages function
Synonyms
Objects
Platforms
Supported on Mac OS systems
Supported on Mac OS X systems
Not supported on Windows systems
Not supported on UNIX systems
do command
Returns a list of the OSA script languages that are installed on the
system.
the alternateLanguages
alternateLanguages()
the
alternateLanguages if "AppleScript" is among the lines of the
alternateLanguages
Comments
Use the alternateLanguages function to find out what scripting languages
(in addition to Transcript) are available for use
with the do command.
The alternateLanguages function returns a list of script languages, one per
line.
Mac OS and OS X systems support system-wide script languages (such as
AppleScript) through the Open Scripting
Architecture (OSA). You can write statements in any OSA language and execute
them using the do command. 61
61 Page 62 63
Page 62
altID property
Synonyms
Objects
any object
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
ID property
Specifies an alternate ID for objects.
set the altID of object to IDNumber
put
the altID of this card into myID repeat while the altID of stack myStack
<> 0
Use the altID property to specify an additional ID for an object. Both the
ID and the altID property are checked when you
refer to an object by ID.
The altID property of an object is a non-negative integer.
Comments:
This property can be used to ensure compatibility with imported SuperCard
and HyperCard stacks that assume buttons and
fields are created with sequential IDs. You can also use the altID of a stack
as a consistent way of referring to it, since the
ID of a stack changes every time an object is created.
checked when you refer to an object by ID, doing this may cause the wrong
object to be found because its altID property is
the same as the ID of the object you want. 62
62 Page 63 64
Page 63
altKey function
Synonyms
Objects
Platforms
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
commandKey function, controlKey function, down constant, keyDown message,
keysDown function, keyUp message,
metaKey function, mouse function, optionKey function, optionKeyDown message, shiftKey
function, up constant
Returns the state of the Alt key.
the altKey
altKey()
put
the altKey into keyState if the altKey is down then exit mouseUp
Comments
Use the altKey function to check whether the Alt key, Meta key, or Option
key is being pressed. You can use altKey to add
alternative capabilities to user actions such as clicking.
The altKey function returns down if the key is pressed and up if it's not.
The altKey, optionKey, and metaKey functions all return the same value.
Which one to use is a matter of preference.
(Mac OS systems), Meta key (Unix systems), or Alt key (Windows systems). 63
63 Page 64 65
Page 64
alwaysBuffer property
Synonyms
Objects
image, player, stack
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
bufferHiddenImages property, pixmapID property, screenNoPixmaps property,
screenSharedMemory property, windowID
property, Why am I running out of memory?
Determines whether the contents of windows, players, and images are
buffered offscreen.
set the alwaysBuffer of {stack | image | player} to {true | false}
set
the alwaysBuffer of this stack to true set the alwaysBuffer of image
"Smile" to false
Comments
Use the alwaysBuffer property to eliminate unwanted flicker when objects
are being redrawn. This property is especially
useful for eliminating flicker when using animation in a stack.
The alwaysBuffer of an object is true or false. By default, the alwaysBuffer
property of newly created images, players, and
stacks is set to false.
When moving objects are displayed on the screen, flicker may result, since
the objects are being redrawn as they move.
You can avoid this problem by judicious use of the alwaysBuffer property, which
creates an offscreen memory area in which
objects are initially drawn. The visible display is updated from this buffer
area, eliminating flicker.
allocated for the buffer. To make most efficient use of memory, Revolution
automatically buffers stacks under the following
circumstances:
ï visual effects are being executed
ï the move command is operating
ï objects are selected
The alwaysBuffer property overrides this behavior and ensures that the stack is
always buffered.
if these two properties are not the same, the stack is buffered.
This speeds up using the show command to display an image. Setting the
alwaysBuffer property of all images to true is
equivalent to setting the global bufferHiddenImages property to true.
movie from flickering when other objects (such as buttons) are drawn on top of
it. It also allows the current frame to be
seen when the card is printed.
If a player's alwaysBuffer is false, the movie it contains is drawn in front of
all objects. The visual effect command does not
affect the screen area inside the rectangle of a player whose alwaysBuffer is
false. If a player's alwaysBuffer is true, it
cannot be controlled with the controller bar and must be operated by script
control. 64
64 Page 65 66
Page 65
Note: Setting a player's alwaysBuffer to true always increases memory usage,
and may make movie playing more jerky. 65
65 Page 66 67
Page 66
and operator
Synonyms
Objects
logical
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
bitAnd operator, false constant, not operator, or operator, true constant,
Operator Precedence Reference
Evaluates to true if both operands are true, false otherwise.
value1 and value2
(1
> 0) and (1 = 0) --evaluates to false (1 > 0) and (1 = 1) and (0 = 0)
--evaluates to true
Comments
Use the and operator to combine two or more logical values.
The value1 and value2 are true or false, or expressions that evaluate to
true or false.
If value1 is false or value2 is false, or if both value1 and value2 are
false, then the and operation evaluates to false. If
value1 and value2 are both true, the expression value1 and value2 evaluates to
true.
Note: Transcript uses what is known as "short-circuit evaluation" for
logical operators. This means that value1 is evaluated
first. If value1 is false, the expression value1 and value2 is false regardless
of what value2 is (because the expression
evaluates to false unless both the values are true). In this case, Revolution
does not evaluate value2, since doing so is not
necessary to determine the value of value1 or value2. For example, evaluating
the expression asin( 2) normally causes an
execution error (because 2 is not a legal argument for the arc sine function),
but evaluating the expression (1 = 0) and
(asin( 2) = 1) does not cause an error: since (1 = 1) is always false, the
whole statement is always false and Revolution
never tries to evaluate the asin function. 66
66 Page 67 68
Page 67
angle property
Synonyms
Objects
graphic, image
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
arcAngle property, polySides property, revRotatePoly command, rotate
command, startAngle property
Specifies the starting angle of an arc or the rotation angle of a regular
polygon or image.
set the angle of {graphic | image} to angleInDegrees
set
the angle of graphic "Triangle" to 180 set the angle of image ID
45902 to it
Comments
Use the angle property to create an arc shape, or to turn a regular polygon
or image object.
The angle of a graphic or image is an integer between zero and 360.
Comments:
If you specify an angleInDegrees greater than 360, the angle is set to the
number you specify mod 360.
You can specify the angle of a graphic that is not a regular polygon, but it
has no effect on the graphic's appearance.
Unlike the rotate command, the angle property affects only the screen display
of the image, not the actual picture data in it.
Changing an image's angle does not change the imageData of the image. Repeated
changes to the angle property, unlike
repeated uses of the rotate command, do not degrade the image's quality. The
rotate command cannot be used on a
referenced image, but the angle of a referenced image can be set.
arcAngle properties to specify a portion of the oval to be displayed. The angle
property determines the starting point of the
arc. Zero is at the right edge, 3 o'clock. Increasing the angle moves the
starting point counter-clockwise around the arc.
(The direction of rotation for an arc is opposite the direction of rotation for
a polygon.) For example, if the angle is 90, the
arc starts at the top edge of the graphic's rectangle, 12 o'clock.
Changes to Transcript:
The ability to set the angle of an image was introduced in version 2. 0. In
previous versions, the angle property applied only
to graphics. 67
67 Page 68 69
Page 68
annuity function
Synonyms
Objects
Platforms
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
compound function, round function
Computes the value of an annuity given an interest rate and a number of payments.
annuity( interestRate, numberOfPeriods)
annuity(.
08,10) annuity( currentAnnualRate/ 12, monthsOfLoan)
Use the annuity function to calculate the present or future value of an
annuity or to calculate loan payments.
The interestRate is a positive number. The interestRate is expressed as a
fraction of 1 so, for example, an 8% rate is written
.08.
Value:
The annuity function returns a positive number.
The formula for the value of an ordinary annuity is
(1 -(1 + interestRate)^(-numberOfPeriods))/ interestRate
The annuity function calculates this value.
interest rate is the interest per month.
paymentAmount = totalAmount/ annuity( rate, periods)
For example, if the loan is for $2500 at an interest rate of 2% per month and
is to be repaid in a year, the monthly payment
is 2500/ annuity(. 02,12) or $236.40. 68
68 Page 69 70
Page 69
answer command
Synonyms
Objects
Platforms
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
answer color command, answer effect command, answer file command, answer
folder command, answer printer command,
ask command, gRevAppIcon keyword, gRevSmallAppIcon keyword, it keyword, modal
command, Why doesn't the ask or
answer dialog appear in my standalone?, Recipe for Hello World, Recipe for
speaking an alert message
Displays a dialog box with a message and up to seven buttons.
answer [iconType] prompt [with button1 [or buttons]]
Example Code
answer
"Go ahead?" with "Yes" or "No" or
"Maybe" answer information filesProcessed && "files were
exported."
Use the answer command to get information or a confirmation from the user
before continuing. The user must click one of
the buttons to dismiss the dialog box.
The iconType parameter is one of the following types: information,
question, error, or warning. The icon is displayed on the
left side of the dialog box. If you don't specify an icon, none is displayed.
iconType. If you specify an iconType, the image specified by the
gRevSmallAppIcon keyword appears instead, along with
the standard icon specified by the iconType.
contents.
expand if necessary to fit the button names; the total number of characters in
the buttons is limited only by the maximum
dialog box size and the font size. The last button you specify is the default
button. (Pressing Return or Enter is equivalent to
clicking the default button.) If you don't specify any button names, the dialog
box contains a single OK button.
blank.
The prompt can be either formatted text (in the htmlText property's format)
or plain text. If the prompt contains <p> or a
start/ end tag pair, the answer command assumes the text is in the same format
as the htmlText property. Otherwise, the
answer command assumes the text is plain text.
The position and appearance of the dialog box varies between platforms. On Mac
OS systems, the dialog box is centered on
the screen; on Unix and Windows systems, the dialog box is centered over the
active window. On Windows systems, the
buttons are shown in reverse order (the first button is on the right side). 69
69 Page 70 71
Page 70
On OS X systems, the image specified in the gRevAppIcon variable appears as the
application icon in the answer dialog box
(unless the answer... as sheet form is used). If you specify an iconType, the
image specified in the gRevSmallAppIcon
variable is used instead, along with the special icon specified by the
iconType.
no effect and the dialog box appears normally. Attempting to open a sheet from
within another sheet displays the second
stack as a modal dialog box instead.
The answer... as sheet form was introduced in version 2. 0.
70 Page 71 72
Page 71
answer color command
Synonyms
Objects
Platforms
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
answer command, backgroundColor property, colorNames function, colors
property, foregroundColor property, it keyword,
About colors and color references, Color Names Reference, Recipe for
translating a color name to an RGB numeric triplet,
Text menu > Color
Displays the operating system's standard color-selection dialog box.
answer color [with startingColor]
answer
color if theItem is "Custom Color..." then answer color
Use the answer color command to select a custom color.
The startingColor is a color reference consisting of one of the following:
ï a standard color name
ï three comma-separated integers between zero and 255, specifying the level of
each of red, green, and blue
ï an HTML-style color consisting of a hash mark (#) followed by three
hexadecimal numbers, one for each of red, green, and
blue.
The answer color command displays a dialog box where the user can select a
color. (This dialog box is displayed by the
operating system, not by Revolution.)
result function returns "Cancel".
The color is returned in the form of three comma-separated integers between
zero and 255, specifying the level of each of
red, green, and blue. This format can be used directly to set any color
property.
The option to specify a startingColor was introduced in version 1. 1. 1. In
previous versions, the dialog box displayed white
by default. 71
71 Page 72 73
Page 72
answer effect command
Synonyms
Objects
Platforms
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Not supported on UNIX systems
answer command, answer record command, hide command, QTEffects function,
show command, visual effect command,
How to find out whether QuickTime is available
Displays the QuickTime special effects dialog box.
answer effect
answer
effect if the altKey is down then answer effect
Use the answer effect command to choose a visual effect, or to set up an
effect with complex options for later use.
The answer effect command displays a dialog box where the user can select a
visual effect and (for some effects) set
parameters such as speed and direction. (This dialog box is displayed by
QuickTime, not by Revolution.)
description immediately, or store it (for example, in a variable or in a custom
property) for later use. To display the effect,
use the encoded description with the visual effect command, with the unlock
screen command, or with the hide with visual
effect or show with visual effect form of the hide or show command.
72 Page 73 74
Page 73
answer file command
Synonyms
Objects
Platforms
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
Note: this command works differently across platforms.
answer command, answer folder command, ask file command, files function, it
keyword, revMacFromUnixPath function,
revUnixFromMacPath function, systemFileSelector property, About filename
specifications and file paths, How to list the
contents of a folder, Why can't Revolution find a file I specified?, Why
doesn't Revolution recognize a stack file?
Displays a standard file dialog for the user to select a file.
answer file prompt [with defaultPath] [{ with filter | of type} types]
Example Code
answer
file "Select a file to delete:" answer file "Input:" with
"/ Macintosh HD/"
Use the answer file command when a handler needs the file path of a file
before continuing.
The prompt is a string (or any expression that evaluates to a string). If
you specify empty, no prompt appears.
defaultPath is specified, the dialog box lists the contents of the last folder
you used with a file dialog box.
parameter has no effect on Mac OS systems, because Mac OS file dialog boxes
don't have a title bar.)
Comments:
The dialog box displayed is the same one most programs use for the
"Open" command in the File menu.
set to empty, and the result function returns "Cancel".
file the user specifies.
no effect and the dialog box appears normally. Attempting to open a sheet from
within another sheet displays the second
stack as a modal dialog box instead.
standard file dialog.
73 Page 74 75
Page 74
Filtering for Mac OS: You can use either with filter or of type. With either
form, the types parameter consists of one or more
4-character file types, concatenated. For example, to display text and
PICT-format files but no others, use a types
parameter of "TEXTPICT". To display applications only, use a types
parameter of "APPL".
dialog box.
displays application bundles as well as single-file applications.
used on Unix systems. The types parameter consists of a single wildcard
expression.
Windows systems. A file type consists of an optional description, a line feed
or comma, and one or more file extension
specifications:
For example, to specify that only Revolution files should appear in the dialog
box, use this statement. The description
"Revolution files" is visible to the user at the bottom of the
dialog, and only files with the extension ". rev" are shown:
You can specify more than one file extension for a single description. For
example, to specify that only JPEG, GIF, and PNG
files should appear, use this statement:
You can include several descriptions, along with their file types, by
separating them with commas. The descriptions appear
in the list at the bottom of the file dialog box. For example, if you want to
display all text and Microsoft Word files, use this
command:
Tip: If a set of filters is complex or if you use them in several places, it
may be easier to put them into a variable, then
use that variable in the answer file command.
The ability to use answer file... of type "APPL" to designate an OS X
application bundle was introduced in version 2. 0. In
previous versions, the APPL file type showed only atomic files of type
"APPL".
74 Page 75 76
Page 75
answer folder command
Synonyms
answer directory
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
answer command, answer file command, ask file command, it keyword,
systemFileSelector property, About filename
specifications and file paths
Displays a standard file dialog for the user to choose a folder.
answer folder prompt [with defaultPath] [as sheet]
answer
folder "Please choose a folder:" if it is empty then answer folder
chooseMsg as sheet
Comments
Use the answer folder command when you want the user to choose a folderófor
example, as a destination for exported files.
The prompt is a string (or any expression that evaluates to a string). If
you specify empty, no prompt appears.
defaultPath is specified, the dialog box lists the contents of the last folder
you used with a file dialog box.
The absolute file path of the folder the user selects is placed in the it
variable. If the user cancels the dialog, the it variable
is set to empty, and the result function returns "cancel".
no effect and the dialog box appears normally. Attempting to open a sheet from
within another sheet displays the second
stack as a modal dialog box instead.
standard file dialog.
The answer folder... as sheet form was introduced in version 2. 0. 75
75 Page 76 77
Page 76
answer printer command
Synonyms
Objects
Platforms
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Not supported on UNIX systems
Note: this command works differently across platforms.
answer command, open printing command, print command, printMargins
property, printRotated property,
revShowPrintDialog command, How to display the print settings dialog box, How
to print in landscape mode, File menu >
Page Setup...
Displays the operating system's standard Print dialog box.
answer printer
answer
printer if the commandKey is down then answer printer
Use the answer printer command to set standard printing options for later
printing.
The answer printer command displays a dialog box where the user can set
certain print-related properties. (This dialog is
displayed by the operating system, not by Revolution.)
Cross-platform note: On Mac OS systems, the answer printer command displays the
Page Setup dialog. You can display
the standard Print dialog on a Mac OS system using open printing with dialog.
76
76 Page 77 78
Page 77
answer record command
Synonyms
Objects
Platforms
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Not supported on UNIX systems
answer command, answer effect command, dontUseQT property, play command,
record sound command, recordChannels
property, recordCompression property, recordFormat property, recordRate
property, recordSampleSize property, How to
find out whether QuickTime is available
Displays the QuickTime sound-recording settings dialog box.
answer record
answer
record if the alreadyHaveSettings of this card is false then answer record
Use the answer record command to specify settings for use with the record
sound command.
The answer record command displays a dialog box where the user can select a
sound compression format, rate, sampling
rate, and whether to record in mono or stereo. Depending on the compression
format, other options may also be offered.
(This dialog box is displayed by QuickTime, not by Revolution.) The settings
the user chooses will be used the next time the
record sound command is used.
accordance with the settings chosen in the dialog box. To save the settings you
choose in the dialog box and use them later
without re-displaying the dialog, save the values of these properties, then
restore them when you want to record sound.
If the dontUseQT property is set to true, the answer record command cannot be
used, and the result returns "could not
initialize quicktime". 77
77 Page 78 79
Page 78
any keyword
Synonyms
Objects
Platforms
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
first keyword, last keyword, middle keyword, number property, random
function, randomSeed property, How to shuffle the
items or lines in a container, Recipe for an Elizabethan insult generator
Designates a randomly chosen member of a set.
put
any word of field "Dictionary" into wordOfTheDay go to any card
--goes to a random card in the stack
Comments
Use the any keyword to specify a random object of a specified type, or to
designate a random chunk in a chunk expression.
The any keyword does not examine every member of a set; it specifies just
one member of the set, randomly chosen. For
example, the expression
if myString is in any field
checks whether myString is in a randomly chosen field, not whether myString is
somewhere in one of the fields on the card. 78
78 Page 79 80
Page 79
appleEvent message
Synonyms
Objects
card
Supported on Mac OS systems
Supported on Mac OS X systems
Not supported on Windows systems
Not supported on UNIX systems
address property, open process command, reply command, request appleEvent
command, request command, send to
program command, signal message, How to respond to double-clicking a file for
Mac OS or OS X
Sent to the current card whenever the application receives an Apple event.
appleEvent class, ID, sender
on
appleEvent theClass, theID --execute a set of statements in a text file if
theClass is "misc" and theID is "dosc" then
end if pass
appleEvent
end appleEvent
Comments
Handle the appleEvent message to respond to a custom Apple event, or one
that you want to handle specially.
The class and ID together identify the exact Apple event that was received.
and "print"), misc (for miscellaneous events such as "do
script"), and others.
The sender parameter is the address of the process that sent the Apple event.
Comments:
Use the request appleEvent command to obtain the data associated with an
Apple event.
Communication, located at <http:// developer. apple. com/ techpubs/ mac/
IAC/ IAC-2. html>. 79
79 Page 80 81
Page 80
arcAngle property
Synonyms
Objects
graphic, global
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
angle property, startAngle property
Specifies the angle used to draw an arc.
set the arcAngle [of graphic] to angleInDegrees
set
the arcAngle to myAngle --affects ovals drawn with the paint tools set the
arcAngle of graphic "Over" to theAngle
Use the arcAngle property to create an arc shape from an oval graphic, or
to cause the Oval paint tool to draw arcs.
The arcAngle of a graphic is an integer between zero and 360.
Comments:
By default, ovals display their entire arc from zero to 360 . , forming a
complete oval. Use the startAngle and arcAngle
properties to specify that only a portion of the oval, forming an arc, should
be drawn.
if the angleInDegrees is 90, a quarter-oval arc is displayed.
drawn, its appearance cannot be changed by changing the global arcAngle
property. 80
80 Page 81 82
Page 81
armBorder property
Synonyms
Objects
button
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
armFill property, autoArm property, borderColor property
Determines whether a button is drawn with a border when armed.
set the armBorder of button to {true | false}
set
the armBorder of button "Styles" to true set the armBorder of button
nextButton to false
Comments
Use the armBorder property to control the appearance of an armed button.
The color and pattern of the border are specified by the button's
borderColor and borderPattern properties.
81 Page 82 83
Page 82
armed property
Synonyms
arm
button
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
accentColor property, armBorder property, armFill property, autoArm
property
Specifies whether a button has a changed (active) appearance due to the
mouse pointer moving into it
set the armed of button to {true | false}
set
the armed of first button to false if the armed of button "Font" then
showFontSamples
Check the armed property to determine whether a button's menu is openóthat
is, whether the user is in the process of
choosing an item from the menu. You can also set a button's armed property to
change its appearance.
A button's armed property is analogous to its hilite property. A button is
usually armed when the mouse pointer moves into
it. You can automate this behavior by setting the button's autoArm property to
true.
Changes to Transcript:
The armed keyword was introduced in version 1. 1. In previous versions, the arm
synonym was used. 82
82 Page 83 84
Page 83
armedIcon property
Synonyms
Objects
button
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
autoArm property, icon property, showIcon property, Why do icons disappear
from a standalone application?
Specifies an image to display in a button when the mouse pointer enters it.
set the armedIcon of button to {imageID | imageName}
set
the armedIcon of button "Trigger" to 2245
Use the armedIcon property to change a button's appearance when it is
armed.
The armedIcon property is the ID or name of an image to use for an icon.
Revolution looks for the specified image first in
the current stack, then in other open stacks.
Comments:
If the button's autoArm property is false, the setting of the armedIcon
property has no effect. 83
83 Page 84 85
Page 84
armFill property
Synonyms
Objects
button
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
accentColor property, armed property, armBorder property, autoArm property,
hiliteColor property
Determines whether a button menu is drawn with a border when armed.
set the armFill of button to {true | false}
set
the armFill of button "Go Menu" to true
Use the armFill property to control the appearance of an armed menu item.
The armFill is true or false.
Comments:
When armed, the button is filled with the color specified by the
accentColor property.
If the button's showBorder property is true, the armFill property has no effect
and the button's fill color does not change
when the button is armed. 84
84 Page 85 86
Page 85
arrow constant
Synonyms
Objects
Platforms
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
constant command, cursor property, one constant
Equivalent to the number 1.
set
the cursor to arrow
Use the arrow constant to set the cursor to an arrow shape.
The following two statements are equivalent:
set the cursor to 1
Important! If you use the arrow cursor or other standard cursors in your
application, you must include the cursors when
you create your standalone. Make sure the "Cursors" option on the
Inclusions tab in Step 3 of the Distribution Builder is
checked. 85
85 Page 86 87
Page 86
arrowKey message
Synonyms
Objects
button, field, card
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
keyDown message, navigationArrows property, selectionChanged message,
textArrows property, How to block or change
the action of arrow keys
Sent to the active (focused) control, or to the current card if no control
is focused, when the user presses an arrow key.
arrowKey {up | down | left | right}
on
arrowKey theKey --make Up arrow go to the first card if theKey is
"up" then go to card 1
Handle the arrowKey message if you want to do something special when the
user presses an arrow key.
The parameter indicates which arrow key was pressed.
If the arrowKey handler does not pass the message or send it to a further
object in the message path, Revolution does not
perform the usual arrow key action (moving the insertion point, moving the
selected object, or navigating to another card).
Passing the message lets the arrow key action take place.
sent when the user presses an arrow key.
difference from HyperTalk's handling of the arrowKey message. 86
86 Page 87 88
Page 87
arrowSize property
Synonyms
Objects
graphic
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
endArrow property, lineSize property, startArrow property
Specifies the size of an an arrow at one end of a line or polygon graphic.
set the arrowSize of graphic to size
set
the arrowSize of last graphic to 20
Use the arrowSize property to change the size of arrows at the ends of
lines and polygons.
The arrowSize of a graphic is a number between 1 and 65535.
Comments:
The arrow of a graphic is proportional to the graphic's lineSize; changing
the lineSize increases or decreases the size of the
arrow, although the graphic's arrowSize property is not changed. If the
lineSize is zero, the arrow is not visible.
You can set the arrowSize of graphics other than lines and polygons, but doing
so has no effect. 87
87 Page 88 89
Page 88
as keyword
Synonyms
Objects
Platforms
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
do command, export command, go command, save command
Used with the do command to specify a scripting language; used with the
export command to specify the file format to
export to; used with the go command to specify the mode of a stack; used with
the save command to specify the file name
and location.
do
field 1 as Javascript export me to file myFile as "PNG"
Use the as keyword to modify the do, export, go, or save commands.
Use the alternateLanguages function to find out which languages can be used
with the do command on Mac OS and OS X
systems. 88
88 Page 89 90
Page 89
ascending keyword
Synonyms
Objects
Platforms
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
descending keyword, sort command
Used with the sort command to specify that sorting is in normal order (from
less to greater).
sort
this stack ascending by field "Order Number"
Use the ascending keyword to improve the clarity of your code. For example,
if a handler contains several sort commands
and some are in descending order, you can use the ascending keyword explicitly
to point up the fact that there are both
ascending and descending sorts.
Since ascending is the default sort order, you never actually need to use
the ascending keyword; if you leave it out, the sort
is performed in ascending order anyway. 89
89 Page 90 91
Page 90
asin function
Synonyms
Objects
Platforms
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
acos function, atan function, atan2 function, sin function
Returns the arc sine of a number in radians.
the asin of number
asin( number)
the
asin of .225 sin( asin(. 5)) --returns .5
Comments
Use the asin function to find the arc sine of a number.
The number is a number between -1 and 1, or an expression that evaluates to
such a number.
The asin function returns a number between ñpi/ 2 and pi/ 2.
The arc sine of number is an angle whose sine is equal to number. In other
words, asin is an inverse of the sin function.
function asinInDegrees theMagnitude
return asin( theMagnitude) * 180 / pi
end asinInDegrees 90
90 Page 91 92
Page 91
ask command
Synonyms
Objects
Platforms
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
answer command, ask file command, ask password command, modal command, Why
doesn't the ask or answer dialog
appear in my standalone?
Displays a dialog box with a question, a text box for the user to enter a
response, and OK and Cancel buttons.
ask [iconType] question [with defaultResponse] [titled windowTitle]
Example Code
ask
"What is your name?" ask "Please enter your occupation:"
with "Geek"
Use the ask command when a handler needs to get information from the user
before continuing.
The iconType parameter is one of the following types: information,
question, error, or warning. The icon is displayed on the
left side of the dialog box. If you don't specify an icon, none is displayed.
The defaultResponse is a string, and is placed in the text box when the dialog
box appears. If no defaultResponse is
specified, the text box is empty when the dialog box appears.
Comments:
The contents of the text box is placed in the it variable. If the user
cancels the dialog, the it variable is set to empty and the
result function returns "cancel".
has no effect and the dialog box appears normally. Attempting to open a sheet
from within another sheet displays the
second stack as a modal dialog box instead.
The ability to specify an iconType was added in version 2. 0. In previous
versions, no icon was displayed.
The ability to provide formatted text for the prompt was introduced in version
2. 0. 91
91 Page 92 93
Page 92
ask file command
Synonyms
Objects
Platforms
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
Note: this command works differently across platforms.
answer file command, answer folder command, ask command, dontUseNS
property, it keyword, modal command,
systemFileSelector property, Why can't Revolution find a file I specified?
Displays a standard Save dialog for the user to enter a file name and
specify a location.
ask file prompt [with defaultFilePath] [with filter types] [as sheet]
ask
file "Please name the file:" ask file "Save data as" with
"/ HD/ Data Stacks/ filedata. rev" as sheet
Use the ask file command to let the user provide the name and location of a
new file.
The prompt is a string (or any expression that evaluates to a string). If
you specify empty, no prompt appears.
the last slash character (/). If a folder path is provided in the
defaultFilePath, the dialog box shows the contents of that
folder. Otherwise, it shows the contents of the last folder you used with a
file dialog box. If a suggested file name is
provided in the defaultFilePath, it appears in the file name box.
optional description, a line feed or comma, and a file extension specification:
You can include more than one file type by separating the file types with
commas.
Cross-platform note: The types parameter applies only to Windows systems. On
Mac OS and Unix systems, this
parameter has no effect.
The dialog box is the same one most applications use for the
"Save" command in the File menu. (If the systemFileSelector
property is set to true on Mac OS and Windows systems, and always on Unix
systems, the application displays its own built-in
dialog box, instead of the one provided by the operating system.)
set to empty, and the result function returns cancel.
the user specifies.
no effect and the dialog box appears normally. Attempting to open a sheet from
within another sheet displays the second
stack as a modal dialog box instead. 92
92 Page 93 94
Page 93
If the systemFileSelector property is set to false, Revolution's built-in
dialog box is used instead of the operating system's
standard file dialog.
file name box contains "untitled". On Unix and Windows systems, the
file name box is empty when the dialog box appears.
The ask file... as sheet form was introduced in version 2. 0. 93
93 Page 94 95
Page 94
ask password command
Synonyms
Objects
Platforms
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
ask command, modal command, Why doesn't the ask or answer dialog appear in
my standalone?
Displays a dialog box like the ask command, but with the characters the
user types displayed as asterisks (*) for privacy.
ask password [clear] question [with defaultAnswer]
Example Code
ask
password clear "Password for the remote server:" ask password
"Please log in." titled "Millenium Group Intranet"
Comments
Use the ask password command to provide privacy for the information the
user types. For example, if the user is in a public
place, the information might be seen by someone looking over his or her
shoulder. This command encrypts the text the user
types, so you can also use ask password to implement a secret password.
The prompt is a string (or any expression that evaluates to a string).
is empty when the dialog box appears.
Comments:
The encrypted contents of the text box is placed in the it variable. If the
user cancels the dialog, the it variable is set to
empty, and the result function returns "cancel".
entered.
sheet form has no effect and the dialog box appears normally. Attempting to
open a sheet from within another sheet
displays the second stack as a modal dialog box instead.
The ask password... as sheet form was introduced in version 2. 0. 94
94 Page 95 96
Page 95
at keyword
Synonyms
Objects
Platforms
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
after keyword, before keyword, put command
Used with the click, play, and prepare commands to specify a point on the
screen. Also used with the read from file, read
from process, and write to file commands to specify where to begin reading or
writing.
click
at 140,200 play videoClip "Movie" at the clickLoc
Comments
Use the at keyword to specify where to click or where to start reading or
writing.
A point consists of two numbers: a vertical and horizontal distance from
the top left of the current stack, separated by a
comma. 95
95 Page 96 97
Page 96
atan function
Synonyms
Objects
Platforms
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
acos function, asin function, atan2 function, pi constant, tan function
Returns the arc tangent of a number in radians.
the atan of number
atan( number)
atan(
0) atan( tan(-1)) --returns -1
Comments
Use the atan function to find the arc tangent of a number.
The number is a positive or negative number, or an expression that
evaluates to a number.
The atan function returns a number between ñpi/ 2 and pi/ 2.
The arc tangent of number is an angle whose tangent is equal to number. In
other words, atan is an inverse of the tan
function.
function atanInDegrees theMagnitude
return atan( theMagnitude) * 180 / pi
end atanInDegrees 96
96 Page 97 98
Page 97
atan2 function
Synonyms
Objects
Platforms
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
acos function, asin function, atan function, pi constant, tan function
Returns the arc tangent of one number divided by another, using the sign of
both.
atan2( yCoordinate, xCoordinate)
atan2(-1,-1)
--returns 4/ 3 * pi atan2( thisNumber, thatNumber)
Use the atan2 function to find the arc tangent of one number divided by
another when sign is significant.
The yCoordinate is a number or an expression that evaluates to a number.
Value:
The atan2 function returns a number between ñpi and pi.
In most cases, atan2( y, x) is equal to atan( y/ x). However, if both x and
y are negative, the sign of x/ y is positive. In this
case, the atan function returns an angle in the first quadrant, but the atan2
function returns an angle in the third quadrant.
function atan2InDegrees firstArg, secondArg
return atan2( firstArg, secondArg) * 180 / pi
end atan2InDegrees 97
97 Page 98 99
Page 98
audioClip object
Synonyms
ac
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
templateAudioClip keyword, About object types and object references, How to
list the audio clips and video clips in a stack,
File menu > Import As Control > Audio File...
An object type that contains sound data.
play
pause audioClip theCurrentSoundtrack
Use the audioClip object type to play a sound that is stored in the stack,
rather than in another file.
Unlike a player, an audio clip contains the sound that it plays. This
increases the memory required by your stack, because
the sound data is loaded into memory along with the rest of the stack whenever
the stack file is open. However, it prevents
the sound from being accidentally separated from the stack file and lost.
An audio clip is contained in a stack. Audio clips cannot contain other
objects. (An audio clip is not a control, since it has no
user interface and cannot be owned by a card.)
to an audio clip as a result of user actions or internal Revolution events,
open the "Transcript Language Dictionary" page of
the main Documentation window, and choose "Audio Clip Messages" from
the Show menu at the top. To see a list of all the
properties an audio clip can have, choose "Audio Clip Properties"
from the Show menu. 98
98 Page 99 100
Page 99
autoArm property
Synonyms
Objects
button
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
accentColor property, armBorder property, armFill property
Specifies whether a button becomes armed when the mouse pointer moves into
it.
set the autoArm of button to {true | false}
set
the autoArm of last button to false set the autoArm of button "Menu
Choices" to true
Use the autoArm property to provide visual feedback to the user about which
button the mouse pointer is over. Usually, the
autoArm property is used for buttons that are part of stack menus.
The autoArm of a button is true or false.
Control" submenu of the Object menu have their autoArm property set to
true when created.
A button whose autoArm property is set to true does not receive mouseDown
messages.
is pressed and the pointer is over the button. If the button's autoArm is
false, it does not receive key messages while being
clicked. 99
99 Page 100 101
Page 100
autoHilite property
Synonyms
autohilight
button, field
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
enabled property, hilite property, listBehavior property, style property,
How to change the highlight state of a checkbox or
button, How to detect the highlight state of a control, How to prevent changing
a checkbox's state by clicking it, Why is the
selection lost when clicking a button?
Specifies whether a button highlights when it's pressed, or whether
selected text in a field is highlighted.
set the autoHilite of {button | field} to {true | false}
set
the autoHilite of last button to false if the autoHilite of me is false then
beep
Use the autoHilite property to give visual feedback to users when they
click a field or button.
The autoHilite of a button or field is true or false.
If a button's autoHilite property is true, clicking it changes its
appearance. This provides visual feedback to the user. (The
exact change in appearance depends on the style property of the button and on
the current setting of the lookAndFeel
property.)
outside the button while keeping the mouse button depressed, the button becomes
unhighlighted. If the user then moves
the mouse back over the button, the button becomes highlighted again.
If the button's style property is "checkbox" or
"radioButton", clicking it turns the control on or off. If the
button's style is
menu, the autoHilite has no effect.
select command is highlighted. If the field's autoHilite is false, user actions
cannot change the selection or place the
insertion point in the field by clicking, although a handler can do so with the
select command and the user can do so with
the arrow keys.
field, and a clicked line does not highlight. 100
100 Page 101 102
Page 101
autoTab property
Synonyms
Objects
field
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
enterKey message, returnInField message, returnKey message, tabKey message,
tabStops property
Specifies whether pressing Return (or Enter) moves to the next field.
set the autoTab of field to {true | false}
set
the autoTab of field "First Name" to true set the autoTab of field
myField to false
Comments
Use the autoTab property to make data entry easier for single-line fields.
The autoTab of a field is true or false.
Comments:
If the autoTab property of a field is false, pressing the Return key moves
the insertion point to the next line of the field.
advances to the next field on the card. 101
101 Page 102 103
Page 102
average function
Synonyms
avg
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
max function, median function, min function, round function,
standardDeviation function, sum function
Returns the arithmetic mean of a list of numbers.
average( numbersList)
average(
6,22,8) --returns 12 put average( importedList) into field "Imported
Price"
Comments
Use the average function to find the value that best represents a group of
values.
The numbersList is a comma-separated list of numbers, or an expression that
evaluates to such a list, or an array
containing only numbers.
The average function returns a number.
The average of a list of numbers is the sum of the items in the list or
elements in the array, divided by the number of items
or elements.
sum( numbersList)/ the number of items in numbersList
If the numbersList is empty, the average function returns zero.
Changes to Transcript:
The ability to use an array was introduced in version 1. 1. In previous
versions, only lists of numbers could be used with the
average function. 102
102 Page 103 104
Page 103
back keyword
Synonyms
Objects
Platforms
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
backScripts function, front keyword, go command, insert script command,
remove script command
Designates a location in the message path after an object's stack, or the
most recently visited card.
insert
the script of card button 9 into back go back
Use the back keyword to return to the most recently visited card, or to
designate a backScript.
When used with the go command, the back keyword designates the card the
user visited most recently. The statement go
back returns to that card.
placed in the message path after the stack. 103
103 Page 104 105
Page 104
backdrop property
Synonyms
Objects
global
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
Note: this command works differently across platforms.
backgroundColor property, backgroundPattern property, hide command,
mouseDownInBackdrop message,
mouseUpInBackdrop message, screenRect function, About colors and color
references, Color Names Reference, How to hide
other applications' windows, Recipe for translating a color name to an RGB
numeric triplet, Edit menu > Preferences, View
menu > Backdrop
Places a solid or patterned background behind the application's windows,
hiding any other applications.
set the backdrop to {colorName | RGBColor | patternNumber | imageID | none}
set
the backdrop to "black" set the backdrop to "140,30,30"
Comments
Use the backdrop property to create a kiosk mode, or to limit distractions
during a movie or similar presentation.
The backdrop is a color reference or a pattern specifier.
The RGBColor consists of three comma-separated integers between zero and 255,
specifying the level of each of red, green,
and blue; or an HTML-style color consisting of a hash mark (#) followed by
three hexadecimal numbers, one for each of red,
green, and blue.
patterns 136 to 300.)
then in other open stacks.
Comments:
Hiding other applications from the user is usually not recommended, since
users may need or want to see other windows on
their system. However, the ability to do this can be very useful for some
applications (such as kiosk systems or games) or
at times when you want to reduce distractions (such as during the playing of a
movie).
Pattern images can be color or black-and-white.
Cross-platform note: To be used as a pattern on Mac OS systems, an image must
be 128x128 pixels or less, and both its
height and width must be a power of 2. To be used on Windows and Unix systems,
height and width must be divisible by 8.
To be used as a fully cross-platform pattern, both an image's dimensions should
be one of 8, 16, 32, 64, or 128.
application, or if the user brings another application to the front, its
windows appear in front of the backdrop. (The backdrop 104
104 Page 105 106
Page 105
remains visible even if the application is in the background.) Bringing the
application to the front again hides the other
application behind the backdrop. On Unix and Windows systems, any windows you
open after setting the backdrop property
remain in front of the backdrop, even if they belong to an application that is
in the background.
Pattern images can be color or black-and-white. To be used on Mac OS systems,
patterns must be 128x128 pixels or less,
and both their height and width must be a power of 2. To be used on Windows and
Unix systems, height and width must be
divisible by 8.
The backdrop pattern option was introduced in version 1. 1. In previous
versions, the backdrop could be a solid color, but
not a pattern. 105
105 Page 106 107
Page 106
backgroundBehavior property
Synonyms
bgBehavior
group
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
backgroundIDs property, backgroundNames property, dynamicPaths property,
HCAddressing property, pass control
structure, send command, About groups and backgrounds, About messages and the
message path, How to automatically
include groups on a new card
Specifies whether a group is automatically placed on new cards, and whether
the group comes after the cards it's on in the
message path.
set the backgroundBehavior of group to {true | false}
set
the backgroundBehavior of last group to true if not the backgroundBehavior of
me then send "mouseUp" to me
Use the backgroundBehavior property to make groups behave like HyperCard
backgrounds, and to automatically place
groups on newly created cards.
The backgroundBehavior of a group is true or false.
Note: If a stack created in a version of Revolution earlier than 1. 1 is opened
in 1. 1 or later, the backgroundBehavior of all
its groups is set to true by default. This also applies to imported HyperCard
stacks.
A group's backgroundBehavior property controls two things: the message path
of cards containing the group, and whether
the group is copied automatically to new cards.
true (and that haven't already received the message). If you want a group to be
in the message path for any card it is
placed on, set the group's backgroundBehavior to true.
the newly created card. If you create a group of objects that serves as a
template for all cards, you should set the group's
backgroundBehavior to true so it will be automatically placed on new cards you
create. (Only groups on the current card
when you use the create card command are automatically placed on the new card.
Other groups are not automatically
placed, regardless of their backgroundBehavior setting.)
backgroundIDs properties. 106
106 Page 107 108
Page 107
backgroundColor property
Synonyms
backColor, secondColor, fillBack
any object
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems
Note: this command works differently across platforms.
backdrop property, backgroundPattern property, borderColor property,
bottomColor property, colorNames function, colors
property, effective keyword, focusColor property, foregroundColor property,
hiliteColor property, owner property,
shadowColor property, topColor property, About colors and color references,
Color Names Reference, How to get a striped
background in OS X, Why don't buttons respect my color settings?, Recipe for
setting the red channel of an object, Recipe
for translating a color name to an RGB numeric triplet
Specifies an object's background color.
set the backgroundColor of object to {empty | colorName | RGBColor}
set the backgroundColor of [chunk of] field to {empty| colorName| RGBColor}
set
the backgroundColor of last button to "white" set the backgroundColor
of graphic 2 to 128,128,128 --gray
Use the backgroundColor property to change the background of a window, or
the color that fills an object, or to change the
background color of text for a highlighted effect.
The backgroundColor of an object is a color reference.
The RGBColor consists of three comma-separated integers between zero and 255,
specifying the level of each of red, green,
and blue; or an HTML-style color consisting of a hash mark (#) followed by
three hexadecimal numbers, one for each of red,
green, and blue.
Comments:
Setting the backgroundColor of an object to empty allows the
backgroundColor of the object's owner to show through. Use
the effective keyword to find out what color is used for the object, even if
its own backgroundColor is empty.
The setting of the backgroundColor property has different effects, depending on
the object type:
ï The backgroundColor of a stack or card fills the entire stack window, as well
as determining the backgroundColor of each
object in the stack or card that does not have its own backgroundColor.
hierarchy is empty, the background color set by the system is used.
backgroundColor. 107
107 Page 108 109
Page 108
ï The backgroundColor of a button fills the area inside the button's outline.
If the button's style is "checkbox", the
backgroundColor fills the checkbox. If the button's style is
"radioButton", the backgroundColor has no effect. If the button is
a tabbed button, the backgroundColor fills the tab area and the frontmost tab,
but does not affect the other tabs.
operating system if the backgroundColor and backgroundPattern of the button and
all of its owners is empty. (In this case,
none of the button's color properties have an effect except for the
foregroundColor or foregroundPattern.) Otherwise, the
button is drawn by Revolution. If the lookAndFeel is "Appearance
Manager", button menus whose menuMode is set to
"option" or "comboBox" are always drawn by the operating
system, and the setting of the backgroundColor does not affect
them.
only that chunk is affected. For example, to create a "highlighter
pen" effect on a single word, set the word's
backgroundColor to yellow. If a chunk of text contains runs of text with more
than one background color, the
backgroundColor of that chunk reports "mixed".
"Windows 95", the field background is white, instead of inheriting
its owner's color.
ï The backgroundColor of a graphic is displayed inside the graphic's border if
the graphic's fill property is true. If the
graphic's fill is false, the setting of the backgroundColor has no effect.
ï The backgroundColor of an image is the second color in the image's color
palette.
ï The backgroundColor of a player, audio clip, or video clip has no effect.
Changes to Transcript:
The ability of standard buttons to have a backgroundColor under Appearance
Manager was introduced in version 2. 0. In
previous versions, if the lookAndFeel was set to "Appearance
Manager", the setting of the backgroundColor had no effect on
standard buttons.
of all objects in the object hierarchy was empty, a light gray color was used.
108
108 Page 109 110
Page 109
backgroundIDs property
Synonyms
Objects
stack
Supported on Mac OS systems
Supported on Mac OS X systems
Supported on Windows systems
Supported on UNIX systems