Home THE HYPERCARD CENTER

HyperTalk Reference
Home » HyperTalk Reference » Commands

Note: This is a work in progress and will be formatting errors. Read more about the project on the home page.

type

type text type text with commandKey

The type command acts exactly as if the user had typed text from the keyboard.

The text appears in the Message box when it’s visible (or also when it’s hidden if blindTyping is set to true).

To type text into a field or to add paint text, a handler must first set the insertion point (using either the select or click at command).

To perform a menu command, use the form type text with commandKey. For example, if you have a graphic on the Clipboard, you can paste it with the command

type "V" with commandKey


Examples

type "Hello there world" -- in the Message box

select before text of card field 1
type "Hello there world"

type "P" with commandKey -- print card  
type "V" with commandKey,shiftKey -- paste a field and its text

Demo Script

on typeIntoMe
   show bkgnd field "demo field"
   set the lockText of bkgnd field "demo field" to false
   select text of bkgnd field "demo field"
   type line 6 of bkgnd field "Help Text A"
   type return & return & "Click the mouse to continue..."
   select empty
   wait until the mouseClick
   hide bkgnd field "demo field"
   set the lockText of bkgnd field "demo field" to true
 end typeIntoMe

Placeholders

text
An expression that evaluates to a text string.

A text expression can be a literal string surrounded by quotation marks or the value of a container.

For example:

"Hello"
"The sum is:" && 3
card field 1
line 1 of bg fld "Address"
the Message box
the selection
myVar -- a variable
See also: background, bkgnd, button, card, field, menu, menuItem, and stack

Related Topics

« tabKey | HyperTalk Reference | unlock »


Version 0.7b1 (March 24, 2022)

Made with Macintosh

Switch to Modern View

Home
The HyperCard Center
HyperTalk Reference
Home » HyperTalk Reference » Commands

Note: This is a work in progress and will be formatting errors. Read more about the project on the home page.

type

type text type text with commandKey

The type command acts exactly as if the user had typed text from the keyboard.

The text appears in the Message box when it’s visible (or also when it’s hidden if blindTyping is set to true).

To type text into a field or to add paint text, a handler must first set the insertion point (using either the select or click at command).

To perform a menu command, use the form type text with commandKey. For example, if you have a graphic on the Clipboard, you can paste it with the command

type "V" with commandKey


Examples

type "Hello there world" -- in the Message box

select before text of card field 1
type "Hello there world"

type "P" with commandKey -- print card  
type "V" with commandKey,shiftKey -- paste a field and its text

Demo Script

on typeIntoMe
   show bkgnd field "demo field"
   set the lockText of bkgnd field "demo field" to false
   select text of bkgnd field "demo field"
   type line 6 of bkgnd field "Help Text A"
   type return & return & "Click the mouse to continue..."
   select empty
   wait until the mouseClick
   hide bkgnd field "demo field"
   set the lockText of bkgnd field "demo field" to true
 end typeIntoMe

Placeholders

text
An expression that evaluates to a text string.

A text expression can be a literal string surrounded by quotation marks or the value of a container.

For example:

"Hello"
"The sum is:" && 3
card field 1
line 1 of bg fld "Address"
the Message box
the selection
myVar -- a variable
See also: background, bkgnd, button, card, field, menu, menuItem, and stack

Related Topics

« tabKey | HyperTalk Reference | unlock »

Version 0.7b1 (March 24, 2022)

Made with Macintosh

Switch to Retro View