<doc>
	<legacy_id>2158</legacy_id>
	<name>go</name>
	<type>command</type>

	<syntax>
		<example>go [invisible] [to] <i>card</i> [of <i>stack</i>] [as <i>mode</i>|in [a] new window|in <i>window</i>]</example>
		<example>go [invisible] [to] {first | prev[ious]| next | last | any} [marked] [card]</example>
		<example>go [invisible] [to] {recent | start | finish | home} card</example>
		<example>go {forward | forth | back[ward]} [<i>number</i>]}</example>
	</syntax>

	<synonyms>
		<synonym>open</synonym>
	</synonyms>

	<summary>Navigates to another <keyword tag="card">card</keyword> or <object tag="stack">stack</object>.</summary>

	<examples>
<example>go to card 2</example>
<example>go to stack "Controls" as palette</example>
<example><p>go to next marked card</p></example>
<example>go back 7</example>
<example>go invisible stack "Preferences"</example>
	</examples>

	<history>
		<introduced version="1.0">Added.</introduced>
		<deprecated version=""></deprecated>
		<removed version=""></removed>
		<changed version="2.0">2.0</changed>
		<experimental version=""></experimental>
		<nonexperimental version=""></nonexperimental>
	</history>

	<objects>
	</objects>

	<platforms>
		<mac/>
		<windows/>
		<linux/>
		<ios/>
		<android/>
	</platforms>

	<classes>
		<desktop/>
		<web/>
		<mobile/>
	</classes>

	<security>
	</security>


	<classification>
		<category>Navigation &amp; Hypertext</category>
	</classification>

	<references>
		<command tag="unlock recent">unlock recent Command</command>
		<command tag="push">push Command</command>
		<command tag="show cards">show cards Command</command>
		<command tag="modeless">modeless Command</command>
		<command tag="drawer">drawer Command</command>
		<property tag="HCImportStat">HCImportStat Property</property>
		<keyword tag="recent">recent Keyword</keyword>
		<keyword tag="previous">previous Keyword</keyword>
		<keyword tag="as">as Keyword</keyword>
	</references>

	<description>
	<overview>Use the <b>go</b> command to move to another card in the current stack, to open a stack and go to a card within it, or to move backward and forward among recently visited cards.</overview>

		<parameters>
<parameter>
<name>card</name>
<description>Any card reference. Cards can be described by their name, number, or ID properties.</description>
</parameter>

<parameter>
<name>stack</name>
<description>Any stack reference, or any file path or http URL reference that resolves to a stack file. If you specify a file path or http URL, the command opens the main stack of the specified stack file.</description>
</parameter>

<parameter>
<name>mode</name>
<description>one of the following:</description>
<options title="">

<option>
<item>editable window</item>
<description></description>
</option>

<option>
<item>palette</item>
<description></description>
</option>

<option>
<item>modal dialog box</item>
<description></description>
</option>

<option>
<item>modeless dialog box</item>
<description></description>
</option>

<option>
<item>sheet dialog box</item>
<description>appears in defaultStack</description>
</option>

<option>
<item>drawer</item>
<description>appears in defaultStack, centered at left side if there's room</description>
</option>

</options>
</parameter>

<parameter>
<name>window</name>
<description>The name or windowID property of any open stack. If a window is specified, the stack opens in that window, replacing the stack that was previously displayed in that window.</description>
</parameter>

<parameter>
<name>number</name>
<description>The number of cards to move within the recent cards list.</description>
</parameter>		</parameters>

	<value></value>
	<comments>If the stack is open, is closed but loaded into memory, or is listed in the current stack's stackFiles property, you can specify it simply by name:<p></p><p>go stack "My Stack"</p><p></p><p>Otherwise, you must include the stack's file path.</p><p></p><p>When going to a previously-unopened stack, if you don't specify a card, the <b>go</b> command displays the first card of the stack. If the stack is already open, the current card of the stack appears and the stack window is brought to the front.</p><p></p><p>If the <property tag="lockScreen">lockScreen property</property> is set to true, the <b>go</b> command does not bring an already-open stack to the front until the <property tag="lockScreen">lockScreen</property> is set to false. (Remember that the <property tag="lockScreen">lockScreen</property> is automatically set to false when all pending handlers finish executing.)</p><p></p><p>If you specify a mode, the stack opens in the specified mode. If you don't specify a mode, the stack opens in whatever mode is specified by the stack's style property.</p><p></p><p>When going to a stack, you can specify a mode or a window for the stack to appear in, but not both.</p><p></p><p><important> The style of the stack, if it is anything other than "topLevel", overrides any mode you specify in a <b>go</b> command. For example, if you open a stack using the statement go stack "Some Stack" as modeless, and the style of "Some Stack" is set to "palette", it opens as a palette rather than a modeless dialog box, ignoring the mode you specified.</important><p></p><p>The <b>go</b>... as sheet form can be used only on OS X systems. If you use this form on Mac OS, Unix, or Windows, the stack is displayed as a modal dialog box instead. If you don't specify a mode, the stack is opened with the mode specified by its style property.</p><p></p><p>If you specify a URL, the stack is downloaded from that URL and displayed. The stack must be in stack file format (that is, not compressed or archived). Stacks opened in this way are treated as unsaved stacks; the long name of such a stack is the same as its abbreviated name, until the stack is saved on a local disk. The downloaded stack is a copy: changes you make to the stack are not automatically made on the server the stack came from. To change the stack on the server, you must save the stack file locally and re-upload it.</p><p></p><p>You can <b>go</b> to the first, previous, next, or last card of the current stack. The form go any card goes to a random card in the current stack. If you include the marked parameter, the go command is restricted to cards whose mark property is set to true.</p><p></p><p>Each card the user visits while the <property tag="lockRecent">lockRecent property</property> is false is placed in the recent cards list. You can use the <b>go</b> command to move among the previously-visited cards:</p><p></p><p>* The <b>go</b> recent card form goes to the most recently visited card.</p><p>* The <b>go</b> start and go finish forms go to the first or last card in the recent cards list.</p><p>* The <b>go</b> home form goes to the first card in the application's main stack. (This form is included mainly for HyperCard compatibility; the statement go home does not do anything useful in the development environment.)</p><p>* The <b>go</b> back number form backs up number cards. The go forward number form moves forward in the recent cards list. "forward" and "forth" are synonyms.</p><p></p><p>If you use the <b>go</b> invisible form, the window or card change does not show on the screen. (When going to a stack, this form sets the stack's <property tag="visible">visible property</property> to false.) Use this form of the <b>go</b> command to open a stack without displaying it on screen. To display the stack later, use the <command tag="show">show command</command> or set its <property tag="visible">visible property </property>to true.</p><p></p><p>Any visual effects that have been queued with the visual effect command are displayed when the <b>go</b> command is executed (unless the screen is locked).</p><p></p><p>If the stack or card you specify doesn't exist, an error message is returned by the result function.</p><p></p><p><tip>  To test whether a stack or card exists before trying to go to it, use the there is a operator:</p><p></tip><p>if there is a card "Index" then go card "Index"</p><p>if there is a stack myPath then go card 2 of stack myPath</p><p></p><p><change></change><p>The go... as sheet form was introduced in version 2.0. Previous versions did not support sheet dialogs.</comments>
	</description>
</doc>