UKADOC Project

Page Format

This page describes each SHIORI Event ID issued in SHIORI/3.0 and 3.1 (SSP extended definitions).
Events not listed here may be described on the SHIORI Resource or External SHIORI Events pages.

For an explanation of SHIORI Events themselves, see the page “Notes: What is a SHIORI Event?.”

About the Reference List

For SHIORI Events that have References, a list of their References is provided.
If the number portion of a Reference is “*”, it means the number of References is variable.
In other words, the Reference number is variable because the number of items depends on the operating environment, and all such variable References have the same content format.
Even in this case, the rule that References are numbered sequentially starting at 0 still applies. For example, if the Reference list contains only entries numbered *, References in the same format are listed from 0 through a variable number (depending on the environment); if the list includes up to Reference2 and the next line is Reference*, References in the same format are listed from 3 through a variable number.

About the [NOTIFY] Label

A SHIORI Event marked [NOTIFY] in its description is normally issued with the NOTIFY command.
If no such label is present, it is normally issued with the GET command.

Startup, shutdown, and switching events

OnFirstBoot

Occurs on the first startup.
In SSP, if no script is returned for this event (204), OnBoot occurs immediately afterward.

Reference0
Number of times the ghost has vanished.
  • Materia
  • SSP
  • CROW
  • Ninix
OnBoot

Occurs at startup.
In SSP, if no script is returned for OnGhostChanged, OnGhostCalled, OnFirstBoot, or OnVanished (204), this event occurs next.

Reference0
Shell name at startup.
Reference6
※MATERIA and SSP only: halt if the previous process crashed.
Reference7
※MATERIA and SSP only: name of the ghost that crashed during the previous process.
  • Materia
  • SSP
  • CROW
  • Ninix
OnClose

Occurs when a request to close is made.
In SSP, if no script is returned for OnGhostChanging or OnCloseAll (204), this event occurs next.

Reference0
※SSP only: reason for closing.
Returns user if the user closed it.
Returns system if the system is shutting down.
Reference1
※SSP only: scope number of the character associated with the menu used to close it. Affected by popupmenu.type. (main character 0, partner 1...)
Reference2
※SSP only: scope number of the character associated with the window used to close it. Not affected by popupmenu.type. (main character 0, partner 1...)
  • Materia
  • SSP
  • CROW
  • Ninix
OnCloseAll

Occurs when SSP itself is shutting down.
Occurs when "Exit All" is requested from the owner draw menu, when "Exit" is requested for the only running ghost, and when SSP shuts down as part of an OS shutdown.

Reference0
※SSP only: reason for closing.
Returns user if the user closed it.
Returns system if the system is shutting down.
Reference1
※SSP only: scope number of the character associated with the menu used to close it. Affected by popupmenu.type. (main character 0, partner 1...)
Reference2
※SSP only: scope number of the character associated with the window used to close it. Not affected by popupmenu.type. (main character 0, partner 1...)
  • SSP
  • Ninix
OnGhostChanged

Occurs when switched from another ghost to this ghost.
In SSP, if no script is returned for this event (204), OnBoot occurs immediately afterward.

Reference0
Name of the previous ghost's main body.
Reference1
Script used when switching from the previous ghost.
Reference2
Name of the previous ghost. [SSP only]
Reference3
Path of the previous ghost (file location). [SSP only]
Reference7
Shell name of the ghost switched to. [SSP only]
  • Materia
  • SSP
  • CROW
  • Ninix
OnGhostChanging

Occurs when a switch to another ghost is requested.
In SSP, if no script is returned for this event (204), OnClose occurs next.

Reference0
The name of the baseware of the ghost being switched to.
Reference1
If switched manually, manual
If switched by the system, automatic
is returned.
Reference2
The name of the ghost being switched to.[SSP only]
Reference3
The path of the ghost being switched to.[SSP only]
  • Materia
  • SSP
  • CROW
  • Ninix
OnGhostCalled

Occurs when called by another ghost.
In SSP, if no script is returned for this event (204), OnBoot occurs immediately afterward.

Reference0
Name of the calling ghost's main body.
Reference1
Script used when the calling ghost called this ghost.
Reference2
Name of the calling ghost.
Reference3
Path of the calling ghost.
Reference7
Shell name of the called ghost.
  • SSP
OnGhostCalling

Occurs when a request is made to call another ghost.

Reference0
The name of the called ghost's main body.
Reference1
If switched manually, manual
If switched by the system, automatic
is returned.
Reference2
The name of the called ghost.
Reference3
The path of the called ghost.
  • SSP
  • Ninix
OnGhostCallComplete

Occurs after another ghost is called and that ghost completes its startup script.

Reference0
Name of the called ghost's main body.
Reference1
Startup script of the called ghost.
Reference2
Name of the called ghost.
Reference7
Shell name of the called ghost.
  • SSP
OnOtherGhostBooted

Occurs when another ghost is called and that ghost starts.
In other words, it occurs for unrelated ghosts at the same time that OnGhostCallComplete occurs for the calling ghost.

Reference0
Name of the started ghost's main body.
Reference1
Startup script of the started ghost.
Reference2
Name of the started ghost.
Reference7
Shell name of the started ghost.
  • SSP
  • Ninix
OnOtherGhostChanged

Occurs when switching between other ghosts.

Reference0
Name of the previous ghost's main body.
Reference1
Name of the main body of the ghost switched to.
Reference2
Script used when switching from the previous ghost.
Reference3
Script used when switching to the new ghost.
Reference4
Name of the previous ghost.
Reference5
Name of the ghost switched to.
Reference14
Shell name of the previous ghost.
Reference15
Shell name of the ghost switched to.
  • SSP
  • Ninix
OnOtherGhostClosed

Occurs when another ghost is closed while multiple ghosts are running.

Reference0
Name of the closed ghost's main body.
Reference1
Last script of the closed ghost.
Reference2
Name of the closed ghost.
Reference7
Shell name of the closed ghost.
  • SSP
  • Ninix
OnShellChanged

Occurs when switched from another shell.

Reference0
Name of the current shell.
Reference1
(CROW only) Same as Reference0. (SSP only) Name of the current ghost.
Reference2
(SSP only) Path of the current shell.
  • Materia
  • SSP
  • CROW
  • Ninix
OnShellChanging

Occurs when switching to another shell.

Reference0
Name of the shell being switched to.
Reference1
(SSP only) Name of the shell before switching (the current shell).
Reference2
(SSP only) Path of the shell being switched to.
  • Materia
  • SSP
  • CROW
  • Ninix
OnDressupChanged

This event occurs when dressup is switched.
It may be notified multiple times. In that case, the last OnDressupChanged is [GET], and the others are [NOTIFY].
Also see OnNotifyDressupInfo, which occurs after this event.

This notification is skipped when the number of dressup flag changes is large (currently 100 elements). Use OnNotifyDressupInfo to receive large numbers of changes.

Reference0
ID of the character targeted for dressup.
Reference1
Name of the part.
Reference2
1 when enabled, 0 when disabled.
Reference3
Category name of the part.
Reference4
script when executed from a script, user when executed from a menu [2.5.90~]
  • SSP
  • Ninix
OnBalloonChange

Occurs when switched from another balloon.

Reference0
Name of the balloon switched to.
Reference1
Path of the balloon switched to.
  • SSP
  • Ninix
OnWindowStateRestore

Occurs when the window is restored from minimized.

Reference0
(SSP only) Reason for minimization.
system : Forced minimization by the OS (including when minimized from the taskbar)
script : From Sakura Script
sakuraapi : From the Sakura API
user : Menu operation
  • Materia
  • SSP
  • CROW
  • Ninix
OnWindowStateMinimize

Occurs when minimization is requested.
※Only SSP can be configured to speak in response.

Reference0
(SSP only) Reason for minimization.
system: Forced minimization by the OS (including minimization from the taskbar)
script: From Sakura Script
sakuraapi: From the Sakura API
user: Menu operation
  • Materia
  • SSP
  • CROW
  • Ninix
OnFullScreenAppMinimize

Occurs when SSP is minimized in response to launching a full-screen app.
Overrides OnWindowStateMinimize, which occurs during normal minimization.

Reference0
(SSP only) The reason for minimization. Always fullscreen.
  • SSP
OnFullScreenAppRestore

Occurs when SSP restores from minimization after a full-screen application exits.
Overrides OnWindowStateRestore, which occurs during normal restoration from minimization.

Reference0
(SSP only) The reason for minimization. Always fullscreen.
  • SSP
OnVirtualDesktopChanged

Fires when the virtual desktop is switched.
Currently only works on Windows 10.
This is an experimental feature, so its specification may change in the future.

Reference0
current: same as the current virtual desktop and the desktop displaying the ghost
hidden: the virtual desktop was switched and the ghost is hidden
minimize: the window is minimized, and it is not possible to determine which virtual desktop it belongs to
Reference1
ID of the current virtual desktop.
  • SSP
OnCacheSuspend

Occurs when entering the ghost cache.

  • SSP
OnCacheRestore

Occurs when leaving the ghost cache.

  • SSP
OnInitialize

Occurs on startup. [NOTIFY]

Reference0
On reload, reload; otherwise none (an empty string or Reference0 itself is not sent)
  • SSP
OnDestroy

Occurs when shutdown is requested. [NOTIFY]

Reference0
reload on reload; otherwise none (an empty string or Reference0 itself is not sent)
  • SSP
  • Ninix
OnSysResume

Occurs when resuming from suspend (both sleep and hibernation).

Reference0
Reason for resuming. Normally normal; auto when resuming automatically due to a system schedule; critical when an emergency shutdown occurs due to a depleted battery (deprecated since Windows Vista)
  • SSP
OnSysSuspend

Occurs when starting suspend (both sleep and hibernation). [NOTIFY]

  • SSP
OnBasewareUpdating

Occurs during a baseware update, after the download is complete and before file updates begin. If this event is not handled, OnCloseAll and then OnClose occur.

Reference0
Version number before the update. Example: 2.3.58
Reference1
Version number before the update, matching the version number shown in Windows Explorer properties. Example: 2.3.58.3000
  • SSP
OnBasewareUpdated

Occurs when the ghost starts after a baseware update has completed. If this event is not handled, OnBoot occurs.

Reference0
Version number after the update. Example: 2.3.59
Reference1
Version number after the update, matching the version number shown in Windows Explorer properties. Example: 2.3.59.3000
  • SSP

Input box events

OnTeachStart

Occurs when TeachBox opens.

  • Materia
  • SSP
  • Ninix
OnTeachInputCancel

Occurs when TeachBox is closed.

Reference0
(Empty string. Reserved to align the Reference number with OnUserInputCancel.)
Reference1
If closed, cancel.
  • SSP
  • Ninix
OnTeach

Occurs when input is submitted through TeachBox.

Reference*
History of entered words. Reference0 is the first input, and the most recent input is last (the nth input is Reference[n-1])
  • SSP
  • Ninix
OnCommunicate

Occurs when a script is passed from CommunicateBox or another ghost.

Reference0
For Box, user; for a ghost, the ghost's baseware-side name.
Reference1
Script content.
Reference*
Additional information.
  • Materia
  • SSP
  • Ninix
OnCommunicateInputCancel

Occurs when CommunicateBox is closed.

Reference0
(Empty string. Reserved to align the Reference number with OnUserInputCancel.)
Reference1
If closed, cancel.
  • SSP
  • Ninix
OnUserInput

Occurs when input is submitted in an InputBox.

See also InputBox ID.

Reference0
InputBox ID.
Reference1
Entered content.
Reference2
Additional input information (for sliderinput only, minimum,maximum; empty otherwise)
Reference3~
Additional information specified by --reference=
  • Materia
  • SSP
  • CROW
  • Ninix
OnUserInputCancel

Occurs when InputBox is closed.
If a timeout occurs and this event is not handled, OnUserInput Reference1=timeout is sent for compatibility.

Reference0
Input event ID.
Reference1
If timed out, timeout. If closed, close.
Reference2
Additional input information (for sliderinput only, minimum,maximum; empty otherwise)
Reference3~
Additional information specified by --reference=
  • SSP
  • Ninix
OnTextAreaInput

Occurs when input is submitted in a multiline input box (textareabox).
If the ID begins with "On", an event named after the ID is raised instead of this event, and the input is placed in Reference0 (subsequent references each shift back by one). The same rule applies as for the InputBox ID.

Reference0
textareabox ID.
Reference1
Entered content. Newlines are separated by the character with byte value 1 (\1).
Reference2
Empty (to align the Reference position with OnUserInput)
Reference3~
Additional information specified by --reference=
  • SSP2.9.10
OnTextAreaInputCancel

Occurs when a multiline input box (textareabox) is closed.
This event occurs regardless of the ID. Unlike OnUserInputCancel, on timeout it does not redirect to the input submission event.

Reference0
textareabox ID.
Reference1
If timed out, timeout. If closed, close.
Reference2
Content entered before closing. Newlines are separated by the character with byte value 1 (\1).
Reference3~
Additional information specified by --reference=
  • SSP2.9.10
inputbox.autocomplete

Occurs when the box is expanded. If a list of text separated by the character with byte value 1 is returned for this event, autocomplete is enabled in the input box.
(Windows Me/2000 or later)

Reference0
Input box type: one of inputbox, teachbox, or communicatebox.
Reference1
For inputbox only, the event name/identifier raised when input is submitted.
  • SSP

Dialog Box Events

OnSystemDialog

Occurs when Save/OK is clicked in a file-related dialog.

Reference0
One of open, save, folder, or color.
Reference1
Event ID.
Reference2
File path or comma-separated RGB values.
  • SSP
OnSystemDialogCancel

Occurs when Cancel is clicked in a file-related dialog.

Reference0
One of open, save, folder, or color.
Reference1
Event ID.
  • SSP
OnConfigurationDialogHelp

Occurs when an item is clicked using the Help button in the settings dialog.

Reference0
Dialog ID. The correspondence between types and pages is as follows.
  • setup …… General
  • ghost …… Ghost (1)
  • ghost2 …… Ghost (2)
  • folder …… Folder
  • display …… Display
  • dictation …… Speech synthesis/recognition
  • talk …… Speech/balloon
  • network …… Connection (1)
  • network2 …… Connection (2)
  • biff …… Mail
  • application …… External applications
  • messenger …… IM
  • ipmessenger …… IPMessenger
  • international …… Internationalization
  • developer …… Development/miscellaneous
Reference1
Dialog title.
Reference2
Item type:item name.
Reference3
Item content text.
  • SSP
OnGhostTermsAccept

Occurs when Accept is clicked in the terms-of-use dialog.
No event occurs when the close button in the upper-right corner is clicked.

  • SSP2.5.33
OnGhostTermsDecline

Occurs when Decline is clicked in the terms-of-use dialog.
No event occurs when the close button in the upper-right corner is clicked.

  • SSP2.5.33

Time Events

OnSecondChange

Occurs every second.

If talk playback is unavailable, the event is notified with Reference3 set to 0 using NOTIFY. The returned script is ignored.

Reference0
OS uptime (hours)
Reference1
1 when clipped, otherwise 0.
Reference2
1 when overlapping, otherwise 0.
Reference3
1 when talk playback is possible, otherwise 0.
Reference4
※SSP only: Time spent idle without any operation (at the OS level), in seconds.
  • Materia
  • SSP
  • CROW
  • Ninix
OnMinuteChange

Occurs every minute.

If talk playback is unavailable, the event is notified with Reference3 set to 0 using NOTIFY. The returned script is ignored.

Reference0
OS uptime (hours)
Reference1
1 when clipped, otherwise 0.
Reference2
1 when overlapping, otherwise 0.
Reference3
1 when talk playback is possible, otherwise 0.
Reference4
※SSP only: Time spent idle without any operation (at the OS level), in seconds.
  • Materia
  • SSP
  • CROW
  • Ninix
OnHourTimeSignal

