IPC & URL Protocol
SecRandom IPC & URL Protocol Complete List
Section titled “SecRandom IPC & URL Protocol Complete List”For the current v2 integration API, installation, and event limitations, see the Integration SDK guide. This page describes the legacy URL and IPC routes.
URL activation cannot execute roll call, lottery, restart, or exit commands; those operations require IPC and local authorization.
SecRandom IPC & URL Protocol Reference
This page provides a complete list of IPC and URL protocols supported by SecRandom software. Through these protocols, you can quickly access various functional modules of the software and perform specific operations.
Overview
Section titled “Overview”SecRandom supports two protocol types:
- URL Protocol: Invoked through
secrandom://protocol, suitable for external applications and browsers - IPC Protocol: Inter-process communication, suitable for programming integration and automation scripts
Important Notes:
- Return Value Description: All return values (including execution results and data queries) are only available during IPC calls.
- URL Protocol Limitation: When invoked through system URL protocol (such as browser or shortcut), it can only trigger actions, and cannot retrieve any return values.
SecRandom adopts a unified window management entry. All window operations are implemented through the following three commands:
window/main- Main window controlwindow/settings- Settings window controlwindow/float- Floating window control
Complete Command Overview Table
Section titled “Complete Command Overview Table”| Command Group | Command | Purpose | Read-Only | Affects Interface |
|---|---|---|---|---|
| Window Control {rowspan=3} | window/main |
Main window control | No |
Yes |
window/settings |
Settings window control | No |
Yes |
|
window/float |
Floating window control | No |
Yes |
|
| Tray Functions {rowspan=5} | tray/toggle |
Toggle display | No |
Yes |
tray/settings |
Open settings | No |
Yes |
|
tray/float |
Floating window control | No |
Yes |
|
tray/restart |
Restart program | No |
Yes |
|
tray/exit |
Exit program | No |
Yes |
|
| Roll Call Control {rowspan=8} | roll_call/quick_draw |
Quick roll call | No |
Yes |
roll_call/start |
Start roll call | No |
Yes |
|
roll_call/stop |
Stop roll call | No |
Yes |
|
roll_call/reset |
Reset roll call | No |
Yes |
|
roll_call/set_count |
Set roll call count | No |
Yes |
|
roll_call/set_group |
Set group | No |
Yes |
|
roll_call/set_gender |
Set gender filter | No |
Yes |
|
roll_call/set_list |
Set roll call list | No |
Yes |
|
| Lottery Control {rowspan=8} | lottery/start |
Start lottery | No |
Yes |
lottery/stop |
Stop lottery | No |
Yes |
|
lottery/reset |
Reset lottery | No |
Yes |
|
lottery/set_count |
Set lottery count | No |
Yes |
|
lottery/set_pool |
Set prize pool | No |
Yes |
|
lottery/set_group |
Set group | No |
Yes |
|
lottery/set_gender |
Set gender filter | No |
Yes |
|
lottery/set_list |
Set lottery list | No |
Yes |
|
| Data Retrieval {rowspan=4} | data/roll_call_list |
Get roll call list | Yes |
No |
data/lottery_list |
Get lottery list | Yes |
No |
|
data/roll_call_history |
Get roll call history | Yes |
No |
|
data/lottery_history |
Get lottery history | Yes |
No |
Common Parameters
Section titled “Common Parameters”All window commands support the following common parameters for controlling window display behavior:
Action Parameters
Section titled “Action Parameters”action 'show' | 'hide' | 'toggle' default ''
Control window display state
mode 'show' | 'hide' | 'toggle' default ''
Alias for action, same priority
op 'show' | 'hide' | 'toggle' default ''
Alias for action, same priority
do 'show' | 'hide' | 'toggle' default ''
Alias for action, same priority
visible 1 | 0
1 is equivalent to show, 0 is equivalent to hide
Parameter Parsing Rules
Section titled “Parameter Parsing Rules”- Priority:
action/mode/op/do/visiblehave the same priority. Parameters are parsed in the order they appear, and later parameters will override earlier ones - Default Value: When no action parameters are passed, the default
toggleoperation is executed (hide if currently displayed, otherwise show) - Action Description:
show- Force window to showhide- Force window to hidetoggle- Toggle window display state
Parameter Usage Examples
Section titled “Parameter Usage Examples”secrandom://window/main?action=show- Show main windowsecrandom://window/main?visible=1- Show main window (using visible parameter)secrandom://window/main?mode=hide- Hide main window (using mode alias)secrandom://window/main- Toggle main window display state (default toggle)
window/main
Section titled “window/main”Main window control command, used to control the display state of the main window and switch pages.
Parameter Table
Section titled “Parameter Table”action 'show' | 'hide' | 'toggle' default 'toggle'
Control window display state
page 'roll_call_page' | 'lottery_page' | 'history_page' default ''
Switch main window page
page_name 'roll_call_page' | 'lottery_page' | 'history_page' default ''
Alias for page
name 'roll_call_page' | 'lottery_page' | 'history_page' default ''
Alias for page
value 'roll_call_page' | 'lottery_page' | 'history_page' default ''
Alias for page
Behavior Description
Section titled “Behavior Description”- No parameters passed: Execute toggle operation, toggle main window display state
- Only action parameters passed: Execute specified action (show/hide/toggle), do not switch page
- Page parameter passed: Switch to specified page while executing the action
- Page parameter aliases:
page/page_name/name/valuehave the same priority, later parameters will override earlier ones - Page alias support: Supports short aliases (e.g.,
roll→roll_call_page), see page list for details
Usage Examples
Section titled “Usage Examples”secrandom://window/main- Toggle main window display statesecrandom://window/main?action=show- Show main windowsecrandom://window/main?action=hide- Hide main windowsecrandom://window/main?action=toggle- Toggle main window display statesecrandom://window/main?page=roll_call_page- Switch to roll call pagesecrandom://window/main?page=lottery_page- Switch to lottery pagesecrandom://window/main?page=history_page- Switch to history pagesecrandom://window/main?action=show&page=roll_call_page- Show main window and switch to roll call pagesecrandom://window/main?action=show&page=lottery- Show main window and switch to lottery page (using alias)secrandom://window/main?visible=1&page=history- Show main window and switch to history page (using visible and alias)
window/settings
Section titled “window/settings”Settings window control command, used to control the display state of the settings window and open specific settings pages.
Parameter Table
Section titled “Parameter Table”action 'show' | 'hide' | 'toggle' default 'toggle'
Control window display state
page 'basicSettingsInterface' | 'listManagementInterface' | 'extractionSettingsInterface' default 'basicSettingsInterface'
Open specified settings page
page_name 'basicSettingsInterface' | 'listManagementInterface' | 'extractionSettingsInterface' default 'basicSettingsInterface'
Alias for page
name 'basicSettingsInterface' | 'listManagementInterface' | 'extractionSettingsInterface' default 'basicSettingsInterface'
Alias for page
value 'basicSettingsInterface' | 'listManagementInterface' | 'extractionSettingsInterface' default 'basicSettingsInterface'
Alias for page
preview '1' | '0' | 'true' | 'false' | 'yes' | 'no' | 'on' | 'off' default 'false'
Whether to open in preview mode
Behavior Description
Section titled “Behavior Description”- No parameters passed: Execute toggle operation, open settings window and display basic settings page
- Only action parameters passed: Execute specified action (show/hide/toggle), do not switch page
- Page parameter passed: Open specified settings page while executing the action
- Preview parameter: When set to true value (
1/true/yes/on), open settings page in preview mode - Page parameter aliases:
page/page_name/name/valuehave the same priority, later parameters will override earlier ones
Usage Examples
Section titled “Usage Examples”secrandom://window/settings- Toggle settings window display state (default open basic settings)secrandom://window/settings?action=show- Show settings windowsecrandom://window/settings?action=hide- Hide settings windowsecrandom://window/settings?page=basicSettingsInterface- Open basic settings pagesecrandom://window/settings?page=listManagementInterface- Open list management pagesecrandom://window/settings?page=extractionSettingsInterface- Open extraction settings pagesecrandom://window/settings?page=basicSettingsInterface&preview=1- Open basic settings in preview modesecrandom://window/settings?action=show&page=floatingWindowManagementInterface&preview=true- Show settings window and open floating window management in preview modesecrandom://window/settings?action=show&page=notificationSettingsInterface&preview=yes- Show settings window and open notification settings in preview modesecrandom://window/settings?action=show&page=safetySettingsInterface&preview=on- Show settings window and open security settings in preview modesecrandom://window/settings?action=show&page=customSettingsInterface- Show settings window and open custom settingssecrandom://window/settings?action=show&page=voiceSettingsInterface&preview=1- Show settings window and open voice settings in preview modesecrandom://window/settings?action=show&page=historyInterface- Show settings window and open history settingssecrandom://window/settings?action=show&page=moreSettingsInterface&preview=true- Show settings window and open more settings in preview mode
window/float
Section titled “window/float”Floating window control command, used to control the display state of the floating window.
Parameter Table
Section titled “Parameter Table”action 'show' | 'hide' | 'toggle' default 'toggle'
Control floating window display state
mode 'show' | 'hide' | 'toggle' default 'toggle'
Alias for action
op 'show' | 'hide' | 'toggle' default 'toggle'
Alias for action
do 'show' | 'hide' | 'toggle' default 'toggle'
Alias for action
visible 1 | 0 default ''
1 is equivalent to show, 0 is equivalent to hide
Behavior Description
Section titled “Behavior Description”- No parameters passed: Execute toggle operation, toggle floating window display state
- Action parameters passed: Execute specified action (show/hide/toggle)
- Floating window does not support page switching: Floating window commands do not support
pageparameter
Usage Examples
Section titled “Usage Examples”secrandom://window/float- Toggle floating window display statesecrandom://window/float?action=show- Show floating windowsecrandom://window/float?action=hide- Hide floating windowsecrandom://window/float?action=toggle- Toggle floating window display statesecrandom://window/float?mode=show- Show floating window (using mode alias)secrandom://window/float?op=hide- Hide floating window (using op alias)secrandom://window/float?visible=1- Show floating window (using visible parameter)secrandom://window/float?visible=0- Hide floating window (using visible parameter)
window/timer
Section titled “window/timer”Timer window control command, used to open the timer window.
Parameter Table
Section titled “Parameter Table”No parameters.
Behavior Description
Section titled “Behavior Description”Executing this command will directly open the timer window. If the window is already open, it will be brought to the front.
Usage Examples
Section titled “Usage Examples”secrandom://window/timer- Open timer window
tray/* Tray Function Commands
Section titled “tray/* Tray Function Commands”Tray function commands are used to control various functions of the tray menu.
Command List
Section titled “Command List”| Command | Description |
|---|---|
tray/toggle |
Toggle main interface display state |
tray/settings |
Open settings through tray |
tray/float |
Toggle floating window display state |
tray/restart |
Restart SecRandom program |
tray/exit |
Exit SecRandom program |
Parameter Description
Section titled “Parameter Description”tray/toggle
Section titled “tray/toggle”Toggle main interface display state command.
Parameter Table: No parameters
Return Value Description:
{ "status": "success", "message": "Main interface display state toggled"}Usage Examples:
secrandom://tray/toggle- Toggle main interface display state
tray/settings
Section titled “tray/settings”Open settings through tray command.
Parameter Table: No parameters
Return Value Description:
{ "status": "success", "message": "Settings window opened"}Usage Examples:
secrandom://tray/settings- Open settings through tray
tray/float
Section titled “tray/float”Toggle floating window display state command.
Parameter Table: No parameters
Return Value Description:
{ "status": "success", "message": "Floating window display state toggled"}Usage Examples:
secrandom://tray/float- Toggle floating window display state
tray/restart
Section titled “tray/restart”Restart SecRandom program command.
Parameter Table: No parameters
Return Value Description:
{ "status": "success", "message": "Program is restarting"}Usage Examples:
secrandom://tray/restart- Restart SecRandom program
tray/exit
Section titled “tray/exit”Exit SecRandom program command.
Parameter Table: No parameters
Return Value Description:
{ "status": "success", "message": "Program is exiting"}Usage Examples:
secrandom://tray/exit- Exit SecRandom program
roll_call/* Roll Call Control Commands
Section titled “roll_call/* Roll Call Control Commands”Roll call control commands are used to control the start, stop, reset of roll call functions and set roll call parameters.
Command List
Section titled “Command List”| Command | Description |
|---|---|
roll_call/quick_draw |
Quick roll call (randomly select one person) |
roll_call/start |
Start roll call |
roll_call/stop |
Stop roll call |
roll_call/reset |
Reset roll call state |
roll_call/set_count |
Set roll call count |
roll_call/set_group |
Set group |
roll_call/set_gender |
Set gender filter |
roll_call/set_list |
Set roll call list |
Parameter Description
Section titled “Parameter Description”roll_call/quick_draw
Section titled “roll_call/quick_draw”Quick roll call command, no parameters required, immediately randomly select one person.
Parameter Table: No parameters
Return Value Description:
{ "status": "success", "message": "Roll call successful", "data": { "name": "Zhang San", "id": "001" }}Usage Examples:
secrandom://roll_call/quick_draw- Quick roll call
roll_call/start
Section titled “roll_call/start”Start roll call command, start the roll call process.
Parameter Table: No parameters
Return Value Description:
{ "status": "success", "message": "Roll call started"}Usage Examples:
secrandom://roll_call/start- Start roll call
roll_call/stop
Section titled “roll_call/stop”Stop roll call command, stop the currently running roll call process.
Parameter Table: No parameters
Return Value Description:
{ "status": "success", "message": "Roll call stopped"}Usage Examples:
secrandom://roll_call/stop- Stop roll call
roll_call/reset
Section titled “roll_call/reset”Reset roll call command, reset roll call state and results.
Parameter Table: No parameters
Return Value Description:
{ "status": "success", "message": "Roll call reset"}Usage Examples:
secrandom://roll_call/reset- Reset roll call
roll_call/set_count
Section titled “roll_call/set_count”Set roll call count command, specify the number of people to select in each roll call.
Parameter Table:
count positive integer default 1
Roll call count
value positive integer default 1
Alias for count
Return Value Description:
{ "status": "success", "message": "Roll call count set to 3", "data": { "count": 3 }}Usage Examples:
secrandom://roll_call/set_count?count=3- Set roll call count to 3secrandom://roll_call/set_count?value=5- Set roll call count to 5 (using alias)
roll_call/set_group
Section titled “roll_call/set_group”Set group command, specify the group to use for roll call.
Parameter Table:
group string default Default group
Group name
group_name string default Default group
Group name
name string default Default group
Alias for group
Return Value Description:
{ "status": "success", "message": "Group set to Class 1", "data": { "group": "Class 1" }}Usage Examples:
secrandom://roll_call/set_group?group=Class 1- Set group to “Class 1”secrandom://roll_call/set_group?group_name=Class 2- Set group to “Class 2” (using alias)
roll_call/set_gender
Section titled “roll_call/set_gender”Set gender filter command, specify the gender filter condition for roll call.
Parameter Table:
gender 'all' | 'male' | 'female' default 'all'
Gender filter
value 'all' | 'male' | 'female' default 'all'
Alias for gender
Return Value Description:
{ "status": "success", "message": "Gender filter set to male", "data": { "gender": "male" }}Usage Examples:
secrandom://roll_call/set_gender?gender=male- Set gender filter to malesecrandom://roll_call/set_gender?value=female- Set gender filter to female (using alias)secrandom://roll_call/set_gender?gender=all- Set gender filter to all
roll_call/set_list
Section titled “roll_call/set_list”Set roll call list command, specify the list to use for roll call.
Parameter Table:
class_name string default Default class
Class name
list_name string default Default class
Alias for class_name
name string default Default class
Alias for class_name
Return Value Description:
{ "status": "success", "message": "Roll call list set to Grade 3 Class 1", "data": { "list_name": "Grade 3 Class 1" }}Usage Examples:
secrandom://roll_call/set_list?class_name=Grade 3 Class 1- Set roll call list to “Grade 3 Class 1”secrandom://roll_call/set_list?list_name=Grade 3 Class 2- Set roll call list to “Grade 3 Class 2” (using alias)
lottery/* Lottery Control Commands
Section titled “lottery/* Lottery Control Commands”Lottery control commands are used to control the start, stop, reset of lottery functions and set lottery parameters.
Command List
Section titled “Command List”| Command | Description |
|---|---|
lottery/start |
Start lottery |
lottery/stop |
Stop lottery |
lottery/reset |
Reset lottery state |
lottery/set_count |
Set lottery count |
lottery/set_pool |
Set prize pool |
lottery/set_range |
Set lottery range |
lottery/set_gender |
Set gender filter |
lottery/set_list |
Set lottery list |
Parameter Description
Section titled “Parameter Description”lottery/start
Section titled “lottery/start”Start lottery command, start the lottery process.
Parameter Table: No parameters
Return Value Description:
{ "status": "success", "message": "Lottery started"}Usage Examples:
secrandom://lottery/start- Start lottery
lottery/stop
Section titled “lottery/stop”Stop lottery command, stop the currently running lottery process.
Parameter Table: No parameters
Return Value Description:
{ "status": "success", "message": "Lottery stopped"}Usage Examples:
secrandom://lottery/stop- Stop lottery
lottery/reset
Section titled “lottery/reset”Reset lottery command, reset lottery state and results.
Parameter Table: No parameters
Return Value Description:
{ "status": "success", "message": "Lottery reset"}Usage Examples:
secrandom://lottery/reset- Reset lottery
lottery/set_count
Section titled “lottery/set_count”Set lottery count command, specify the number of people to select in each lottery.
Parameter Table:
count positive integer default 1
Lottery count
value positive integer default 1
Alias for count
Return Value Description:
{ "status": "success", "message": "Lottery count set to 3", "data": { "count": 3 }}Usage Examples:
secrandom://lottery/set_count?count=3- Set lottery count to 3secrandom://lottery/set_count?value=5- Set lottery count to 5 (using alias)
lottery/set_pool
Section titled “lottery/set_pool”Set prize pool command, specify the prize pool for lottery.
Parameter Table:
pool string default Default prize pool
Prize pool name
pool_name string default Default prize pool
Prize pool name
name string default Default prize pool
Alias for pool
Return Value Description:
{ "status": "success", "message": "Prize pool set to First Prize", "data": { "pool": "First Prize" }}Usage Examples:
secrandom://lottery/set_pool?pool=First Prize- Set prize pool to “First Prize”secrandom://lottery/set_pool?pool_name=Second Prize- Set prize pool to “Second Prize” (using alias)
lottery/set_range
Section titled “lottery/set_range”Set lottery range command, specify the range for lottery.
Parameter Table:
range string default Default range
Lottery range
range_name string default Default range
Lottery range
name string default Default range
Alias for range
Return Value Description:
{ "status": "success", "message": "Lottery range set to 1-100", "data": { "range": "1-100" }}Usage Examples:
secrandom://lottery/set_range?range=1-100- Set lottery range to “1-100”secrandom://lottery/set_range?range_name=101-200- Set lottery range to “101-200” (using alias)
lottery/set_gender
Section titled “lottery/set_gender”Set gender filter command, specify the gender filter condition for lottery.
Parameter Table:
gender 'all' | 'male' | 'female' default 'all'
Gender filter
value 'all' | 'male' | 'female' default 'all'
Alias for gender
Return Value Description:
{ "status": "success", "message": "Gender filter set to male", "data": { "gender": "male" }}Usage Examples:
secrandom://lottery/set_gender?gender=male- Set gender filter to malesecrandom://lottery/set_gender?value=female- Set gender filter to female (using alias)secrandom://lottery/set_gender?gender=all- Set gender filter to all
lottery/set_list
Section titled “lottery/set_list”Set lottery list command, specify the list to use for lottery.
Parameter Table:
class_name string default Default class
Class name
list_name string default Default class
Alias for class_name
name string default Default class
Alias for class_name
Return Value Description:
{ "status": "success", "message": "Lottery list set to Grade 3 Class 1", "data": { "list_name": "Grade 3 Class 1" }}Usage Examples:
secrandom://lottery/set_list?class_name=Grade 3 Class 1- Set lottery list to “Grade 3 Class 1”secrandom://lottery/set_list?list_name=Grade 3 Class 2- Set lottery list to “Grade 3 Class 2” (using alias)
data/* Data Retrieval Commands (Read-Only)
Section titled “data/* Data Retrieval Commands (Read-Only)”Data retrieval commands are used to get roll call lists, lottery lists, roll call history, and lottery history. These commands will not modify any settings or status, they are only used for data query.
Core Principles
Section titled “Core Principles”Important: Only IPC calls will return results (JSON response)
- Only IPC calls will return results (JSON response)
- Invoking via system URL protocol (
secrandom://...) can only trigger actions, the caller cannot synchronously read any returned data - Therefore: All
data/*read commands can only be used as IPC requests (otherwise they are meaningless)
How to Get Results via IPC
Section titled “How to Get Results via IPC”To get the return result of data/* commands via IPC, please send a request and read the response.
PowerShell Example Code:
$pipe = [System.IO.Pipes.NamedPipeClientStream]::new('.', 'SecRandom_IPC_SecRandom_3F2A1B0E', [System.IO.Pipes.PipeDirection]::InOut)$pipe.Connect(3000)$writer = [System.IO.StreamWriter]::new($pipe)$reader = [System.IO.StreamReader]::new($pipe)$request = @{ version = 1; type = 'url'; payload = @{ url = 'data/roll_call_list?name=Grade 1 Class 1' } } | ConvertTo-Json -Compress$writer.WriteLine($request); $writer.Flush()$reader.ReadLine()Note: Use IPC command format here, no
secrandom://prefix needed.
Return Value Structure Description:
- Top-level fields:
success(whether successful),type(type),result(business result) orerror(error message) - Real business data: In
resp["result"], this is the dictionary returned by the URL command processor
Command List
Section titled “Command List”| Command | Description |
|---|---|
data/roll_call_list |
Get roll call list |
data/lottery_list |
Get lottery list |
data/roll_call_history |
Get roll call history |
data/lottery_history |
Get lottery history |
Parameter Description
Section titled “Parameter Description”data/roll_call_list (Get Roll Call List)
Section titled “data/roll_call_list (Get Roll Call List)”IPC Command:
data/roll_call_list?class_name=xxx
Parameters (query):
class_name string
Class name (Compatible aliases: class / name / className)
Success Return (Business Layer result) Fields:
{ "status": "success", "message": "Roll call list retrieved successfully", "class_name": "Grade 1 Class 1", "data": [ { "id": "001", "name": "Zhang San", "gender": "male" }, { "id": "002", "name": "Li Si", "gender": "female" } ]}Missing Parameter Return (Business Layer result):
{ "status": "error", "message": "Missing parameter: class_name"}data/lottery_list (Get Lottery List)
Section titled “data/lottery_list (Get Lottery List)”IPC Command:
data/lottery_list?pool_name=xxx
Parameters (query):
pool_name string
Prize pool name (Compatible aliases: pool / name / poolName)
Success Return (Business Layer result) Fields:
{ "status": "success", "message": "Lottery list retrieved successfully", "pool_name": "Special Prize Pool", "data": [ { "id": "001", "name": "Zhang San", "gender": "male" }, { "id": "002", "name": "Li Si", "gender": "female" } ]}Missing Parameter Return (Business Layer result):
{ "status": "error", "message": "Missing parameter: pool_name"}data/roll_call_history (Get Roll Call History)
Section titled “data/roll_call_history (Get Roll Call History)”IPC Command:
data/roll_call_history?class_name=xxx
Parameters (query):
class_name string
Class name (Compatible aliases: class / name / className)
Success Return (Business Layer result) Fields:
{ "status": "success", "message": "Roll call history retrieved successfully", "class_name": "Grade 1 Class 1", "data": [ { "time": "2025-11-29 13:00:00", "students": [ { "id": "001", "name": "Zhang San" } ] } ]}Missing Parameter Return (Business Layer result):
{ "status": "error", "message": "Missing parameter: class_name"}data/lottery_history (Get Lottery History)
Section titled “data/lottery_history (Get Lottery History)”IPC Command:
data/lottery_history?pool_name=xxx
Parameters (query):
pool_name string
Prize pool name (Compatible aliases: pool / name / poolName)
Success Return (Business Layer result) Fields:
{ "status": "success", "message": "Lottery history retrieved successfully", "pool_name": "Special Prize Pool", "data": [ { "time": "2025-11-29 13:00:00", "winners": [ { "id": "001", "name": "Zhang San", "prize": "Special Prize" } ] } ]}Missing Parameter Return (Business Layer result):
{ "status": "error", "message": "Missing parameter: pool_name"}Page List
Section titled “Page List”Main Window Switchable Page List
Section titled “Main Window Switchable Page List”The main window supports switching to the following pages, specified by window/main?page=... parameter:
| Page ID | Page Name | Description | Short Alias |
|---|---|---|---|
roll_call_page |
Roll Call Page | Main window roll call function page | roll |
lottery_page |
Lottery Page | Main window lottery function page | lottery |
history_page |
History Page | Main window history page | history |
settingsInterface |
Settings Placeholder Page | Main window sidebar “Settings” placeholder page | None |
Description:
main_windowonly means “Show main window”, not a switchable sub-page- Using short aliases can simplify calling, e.g.,
page=rollis equivalent topage=roll_call_page - Switching pages automatically executes the window show action (default is show)
Settings Window Openable Page List
Section titled “Settings Window Openable Page List”The settings window supports opening the following pages, specified by window/settings?page=... parameter:
| Page ID | Page Name | Description |
|---|---|---|
basicSettingsInterface |
Basic Settings | SecRandom basic function settings |
listManagementInterface |
List Management | List management and editing |
extractionSettingsInterface |
Extraction Settings | Roll call and extraction related settings |
floatingWindowManagementInterface |
Floating Window Management | Floating window display and behavior settings |
notificationSettingsInterface |
Notification Settings | Notification related settings |
safetySettingsInterface |
Security Settings | Security and privacy related settings |
customSettingsInterface |
Custom Settings | User custom function settings |
voiceSettingsInterface |
Voice Settings | Voice broadcast related settings |
historyInterface |
History Settings | History record management and settings |
moreSettingsInterface |
More Settings | Other extended settings |
updateInterface |
Update | Software update related page |
aboutInterface |
About | Software information and version notes |
Description:
- When
pageparameter is not passed,basicSettingsInterface(Basic Settings) is opened by default - Settings window pages do not support short aliases, complete page IDs must be used
- Use
preview=1parameter to open settings page in preview mode
Migration Guide
Section titled “Migration Guide”URL/IPC protocol entries for older versions (below 2.2.6) have been removed. Please use the new unified entry for replacement.
Removed Old Entries
Section titled “Removed Old Entries”The following old entries are no longer supported:
main/roll→ Removedmain/lottery→ Removedmain/→ Removedsettings/basic→ Removedsettings/list→ Removedsettings/extraction→ Removedsettings/floating→ Removedsettings/notification→ Removedsettings/safety→ Removedsettings/custom→ Removedsettings/voice→ Removedsettings/history→ Removedsettings/more→ Removedsettings/update→ Removedsettings/about→ Removedsettings/→ Removed
Equivalent Replacement Examples
Section titled “Equivalent Replacement Examples”| Old Entry | New Entry (Equivalent Replacement) |
|---|---|
secrandom://main/roll |
secrandom://window/main?page=roll_call_page |
secrandom://main/lottery |
secrandom://window/main?page=lottery_page |
secrandom://main/ |
secrandom://window/main |
secrandom://settings/basic |
secrandom://window/settings?page=basicSettingsInterface |
secrandom://settings/list |
secrandom://window/settings?page=listManagementInterface |
secrandom://settings/extraction |
secrandom://window/settings?page=extractionSettingsInterface |
secrandom://settings/floating |
secrandom://window/settings?page=floatingWindowManagementInterface |
secrandom://settings/notification |
secrandom://window/settings?page=notificationSettingsInterface |
secrandom://settings/safety |
secrandom://window/settings?page=safetySettingsInterface |
secrandom://settings/custom |
secrandom://window/settings?page=customSettingsInterface |
secrandom://settings/voice |
secrandom://window/settings?page=voiceSettingsInterface |
secrandom://settings/history |
secrandom://window/settings?page=historyInterface |
secrandom://settings/more |
secrandom://window/settings?page=moreSettingsInterface |
secrandom://settings/update |
secrandom://window/settings?page=updateInterface |
secrandom://settings/about |
secrandom://window/settings?page=aboutInterface |
secrandom://settings/ |
secrandom://window/settings |
For frequently asked questions about IPC & URL Protocol, please check: IPC & URL Protocol FAQ
Cheat Sheet
Section titled “Cheat Sheet”Quick reference for most commonly used commands:
| Function | Command |
|---|---|
| Open main window and switch to roll call page | secrandom://window/main?action=show&page=roll_call_page |
| Open settings window and show basic settings | secrandom://window/settings?action=show&page=basicSettingsInterface |
| Toggle floating window display state | secrandom://window/float |
| Quick roll call | secrandom://roll_call/quick_draw |
| Start roll call | secrandom://roll_call/start |
| Set roll call count | secrandom://roll_call/set_count?count=3 |
| Start lottery | secrandom://lottery/start |
| Set lottery count | secrandom://lottery/set_count?count=5 |
| Restart program | secrandom://tray/restart |
Usage Examples
Section titled “Usage Examples”URL Protocol Usage
Section titled “URL Protocol Usage”Create Shortcut
- Right-click Desktop → New → Shortcut
- Enter URL protocol (e.g.,
secrandom://window/main?action=show&page=roll_call_page) - Name the shortcut and complete creation
Batch Script
@echo offecho Starting SecRandom main interface...start secrandom://window/main?action=show&page=roll_call_pageBrowser Call
<a href="secrandom://window/main?action=show&page=roll_call_page">Open SecRandom Roll Call Page</a>IPC Protocol Usage
Section titled “IPC Protocol Usage”PowerShell Example For a complete PowerShell usage example, refer to the IPC section above.
JavaScript Example For complete JavaScript usage example, please refer to: secrandom_ipc_send_url.js
Precautions
Section titled “Precautions”- Protocol Registration: Ensure SecRandom has correctly registered URL protocol
- Security Considerations: Only use protocols listed in official documentation
- Parameter Validation: Ensure parameter values are correct when using parameters
- Error Handling: Recommended to add error handling mechanism when using protocols
- IPC Communication: IPC protocol requires the program to be in running state to use
- Data Read-Only:
data/*commands will not modify any data, only used for query
Troubleshooting
Section titled “Troubleshooting”Protocol Cannot Open
- Check if SecRandom is correctly installed
- Reinstall software to fix protocol registration
- Check if system security software blocked protocol call
- If all above factors are excluded, report bug to developer
IPC Communication Failed
- Confirm SecRandom program is running
- Check if IPC service started normally
- Check software logs for detailed error information
Command Execution Failed
- Check if command format is correct
- Confirm parameter values are within allowed range
- Check returned error message to locate problem