Difference between revisions of "User Interface Typescript Commands"

 
(11 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
[[Category:Typescript Commands]]
 
[[Category:Typescript Commands]]
 
[[Category:User Interface Commands]]
 
[[Category:User Interface Commands]]
The typescript commands described here can be used from the typescript window or from a button script to manipulate the user interface, for example, by displaying or closing selected windows.  These commands generally have no effect when used from ADE.
 
  
= Open =
+
__TOC__
  
Open ''module''
+
The typescript commands described here can be used from the '''Typescript''' window or from a button script to manipulate the user interface. For example, they let you display or close selected windows.  These commands generally have no effect when used from [[ADE]].
  
Makes ''module'' the current module.  Any new objects declared/created from typescript are placed into the current module.
+
== Open ==
 +
:<code>Open ''module''</code>
  
  Open [diagram | object | definition | table | graph | result ] o
+
Makes «module» the current module. Any new objects declared/created from typescript are placed into the current module.
  
The first parameter specifies what kind of window to open.
+
:<code>Open [diagram | object | definition | table | graph | result ] o</code>
  
diagram window,
+
The first parameter specifies what kind of window to open:
object window,
+
:<code>diagram</code>: Diagram window
Definition: Table: Result as table,
+
:<code>object</code>: Object window
Graph: Result as graph  
+
:<code>definition</code>: Definition
Result: Result as table or graph depending on what it was last saved as.  
+
:<code>table</code>: Result as table
 +
:<code>graph</code>: Result as graph  
 +
:<code>result</code>: Result as table or graph depending on what it was last saved as.  
  
== Open Diagram ''m'' ==
+
=== Open Diagram ''m'' ===
 +
Opens the diagram window for module «m».
  
Opens the diagram window for module ''m''.
+
=== Open Object ''o'' ===
 +
Opens the object window for «o».
  
== Open Object ''o'' ==
+
=== Open Definition ''o'' ===
 +
Opens the Edit table window if «o» is defined as edit table, otherwise input control if there is one, otherwise definition attribute.
  
Opens the object window for ''o''.
+
=== Open Table ''v'' ===
 +
Opens the result table for «v».  The view mode ([[Mid]], [[Mean]], [[PDF]], etc) is determined by the value of the ''ValueState'' attribute of «v».  It will open to the previously viewed mode, unless you alter this attribute prior to executing.
  
== Open Definition ''o'' ==
+
=== Open Graph ''v'' ===
 +
Opens the result graph for «v».  The view mode ([[Mid]], [[Mean]], [[PDF]], etc) is determined by the value of the ''ValueState'' attribute of «v».
  
Opens the edit table window if ''o'' is defined as edit table, otherwise input control if there is one, otherwise definition attribute.  
+
=== Open Result ''v'' ===
 +
Opens the Result window for «v», showing a [[Table]] or graph, depending on the last view selected.  The last view shown is and the result mode are stored as the 7th and 8th fields of the [[Analytica Attributes|ValueState]] attribute.  (Its other fields store the location and size of the window).
  
== Open Table ''v'' ==
+
== Close ==
 
+
=== Close ''m'' ===
Opens the result table for ''v''.  The view mode (Mid, Mean, PDF, etc) is determined by the value of the ''ValueState'' attribute of ''v''.  It will open to the previously viewed mode, unless you alter this attribute prior to executing.
 
 
 
== Open Graph ''v'' ==
 
 
 
Opens the result graph for ''v''.  The view mode (Mid, Mean, PDF, etc) is determined by the value of the ''ValueState'' attribute of ''v''.
 
 
 
== Open Result ''v'' ==
 
 
 
Opens the result window for ''v'', to the view previously shown.  The view previous shown is stored as the 7th field of the ''ValueState]] attribute, and the result mode is the 8th component.  (The other components of that attribute store the location and size of the window).
 
 
 
= Close =
 
 
 
== Close ''m'' ==
 
  
 