Hourly time signal event. Occurs at the start of each hour (around ? o'clock, 0 minutes, 0 seconds).

If talk playback is unavailable, it waits until talk playback is possible. Therefore, the notification may arrive slightly later than the scheduled time.

Reference0
OS uptime (hours)
Reference1
1 when clipped, otherwise 0.
Reference2
1 when overlapping, otherwise 0.
Reference3
Always 1. (Because it waits until talk playback is possible)
Reference4
※SSP only: Time spent idle without any operation (at the OS level), in seconds.
  • SSP

Vanish events

OnVanishSelecting

Occurs when vanishing is requested.

  • Materia
  • SSP
  • CROW
  • Ninix
OnVanishSelected

Occurs when YES is selected in the confirmation dialog.

  • Materia
  • SSP
  • CROW
  • Ninix
OnVanishCancel

Occurs when NO is selected in the confirmation dialog.

  • Materia
  • SSP
  • CROW
  • Ninix
OnVanishButtonHold

Occurs when the vanish event is canceled by double-clicking.

Reference0
Script where the interruption action occurred.
Reference1
Scope number of the balloon where the interruption action occurred. Main character is 0, partner is 1, and so on.
Reference2
Interruption position, expressed as the number of characters from the start of the script. Sakura Script tags are included in the character count.
Example: If interrupted at the「あ」in \s[2]あいうえお, the value is 6.
  • Materia
  • SSP
  • CROW
  • Ninix
OnVanished

Occurs when the ghost switches to this ghost because the previous ghost vanished.
In SSP, if no script is returned for this event (204), OnBoot occurs immediately afterward.
Also note that in SSP, this event occurs when another concurrently running ghost vanishes if no script is returned for OnOtherGhostVanished. In this case, there is no fallback to OnBoot.

Reference0
The name of the vanished ghost on its main side.
Reference1
※SSP only The script for the vanished ghost's OnVanishSelected event.
Reference2
※SSP only The name of the vanished ghost.
Reference7
※SSP only The shell name of the ghost switched to.
  • Materia
  • SSP
  • CROW
  • Ninix
OnOtherGhostVanished

Occurs when another ghost vanishes while multiple ghosts are running.

Reference0
Name of the vanished ghost on the baseware side.
Reference1
Script from the vanished ghost's OnVanishSelected event.
Reference2
Name of the vanished ghost.
Reference7
Shell name of the ghost that switched.
  • SSP

Choice Events

OnChoiceSelect

Occurs when a choice is selected.

Reference0
ID of the selected choice.
Reference*
※CROW only: IDs of the second and subsequent choices.
  • Materia
  • SSP
  • CROW
  • Ninix
OnChoiceSelectEx

Occurs when a choice is selected.
Starts before OnChoiceSelect.

Reference0
Choice text (label).
Reference1
Choice ID.
Reference*
Extended information (third and subsequent arguments in the \q tag).
  • SSP
OnChoiceEnter

Occurs when the cursor enters or leaves a choice.
OnChoiceEnter occurs without a Reference when the cursor leaves a choice.

Reference0
Choice text (label).
Reference1
Choice ID.
Reference*
Extended information (third and subsequent arguments in the \q tag).
  • Materia
  • SSP
  • CROW
  • Ninix
OnChoiceTimeout

Occurs when the choice wait time expires.

Reference0
Script that timed out.
  • Materia
  • SSP
  • CROW
  • Ninix
OnChoiceHover

Occurs when the cursor rests over a choice.

Reference0
Choice text (label).
Reference1
Choice ID.
Reference*
Extended information (third and subsequent arguments in the \q tag).
  • SSP
OnAnchorSelect

Occurs when a \_a hyperlink is clicked.

Reference0
ID of the selected hyperlink.
  • Materia
  • SSP
  • CROW
  • Ninix
OnAnchorSelectEx

Occurs when a \_a hyperlink is clicked. OnAnchorSelect then occurs only if SHIORI returns nothing for this event.

Reference0
Text of the selected hyperlink.
Reference1
ID of the selected hyperlink.
Reference*
Extended information (second and subsequent arguments in the \_a tag).
  • SSP
OnAnchorEnter

Occurs when the cursor enters or leaves a \_a hyperlink.

Reference0
Hyperlink text.
Reference1
Hyperlink ID.
Reference*
Extended information (second and subsequent arguments in the \_a tag).
  • SSP
OnAnchorHover

Occurs when the cursor rests over a \_a hyperlink.

Reference0
Hyperlink text.
Reference1
Hyperlink ID.
Reference*
Extended information (second and subsequent arguments in the \_a tag).
  • SSP

Surface Events

OnSurfaceChange

Occurs when the surface changes.
[NOTIFY]

Reference0
Current surface on the main character.
Reference1
Current surface on the partner.
Reference2
※SSP only: Character ID, surface number, width, height
  • SSP
  • CROW
  • Ninix
OnSurfaceRestore

Occurs once after a certain amount of time has passed since the talk.
In SSP, it occurs after the number of seconds set by the talk timeout in the baseware settings, plus 15 seconds (that is, 15 seconds after the balloon closes).
※The balloon remains displayed until OnSurfaceRestore occurs only when the talk timeout setting is 0.

Reference0
Current surface on the main character.
Reference1
Current surface on the partner.
  • Materia
  • SSP
  • CROW
  • Ninix
OnOtherSurfaceChange

Notifies when the surface (expression) of another ghost (not this one) changes.
This event is disabled by default to reduce load. To use it, you must enable it in advance with \![set,othersurfacechange,true].

Reference0
Ghost name
Reference1
Ghost Sakura name
Reference2
Window ID whose surface changed (Sakura=0)
Reference3
New surface ID
Reference4
Old surface ID
Reference5
Size of the new surface (coordinates: left, top, right, bottom)
  • SSP
  • Ninix

Mouse events

OnMouseClick

Occurs when a left, right, or middle button click is released, if OnMouseUp does not respond.

Reference0
The x coordinate of the mouse cursor (local coordinates)
Reference1
The y coordinate of the mouse cursor (local coordinates)
Reference2
Always 0.
Reference3
0 for the main character, 1 for the partner. SSP/CROW may also use 2 or higher.
Reference4
The hit-test identifier.
Reference5
0 for a left click, 1 for a right click, and 2 for a middle click (compatibility behavior; migration to OnMouseClickEx is recommended).
Reference6
For input from a touchscreen in a multitouch-capable environment (not a touchpad), touch; from a pen tablet, pen; from the eraser side of a pen tablet, eraser; and from a mouse or similar device, mouse. (SSP/NINIX only)
  • Materia
  • SSP
  • CROW
  • Ninix
OnMouseClickEx

Occurs when a mouse button other than the left or right button is clicked and released, if OnMouseUpEx does not respond.

Reference0
The x coordinate of the mouse cursor (local coordinates)
Reference1
The y coordinate of the mouse cursor (local coordinates)
Reference2
Always 0.
Reference3
0 for the main character, 1 for the partner. SSP/CROW may also use 2 or higher.
Reference4
The hit-test identifier.
Reference5
middle for a wheel click (or the middle button on a three-button mouse), xbutton1 for extended button 1 (usually assigned to “Back”), and xbutton2 for extended button 2 (usually assigned to “Forward”).
Reference6
For input from a touchscreen in a multitouch-capable environment (not a touchpad), touch; from a pen tablet, pen; from the eraser side of a pen tablet, eraser; and from a mouse or similar device, mouse.
  • SSP
  • Ninix
OnMouseDoubleClick

Occurs when the left or right button is double-clicked.

Reference0
The x coordinate of the mouse cursor (local coordinates)
Reference1
The y coordinate of the mouse cursor (local coordinates)
Reference2
Always 0.
Reference3
0 for the main character, 1 for the partner. SSP/CROW may also use 2 or higher.
Reference4
The hit-test identifier.
Reference5
0 for a left click and 1 for a right click.
Reference6
For input from a touchscreen in a multitouch-capable environment (not a touchpad), touch; from a pen tablet, pen; from the eraser side of a pen tablet, eraser; and from a mouse or similar device, mouse. (SSP/NINIX only)
  • Materia
  • SSP
  • CROW
  • Ninix
OnMouseDoubleClickEx

Occurs when a button other than the left or right button is double-clicked.

Reference0
The x coordinate of the mouse cursor (local coordinates)
Reference1
The y coordinate of the mouse cursor (local coordinates)
Reference2
Always 0.
Reference3
0 for the main character, 1 for the partner. SSP/CROW may also use 2 or higher.
Reference4
The hit-test identifier.
Reference5
middle for a wheel click (or the middle button on a three-button mouse), xbutton1 for extended button 1 (usually assigned to “Back”), and xbutton2 for extended button 2 (usually assigned to “Forward”).
Reference6
For input from a touchscreen in a multitouch-capable environment (not a touchpad), touch; from a pen tablet, pen; from the eraser side of a pen tablet, eraser; and from a mouse or similar device, mouse.
  • SSP
  • Ninix
OnMouseMultipleClick

Occurs when clicked three or more times in succession.
※ If SHIORI does not respond to this event, processing returns to the usual OnMouseClick and OnMouseDoubleClick sequence.

Reference0
Mouse cursor x coordinate (local coordinates)
Reference1
Mouse cursor y coordinate (local coordinates)
Reference2
Always 0.
Reference3
0 for the main character, 1 for the partner, 2 and higher thereafter
Reference4
Hit-test identifier.
Reference5
0 for a left click, 1 for a right click
Reference6
Input from a touchscreen in a multitouch-capable environment (※ not a touchpad) is touch, from a pen tablet is pen, from the eraser side of a pen tablet is eraser, and from a mouse or similar device is mouse
Reference7
Number of consecutive clicks
  • SSP
OnMouseMultipleClickEx

Occurs when a button other than the left or right button is clicked three or more times in succession.
※ If SHIORI does not respond to this event, processing returns to the usual OnMouseClickEx and OnMouseDoubleClickEx sequence.

Reference0
Mouse cursor x coordinate (local coordinates)
Reference1
Mouse cursor y coordinate (local coordinates)
Reference2
Always 0.
Reference3
0 for the main character, 1 for the partner, 2 and higher thereafter
Reference4
Hit-test identifier.
Reference5
A wheel click (or the middle button on a 3-button mouse) is middle, extended button 1 (usually assigned to “Back”) is xbutton1, and extended button 2 (usually assigned to “Forward”) is xbutton2.
Reference6
Input from a touchscreen in a multitouch-capable environment (※ not a touchpad) is touch, from a pen tablet is pen, from the eraser side of a pen tablet is eraser, and from a mouse or similar device is mouse
Reference7
Number of consecutive clicks
  • SSP
OnMouseUp

Occurs when the left or right mouse button is released.

Reference0
Mouse cursor x coordinate (local coordinates)
Reference1
Mouse cursor y coordinate (local coordinates)
Reference2
Always 0.
Reference3
0 for the main character, 1 for the partner. SSP/CROW also support 2 and higher.
Reference4
Hit-test identifier.
Reference5
0 for a left click, 1 for a right click, 2 for a middle click (compatibility behavior: migration to OnMouseClickEx is recommended).
Reference6
Input from a touchscreen in a multitouch-capable environment (※ not a touchpad) is touch, from a pen tablet is pen, from the eraser side of a pen tablet is eraser, and from a mouse or similar device is mouse
  • SSP
  • Ninix
OnMouseUpEx

Occurs when a mouse button other than the left or right button is released.

Reference0
Mouse cursor x coordinate (local coordinates)
Reference1
Mouse cursor y coordinate (local coordinates)
Reference2
Always 0.
Reference3
0 for the main character, 1 for the partner. SSP/CROW also support 2 and higher.
Reference4
Hit-test identifier.
Reference5
A wheel click (or the middle button on a 3-button mouse) is middle, extended button 1 (usually assigned to “Back”) is xbutton1, and extended button 2 (usually assigned to “Forward”) is xbutton2.
Reference6
Input from a touchscreen in a multitouch-capable environment (※ not a touchpad) is touch, from a pen tablet is pen, from the eraser side of a pen tablet is eraser, and from a mouse or similar device is mouse
  • SSP
  • Ninix
OnMouseDown

Occurs when the left or right mouse button is pressed.

Reference0
The x coordinate of the mouse cursor (local coordinates)
Reference1
The y coordinate of the mouse cursor (local coordinates)
Reference2
Always 0.
Reference3
0 for the main character, 1 for the partner. SSP/CROW may also use 2 or higher.
Reference4
The hit-test identifier.
Reference5
0 for a left click, 1 for a right click, and 2 for a middle click (compatibility behavior; migration to OnMouseClickEx is recommended).
Reference6
For input from a touchscreen in a multitouch-capable environment (not a touchpad), touch; from a pen tablet, pen; from the eraser side of a pen tablet, eraser; and from a mouse or similar device, mouse.
  • SSP
  • Ninix
OnMouseDownEx

Occurs when a mouse button other than the left or right button is pressed.

Reference0
The x coordinate of the mouse cursor (local coordinates)
Reference1
The y coordinate of the mouse cursor (local coordinates)
Reference2
Always 0.
Reference3
0 for the main character, 1 for the partner. SSP/CROW may also use 2 or higher.
Reference4
The hit-test identifier.
Reference5
middle for a wheel click (or the middle button on a three-button mouse), xbutton1 for extended button 1 (usually assigned to “Back”), and xbutton2 for extended button 2 (usually assigned to “Forward”).
Reference6
For input from a touchscreen in a multitouch-capable environment (not a touchpad), touch; from a pen tablet, pen; from the eraser side of a pen tablet, eraser; and from a mouse or similar device, mouse.
  • SSP
  • Ninix
OnMouseMove

Occurs when the mouse moves.

Reference0
Mouse cursor x coordinate (local coordinates)
Reference1
Mouse cursor y coordinate (local coordinates)
Reference2
Mouse wheel rotation amount and direction.
Reference3
0 for the main character, 1 for the partner. SSP/CROW also support 2 and higher.
Reference4
Hit-test identifier.
Reference5
※ SSP/NINIX only Always 0.
Reference6
※ SSP only Input from a touchscreen in a multitouch-capable environment (※ not a touchpad) is touch, from a pen tablet is pen, from the eraser side of a pen tablet is eraser, and from a mouse or similar device is mouse
  • Materia
  • SSP
  • CROW
  • Ninix
OnMouseWheel

Occurs when the mouse wheel rotates.
From SSP2.3.53 onward, in a touchscreen environment, OnMouseWheel also occurs as a fallback event if SHIORI returns nothing (204 No Content is returned) for an OnMouseGesture whose Reference5 is up or down. In that case, the value of Reference2 is converted from the movement amount and up/down direction of the original OnMouseGesture (positive for up, negative for down).

Reference0
Mouse cursor x coordinate (local coordinates)
Reference1
Mouse cursor y coordinate (local coordinates)
Reference2
Mouse wheel rotation amount and direction.
Reference3
0 for the main character, 1 for the partner. SSP/CROW also support 2 and higher.
Reference4
Hit-test identifier.
Reference5
※ SSP/NINIX only Always 0.
Reference6
※ SSP/NINIX only Input from a touchscreen in a multitouch-capable environment (※ not a touchpad) is touch, from a pen tablet is pen, from the eraser side of a pen tablet is eraser, and from a mouse or similar device is mouse
  • Materia
  • SSP
  • CROW
  • Ninix
OnMouseEnterAll

Occurs when the mouse enters the character window.

Reference0
The x coordinate of the mouse cursor (local coordinates)
Reference1
The y coordinate of the mouse cursor (local coordinates)
Reference2
Always 0.
Reference3
0 for the main character, 1 for the partner. SSP/CROW may also use 2 or higher.
Reference4
The hit-test identifier.
Reference5
Always 0.
Reference6
For input from a touchscreen in a multitouch-capable environment (not a touchpad), touch; from a pen tablet, pen; from the eraser side of a pen tablet, eraser; and from a mouse or similar device, mouse.
  • SSP
  • Ninix
OnMouseLeaveAll

Occurs when the mouse leaves the character window.

Reference0
Mouse cursor x coordinate (local coordinates)
Reference1
Mouse cursor y coordinate (local coordinates)
Reference2
Always 0.
Reference3
0 for the main character, 1 for the partner. SSP/CROW also support 2 and higher.
Reference4
Hit-test identifier.
Reference5
Always 0.
Reference6
Input from a touchscreen in a multitouch-capable environment (※ not a touchpad) is touch, from a pen tablet is pen, from the eraser side of a pen tablet is eraser, and from a mouse or similar device is mouse
  • SSP
  • Ninix
OnMouseEnter

Occurs when the mouse enters a hit-test area.

Reference0
The x coordinate of the mouse cursor (local coordinates)
Reference1
The y coordinate of the mouse cursor (local coordinates)
Reference2
Always 0.
Reference3
0 for the main character, 1 for the partner. SSP/CROW may also use 2 or higher.
Reference4
The hit-test identifier.
Reference5
Always 0.
Reference6
For input from a touchscreen in a multitouch-capable environment (not a touchpad), touch; from a pen tablet, pen; from the eraser side of a pen tablet, eraser; and from a mouse or similar device, mouse.
  • SSP
  • Ninix
OnMouseLeave

Occurs when the mouse leaves a hit-test area.

Reference0
Mouse cursor x coordinate (local coordinates)
Reference1
Mouse cursor y coordinate (local coordinates)
Reference2
Always 0.
Reference3
0 for the main character, 1 for the partner. SSP/CROW also support 2 and higher.
Reference4
Hit-test identifier.
Reference5
Always 0.
Reference6
Input from a touchscreen in a multitouch-capable environment (※ not a touchpad) is touch, from a pen tablet is pen, from the eraser side of a pen tablet is eraser, and from a mouse or similar device is mouse
  • SSP
  • Ninix
OnMouseDragStart

Occurs when a mouse drag begins. Suppressed in passive mode.

Reference0
The x coordinate of the mouse cursor (local coordinates)
Reference1
The y coordinate of the mouse cursor (local coordinates)
Reference2
The amount and direction of mouse wheel rotation.
Reference3
0 for the main character, 1 for the partner. SSP/CROW may also use 2 or higher.
Reference4
The hit-test identifier.
Reference5
0 for a left click and 1 for a right click.
Reference6
For input from a touchscreen in a multitouch-capable environment (not a touchpad), touch; from a pen tablet, pen; from the eraser side of a pen tablet, eraser; and from a mouse or similar device, mouse.
  • SSP
  • Ninix
OnMouseDragEnd

Occurs when a mouse drag ends. Suppressed in passive mode.

Reference0
The x coordinate of the mouse cursor (local coordinates)
Reference1
The y coordinate of the mouse cursor (local coordinates)
Reference2
The amount and direction of mouse wheel rotation.
Reference3
0 for the main character, 1 for the partner. SSP/CROW may also use 2 or higher.
Reference4
The hit-test identifier.
Reference5
0 for a left click and 1 for a right click.
Reference6
For input from a touchscreen in a multitouch-capable environment (not a touchpad), touch; from a pen tablet, pen; from the eraser side of a pen tablet, eraser; and from a mouse or similar device, mouse.
  • SSP
  • Ninix
OnMouseHover

Occurs while the mouse is stationary.

Reference0
Mouse cursor x coordinate (local coordinates)
Reference1
Mouse cursor y coordinate (local coordinates)
Reference2
Always 0.
Reference3
0 for the main character, 1 for the partner. SSP/CROW also support 2 and higher.
Reference4
Hit-test identifier.
Reference5
Always 0.
Reference6
Input from a touchscreen in a multitouch-capable environment (※ not a touchpad) is touch, from a pen tablet is pen, from the eraser side of a pen tablet is eraser, and from a mouse or similar device is mouse
  • SSP
OnMouseGesture

Occurs when the mouse is right-dragged or the wheel is dragged.
Also, from SSP2.3.53 onward, in a touchscreen environment, if SHIORI returns nothing (204 No Content is returned) for an OnMouseGesture whose Reference5 is up or down, OnMouseWheel occurs as a fallback event. See the OnMouseWheel section for details.

Reference0
0 for the main character, 1 for the partner. SSP/CROW also support 2 and higher.
Reference1
Mouse cursor xy coordinates (separated by byte values)
Reference2
Hit-test identifier.
Reference3
Mouse cursor xy coordinates where the right-drag started (separated by byte values)
Reference4
Hit-test identifier where the right-drag started.
Reference5
Gesture direction.
left_up (upper left) up (up) right_up (upper right)
left (left) right (right)
left_down (lower left) down (down) right_down (lower right)
circle.cw (clockwise) circle.ccw (counterclockwise)
end (right button released)
Reference6
Gesture movement angle.
0 degrees to the right, increasing counterclockwise up to 360 degrees.
  • SSP

Gamepad events

OnGamepadButtonDown

Occurs when a gamepad button is pressed.
Does not occur while the button is held down; it occurs only at the moment of pressing.
If multiple buttons change simultaneously, a separate event occurs for each button.
The event is broadcast to all running ghosts simultaneously.

Reference0
Pad index.
Reference1
Button name.
  • SSP2.7.54
OnGamepadButtonUp

Occurs when a gamepad button is released.
If multiple buttons change simultaneously, a separate event occurs for each button.
The event is broadcast to all running ghosts simultaneously.

Reference0
Pad index.
Reference1
Button name.
  • SSP2.7.54
OnGamepadAxisMove

Occurs when the value of a gamepad analog stick or trigger changes significantly from the value at the previous notification.
The event does not occur for minor fluctuations. Values near the stick center and within the trigger's dead zone are automatically rounded to 0.
The event always occurs when a stick or trigger returns to its center (neutral) position, regardless of the amount of change.
The event is broadcast to all running ghosts simultaneously.
Axis events may occur frequently while a stick is being operated, so consider rate-limiting on the ghost side when performing expensive processing.

Reference0
Pad index.
Reference1
Axis name.
Reference2
Raw value (integer). The range depends on the baseware implementation.
Reference3
Normalized value (decimal). Sticks range from -1.0 to 1.0, and triggers from 0.0 to 1.0. Use this value in most cases.
  • SSP2.7.54
OnGamepadConnected

Occurs when a gamepad is connected. Also occurs if it was already connected when SSP started.
The event is broadcast to all running ghosts simultaneously.

Reference0
Pad index.
  • SSP2.7.54
OnGamepadDisconnected

Occurs when a gamepad is disconnected.
The event is broadcast to all running ghosts simultaneously.

Reference0
Pad index.
  • SSP2.7.54
Button name list
A
Bottom face button
B
Right face button
X
Left face button
Y
Top face button
LB
Left bumper (equivalent to L1)
RB
Right bumper (equivalent to R1)
LSB
Left stick click (equivalent to L3)
RSB
Right stick click (equivalent to R3)
Start
Start button
Back
Back / Select button
DPadUp
D-pad up
DPadDown
D-pad down
DPadLeft
D-pad left
DPadRight
D-pad right

A diagonal D-pad input generates two separate button events (for example, DPadUp and DPadRight for up-right).

Axis name list
LeftStickX
Left stick horizontal (right is positive, left is negative). Normalized range: -1.0 to 1.0.
LeftStickY
Left stick vertical (up is positive, down is negative). Normalized range: -1.0 to 1.0.
RightStickX
Right stick horizontal (right is positive, left is negative). Normalized range: -1.0 to 1.0.
RightStickY
Right stick vertical (up is positive, down is negative). Normalized range: -1.0 to 1.0.
LeftTrigger
Left trigger (value increases as it is pulled). Normalized range: 0.0 to 1.0.
RightTrigger
Right trigger (value increases as it is pulled). Normalized range: 0.0 to 1.0.
About pad indices

Reference0 of every event contains the pad index.
If you only need to support one gamepad, you can ignore Reference0 (it is usually 0).

XInput-specific behavior of SSP on Windows

SSP on Windows uses the XInput API to obtain gamepad input. This imposes the following restrictions.

Supported controllers
XInput-compatible gamepads only (such as Xbox controllers). Controllers that support only DirectInput are not recognized.
Maximum simultaneous connections
4. Pad indices range from 0 to 3.
Range of OnGamepadAxisMove Reference2 (raw value)
Sticks: -32768 to 32767; triggers: 0 to 255.

Balloon events

OnBalloonBreak

Occurs when the balloon is interrupted by something other than SSTP.

Reference0
The script that was interrupted.
Reference1
The scope number of the balloon where the interruption occurred. 0 for the main character, 1 for the partner, and so on.
Reference2
The interruption position, expressed as the number of characters from the start of the script. Sakura Script tags are included in the character count.
Example: If interrupted at the 「あ」 in \s[2]あいうえお, the value is 6
  • SSP
  • Ninix
OnBalloonClose

Occurs when a balloon is closed.

Reference0
The script displayed when it was closed.
  • SSP
  • Ninix
OnBalloonTimeout

Occurs when a balloon times out for a reason other than a choice.

Reference0
The script displayed when it timed out.
Reference1
Time remaining.
  • SSP
  • Ninix

Tray Balloon Events

OnTrayBalloonClick

Occurs when the balloon for the tray icon is dismissed by clicking it.
When displayed as a toast notification instead of a balloon (see \![set,trayballoon]), it occurs when the toast is clicked. It does not occur when clicked after it has moved to the notification center.[2.9.14]

Reference0
Title string.
Reference1
Display text.
  • SSP
OnTrayBalloonTimeout

Occurs when the balloon for the tray icon is dismissed by timing out or clicking the close button.
When displayed as a toast notification instead of a balloon (see \![set,trayballoon]), it occurs when the toast is closed using its close button or when it times out and moves to the notification center.[2.9.14]

Reference0
Title string.
Reference1
Display text.
  • SSP

Install events

OnInstallBegin

Occurs when archive installation begins.

  • Materia
  • SSP
  • CROW
OnInstallComplete

Occurs when installation completes successfully.
This event uses an old specification, so only the first two items installed together in a single installation are reported.
If bundling can result in three or more items being installed at once, use OnInstallCompleteEx.

Reference0
※Identifier of the installed item.
Reference1
Name of the installed item (the name specified in install.txt).
Reference2
Name of the second installed item (for example, the name of the balloon when a ghost is bundled with one).
  • Materia
  • SSP
  • CROW
  • Ninix
OnInstallCompleteEx

Occurs when installation completes successfully.
If this event is unavailable, OnInstallComplete occurs.

Reference0
※Identifier of the installed item. For multiple items, separated by the character with byte value 1.
Reference1
Name of the installed item. For multiple items, separated by the character with byte value 1.
Reference2
Installation location. For multiple items, separated by the character with byte value 1.
  • SSP
  • Ninix
OnInstallCompleteAll

Occurs last, after OnInstallComplete/OnInstallCompleteEx, when all installations complete successfully, such as when multiple nars are dragged and dropped.
SSP versions earlier than 2.9.00 have an implementation omission, so this event does not actually occur.

Reference0
※Identifier of the installed item. For multiple items, separated by the character with byte value 1.
Reference1
Name of the installed item. For multiple items, separated by the character with byte value 1.
Reference2
Installation location. For multiple items, separated by the character with byte value 1.
  • SSP2.9.00
  • Ninix
OnInstallFailure

Occurs when installation fails.

Reference0
※Reason for failure.
  • Materia
  • SSP
  • CROW
  • Ninix
OnInstallRefuse

Occurs when the file being installed specifies another ghost as its intended recipient.

Reference0
Baseware-side name of the specified ghost (the accept setting in install.txt, that is, the intended recipient).
Reference1
※Identifier of the item being installed.
Reference2
Name of the item being installed.
  • Materia
  • SSP; Reference1 and later: 2.4.85
  • CROW
  • Ninix
OnInstallReroute

Occurs when the file being installed specifies another ghost, and the specified ghost is running at the same time. Subsequent install events are sent to the specified ghost.

Reference0
The specified ghost's baseware-side name (the accept entry in install.txt; that is, the intended recipient).
Reference1
The identifier of the installed item.
Reference2
The name of the installed item.
  • SSP2.4
  • Ref1 and later: 2.4.85
Install identifiers
  • shell
  • ghost
  • balloon
  • plugin
  • headline
  • rss
  • supplement

The following apply only to OnInstallComplete / OnNarCreated
These are deprecated in SSP; ghosts and balloons are reported with separate identifiers.

  • ghost with balloon
  • shell with balloon

The following are SSP-specific

  • calendar skin
  • calendar plugin
  • package
  • language

In SSP, identifiers for items installed simultaneously are dot-separated, calendar.skin / calendar.plugin, just as they are specified in install.txt.
The identifier on the archive's baseware side retains the form used for type in install.txt, so it is space-separated: calendar skin / calendar plugin.

Reasons for installation failure
unlha32
Failed to load the DLL for extracting lzh-format files
extraction
Extraction failed (corrupt file)
invalid type
install.txt contains an error
artificial
The user canceled installation (SSP only)
unsupported
Another unsupported archive type
password
The password was incorrect for a password-protected archive (SSP 2.5.09 and later)

File drop events

OnFileDropping

Occurs when the cursor, with a file being dragged, moves over a ghost.

Reference0
Path of the file being dragged.
Reference1
Scope number of the character the file is dropped onto. The main character is 0, the partner is 1, and the third character onward are 2 and higher.
  • SSP
  • CROW
OnFileDropped

[Legacy specification] Occurs when a file is dragged and dropped.

Reference0
Path of the dropped file.
Reference1
Scope number of the character the file was dropped onto. The main character is 0, the partner is 1, and the third character onward are 2 and higher.
Reference2
MIME type of the dropped file (SSP 2.7.98 and later).
  • SSP
  • CROW
OnFileDrop

[Legacy specification] Occurs when a file is dragged and dropped.

Reference0
Path of the dropped file.
Reference1
Scope number of the character the file was dropped onto. The main character is 0, the partner is 1, and the third character onward are 2 and higher.
Reference2
MIME type of the dropped file (SSP 2.7.98 and later).
  • SSP
  • CROW
OnFileDropEx

[Legacy specification] Occurs when a file is dragged and dropped.

Reference0
Path of the dropped file. If multiple files/directories are present, they are separated by byte value 1.
Reference1
Scope number of the character the file was dropped onto. The main character is 0, the partner is 1, and the third character onward are 2 and higher.
Reference2
MIME type of the dropped file (SSP 2.7.98 and later). If multiple files/directories are present, they are separated by byte value 1.
  • SSP
OnFileDrop2

Occurs when a file is dragged and dropped. This is the latest specification at present.
When this event is handled, the baseware's default processing (opening the file in an image viewer, media player, or archive viewer) is not performed. To handle the event and also perform the default processing, use \![execute,dropdefault,file]. [2.9.10]

Reference0
Path of the dropped file. If multiple files/directories are present, they are separated by byte value 1.
Reference1
Scope number of the character the file was dropped onto. The main character is 0, the partner is 1, and the third character onward are 2 and higher.
Reference2
MIME type of the dropped file (SSP 2.7.98 and later). If multiple files/directories are present, they are separated by byte value 1.
  • Materia
  • SSP
  • CROW
  • Ninix
OnMediaPlayerOpen

Occurs when a file is dragged and dropped, the ghost does not respond to OnFileDrop2 (or \![execute,dropdefault,file] is executed [2.9.10]), and the media player opens. References are the same as for OnFileDrop2.

Reference0
Path of the dropped file. If multiple files/directories are present, they are separated by byte value 1.
Reference1
Scope number of the character the file was dropped onto. The main character is 0, the partner is 1, and the third character onward are 2 and higher.
Reference2
MIME type of the dropped file. If multiple files/directories are present, they are separated by byte value 1.
  • SSP2.8.51
OnPictureViewerOpen

Occurs when a file is dragged and dropped, the ghost does not respond to OnFileDrop2 (or executes \![execute,dropdefault,file] [2.9.10]), and an image viewer is opened. References are the same as for OnFileDrop2.

Reference0
Path of the dropped file. If there are multiple files/directories, they are separated by byte value 1.
Reference1
Scope number of the dropped character. The main character is 0, the partner is 1, and the third character onward is 2 or higher.
Reference2
MIME type of the dropped file. If there are multiple files/directories, they are separated by byte value 1.
  • SSP2.8.51
OnArchiveViewerOpen

Occurs when a file is dragged and dropped, the ghost does not respond to OnFileDrop2 (or \![execute,dropdefault,file] is executed [2.9.10]), and the archive viewer opens. References are the same as for OnFileDrop2.

Reference0
Path of the dropped file. If multiple files/directories are present, they are separated by byte value 1.
Reference1
Scope number of the character the file was dropped onto. The main character is 0, the partner is 1, and the third character onward are 2 and higher.
Reference2
MIME type of the dropped file. If multiple files/directories are present, they are separated by byte value 1.
  • SSP2.8.57
OnOtherObjectDropping

Occurs when the cursor is over a ghost with an object that cannot be treated as a "file." Examples: Windows "My Computer" and similar objects.

Reference0
Scope number of the dropped character. The main character is 0, the partner is 1, and the third character onward is 2 or higher.
Reference1
Name of the dropped object (affected by the OS language settings).
If there are multiple objects, they are separated by byte value 1.
Reference2
An ID-like value for the dropped object that is not identified by the OS language settings.
If there are multiple objects, they are separated by byte value 1. The following are examples on Windows.
  • PC (My Computer) = ::{20D04FE0-3AEA-1069-A2D8-08002B30309D}
  • Recycle Bin = ::{645FF040-5081-101B-9F08-00AA002F954E}
  • (My) Network = ::{F02C1A0D-BE21-4350-88B0-7367FC96EF3C}
  • SSP2.6.41
OnOtherObjectDropped

Occurs when an object that cannot be handled as a "file" is dropped onto a ghost. Example: "My Computer" in Windows.
References are exactly the same as for OnOtherObjectDropping.

  • SSP2.6.41
OnDirectoryDrop

Occurs when a directory is dragged and dropped.

Reference0
Path of the dropped directory.
Reference1
Scope number of the character the directory was dropped onto. The main character is 0, the partner is 1, and the third character onward are 2 and higher.
  • SSP
  • CROW
OnWallpaperChange

Occurs when the wallpaper is changed by dragging and dropping an image file.
To be notified when the wallpaper is changed by the OS, use OnDesktopWallpaperChange.

Reference0
Path of the dropped file.
Reference1
SSP only. Scope number of the dropped character (main character 0, partner 1, ...).
  • Materia
  • SSP
  • CROW
OnUpdatedataCreating

Occurs when a ghost folder is dragged and dropped.

  • Materia
  • SSP
  • CROW
OnUpdatedataCreated

Occurs when updates2.dau is created.

  • Materia
  • SSP
  • CROW
OnNarCreating

Occurs when a ghost folder containing install.txt is dragged and dropped.

Reference0
Name of the object to be made into a nar.
Reference1
File name and absolute path of the nar to be created.
Reference2
※Identifier. See the installation identifier.
  • Materia
  • SSP
  • CROW
OnNarCreated

Occurs when a nar file is created.

Reference0
Name of the object to be made into a nar.
Reference1
File name and absolute path of the created nar.
Reference2
※Identifier. See the installation identifier.
  • Materia
  • SSP
  • CROW

URL Drop Events

OnURLDragDropping

Occurs when a URL is about to be dropped and the mouse cursor is over it.
This event occurs for all URLs that can be accepted.

Reference0
Dropped URL.
Reference1
Scope number of the character the URL was dropped on. Main character is 0, partner is 1, and the third character onward are 2 and higher.
  • SSP2.6.37
OnURLDropping

Occurs when a URL has been dropped and the download is about to start.
This event occurs before the download process. It does not occur for other types of installations (homeurl or feed (RSS) installation).

Reference0
Dropped URL.
Reference1
Scope number of the character the URL was dropped on. Main character is 0, partner is 1, and the third character onward are 2 and higher.
  • Materia
  • SSPRef1 is 2.6.36
  • CROW
OnURLDropped

Occurs when receiving a dropped URL has finished.
This event occurs immediately before a NAR installation, just after the download process finishes. It does not occur for other types of installations (homeurl or feed (RSS) installation).

Reference0
Local path of the downloaded file.
Reference1
Dropped URL.
Reference2
Scope number of the character the URL was dropped on. Main character is 0, partner is 1, and the third character onward are 2 and higher.
  • Materia
  • SSPRef1,2 are 2.6.36
  • CROW
OnURLDropFailure

Occurs when receiving a dropped URL fails or is canceled.
This event occurs when an attempt to install a NAR fails. It does not occur for other types of installations (homeurl or feed (RSS) installation).

Reference0
Local path of the files downloaded so far.
Reference1
※Reason for failure
Reference2
Dropped URL.
Reference3
Scope number of the character the URL was dropped on. Main character is 0, partner is 1, and the third character onward are 2 and higher.
  • Materia
  • SSPRef2,3 are 2.6.36
  • CROW
OnURLQuery

Notifies when a URL is dragged and dropped onto a character window.
Returning a script for this event cancels the normal download process.
Return a script only when the ghost wants to handle the URL itself.

Reference0
URL path.
Reference1
0 for the main character, 1 for the partner. SSP/CROW also support 2 and higher.
Reference2
MIME type of the dropped URL
Reference3
The process SSP is scheduled to perform next if no response is given.
One of feed, nar, homeurl, ical, ssf, or unknown.
If unknown, the URL cannot be handled by the baseware, meaning no further processing can be done on the baseware side.
For the other values, pass this together with Reference0 to \![execute,dropdefault,url][2.9.10] or \![execute,install,url] to continue processing.
  • SSPRef3 is 2.6.35
OnXUkagakaLinkOpen

Notifies the specified ghost when a web association in the format below is opened or dropped.
x-ukagaka-link:type=event&ghost=(descript.txt's "name" or "sakura.name")&info=(string passed in Reference0)
Character encoding is fixed to UTF-8, and the string is URL-encoded.
Example: x-ukagaka-link:type=event&ghost=Emily&info=sweet-potato-feeding
SecurityLevel is always external.

Reference0
The string specified after info= (URL-decoded)
  • SSP

Network update events

OnUpdateProcessExec

Occurs when an instruction to run an update is issued from a menu or similar.
Returning a script in response to this event allows the update process to be customized.
If the event is ignored, the standard update process starts automatically.

Reference0
manual: An update was initiated from the menu.
auto: The configured periodic automatic update process ran.
testonly: Update Full Check was run from the development palette.
  • SSP2.6.23
OnUpdateBegin

Occurs when a network update is instructed to begin.

Reference0
Ghost name.
Reference1
Full path.
Reference3
CROW: ghost when updating a ghost, baseware when updating the main program
SSP: ※Update target type
Reference4
SSP 2.3: ※Reason for running the update.
  • Materia
  • SSP
  • CROW
  • Ninix
OnUpdateReady

Occurs when update files are found.

Reference0
Total number of files to be updated minus 1 (sequential number starting from 0).
Reference1
A comma-separated list of updated file names.
Reference3
Update target type.
(shell ghost balloon headline plugin)
Reference4
SSP 2.3: ※Reason for running the update.
  • Materia
  • SSP
  • CROW
  • Ninix
OnUpdateComplete

Occurs when the network update succeeds and completes.

Reference0
※Reason for success
Reference1
A comma-separated list of updated file names.
Reference3
CROW: ghost when updating a ghost, baseware when updating the main program.
SSP: ※Update target type
Reference4
SSP 2.3: ※Reason for running the update.
  • Materia
  • SSP
  • CROW
  • Ninix
OnUpdateFailure

Occurs when the network update fails.

Reference0
※Reason for failure
Reference1
A comma-separated list of updated file names.
※SSP only: Name of the file that failed.
Reference3
CROW: ghost when updating a ghost, baseware when updating the main program.
SSP: ※Update target type
Reference4
SSP 2.3: ※Reason for running the update.
  • Materia
  • SSP
  • CROW
  • Ninix
OnUpdate.OnDownloadBegin

Occurs when a file download begins.

Reference0
Name of the file to download.
Reference1
(except CROW) Index of the update file currently being downloaded (sequential numbering starting at 0).
Reference2
(except CROW) Total number of files to be updated minus 1 (sequential numbering starting at 0).
Reference3
(SSP only) ※Update target type.
Reference4
SSP 2.3: ※Reason for running the update。
  • Materia
  • SSP
  • CROW
  • Ninix
OnUpdate.OnMD5CompareBegin

Occurs when MD5 comparison begins.

Reference0
Name of the file to compare.
Reference1
Correct MD5 value.
Reference2
MD5 value of the downloaded file.
Reference3
SSP ※Update target type
Reference4
SSP 2.3: ※Reason for running the update。
  • Materia
  • SSP
  • CROW
  • Ninix
OnUpdate.OnMD5CompareComplete

Occurs when the MD5 values match.

Reference0
Name of the downloaded file.
Reference1
Correct MD5 value.
Reference2
MD5 value of the downloaded file.
Reference3
SSP ※Update target type
Reference4
SSP 2.3: ※Reason for running the update。
  • Materia
  • SSP
  • CROW
  • Ninix
OnUpdate.OnMD5CompareFailure

Occurs when the MD5 values do not match.

Reference0
Name of the downloaded file.
Reference1
Correct MD5 value.
Reference2
MD5 value of the downloaded file.
Reference3
SSP ※Update target type
Reference4
SSP 2.3: ※Reason for running the update.
  • Materia
  • SSP
  • CROW
  • Ninix
OnUpdateOtherBegin

Occurs when a network update for something other than a ghost is instructed to begin.

Reference0
Ghost name.
Reference1
Full path.
Reference3
※Update target type
Reference4
SSP 2.3: ※Reason for running the update.
  • SSP
OnUpdateOtherReady

Occurs when update files for something other than a ghost are found.

Reference0
Total number of files to be updated minus 1 (sequential number starting from 0).
Reference1
A comma-separated list of updated file names.
Reference3
※Update target type
Reference4
SSP 2.3: ※Reason for running the update.
  • SSP
OnUpdateOtherComplete

Occurs when a network update for something other than a ghost succeeds and completes.

Reference0
※Reason for success
Reference1
A comma-separated list of updated file names.
Reference3
※Update target type
Reference4
SSP 2.3: ※Reason for running the update.
  • SSP
OnUpdateOtherFailure

Occurs when a network update for something other than a ghost fails.

Reference0
※Reason for failure
Reference1
A comma-separated list of updated file names.
Reference3
※Update target type
Reference4
SSP 2.3: ※Reason for running the update.
  • SSP
OnUpdateOther.OnDownloadBegin

Occurs when downloading a file other than a ghost begins.

Reference0
Name of the file to download.
Reference1
Number of the update file currently being downloaded (sequential number starting from 0).
Reference2
Total number of files to be updated minus 1 (sequential number starting from 0).
Reference3
※Update target type
Reference4
SSP 2.3: ※Reason for running the update.
  • SSP
OnUpdateOther.OnMD5CompareBegin

Occurs when MD5 comparison begins for something other than a ghost.

Reference0
Name of the file to compare.
Reference1
Correct MD5 value.
Reference2
MD5 value of the downloaded file.
Reference3
※Update target type
Reference4
SSP 2.3: ※Reason for running the update.
  • SSP
OnUpdateOther.OnMD5CompareComplete

Occurs when the MD5 values match for something other than a ghost.

Reference1
Correct MD5 value.
Reference2
MD5 value of the downloaded file.
Reference3
※Update target type
Reference4
SSP 2.3: ※Reason for running the update.
  • SSP
OnUpdateOther.OnMD5CompareFailure

Occurs when the MD5 values do not match for something other than a ghost.

Reference1
Correct MD5 value.
Reference2
MD5 value of the downloaded file.
Reference3
※Update target type
Reference4
SSP 2.3: ※Reason for running the update.
  • SSP
OnUpdateCheckComplete

Occurs when the network update check succeeds.

Reference0
If there are files to update, the total number of files to be updated (unlike OnUpdateReady, 1 is not subtracted).
If there are no files to update, none.
Reference1
A comma-separated list of updated file names.
Reference3
※Update target type
Reference4
SSP 2.3: Reason for running the update. Script only.
  • SSP
OnUpdateCheckFailure

Occurs when the network update check fails.

Reference0
※Reason for failure
Reference4
SSP 2.3: Reason for running the update. Script only.
  • SSP
OnUpdateResult

Occurs when a network update is run and reports all update results together, including the bulk balloon and shell update feature.

Reference*

The update results are included in the following format, in the order in which the updates were run (\1 is byte value 1)

(※1)[\1](network-update/※2)[\1](network-update/※3)[\1](network-update/※4)
or
(※1)[\1](network-update/※2)[\1](network-update/※3)

  • ※1……Type of network update target
  • ※2……"OK" on success, "NG" on failure
  • ※3……Number of updated files on success (0 if there are no update files=none); reason for failure on failure.
  • ※4……If the update failed and the file that caused the failure is known, its name.
  • SSP
OnUpdateResultEx

Occurs when a network update is run and reports all update results together, including the bulk balloon and shell update feature.

Reference*

The update results are included in the following format, in the order in which the updates were run (\1 is byte value 1)

(※1)[\1](network-update/※2)[\1](network-update/※3)[\1](network-update/※4)[\1](network-update/※5)
or
(※1)[\1](network-update/※2)[\1](network-update/※3)[\1](network-update/※4)

  • ※1……Name of the network update target
  • ※2……Type of network update target
  • ※3……"OK" on success, "NG" on failure
  • ※4……Number of updated files on success (0 if there are no update files=none); reason for failure on failure.
  • ※5……If the update failed and the file that caused the failure is known, its name.
  • SSP
OnUpdateCheckResult

Occurs last when the update-check-only option is enabled. The explorer version of OnUpdateResult.

Reference*
Same as OnUpdateResult
  • SSP
OnUpdateCheckResultEx

Occurs last when the update-check-only option is enabled. The explorer version of OnUpdateResultEx.

Reference*
Same as OnUpdateResultEx
  • SSP
OnUpdateResultExplorer

Occurs when a network update is run from the ghost explorer. The explorer version of OnUpdateResult.

Reference*
Same as OnUpdateResult
  • SSP
Reasons for successful network updates
none
There were no files to update.
changed
The files were updated.
Network update failure reasons
timeout
A timeout occurred.
too slow
Not emitted by SSP, which reports timeout instead. The connection is extremely slow.
md5 miss
The MD5 did not match.
artificial
The update was interrupted by user action.
404 etc.
Failed with that status code.
fileio
※SSP only. Writing to the update target failed because there was insufficient space.
readonly
※SSP only. Writing to the update target failed because of a read-only flag. This occurs when a file or folder has a read-only flag.
virusdetect
※SSP only. A virus may have been detected in the data. [2.5.15]
toomanyredirect
※SSP only. Processing was aborted because there were too many redirects. [2.5.15]
executing
※SSP only. A duplicate launch was prevented because an update was already running. [2.5.26]
parse
※SSP only. The data was downloaded, but parsing it failed. This occurs with rss-get/rss-post and ical-get/ical-post.
downloading
※SSP only. A duplicate download was prevented because a download from the same URL was already in progress. This occurs with execute-http/rss/ical. [2.8.90]
paramerror
※SSP only. The update could not be run because the update execution tag was configured incorrectly. [2.5.26]
Types of network update targets
  • ghost
  • shell
  • balloon
  • plugin
  • headline
  • baseware ※CROW only
Network update reasons
auto
Automatic update triggered by SSP settings or similar.
manual
Manual update, such as one started by selecting an item from the owner draw menu.
script
Update triggered by a Sakura Script tag (such as \![updatebymyself]).
Order of network update events

The order of events during a normal SSP network update (ghost update) is as follows.

  1. OnUpdateProcessExec ※Only when run from a menu or similar. If a script is returned, the standard update process that follows is not performed.

  2. OnUpdateBegin

  3. OnUpdateReady ※Only if there are update files. If there are no update files, the following events are skipped and OnUpdateComplete (Reference0 is none) occurs.

  4. Repeat the following for each update file.

    1. OnUpdate.OnDownloadBegin
    2. OnUpdate.OnMD5CompareBegin
    3. OnUpdate.OnMD5CompareComplete or OnUpdate.OnMD5CompareFailure
      If the MD5 does not match, retry from OnUpdate.OnDownloadBegin for the same file. If the MD5 still does not match after the retry limit is exceeded, OnUpdateFailure (md5 miss) occurs and no subsequent files are processed.
  5. After all files have been downloaded, the update files are replaced and SHIORI, the shell, and other components are reloaded. OnUpdateComplete then occurs. Therefore, OnUpdateComplete is received by the ghost after it has been reloaded.

  • If the update fails partway through (including if it is interrupted), OnUpdateFailure occurs at that point and the process ends. OnUpdateFailure and OnUpdateComplete never both occur for the same update.
  • After OnUpdateReady, after processing each file, and before replacing the files, the next step waits until playback of the scripts for all events that have occurred so far is complete. Therefore, if a script is returned for one of these events, the update does not proceed to the next stage until that script has finished playing.
  • If the fast-forward key (the key specified by the SSP setting 「Enable fast-forward key」; Ctrl by default) is pressed when the script returned for OnUpdateReady finishes playing and file downloads begin, OnUpdate.OnDownloadBegin and OnUpdate.OnMD5Compare* do not occur for any files in that update (the files are still downloaded and their MD5 values are still checked). OnUpdateBegin, OnUpdateReady, OnUpdateComplete, and OnUpdateFailure occur as usual.
  • For automatic updates (where the update reason is auto), OnUpdateBegin occurs when the presence of update files is confirmed, immediately before OnUpdateReady. If there are no update files, or the update fails before the files are checked, none of OnUpdateBegin, OnUpdateComplete, or OnUpdateFailure occur.
  • For update checks only (such as checks from the ghost explorer), OnUpdateBegin, OnUpdateReady, OnUpdate.OnDownloadBegin, OnUpdate.OnMD5Compare*, OnUpdateComplete, and OnUpdateFailure do not occur. Instead, OnUpdateCheckComplete or OnUpdateCheckFailure occurs.
  • For updates to items other than ghosts (such as shells and balloons), the event names above are replaced with OnUpdateOther~ (OnUpdateOtherBegin, OnUpdateOther.OnDownloadBegin, and so on). The order is the same.

When updating the ghost itself, its shell, and its balloon together, the sequence of events described above occurs separately for each, in the order ghost → shell → balloon (→ recommended balloon). After all updates are complete, OnUpdateResultEx occurs once, at the end. OnUpdateResult occurs immediately afterward only if OnUpdateResultEx did not return a script. For update checks only, these are OnUpdateCheckResultEx and OnUpdateCheckResult, respectively.

Time synchronization events

OnSNTPBegin

Occurs when a time synchronization request is initiated.

Reference0
Name of the server to connect to.
  • Materia
  • SSP
  • CROW
OnSNTPCompareEx

Occurs when a connection to the server is established. To apply the correction, return a script containing the \6 tag.

Reference0
Name of the server to connect to.
Reference1
Server's current time, comma-separated: year,month,day,hour,minute,second,millisecond
Reference2
Local current time, comma-separated: year,month,day,hour,minute,second,millisecond
Reference3
Difference between the server and local times. In seconds, with a fractional part. Positive values mean the local clock is behind; negative values mean it is ahead.
Reference4
Difference between the server and local times. Integer in milliseconds.
  • SSP2.5.66
OnSNTPCompare

Occurs when a connection to the server is established. To apply the correction, return a script containing the \6 tag.

Reference0
Name of the server to connect to.
Reference1
Server's current time, comma-separated: year,month,day,hour,minute,second (if the difference is less than 1 second, this is the same as the local time)
Reference2
Local current time, comma-separated: year,month,day,hour,minute,second
Reference3
Difference between the server and local times. Always a positive integer in seconds.
Reference4
SSP only. Difference between the server and local times. Always a positive integer in milliseconds.
  • Materia
  • SSP
  • CROW
OnSNTPCorrectEx

Occurs when the local time is corrected to match the server time using the \6 tag.

Reference0
Name of the server to connect to.
Reference1
Server's current time, comma-separated: year,month,day,hour,minute,second,millisecond
Reference2
Local current time, comma-separated: year,month,day,hour,minute,second,millisecond
Reference3
Difference between the server and local times. In seconds, with a fractional part. Positive values mean the local time is behind the server; negative values mean it is ahead of the server.
Reference4
Difference between the server and local times. Integer in milliseconds. The sign follows the same convention as Reference3.
  • SSP2.5.66
OnSNTPCorrect

Occurs when the local time is corrected to match the server time using the \6 tag.

Reference0
Name of the server to connect to.
Reference1
Server's current time, comma-separated: year,month,day,hour,minute,second (if the difference is less than 1 second, this is the same as the local time)
Reference2
Local current time, comma-separated: year,month,day,hour,minute,second
Reference3
Difference between the server and local times. Integer in seconds. Positive values mean the local clock is behind; negative values mean it is ahead.
Reference4
SSP only. Difference between the server and local times. Integer in milliseconds.
  • Materia
  • SSP
  • CROW
OnSNTPFailure

Occurs when time synchronization fails.

Reference0
Name of the server to connect to.
  • Materia
  • SSP
  • CROW

Mail check events

OnBIFFBegin

Occurs when a mail check is requested.

Reference2
Name of the mail server being checked; in SSP and CROW, this is the account name.
  • Materia
  • SSP
  • CROW
OnBIFFComplete

Occurs when a mail check succeeds.

Reference0
Number of messages in the spool, expressed as a 1-based count.
Reference1
Number of bytes in the spool.
Reference2
Name of the mail server being checked.
Reference3
Difference in new mail.
Reference4
TopResult for all mail. Full list of headers from POP communication. Headers are separated by byte value 1, and messages by byte value 2 (normally, the information in Reference7 should be used).
Reference5
ListResult. IDs on the mail server. Equivalent to the result of the POP command "LIST".
Reference6
UidlResult. IDs used to distinguish messages. Equivalent to the result of the POP command "UIDL".
Reference7
Sender and subject, separated by byte value 1.
  • Materia
  • SSP
  • CROW
OnBIFF2Complete

Occurs when the number of messages in the mail spool increases.
In SSP, this occurs only if no script was returned for OnBIFFComplete.

Reference0
Number of messages in the spool, expressed as a 1-based count.
Reference1
Number of bytes in the spool.
Reference2
Name of the mail server being checked; in SSP and CROW, this is the account name.
Reference3
TopResult for all mail.
  • Materia
  • SSP
OnBIFFFailure

Occurs when a mail check fails.

Reference0
※Reason for failure
Reference2
Name of the mail server being checked; in SSP and CROW, this is the account name.
  • Materia
  • SSP
  • CROW

Headline/RSS sensing events

OnHeadlinesenseBegin

Occurs when headline sensing is requested to start.

Reference0
Name of the site to be sensed for headlines.
Reference1
URL to be sensed for headlines.
  • Materia
  • SSP
OnHeadlinesense.OnFind

Occurs when there is a headline sensor item to read aloud.

Reference0
Name of the site to be sensed for headlines.
Reference1
URL to be sensed for headlines.
Reference2
※OnFind phase
Reference3
Headline content. The content has been sanitized by the baseware.
The baseware may have added Sakura Script for control purposes.
  • Materia
  • SSP
OnHeadlinesenseComplete

Occurs when headline sensing completes successfully.
Currently, successful headline sensing means that reading aloud has started, so this event is sent only when retrieval succeeded but there were no updates.

Reference0
※Reason for ending Currently fixed to "no update".
  • Materia
  • SSP
OnHeadlinesenseFailure

Occurs when headline sensing fails.

Reference0
※Reason for ending
  • Materia
  • SSP
OnRSSBegin

Occurs when RSS sensing is requested to start. If this event is not handled, OnHeadlineSenseBegin is called.

Reference0
Name of the site to be sensed for RSS.
Reference1
URL to be sensed for RSS.
  • SSP
OnRSSComplete

Occurs when headline sensing completes successfully. If this event is not handled, a suitable script is generated for display and a headline completion event is called.

Reference0
When there are no updates: no update ※Reason for completion
When there are no updates, Reference0 contains only the string "no update"
When there are updates: RSS feed site name.
Reference1
Only when there are updates: RSS source URL (points to the feed site, not the feed itself)
Reference2~
Only when there are updates: title [\1] URL [\1] update date and time (comma-separated format: year,month,day,hour,minute,second)[\1] author name [\1] content or summary
When there are updates, Reference0,1,2~ continue for each RSS item
[\1] is the character with byte value 1
  • SSPauthor name and content 2.4.10~
OnRSSFailure

Occurs when RSS sensing fails. If this event is not handled, OnHeadlineSenseFailure is called.

Reference0
※Reason for completion
  • SSP
Headline sensor OnFind phases
First
First page
First and Last
First page with no next page
Last
Last page
Next
Any other page
Headline sensor completion reasons
no update
(Currently only OnHeadlinesenseComplete) No updates were found
can't download
The file could not be retrieved
can't analyze
The file was retrieved, but no valid headlines could be obtained

Calendar Events

OnScheduleTodayNotify

Occurs when the contents of “Today's schedule” in the baseware calendar change. [NOTIFY]
Examples include when the date changes, a schedule is added or deleted, or the results retrieved by the schedule sensor change. It does not occur if nothing changes.
This event is sent to all running ghosts, not to a specific ghost.

Reference0 and subsequent references each contain one item from the updated “Today's schedule.” Each Reference is delimited by byte value 1 (hereafter [\1]).
If there are no remaining schedules, the event occurs with no References.

Reference0~
Event type [\1] Event content (caption) [\1] Additional data (subtitle) [\1] Script (script) [\1] Start date and time [\1] End date and time [\1]
The references continue as Reference0, 1, 2, and so on, for each schedule. Note that a delimiter [\1] is also appended at the end.
The start and end dates and times use the comma-separated format “year,month,day,hour,minute,second.” For schedules without a set time, the hour, minute, and second are empty, as in “2026,9,10,,,.”
The end date and time are included only for schedules with a set end time. Otherwise, they are empty.
caption, subtitle, and script are the exact strings registered in the baseware calendar; no escaping for Sakura Script is performed.
  • SSP2.8.90
OnSchedule5MinutesToGo

Occurs 5 minutes before the time of a schedule registered in the baseware calendar.

Reference0
Event type
Reference1
Event content (caption)
Reference2
Additional data (subtitle)
Reference3
Script (script)
  • SSP
OnScheduleRead

Occurs when the mouse rests over a calendar icon and its schedule is read.

Reference0
Event type.
Reference1
Event content (caption)
Reference2
Additional data (subtitle)
Reference3
Script (script)
  • SSP
OnSchedulesenseBegin

Occurs when a schedule sensor begins connecting.
This event is sent to all running ghosts, not to a specific ghost.

Occurs only during a manual update (when a sensor is selected from the calendar menu to update). As described below, it does not occur during periodic checks.

Reference0
Schedule sensor name
Reference1
Schedule sensor subscription URL
  • SSP
OnSchedulesenseComplete

Occurs when a schedule sensor finishes processing.
This event is sent to all running ghosts, not to a specific ghost.

Occurs only during a manual update. As described below, it does not occur during periodic checks.
This event also occurs on success when data was retrieved but nothing changed (for example, 304 Not Modified or identical content).

Reference0
Schedule sensor name
Reference1
Number of schedule entries returned by the schedule sensor
  • SSP
OnSchedulesenseFailure

Occurs when a schedule sensor fails to process.
This event is sent to all running ghosts, not to a specific ghost.

Unlike Begin/Complete, this event also occurs during periodic checks.

Reference0
Reason for failure (shared with the headline sensor). If data could not be retrieved, the value is can't download; if data was retrieved but could not be parsed as iCal, the value is can't analyze.
Reference1
Schedule sensor name. During periodic checks, Begin does not occur, so without this value it would be impossible to tell which sensor failed.
  • SSP
OnSchedulepostBegin

[Legacy specification] Occurs when a schedule sensor begins connecting in post mode.
This event does not occur in current versions of SSP because the posting feature itself has been deprecated.

Reference0
Schedule sensor name
  • SSP
OnSchedulepostComplete

[Legacy specification] Occurs when a schedule sensor completes posting.
This event does not occur in current versions of SSP because the posting feature itself has been deprecated.

Reference0
Schedule sensor name
  • SSP
Schedule Sensor Update Timing and Events
Manual update
Updating a sensor selected from the calendar menu. Begin and then Complete (or Failure) occur for all sensors.
Periodic check
SSP automatically cycles through all sensors every 30 minutes. Only OnSchedulesenseFailure occurs.
If Begin/Complete events for all sensors were sent periodically, ghosts would talk too much, so only errors are reported.
Schedule Types
default
Unrecognized type
event
General
meeting
Meeting
appointment
Appointment
reservation
Reservation, such as a hospital appointment
duedate
Deadline
party
Party or drinking party
date
Date
work
Work
go
Outing
tv
TV program
recording
Recording reservation
cd
CD release date
game
Game release date
video
Video media release date
book
Book release date
release
Other release date

SSTP Events

OnSSTPBreak

Occurs when SSTP is interrupted.

Reference0
Script in which the interruption occurred.
Reference1
Scope number of the balloon where the interruption occurred. 0 for the main character, 1 for the partner, and higher numbers for others.
Reference2
Position of the interruption. Expressed as the number of characters from the start of the script. Sakura Script tags are included in the character count.
Example: If the script is interrupted at the 「あ」 in \s[2]あいうえお, the value is 6.
  • Materia
  • SSP
OnSSTPBlacklisting

Occurs when an instruction is given to add the last client to the blacklist.

Reference0
IP address of the last client.
  • Materia

Other communication events

OnExecuteHTTPComplete

Occurs when execute-http successfully completes a retrieval.

Reference0
One of post/get/head/put/delete
Reference1
The string specified with the --sync or --async option.
Reference2
The target URL.
Reference3
If the --nofile option is present, the contents of the retrieved data. Newline characters are replaced with byte value 1.
Otherwise, the full path of the retrieved file.
Reference4
Retrieval result code, such as (timeout|fileio|200|204|403|404). See also [failure reasons].
Reference5
Cookie string.
Reference6
All response headers received. They are separated by byte value 1 instead of newlines. [2.6.40]
  • SSP
  • Ninix
OnExecuteHTTPFailure

Occurs when execute-http fails to retrieve data. References are the same as for Complete.

[2.8.90] If a retrieval from the same URL is already in progress, the later request is not executed and this event occurs (Reference4=downloading). Previously, the tag was silently ignored.

  • SSP
  • Ninix
OnExecuteHTTPProgress

Occurs when --progress-notify is specified for execute-http. References are the same as for Complete.

  • SSP[2.6.44]
OnExecuteHTTPStreaming

Occurs when --streaming is specified for execute-http. References are the same as for Complete, except for Reference4.

Reference4
Streaming data, with newlines replaced by byte value 1.
  • SSP[2.8.14]
OnExecuteHTTPSSLInfo

This event is sent even if retrieval fails (the HTTP response is not 200), because the connection succeeded at the SSL/TLS level.

Even if an ID beginning with On is specified with --async or --sync, the event name is not replaced; this event is always sent. Use Reference0 to identify which request it is for.

Reference0
async ID (empty if not specified)
Reference1
Retrieval URL
Reference2
HTTP response code (sent even in case of an error)
Reference3
Communication protocol version. These days, this is usually "TLSv1/SSLv3" (SSP rejects SSLv2 internally, so this is actually the only value you will receive)
Reference4
Encryption method
Example: AES256-SHA
Reference5
Issuer. To check the name, extract the string following /O=
For programmers: contains the result of passing it through OpenSSL's X509_NAME_oneline
Example: /1.3.6.1.4.1.311.60.2.1.3=US/1.3.6.1.4.1.311.60.2.1.2=Delaware/businessCategory=Private Organization/serialNumber=4337446/C=US/postalCode=94107/ST=California/L=San Francisco/street=795 Folsom St, Suite 600/O=Twitter, Inc./OU=Twitter Operations/CN=twitter.com
Reference6
Validity start date and time: year, month, day, hour, minute, second
Example: 2011,7,7,9,0,0
Reference7
Validity end date and time: year, month, day, hour, minute, second
Example: 2012,7,28,8,59,59
Reference8
Issuer. To check the name, extract the string following /O=
For programmers: contains the result of passing it through OpenSSL's X509_NAME_oneline
Example: /C=US/O=VeriSign, Inc./OU=VeriSign Trust Network/OU=Terms of use at https://www.verisign.com/rpa (c)06/CN=VeriSign Class 3 Extended Validation SSL CA
Reference9 (2.4.51~)
Certificate chain CommonNames (CN), listed in order and separated by commas
  • SSP
OnExecuteICalComplete

Occurs when \![execute,ical-get/ical-post] successfully completes retrieval and parsing.

Reference0 contains information about the calendar as a whole; Reference1 onward contain one event each. Values within each Reference are separated by byte value 1 (hereafter [\1]).
The number and order of events depends on the iCal filtering options.

Reference0
Calendar name (X-WR-CALNAME) [\1] time zone (X-WR-TIMEZONE) [\1] calendar scale (CALSCALE; usually GREGORIAN) [\1] number of events returned by this event [\1] total number of events in the file [\1] start date of the filtering period [\1] end date of the filtering period
The start and end dates of the period use the format "year,month,day,,,", and are empty if none of --from, --to, --expand, or --limit was specified.
Reference1~
UID [\1] start date and time [\1] end date and time [\1] title (SUMMARY) [\1] description (DESCRIPTION) [\1] location (LOCATION) [\1] URL [\1] status (STATUS) [\1] categories (CATEGORIES) [\1] recurrence rule (original RRULE text) [\1] all-day flag [\1] occurrence date
References continue as Reference1, 2, 3, etc., for each event.
Start date and time, end date and time, and occurrence date use the same comma-separated format as RSS: "year,month,day,hour,minute,second". For all-day events, hour, minute, and second are empty, as in "2026,9,10,,,".
The end date and time is the final day of the event (since the DTEND date value is exclusive, the returned value is one day earlier). For events that specify a duration with DURATION instead of DTEND, the duration is added to the start date and time (for all-day events, the returned value is likewise one day earlier).
If there are multiple categories, they are comma-separated. Commas in category names are not distinguished from separator commas.
The all-day flag is 1 for all-day events and 0 for events with a time.
The occurrence date is included only when one of --from, --to, or --expand is specified. With --expand, it is the occurrence date for the expanded instance; without --expand, it is the first occurrence date within the period. It is empty if none is specified.
RRULE is passed through unchanged, so you can interpret it yourself without using SSP's expansion.
Titles, descriptions, locations, URLs, categories, and calendar names are escaped so they are not interpreted as Sakura Script (\→\\、%→\%、newlines and tabs→half-width spaces).
  • SSP2.8.90
OnExecuteICalFailure

Occurs when retrieval with \![execute,ical-get/ical-post] fails.

Reference0~
If parsing fails, Reference4=parse. If a retrieval from the same URL was already in progress, Reference4=downloading. Otherwise, the references are the same as for OnExecuteHTTPFailure (note that the order differs from Complete).
  • SSP2.8.90
OnExecuteICalProgress

Occurs when --progress-notify is specified with \![execute,ical-get/ical-post]. Since this notification is sent before parsing, the references are the same as for OnExecuteHTTPComplete.

  • SSP2.8.90
OnExecuteICal_SSLInfo

This event is sent even if retrieval fails (the HTTP response is not 200), because the connection succeeded at the SSL/TLS level.

Even if an ID beginning with On is specified with --async or --sync, the event name is not replaced; this event is always sent.

Reference0~
The same as for OnExecuteHTTPSSLInfo
  • SSP2.8.90
OnExecuteRSSComplete

Occurs when \![execute,rss-get/post] successfully completes retrieval.

[2.8.92] Which items and how many are returned depends on the RSS filtering options.

Reference0~
Title [\1] URL [\1] update date and time (comma-separated format: year,month,day,hour,minute,second) [\1] author name [\1] content or summary
When items are available, References continue as Reference0, 1, 2, etc., one for each RSS item
[\1] is byte value 1
  • SSPauthor name/content 2.4.10~
OnExecuteRSSFailure

Occurs when retrieval with \![execute,rss-get/post] fails.

Reference0~
If parsing fails, Reference4=parse. If a retrieval from the same URL was already in progress, Reference4=downloading [2.8.90]. Otherwise, the references are the same as for OnExecuteHTTPFailure
  • SSP
OnExecuteRSS_SSLInfo

This event is sent even if retrieval fails (the HTTP response is not 200), because the connection succeeded at the SSL/TLS level.

Even if an ID beginning with On is specified with --async or --sync, the event name is not replaced; this event is always sent.

Reference0~
The same as for OnExecuteHTTPSSLInfo
  • SSP
OnExecuteScheduleComplete

Occurs when adding or deleting an entry in the ghost's schedule is complete using \![execute,schedule-add] or \![execute,schedule-delete].

If an ID beginning with On is specified with --event, that ID becomes the event name.

Reference0
Operation type: add or delete
Reference1
UID of the target schedule entry. If the UID is omitted in schedule-add, the UID assigned by SSP is used.
  • SSP2.8.91
OnExecuteScheduleFailure

Occurs when \![execute,schedule-add/schedule-delete] fails.

If an ID beginning with On is specified with --event, the event name is that ID with Failure appended.

Reference0
Operation type: add or delete
Reference1
Reason for the failure
notauthorized : An attempt was made to add or delete an entry using a script sent from outside, such as via SSTP
invalid : --summary or --start is missing, the date/time format is invalid, the UID contains invalid characters, or the UID is missing for schedule-delete
notfound : No schedule entry with the specified UID exists for schedule-delete
save : Saving to a file failed (the addition or deletion itself has been applied)
Reference2
Specified UID (empty if none)
  • SSP2.8.91
OnExecuteScheduleGetComplete

Occurs when the ghost's schedule is read using \![execute,schedule-get].

If an ID beginning with On is specified with --event, that ID becomes the event name.

Reference0~
Same as OnExecuteICalComplete.
Only the ghost's schedule is included; user-added entries and entries from the schedule sensor are not included.
  • SSP2.8.91
OnExecuteFileWatchChange

Occurs when a file or directory monitored by \![execute,filewatch] changes.

If an ID beginning with On is specified with --async, that ID becomes the event name.

Since writes to a file may occur many times in a short period, the event waits for the time specified by --debounce (500 milliseconds if omitted) after changes stop, then fires once for all of them. If writes occur with longer intervals, or if changes continue for three times the specified duration after the first change, a single save may cause the event to fire multiple times.

Reference0
The exact string specified with --async (empty if not specified)
Reference1
The exact string of the specified path
Reference2
Type of change
For a file: modified (updated), created, deleted
For a directory: changed (a file or directory directly inside it was created, deleted, renamed, or updated), deleted (the directory itself no longer exists)
Reference3
Full path of the monitored file or directory
  • SSP2.8.91
OnExecuteFileWatchFailure

Occurs when \![execute,filewatch] fails or monitoring can no longer continue. In this case, monitoring is stopped.

If an ID beginning with On is specified with --async, the event name is that ID followed by Failure.

Reference0
The exact string specified with --async (empty if not specified)
Reference1
The exact string of the specified path
Reference2
Reason for failure
notauthorized: An attempt was made to monitor using a script sent from outside, such as via SSTP
invalid: No path was specified
notfound: The directory to monitor (or, for a file, the directory containing that file) does not exist, monitoring could not be started, or it disappeared while being monitored
limit: The number of types of directories monitored by SSP as a whole exceeds the limit (63)
  • SSP2.8.91
OnExecuteWebSocketOpen

Occurs when the WebSocket connection is established (after a successful HTTP 101 Upgrade). Fires only for the initial connection; on a successful reconnection, OnExecuteWebSocketReconnect fires instead.
If the eventID specified with the --async option begins with "On", the event name is eventID+"Open".

Reference0
Event identifier specified with Sakura Script's --async option.
Reference1
Connection URL (ws:// or wss://).
Reference2
"200" (fixed).
  • SSP2.8.05
OnExecuteWebSocketReceive

Occurs each time a data frame is received from the server while the WebSocket connection is active. Fragmented frames are automatically reassembled before the event fires. Does not fire for Ping/Pong/Close frames.
If the eventID specified with the --async option begins with "On", the event name is the eventID itself.

Reference0
Event identifier specified with Sakura Script's --async option.
Reference1
Connection URL.
Reference2
Opcode type. "1"=text frame (UTF-8), "2"=binary frame.
Reference3
Received data. For a text frame, the UTF-8 string as-is (line breaks are converted to byte value 1); for a binary frame, a Base64-encoded string.
  • SSP2.8.05
OnExecuteWebSocketReconnect

Occurs when automatic reconnection succeeds after an error disconnect. OnExecuteWebSocketOpen does not fire; this event serves the equivalent role of Open. Data received after reconnection is reported as usual through OnExecuteWebSocketReceive.
If the eventID specified with the --async option begins with "On", the event name is eventID+"Reconnect".

Reference0
Event identifier specified with Sakura Script's --async option.
Reference1
Connection URL.
Reference2
"200" (fixed).
  • SSP2.8.05
OnExecuteWebSocketClose

Occurs when the WebSocket connection is finally disconnected. If automatic reconnection is attempted, this event fires afterward. Does not fire on Failure.
If the eventID specified with the --async option begins with "On", the event name is eventID+"Close".

Reference0
Event identifier specified with Sakura Script's --async option.
Reference1
Connection URL.
Reference2
Disconnection cause code. "1000"=normal disconnection (by the server or \![close,websocket]), "userbreak"=forced interruption by \![cancel,websocket] or ghost termination.
  • SSP2.8.05
OnExecuteWebSocketFailure

Occurs when the initial connection fails to complete the HTTP 101 Upgrade, or when an error disconnects an active connection and all five automatic reconnection attempts fail.
If the eventID specified with the --async option begins with "On", the event name is eventID+"Failure".

Reference0
Event identifier specified with Sakura Script's --async option.
Reference1
Connection URL.
Reference2
Error message string. For an initial connection failure, this is the SPHttp error text; if all automatic reconnection attempts fail, it is "reconnect failed" (fixed).
  • SSP2.8.05
OnExecuteWebSocket_SSLInfo

Occurs when an SSL/TLS connection is established for a wss:// connection. Fires only during the initial connection, regardless of whether the Upgrade succeeds. The event name is always fixed and cannot be changed with the --async option.

Reference0
Event identifier specified with Sakura Script's --async option.
Reference1~
Same as Reference1 onward of OnExecuteHTTPSSLInfo.
  • SSP2.8.05
OnPingComplete

Occurs when the specified number of pings have completed with \![execute,ping].

Reference0
Exact string specified with --event
Reference1
Source address [\1] total number of transmissions [\1] number of successes [\1] number of failures [\1] are separated by byte value 1
Reference2
"OK" or error information [\1] responding address [\1] RTT (round-trip time in ms) [\1] are separated by byte value 1
Starting with Reference2, information for each Ping sent is recorded. This is incomplete for Progress.
For error information, see the Status header in the ICMP_ECHO_REPLY Structure.
  • SSP
OnPingProgress

Occurs while a ping is in progress with \![execute,ping].

Reference0
Exact string specified with --event
Reference1
Source address [\1] total number of transmissions [\1] number of successes [\1] number of failures [\1] are separated by byte value 1
Reference2
"OK" or error information [\1] responding address [\1] RTT (round-trip time in ms) [\1] are separated by byte value 1
Starting with Reference2, information for each Ping sent is recorded. This is incomplete for Progress.
For error information, see the Status header in the ICMP_ECHO_REPLY Structure.
  • SSP
OnNSLookupComplete

Occurs on success with \![execute,nslookup].

Reference0
Exact string specified with --event
Reference1
Exact string specified with --host
Reference2
lookup for a forward lookup, reverse for a reverse lookup
Reference3
Result. IP address for a forward lookup, hostname for a reverse lookup.
  • SSP
OnNSLookupFailure

Occurs on failure with \![execute,nslookup].

Reference0
Exact string specified with --event
Reference1
Exact string specified with --host
Reference2
lookup for a forward lookup, reverse for a reverse lookup
  • SSP

Event Send Failure Events

OnRaisePluginFailure

Occurs when \![raiseplugin] fails.

Reference0
If not found, notfound.
If disabled in the settings, disabled.
Otherwise, the execution result, such as 204.
Reference1
Plugin name or ID.
Reference2
Event ID that was to be executed.
Reference3~
References for the event that was to be executed.
  • SSP
OnNotifyPluginFailure

Occurs when \![notifyplugin] fails.

Reference0
If not found, notfound.
If disabled in the settings, disabled.
Otherwise, the execution result, such as 204.
Reference1
Plugin name or ID.
Reference2
Event ID that was to be executed.
Reference3~
References for the event that was to be executed.
  • SSP
OnRaiseOtherFailure

Occurs when \![raiseother] fails.

Reference0
If not found, notfound.
If in \t, timecritical.
If in passive mode, passivemode.
If in induction mode, inductionmode.
If minimized, minimized.
Otherwise, the execution result, such as 204.
For cases such as __SYSTEM_ALL_GHOST__, a list delimited by byte value 1.
Reference1
Ghost name or \0 name.
For cases such as __SYSTEM_ALL_GHOST__, a list delimited by byte value 1.
Reference2
Event ID that was to be executed.
Reference3~
References for the event that was to be executed.
  • SSP
OnNotifyOtherFailure

Occurs when \![notifyother] fails.

Reference0
If not found, notfound.
If in \t, timecritical.
If in passive mode, passivemode.
If in induction mode, inductionmode.
If minimized, minimized.
Otherwise, the execution result, such as 204.
For cases such as __SYSTEM_ALL_GHOST__, a list delimited by byte value 1.
Reference1
Ghost name or \0 name.
For cases such as __SYSTEM_ALL_GHOST__, a list delimited by byte value 1.
Reference2
Event ID that was to be executed.
Reference3~
References for the event that was to be executed.
  • SSP

Offscreen and overlap events

OnOverlap

Occurs when a character's (surface's) window overlaps another window.
Notifications are sent whenever the overlap state changes, so with some effort you can also detect when the windows no longer overlap.

Reference0
ID-ID [\1] ID-ID [\1] ID-ID ...
[\1] is the byte value 1
Example: 0-1 [\1] 0-2 indicates that window 0 overlaps window 1 and window 0 overlaps window 2.
Reference1
In the same format as Reference0, indicates the state before the change (that is, the Reference0 from the previous event).
  • SSP
  • Ninix
OnOtherOverlap

Occurs when the windows of any running characters' (surfaces') overlap, including other characters. The global version of OnOverlap.
Notifications are sent whenever the overlap state changes, so with some effort you can also detect when the windows no longer overlap.
Note that information about your own window is also included.

Reference0
Sakura name/ID-Sakura name/ID [\1] Sakura name/ID-Sakura name/ID [\1] Sakura name/ID-Sakura name/ID ...
[\1] is the byte value 1
Example: Emily/0-Mari/1 [\1] Mari/0-Director-tan/1
Reference1
In the same format as Reference0, indicates the state before the change (that is, the Reference0 from the previous event).
  • SSP
  • Ninix
OnOffscreen

Occurs when a character's (surface's) window gets caught on or moves outside the monitor (work area). Offscreen.
Notifications are sent whenever the offscreen state changes, so with some effort you can also detect when it is no longer offscreen.

