Online MethodSCRIPT Editor Help

Back to Editor

Introduction

The Online MethodSCRIPT Editor is a browser-based code editor for writing MethodSCRIPT programs for PalmSens potentiostat devices. It features syntax highlighting, real-time validation, code formatting, and direct device communication via USB and Bluetooth LE.

Online MethodSCRIPT Editor overview

The Online MethodSCRIPT Editor with a valid Cyclic Voltammetry script.

Toolbar Buttons

Toolbar buttons

The toolbar with all buttons and status indicators.

Button Description
Format Formats the MethodScript code using the built-in formatter. Also available via Ctrl+Shift+F or Ctrl+S.
Clear Clears all code from the editor, giving you a blank canvas to start from.
Share Creates a shareable URL containing your script and copies it to the clipboard. Anyone opening this URL will see exactly the same script in their editor.
Help Opens this help page with documentation about the editor buttons, syntax highlighting colors, squiggly line meanings, and keyboard shortcuts.
Connect with USB Opens a USB connection to a PalmSens device. After connecting, the button turns darker (Connect with USB) and the status indicator shows a green dot.
Connect with Bluetooth Opens a Bluetooth Low Energy connection to a PalmSens device. Works like the USB connection but for wireless Bluetooth-enabled devices.
Send to Device Sends the current MethodScript to the connected device. This button is disabled (grayed out) until a device is connected. When the script is valid and a device is connected, the button turns gold-brown (Send to Device). Also available via Ctrl+Shift+U.
Show Communication Toggles the communication panel at the bottom of the screen. The panel shows all messages sent to and received from the device, including data packages, errors, and status updates.

Status Indicators

On the right side of the toolbar you will find two status indicators:

Syntax Highlighting

The editor uses a dark theme with color-coded syntax highlighting to make your MethodScript code easy to read. Each type of language element has its own color:

Syntax highlighting in the editor

Syntax highlighting showing different token types in color.

Color Element Example
Gold (bold) Keywords & control flow var, endloop, if, endif, on_finished:
Gold (bold) Measurement loop commands meas_loop_cv, meas_loop_ca, meas_loop_eis
Light yellow Commands set_pgstat_mode, set_e, cell_on, pck_start, pck_add, send_string
Teal VarTypes (type identifiers) aa, ab, ba, cr
Light blue Variables & identifiers p, c, data
Light green Numbers (with SI prefixes) 500m, 10m, 500u, 100i, 3
Orange Strings "Done: {p}"
Green (italic) Comments # Cyclic Voltammetry measurement
Gray/white Operators & delimiters =, +, -, >, <
Warm yellow String escape sequences \n, \t

Squiggly Lines (Diagnostics)

The editor underlines problems in your code with colored wavy lines (squigglies). These appear automatically as you type. Hover over a squiggly line to see the error or warning message.

Error squiggly lines in the editor

Code with errors shown as red squiggly underlines. The status bar shows the error count.

Squiggly Severity Description
invalid_command Error A red wavy underline indicates a critical error that will prevent the script from running. Examples: unknown commands, wrong parameter count, type mismatches. These must be fixed before sending to a device.
deprecated_cmd Warning A yellow wavy underline indicates a potential problem or deprecated usage. The script may still run, but the issue should be addressed.
suggestion Information A blue wavy underline indicates an informational suggestion. The code is valid but could be improved.
hint_item Hint A gray dotted underline indicates a subtle hint. These are the least severe and are purely optional improvements.

Keyboard Shortcuts

Shortcut Action
Ctrl+Shift+F Format document
Ctrl+S Format document (save gesture)
Ctrl+Shift+U Send script to connected device
Ctrl+Space Trigger autocomplete suggestions

Editor Features