You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added Marker Creator Script, Script Types Documentation, Various Corrections
- Added a Marker Creator script package and source.
- Added Script Types section with documentation on different script types.
- Corrected various errors in documentation.
- Added additional information to various sections.
Copy file name to clipboardExpand all lines: docs/host/gui.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ sidebar_position: 4
26
26
|`Host.GUI.openUrl(url)`| — |`url` — `Host.Url` path | Open a local file or URL in the host |
27
27
|`Host.GUI.runDialog(theme, formName, controller)`| — |`theme` — theme object, `formName` — form name, `controller` — controller object | Open a skin.xml dialog (blocking) |
28
28
|`Host.GUI.runDialogWithParameters(params, title)`| — |`params` — param list, `title` — dialog title | Open a parameter dialog with a param list |
29
-
|`Host.GUI.showFile(url)`|—|`url` — `Host.Url` path | Reveal a file in the host|
29
+
|`Host.GUI.showFile(url)`|`number`|`url` — `Host.Url` path | Reveal a file or folder in the system file manager. Returns `0` on success|
30
30
31
31
## Clipboard
32
32
@@ -205,7 +205,7 @@ var result = Host.GUI.runDialogWithParameters(params, "Dialog Title");
205
205
206
206
## showFile
207
207
208
-
`Host.GUI.showFile()` reveals a file in the host or system file browser. Accepts a `Host.Url` object.
208
+
`Host.GUI.showFile()` reveals a file or folder in the system file manager. Accepts a `Host.Url` object. For a file, it reveals the parent folder with the file selected. For a directory, it opens the folder. Returns `0` on success.
209
209
210
210
```javascript
211
211
var path =Host.Url("local://$USERCONTENT/folder/");
Copy file name to clipboardExpand all lines: docs/package_structure/classfactory.md
+21-4Lines changed: 21 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -73,7 +73,7 @@ Script registration, entry points, and attributes.
73
73
|`"FrameworkService"`| Host-managed service surface, not shown in menus |
74
74
|`"Gadget"`| - |
75
75
76
-
See [docs/script_interface.md](../script_interface.md) for the interface and lifecycle associated with each category.
76
+
See [Script Interfaces](../script_types/script_interfaces.md) for the minimal interface and lifecycle associated with documented categories.
77
77
78
78
## subCategory values
79
79
@@ -128,7 +128,7 @@ See [docs/script_interface.md](../script_interface.md) for the interface and lif
128
128
129
129
**Icon binding (toolbar buttons and menu items):**
130
130
131
-
For `EditAddIn` toolbar buttons, the script class uses `subCategory="Engine"` with `groupName` for panel location. For `EditTask` menu items, use `menuGroup` for menu categorization.
131
+
For `EditAddIn` toolbar buttons, the script class uses an addin specific `subCategory` (`"Engine"`, `"Project"`, `"Show"`) with `groupName` for panel location. For `EditTask` menu items, use `menuGroup` for menu categorization.
132
132
133
133
The image is declared in `skin.xml` as an `<Image>` and referenced from `classfactory.xml` with `theme://$package/...`.
134
134
@@ -145,6 +145,23 @@ The image is declared in `skin.xml` as an `<Image>` and referenced from `classfa
145
145
</ScriptMetaClass>
146
146
```
147
147
148
-
## Multiple commands from one JS file
148
+
## Multiple Scripts from One JS File
149
149
150
-
See [docs/script_interface.md](../script_interface.md) for the pattern of exporting multiple factory functions from a single JS file.
150
+
A single JavaScript file can export multiple factory functions, each registered as a separate `<ScriptClass>` entry in `classfactory.xml`.
Copy file name to clipboardExpand all lines: docs/package_structure/package_structure.md
+12-1Lines changed: 12 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,4 +35,15 @@ your-script.package (ZIP)
35
35
36
36
For multi-script packages, the package root uses the same structure. Each `<ScriptClass>` needs a unique `classID`, and `functionName` only needs to name the factory function inside that entry's `sourceFile`. Multiple entries may point at the same `sourceFile` when one JavaScript file exports several factory functions. Shared dialog definitions live in one `skin.xml`, with one `<Form>` per script when dialogs are used.
37
37
38
-
See [Examples - Multi-Script Demo](../scripts/multi-script-demo.md) for a working example.
38
+
See [Examples - Multi-Script Demo](../scripts/multi-script-demo.md) for a working example.
39
+
40
+
## Including Other JS Files
41
+
42
+
Include helper JavaScript files from the package root or known resource paths.
43
+
44
+
```javascript
45
+
include_file('helper.js');
46
+
include_file('constants.js');
47
+
```
48
+
49
+
See [SDK Files](sdk/sdk_files.md) for list of bundled files.
An `EditAddIn` panel is a persistent, non-blocking UI strip that's auto-docked in Studio Pro's panel area, beneath the main or editor surface toolbar. Its open/closed state persists in saved files.
7
+
8
+
## How It Connects
9
+
10
+
1.**`classfactory.xml`** — declares the script as `category="EditAddIn"` with `subCategory` matching the intended context and `groupName` for panel location.
11
+
2.**`skin/skin.xml`** — a `<Form>` defines the panel controls, referenced by the `formName` attribute.
12
+
3.**`scriptname.js`** — implements `IComponent` with `initialize()` and `terminate()` callbacks.
-`formName` references a `<Form name="MyPanelForm">` in `skin.xml`.
37
+
-`metaClassID` and `ScriptMetaClass` bind an icon to the script for a toolbar button. See [classfactory.xml - ScriptMetaClass](../package_structure/classfactory.md#scriptmetaclass-icon-and-resource-binding) for icon resource details.
An `EditTask` is a command/action script that optionally collects input and performs an action. When used with `context.runDialog()` it opens a blocking dialog for collecting input before performing the action.
7
+
8
+
## How It Works
9
+
10
+
1.**`classfactory.xml`** — declares the script as `category="EditTask"` with [`subCategory`](../package_structure/classfactory.md#subcategory-values) for the target context.
11
+
2.**`prepareEdit(context)`** — called first; validates state and optionally collects input. Returns `kResultOk` to proceed, or another value to cancel.
12
+
3.**`performEdit(context)`** — called only if `prepareEdit` returned `kResultOk`; performs the action.
Script Interfaces define the contracts between a script and the host. Each interface (IComponent, IEditTask, etc.) corresponds to a set of lifecycle callbacks the host invokes on the script. The minimum interface required depends on the script category.
7
+
8
+
## Category Reference
9
+
10
+
The `category` attribute in `classfactory.xml` determines which interface and lifecycle the script follows.
0 commit comments