Reference0
ID [\1] ID [\1] ID ...
[\1] is the byte value 1
Example: 1 [\1] 2 indicates that windows 1 and 2 are offscreen.
Reference1
In the same format as Reference0, indicates the state before the change (that is, the Reference0 from the previous event).
  • SSP
  • Ninix
OnOtherOffscreen

Occurs when any character's (surface's) window, including other characters, gets caught on or moves outside the monitor (work area). Offscreen. The global version of OnOffscreen.
Notifications are sent whenever the offscreen state changes, so with some effort you can also detect when a window is no longer offscreen.
Note that information about your own window is also included.

Reference0
Sakura name/ID [\1] Sakura name/ID [\1] Sakura name/ID ...
[\1] is the byte value 1
Example: Emily/1 [\1] Director-tan/0
Reference1
In the same format as Reference0, indicates the state before the change (that is, the Reference0 from the previous event).
  • SSP
  • Ninix

OS State Events

OnNetworkHeavy

Occurs when the remote server does not respond within the allotted time.

Reference0
SSP only: Time until timeout (in seconds)
Reference1
SSP only: Elapsed time so far (in seconds) [2.6.42~]
  • Materia
  • SSP
  • CROW
OnNetworkStatusChange

Occurs when the network connection status changes.
Only sent as NOTIFY immediately after startup.