When used within the typescript window, there is always a "current module".  If you've created a module from typescript by typing:  
 
When used within the typescript window, there is always a "current module".  If you've created a module from typescript by typing:  
Line 54: Line 49:
  
 
:Close ''m''
 
:Close ''m''
This can be used when ''m'' is the current module.  If ''m'' is the current module and also the top-level module, it will close your model, prompting whether you want to save changes if any unsaved changes are pending, and then exit Analytica.  If ''m'' is a sub-module and the current one, then the current module will become the parent of ''m''.  If ''m'' is not the current module, it signals an error.
+
This can be used when «m» is the current module.  If «m» is the current module and also the top-level module, it will close your model, prompting whether you want to save changes if any unsaved changes are pending, and then exit Analytica.  If «m» is a sub-module and the current one, then the current module will become the parent of «m».  If «m» is not the current module, it signals an error.
  
== Close Diagram ''m'' ==
+
=== Close Diagram ''m'' ===
 +
Closes the diagram window for module «m».
  
Closes the diagram window for module ''m''.
+
=== Close Object ''o'' ===
 +
Closes the object window for «o».
  
== Close Object ''o'' ==
+
=== Close Definition ''o'' ===
 +
Closes the edit table window for object «o».
  
Closes the object window for ''o''.
+
=== Close Graph ''v'', Close Table ''v'',  Close Result ''v'' ===
 +
These all close the result window for «v».
  
== Close Definition ''o'' ==
+
== Edit ==
 +
:Edit «v»
  
Closes the edit table window for object ''o''.
+
Same as: Open Definition «v»
  
== Close Graph ''v'' ==
+
== ResynchAllWindows ==
== Close Table ''v'' ==
+
In rare situations, Scripts button or assignments may cause changes that don't immediately update corresponding information displayed on screen. Thus, the user interface may show information inconsistent with what is in the model.  The command ResynchAllWindows cures this by re-displaying all open windows so that they are synchronized with the underlying model.  It has no parameters.
== Close Result ''v'' ==
 
  
These all close the result window for ''v''.
+
== BrowseModeOn ==
 +
Equivalent to pressing the Browse tool button on the toolbar.  Changes the user into browse-mode if he is currently in edit mode.
  
= Edit =
 
  
:Edit ''v''
+
*(New to [[What%27s_new_in_Analytica_6.5%3F|6.5]])  A module (even non-filed modules) can be set as browse-only from the typescript window as follows:
 +
<nowiki>    </nowiki><code>with ModuleName</code><br />
 +
<nowiki>    </nowiki><code>BrowseModeOn </code><br />
  
Same as: Open Definition ''v''
+
* (New to [[Analytica 6.5|6.5]]): Accepts an optional integer with bit flags, e.g.,
 +
::<code>BrowseModeOn 3</code>
 +
: Bit 1 means it shouldn't enable model-level UI options like File/Save As... when diagram is in focus.
 +
: Bit 2 means it shouldn't control the model-level toolbar options such as browse/edit mode when diagram is in focus.
  
= ResynchAllWindows =
+
== Bye ==
 +
When executed from within a file, as the file is loading, terminates the loading of that file.
  
There are some situations where changes made from button scripts, or assignments to attributes, may cause changes to the underlying model that the user interface does not detectThese cases are fairly rare, but when they happen, after the changes are made, parts of the user interface may be displaying older content, which is now inconsistent with the underlying contents of the model.  If you encounter one of these situations, the ResynchAllWindows command can be executed, which will cause all open windows to resynchronize with the underlying model.  ResynchAllWindows takes no parameters.
+
When used from the typescript window, or from a button script, terminates AnalyticaEquivalent to selecting '''Quit''' on the [[File menu]].
  
= BrowseModeOn =
+
(new to [[Analytica 6.0]]) With a minus sign as a parameter, it terminates Analytica without asking to save (and without saving) changes to your model.  E.g.:
 +
:<code>Bye -</code>
 +
