Player
Documentation
Frontier
User's Guide
Chapter 5, Verbs
One Verb Per Page
Player.typeText
Syntax
Player.typeText(textOrKeys)
Parameters
textOrKeys is a string of text and/or special keys, concatenated with the "+" operator.
Action
Types the indicated string and/or special keys.
Returns
True.
Examples
Player.typeText("Hello World")
Player.typeText("One" + tab + "Two") « tab is a UserTalk constant
Player.typeText( string(myDocs.letterToMom) ) « type a bunch of text
Player.typeText("One" + Player.downArrow + "Two") « mix text & keys
with Player « ", keys" was required in 1.0x but is optional in 1.1
typeText(deleteKey) « "standard"
typeText(upArrow) « "arrows"
typeText(pageUpKey) « "misc."
typeText(F12) « "function"
typeText(keypad1) « "keypad"
with Player « type any number of keys & text in any order
typeText(F5 + pageDownKey + upArrow + upArrow)
typeText("One" + downArrow + "Two" + downArrow + "Two")
Errors
Unknown key.
Notes
- typeText(...) and typeKeys(...) have identical behavior and can be used interchangeably. Separate verbs are provided to suit different preferences and enhance readability in areas where one or the other seems more logical.
- This verb may type faster than an application can accept keystrokes. Use setTypingDelay(...) to set a short delay.
- As an alternative to typeCombination(...), this verb also has an optional holding parameter.
- For additional notes and a complete list of keys, see Chapter 6.
- If the "focus" is not set to a place that will accept text, the text will probably just go nowhere harmlessly.
- To type special characters that are not on the keyboard, use this verb and Frontier's char verb, e.g. type(char(29)) will enter the "Record Separator" character. (However, char(31) is reserved by Player and cannot be typed.)
See Also
Player.typeKeys
Player.typeCombination
Player.setTypingDelay
Keywords
keyboard[1]
windowExists
Copyright 1993-99, PreFab Software, Inc. All Rights Reserved.
This site built and maintained using Stage Three, a set of custom Frontier scripts.