Reference0
online or offline.
Reference1
A comma-separated list of the byte values of the IP addresses assigned to the current machine.
Reference2
Connection type. [SSP 2.4.22]
cellular: Cellular connection or standard PPP (excluding PPPoE, etc.)
ethernet: Ethernet (wired LAN)
none: No connection
wifi: Wireless LAN
wimax: WiMAX
other: Other/unknown
unknown: Detection failed
Reference3
A value indicating the maximum download speed of the connection. The unit is MBps. [SSP 2.4.22]
Reference4
A value indicating the estimated effective download speed of the connection. The unit is MBps. [SSP 2.5.26]
This has the same value as Reference3 in environments where communication statistics cannot be obtained or are inaccurate.
Reference5
Indicates whether the connection is metered. [SSP 2.6.15]
unknown: Not set/unknown
unrestricted: Unlimited data
fixed: Fixed plan with a data cap
variable: Metered
Setting "Metered connection" in Windows 10/11 results in fixed.
  • SSP
OnScreenSaverStart

Occurs when the screen saver starts. [NOTIFY]

Reference0
Screen saver name
Reference1
Path to the screen saver executable
Reference2
Delay before the screen saver starts (seconds)
  • SSP
OnScreenSaverEnd

Occurs when the screen saver ends.

Reference0
Screen saver name
Reference1
Path to the screen saver executable
Reference2
Delay before the screen saver starts (seconds)
  • SSP
