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.
The Online MethodSCRIPT Editor with a valid Cyclic Voltammetry script.
Toolbar Buttons
The toolbar with all buttons and status indicators.
| Button | Description |
|---|---|
| Formats the MethodScript code using the built-in formatter. Also available via Ctrl+Shift+F or Ctrl+S. | |
| Clears all code from the editor, giving you a blank canvas to start from. | |
| 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. | |
| Opens this help page with documentation about the editor buttons, syntax highlighting colors, squiggly line meanings, and keyboard shortcuts. | |
| Opens a USB connection to a PalmSens device. After connecting, the button turns darker () and the status indicator shows a green dot. | |
| Opens a Bluetooth Low Energy connection to a PalmSens device. Works like the USB connection but for wireless Bluetooth-enabled devices. | |
| 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 (). Also available via Ctrl+Shift+U. | |
| 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:
- Connection status — Shows a colored dot and text indicating the device connection state: Disconnected (gray), Connecting (yellow, pulsing), Connected (green), or Error (red).
-
Validation status — Shows the result of the last validation. A green
✓ No errors, a green✓ N warning(s), or a red✗ N error(s). Warnings (e.g. deprecated commands) do not prevent sending a script.
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 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.
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
- Autocomplete — The editor suggests commands, keywords, variables, and VarTypes as you type. Trigger manually with Ctrl+Space.
- Hover information — Hover over a command or keyword to see its description and parameter documentation.
- Signature help — When typing parameters, the editor shows which parameter you're on and what it expects.
-
Code folding — Fold measurement loops, if/endif blocks, and region markers (
#region/#endregion). - Quick fixes — Click the lightbulb icon next to an underlined error to see and apply suggested fixes.
- Script sharing — Use the Share button to create a URL that encodes your entire script. Anyone opening the URL will see the same code.
-
Line numbering — Line numbers start at 0 (the first line containing
eis line 0), matching the MethodScript documentation and device error messages.