As with any typescript command, from a button [[OnClick]] event, this needs to be run as
 +
:<code>[[EvaluateScript]]('Bye -')</code>
  
Equivalent to pressing the Browse tool button on the toolbar.  Changes the user into browse-mode if he is currently in edit mode.
+
==See Also==
 +
* [[Typescript]]
 +
* [[User interfaces]]

Latest revision as of 19:59, 3 January 2025


The typescript commands described here can be used from the Typescript window or from a button script to manipulate the user interface. For example, they let you display or close selected windows. These commands generally have no effect when used from ADE.

Open

Open module

Makes «module» the current module. Any new objects declared/created from typescript are placed into the current module.

Open [diagram | object | definition | table | graph | result ] o

The first parameter specifies what kind of window to open:

diagram: Diagram window
object: Object window
definition: Definition
table: Result as table
graph: Result as graph
result: Result as table or graph depending on what it was last saved as.

Open Diagram m

Opens the diagram window for module «m».

Open Object o

Opens the object window for «o».

Open Definition o

Opens the Edit table window if «o» is defined as edit table, otherwise input control if there is one, otherwise definition attribute.

Open Table v

Opens the result table for «v». The view mode (Mid, Mean, PDF, etc) is determined by the value of the ValueState attribute of «v». It will open to the previously viewed mode, unless you alter this attribute prior to executing.

Open Graph v

Opens the result graph for «v». The view mode (Mid, Mean, PDF, etc) is determined by the value of the ValueState attribute of «v».

Open Result v

Opens the Result window for «v», showing a Table or graph, depending on the last view selected. The last view shown is and the result mode are stored as the 7th and 8th fields of the ValueState attribute. (Its other fields store the location and size of the window).

Close

Close m

When used within the typescript window, there is always a "current module". If you've created a module from typescript by typing:

Module myModuleIdent

then this will be the current module. If you've used the typescript command:

Open myModule

then that will be your current module. When you create new objects from typescript, they are placed into the current module.

Close m

This can be used when «m» is the current module. If «m» is the current module and also the top-level module, it will close your model, prompting whether you want to save changes if any unsaved changes are pending, and then exit Analytica. If «m» is a sub-module and the current one, then the current module will become the parent of «m». If «m» is not the current module, it signals an error.

Close Diagram m

Closes the diagram window for module «m».

Close Object o

Closes the object window for «o».

Close Definition o

Closes the edit table window for object «o».

Close Graph v, Close Table v, Close Result v

These all close the result window for «v».

Edit

Edit «v»

Same as: Open Definition «v»

ResynchAllWindows

In rare situations, Scripts button or assignments may cause changes that don't immediately update corresponding information displayed on screen. Thus, the user interface may show information inconsistent with what is in the model. The command ResynchAllWindows cures this by re-displaying all open windows so that they are synchronized with the underlying model. It has no parameters.

BrowseModeOn

Equivalent to pressing the Browse tool button on the toolbar. Changes the user into browse-mode if he is currently in edit mode.


  • (New to 6.5) A module (even non-filed modules) can be set as browse-only from the typescript window as follows:

with ModuleName
BrowseModeOn

  • (New to 6.5): Accepts an optional integer with bit flags, e.g.,
BrowseModeOn 3
Bit 1 means it shouldn't enable model-level UI options like File/Save As... when diagram is in focus.
Bit 2 means it shouldn't control the model-level toolbar options such as browse/edit mode when diagram is in focus.

Bye

When executed from within a file, as the file is loading, terminates the loading of that file.

When used from the typescript window, or from a button script, terminates Analytica. Equivalent to selecting Quit on the File menu.

(new to Analytica 6.0) With a minus sign as a parameter, it terminates Analytica without asking to save (and without saving) changes to your model. E.g.:

Bye -

As with any typescript command, from a button OnClick event, this needs to be run as

EvaluateScript('Bye -')

See Also

Comments


You are not allowed to post comments.