OnSessionLock

Occurs when returning to the lock screen while still logged in. On Windows, this also occurs when using Fast User Switching.
This event is not a NOTIFY, but note that the user will not see anything you do while the screen is locked.

  • SSP2.5.50
OnSessionUnlock

Occurs when returning to normal operation from the lock screen. On Windows, this also occurs when using Fast User Switching.

  • SSP2.5.50
OnSessionDisconnect

Occurs when switching to another user account using Fast User Switching.
On Windows, this is sent together with OnSessionLock, and the window is also forcibly minimized, causing OnWindowStateMinimize to occur.
Note that this behavior is a Windows-specific constraint; other operating systems may not behave the same way.

  • SSP2.5.53
OnSessionReconnect

Occurs when returning to the user account in use after switching users with Fast User Switching.
On Windows, this is sent together with OnSessionUnlock, and the forced minimization is also undone, causing OnWindowStateRestore to occur.
Note that this behavior is a Windows-specific constraint; other operating systems may not behave the same way.

  • SSP2.5.53
OnCPULoadHigh

Occurs when CPU load is high. (Currently, it triggers when the load is around 80% for a short while.)

Reference0
Current load percentage
  • SSP2.5.56
OnCPULoadLow

Triggers when CPU load drops from a high level. (Currently, after High triggers, it occurs when the load falls below 60%.)

