|
THE HYPERCARD CENTER |
|
|
Note: This is a work in progress and will be formatting errors. Read more about the project on the home page.
go
go [to] ordinal
go [to] position
go [to] card [of bkgnd] [of stack]
go [to] bkgnd [of stack]
go [to] stack
go [to] [card of] [bkgnd of] stack ¬
[in a new window] [without dialog]
The go command takes the user to a card in a stack. The ordinal and position forms take the user to a card in the current stack.
If you name a stack (or background) without specifying a card, HyperCard goes to the first card of the stack (or background).
HyperCard puts empty into the function the result when the go command succeeds; it puts "No such card." or "No such stack." into the result when it can’t go to the card or stack.
The in a new window option tells HyperCard to open a stack in another window when it goes to the stack.
The without dialog option tells HyperCard to go to another stack directly based on the search paths that are specified on the Search Paths card of the user’s Home stack. If HyperCard can't find the stack, it places "No such stack" into the result .
If you don't use without dialog , the result is set to Cancel if the user clicks the "Where Is" dialog box's Cancel button.
Note: The options in a new window and without dialog take effect only if the go command explicitly specifies a stack other than the current stack.
Examples
--Go to an ordinal in the current stack (referring to cards):
go first
go last
go second
go third
--Go to a position in the current stack (referring to cards):
go this
go next
go prev
-- Go to a different card, perhaps in a different stack:
go back -- could be in another stack
go forth -- could be in another stack
go card 4
go card id 23405
go first card
go next card
go previous card
go recent card -- could be in another stack
go last card
go mid card
go any card
go first card of bkgnd 2
go card 1 of second bkgnd of stack "My Stack"
-- Go to a different background in the current stack:
go bkgnd "Index"
go bkgnd "Index" of stack "My Stack"
-- Go to a different stack:
go to stack "Address"
go stack "Address"
go "Address"
go home
go help
-- Use full pathname:
go "Simonides:Fly II:Current Fly:Help"
-- Go to new stack, but open it in a new window:
go stack "My Stack" in a new window
if the result is not empty then ... -- couldn't open it in a new window
-- Go to a new stack, but skip the dialog asking where the stack is if -- HyperCard can't find it:
go stack "My Stack" without dialog
if the result is not empty then ... -- didn't go there
-- Go to a new stack,open it in a new window, and skip the dialog:
go to stack "Home" in new window without dialog
Demo Script
on goFirstCardAndBack
set cursor to watch
set lockMessages to true -- to leave the demo script up
go first card
go back
end goFirstCardAndBack
Placeholders
ordinal
HyperTalk DefinitionOne of the following:
any
[the] last
[the] mid
[the] middle
[the] first
[the] second
[the] third
[the] fourth
[the] fifth
[the] sixth
[the] seventh
[the] eighth
[the] ninth
[the] tenth
AppleScript DefinitionOne of the following:
last
middle
first
second
third
fourth
fifth
sixth
seventh
eighth
ninth
tenth
See also: background, bkgnd, button, card, chunk, field, menu, menuItem and part
position
One of the following:
[the] next
[the] prev
[the] previous
this
Note: You can’t use this with buttons or fields.
See also: bkgnd and card
card
An expression that identifies a card by name, number, or id using one of the following forms (in AppleScript, use “background” in place of “bkgnd”):
recent card
back
forth
card id posInteger [of bkgnd ]card text [of bkgnd ] -- namecard posInteger [of bkgnd ] -- numberordinal card [of bkgnd ]position card [of bkgnd ]
ordinal marked cardposition marked cardmarked card posInteger
For example:
card id 3894
card "Index"
card 1 of background 1
prev card
previous card of this background
next card
this card
first card
last card
middle card
any card
first marked card
last marked card
next marked card
previous marked card
marked card 1
marked card (the number of marked cards)
When used inside a card script in HyperTalk:me
When a card receives a message:[the] target
See also: button and field
bkgnd
A HyperTalk expression that identifies a background by name, number, or id, using one of the following forms:
bkgnd id posInteger
bkgnd text -- name
bkgnd posInteger -- number
ordinal bkgnd
position bkgnd
For example:
bkgnd id 3894
bkgnd "Index"
bkgnd 1
prev bkgnd
previous bkgnd
next bkgnd
this bkgnd
first bkgnd
last bkgnd
middle bkgnd
any bkgnd
From within a background script, the term me refers to that background.
When a background receives a the message [the] target, that message is referring to the background.
See also: card
stack
An expression that identifies a stack by its name, using one of the following forms:
this stack
stack text -- name or path name
For example:
stack "Home"
stack "Simonides:School:References"
this stack
stack "HD:Stacks:Addresses alias
When used inside a stack script:me
When a stack receives a message:[the] target
Related Topics
« get | HyperTalk Reference
| help »
|