1.Overview
iClick has a built-in lightweight script management system. Through script extensions, you can:- 🎯 Add Custom Buttons - Add quick action buttons to the console header
- 📋 Extend Context Menu - Add exclusive context menus for devices
- 🔧 Call External Programs - Launch your automation tools with one click
- 🌐 Integrate Web Interface - Embed your management panel in iClick
.isx extension. Currently, .isx files are essentially ZIP archives that you can pack using any compression tool.
📦 Script Structure
Each script extension is an independent folder containing configuration files and resources:2.Manifest File (manifest.json)
manifest.json is the core configuration file for script extensions, defining basic information, tasks, UI extensions, and settings.
File Structure Overview
A completemanifest.json contains the following sections:
1. Basic Information
Every script package must contain basic information fields:Field Description
2. Event Listeners (events)
Define listeners and handlers for application lifecycle events.Basic Example
Supported Event Types
Field Description
Use Cases
- app/run: Start background services, initialize data, load configurations, etc.
3. Task Definition (scripts)
Define executable tasks in the context menu.Basic Example
Field Description
4. UI Extensions (views)
Add custom buttons to the console interface.Basic Example
Supported Slot Positions
Field Description
5. Settings Panel (settings)
Add visual configuration forms for scripts. After saving, asettings.json file will be automatically generated in the script directory.
Supported Configuration Types
📖 Detailed Documentation
See Settings Panel for complete configuration types, field definitions, reading methods, and best practices.
Related Documentation
- Script Integration Overview - Learn about script extension mechanism
- Operations - Command syntax and usage
- Settings Panel - Detailed settings documentation
- Complete Examples - Real-world scenario examples
- API Reference - WebSocket API documentation
3.Operations
Operations define the specific actions that scripts will execute. The same instruction structure is used in both task definitions (scripts) and UI extensions (views).
Instruction Structure
All operations contain two required fields:Supported Operation Types
iClick supports 5 operation types:$.nodejs.run
Execute Node.js script files.Syntax
Parameters
Path Rules
-
Relative path: Relative to script package directory
-
Absolute path: Full file path
$.shell.open
Execute external programs or open files.Syntax
Parameters
Path Rules
-
Relative path: Relative to script package directory
-
Absolute path: Full file path
$.http.get
Send HTTP GET request.Syntax
Parameters
$.http.post
Send HTTP POST request.Syntax
Parameters
$.webview.open
Open embedded WebView window.Syntax
Parameters
Window Options
Magic Variables
You can use magic variables in operation parameters (e.g., in context menus), which will be automatically replaced with actual values at runtime.Available Variables
Use Cases
Magic variables are particularly useful for scenarios that require current context information:4.Settings Panel (settings)
The settings panel allows you to add visual configuration forms for scripts. Users can easily modify these settings in the iClick console without manually editing configuration files.Basic Usage
Addsettings field in manifest.json:
Common Field Description
Each configuration item supports the following fields:Configuration Types
text - Single-line Text Input
Suitable for short text input, such as API Key, URL, etc.- API keys
- URLs
- Usernames
- Short text configuration
number - Number Input
Suitable for number input, such as port numbers, timeout values, etc.- Timeout values
- Port numbers
- Quantity limits
- Time intervals
checkbox - Checkbox
Suitable for boolean (on/off) options.- Feature toggles
- Enable/disable options
- Debug mode switches
select - Dropdown Select
Suitable for selecting one value from predefined options.options: Options array, each option containslabel(display text) andvalue(actual value)
- Run mode selection
- Log levels
- Theme selection
- Language selection
textarea - Multi-line Text
Suitable for long text or multi-line content input.- Configuration file content
- Script code
- Long text descriptions
- JSON configuration
file - File Selector
Allows users to select a file.- Certificate files
- Configuration files
- Data files
- Image files
path - Folder Selector
Allows users to select a folder path.- Output directories
- Working directories
- Data storage paths
- Log directories
date - Date Picker
Allows users to select a date.YYYY-MM-DD
Use Cases:
- Start/end dates
- Expiration dates
- Scheduled dates
time - Time Picker
Allows users to select time.HH:mm:ss
Use Cases:
- Scheduled task times
- Daily execution times
- Reminder times
datetime - Datetime Picker
Allows users to select date and time.YYYY-MM-DD HH:mm:ss
Use Cases:
- Scheduled task times
- Event times
- Deadline times
Auto-Generated Config File
When users modify and save settings in the iClick console, the system will automatically generate asettings.json file in the script package directory.
File Location:
Reading Configuration
Your external program can read the auto-generatedsettings.json file to obtain user configuration.
Python Example
Node.js Example
C# Example
Best Practices
1. Provide Reasonable Default Values
Provide reasonable default values for all configuration items to ensure scripts work properly without modifying configuration.2. Use Meaningful Names
Configuration itemname should clearly describe the purpose of the configuration.
3. Add Placeholder Hints
Addplaceholder to text input boxes to hint users about what to enter.
4. Use Required Fields Appropriately
Only setrequire: true for truly necessary configuration items.