Reference0
Current load percentage
  • SSP2.5.56
OnMemoryLoadHigh

Occurs when memory usage is high. (Currently, it triggers after usage has stayed at around 80% for a short while.)

Reference0
Current usage %
  • SSP2.5.56
OnMemoryLoadLow

Triggers when memory usage drops back down after being high. (Currently, after High has triggered, this occurs when usage falls below 60%.)

Reference0
Current usage %
  • SSP2.5.56
OnDisplayChange

Occurs when the resolution/color depth of the desktop (primary screen) changes. [NOTIFY at startup / GET at other times]

Reference0
Color depth after the change (bpp)
Reference1
Resolution after the change (width)
Reference2
Resolution after the change (height)
  • SSP
  • CROW
  • Ninix
OnDisplayHandover

Occurs when a window is moved across screens. [NOTIFY/other GET]

Reference0
init (when position initialization is complete) or update (an update after initialization).
init is sent when the window's position is determined after startup; this is not necessarily before OnBoot.
Reference1
0 for the main character, 1 for the companion. SSP/CROW can also have values of 2 or higher.
Reference2
Before moving: left, top, right, bottom, color depth, whether this is the primary monitor (0/1). Empty during init.
Example: 0,0,1600,900,32,1
Reference3
After moving: left, top, right, bottom, color depth, whether this is the primary monitor (0/1)
  • SSP2.4.09
OnDisplayChangeEx

Occurs when the screen resolution/color depth changes. Supports multiple monitors. [NOTIFY at startup / GET at other times]

Reference0
init (startup notification) or update (change after startup)
Reference1~
left, top, right, bottom, bit depth, whether this is the primary monitor (0/1), taskbar position (left,top,right,bottom,unknown), coordinate separating the taskbar from the work area
Example: 0,0,1600,900,32,1,bottom,1560
In window mode, there is only one entry, treating the container's client area as one screen (example: 0,0,1280,720,32,1,unknown,0). It does not occur when the actual monitors change; it occurs when the container is resized or window mode is switched.
  • SSP2.4.09/taskbar is 2.6.35
OnDisplayPowerStatus

Occurs when the monitor is powered ON/OFF. This includes not only when it is simply turned ON/OFF, but also when a laptop lid is closed.

Reference0
1 = ON / 0 = OFF
  • SSP2.4 and later
OnBatteryNotify

Notifies the remaining battery level. Notified with [NOTIFY] only at startup; GET is used at other times.

Reference0
Remaining battery percentage.
Reference1
Remaining time. -1 if unknown.
Reference2
One of offline (battery power), online (external power), or backup (auxiliary power such as a UPS).
Reference3
A comma-separated string indicating the following states. Example: low,charging
high: Battery level is at least 2/3
low: Battery level is at most 1/3 (also triggers OnBatteryLow)
critical: Battery level is at most 5% (also triggers OnBatteryCritical)
charging: Battery is charging (also triggers OnBatteryChargingStart/Stop)
no_battery: Battery has been removed
power_saving: Battery saver is ON (SSP 2.3.94 and later / Windows 10 and later)

On operating systems earlier than Windows 7, the thresholds for high/low may differ.

  • SSP
