GUI Script Reference

Complete command reference for creating GUI applications

GUI scripts are simple text files that define the layout and behavior of graphical applications. Each line contains a command with pipe-separated parameters.

?? Syntax Rules:

• Use | (pipe) to separate fields
• Commands are case-insensitive
• Lines starting with # are comments
• WINDOW must be the first command


WINDOW

Creates the main application window. Required - must be first line.

WINDOW|Title|Width|Height

Parameters:
  Title  - Window title text
  Width  - Window width in pixels
  Height - Window height in pixels

Example:
WINDOW|My Application|400|300

LABEL

Displays static text on the window.

LABEL|Text|X|Y

Parameters:
  Text - Text to display
  X    - Horizontal position (pixels from left)
  Y    - Vertical position (pixels from top)

Examples:
LABEL|Hello World!|20|50
LABEL|Enter your name:|20|100

BUTTON

Creates a clickable button. Must have unique ID.

BUTTON|ID|Text|X|Y|Width|Height

Parameters:
  ID     - Unique numeric identifier
  Text   - Button label
  X      - Horizontal position
  Y      - Vertical position
  Width  - Button width in pixels
  Height - Button height in pixels

Examples:
BUTTON|1|OK|20|200|100|30
BUTTON|2|Cancel|140|200|100|30
BUTTON|3|Apply|260|200|100|30

LIST

Creates a list box with selectable items.

LIST|ID|X|Y|Width|Height|Items

Parameters:
  ID     - Unique numeric identifier
  X      - Horizontal position
  Y      - Vertical position
  Width  - List width in pixels
  Height - List height in pixels
  Items  - Semicolon-separated list of items

Example:
LIST|1|20|150|200|100|Item 1;Item 2;Item 3;Item 4

Creates a dropdown/combo box selector.

DROPDOWN|ID|X|Y|Width|Height|Options

Parameters:
  ID      - Unique numeric identifier
  X       - Horizontal position
  Y       - Vertical position
  Width   - Dropdown width in pixels
  Height  - Dropdown height in pixels
  Options - Semicolon-separated list of options

Example:
DROPDOWN|1|20|200|150|25|Red;Green;Blue;Yellow

ONCLICK

Defines what happens when a button is clicked.

ONCLICK|ID|Action|Argument

Parameters:
  ID       - Button ID to attach behavior to
  Action   - Action to perform (NOTIFY, CLOSE, EXEC)
  Argument - Action-specific argument

Actions:
  NOTIFY - Show notification message
  CLOSE  - Close the window
  EXEC   - Execute command (future)

Examples:
ONCLICK|1|NOTIFY|Button was clicked!
ONCLICK|2|CLOSE|
ONCLICK|3|NOTIFY|Processing...

ONCHANGE

Handles selection changes in lists and dropdowns.

ONCHANGE|ID|Action|Argument

Parameters:
  ID       - List/Dropdown ID to attach behavior to
  Action   - Action to perform
  Argument - Action-specific argument

Example:
ONCHANGE|1|NOTIFY|Selection changed!

Complete Examples

Hello World

WINDOW|Hello World|300|200
LABEL|Hello from guideXOS!|20|50
BUTTON|1|OK|100|120|80|30
ONCLICK|1|CLOSE|

Form with Multiple Controls

WINDOW|Registration Form|400|400
LABEL|Name:|20|40
LABEL|Color:|20|90
LABEL|Country:|20|140
LIST|1|20|190|200|120|USA;Canada;UK;Germany;France
DROPDOWN|2|100|85|200|25|Red;Green;Blue;Yellow;Orange
BUTTON|1|Submit|20|330|100|35
BUTTON|2|Cancel|140|330|100|35
ONCLICK|1|NOTIFY|Form submitted!
ONCLICK|2|CLOSE|
ONCHANGE|1|NOTIFY|Country selected
ONCHANGE|2|NOTIFY|Color changed

Calculator UI

WINDOW|Calculator|320|450
LABEL|Result: 0|20|30
BUTTON|1|7|20|80|60|50
BUTTON|2|8|90|80|60|50
BUTTON|3|9|160|80|60|50
BUTTON|4|÷|230|80|60|50
BUTTON|5|4|20|140|60|50
BUTTON|6|5|90|140|60|50
BUTTON|7|6|160|140|60|50
BUTTON|8|×|230|140|60|50
BUTTON|9|1|20|200|60|50
BUTTON|10|2|90|200|60|50
BUTTON|11|3|160|200|60|50
BUTTON|12|-|230|200|60|50
BUTTON|13|0|20|260|130|50
BUTTON|14|.|160|260|60|50
BUTTON|15|+|230|260|60|50
BUTTON|16|=|20|320|270|50
ONCLICK|1|NOTIFY|7
ONCLICK|2|NOTIFY|8
ONCLICK|3|NOTIFY|9
ONCLICK|4|NOTIFY|÷
ONCLICK|5|NOTIFY|4
ONCLICK|6|NOTIFY|5
ONCLICK|7|NOTIFY|6
ONCLICK|8|NOTIFY|×
ONCLICK|9|NOTIFY|1
ONCLICK|10|NOTIFY|2
ONCLICK|11|NOTIFY|3
ONCLICK|12|NOTIFY|-
ONCLICK|13|NOTIFY|0
ONCLICK|14|NOTIFY|.
ONCLICK|15|NOTIFY|+
ONCLICK|16|NOTIFY|=
?? Pro Tips:
  • Keep controls within window bounds
  • Use consistent spacing (multiples of 10)
  • Button IDs must be unique across all buttons
  • Use the GXM Packager GUI editor for templates!