Difference between revisions of "Typescript"

 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Category: Concepts]]
+
[[Category: Windows and dialogs]]
 
[[Category: Typescript Commands]]
 
[[Category: Typescript Commands]]
  
[[Typescript]] is a variant of the Analytica modeling language that is used in Button scripts and the '''Typescript''' window. It offers some commands and supports some syntax not part of the standard Analytica modeling language.
+
[[Typescript]] is a variant of the Analytica language of occasional value to advanced users. It contains a few commands that do things not (yet) available in system functions.  Typescript has a simple syntax, usually just a command, and zero or more parameters, separated by spaces. Useful commands include:
  
'''Button scripts''' appear in the [[Script]] Attribute of Buttons. Clicking on a Button executes its [[Script]].
+
<code>Profile x</code>:  Displays all the attributes of object <code>x</code>, include some obscure internal attributes not normally visible in the Analytica user interface. See also [[Inspection Commands#Profile|Profile]].
  
The '''Typescript window''' lets you interact with Analytica by typing [[:Category:Typescript Commands|commands]], like the <code>CMD</code> in Windows or a Unix shell script. You open the '''Typescript''' window by pressing ''Ctrl+' '' (''Control + single quote'') or ''F12'' (Function Key 12). When you type a command into the [[Typescript]], Analytica executes it as soon as you type return. It prints the results as text in the same window.
+
<code>Open Diagram x</code>: Opens the Diagram window containing object <code>x</code>. You can also open the Object,  Result, Graph, Table window for the object. See also [[User Interface Typescript Commands#Open|Open]] .
  
You can execute [[Typescript]] commands within any Analytica expression using the function [[EvaluateScript]](t). Its parameter «t» may be any typescript command.
+
<code>BrowseModeOn</code>: switches to Browse mode form Edit or Arrow mode. See also [[User Interface Typescript Commands#BrowseModeOn|BrowseModeOn]].
 +
 
 +
You can use Typescript in these contexts:
 +
* '''Typescript window'''  lets you interact with Analytica by typing [[:Category:Typescript Commands|commands]], like the <code>CMD</code> in Windows or a Unix shell script. You open the '''Typescript''' window by pressing ''Ctrl+' '' (''Control + single quote'') or ''F12'' (Function Key 12). When you type a command into the [[Typescript]], Analytica executes it as soon as you type return. It prints the results as text in the same window:
 +
:: [[File:Typescript window.png|400px]]
 +
 
 +
* [[EvaluateScript]](t) is a function that can be used in any Analytica expression. Its parameter «t» is a text which may include any typescript command. Use with caution!
 +
 
 +
* '''Button Scripts'''.  The [[Script]] attribute of a Button is obsolete, now replaced by the [[OnClick]] attribute for Buttons and [[OnChange]] attribute for Variables.
 +
 
 +
== Relation to TypeScript programming language ==
 +
 
 +
Microsoft developed a programming language they named TypeScript which has no relationship to Analytica's Typescript language. Analytica and its predecessor's use of the name "Typescript" pre-dates the programming language by more than 20 years, so this is merely an unfortunate collision of names.
  
 
== See Also ==
 
== See Also ==
* [[Buttons]]
+
* [[Commands]]
 
* [[Inspection Commands]]
 
* [[Inspection Commands]]
 
* [[User Interface Typescript Commands]]
 
* [[User Interface Typescript Commands]]
Line 20: Line 32:
 
* [[Analytica Script]]
 
* [[Analytica Script]]
 
* [[EvaluateScript]]
 
* [[EvaluateScript]]
 +
* [[Buttons]]

Latest revision as of 17:01, 2 February 2024


Typescript is a variant of the Analytica language of occasional value to advanced users. It contains a few commands that do things not (yet) available in system functions. Typescript has a simple syntax, usually just a command, and zero or more parameters, separated by spaces. Useful commands include:

Profile x: Displays all the attributes of object x, include some obscure internal attributes not normally visible in the Analytica user interface. See also Profile.

Open Diagram x: Opens the Diagram window containing object x. You can also open the Object, Result, Graph, Table window for the object. See also Open .

BrowseModeOn: switches to Browse mode form Edit or Arrow mode. See also BrowseModeOn.

You can use Typescript in these contexts:

  • Typescript window lets you interact with Analytica by typing commands, like the CMD in Windows or a Unix shell script. You open the Typescript window by pressing Ctrl+' (Control + single quote) or F12 (Function Key 12). When you type a command into the Typescript, Analytica executes it as soon as you type return. It prints the results as text in the same window:
Typescript window.png
  • EvaluateScript(t) is a function that can be used in any Analytica expression. Its parameter «t» is a text which may include any typescript command. Use with caution!
  • Button Scripts. The Script attribute of a Button is obsolete, now replaced by the OnClick attribute for Buttons and OnChange attribute for Variables.

Relation to TypeScript programming language

Microsoft developed a programming language they named TypeScript which has no relationship to Analytica's Typescript language. Analytica and its predecessor's use of the name "Typescript" pre-dates the programming language by more than 20 years, so this is merely an unfortunate collision of names.

See Also

Comments


You are not allowed to post comments.