OnBatteryLow

Occurs when the battery level becomes low (OnBatteryNotify Reference3 is low or lower).
Note that the external application “Kinoko” has an event with the same name.
This event is implemented for compatibility with “Kinoko”.

Reference0~
Same as OnBatteryNotify. If Reference3 becomes low or lower, this event occurs after OnBatteryNotify. If you have implemented appropriate handling for OnBatteryNotify, no handling for this event is needed.
  • SSP
OnBatteryCritical

Occurs when the battery level becomes extremely low (OnBatteryNotify Reference3 is critical or lower).
Note that the external application “Kinoko” has an event with the same name.
This event is implemented for compatibility with “Kinoko”.

Reference0~
Same as OnBatteryNotify. If Reference3 becomes critical, this event occurs after OnBatteryNotify. If you have implemented appropriate handling for OnBatteryNotify, no handling for this event is needed.
  • SSP
OnBatteryChargingStart

Occurs when battery charging starts.
Compatible with the event from “Ukagaka for Android (archive)”.

Reference0~
Same as OnBatteryNotify.
  • SSP
OnBatteryChargingStop

Occurs when battery charging stops. This does not necessarily mean that the battery is fully charged.
Compatible with the event from “Ukagaka for Android (archive)”.

Reference0~
Same as OnBatteryNotify.
  • SSP
OnDeviceArrival

Occurs when a device is detected.

Reference*
Type, name, manufacturer name, and device file name are returned, separated by byte value 1.
  • SSP
OnDeviceRemove

Occurs when a device is removed.

Reference*
Type, name, manufacturer name, and device file name are returned, separated by byte value 1.
  • SSP
OnTabletMode

Occurs when the OS switches to a state optimized for tablet operation.
Sent as NOTIFY (cannot speak) immediately after startup, and as GET (can speak) when the mode changes.

Reference0
0/1: 1 means tablet mode (the OS is optimized for tablet operation); 0 means the mode is off
  • SSP2.5.02
OnDarkTheme

Occurs when the OS switches to the dark theme (a darker display).
Notified with NOTIFY (cannot speak) immediately after startup, and with GET (can speak) when the theme changes.

Reference0
0/1: Application setting; 1 means dark theme, 0 means normal (light) theme
Reference1
0/1: System setting; 1 means dark theme, 0 means normal (light) theme (2.6.29)
  • SSP2.5.02
OnDesktopWallpaperChange

Occurs when the desktop wallpaper is changed on the OS side. [NOTIFY at startup / GET at other times]
Occurs when the user changes the wallpaper in Personalization settings, as well as when it is automatically changed by a slideshow or Windows Spotlight, or when the theme changes.
Slideshow and Spotlight change automatically at intervals as short as one minute, so when either triggers this event, it is notified with NOTIFY (cannot speak) even after startup.
This is a different event from OnWallpaperChange, which occurs when the wallpaper is changed by dragging and dropping an image file. If SSP itself changes the wallpaper (Reference1 is self), both events occur. Take care to avoid duplicate handling if responding to both.
In window mode, the wallpaper for the ghost is the container background. A wallpaper change on the OS side triggers this event only when the container background is “Desktop”; it does not occur for white, gray, black, or an image. Instead, it occurs when the container background changes (via the container menu, \![set,wallpaper], or \![restore,wallpaper]), or when switching window modes changes the background visible to the ghost. It does not occur just by selecting the same background again.
With perghost (one container per ghost), this event occurs only when the background of the container the ghost is on changes.

Reference0
init (startup notification) or update (change after startup)
Reference1
Cause of the change.
user: Changed by the user
slideshow: Automatic slideshow transition
spotlight: Automatic Windows Spotlight update
theme: Change caused by switching themes
self: Changed by SSP itself (image drag and drop or restore from a profile)
unknown: The change is known to have occurred, but its cause cannot be determined
In window mode, changes made through the container menu or by switching window modes are user; changes made with \![set,wallpaper] or \![restore,wallpaper] are self. At startup (init), if the container background is not “Desktop”, the value is unknown.
Reference2
Full path to the current wallpaper image. Empty for a solid-color background or if the path could not be obtained.
Due to Windows behavior, this may be the path to a cache created by the OS (such as TranscodedWallpaper or the Spotlight cache), rather than the original image file selected by the user.
In window mode, if the container background is “Desktop”, this is the OS wallpaper; if it is an image, this is the full path to that image; if it is a color setting such as white, gray, or black, it is empty.
Reference3
Full path to the previous wallpaper image. Empty if Reference0 is init.
Reference4
Display style. One of center / tile / stretch / fit / fill / span.
In window mode, stretch-x / stretch-y are also possible if the container background is an image. For white, gray, or black, the value is center.
Reference5
Desktop background color. The color shown in the margins around the wallpaper. R,G,B values separated by ASCII commas.
In window mode, this is the background color of the container: the image's base color if the background is an image (the specified color, if any; otherwise a color derived from the image), or the corresponding color for white, gray, or black.
Reference6~
Wallpaper information for each monitor follows, with one entry per monitor, in the following format. [\1] is byte value 1.
Monitor number[\1]Full path to wallpaper image[\1]Display style
Monitor numbers correspond to the order of Reference1 and later in OnDisplayChangeEx (Reference1 is monitor number 0).
Since the OS does not store the display style separately for each monitor, the same value is currently used for all monitors (identical to Reference4).
On systems that cannot handle per-monitor wallpapers (Windows 7 and earlier), Reference6 and later are omitted.
In window mode, regardless of the container background type, there is only one entry, treating the container as one screen (monitor number 0).
  • SSP2.8.86
OnWindowModeChange

Occurs when SSP's window mode changes. [NOTIFY at startup/other GET]
Window mode displays ghosts inside a window (container) provided by SSP, rather than on the desktop. The inside of the container serves as the screen for the ghost.
Because the screen size for the ghost changes when the mode changes, OnDisplayChange also occurs after this event.
The current mode can also be retrieved using baseware.windowmode.

Reference0
init (notification at startup) or update (a change after startup)
Reference1
Current mode.
normal: Normal mode (displays ghosts on the desktop)
shared: Window mode; all ghosts share a single container
perghost: Window mode; each ghost has its own container
Reference2
Previous mode. The possible values are the same as for Reference1. Empty if Reference0 is init.
  • SSP2.8.93
OnOSUpdateInfo

Notifies the date and time OS updates were checked and installed, along with update history.
Sent as NOTIFY (cannot speak) immediately after startup, and as GET (can speak) after a short delay when an update is installed.

Reference0
Check date and time: year, month, day, hour, minute, second, comma-separated, local time
Reference1
Installation date and time: year, month, day, hour, minute, second, comma-separated, local time
Reference2~
Update history entries follow in the format below. [\1] is byte value 1.
Status[\1]error code[\1]update time[\1]update content (title)
Status: one of not_started (not started), in_progress (in progress), success (successful), success_with_errors (completed, but with errors), fail (failed), abort (aborted), or unknown (unknown)
Error code: Nonzero if an error occurred during the update; otherwise 0. On Windows, this is 8 hexadecimal digits.
Update time: year, month, day, hour, minute, second, comma-separated, local time
  • SSP2.5.02
OnRecycleBinEmpty

Occurs when the Recycle Bin is emptied using \![execute,emptyrecyclebin].
OnRecycleBinEmptyFromOther is also sent to all running ghosts, not just the ghost that ran the script.

Reference0
Number of files currently in the Recycle Bin (usually 0 immediately after emptying)
Reference1
Size of files currently in the Recycle Bin (usually 0 immediately after emptying), in bytes
Reference2
Change in the number of files currently in the Recycle Bin from the previous value (usually a negative value immediately after emptying)
Reference3
Change in the size of files currently in the Recycle Bin from the previous value (usually a negative value immediately after emptying), in bytes
Reference4
1 if emptied successfully, 0 if an error occurred (also 0 if it was already empty)
Reference5
Name of the main character of the ghost that ran the tag (sakuraname).
  • SSP2.6.04/Ref4 is 2.6.35
OnRecycleBinEmptyFromOther

Sent to ghosts other than the one that requested the Recycle Bin be emptied using \![execute,emptyrecyclebin].
References are the same as for OnRecycleBinEmpty.

  • SSP2.6.35
OnRecycleBinStatusUpdate

Occurs when files are added to the Recycle Bin or when it is emptied in Explorer, and is sent to all running ghosts.
Also sent as [NOTIFY] when a ghost starts.

Reference0
Number of files currently in the Recycle Bin
Reference1
Size of files currently in the Recycle Bin, in bytes
Reference2
Change in the number of files currently in the Recycle Bin from the previous value
Reference3
Change in the size of files currently in the Recycle Bin from the previous value, in bytes
Reference4
Always 1 (dummy value for compatibility with OnRecycleBinEmpty)
Reference5
Always empty (dummy value for compatibility with OnRecycleBinEmpty)
  • SSP2.6.04/Ref4 is 2.6.35

Selection region mode events

OnSelectModeBegin

Occurs when rectangle selection mode is entered after \![enter,selectrect] is executed.

Reference0
0 for the main character, 1 for the partner. SSP/CROW may also use 2 or higher.
Reference1
Selection mode. Currently only "rect".
  • SSP
OnSelectModeCancel

Occurs after \![leave,selectrect] is executed if no selection was made or the selected region was empty.

Reference0
0 for the main character, 1 for the partner. SSP/CROW may also use 2 or higher.
Reference1
Selection mode. Currently only "rect".
  • SSP
OnSelectModeComplete

Occurs when rectangle selection mode is exited after \![leave,selectrect] is executed.

Reference0
0 for the main character, 1 for the partner. SSP/CROW may also use 2 or higher.
Reference1
Selection mode. Currently only "rect".
Reference2
Selection result (rectangle). Coordinates are comma-separated in the order left,top,right,bottom.
  • SSP
OnSelectModeMouseDown

Occurs when a mouse button is pressed while in rectangle selection mode.

Reference0
0 for the main character, 1 for the partner. SSP/CROW may also use 2 or higher.
Reference1
Selection mode. Currently only "rect".
Reference2
Mouse position. X (horizontal) and Y (vertical) coordinates, separated by a comma.
  • SSP
OnSelectModeMouseUp

Occurs when a mouse button is released while in rectangle selection mode.

Reference0
0 for the main character, 1 for the partner. SSP/CROW may also use 2 or higher.
Reference1
Selection mode. Currently only "rect".
Reference2
Mouse position. X (horizontal) and Y (vertical) coordinates, separated by a comma.
  • SSP

Speech recognition and synthesis events

OnSpeechSynthesisStatus

Occurs at startup and when speech synthesis is turned ON/OFF. [NOTIFY/other GET]

Reference0
0/1 (disabled/enabled)
  • SSP2.4.01
OnVoiceRecognitionStatus

Occurs at startup and when voice recognition is turned ON/OFF. [NOTIFY/other GET]

Reference0
0/1 (disabled/enabled)
  • SSP2.4.01
OnVoiceRecognitionWord

Occurs when a word is recognized by voice recognition.

Reference0
0 for the main character, 1 for the partner. SSP/CROW may also use 2 or higher.
Reference1
The recognized word. When the character is addressed by name for the first time, this is the character's name itself; in that case, it is preferable to display a menu.
  • SSP2.4
About speech recognition and synthesis

For speech recognition and synthesis, also refer to the Sakura Script specifications, including the \__v tag.

Other events

OnKeyPress

Occurs when a key is pressed while the baseware is active.

Reference0
The key pressed. (The character printed on the key)
Reference1
The key pressed. (Win32 virtual-key code)
Reference2
SSP only. Key press-and-hold count.
Reference3
SSP only. Character window ID where the key event occurred.
Reference4
SSP only. Modifier keys, listed as comma-separated values. Example: "ctrl,alt"
  • Materia
  • SSP
  • CROW
  • Ninix
OnRecommendsiteChoice

Occurs when a site link is selected from the menu.

Reference0
Name of the selected site.
Reference1
URL of the selected site.
Reference2
SSP only. URL/path of the thumbnail image displayed on hover
Reference3
SSP only. recommend or portal
Reference4
SSP only. 0 or 1 (0=sakura or 1=kero)
Reference5
SSP only. Numbered position in the menu (starting from 0)
  • Materia
  • SSP
  • CROW
  • Ninix
OnTranslate

An event that allows SHIORI to also handle MAKOTO's translation function.
It is issued mainly in response to a script being returned to the baseware when SHIORI handles a GET command's SHIORI Event.
The script returned to the baseware after SHIORI-internal processing of the SHIORI Event that triggered OnTranslate is sent back to SHIORI after the baseware expands environment variables and performs other processing. SHIORI can then process this script again and return it to the baseware as the final script.
OnTranslate itself does not occur again.

Reference0
Original script.
Reference1
※SSP only. For communicate, communicate.
For SSTP SEND, sstp-send.
For Owned SSTP, owned.
For non-local SSTP, remote.
If translation is disabled, notranslate.
For a script from a plugin, plugin-script
For an event response from a plugin, plugin-event
Applicable values are returned as a comma-separated list. ※If none apply, the entry is omitted.
Reference2
※SSP only. Event ID that caused this script. Omitted if the script was not caused by an event.
Reference3
※SSP only. The Reference of the event above, separated by byte value 1. Omitted if the script was not caused by an event.
  • Materia
  • SSP
  • CROW
  • Ninix
OnAITalk

Occurs when random talk is requested, such as by executing the \a tag.

  • SSP
OnOtherGhostTalk

Occurs when another ghost speaks. Enable it with \![set,otherghosttalk,true].

Reference0
Ghost name.
Reference1
Name of the ghost on the baseware side.
Reference2
If the talk was interrupted, break.
For a communicate event, communicate.
For SSTP SEND, sstp-send.
For Owned SSTP, owned.
For non-local SSTP, remote.
If translation is disabled, notranslate
For a script from a plugin, plugin-script
For an event response from a plugin, plugin-event
Applicable values are returned as comma-separated values.
Reference3
Event ID for the other ghost's speech.
Reference4
Script containing what the other ghost said.
Reference5
References passed to the other ghost, separated by byte value 1.
  • SSP
  • Ninix
OnEmbryoExist

Occurs when SSP starts and materia.exe was already running.

  • SSP
OnNekodorifExist

Occurs when SSP starts and Nekodorif was already running.

  • SSP
OnSoundStop

Occurs when a sound ends.

Reference0
Playback file name.
Reference1
Reason for ending: end = playback ended; close = playback window closed [SSP 2.6.65]
  • SSP
OnSoundLoop

Occurs when sound is playing in a loop and reaches the end, just before starting the next loop.

Reference0
Name of the file being played.
  • SSP2.7.93
OnSoundSpectrum

Occurs at regular intervals during playback of a sound specified with --spectrum=. Notifies the spectrum of the sound being played (the overall volume level for each channel, the volume levels of each frequency band from bass to treble, and the peak-hold values for each). Used for displays such as spectrum analyzers.
The analysis uses the waveform being played, after --volume= has been applied (so the values match the audible volume). Lowering the volume lowers the values, and setting it to 0 makes all levels 0. --balance= is not applied. [2.9.29] In 2.9.28 and earlier, the waveform was analyzed before --volume was applied, so lowering the volume did not lower the values.
[2.9.29] If an equalizer is specified with --eq=, the waveform is analyzed after the equalizer has been applied (raising or lowering a band changes that band's value accordingly). The same applies to --eq-preamp=.
Does not occur while paused. When playback is stopped or ends, or when notifications are stopped with --spectrum=0, one notification with all levels set to 0 is generated (when stopped or ended, OnSoundStop occurs afterward).
[2.9.33] For sounds specified with --spectrum-skipbusy=true, notifications do not occur while a ghost script is playing or waiting to play (they are skipped. The notification with all levels set to 0 described above is not skipped).
Does not occur for sounds whose waveform cannot be retrieved during playback, such as MIDI, CD tracks, and xWMA wav files (playback itself proceeds normally). However, when --spectrum-bands=0 is set, notifications occur even if the waveform cannot be retrieved (Reference2 and Reference3 are 0).
For ADPCM (MS-ADPCM and IMA-ADPCM) wav files, a separate waveform is expanded for analysis when notifications begin. Notifications do not occur for long files whose expanded size exceeds 64MB (about 6 minutes or longer for 44.1kHz stereo), except when --spectrum-bands=0.
[2.9.19] Specifying --spectrum-bands=0 skips analysis by frequency band and notifies only the overall volume level and playback position (Reference6). This can be used as an elapsed-time notification with volume levels.

Reference0
Playback file name.
Reference1
Number of bands. The number specified with --spectrum-bands= (one of 0, 5, 10, 15, or 31; the default is 10). 0 means no bands, and Reference4 and Reference5 are empty. The frequency range of each band is determined by the fixed table for each number of bands, and is the same regardless of file format.
Reference2
[2.9.20] Overall volume level (0–100), listed for each channel and separated by byte value 1 (\1). There is one value for mono and two for stereo (left and right); sounds with more channels have one value per channel, in channel order (up to 8 values; channels 9 and above are not included). The number of values is the number of channels in the sound. Channel order follows the standard WAVE format order (front left, front right, center, low frequency, back left, back right, side left, side right).
Therefore, for sounds with two or more channels, the first two values (the first and second) correspond to the left and right volume levels, so even with 5.1ch they can be handled almost like stereo by using just those values (mono has only one value, which is the shared volume level for left and right).
Example: When Reference2 is split on \1, it contains two values for stereo, [left, right] (e.g. [60, 55]), and six for 5.1ch, [front left, front right, center, low frequency, back left, back right] (e.g. [60, 55, 70, 30, 20, 25]). In both cases, the first two values are left and right.
When notifying without being able to retrieve the waveform (when --spectrum-bands=0), the result is the number of channels if known, or one 0 if unknown.
Through 2.9.19, this was a single value combining all channels.
Reference3
[2.9.20] Peak-hold values (0–100) for the overall volume levels in Reference2. Has the same order and number of values as Reference2. The hold time is specified with --spectrum-hold= (the default is 500 milliseconds).
Reference4
Volume levels (0–100) for each band. Listed from the bass band to the treble band, separated by byte value 1 (\1). The number of values is the same as Reference1 (empty if 0). Bands are measured from the sound averaged across all channels (band levels for individual channels are not notified).
Reference5
Peak-hold values (0–100) for each band. Has the same order and number of values as Reference4. The hold time is the same as Reference3.
Reference6
[2.9.19] Playback position (milliseconds). This is the position in the media at the time the volume level was measured, using the same scale as --seektime=. For video, this is the video playback position; during looped playback, it returns to 0 on each repeat (OnSoundLoop).
For the notification with all levels set to 0 when playback starts or stops, this is the position from the last notification.
  • SSP2.9.18
OnSoundError

Occurs when sound processing fails.

Reference0
Playback command that caused the error. Currently always play.
Reference1
Internal error code (numeric) from the sound playback engine.
Reference2
Name of the file being played.
Reference3
Error message output by the sound playback engine.
  • SSP
OnMusicPlayEx

Notifies the ghost of information about the song playing in a supported music player, such as the standard Windows media player app.
If this event is not handled, it falls back to OnMusicPlay.
Note that all video and music playback in browsers is treated as OnVideoPlayEx.

Reference0
Song title
Reference1
Artist name
Reference2 and later
Extension information name[byte value 1]extension information contents OnMusicPlayEx extension information list
  • SSP2.7.55
OnVideoPlayEx

Notifies the ghost of information about a video playing in a supported music playback application, such as the standard Windows media player app.

Reference0~
Same as OnMusicPlayEx
  • SSP2.7.59
OnMusicPlay

Notifies the ghost of information about the song playing in a supported music player, such as the standard Windows media player app.

Reference0
Song title
Reference1
Artist name
  • SSP2.7.55
OnMusicPlayEx extended information list
album
Album name iSing4U/SSP2.5.75
albumartist
Album artist name SSP2.5.75
subtitle
Subtitle SSP2.5.75
source
Playback application information SSP2.5.75
duration
Track length (seconds) iSing4U/SSP2.5.75
genre
Genre iSing4U/SSP2.5.75
artwork
Album artwork image file path SSP 2.5.75
rating
Rating (my rating) iSing4U
playcount
Play count iSing4U
composer
Composer name iSing4U
uniqueid
Track unique ID iSing4U
playlist
Playlist information iSing4U
OnTextDrop

Occurs when text data is dragged and dropped.

Reference0
Text content. (Line breaks are byte value 1.)
Reference1
ID of the character the data was dropped on.
  • SSP
OnShellScaling

Occurs when the shell scale changes.

Reference0
Scale after the horizontal change. (percent)
Reference1
Scale before the horizontal change. (percent)
Reference2
Scale after the vertical change. (percent)
Reference3
Scale before the vertical change. (percent)
  • SSP
OnBalloonScaling

Occurs when the balloon scale changes.

Reference0
Scale after the horizontal change (percent).
Reference1
Scale before the horizontal change (percent).
Reference2
Scale after the vertical change (percent).
Reference3
Scale before the vertical change (percent).
  • SSP2.5
OnLanguageChange

Notified when the language setting changes and immediately after startup.
When notified immediately after startup, this is always a NOTIFY, and the ghost cannot speak in response to the event.

Reference0
Language name (name)
Reference1
Language ID (langid)
Reference2
Full path to the folder containing the language setting files
Reference3
URL where help is provided
  • SSP2.5
OnResetWindowPos

Notified when the menu item to reset the shell position is selected.
If this event is not handled, the default shell position reset operation ( \![execute,resetwindowpos] ) is performed.

  • SSP2.7 RC1
OnExtractArchiveComplete

Occurs when an archive has been successfully extracted.

If the identifier specified with the --event option in \![execute,extractarchive] starts with On, an event with that identifier is raised. Otherwise, this event is raised.

Reference0
The event identifier specified with Sakura Script's --event option.
Reference1
Number of extracted files.
Reference2
Compressed size (bytes).
Reference3
Uncompressed size (bytes).
  • SSP2.7.23
OnExtractArchiveFailure

Occurs when an archive extraction fails.

If the identifier specified with the --event option in \![execute,extractarchive] starts with On, an event with "Failure" appended to that identifier is raised. Otherwise, this event is raised.

Reference0
The event identifier specified with Sakura Script's --event option.
Reference1
Error details. See ※Error code list.
  • SSP2.7.23
OnCompressArchiveComplete

Occurs when archive compression completes successfully.

With \![execute,compressarchive], if the identifier specified with the --event option begins with On, an event with that identifier is fired. Otherwise, this event is fired.

Reference0
Event identifier specified with Sakura Script's --event option.
Reference1
Number of files compressed.
Reference2
Compressed size (bytes).
Reference3
Uncompressed size (bytes).
  • SSP2.7.23
OnCompressArchiveFailure

Occurs when archive compression fails.

If the identifier specified with the --event option in \![execute,compressarchive] starts with On, an event with "Failure" appended to that identifier occurs. Otherwise, this event occurs.

Reference0
Event identifier specified by Sakura Script's --event option.
Reference1
Error details. See ※Error code list.
  • SSP2.7.23
OnInternalSaoriComplete

Sent when a call to a built-in module using SAORI over DirectSSTP with --async=identifier succeeds. If the identifier starts with On, an event with the same name as the identifier is sent instead of this event.
For details, see Asynchronous calls.

Reference0
The identifier specified with --async=.
Reference1
Result. (Result from a synchronous call)
Reference2
Module name. (e.g., internal_crypto)
Reference3
Function name. (e.g., Digest)
Reference4 and later
Values returned by a function that returns multiple values. (Value0 and later from a synchronous call)
  • SSP2.9.13
OnInternalSaoriFailure

Sent when a call to a built-in module using SAORI over DirectSSTP with --async=identifier fails. If the identifier starts with On, an event named "identifier + Failure" is sent instead of this event.
For details, see Asynchronous calls.

Reference0
The identifier specified with --async=.
Reference1
Reason for failure. (Same as ErrorDescription from a synchronous call, e.g., invalid encoding)
Reference2
Module name.
Reference3
Function name.
  • SSP2.9.13
property.get

Occurs when retrieving an extended property using activeghostlist(ghost name/path/ID).ext.
Returns the retrieved property value.

Reference0
Extended property name.
  • SSP2.7.85
property.set

Occurs when setting an extended property using activeghostlist(ghost name/path/ID).ext.
Returns 204 on success, or an appropriate status code on failure.

Reference0
Extended property name.
Reference1
Value to set.
  • SSP2.7.85
Archive operation error codes
none
No error (success)
invalid parameter
Invalid parameter
file not found
File not found
directory not found
Directory not found
create directory failed
Failed to create directory
open failed
Failed to open file
getfileinfo failed
Failed to retrieve file information
goto failed
Failed to move to file position
corrupted
Archive is corrupted
crc
CRC error (data integrity error)
stream
Stream error
unknown method
Unknown compression method
password required
Password required
password mismatch
Password mismatch
close failed
Failed to close file

Notify events

basewareversion

Notifies baseware information. [NOTIFY]

Reference0
Version number.
Reference1
Baseware identifier.
Reference2
SSP only: detailed version number information.
  • SSP
  • CROW
  • Ninix
hwnd

Notifies hwnd. [NOTIFY]

Reference0
Ghost hwnd. Each scope is separated by byte value 1.
Reference1
Balloon hwnd. Each scope is separated by byte value 1.
  • Materia
  • SSP
uniqueid

Notifies the unique ID. [NOTIFY]

Reference0
The ghost's unique ID. Used when sending special SSTP messages.
  • Materia
  • SSP
capability

Notifies the SHIORI extension implementation status. [NOTIFY]

Reference*

One Reference is sent for each implementation level listed below.
Note that the header name is sent in lowercase. Example: SecurityLevel→securitylevel
See also the SHIORI/3.0 specification.

  • request.(lowercase header name): SHIORI request support status. Example: request.status
  • response.(lowercase header name): SHIORI response support status. Example: response.marker
  • SSP
ownerghostname

Notifies the current ghost name. [NOTIFY]

Reference0
Current ghost name.
  • Materia
  • SSP
  • CROW
otherghostname

Notifies the baseware-side names of other running ghosts. [NOTIFY]

Reference*
The baseware-side name of each other running ghost, its baseware-side surface number, and its partner's surface number, separated by byte value 1.
  • Materia
  • SSP
  • CROW
installedsakuraname

Notifies the sakura.name of installed ghosts. [NOTIFY]
Always notified before installedghostname.
The Reference numbers for installedsakuraname, installedkeroname, and installedghostname, which refer to the same ghost, are guaranteed to match.

Reference*
sakura.name of an installed ghost.
  • SSP2.6.47
installedkeroname

Notifies the kero.name of installed ghosts. [NOTIFY]
Always notified before installedghostname.
The Reference numbers for installedsakuraname, installedkeroname, and installedghostname, which refer to the same ghost, are guaranteed to match.

Reference*
kero.name of an installed ghost.
  • SSP2.6.47
installedghostname

Notifies the installed ghosts. [NOTIFY]

Reference*
Installed ghost name.
  • Materia
  • SSP
  • CROW
  • Ninix
installedshellname

Notifies the installed shells. [NOTIFY]

Reference*
Installed shell name.
  • SSP
  • CROW
  • Ninix
installedballoonname

Notifies the installed balloons. [NOTIFY]

Reference*
Installed balloon name.
  • SSP
  • CROW
  • Ninix
installedheadlinename

Notifies the installed RSS/headlines. [NOTIFY]

Reference*
Installed RSS/headline name.
  • SSP
installedcalendarskinname

Notifies the installed calendar skins. [NOTIFY]

Can be used with \![change,calendarskin,calendar skin name].

Reference*
Installed calendar skin name.
  • SSP2.8.93
installedcalendarpluginname

Notifies the installed calendar plugins (schedule sensors). [NOTIFY]

Can be used with \![execute,calendarplugin,calendar plugin name].

Reference*
Installed calendar plugin name.
  • SSP2.8.93
installedplugin

Notifies the installed plugins. [NOTIFY]

Reference*
Installed plugin name and plugin ID, separated by byte value 1
  • SSP
configuredbiffname

Notifies the list of configured mail-checking accounts. Can be used with \![biff,account name]. [NOTIFY]

Reference*
Mail account name
  • SSP2.5
ghostpathlist

Notifies the path to the ghost storage folder (the ghost setting under SSP's main settings -> Folders). [NOTIFY]

Reference*
Absolute path to the ghost storage folder
  • SSP
balloonpathlist

Notifies the path to the balloon storage folder (the balloon setting under SSP's main settings -> Folders). [NOTIFY]

Reference*
Absolute path to the balloon storage folder
  • SSP
headlinepathlist

Notifies the path to the headline storage folder (the headline setting under SSP's main settings -> Folders). [NOTIFY]

Reference*
Absolute path to the headline storage folder
  • SSP
pluginpathlist

Notifies the path to the plugin storage folder (the plugin setting under SSP's main settings -> Folders). [NOTIFY]

Reference*
Absolute path to the plugin storage folder
  • SSP
calendarskinpathlist

Notifies the path to the calendar skin storage folder. [NOTIFY]

Reference*
Absolute path to the calendar skin storage folder
  • SSP
calendarpluginpathlist

Notifies the path to the calendar schedule sensor storage folder. [NOTIFY]

Reference*
Absolute path to the calendar schedule sensor storage folder
  • SSP
rateofusegraph

Notifies the usage graph information. [NOTIFY]

Reference*
The following information, separated by byte value 1.
  • 1st: Ghost name.
  • 2nd: sakura name.
  • 3rd: kero name.
  • 4th: Number of launches.
  • 5th: Launch time (minutes).
  • 6th: Launch time ratio (%).
  • 7th: Status.
    boot (running)
    install (installed)
    vanish (uninstalled ghost information remains)
    One of these.
  • 8th: Number of launches (weekly report, total for the 7 days up to and including today) [SSP 2.8.54 and later]
  • 9th: Launch time (weekly report, minutes)
  • 10th: Launch time ratio (weekly report, %)
  • 11th: Number of launches (monthly report, total for the 30 days up to and including today)
  • 12th: Launch time (monthly report, minutes)
  • 13th: Launch time ratio (monthly report, %)
  • SSP
enable_log

ON/OFF for “Enable SHIORI internal logging” in the development palette. [NOTIFY]
See also SHIORI Resource : log_path.

Reference0
1 if ON, 0 if OFF
  • SSP
enable_debug

ON/OFF status of “Enable SHIORI debug mode” in the developer palette. [NOTIFY]

Reference0
1 if ON, 0 if OFF
  • SSP
OnNotifySelfInfo

Notifies information about the ghost itself. [NOTIFY]

Reference0
Ghost name.
Reference1
Name of the main character.
Reference2
Name of the partner character.
Reference3
Name of the currently used shell.
Reference4
Absolute path to the currently used shell.
Reference5
Name of the currently used balloon.
Reference6
Absolute path to the currently used balloon.
  • SSP
  • CROW
OnNotifyBalloonInfo

Notifies the information for the currently used balloon. [NOTIFY]

Reference0
Name of the selected balloon
Reference1
Full path of the selected balloon
Reference2
List of surface numbers [character ID + colon + comma-separated values + space] Example: 0:0,1,2,3 1:0,1
  • SSP
OnNotifyShellInfo

Notifies information about the currently used shell. [NOTIFY]

Reference0
Name of the selected shell
Reference1
Full path of the selected shell
Reference2
List of surface numbers [comma-separated] Example: 0,1,2,3,4,5,6,7,8,10,11
  • SSP
OnNotifyDressupInfo

Notifies dressup information.
Sent as [NOTIFY] only at startup; for user actions such as switching from the menu, it is sent as [GET].
See also OnDressupChanged, which occurs before this event.

Reference*
The following information, separated by byte value 1: [character ID, category name, part name, options, enabled 1/disabled 0, thumbnail path]
Multiple options may be included, separated by commas.
Repeated for each dressup definition.
The ghost can determine what changed by processing the differences in enabled/disabled status since the previous notification.
  • SSP
OnNotifyUserInfo

Notifies user input information. Notified at startup and when the information is updated. [NOTIFY]

Reference0
Name to use when addressing the user.
Reference1
Full name.
Reference2
Birthday (comma-separated, such as 2003,5,5).
Reference3
Gender. One of male (man), female (woman), or undef (undefined).
  • SSP
OnNotifyHolidayInfo

Notifies today's holiday name. Sent at startup, immediately after OnNotifyUserInfo. [NOTIFY]
Sent only if today's holiday name can be found in the holiday table in an SSP language folder (holidays.txt, or holidays-XX.txt if a country-specific table exists for the regional settings). Not sent on non-holidays or when the holiday table does not list a name for the holiday.
“Today” is affected by SSP's 「virtual time adjustment」 (time machine).

Reference0
Holiday name (such as New Year's Day or Christmas Day. Substitute holidays are named, for example, “Substitute Holiday” or “Christmas Day (substitute day)”).
Reference1
Date (comma-separated, such as 2026,01,01).
Reference2
Country code of the loaded holiday table (ISO 3166; GB for holidays-GB.txt). Empty for the default country-neutral table (holidays.txt).
  • SSP2.9.11
OnNotifyOSInfo

Notifies OS information. [NOTIFY]

Reference0
OS system, version, and display name [comma-separated]
Reference1
CPU type, clock speed in MHz, and additional information [comma-separated]
Reference2
Physical and virtual memory (KB) [comma-separated]
Reference3
Minutes since system startup.
  • SSP
OnNotifyFontInfo

Notifies the fonts installed on the system. [NOTIFY]

Reference*
Font name.
  • SSP
OnNotifyInternationalInfo

Notifies internationalization-related information such as the time zone and locale (language) name. [NOTIFY]

Reference0
Time offset from UTC, in minutes. Negative values = ahead; positive values = behind
For example, Japan Standard Time is 9 hours ahead, so the value is -540.
Reference1
Whether daylight saving time is enabled. Enabled=1 Disabled=0
Reference2
Two-letter country code compliant with ISO3166.
Reference3
Two-letter language name compliant with ISO639.
  • SSP