UKADOC Project

Sakura Script Escaping

Sakura Script Lifespan

Scope Commands

\0 or \h

Switch to the baseware-side scope.

  • Materia
  • SSP
  • CROW
  • Ninix
\1 or \u

Switch to the other character's scope.

  • Materia
  • SSP
  • CROW
  • Ninix
\pID番号

Display the scope with the specified ID number.
In this form, only 0–9 can be used.

  • SSP
  • CROW
  • Ninix

Example

\0本体側が喋る。\1相方側が喋る。\p23人めが喋る。\p34人めが喋る。デフォルトのスコープは本体側になっている。
\p[ID番号]

Display the scope with the specified ID number.

  • SSP
  • CROW
  • Ninix

Example

\0本体側が喋る。\1相方側が喋る。\p[2]3人めが喋る。\p[3]4人めが喋る。デフォルトのスコープは本体側になっている。

Surface Commands

\sID番号

Changes the surface of the current scope to the surface with the specified ID number.
In this form, only 0–9 can be used.

  • Materia
  • SSP
  • CROW

Example

\s1本体側にサーフェス1番を表示。
\s[ID番号]

Change the surface of the current scope to the surface with the specified ID number.
\s[-1] specifies a hidden surface.
A string defined by surface.alias or name in surfaces.txt can be used instead of an ID.

  • Materia
  • SSP
  • CROW
  • Ninix

Example

\s[100]本体側にサーフェス100番を表示。
\i[ID番号]

Display the surface animation with the specified ID for the current scope.
A string defined by animation*.name in surfaces.txt can be used instead of the ID.

  • Materia
  • SSP
  • CROW
  • Ninix

Example

\s[0]本体側にサーフェス0番を表示。\i[1]サーフェス0番に設定された、アニメーション1番を表示。
\i[ID,wait]

Display the surface animation with the specified ID, waiting for it to finish.
A string defined by animation*.name in surfaces.txt can be used instead of the ID.

  • SSP

Example

\1\s[10]相方側にサーフェス10番を表示。\i[2,wait]この文章はサーフェス10番内のアニメーション2番を表示し終わってから表示。
\![anim,clear,ID]

Stop playback of the surface animation with the specified ID.

  • SSP

Example

\s[0]\i[100]長いアニメーションを再生中。\![anim,clear,100]ここで、まだ再生中でも強制終了させる。
\![anim,pause,ID]

Pause the surface animation with the specified ID.

This remains in effect until the surface changes (\s[ID] is executed).

  • SSP

Example

\s[0]\i[200]長いアニメーションを再生中。\![anim,pouse,200]ここで、一時停止。
\![anim,resume,ID]

Resume the animation paused above.

  • SSP

Example

\s[0]\i[200]長いアニメーションを再生中。\![anim,pouse,200]ここで、一時停止。\![anim,resume,200]ここで、再び再生開始。
\![anim,offset,ID,x座標,y座標]

Offset the position of the surface animation with the specified ID by the specified coordinates.
Dressup items can also be offset.

This remains in effect until the surface changes (\s[ID] is executed).

  • SSP

Example

\s[0]\i[300]長いアニメーションを再生中。\![anim,offset,300,40,50]ここで、アニメーションを右に40pixel下に50pixelずらす。
\![anim,add,overlay,ID]

Overlay the surface with the specified ID on the current surface.

\![anim,add,overlay,ID]
Overlay the surface with the specified ID on the current surface.
\![anim,add,overlayfast,ID]
Overlay the surface with the specified ID on the current surface using overlayfast.
\![anim,add,base,ID]
Change the current base surface to the surface with the specified ID.
\![anim,add,move,x,y]
Move the current surface to the XY coordinates and display it.
\![anim,add,overlay,ID,x,y]
Move the surface with the specified ID to the XY coordinates and overlay it on the current surface.
\![anim,add,overlay,ID,x,y,表示時間,ID,x,y,表示時間,ID,x,y,表示時間...]
Animate the overlaid surface. (Time is in ms)
\![anim,add,overlay,ID,x,y,表示時間,ID,x,y,表示時間,ID,x,y,表示時間,アニメーションタイミング]
Specify runonce or always for the animation timing.
  • CROW
\![anim,stop,ID]

Stop playback of the surface animation with the specified ID (same as clear).

  • CROW
  • SSP
\![anim,add,text,x,y,横幅,縦幅,文字列,表示時間,r,g,b,文字サイズ,文字名]

Display text on the surface.
The string is required.

  • CROW
\__w[animation,ID]

Wait until the animation with the specified ID finishes.

  • SSP

Example

\1\s[10]相方側をサーフェス10番に変更。\i[400]アニメーション400番とこの文章を同時に表示開始。\__w[animation,400]この文章はアニメーション400番の表示が終わるまで待ってから表示。
\![bind,カテゴリ名,パーツ名,数値]

Dress or undress dressup parts.
The numeric value is 1 to dress and 0 to undress.
If the part name is empty, the operation applies to the entire category.
If the numeric value is empty or omitted, it toggles ON/OFF as when using the menu.
After the script runs, the SHIORI event OnDressupChanged is notified, followed by the SHIORI event OnNotifyDressupInfo.

  • SSP
  • Ninix

Example

\![bind,head,ribbon,1]本体側の着せ替えとして設定された、headカテゴリのribbonを装着。\1\![bind,arm,,0]相方側の着せ替えとして設定された、armカテゴリのパーツを全て解除。
\![bind-noevent,カテゴリ名,パーツ名,数値]

Like \![bind], this operates dressup parts, but does not trigger an event.

  • SSP2.8.23
\![lock,repaint]

Stop repainting until \![unlock,repaint] is called.
This stop is automatically cleared at the end of the script.
However, specifying \![lock,repaint,manual] keeps repainting stopped until explicitly unlocked [2.5.16]

  • Materia
  • SSP
  • Ninix

Example

\s[0]\i[500]サーフェス0番のアニメーション500番を再生開始。\![lock,repaint]ここで、アニメーションの描画を停止。
\![unlock,repaint]

Unlock the above.

  • Materia
  • SSP
  • Ninix

Example

\s[0]\i[500]サーフェス0番のアニメーション500番を再生開始。\![lock,repaint]ここで、アニメーションの描画を停止。\![unlock,repaint]ここで、停止中の描画を再開。アニメーションの再生自体は実行されているので、停止中に描画された分は表示されない。
\![set,alignmentondesktop,bottomまたはtop]

Attaches the current scope's surface to the edge of the desktop in the specified direction. bottom attaches it to the bottom of the desktop, and top to the top.

Takes effect until the ghost ends.

※For SSP, also see alignmenttodesktop.

  • Materia
  • SSP
  • CROW

Example

\![set,alignmentondesktop,bottom]本体側がデスクトップ下部(タスクバーの上)にくっつく。
\![set,alignmenttodesktop,free]

Allow the surface to move freely.

Effective until the ghost ends.

  • SSP
  • CROW
  • Ninix

Example

\![set,alignmenttodesktop,free]本体側がマウスドラッグで位置を自由に移動出来るようになる。
\![set,alignmenttodesktop,方向]

Snap the current scope's surface to the specified side of the desktop. The direction can be specified using one of the following options.

top
Snap to the top.
bottom
Snap to the bottom.
left
Snap to the left.
right
Snap to the right.
free
Do not snap.
osuwari,オプション,…
[SSP 2.9.33] Follow another window (the foreground window or a specified window) or the screen rectangle (sit down). Options take the form --name=value; available options are --target=--origin=--target-origin=--x=--y=--interval=--xmove--ymove--noclip--area=--side=--margin=--zorder=. All options are optional. See about \![set,alignmenttodesktop,osuwari].
default
Restore the ghost's default setting.

When snapped to the top or bottom, dragging in the vertical direction is disabled.
When snapped to the left or right, dragging in the horizontal direction is disabled.

Effective until the ghost ends.

※The above also works when written as alignmentondesktop.

  • SSP
  • Ninix

Example

\1\![set,alignmenttodesktop,top]相方側がデスクトップ上部にくっつく。\![set,alignmenttodesktop,default]相方側の吸着が標準設定に戻る。
\0\![set,alignmenttodesktop,osuwari,--target=active,--target-origin=center.top,--xmove,--area=workarea,--side=bottom]前面のウインドウの上端の中央に腰かける(横にだけ動かせる)。座れないときは、ワークエリアの下端に座る。\![set,alignmenttodesktop,default]

About \![set,alignmenttodesktop,osuwari]

\![set,alignmenttodesktop,osuwari,オプション,…] [SSP 2.9.33]

Makes the ghost's window "sit on", "stick to", or "hang from" the corners or edges of other windows. SSP incorporates the same behavior as ukiya's SAORI, "Osuwari.dll", and the options correspond to it. There is no need to write seriko.alignmenttodesktop,free in the shell's descript.txt (specifying osuwari is itself an alignment setting).

Concept

At regular intervals, osuwari repeatedly answers the following question.

Where on the screen should the upper-left corner of the ghost's window be placed?

The answer depends on which point of the ghost's window is aligned with which point of which window, and how many pixels it is offset. The elements involved are as follows.

Ghost's window
A window for each character (\0, \1, etc.). Its size is the same as the currently displayed surface image, including transparent areas. Its position is expressed by the coordinates of its upper-left corner. When the surface changes and its size changes, the positions of its right edge, bottom edge, and center also change.
Target
The window on which the ghost sits. It is measured by its visible frame, excluding invisible borders such as shadows.
Reference rectangle
The rectangle on which the ghost sits instead of the target when it cannot sit on the target or would extend off-screen. It is either the whole monitor containing the target or its work area, as determined by --area= and --side=.
Origin
The pair of points specifying which point of the ghost's window is aligned with which point of the target rectangle. --origin= selects the point on the ghost's window, and --target-origin= selects the point on the target rectangle.
Offset
The displacement from the aligned position, specified by --x= and --y= (positive values move right and down).

The position is calculated for each of the X and Y axes using the following formula.

ゴーストのウインドウの左上 = 対象の矩形の点 − ゴーストのウインドウの点 + ずれ

--origin= determines the point on the ghost's window, and --target-origin= determines the point on the target rectangle. The rectangle used is the target's rectangle when sitting on the target, or the reference rectangle when the ghost cannot sit on it.

The options correspond to these decisions as follows.

Decision Option
Which window to sit on --target=
Which point of the ghost's window to align --origin=
Which point of the target rectangle to align with --target-origin=
How far to offset from that position --x= --y=
Where to sit when the ghost cannot sit on the target or would extend off-screen --area= --side= --margin= --noclip
Range of movement by dragging --xmove --ymove
Whether to appear in front of or behind the target --zorder=
How often to follow the target --interval=

How the position is determined

At each --interval=, the position is determined in the following order. However, it is not recalculated if the target, target rectangle, ghost window rectangle, surface base position, and sitting position have all remained unchanged since the previous check.

  1. Find the target (--target=).
    • active: The foreground window. If the foreground window is one that the ghost cannot sit on (see below), use the last window it could sit on. If there has been no such window, there is no target.
    • @文字列: A window whose title contains the string and on which the ghost can sit. If there are multiple such windows, use the one nearest the front in Z-order.
    • #数値: The window whose window handle is the number specified in decimal. If the ghost cannot sit on it, there is no target.
    • fix: There is always no target.
  2. Determine the rectangle to sit on. If there is a target and the ghost can sit on it, use the target rectangle. If there is no target, use the reference rectangle (--area= and --side=).
  3. Align the two points selected by --origin= (the point on the ghost's window) and --target-origin= (the point on the other rectangle) to find the upper-left corner of the ghost's window. Add --x= and --y= to that position.
  4. For each direction specified by --xmove or --ymove, if the ghost's window has been moved from its previous placement, such as by dragging, constrain that position inside the other rectangle and remember it as a proportion of the movable range. If a proportion has been remembered, use the position at that proportion within the other rectangle instead of the position calculated in step 3 (Range of movement by dragging).
  5. Check whether the ghost's window extends off-screen (the clipping check). If it does, replace the rectangle used in step 2 with the reference rectangle and repeat steps 3–4 once. Do not check again after the retry. No check is performed for --target=fix, --noclip, or when there is no target.
  6. Move the ghost's window to the calculated position and adjust its Z-order (--zorder=).

The same selections for the two points in step 3 and the same offsets are used when retrying in step 5. Only the rectangle being sat on changes.

Options

Options have the form --名前=値, and all are optional. Omitted options use their defaults, not the values specified in the previous call. Unrecognized options are ignored.

Option Default Description
--target= active The target to follow. active: foreground window / fix: fixed to the screen (work area) / @文字列: a window whose title contains the string (case-insensitive) / #数値: the window whose handle is the number
--origin= osuwari Which point of the ghost's window to align with the target (the origin). Write it in the form 左右.上下 (see "Writing the origin" below). Corners can also be written as two letters, such as tl, tr, bl, or br
--target-origin= Omitted (automatic) [SSP 2.9.34] Which point of the target rectangle to align with the point of the ghost's window. The format is the same as --origin=, but base and osuwari cannot be used (see "Point on the target rectangle" below). If omitted, the point is on the same side as the --origin= point (left is the left edge, right is the right edge, and center, base, and osuwari are the center)
--x= --y= 0 Offset from the origin in pixels. In directions specified by --xmove or --ymove, this is the default until the window is moved
--interval= 100 Interval for checking the position in milliseconds. Values less than 10 are treated as 10
--xmove --ymove None Allow dragging in that direction, within the target rectangle. The moved position is remembered as a proportion of the movable range (see "Range of movement by dragging" below). In directions not specified, the window returns to its sitting position even if dragged. These can also be written as, for example, --xmove=false
--noclip None Disable the clipping check
--area= workarea Reference area used when the ghost cannot sit on the target or would be clipped. desktop: entire screen / workarea: work area (the area excluding the taskbar, etc.)
--side= center Where to place the "virtual window" relative to the reference area when the ghost cannot sit on the target or would be clipped. center: the reference area itself / top left right bottom: place a virtual window 100 pixels thick on the top, left, right, or bottom side of the reference area
--margin= 0_0_0_0 Allowance for the clipping check in pixels. Specify in 左_上_右_下 order, separated by spaces or _. With 0_50_0_100, for example, the window is not considered clipped until it extends more than 50 pixels above or 100 pixels below the screen
--zorder= front Z-order relative to the target window. front: display immediately above (in front of) the target / back: display immediately behind (directly below) the target. Does nothing while not sitting on a target (when the ghost cannot sit on it or with --target=fix)
  • The defaults for --origin= and --area= in the tag and descript.txt are osuwari and workarea. The built-in SAORI osuwari (compatible with Osuwari.dll) retains tl and desktop to match the original. [SSP 2.9.34] In 2.9.33, the defaults for the tag and descript.txt were also tl and desktop.
  • When the ghost cannot sit on the target (--target=fix, no target window, or a foreground window that cannot be sat on with no previously usable window), or when it would be clipped (extend off-screen if placed there), it sits on the reference rectangle determined by --area and --side as a "virtual target". No clipping check is performed with --target=fix.
  • Window rectangles are measured by their visible frames, excluding the invisible borders in Windows 10 and later. The reference screen is the monitor containing the target window, or the monitor containing the ghost if there is no target; while dragging, it is the monitor containing the cursor. Clipping is checked against the combined area of all monitors.
  • The ghost cannot sit on minimized or hidden windows, windows on another virtual desktop, owned windows such as dialogs, or SSP's own windows (with --target=active). With --target=active, it also cannot sit on shell windows that are clearly unsuitable, such as the desktop, Alt+Tab and Task View, UWP windows displayed by the shell for Start, Search, IME panels, and similar functions, or full-screen Windows 8 Metro windows. When such a window is in the foreground, the ghost continues to sit on the last usable window. Windows explicitly specified with @文字列 or #数値 are not subject to these exclusions.
  • While sitting, the ghost is displayed above the target window. osuwari makes the ghost topmost (always in front of other windows) only when the target is a topmost window, such as the taskbar; otherwise, the ghost is not topmost. However, a ghost configured to "always show in front" remains topmost regardless of the target. Even when the target is topmost, the ghost is displayed above it (whenever the target comes to the front, the ghost is also restored above it).
  • With --zorder=back, the ghost is displayed immediately behind the target window (directly below it in Z-order). This can be used, for example, to make the ghost peek out from behind the target. Even if another application's window comes between them, the ghost returns immediately behind the target at the next position check (at the --interval= interval). If the target is a topmost window, such as the taskbar, the ghost also becomes topmost and is placed directly below the target among the topmost windows. If a ghost configured to "always show in front" sits behind a window that is not topmost, that setting takes priority and the ghost remains topmost (the back setting has no effect).
  • To sit directly above the taskbar without following a window, use --target=fix to fix the ghost to the screen and use the bottom edge of the work area (for example, --target=fix,--origin=bl,--area=workarea,--side=center; use --origin=br for the right edge). Because the work area excludes the taskbar and similar elements, the ghost sits directly above the taskbar only when it is at the bottom of the screen. When the taskbar is at the top, left, or right of the screen, the ghost sits at the bottom of the screen (the bottom edge of the work area). When the taskbar is set to auto-hide, the work area covers the entire screen, so the ghost sits at the bottom of the screen.
  • osuwari stops when another alignment (top bottom left right free) is specified, the shell is changed, and so on. default restores the ghost's default setting (descript.txt; see below). osuwari stops in window mode and resumes when normal mode is restored.
  • The position while sitting is not saved as the standing position.
  • Among windows linked by sticky window, specifying osuwari has no effect on the non-parent side (the linked child), because it follows the parent. When the parent sits, the child moves with it.
  • \0 and \1 can each be specified separately. However, the Z-order of ghost windows is shared by the ghost as a whole, so when multiple characters sit, it is determined by the target of the character with the lower number.

Specifying the origin [SSP 2.9.34]

--origin= aligns a point on the ghost's window with a point on the target rectangle. The format is 左右.上下, where the part before . is the X axis and the part after it is the Y axis. Each part can use the following words (case-insensitive).

Word Point on the ghost's window Point on the target rectangle (when --target-origin= is omitted)
left (for X) / top (for Y) Left edge / top edge Left edge / top edge
right (for X) / bottom (for Y) Right edge / bottom edge Right edge / bottom edge
center Center Center
base Base position of the surface (point.basepos.x and point.basepos.y; defaults to the center at the feet) Center
osuwari Sitting position of the surface (point.osuwaripos.x and point.osuwaripos.y; defaults to the same as base) Center
  • When base or osuwari is written alone without ., it applies to both the X and Y axes (--origin=osuwari means osuwari.osuwari). Any other word written alone specifies only the X axis, and the Y axis becomes top.
  • tl is equivalent to left.top, tr to right.top, bl to left.bottom, and br to right.bottom.
  • Unrecognized formats are ignored (the origin remains unchanged).
  • The target rectangle has no base or osuwari, so its center is used when --target-origin= is omitted. For example, with the default --origin=osuwari, the ghost's sitting position is aligned with the center of the target rectangle. Adjust the sitting position with --x= and --y=, or change the target point with --target-origin=.
  • Example: --origin=center.bottom aligns the ghost's center (X) and bottom edge (Y) with the target's center (X) and bottom edge (Y). --origin=right.osuwari aligns the ghost's right edge (X) and point.osuwaripos.y (Y) with the target's right edge (X) and center (Y).

Point on the target rectangle [SSP 2.9.34]

--target-origin= determines the point on the target rectangle with which the point on the ghost's window is aligned. The format is the same as --origin= (左右.上下, tl tr bl br, or one word), but only left right top bottom center can be used. The target rectangle has no base or osuwari, so specifying either is treated as an unrecognized format and ignored.

  • If omitted, the point is on the same side as the --origin= point. left and top mean the left and top edges, right and bottom mean the right and bottom edges, and center, base, and osuwari mean the center (the right column of the table above).
  • If only one word is specified, it specifies the X axis, and the Y axis becomes top. --target-origin=center means center.top (the center of the target's top edge).
  • Unrecognized formats are ignored (the point on the target rectangle remains unchanged).
  • When the sitting target is the reference rectangle (when sitting is not possible), the point is on the reference rectangle (including a virtual window).
  • Example: --origin=osuwari --target-origin=center.top aligns the surface's sitting position with the center of the target's top edge. --origin=center.bottom --target-origin=center.top aligns the ghost's center (X) and bottom edge (Y) with the target's center (X) and top edge (Y). The ghost's feet rest on the target's top edge regardless of the ghost's height.
  • The built-in SAORI osuwari (compatible with Osuwari.dll) has no equivalent argument. As before, it aligns a corner of the ghost with the same corner of the target.

Surface sitting position [SSP 2.9.34]

The sitting position can be specified with point.osuwaripos.x and point.osuwaripos.y in a surface brace in the shell's surfaces.txt (point.osuwaripos.x and point.osuwaripos.y). This is the point used by osuwari in --origin=; if omitted, it is the same as point.basepos.x and point.basepos.y (or their defaults if they are not specified).

For example, to place the sitting position at the waist of a surface with a width of 200 and a height of 300, write the following.

surface0
{
point.osuwaripos.x,100
point.osuwaripos.y,250
}

This position is measured in pixels from the top-left corner of the surface and scales with the surface. It is a separate point from the base position at the feet (point.basepos, or the center of the bottom edge (100,300) if omitted): --origin=base uses the base position, while --origin=osuwari uses the sitting position.

Alignment example

The following example shows the surface above sitting on a window with its top-left corner at (400,400) and bottom-right corner at (1000,900). --origin=osuwari --target-origin=center.top aligns the ghost's sitting position with the center of the target's top edge.

Relative positions of the ghost's window and the target when sitting with --origin=osuwari --target-origin=center.top

The sitting position (100,250) is aligned with the center of the target's top edge (700,400), so the ghost's top-left corner is at (700−100,400−250)=(600,150). The base position at the feet (by default, the center of the bottom edge) is at (700,450), 50 pixels below the sitting position and inside the window's top edge. The ghost is displayed in front of the target, so it appears to be sitting on the window's edge.

  • If point.osuwaripos is specified for each surface, the ghost adjusts its sitting position when the surface changes so that the sitting position remains on the edge.
  • If --target-origin= is omitted, the sitting position is aligned with the center of the target. To make the ghost sit on the edge, specify the target point, for example with --target-origin=center.top.
  • Instead of using the sitting position, you can align the ghost by a corner or edge. --origin=center.bottom --target-origin=center.top aligns the center of the ghost's bottom edge with the center of the target's top edge (so its feet rest on it).
  • If --target-origin= is omitted, the target point is always on the same side as the ghost's point, so the bottom edge cannot be aligned with the top edge. In that case, align the top edges and apply an offset, as in --origin=tr --y=-300. This offset is based on the ghost's height, so the feet will shift if the height changes.

When sitting on the target is not possible or would go off-screen

When the ghost cannot sit on the target or would go off-screen by sitting on it, it sits on a reference rectangle instead. The reference rectangle is constructed in the following order.

  1. Use --area= to select either the entire monitor containing the target (desktop) or its work area (workarea). If there is no target, use the monitor containing the ghost's window (or the monitor containing the cursor while dragging).
  2. Use --side= to select either the rectangle from step 1 as is (center) or a virtual window placed outside it (top left right bottom). The virtual window is as long as the reference edge and 100 pixels thick.

Virtual windows created by --side= and their positions relative to the reference rectangle

When bottom is selected, the top edge of the virtual window overlaps the bottom edge of the reference rectangle. Combined with --origin=osuwari --target-origin=center.top, this places the sitting position at the center of the reference rectangle's bottom edge (on the top edge of the taskbar for the work area). With --origin=center.bottom --target-origin=center.top, the ghost's bottom edge rests there, placing its feet at the reference rectangle's bottom edge.

When sitting on the reference rectangle, --origin=, --target-origin=, --x=, and --y= are used in the same way as when sitting on a target.

Note

If --origin=osuwari --target-origin=center.top is used with --side=center (the default), falling back to the reference rectangle places the ghost at the center of its top edge (the top edge of the entire work area). The sitting position (100,250) overlaps (960,0), so the ghost's top-left corner is at (860,-250), leaving most of it off-screen. No clipping check is performed after falling back to the reference rectangle, so the ghost is not pulled back. To make it sit at the bottom edge of the screen, combine this with --side=bottom.

The clipping check determines whether the entire ghost window, including transparent areas, fits within the rectangle enclosing all monitors.

  • --margin= specifies how much to expand that rectangle outward. With --margin=0_0_100_0, the ghost is not considered clipped until it extends more than 100 pixels to the right. Use this when transparent surface padding alone would otherwise be considered clipped outside the screen.
  • --noclip disables the clipping check entirely. Depending on the target's position, the ghost may remain off-screen.
  • No clipping check is performed with --target=fix or when there is no target (the ghost is already sitting on the reference rectangle).

Drag movement range

By default, dragging the ghost's window does not move it from its sitting position. --xmove permits horizontal dragging, and --ymove permits vertical dragging. Movement in an unspecified direction returns to the sitting position.

Movement is limited to the inside of the rectangle the ghost sits on.

  • --xmove: The ghost window's left edge must be at or to the right of the rectangle's left edge, and its right edge must be at or to the left of the rectangle's right edge.
  • --ymove: The ghost window's top edge must be at or below the rectangle's top edge, and its bottom edge must be at or above the rectangle's bottom edge.

The rectangle the ghost sits on is the target when sitting on the target, or the reference rectangle, including any virtual window, otherwise (with --target=fix or after falling back to the reference rectangle). For example, --target=fix --origin=bl --xmove makes the ghost stand on the bottom edge of the work area and allows only horizontal movement.

The moved position is remembered separately for each direction as a ratio within the movement range. A ratio of 0 places the ghost window's left edge (top edge) at the rectangle's left edge (top edge); a ratio of 1 places its right edge (bottom edge) at the rectangle's right edge (bottom edge).

  • Until moved, the ghost sits at the position determined by --origin=, --target-origin=, --x=, and --y=. These define the default sitting position.
  • Once moved, the ratio takes precedence in that direction, and --origin= and similar options are not used. The ghost sits at the same relative position even if the rectangle or the ghost window changes size. The same applies when the target or surface changes.
  • The ratio is updated only when the ghost window is moved from its last placed position, such as by dragging or \![move]. It is not updated merely because the target moves or changes size.
  • Directions in which movement is not permitted are still determined by the origin, target point, and offsets.
  • Specifying osuwari again clears the remembered ratios and restores the defaults.
  • Because movement is limited to the inside of the rectangle, once moved, the ghost cannot return to a position offset outside it, such as sitting on the target's top edge. To restore that position, specify osuwari again.
  • When the ghost window is larger than the rectangle (the movement range is zero or less), no ratio can be determined. Moving it does not store a ratio; if a ratio is already stored, the ghost sits aligned with the rectangle's left edge (top edge). If it has not yet been moved, it remains at the default position.

For example, suppose the target's top-left corner is (300,400) and its bottom-right corner is (1100,1000), the ghost window is 200 wide and 300 high, and --origin=tl --xmove is specified. The initial top-left corner is (300,400).

  • Dragging the left edge to 600 gives a ratio of 0.5 (the range is 300 to 900, and 600 is its midpoint).
  • If the target's width becomes 600 (top-left (300,400), bottom-right (900,1000)), the range becomes 300 to 700 and the left edge moves to 500.
  • If another window (top-left (1000,100), bottom-right (1400,800)) comes to the foreground, the range becomes 1000 to 1200 and the left edge moves to 1100.

Z-order

While sitting, the ghost window maintains its Z-order relative to the target. Use --zorder= to select whether it appears in front of or immediately behind the target. This does not affect position calculations.

Z-order of the ghost window and target with --zorder=front and --zorder=back

  • front: Moves the ghost immediately above the target only if it is below the target. If it is already above the target, it is not moved, even if another window is between them. This prevents ghosts sitting on the same window from competing for Z-order.
  • back: Keeps the ghost immediately behind (directly below) the target. If a visible window from another application comes between them, the ghost is returned directly below the target at the next position check (at the interval specified by --interval=).

For topmost targets such as the taskbar and ghosts set to "Always on top", see the notes under "Options".

Numerical examples

The following examples show where the upper-left corner of the ghost's window is placed under these conditions.

  • Ghost window: 200 wide and 300 high. The surface reference position is the default center of the feet, (100,300). The sitting position is (100,250), specified in surfaces.txt as point.osuwaripos.x,100 and point.osuwaripos.y,250.
  • Screen: 1920×1080. The work area is 1920×1040 (the taskbar is at the bottom and is 40 pixels high).
  • Target: Upper left (400,400), lower right (1000,900), unless otherwise noted.

Results for specifications that omit --origin= and --area= use the defaults in SSP 2.9.34 and later (osuwari and workarea). The defaults in 2.9.33 are tl and desktop, so the results differ.

Specification Upper left Description
--origin=osuwari (default) (600,400) The sitting position (100,250) coincides with the center of the target (700,650).
--origin=osuwari --target-origin=center.top (600,150) The sitting position coincides with the center of the target's top edge (700,400). The ghost sits on the window edge (illustrated above).
--origin=tr --x=-20 --y=-300 (780,100) Aligns the upper right with the target's upper right, then moves 20 left and 300 up. The bottom edge (400) coincides with the target's top edge, so the ghost stands on the top edge of the window.
--origin=bl (400,600) Aligns the lower left with the target's lower left. The bottom edge (900) coincides with the target's bottom edge.
--origin=center.bottom --target-origin=center.top (600,100) Aligns the center of the ghost's bottom edge with the center of the target's top edge (700,400). The ghost stands on the window's top edge regardless of its height.
--target=fix --origin=osuwari --target-origin=center.top --side=bottom (860,790) Aligns the sitting position with the center of the top edge (960,1040) of the virtual window below the work area. The ghost sits on the work area's bottom edge.
--target=fix --origin=center.bottom --target-origin=center.top --side=bottom (860,740) Aligns the center of the ghost's bottom edge with the same point. The ghost stands on the work area's bottom edge.
The specification in the third row, with a maximized target (upper left (0,0), lower right (1920,1040)). Add --side=bottom. (1700,740) The top edge would be off-screen (-300), so it is clipped. The ghost falls back to the virtual window below the work area and sits using the same --origin=, --x=, and --y=. Its bottom edge is at 1040 (the bottom edge of the work area).
Remove --side=bottom from the row above (1700,-300) The ghost falls back to the work area itself. Clipping is not checked, so the ghost sits off-screen.
--target=fix --origin=bl (0,740) The ghost stands at the lower left of the work area. With --origin=br, the result is (1720,740).
--target=fix (860,270) The sitting position coincides with the center of the work area (960,520).
Target is (1500,400)-(2000,900). --origin=tr --y=-300 --side=bottom (1720,740) The right edge at 2000 exceeds the screen's right edge at 1920, so it is clipped. The ghost falls back to the virtual window below the work area.
Add --margin=0_0_100_0 or --noclip to the row above (1800,100) The ghost remains seated on the target because an overhang of 100 pixels to the right is allowed (or clipping is not checked).

Writing to descript.txt

You can also specify osuwari as the value of seriko.alignmenttodesktop in the ghost's or shell's descript.txt (including the versions prefixed with sakura., kero., or char*.). After the value, list the same -- options as the tag, separated by commas (※ Display position information).

sakura.seriko.alignmenttodesktop,osuwari,--target=active,--target-origin=center.top,--xmove,--area=workarea,--side=bottom
  • The precedence is the same as for other values (ghost-wide < per-scope ghost setting < shell-wide < per-scope shell setting).
  • Tracking starts with these settings when the ghost starts or the shell is switched.
  • \![set,alignmenttodesktop,default] and STOP in the built-in SAORI osuwari restore the descript.txt settings. If descript.txt specifies osuwari, the ghost sits down again using osuwari.
  • Unrecognized options are ignored and a warning is written to the error log.

Relationship to the built-in SAORI

The built-in SAORI osuwari (compatible with Osuwari.dll) performs the same operation. However, to match the original, the SAORI's START retains the previous values when the seventh and subsequent arguments are omitted (compatibility module).

Example

\0\![set,alignmenttodesktop,osuwari,--target=active,--target-origin=center.top,--xmove,--area=workarea,--side=bottom]前面のウインドウの上端の中央に腰かける(横にだけ動かせる)。座れないときは、ワークエリアの下端に座る。\![set,alignmenttodesktop,default]
\0\![set,alignmenttodesktop,osuwari,--target=active,--origin=tr,--x=-20,--y=-90,--xmove,--area=workarea,--side=bottom]前面のウインドウの右上に座る(横にだけ動かせる)。座れないときはワークエリアの下端に座る。\![set,alignmenttodesktop,default]
\0\![set,alignmenttodesktop,osuwari,--target=fix,--origin=br,--area=workarea,--side=center]ウインドウには追従せず、タスクバーの直上の右端に座る。\![set,alignmenttodesktop,default]
\0\![set,alignmenttodesktop,osuwari,--target=active,--target-origin=center.top,--area=workarea,--side=bottom,--zorder=back]前面のウインドウの上端の中央に、そのウインドウのすぐ奥から腰かける。上半身が窓の上にのぞく。\![set,alignmenttodesktop,default]
\0\![set,alignmenttodesktop,osuwari,--target=active,--origin=center.bottom,--target-origin=center.top,--area=workarea,--side=bottom]前面のウインドウの上端の中央に、足元を乗せて立つ。ウインドウが上に寄っていて座れないときは、ワークエリアの下端に立つ。\![set,alignmenttodesktop,default]
\![set,scaling,倍率]

Change the surface's scale factor.

Change the surface's scale factor. The unit is %.
The scale factor is relative to the user-configured scale, which is treated as 100%.
Negative values are allowed; -100 flips the surface along the corresponding axis.

Effective until the ghost ends.

  • SSP
  • CROW

Example

\![set,scaling,50]本体側のサーフェスの大きさが、50%になる。
\![set,scaling,横倍率,縦倍率]

Set the surface's horizontal and vertical scale factors separately. The unit is %.
The scale factor is relative to the user-configured scale, which is treated as 100%.
Negative values are allowed; -100 flips the surface along the corresponding axis.

Effective until the ghost ends.

  • SSP

Example

\![set,scaling,50,100]本体側のサーフェスの大きさが、横50%縦100%になる。
\![set,scaling,横倍率,縦倍率,オプション]

Precisely set the surface's scale factors. The unit is %.
Options allow you to specify an animation duration and wait for it to complete.

  • --time=milliseconds……Animation duration in milliseconds. If omitted or negative, defaults to 0 (applied immediately). Can also be specified as a positional parameter (for backward compatibility).
  • --wait……Wait for the animation to complete before continuing script execution. If omitted, execution is asynchronous (the next operation starts immediately). SSP 2.7.52 and later.
  • CROW
  • SSP2.7.31

Example

\![set,scaling,200,200,--time=2000]2秒かけて200%へ変化する(非同期)。
\![set,scaling,200,200,--time=3000,--wait]3秒かけて200%へ変化する(完了まで待機)。
\![set,scaling,100,100,--time=1000,--wait]1秒かけて等倍に戻す(完了まで待機)。
\![set,alpha,数値,オプション]

Set the transparency of the current scope's surface to a value from 0 to 100. 0 is fully transparent, and 100 is opaque. Values above 100 are clamped to 100. Negative values redraw the surface without changing its value.
Options allow you to specify an animation duration and wait for it to complete.
Effective until the ghost ends.

  • --time=milliseconds……Animation duration in milliseconds. If omitted or negative, defaults to 0 (applied immediately). Can also be specified as a positional parameter (for backward compatibility).
  • --wait……Wait for the animation to complete before continuing script execution. If omitted, execution is asynchronous (the next operation starts immediately). SSP 2.7.52 and later.
  • SSP

Example

\0\![set,alpha,0]本体側が透明になり見えなくなる。\1\![set,alpha,50]相方側がだいたい半透明になる。
\![set,alpha,50,--time=1000]1秒かけて透過度50へ変化する(非同期)。
\![set,alpha,50,--time=2000,--wait]2秒かけて透過度50へ変化する(完了まで待機)。
\![set,alpha,100,--time=1000,--wait]1秒かけて不透明に戻す(完了まで待機)。
\![effect,プラグイン名,速度倍率,パラメータ]

Change the surface using a plugin.

  • CROW
\![effect2,追加サーフェスID,プラグイン名,速度倍率,パラメータ]

Change the added surface using a plugin.

  • CROW
\![filter,プラグイン名,起動時間,パラメータ]

Change the surface using a plugin each time it changes.

  • CROW
\![filter]

Disable the above.

  • CROW
\4

The character in the current scope moves a fixed distance away from the character on the main or partner side.

  • Materia
  • SSP
  • CROW
  • Ninix

Example

移動を実行。\4この文章は、本体側が別スコープと一定距離離れてから表示される。
\5

The character in the current scope moves until it is close enough to touch.
If no movement is needed, it does not move.

  • Materia
  • SSP
  • CROW
  • Ninix

Example

\1相方側にスコープを設定。\5この文章は相方側が別スコープと隣り合う位置まで移動してから表示される。
\![move]

Move to the specified coordinates. ※See below

  • SSP
  • CROW

Example

\![move,--X=80,--Y=-400,--time=2500,--base=screen,--base-offset=left.bottom,--move-offset=left.top]本体側が、画面の左下(screen,left.bottom)から数えて、右方向に80pixel上方向に400pixelの座標に、サーフェスの左上ピクセルを合わせた位置(left.top)へ、2.5秒かけて移動する。
\![moveasync]

Move asynchronously to the specified coordinates. ※See below

\![moveasync] can be stopped while in progress with \![moveasync,cancel].

  • SSP

Example

\1\![moveasync,--X=-175,--Y=200,--time=5000,--base=screen,--base-offset=right.top,--move-offset=right.bottom]相方側が、現在表示されているモニタの右上(screen,right.top)から数えて、左方向に175pixel下方向に400pixelの座標に、サーフェスの右下ピクセルを合わせた位置(right.bottom)へ、5秒で移動しようとする。
\1\![moveasync,--X=-175,--Y=200,--time=5000,--base=screen,--base-offset=right.top,--move-offset=right.bottom]相方側が移動開始。\![moveasync,cancel]ここで移動キャンセル。移動中に、別のイベントが発生しその中でキャンセルのさくらスクリプトが実行された場合も、移動をキャンセルできる。ダブルクリックすると移動を中断する、という演出などに使える。

About \![move] and \![moveasync]

New syntax: (SSP 2.3.85 and later)

\![move(async),--X=X座標,--Y=Y座標,--time=移動時間,--base=移動基準,--base-offset=基準とするキャラ基準位置,--move-offset=動かすキャラ基準位置,--option=オプション]

All parameters are optional. Their order can also be changed. The specified names are case-insensitive (for example, you can write --x=10)

Old syntax:

\![move(async),X座標,Y座標,移動時間,移動基準,基準とするキャラ基準位置,動かすキャラ基準位置]

Parameters from the move time onward are optional.

X coordinate and Y coordinate specify the destination coordinates.
Negative values can also be specified.
If either coordinate is omitted or set to "fix", that coordinate is kept.
Default: "fix"

Move time is in milliseconds.
If move time is omitted or set to 0, the character moves instantly.
Default: 0

Reference position is the character or other reference point for the movement (the origin of the relative coordinates).
Specify it as follows.
Default: screen

screen
Coordinates with the top left of the monitor containing the current character window as the origin. Default value
primaryscreen
Coordinates with the top left of the main monitor (ID=1) as the origin.
ID
Relative coordinates to the character in the scope with the specified ID (corresponding to the number of \0, \1, \p[2], etc.)
host-side name/ID
Relative coordinates to the character in the scope with the specified ID of another ghost, specified by its host-side name (sakura name, \0 name)
me
Relative coordinates to the character being moved
primaryscreen
Coordinates with the top left of the primary monitor as the origin
global
System coordinate system (the same as primaryscreen on Windows)

Reference character anchor position specifies which point to use as the origin when a character or screen is specified as the movement reference.
Specify it in the form X anchor.Y anchor, combining one of the following four values for each:
X anchor: left,right,base,center
Y anchor: top,bottom,base,center
For example, write right.base.
base follows the point.basepos setting in surfaces.txt.
Default: left.top

For screen, base cannot be used; for global, right,bottom,center cannot be used.

Moving character anchor position is specified in the same way as the reference character anchor position.

Options can be specified multiple times. Specify them as follows. Only the new syntax supports options.

ignore-sticky-window
Move independently, ignoring the linkage settings from \![set,sticky-window]
\![set,position,x,y,スコープID]

Fix the specified scope at the XY coordinates. (Dragging and other movement become impossible.)

  • CROW
\![reset,position]

Disable the above.

  • CROW
\![set,zorder,スコープID,スコープID,...]

Places the windows of the specified scopes in order from left to right, from front to back.
Example: \![set,zorder,1,0] always displays \1 in front of the \0 window.

To control the Z-order of balloons as well, follow the examples below.
Example: \![set,zorder,balloon1,surface1,balloon0,surface0]
Example (abbreviated syntax): ![set,zorder,b1,s1,b0,s0]
This strictly controls the order as follows: \1 balloon - \1 character image - \0 balloon - \0 character image.

Executing multiple tags with different scope IDs creates multiple groups.
Example: Executing \![set,zorder,1,0] and \![set,zorder,3,2] displays \1 in front of \0 and \p[3] in front of \p[2].
The same applies to the syntax that includes balloons.

There is no limit on the number of scope IDs that can be specified, but specifying many can be somewhat resource-intensive, so about 2–3 are recommended.
Executing a tag that includes a scope ID already paired with another causes an error. To change the combination, use the \![reset] tag and try again.

To place only specific characters at the very front or back, prefix their scope IDs with front or back. This avoids having to list every character in a ghost with many characters.
Example: \![set,zorder,front,0] displays \0 in front of all other characters.
Example: \![set,zorder,back,3] displays \p[3] behind all other characters.
When multiple scope IDs are specified, they are arranged from front to back in the order written. front and back can be written consecutively.
Example: \![set,zorder,front,1,0,back,3,2] arranges them from front to back as \1, \0, (all other characters), \p[3], \p[2].

When front or back is specified, the other characters are arranged with lower scope IDs closer to the front.
front and back can each be executed multiple times. Each execution appends its IDs to the end of the respective list. Specifying an already specified scope ID again moves it to the new position. An ID cannot be specified in both the front and back lists; the later specification takes precedence.
As with the syntax that lists only scope IDs, balloons are placed in front of the foremost character.
front and back cannot be combined with the scope-ID-only syntax or the s,b syntax. The syntax used by the later execution takes precedence, and the previous specification is discarded.

Effective until the ghost exits.

  • SSP2.3.77/2.7.34 (s,b syntax)/2.9.35 (front,back syntax)

Example

\![set,zorder,1,0]相方側が、必ず本体側の手前に表示される。
\![reset,zorder]

Clear the above setting and reset it to the value previously specified in descript.

  • SSP2.3.77

Example

\![reset,zorder]ウインドウの表示を解除する。ユーザが最後に操作したものが最も手前に表示される。
\![set,sticky-window,スコープID,スコープID,...]

Make the windows for the specified scopes move together while being dragged or while a move tag is running.
For example, specifying 1,0 makes the \0 (kero) and \1 (sakura) windows move together when dragged or moved by other means.

You can create multiple groups by running the tag multiple times with different scope IDs.
Example: Running \![set,sticky-window,1,0] and \![set,sticky-window,3,2] groups \1 with \0, and \p[3] with \p[2].

There is no limit to the number of scope IDs you can specify, but specifying a lot of them will significantly affect performance, so 2–3 is recommended.
Running a tag that includes scope IDs already in a pair causes an error. To change the combinations, use the \![reset] tag before trying again.

If window position is constrained by \![set,alignmenttodesktop] or a similar tag, that constraint takes precedence, and only the freely movable axis of X and Y follows.
Moving one of the grouped windows with the \![move] tag also moves the other windows in the group.
However, the --option=ignore-sticky-window option of the move tag allows a window to move independently.

Effective until the ghost ends.

  • SSP2.3.77

Example

\![set,sticky-window,1,0]相方側が、本体側とセットで動く。
\![set,sticky-window,0,1,2]本体側と相方側と3人目がセットで動く。
\1\![move,40,100,0,0,left.top,left.top]相方側の左上を、本体側の左上に合わせた後、右へ40pixel下へ100pixel移動させる。\![set,sticky-window,1,0]その状態で、相方側と本体側をセットで動くようにする。
\![reset,sticky-window]

Clear the above setting and reset it to the value previously specified in descript.

  • SSP2.3.77

Example

\![reset,sticky-window]セットで動く設定を解除する。これ以降、ドラッグ移動時など個別に移動するようになる。
\![execute,resetwindowpos]

Return each window to its initial position. This works like “Reset shell position” in the menu.

  • SSP2.7 RC1

Balloon, text commands

\bID番号

Change the balloon for the current scope to the balloon with the specified ID number.
Only 0–9 can be used in this form.
Odd numbers are reserved for balloons displayed to the right of the character, so only 0 or even IDs can be used.

  • Materia
  • SSP
  • CROW
  • Ninix

Example

\b2本体側のトークをバルーン2番に表示する。バルーンによって実装状況は異なり、バルーン2番が存在しない場合もある。SSP同梱バルーン「SSPデフォルト+」では、本体側バルーン2番は表示文字数の多い大きなバルーンとなるが、サイズの決まりはないため、これを使う際は推奨バルーンを指定する・専用バルーンを同梱するなどが必要。
\b[ID番号]

Change the balloon for the current scope to the balloon with the specified ID number.
Odd numbers are reserved for balloons displayed to the right of the character, so only 0 or even IDs can be used.
\b[-1] hides the balloon.

As of SSP 2.6.34, writing \b[ID1,--fallback=ID2,--fallback=ID3] makes the balloon use ID2 if ID1 does not exist, and ID3 if ID2 does not exist.

  • Materia
  • SSP
  • CROW
  • Ninix

Example

\b[2]本体側のトークをバルーン2番に表示する。バルーンによって実装状況は異なり、バルーン2番が存在しない場合もある。SSP同梱バルーン「SSPデフォルト+」では、本体側バルーン2番は表示文字数の多い大きなバルーンとなるが、サイズの決まりはないため、これを使う際は推奨バルーンを指定する・専用バルーンを同梱するなどが必要。
\_b[ファイルパス,x,y]

Paste an image at the balloon's XY coordinates. The image is displayed underneath the text.
The color of the top-left pixel becomes transparent.
The base folder is [folder of the ghost that executed this]/ghost/master.
※Only SSP allows base64-encoded data or an exe/dll resource to be specified as the image instead of a filename; see below.
※Only SSP allows an image URL to be specified.
※Only SSP also searches for files in the plugin folder.

  • Materia
  • SSP
  • CROW
  • Ninix

Example

\_b[image\test.png,50,100]本体側バルーンに、[実行したゴーストのフォルダ]/ghost/master/imageフォルダにあるtest.pngを左上のpixelを透過色として、バルーン内座標X:50,Y:100に表示する。
\_b[ファイルパス,x,y,opaque]

Paste an image at the balloon's XY coordinates. The image is displayed underneath the text.
Display the image without making the color of the top-left pixel transparent.
The base folder is [folder of the ghost that executed this]/ghost/master.
※Base64-encoded data or an exe/dll resource can be specified as the image instead of a filename; see below.

  • SSP

Example

\_b[..\..\shell\master\surface0.png,0,15,opaque]本体側バルーンに、[実行したゴーストのフォルダ]/shell\masterフォルダにあるsurface0.pngを、バルーン内座標X:0,Y:15に、透過せずに表示する。
\_b[File path,x,y,options,options...]

Embeds an image at the specified XY coordinates in the balloon.
[The running ghost's folder]/ghost/master is the base folder.
※A base64-encoded string or a resource in an exe/dll can be specified as an image instead of a file name; see below.

For available options, see below.

  • SSP

Example

\_b[test.png,10,20,--option=use_self_alpha,--clipping=100 30 150 90,--option=foreground]本体側バルーンに、[実行したゴーストのフォルダ]/ghost/masterフォルダにあるtest.pngを、バルーン内座標X:10,Y:20に、ファイルの透過情報付きpngとして、画像の横100~150pixel縦30~90pixelの範囲を、バルーンの文字の上に表示する。
\_b[ファイルパス,inline]

Embeds an image within a line of balloon text, treating it as one character.
[The running ghost's folder]/ghost/master is the base folder.
※A base64-encoded string or a resource in an exe/dll can be specified as an image instead of a file name; see below.

  • SSP
  • Ninix

Example

本体側バルーンに、[実行したゴーストのフォルダ]/ghost/masterフォルダにあるtest.png\_b[test.png,inline]を、現在のバルーン内の文字表示位置に、左上のドットを透過色として、表示する。
\_b[ファイルパス,inline,opaque]

Embeds an image within a line of balloon text, treating it as one character.
Displays it without making the top-left color transparent.
[The running ghost's folder]/ghost/master is the base folder.
※A base64-encoded string or a resource in an exe/dll can be specified as an image instead of a file name; see below.

  • SSP

Example

本体側バルーンに、\_b["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAOCAIAAACpTQvdAAAAl0lEQVR42oVSCQ7AIAiDl6MvZyCMQ122JQSh5agiM0P/JmL4dGQxCIEjruSd6QRBE7D86nRCibMTTvScQPTazsEBfgaECUoQHAyfzXytLbMtTutQOdZhQ2uHc4dNlssOTrBWr40q2tNsXTq186myikUCsJYuU1bV81g2TJUs7bm8WC8fmKtKXC4O/1XaCVeVYmL6eIsRfwDNfLdu1l4zPAAAAABJRU5ErkJggg==",inline,opaque]文字と同じ扱いとして、base64エンコード(文字列化)した画像データを、透過せずに表示する。
\_b[File path,inline,options,options...]

Embeds an image within a line of balloon text, treating it as one character.
[The running ghost's folder]/ghost/master is the base folder.
※A base64-encoded string or a resource in an exe/dll can be specified as an image instead of a file name; see below.

For available options, see below.

Example

本体側バルーンに、[実行したゴーストのフォルダ]/ghost/masterフォルダにあるtest.png\_b[test.png,inline,--option=use_self_alpha,--clipping=100 30 150 90]を、文字扱い、ファイルの透過情報付きpngとして、画像の横100~150pixel縦30~90pixelの範囲を表示する。
  • SSP
\n

Inserts a line break in the balloon text.

  • Materia
  • SSP
  • CROW
  • Ninix

Example

文章が\n改行されて表示される。
\n[half]

Inserts a line break at half the normal height.

  • Materia
  • SSP
  • CROW
  • Ninix

Example

文章が\n[half]半行改行されて表示される。\n\n[half]1行半の改行をすることで段落のような表現が出来る。
\n[パーセント]

Inserts a line break of the specified percentage of the normal line height. A negative value moves back. ※Since SSP 2.3.97.

  • SSP
  • CROW

Example

文章が\n[150]1行半改行されて表示される。
文章が\n[-250]2行半分戻る。
\_n

Automatic line breaks are suppressed until the next \_n.

  • Materia
  • SSP

Example

\_nここに書かれた文章は改行されない。バルーンの表示領域を超えた場合は、表示されない。\_n
\c

Clears the text in the balloon on the current scope.

  • Materia
  • SSP
  • CROW
  • Ninix

Example

\1相方側に文章表示。\0本体側に文章表示。現スコープのバルーン内の表示を全て消す。\cその後、左上(初期位置)から表示する。
\c[char,数値]

Clears the specified number of characters from the cursor position on the current scope. The characters to be cleared are determined by their order of appearance in the script, regardless of their position in the balloon. An image pasted using \_b[ファイルパス,inline] is treated as one character and is cleared.

  • SSP

Example

トークを3文字削除\c[char,3]削除終了。
\c[char,数値,開始位置]

Clears the specified number of characters on the current scope, starting at the specified position. The start position is zero-based (0 for the first character, 1 for the second). The criteria for which characters are cleared are the same as for \c[char,数値].

  • SSP

Example

トークの5文字目から、3文字削除\c[char,3,4]削除終了。
\c[line,数値]

Clears the specified number of lines on the current scope, starting from the cursor position in the balloon.
Text divided by \_l[x,y], \n, \n[half], or \n[パーセント] is treated as “lines.” However, divisions that contain no text, such as \n\n or divisions made by anything other than \_l[x,y], are not treated as lines.
As with \c[char,数値], the order of appearance in the script is used.

  • SSP

Example

トークを1行削除。\nこの行が削除される。\c[line,1]削除終了。\nこの行は削除される。\n\n\n\n\n\c[line,1]削除終了。\nこの行は削除されない。\_l[0,0]\c[line,1]削除終了。
\c[line,数値,開始位置]

Clears the specified number of lines on the current scope, starting at the specified position (line number). The start position is zero-based (0 for the first line, 1 for the second). The criteria for which lines are cleared are the same as for \c[line,数値].

  • SSP

Example

トークを3行目から、\n1行削除。\nこの部分が\_l[,]削除される。\c[line,1,2]削除終了。
\_l[x,y]

Move the cursor for the current scope to the specified XY coordinates. X and Y can be specified as follows.
Note that immediately after \_l is executed, alignment is reset to left alignment to prevent problems. Specify it again as needed.

Number
Coordinates in pixels from the balloon's text drawing origin (the position of origin; the top-left of the text drawing area for horizontal writing)
(omitted)
Do not move. Omitting both X and Y has no effect.
centerx / centery
Writing centerx for X or centery for Y moves the cursor to the center of the balloon image (half its width or height). Unlike other values, this is relative to the balloon image itself, not the text drawing origin.
XXem
Appending em specifies coordinates relative to the text height. 1em is the text height at the time the tag is written. Decimal values are allowed.
XXlh
Appending lh specifies coordinates relative to the line height. 1lh = 1em + line spacing. Decimal values are allowed.
XX%
Appending % specifies coordinates relative to the text height. 100% is the text height at the time the tag is written. Decimal values are allowed.
@XX
Specifies coordinates relative to the current text drawing position. Negative X values go left, and negative Y values go up. Can be used together with em or % values.

Even in a vertical-writing balloon, the coordinate axes are those of the balloon image: positive X is to the right, and positive Y is downward.
However, the text drawing origin is at the top right of the text drawing area, and columns advance from there to the left, so a negative X value is needed to move to the next column. Y follows the text progression direction (top to bottom), so it can be used just as in horizontal writing.
For example, \_l[@-1lh,0] means “go to the start of the column one column to the left” (equivalent to \_l[0,@1lh] in horizontal writing), and \_l[,@1em] means “advance the text by one character.”

  • Materia
  • SSP
  • CROW
  • Ninix

Example

\_l[30,5em]「座標X=30pixel、座標Y=5文字分高さ」に表示。\_l[@-1650%,100]「座標X=最後の文字から文字高さ1650%分左、座標Y=100pixel」に表示。\_l[,@-100]「座標X=変更なし、座標Y=最後の文字から100pixel上」に表示。
\C

When written at the beginning, appends text to the balloon displayed immediately before it. The scope returns to 0 (\0).

  • SSP
  • Ninix

Example

\Cこの文章は前回のトークの後ろに追記される。スコープも前回の最後の状態が反映されるので注意。
\![set,autoscroll,disable]

Stop automatic scrolling of the balloon. Manual scrolling is still possible.

  • Materia
  • SSP
  • Ninix

Example

\![set,autoscroll,disable]スクロールロック。\n[5000]ロック中はこの文字は見えない。
\![set,autoscroll,enable]

Disable the mode described above.

  • Materia
  • SSP
  • Ninix

Example

\![set,autoscroll,disable]スクロールロック。\n[5000]ロック中はこの文字は見えない。\![set,autoscroll,enable]スクロール解除。
\![set,balloonoffset,x,y]

Changes the balloon offset to the specified XY coordinates. The coordinates set by the user by dragging the balloon are added to this value to determine the balloon's display position.
Normally, specifying a number overrides the default offset value in descript.txt. Prefixing the number with @ instead specifies coordinates relative to the offset values in descript.txt or surfaces.txt.

  • SSP
  • Ninix

Example

\![set,balloonoffset,100,-50]バルーン位置の基準点をX:100,Y:-50に移動。
\![set,balloonoffset,@100,@-50]バルーン位置の基準点をdescript.txtやsurfaces.txtの指定プラスX:100,Y:-50(相対座標)に移動。
\![set,balloonalign,ID]

Switch the balloon to the display direction specified by the ID below. The ID can be specified as follows.
The values of balloon.offsetx and balloon.offsety in the shell's descript.txt and balloon.offsetx and balloon.offsety in surfaces.txt are applied relative to the positions below. The initial value is none.

This remains in effect until the ghost exits.

left
The balloon's top-right corner aligns with the shell's top-left coordinates.
center
The balloon's bottom-center aligns with the shell's top-center coordinates.
top
Same as center.
right
The balloon's top-left corner aligns with the shell's top-right coordinates.
bottom
The balloon's top-center aligns with the shell's bottom-center coordinates.
none
left and right switch depending on the coordinates. After the shell is dragged, the side switches if the balloon would be clipped.
Anything else
Same as none.

Different offset values can also be used for each direction. For left/right, offsetxl/offsetxr take precedence; for center and top, offsetxc takes precedence; for bottom, offsetxb takes precedence (or offsetxc if offsetxb is not set). See sakura.balloon.offsetx for details.

  • SSP

Example

\0\![set,balloonalign,top]本体側バルーンを、シェルの頭上に表示。\1\![set,balloonalign,right]相方側バルーンを、シェルの右側に表示。
\![set,balloonmarker,マーカー表示文字列]

Displays the marker string shown when receiving SSTP.
The display target is the balloon belonging to the current scope.
The display string is optional. To clear it, omit the argument or leave it empty.

It remains in effect until the ghost terminates or a feature that normally uses this area, such as receiving SSTP, is triggered.

Clearing means “cancel the string specified by this tag”; it does not hide the marker itself. If cleared while playing a script received via SSTP, the display reverts to the default sender display (from sender).
Also, if a marker string is specified in the Marker header of SSTP or SHIORI, that value takes precedence and the value specified by this tag is not displayed.
To omit the marker when outputting an image, use --hide=balloonmarker with \![execute,dumpballoon].

  • SSP2.6.67
\![set,balloonnum,ファイル名,現在の数,最大数]

Displays the data format shown when receiving a file.
The display target is the balloon belonging to the current scope.
All arguments are optional. To clear the display, omit all arguments or leave them empty.
Since 2.6.67, this can also be displayed in the \1-side balloon and beyond.

It remains in effect until the ghost terminates or a feature that normally uses this area, such as a network update, is triggered.

  • SSP

Example

\![set,balloonnum,テスト表示,1,5]ファイル受信時の表示テスト。\![set,balloonnum,,,]表示内容削除。
\![set,balloontimeout,時間]

Specifies the timeout for displaying the balloon. The unit is milliseconds.
The timeout is counted from when the script finishes displaying. A value of 0 or less disables the timeout.
This setting is effective only during the current script.

Omitting the time: Reverts to the default value
Time specified as 0 or -1: No timeout

  • SSP

Example

\![set,balloontimeout,3000]このトークは、喋り終わってから3秒でバルーンが閉じる。
\![set,balloonwait,倍率]

Specifies the multiplier for the speed at which text flows in the balloon (the wait per character).
Number only: 0–100 can be specified. 1 is normal speed. Decimal values are allowed. Example: specifying 1.5 makes it 50% slower.
With a trailing %: 0–10000 can be specified. 100 is normal speed. Integers of 0 or greater only.
With a trailing ms: 0–10000 can be specified. Specifies the wait time per character as an absolute value in milliseconds.

Omitting the value or specifying 1: Reverts to the default value
Specifying 0: Always displays immediately

After the script finishes running, the setting resets to the equivalent of 100%.

  • SSP
\![set,serikotalk,true/false]

Temporarily disables or enables SERIKO lip-sync animation (talk setting).

After the script finishes running, the setting resets to true.

  • SSP2.6.87
\![*]

Displays a marker. The marker is set by the balloon.

  • Materia
  • SSP
  • Ninix

Example

\![*]マーカーをつける。
\![enter,onlinemode]

Force the online marker to be displayed. The main-character balloon is displayed even if the other character has content to display and the main-character balloon does not.

This remains in effect until the ghost exits.

  • SSP

Example

\0\![enter,onlinemode]本体側のバルーンにオンラインマーカーが表示される。
\![leave,onlinemode]

Force the online marker to be hidden.

  • SSP

Example

\0\![enter,onlinemode]この文章の表示中は、本体側のバルーンにオンラインマーカーが表示される。\![leave,onlinemode]ここで消える。
\![enter,nouserbreakmode]

Start a mode that disables interruption of script execution (the operation depends on SSP settings; normally, double-clicking the balloon).
Cannot be used with ordinary SSTP (Auth.SSTP (= Owned SSTP) is supported).

  • SSP

Example

\![enter,nouserbreakmode]この文章中は、スクリプトブレークできない。
\![leave,nouserbreakmode]

Disable the mode described above.

  • SSP

Example

\![enter,nouserbreakmode]この文章中は、スクリプトブレークできない。\![leave,nouserbreakmode]ここからブレーク出来るようになる。
\![lock,balloonrepaint]

Stop redrawing the balloon until \![unlock,balloonrepaint] is called or the script ends.
Redrawing is automatically resumed at the end of the script.
However, specifying \![lock,balloonrepaint,manual] keeps redrawing stopped until it is explicitly unlocked[2.5.16]

  • SSP

Example

\![lock,balloonrepaint]この文章はスクリプト実行が終わるまで表示されない。
\![unlock,balloonrepaint]

Unlocks the above.

  • SSP

Example

\![lock,balloonrepaint]この文章の描画はされない。\![unlock,balloonrepaint]ここで描画が再開され、前の文章も描画される。
\![lock,balloonmove]

Suppress user-dragging of the balloon until \![unlock,balloonmove] is called.
This can be specified permanently in descript.txt, as with sakura.balloon.dontmove.
Do not overuse this, as it interferes with user interaction.

  • SSP2.4.96
\![unlock,balloonmove]

Unlocks the above. If it is already specified in descript.txt, it cannot be unlocked.

  • SSP2.4.96
\_!

[Obsolete specification] Displays tags as-is without executing them until the next \_!.

  • Materia
  • SSP
\_?

Displays tags as-is without executing them until the next \_?.

  • SSP

Example

\_?\1この文章はさくらスクリプトが実行されず\nそのまま表示される。\_?
\__v[オプション]

Adjusts how speech synthesis voices the text up to the next \__v.
\__v[disable]: Disables speech synthesis
\__v[alternate,文字列]: Specifies the correct spoken text for words with an ambiguous pronunciation. Hiragana is recommended to avoid misrecognition.

[SSP only] This also affects whether the text is recorded in the backlog (speech history).
Text within a \__v[disable] section is neither spoken by speech synthesis nor recorded in the backlog.
Text within a \__v[alternate,文字列] section is recorded in the backlog as the specified string instead of the original text, regardless of whether speech synthesis is enabled.

  • SSP2.4

Example

\1\__v[disable]この文章は音声合成機能でしゃべらない。\__v
\![execute,resetballoonpos]

Return each balloon to its initial position. This works the same as the “Reset balloon position” menu command.

  • SSP2.7.41

Notes

About \_b[ファイルパス,...]

Paths may be absolute or relative to the SHIORI module itself.

Note: SSP only; environment variables can also be used in paths such as file names.

When using base64
Example: "data:image/png;base64,iV~II"
When using exe/dll resources
Example: D:\hogehoge.exe,20
When using exe/dll resources (specifying a resource ID)
Example: D:\hogehoge.exe,-10

Options for \_b[ファイルパス,...]

Options that can be specified for both \_b[ファイルパス,x,y,オプション,オプション...] and \_b[ファイルパス,inline,オプション,オプション...].

--option=opaque
Display the image without making the top-left color transparent.
--option=use_self_alpha
Display PNG images with an alpha channel as transparent.
--clipping=左 上 右 下
Crop and display a rectangular portion of the image.
Specify the crop area as numeric values for left, top, right, and bottom.
--scaling=横 縦
Scale the image to the specified size.
If a number is followed by %, it is treated as a percentage of the original image (after cropping with --clipping); if no unit is specified or it is followed by px, it is treated as a number of pixels.
If a number is negative, the image is flipped horizontally or vertically and displayed at the size of its absolute value.
If 0 is specified for either the width or height, the image is scaled to fit the non-zero dimension while preserving the original aspect ratio. (If the original image is 300x200, 150 0 produces the same result as 150x100.)[SSP 2.8.82~]
The size must be in the range of 1–4096px.
[SSP 2.8.73~]
--scaling=サイズ 基準辺
Scale and display the image while preserving its original aspect ratio, so that the specified size is applied to the reference edge. The size must be given in pixels; % cannot be used.
Specify long (longer edge) or short (shorter edge) as the reference edge.
Adding max to the end of the reference edge scales down only (images smaller than the specified size are not enlarged); adding min scales up only (images larger than the specified size are not reduced).
If long or short is omitted and only max or min is specified, long is used.
If the size is negative, the image is flipped both horizontally and vertically and displayed at the size of its absolute value.
The size must be in the range of 1–4096px.
Example: --scaling=300 long makes an original image of 400x300 into 300x225.
Example: --scaling=300 longmax scales the image down to 300px only if its longer edge exceeds 300px.
[SSP 2.8.82~]
--option=fixed
Keep the image stationary when scrolling.
Effective only when x,y are specified. It has no effect with inline, since the image is placed within the line.
--option=background
Composite the image with the balloon's transparency taking precedence over the image's transparency.[Standard behavior when unspecified]
When x,y are specified, the image is displayed behind the text. This option lets you use the image as a background for text.
--option=foreground
Composite the image with the image's transparency taking precedence over the balloon's transparency.[SSP 2.6.54~]
When x,y are specified, the image is displayed in front of the text.
--source=値
Specify which item to use for rendering from an image or file with multiple rendering candidates.
For multipage TIFFs, specify the zero-based page number; for icons in DLL/EXE files, specify the zero-based resource number;
for PSD files and others, specify the layer name.
To specify a layer inside a layer group, write the group name separated by :: (nested groups are supported).
[SSP 2.8.41~]

Text formatting commands

\f[align,寄せる側]

Sets text to right-aligned (\f[align,right]), centered (\f[align,center]), or left-aligned (\f[align,left]).
This setting remains in effect until an "intentional line break" such as \n or \_l occurs.
If this command is run while text or other content is being added, it also moves text already added on the same line.
When the \_l tag is encountered, alignment returns to left.
If centered alignment is set with the \f[align] tag after moving with the \_l tag, centering is performed as if the text had been indented by the \_l tag's X coordinate.
In vertical writing mode, left means top-aligned, right means bottom-aligned, and center means vertically centered.

  • SSP2.5.31

Example

\f[align,center]これは中央揃え。\n\f[align,right]これは右揃え。\n\f[align,left]左揃えのつもりが\w9\w9\f[align,right]右揃えに。
\f[valign,寄せる側]

Sets bottom alignment (\f[valign,bottom]), vertical center alignment (\f[valign,center]), or top alignment (\f[valign,top]) for text.
If this command is run while adding text or other content, it also moves text already added on the same line.
Unlike align, it is not reset by \n or \_l.
In vertical writing mode, top means left alignment, bottom means right alignment, and center means horizontal center alignment.

  • SSP2.6.19
\f[name,フォント名]

Changes the text font to the specified font name.
If default is specified, or none of the specified font candidates are available, the font reverts to the balloon's standard font (or the balloon font override in SSP settings, if enabled).
If disable is specified, the font is set to the same font used for disabled display.
Font files placed under [the folder of the ghost that ran]/ghost/master or in the current balloon's folder can also be specified as font names.
Multiple font names can be specified, separated by commas. They are selected from among the fonts installed automatically in the order listed (highest priority first) (SSP only).

  • SSP

Example

\f[name,メイリオ,meiryo.ttf]メイリオがインストール済みならメイリオ、そうでなければmeiryo.ttf、それもなければデフォルトフォントで表示される。
\f[height,数値]

Changes the text to the specified font size.
Relative changes using + or - are supported.
Stylesheet size specifications are also supported.
Specify default to restore the balloon's default setting.

  • SSP
  • Ninix

Example

\f[height,15]15pixelで表示。\f[height,+3]3pixel大きくする。\f[height,200%]デフォルトサイズの200%で表示。\f[height,default]元のサイズに戻す。
\f[color,色指定]

Changes the text color.
For details on how to specify the color, see the note below.

  • SSP
  • Ninix

Example

\f[color,red]赤色で表示。\f[color,100,150,200]色指定で表示。\f[color,default]バルーンのデフォルト色に戻す。
\f[shadowcolor,色指定]

Change the text shadow color.
For the specification method, see ※below.

  • SSP

Example

\f[shadowcolor,#ffff00]文字の影の色を黄色で表示。\f[shadowcolor,default]バルーンのデフォルト色に戻す。
\f[shadowcolor,none]

Disables the text shadow color.

  • SSP

Example

\f[shadowcolor,none]文字の影自体をなくして表示。\f[shadowcolor,default]バルーンのデフォルトに戻す。
\f[shadowstyle,形態指定]

Changes the style of the text shadow. offset displays the text shifted down and to the right; outline displays it with an outline.

  • SSP2.5.27

Example

\f[shadowcolor,#ffff00]\f[shadowstyle,outline]文字の周囲を黄色で縁取りして表示。\f[shadowstyle,default]\f[shadowcolor,default]バルーンのデフォルトに戻す。
\f[outline,パラメータ]

Specify true or 1 for the parameter to render text as outline.
Specify false or 0 for the parameter to disable it.
Specify default to restore the balloon's default setting.
Specify disable to use the same setting as disabled text display.

  • SSP

Example

\f[height,30]\f[outline,1]白抜きにする。\f[outline,default]バルーンのデフォルト設定にもどす。
\f[anchor.font.color,色指定]

Changes the anchor text color.
For details on how to specify the color, see the note below.

  • SSP

Example

\_a[OnTest]色変え前のアンカー\_a\n\f[anchor.font.color,50%,90%,20%]\_a[OnTest2]色変え後のアンカー\_a
\f[bold,パラメータ]

Specify true or 1 for the parameter to enable bold text.
Specify false or 0 for the parameter to disable it.
Specify default to restore the balloon's default setting.
Specify disable to use the same setting as disabled text display.
If the font does not support bold, the text will not be bold.

  • SSP
  • Ninix

Example

\f[bold,1]太字にする。\f[bold,default]バルーンのデフォルト設定にもどす。
\f[italic,パラメータ]

Specify true or 1 for the parameter to enable italics.
Specify false or 0 for the parameter to disable it.
Specify default to restore the balloon's default setting.
Specify disable to use the same setting as disabled text display.
If the font does not support italics, the text will not be italicized.

  • SSP
  • Ninix

Example

\f[italic,1]This is italic.\f[italic,default]バルーンのデフォルト設定にもどす。
\f[strike,パラメータ]

If the parameter is set to true or 1, a strikethrough is displayed. Sample.
If the parameter is set to false or 0, it is disabled.
If default is specified, it returns to the balloon's default setting.
If disable is specified, it uses the same setting as disabled display.

  • SSP
  • Ninix

Example

\f[strike,1]文字に打ち消し線を引く。\f[strike,default]バルーンのデフォルト設定にもどす。
\f[underline,パラメータ]

Specify true or 1 for the parameter to draw an underline.
Specify false or 0 for the parameter to disable it.
Specify default to restore the balloon's default setting.
Specifying disable applies the same setting as displaying it as disabled.

  • SSP
  • Ninix

Example

\f[underline,1]文字に下部線を引く。\f[underline,default]バルーンのデフォルト設定にもどす。
\f[sub,パラメータ]

Specify true or 1 for the parameter to display subscript text Sample.
Specify false or 0 for the parameter to disable it.
Specify default to restore the balloon's standard setting.
Specify disable to use the same setting as disabled display.

  • SSP
  • Ninix

Example

文字を\f[sub,1]下付き文字にする。\f[sub,default]バルーンのデフォルト設定にもどす。
\f[sup,パラメータ]

Specify true or 1 as the parameter to display superscript text Sample.
Specify false or 0 as the parameter to disable it.
Specify default to restore the balloon's standard setting.
Specifying disable produces the same display as when disabled.

  • SSP
  • Ninix

Example

文字を\f[sup,1]上付き文字にする。\f[sup,default]バルーンのデフォルト設定にもどす。
\f[default]

Restores all balloon attributes to their defaults.

  • SSP
  • Ninix

Example

\f[shadowcolor,#6699cc]色々な\f[bold,1]装飾を\f[underline,1]した\f[height,20]文字を\f[default]全てバルーンのデフォルト設定に戻す。
\f[disable]

Restores all balloon attributes to disabled text display.

  • SSP2.5.51
  • Ninix

Wait Commands

\w時間

Waits for x × 50 ms. The value can be set from 1 to 9. With \w10, the balloon waits for 50 ms, then displays the character "0".

  • Materia
  • SSP
  • CROW
  • Ninix

Example

0.45秒のウェイトをかける。\w9\nその後、1秒のウェイトをかける。\w9\w9\w2ウェイト終了。
\_w[時間]

Precise wait. Waits for [時間] ms.

  • SSP
  • CROW
  • Ninix

Example

1.234秒のウェイトをかける。\_w[1234]ウェイト終了。
\__w[時間]

Waits until the specified number of milliseconds have elapsed since playback started or since \x.
Use \__w[clear] to reset the timer.

  • SSP

Example

1\_w[1000]2\__w[2500]3。最初に1000msウェイトし、その後、累計2500msウェイトする(この場合、[2500-1000-2文字分の表示時間]で約1500ms)。文字表示にかかった時間(SSPユーザー設定で可変)も加味されるため、スクリプト開始時からの精密なウェイトをかけることができる。クリアかクリック待ちが実行された時点で0からカウントしなおす。\__w[clear]\__w[500]ここで0.5秒のウェイトがかかる。
\x

Waits for a balloon click.
After the click, the scope is reset to \0, and the effects of Sakura Script commands in the \f (text decoration) family are also cleared. Sakura Script commands that are cleared by \e continue to apply.

  • Materia
  • SSP
  • CROW
  • Ninix

Example

\1ここで相方が\f[bold,1]トークする。\xクリック後、スコープはデフォルトの本体側に戻り、フォント変更のさくらスクリプトは解除される。
\x[noclear]

Waits for a temporary balloon click.
After the click, the balloon contents and scope are retained.
Unlike \x, the effects of Sakura Script commands in the \f (text decoration) family remain.

  • SSP

Example

\1ここで相方が\f[bold,1]トークする。\x[noclear]クリック後、スコープも文字装飾系のさくらスクリプトは有効。
\t

Time-critical section.
No notifications of events such as mouse events are sent until the script is interrupted (for example, by selecting a choice or double-clicking a balloon) or reaches \e.
Note that entering \t again does not end the section.
To end it partway through, use \![raise,イベント名] to end the current script and trigger another event.

  • Materia
  • SSP
  • CROW
  • Ninix

Example

この文章表示中はマウス反応を受け付ける。\tこれ以降スクリプト再生終了まで受け付けない。
\_q

Quick section.
Messages are displayed without waiting until the next \_q or \e.
However, Sakura Script commands that include waits still run, and their waits still apply during instant display.

  • Materia
  • SSP
  • CROW
  • Ninix

Example

\_q文字を瞬間表示する。里々等、自動でウェイトが挿入される場合は注意。\_q
\![quicksection,true]

Starts the quick section. \![quicksection,1] can also be used.
It is mostly compatible with \_q; the difference is that it explicitly starts the section instead of using a switch.

  • SSP
  • Ninix

Example

\![quicksection,1]文字を瞬間表示する。これもウェイトタグは実行される。
\![quicksection,false]

Ends the quick section. \![quicksection,0] can also be used.
It is mostly compatible with \_q; the difference is that it explicitly ends the section instead of using a switch.

  • SSP
  • Ninix

Example

\![quicksection,1]文字を瞬間表示する。これもウェイトタグは実行される。\![quicksection,0]また、クイックセクションのさくらスクリプトは\![quicksection,1]混ぜて使っても有効。\_q
\_s

Synchronize section.
Messages are displayed in both balloons until the next \_s or \e.

  • Materia
  • SSP
  • CROW
  • Ninix

Example

\_s本体側と相方側が同時に喋る。\_s
\_s[ID1,ID2,ID3...]

Synchronizes the scopes with the specified IDs.

  • SSP

Example

\_s[0,2,3]本体側と3人目のキャラと4人目のキャラが同時に喋る。\_s
\![wait,syncobject,同期オブジェクト名,オプション]

Waits until the specified named synchronization object (Mutex, Semaphore, Event, or WaitableTimer (since 2.8.28) on Windows) is signaled.
A Mutex is released after waiting; a Semaphore is released once after waiting; an Event or WaitableTimer is left unchanged after being acquired.

The following options can be specified.

  • Number or --timeout=number……Timeout duration. If omitted or set to 0, waits indefinitely (until the script is interrupted); if set to 1 or greater, waits for the specified number of milliseconds.
  • --reset=0 or 1……Whether to release the mutex and semaphore immediately after waiting. 1 releases them (default); 0 does not release them.
  • SSP
\![set,syncobject,同期オブジェクト名]

Sets the specified named synchronization object to the signaled state (activates it).
For a Semaphore, this increments its count by 1 using ReleaseSemaphore; for an Event, it uses SetEvent; for a WaitableTimer, it signals it immediately.
Setting a Mutex that is not owned has no effect and is ignored.

  • SSP2.8.28
\![reset,syncobject,同期オブジェクト名]

Sets the specified named synchronization object to the nonsignaled state (deactivates it).
For an Event, this uses ResetEvent; for a WaitableTimer, it uses CancelWaitableTimer to set it to the nonsignaled state.
Reset operations on Semaphores and Mutexes have no effect and are ignored.

  • SSP2.8.28

Choice Commands

\q[Title,ID]

Displays a choice.
After a selection, the SHIORI event OnChoiceSelect starts (SSP alone starts OnChoiceSelectEx first).
The ID is stored in Reference0.
To enable automatic text wrapping, use the \__q[] tag.

  • Materia
  • SSP
  • CROW
  • Ninix

Example

さくらスクリプトは好き?\q[好き,Like]\q[嫌い,Hate]。選択時に発生するOnChoiceSelectのReference0に、選んだものによって「like」か「hate」が格納されている。
\q[Title,OnID,r0,r1,...]

Displays a choice.
As above, if the ID starts with "On", selecting it starts the SHIORI event OnID (the event as written).
Its parameters are stored in Reference0 and onward in the order r0, r1, ...

  • Materia
  • SSP
  • CROW
  • Ninix

Example

好きな季節は?\q[春,OnLikeSeason,花見,桜]\q[夏,OnLikeSeason,花火,ひまわり]\q[秋,OnLikeSeason,月見,菊]\q[冬,OnLikeSeason,年越し,山茶花]。選択時に、OnLikeSeasonイベントが発生し、例えば「春」を選択したならReference0に「花見」、Reference1に「桜」が格納されている。
\q[Title,ID1,ID2,ID3...]

Displays a choice.
After a selection, the SHIORI event OnChoiceSelect starts.
ID* is stored in Reference*.

  • CROW
\q[Title,ID,r2,r3...]

Displays a choice.
After a selection, the SHIORI event OnChoiceSelectEx starts.
r* is stored in Reference* of OnChoiceSelectEx.
OnChoiceSelect also occurs after OnChoiceSelectEx, but nothing is stored in Reference1 or later, so it serves no purpose with this syntax.

  • SSP

Example

好きな季節は?\q[春,LikeSeason,花見,桜]\q[夏,LikeSeason,花火,ひまわり]\q[秋,LikeSeason,月見,菊]\q[冬,LikeSeason,年越し,山茶花]。選択時に、OnChoiceSelectExイベントが発生し、例えば「秋」を選択したなら、Reference0に「秋」、Reference1に「LikeSeason」、Reference2に「月見」、Reference3に「菊」が格納されている。
\q[Title,script:内容 to execute]

Displays a choice.
After a selection, the content after script: is executed as Sakura Script.

  • SSP

Example

\q[バルーンを閉じる,script:\e]\n入れ子も可能。\n\q[その1,"script:\q[その2,script:その3はない]"]
\q[ID][タイトル]または\q*[ID][タイトル]

[Legacy syntax] Displays a choice. * is a sequential number
After a selection, the SHIORI event with the ID number starts.
Unlike the syntax above, choices appear on separate lines.

  • Materia
  • SSP
\z

[Legacy syntax] The \e command in a script containing a choice.

  • Materia
  • SSP
\__q[ID,...]

The range up to \__q becomes a choice.
The ID specification is the same as for \q, including the special handling of IDs beginning with On or script:, and the handling of ID arguments.
The SHIORI Event generated after execution is also the same.
Unlike the \q[] tag, this command also inserts a line break automatically.

  • SSP
  • Ninix

Example

\__q[OnTest,testreference]間にさくらスクリプトも挟める。\n改行、\_l[50,50]カーソル移動も可能で、画像を貼れば画像が選択肢になる。\__qこの例の場合、IDが「On」から始まっているため、選択時にOnTestイベントが発生し、reference0には「testreference」が格納されている。
\*

In a script containing this command, choices do not time out.
This applies only within the current script. It also applies if written after the choice.

  • Materia
  • SSP
  • CROW

Example

\q[タイムアウトしない選択肢,NotTimeout]\*。選択時は通常通り、OnChoiceSelectExイベント(トークがなければOnChoiceSelectイベント)が発生する。
\![set,choicetimeout,時間]

Specifies the choice timeout duration. The unit is milliseconds.
The timer starts after all the talk has finished displaying.
This applies only within the current script. It also applies if written after the choice.
If the choice times out, the OnChoiceTimeout event occurs.

Omit the duration: returns to the default value
Duration is 0 or -1: no timeout

  • Materia
  • SSP
  • CROW

Example

\q[早押し,FastPush]\![set,choicetimeout,500]
\_a[ID]

The range up to \_a becomes an anchor. The choice does not time out, but the balloon times out as it does during normal talk.
Clicking the anchor starts the SHIORI event OnAnchorSelect (SSP alone starts OnAnchorSelectEx first).
The ID is stored in Reference0.

  • Materia
  • SSP
  • CROW
  • Ninix

Example

\_a[Hint]アンカー\_aをクリックするとOnAnchorSelectExイベント(トークがなければOnAnchorSelectイベント)が発生する。reference0には「Hint」が格納されている。
\_a[OnID,r0,r1...]

The range up to \_a becomes an anchor. The choice does not time out, but the balloon times out as it does during normal talk.
As above, if the ID starts with "On", clicking the anchor starts the SHIORI event OnID (the event as written).
Arguments following the ID are stored in Reference0 and onward in order.

  • SSP
  • Ninix

Example

\_a[OnHint,0]ヒント\_aが欲しいならクリックしよう。\_a[OnHint,1]ほらほら早く\_a。この2つのアンカーは、クリックするとSHIORIイベントOnHintが通知されるが、クリックしたものによってReference0の値が「0」か「1」に変わる。
\_a[ID,r2,r3...]

The range up to \_a becomes an anchor. The choice does not time out, but the balloon times out as it does during normal talk.
Clicking the anchor starts the SHIORI event OnAnchorSelectEx.
The text used as the anchor is stored in Reference0, the ID in Reference1, and subsequent arguments in Reference2 and onward.
OnAnchorSelect also occurs after OnAnchorSelectEx, but nothing is stored in Reference1 or later, so it serves no purpose with this syntax.

  • SSP

Example

\_a[CharactorName,対象テディ,年齢不詳]テディ\_aはいいやつだったのに。\_a[CharactorName,対象エミリ,0x10歳]エミリ\_aのとっておきのおやつを食べたばかりに……。アンカークリック時、OnAnchorSelectExイベントが発生する。「テディ」をクリックした場合、reference0に「テディ」、reference1に「CharactorName」、reference2に「対象テディ」、reference3に「年齢不詳」が格納されている。

Choice marker commands

\f[cursorstyle,形状]

Change the shape of the selected marker.
For details on how to specify it, see below.

  • SSP

Example

\f[cursorstyle,underline]\q[選択肢,OnTest]選択中の選択肢の表示を下線に変更する。
\f[cursorcolor,色指定] or \f[cursorbrushcolor,色指定]

The color inside the rectangle of the selected marker changes. Note that the color is determined by the effect of \f[cursormethod,描画方法].
For how to specify it, ※see below.

  • SSP

Example

\f[cursorbrushcolor,red]\q[選択肢,OnTest]選択中の選択肢の形状がsquareの場合、背景色が赤色になる。
\f[cursorpencolor,色指定]

Changes the color of the rectangular frame and underline of the selected marker.
For how to specify this, see ※refer below.

  • SSP

Example

\f[cursorpencolor,0,255,0]\q[選択肢,OnTest]選択中の選択肢の形状がsquareかunderlineの場合、枠線の色が緑色になる。
\f[cursorfontcolor,色指定]

Change the text color of the selected marker using RGB (0–255).
For the specification method, see the note below.

  • SSP

Example

\f[cursorfontcolor,default.anchor]\q[選択肢,OnTest]選択中の選択肢の文字色をアンカーと同じ色に変更する。
\f[cursormethod,描画方法]

Changes the drawing method for the selected marker. It is effective only when the shape is square or square+underline.
Any operator available for use with the Win32API SetROP2 function can be specified.
default returns to the balloon setting's default.
See: SetROP2 function (external site)
※Specify the mode name in lowercase, without "R2_". Example: notmaskpen

  • SSP

Example

\f[cursormethod,copypen]\f[cursorbrushcolor,red]\q[選択肢,OnTest]選択中の選択肢の、枠内の描画方法を変更する。copypenの場合、cursorbrushcolorの色がそのまま描画される。
\f[cursornotselectstyle,形状]

Change the shape of the unselected marker.
See ※below for how to specify it.

  • SSP

Example

\f[cursornotselectstyle,underline]\q[選択肢,OnTest]非選択中の選択肢の表示を下線に変更する。
\f[cursornotselectcolor,色指定] or \f[cursornotselectbrushcolor,色指定]

Changes the color inside the rectangle of the non-selected marker. Note that the color is determined by the effect of \f[cursornotselectmethod,描画方法].
For details on how to specify it, see below.

  • SSP

Example

\f[cursornotselectbrushcolor,red]\q[選択肢,OnTest]非選択中の選択肢の形状がsquareの場合、背景色が赤色になる。
\f[cursornotselectpencolor,色指定]

Changes the color of the rectangular border and underline of the unselected marker.
For how to specify the color, see below.

  • SSP

Example

\f[cursornotselectpencolor,0,255,0]\q[選択肢,OnTest]非選択中の選択肢の形状がsquareかunderlineの場合、枠線の色が緑色になる。
\f[cursornotselectfontcolor,色指定]

Change the text color of the unselected marker.
For how to specify it, see below.

  • SSP

Example

\f[cursornotselectfontcolor,default.anchor]\q[選択肢,OnTest]非選択中の選択肢の文字色をアンカーと同じ色に変更する。
\f[cursornotselectmethod,描画方法]

Changes how the unselected marker is drawn. Effective only when the shape is square or square+underline.
All operators available for use with the Win32API SetROP2 function can be specified.
default returns to the balloon setting's standard.
Reference: SetROP2 function (external site)
※Specify a lowercase mode name without 「R2_」.

  • SSP

Example

\f[cursornotselectmethod,copypen]\f[cursornotselectbrushcolor,red]\q[選択肢,OnTest]非選択中の選択肢の、枠内の描画方法を変更する。copypenの場合、cursornotselectbrushcolorの色がそのまま描画される。
\f[anchorstyle,形状]

Change the shape of the selected anchor.
For how to specify it, see ※refer below.

  • SSP

Example

\f[anchorstyle,square]\_a[OnTest]アンカー\_a選択中のアンカーの表示を枠(矩形)に変更する。
\f[anchorcolor,色指定] or \f[anchorbrushcolor,色指定]

Change the color inside the rectangle of the selected anchor. Note that the color is determined by the effect of \f[anchormethod,描画方法].
For how to specify the color, see ※refer below.

  • SSP

Example

\f[anchorbrushcolor,red]\_a[OnTest]アンカー\_a選択中のアンカーの形状がsquareの場合、背景色が赤色になる。
\f[anchorpencolor,色指定]

Change the color of the rectangular border and underline of the selected anchor.
For how to specify the color, see ※refer below.

  • SSP

Example

\f[anchorpencolor,0,255,0]\_a[OnTest]アンカー\_a選択中のアンカーの形状がsquareかunderlineの場合、枠線の色が緑色になる。
\f[anchorfontcolor,色指定]

Change the text color of the selected anchor.
For how to specify the color, see ※refer below.

  • SSP

Example

\f[anchorfontcolor,default.cursor]\_a[OnTest]アンカー\_a選択中のアンカーの文字色を選択中選択肢と同じ色に変更する。
\f[anchormethod,描画方法]

Change the drawing method for the selected anchor. Effective only when the shape is square or square+underline.
All operators supported by the Win32API SetROP2 function can be specified.
Specify default to restore the balloon's default setting.
Reference: SetROP2 function (external site)
Note: Specify the lowercase mode name without "R2_".

  • SSP

Example

\f[anchormethod,copypen]\f[anchorbrushcolor,red]\_a[OnTest]アンカー\_a選択中のアンカーの、枠内の描画方法を変更する。copypenの場合、anchorbrushcolorの色がそのまま描画される。
\f[anchornotselectstyle,形状]

Change the shape of unselected anchors.
For how to specify it, see ※refer below.

  • SSP

Example

\f[anchornotselectstyle,square]\_a[OnTest]アンカー\_a非選択のアンカーの表示を枠(矩形)に変更する。
\f[anchornotselectcolor,色指定] or \f[anchornotselectbrushcolor,色指定]

Change the color inside the rectangle of an unselected anchor. Note that the color is determined by the effect of \f[anchornotselectmethod,描画方法].
For how to specify the color, see ※refer below.

  • SSP

Example

\f[anchornotselectbrushcolor,red]\_a[OnTest]アンカー\_a非選択のアンカーの形状がsquareの場合、背景色が赤色になる。
\f[anchornotselectpencolor,色指定]

Change the color of the rectangular border and underline of an unselected anchor.
For how to specify the color, see ※refer below.

  • SSP

Example

\f[anchornotselectpencolor,0,255,0]\_a[OnTest]アンカー\_a非選択のアンカーの形状がsquareかunderlineの場合、枠線の色が緑色になる。
\f[anchornotselectfontcolor,色指定]

Change the text color of an unselected anchor.
For how to specify the color, see ※refer below.

  • SSP

Example

\f[anchornotselectfontcolor,default.cursor]\_a[OnTest]アンカー\_a非選択のアンカーの文字色を選択中選択肢と同じ色に変更する。
\f[anchornotselectmethod,描画方法]

Change the drawing method for unselected anchors. Effective only when the shape is square or square+underline.
All operators supported by the Win32API SetROP2 function can be specified.
Specify default to restore the balloon's default setting.
Reference: SetROP2 function (external site)
Note: Specify the lowercase mode name without "R2_".

  • SSP

Example

\f[anchornotselectmethod,copypen]\f[anchornotselectbrushcolor,red]\_a[OnTest]アンカー\_a非選択のアンカーの、枠内の描画方法を変更する。copypenの場合、anchornotselectbrushcolorの色がそのまま描画される。
\f[anchorvisitedstyle,形状]

Change the shape of visited anchors.
For information on how to specify this, see ※ below.

  • SSP

Example

\f[anchorvisitedstyle,square]\_a[OnTest]アンカー\_a訪問済みのアンカーの表示を枠(矩形)に変更する。
\f[anchorvisitedcolor,色指定] or \f[anchorvisitedbrushcolor,色指定]

Change the color inside the rectangle of a visited anchor. Note that the color is determined by the effect of \f[anchorvisitedmethod,描画方法].
For how to specify the color, see ※refer below.

  • SSP

Example

\f[anchorvisitedbrushcolor,red]\_a[OnTest]アンカー\_a訪問済みのアンカーの形状がsquareの場合、背景色が赤色になる。
\f[anchorvisitedpencolor,色指定]

Change the color of the rectangular border and underline of a visited anchor.
For how to specify the color, see ※refer below.

  • SSP

Example

\f[anchorvisitedpencolor,0,255,0]\_a[OnTest]アンカー\_a訪問済みのアンカーの形状がsquareかunderlineの場合、枠線の色が緑色になる。
\f[anchorvisitedfontcolor,色指定]

Change the text color of a visited anchor.
For how to specify the color, see ※refer below.

  • SSP

Example

\f[anchorvisitedfontcolor,default.cursor]\_a[OnTest]アンカー\_a訪問済みのアンカーの文字色を選択中選択肢と同じ色に変更する。
\f[anchorvisitedmethod,描画方法]

Change the drawing method for visited anchors. Effective only when the shape is square or square+underline.
All operators supported by the Win32API SetROP2 function can be specified.
Specify default to restore the balloon's default setting.
Reference: SetROP2 function (external site)
Note: Specify the lowercase mode name without "R2_".

  • SSP

Example

\f[anchorvisitedmethod,copypen]\f[anchorvisitedbrushcolor,red]\_a[OnTest]アンカー\_a訪問済みのアンカーの、枠内の描画方法を変更する。copypenの場合、anchorvisitedbrushcolorの色がそのまま描画される。

Notes

How to specify the shape

square
Display a rectangle.
underline
Display an underline.
square+underline
Display a rectangle and an underline.
none
Do not display.
default
Return to the balloon setting's default.

How to specify the text color

This is basically similar to how colors are represented in HTML and CSS.
[2.8.93] Values that do not match any of the following (such as non-numeric R,G,B values or color codes containing non-hexadecimal characters) are ignored. Previously, they could be treated as black.

R,G,B
Represent the brightness of the three primary colors, red, green, and blue, respectively, as decimal values from 0 to 255, separated by commas.
0,0,0 is black; 255,255,255 is white.
R%,G%,B%
Represent the brightness of the three primary colors, red, green, and blue, respectively, as percentages from 0% to 100%, separated by commas.
0%,0%,0% is black; 100%,100%,100% is white.
Hexadecimal color code
Join the brightness values of the three primary colors, red, green, and blue, expressed in hexadecimal after a "#", as in #07f.
Each color can be represented using either two digits, for a total of six, or one digit, for a total of three.
Hexadecimal letters may be uppercase or lowercase.
#000000 or #000 is black; #ffffff or #fff is white.
Predefined keywords
Specify a color using a keyword representing its name, such as red, white, or black (all lowercase).
For colors whose definitions differ between X11 color and W3C color (such as green and gray), the W3C color definition is used.
Color samples: CSS Color Module Level 3 Extended color keywords(external link)
default
Writing default in the color specification sets the specified text to its default color.
The default color is defined in the balloon's descript.txt, among other places (black if undefined).
disable
Writing disable in the color specification sets the color to that used for disabled display.
default.anchor
Specifying default.anchor in the color specification changes the specified text color to the default text color of an anchor when selected.
[2.5.76 - Became available for ordinary text]
default.anchornotselect
Specifying default.anchornotselect in the color specification changes the specified text color to the default text color of an anchor when not selected.
[2.5.76 - Became available for ordinary text]
default.anchorvisited
Specifying default.anchorvisited in the color specification changes the specified text color to the default text color of a visited anchor.
[2.5.76 - Became available for ordinary text]
default.cursor
※Can only be specified for the text color of choices and anchors.
Specifying default.cursor in the color specification changes the specified text color to the default text color of a choice when selected.
default.cursornotselect
※Can only be specified for the text color of choices and anchors.
Specifying default.anchor in the color specification changes the specified text color to the default text color of a choice when not selected.
default.plain
※Can only be specified for the text color of choices and anchors.
Specifying default.plain in the color specification changes the specified text color to the default text color of ordinary text.

Event Commands

\e

Ends the event or message.
Scripts written after this are not run or displayed.
Some Sakura Script effects end.

  • Materia
  • SSP
  • CROW
  • Ninix

Example

この文章は表示される。\eここから表示されない。
\-

Exits the baseware.
If multiple ghosts are running in SSP, only the ghost that ran this command exits.

  • Materia
  • SSP
  • CROW
  • Ninix

Example

このスクリプトの再生後、ゴーストが終了する。\-
\a

[Old specification] Speaks random talk.
A remnant from the era when the baseware managed all scripts; under the current specification, this tag only raises the OnAITalk event.

  • SSP
  • Ninix
\![updatebymyself(,オプション,オプション...)]

Starts a network update check event.
The user can also initiate this from the right-click menu or Ghost Explorer.
Options are supported only by SSP. See Specifying update options.

  • Materia
  • SSP
  • CROW
  • Ninix

Example

ネットワーク更新を開始。\![updatebymyself]
\![update,platform]

Starts the baseware network update event.
If an update is available, the ghost exits (OnBasewareUpdating, or OnClose if there is no talk) and then starts again (OnBasewareUpdated, or OnBoot if there is no talk).
If there is no update, only a popup is displayed and no SHIORI event occurs.

  • SSP
  • CROW

Example

ベースウェアの更新を実行。\![update,platform]
\![update,更新対象(,オプション,オプション...)]

Starts a network update event for the specified update targets.
ghost, shell, and balloon can be specified. To update multiple targets at once, separate them with "+".
Setting the update target to all is equivalent to \![updatebymyself].
When \![update,ghost+shell+balloon] is specified, unlike \![updatebymyself], the update is forced regardless of the SSP settings.
When updating anything other than ghost, if an update is available, SHIORI events such as OnUpdateOtherReady are sent, along with the event group in which OnUpdate is changed to OnUpdateOther. After all updates are complete, OnUpdateResult is sent as a summary of the results.
Options are supported only by SSP. See Specifying update options.

  • SSP

Example

シェルの更新を実行。\![update,shell]
\![updateother,更新対象/オプション群,...]

Starts a network update event for update targets with arbitrary names. Targets that are not running can also be specified.
Any number of the following options can be added.
--balloon=balloon name
--shell=shell name
--plugin=plugin name
--headline=headline name
--language=language resource name
If an update is available, SHIORI events such as OnUpdateOtherReady are sent, along with the event group in which OnUpdate is changed to OnUpdateOther. After all updates are complete, OnUpdateResultEx is sent as a summary of the results.
Options specified with --option= are supported only by SSP. See Specifying update options.

  • SSP

Example

プラグイン「共有変数プラグイン」「うかてん」の更新を実行。\![updateother,--plugin=共有変数プラグイン,--plugin=うかてん]

Notes

Update Options

checkonly
Instead of normal update events, the SHIORI event OnUpdateCheckComplete is notified, or OnUpdateCheckFailure if the check fails. Processing is interrupted as soon as it is possible to determine whether an update is available.
After all updates are complete, a summary event is raised: OnUpdateCheckResultEx for updateother, and OnUpdateCheckResult otherwise.
testonly
Update files are downloaded as they would be in a production update, but the actual files are not replaced.
In SSP, this behaves the same as "Update Full Check", which can be run from the development palette.
recovery [SSP 2.5.26~]
Runs the update in recovery mode. In SSP, this behaves the same as updating while holding down the key configured under Settings-Ghost (1)-Enable key to switch to recovery mode.
All local update definition files are ignored. Only update definitions downloaded from the network are used; these are compared against the hashes of all local files, and files that differ are downloaded.
\6

Performs the actual time adjustment during a clock synchronization event.
This is generally done in the SHIORI event OnSNTPCompare, which is notified when a time server is connected to.

  • Materia
  • SSP
  • CROW

Example

時間をサーバと合わせる。\6
\7

Starts a clock synchronization event.
The SHIORI event OnSNTPBegin is notified, and once the time is obtained from the time server, the SHIORI event OnSNTPCompare is notified.

  • Materia
  • SSP
\![executesntp]

Same as \7.

  • Materia
  • SSP
  • CROW

Example

時刻サーバに問い合わせを行う。\![executesntp]
\![execute,headline,ヘッドライン名]

Starts a headline sensor event.
Setting the headline name to random selects one at random.
Setting it to lastinstalled starts the last installed headline sensor.

  • SSP

Example

ヘッドラインをどれか1つランダムに実行。\![execute,headline,random]
\![execute,calendarplugin,カレンダープラグイン名]

Starts retrieving appointments from a calendar plugin (schedule sensor). This is equivalent to selecting a plugin from the calendar menu.
This command runs even when the calendar is not displayed.
Setting the calendar plugin name to random selects one at random.
Setting it to lastinstalled runs the last calendar plugin installed. However, this does not work if SSP has been exited once.
If no matching calendar plugin is found, this command is ignored.
The calendar plugin name is reported by installedcalendarpluginname.

  • SSP2.8.93
\![biff(,アカウント名)]

Starts a mail-check event.
Using \![biff,アカウント名] runs a mail check for a specific account name.
The account name is provided by configuredbiffname.

  • Materia
  • SSP(account name supported in 2.5)
  • CROW

Example

メールチェックイベントを開始。\![biff]
\![vanishbymyself]

Uninstalls the current ghost without a request for permission to disappear.
Note that this runs immediately without showing a confirmation dialog.
Whether deletion occurs depends on the user's SSP settings.

The following options can be specified in SSP
\![vanishbymyself,ゴースト名] Specifies which ghost to switch to after deletion (if it cannot be found, SSP selects one automatically as appropriate)
\![vanishbymyself,--option=query] 2.5.82 : Displays a deletion confirmation dialog. This is the same as when run from the menu.

  • Materia
  • SSP
  • Ninix

Example

自分自身を削除。Send Boxからのサンプル入力での実行時は要注意。\![vanishbymyself]
\+

Randomly switches to another ghost.
Switching with this script does not notify the SHIORI event OnGhostChanging.

  • Materia
  • SSP
  • Ninix

Example

ランダムチェンジ。\+
\_+

Switches to the next ghost in sequence (sequential change). This switches to the ghost below the current one in the Ghost Explorer.
If the current ghost is at the bottom of the list, switches to the ghost at the top of the list.
This script does not notify the SHIORI event OnGhostChanging when switching ghosts.

  • Materia
  • SSP
  • Ninix

Example

リストの次のゴーストへチェンジ。\_+
\![change,ghost,ゴースト名(,--option=raise-event)]

Switches to the specified ghost.
Set the ghost name to random for a random change (equivalent to \+).
Set it to sequential for a sequential change (equivalent to \_+).
If the specified ghost does not exist, the command is ignored.

Set the ghost name to lastinstalled to switch to the last installed ghost. This is invalid if SSP has been shut down since installation.
Set the ghost name to random to switch to a random ghost.

[SSP 2.9.35] The ghost's UUID can also be specified instead of its name, avoiding confusion between ghosts with the same name.

In SSP 2.4.74 and later, adding --option=raise-event after the ghost name notifies OnGhostChanging, as when switching from the menu.
In this case, the operation can also be canceled with a balloon break (normally a double-click).
If omitted, the event is not notified.

  • Materia
  • SSP
  • CROW
  • Ninix

Example

Emily/Phase4.5に交代。\![change,ghost,Emily/Phase4.5]
\![change,shell,シェル名(,--option=raise-event)]

Switches to the specified shell.
If the shell does not exist, the command is ignored.
After the change, the SHIORI event OnShellChanged is notified.

Set the shell name to lastinstalled to switch to the last installed ghost. This is invalid if SSP has been shut down since installation.
Set the shell name to random to switch to a random shell.

[SSP 2.9.35] The shell's UUID can also be specified instead of its name.

In SSP 2.4.74 and later, adding --option=raise-event after the shell name notifies OnShellChanging, as when switching from the menu.
In this case, the operation can also be canceled with a balloon break (normally a double-click).
If omitted, the event is not notified.

  • SSP
  • CROW
  • Ninix

Example

masterシェルに切り替え。\![change,shell,master]
\![change,balloon,バルーン名]

Switches to the specified balloon.
If the balloon does not exist, the command is ignored.
After the change, the SHIORI event OnBalloonChange is notified.

Set the balloon name to lastinstalled to switch to the last installed balloon. This is invalid if SSP has been shut down since installation.
Set the balloon name to random to switch to a random balloon.

[SSP 2.9.35] The balloon's UUID can also be specified instead of its name.

  • SSP
  • Ninix

Example

SSPデフォルト+にバルーン変更。\![change,balloon,SSPデフォルト+]
\![change,calendarskin,カレンダースキン名]

Switch the calendar skin. This is the same as selecting a skin from the calendar menu.
If the specified calendar skin does not exist, the command is ignored.
If the calendar has never been opened, only the setting is changed; it takes effect the next time the calendar is opened.

Set the calendar skin name to lastinstalled to switch to the last installed calendar skin. However, this is disabled if SSP has been exited once.
Set the calendar skin name to random to switch to a random skin.
The calendar skin name is notified via installedcalendarskinname.

  • SSP2.8.93
\![call,ghost,ゴースト名(,--option=raise-event)]

Calls the ghost specified by name.
Set the ghost name to lastinstalled to call the last installed ghost.
Set the ghost name to random to call a random ghost.
[SSP 2.9.35] The ghost's UUID can also be specified instead of its name, avoiding confusion between ghosts with the same name.

In SSP 2.4.74 and later, adding --option=raise-event after the ghost name notifies OnGhostCalling, as when switching from the menu.
If omitted, the event is not notified.

  • SSP
  • Ninix

Example

Emily/Phase4.5を呼び出す。\![call,ghost,Emily/Phase4.5]
\v

Displays the character in front. From this script onward, the character is always displayed on top.
However, which scope is in front (the base character or the companion) depends on user interaction.

This remains in effect until the ghost exits.

  • Materia
  • SSP
  • Ninix

Example

\vこのスクリプト以降、最前面に表示されるようになる。
\![set,windowstate,stayontop]

Keep the window in the foreground. From this point on in the script, it is always displayed on top.

Valid until the ghost ends.

  • Materia
  • SSP
  • CROW
  • Ninix

Example

\![set,windowstate,stayontop]このスクリプト以降、最前面に表示されるようになる。
\![set,windowstate,!stayontop]

Do not keep the window in the foreground. From this point on in the script, it is stacked with other windows in the usual way.

Valid until the ghost ends.

  • Materia
  • SSP
  • CROW
  • Ninix

Example

\![set,windowstate,!stayontop]このスクリプト以降、アクティブなウインドウが手前に表示されるようになる。
\![set,windowstate,minimize]

Minimize the window.

  • Materia
  • SSP

Example

最小化。\![set,windowstate,minimize]
\![save,wallpaper]

Temporarily saves the current wallpaper so it can be restored with restore.
[2.8.93] In window mode, saves the window-mode background (background type, image, placement, and color) instead of the OS wallpaper. This is stored separately from content saved in normal mode.

  • SSP2.8.11
\![restore,wallpaper]

Restores the wallpaper saved with save,wallpaper.
[2.8.93] In window mode, restores the background saved with save,wallpaper while in window mode as the window-mode background (the OS wallpaper is not changed). Does nothing if nothing was saved in window mode.

  • SSP2.8.11
\![set,wallpaper,ファイル名,オプション]

Set the specified file as the wallpaper.
The file name can be an absolute or relative path. Relative paths are searched in this order: [the executing ghost's folder]/ghost/master, [the executing ghost's folder], and the SSP folder.
If the path starts with !, it is treated as a relative path from the SSP folder. If it starts with \ or /, it is treated as a relative path from the root of the drive containing SSP.
If no file name is specified, or it is empty, the wallpaper setting is cleared (leaving a background with only a background color and no wallpaper).
The options are as follows.

center
Display centered (default if omitted)
tile
Display tiled
stretch
Enlarge to fill the monitor, ignoring the image's aspect ratio.
stretch-x
Enlarge the image, preserving its aspect ratio, to fit the monitor width. Windows 7 or later only.
stretch-y
Enlarge the image, preserving its aspect ratio, to fit the monitor height. Windows 7 or later only.
fit
Scale the image, preserving its aspect ratio, so the whole image fits on the monitor. The background color appears in the margins.
fill
Scale the image, preserving its aspect ratio, to cover the entire monitor. Any parts that extend beyond the monitor are not displayed.
span
In a multi-monitor environment, enlarge the image to span all monitors. Windows 10 or later only.

[2.8.93] The following format can also be used. Arguments beginning with -- can be given in any order, and may be mixed with the file name and options specified above (arguments not beginning with -- are treated as a file name or option in the order they appear).

--file=ファイル名
The file to use as the wallpaper. Same as the file name above.
--position=配置
Image placement. Specify one of the option values above. Defaults to center if omitted.
--color=色指定
Background color (used for image margins, or as the solid background color when no image is specified). Of the methods for specifying text colors, R,G,B, R%,G%,B%, hexadecimal color codes, and predefined keywords can be used.
For formats containing commas, such as R,G,B, enclose the entire argument in double quotes, as in "--color=255,128,0".
If a value that cannot be interpreted as a color is specified, this tag does nothing.

[2.8.93] The behavior is as follows, depending on whether a file name and --color are specified.

File name only
Set the image as the wallpaper. The background color is not changed.
File name and --color
Set the image as the wallpaper and change the background color.
--color only
Set a solid background in the specified color, without an image.
Neither
Clear the wallpaper setting (remove the wallpaper, leaving only the background color. The background color is not changed).

[2.8.93] When running in window mode, this changes the background of the window-mode window displaying the ghost, rather than changing the OS wallpaper (if all ghosts share one window, the background of all ghosts changes).
The background setting is treated as "Background - Image" and is retained after SSP exits.
Only span is treated the same as fill for placement. If --color is omitted, the background color is set to the image's dominant color.
If neither a file name nor --color is specified, the background is restored to "Background - Desktop" (the setting that reproduces the OS wallpaper).
Changing the wallpaper by dragging and dropping an image file likewise changes the window-mode background.

  • SSP
  • Ninix

Example

Emily/Phase4.5のサムネイルを壁紙にする。\![set,wallpaper,ghost/emily4/thumbnail.png]
画像全体が収まるように表示し、余白を紺色にする。\![set,wallpaper,--file=ghost/emily4/thumbnail.png,--position=fit,--color=navy]
画像なしの単色背景にする。\![set,wallpaper,"--color=32,64,96"]
\![set,tasktrayicon,ファイル名.ico,テキスト(,--duration=待機時間(,--runcount=繰り返し回数))]

Apply the specified icon file to the notification area (task tray) icon.
A relative path can be used from [the folder of the running ghost] or from [the folder of the running ghost]/ghost/master.
The text, which is optional, is displayed when the mouse is placed over the icon. By default, it is something like "SSP/Emily/Phase4.5" or SSP/[the name of the running ghost].
Specifying --duration=wait time (ms) allows the icon to be animated. In this case, specifying filename.ico loads multiple files in numerical order, such as filename00.ico, filename01.ico, and so on, and displays them as an animation at the specified interval (in milliseconds). [SSP 2.5.58~]
Additionally, specifying --runcount sets the number of times the animation repeats. If unspecified, it repeats indefinitely. [SSP 2.5.59~]

  • SSP

Example

\![set,tasktrayicon,normal.ico,ゴースト/通常モード]アイコンを[実行したゴーストのフォルダ]/ghost/masterにあるnormal.icoにし、マウスオン時のメッセージを「ゴースト/通常モード」に変更する。
\![set,trayballoon,オプション,オプション,オプション...]

Displays a balloon from the tray icon.
OnTrayBalloonClick is raised when the balloon is dismissed by clicking it.
OnTrayBalloonTimeout is raised when it times out or is closed using the close button.
The following options can be specified.

On Windows 10 and later, if file association settings are set to "Shortcuts only" or higher (excluding kiosk mode and read-only mode; setting changes take effect from the next startup), a toast notification is shown instead of a balloon and remains in the notification center. In this case, it is not displayed by the tray icon. If the conditions are not met or displaying the toast fails, it is shown as a balloon as before.
For toast notifications, OnTrayBalloonClick is raised when clicked, and OnTrayBalloonTimeout is raised when closed using the close button or when it times out and moves to the notification center. No event is raised if it is clicked after moving to the notification center.[2.9.14]

--text=テキスト
Text to display in the balloon; specify multiple values for multiple lines. (Required)
--title=タイトル
Balloon title.
--icon=アイコン設定名
Icon setting to use for the balloon.
In toast notifications, the icon is displayed to the left of the message.[2.9.14]
info
Information icon
error
Error icon
warning
Warning icon
none
None
--timeout=秒数
Balloon display duration (in seconds). Only values from 10 to 30 seconds can be specified. Ignored on Windows 7 and later. Also ignored for toast notifications.[2.9.14]
  • SSP

Example

\![set,trayballoon,--text=何らかのエラーにより、処理が失敗しました,--title=エラーが発生しました,--icon=error]
\![set,otherghosttalk,true|false|before|after]

Sets whether to send the OnOtherGhostTalk notification. The default is false.
When set to anything other than false, OnOtherGhostTalk is sent when another concurrently running ghost speaks.
If before is specified, the notification is sent before it speaks; if after is specified, it is sent after it speaks. true is equivalent to after.

Valid until the ghost ends.

  • SSP
  • Ninix

Example

                            \![set,otherghosttalk,true]これ以降、同時に起動しているゴーストが何か喋り終わるたびに、OnOtherGhostTalkが通知されるようになる。
\![set,othersurfacechange,trueかfalse]

Sets whether to send the OnOtherSurfaceChange notification. The default is false.
When set to true, OnOtherSurfaceChange is sent whenever the surface of another concurrently running ghost changes.

  • SSP
  • Ninix

Example

                            \![set,othersurfacechange,true]これ以降、同時に起動しているゴーストのサーフェスが変わるたびに、OnOtherSurfaceChangeが通知されるようになる。
\![raise,イベント名,r0,r1,r2...]

Executes an event.
The third and subsequent arguments are stored in Reference0 onward, in order.

  • Materia
  • SSP
  • CROW
  • Ninix

Example

このトークの末端にあるraiseが再生された時、SHIORIイベント「OnRaiseTest」がSSPから通知される。Reference0には「test」が入っている。\![raise,OnRaiseTest,test]
\![embed,イベント名,r0,r1,r2...]

A special tag that “embeds” an event's result in this tag within the currently executing script.
The options are used in the same way as for \![raise]; the third and subsequent arguments are stored in Reference0 onward, in order.

When the \![embed] tag is encountered during execution, the specified event is called. If it returns a result, the entire \![embed] tag is replaced with the result string, and script execution resumes from the first character of the replacement string.
(This feature provides a broader, more general-purpose mechanism for synchronous SAORI calls during Satori execution.)

This was initially implemented for use with the property system as a way to call the property system, which does not itself return a result, and then use the result in the immediately following \![embed] tag to dynamically change processing, all “within a single script execution.” However, there is no such restriction in particular; this feature can be used whenever you want to perform some processing in sync with script execution.

  • SSP
  • Ninix

Example

このトークの最後に、SHIORIイベント「OnEmbedTest」の実行結果が表示される。raiseと違いスクリプトが1つなので、スクリプト終了で効果が切れるさくらスクリプト(フォント変更など)が持続する。\![embed,OnEmbedTest]
里々のテンプレートでこのスクリプトを実行した場合は、この文の後にランダムトークがくっつく。\![embed,OnTalk]
\![timerraise,時間,繰り返すか否か,イベント名,r0,r1,r2...]

Runs an event after the specified wait time (in milliseconds).
For "whether to repeat," specify 0 to trigger the event repeatedly at the specified interval, or 1 or greater to trigger it only once.
The fifth and subsequent arguments are references.
Events with different names can each be run independently, but repeated runs of an event with the same name overwrite the previous one.
To cancel, run Sakura Script with the same event name and a time of 0.
The timer persists after a network update.

When "whether to repeat" is 0, the timer remains active until the specified event occurs. When "whether to repeat" is 1 or greater, it remains active until the ghost exits.

  • SSP

Example

\![timerraise,5000,1,OnTimerraiseTest,test]5秒後(5000ミリ秒)後に、OnTimerraiseTestが発生する。さくらスクリプトが実行された瞬間から時間をカウントする。\![timerraise,0,1,OnTimerraiseTest]ここで先ほどのタイマー予約をキャンセル。
\![raiseother,ゴースト名,イベント名,r0,r1,r2...]

Notifies another running ghost of an event.
The fourth and subsequent arguments are references.
Set the ghost name to "__SYSTEM_ALL_GHOST__" to notify all running ghosts.
Ghost names must be specified directly; multiple names can be separated by byte value 1.
[SSP 2.9.35] The UUID of a running ghost can also be specified instead of its name. If multiple ghosts with the same UUID are running, the visible ghost is notified; if none is visible, the first ghost in the running-ghost list is notified.

  • SSP
  • Ninix

Example

\![raiseother,Emily/Phase4.5,OnRoastedPotate,sweet potato]Emily/Phase4.5が同時起動していれば、Emily/Phase4.5にOnRoastedPotateを通知。Reference0には「sweet potato」が入っている。
\![timerraiseother,時間,繰り返すか否か,ゴースト名,イベント名,r0,r1,r2...]

Notifies other running ghosts of an event after a specified delay in milliseconds.
For "whether to repeat", 0 causes the event to recur at the specified interval, while 1 or greater causes it to occur only once.
The sixth and subsequent arguments are references.
Events with different names can be scheduled independently, but repeatedly scheduling an event with the same name overwrites the previous schedule.
Running Sakura Script with the same event name and a time of 0 cancels the schedule.
If the ghost name is __SYSTEM_ALL_GHOST__, all running ghosts are notified.
Multiple ghost names can be specified, separated by byte value 1.
[SSP 2.9.35] The UUID of a running ghost can also be specified instead of its name (as with raiseother). The destination is resolved each time the event is sent, not when the timer is set.

  • SSP

Example

\![timerraiseother,30000,0,Emily/Phase4.5,OnRoastedPotate,sweet potato]Emily/Phase4.5が同時起動していれば、Emily/Phase4.5に30秒(30000ミリ秒)おきに繰り返しOnRoastedPotateを通知。Reference0には「sweet potato」が入っている。\![timerraiseother,0,1,Emily/Phase4.5,OnRoastedPotate]ここで繰り返し通知をキャンセル。
\![raiseplugin,プラグインのIDまたは名前,イベント名,r0,r1,r2...]

Sends the specified event to a plugin.
Set the plugin name to random to select one at random.
[SSP 2.9.35] The plugin's UUID can also be specified. It is matched if there is no match against an ID or name.
Set it to lastinstalled to start the last installed plugin.

  • SSP

Example

\![raiseplugin,スタンプ帳,OnStampAdd,[実行したゴーストのフォルダ]/ghost/master/stamp.png,マイスタンプ,スタンプを押したよ。よろしくね。]プラグイン「スタンプ帳」に、[実行したゴーストのフォルダ]/ghost/master/stamp.pngの画像とメッセージを登録する。
\![timerraiseplugin,時間,繰り返すか否か,プラグインのIDまたは名前,イベント名,r0,r1,r2...]

Sends the specified event to a plugin after a specified delay in milliseconds.
For "whether to repeat", 0 causes the event to recur at the specified interval, while 1 or greater causes it to occur only once.
Events with different names can be scheduled independently, but repeatedly scheduling an event with the same name overwrites the previous schedule.
Running Sakura Script with the same event name and a time of 0 cancels the schedule.
[SSP 2.9.35] The plugin's UUID can also be specified (as with raiseplugin). The destination is resolved each time the event is sent, not when the timer is set.

  • SSP

Example

\![timerraiseplugin,60000,0,実体化,OnMenuExec]プラグイン「実体化」を60秒(60000ミリ秒)おきに繰り返し実行。\![timerraiseplugin,0,0,実体化,OnMenuExec]ここで繰り返し実行をキャンセル。
\![notify,イベント名,r0,r1,r2...]

As with raise, the only difference is that even if this notification event returns a value, it is not reflected in SSP.

  • SSP

Example

\![notify,OnNotifyTest,test]OnNotifyTestが通知され、Reference0に「test」が入っている。OnNotifyTestでトークを書いてもSSPに反映されない。
\![timernotify,時間,繰り返すか否か,イベント名,r0,r1,r2...]

Like timerraise, except that any values returned by this notification event are not applied to SSP.

  • SSP

Example

\![notify,OnNotifyTest,test]OnNotifyTestが通知され、Reference0に「test」が入っている。OnNotifyTestでトークを書いてもSSPに反映されない。
\![notifyother,ゴースト名,イベント名,r0,r1,r2...]

This is the same as raiseother, except that any value returned by the notification event is not reflected in SSP. A UUID can also be specified instead of a ghost name, as with raiseother.

  • SSP

Example

\![notifyother,Emily/Phase4.5,OnRoastedPotate,sweet potato]Emily/Phase4.5が同時起動していれば、Emily/Phase4.5にOnRoastedPotateを通知。Reference0には「sweet potato」が入っている。もしこの通知イベントでEmily/Phase4.5が何かトークをしても、バルーンには何も表示されない。
\![timernotifyother,時間,繰り返すか否か,ゴースト名,イベント名,r0,r1,r2...]

This is the same as timerraiseother, except that any value returned by the notification event is not reflected in SSP. A UUID can also be specified instead of the ghost name, as with timerraiseother.

  • SSP

Example

\![notifyother,Emily/Phase4.5,OnRoastedPotate,sweet potato]Emily/Phase4.5が同時起動していれば、Emily/Phase4.5にOnRoastedPotateを通知。Reference0には「sweet potato」が入っている。もしこの通知イベントでEmily/Phase4.5が何かトークをしても、バルーンには何も表示されない。
\![notifyplugin,プラグインのIDまたは名前,イベント名,r0,r1,r2...]

This is the same as raiseplugin, except that any value returned by the notification event is not reflected in SSP. A UUID can also be specified, as with raiseplugin.

  • SSP

Example

\![notifyplugin,スタンプ帳,OnStampAdd,[実行したゴーストのフォルダ]/ghost/master/stamp.png,マイスタンプ,スタンプを押したよ。よろしくね。]プラグイン「スタンプ帳」の登録イベントをnotifyで呼び出す。プラグイン実行で処理は行われるが、ゴースト側への返答は無視される。
\![timernotifyplugin,時間,繰り返すか否か,プラグインのIDまたは名前,イベント名,r0,r1,r2...]

Same as timerraiseplugin, except that any value returned by this notification event is not reflected in SSP. A UUID can also be specified.

  • SSP

Example

\![notifyplugin,スタンプ帳,OnStampAdd,[実行したゴーストのフォルダ]/ghost/master/stamp.png,マイスタンプ,スタンプを押したよ。よろしくね。]プラグイン「スタンプ帳」の登録イベントをnotifyで呼び出す。プラグイン実行で処理は行われるが、ゴースト側への返答は無視される。

Sound commands

\8[ファイル名]

Play a WAV file in the current ghost's folder.

  • Materia
  • SSP
\_v[ファイル名]

The baseware plays a WAV, MP3, or WMA file. The path can be relative to [the folder of the executing ghost]/ghost/master or absolute.
Ignored if the file does not exist.

  • Materia
  • SSP
  • CROW
  • Ninix

Example

\_v[se/test.wav]。[実行したゴーストのフォルダ]/ghost/master/seフォルダにあるtest.wavを再生する。
\_V

Wait for playback of the file specified by \_v to finish.
Ignored if playback has already finished or the file does not exist.

  • Materia
  • SSP
  • CROW
  • Ninix

Example

\_v[test.wav][実行したゴーストのフォルダ]/ghost/masterフォルダにあるtest.wavを再生する。\_V再生が終了するまで待ってからこの文章を表示する。
\![sound,play,ファイル名,オプション...]

Has the same function as \_v, but allows options.

  • SSP(options from 2.4)
  • Ninix

Example

\![sound,play,test.mp4,--sound-only=true,--window=true][実行したゴーストのフォルダ]/ghost/masterフォルダにあるtest.mp4動画を再生する。ただしシークバー強制表示、音声のみ。
\![sound,load,File name,Options...]

Preload the sound before playback so that it starts playing immediately when play is specified. The syntax is the same as for play.

  • SSP2.4
\![sound,cdplay,トラックNo.]

SSP plays an audio CD. Ignored if no audio CD is loaded.
While playback is in progress, \_V is ignored. Specifying another track with \![sound,cdplay,トラックNo.] during playback is also ignored. Stop playback with \![sound,stop] before specifying the next track.

  • SSP
  • Ninix

Example

\![sound,play,test.wav][実行したゴーストのフォルダ]/ghost/masterフォルダにあるtest.wavを再生する。
\![sound,loop,ファイル名]

Play the file in a loop. It is not included in the target of \_V.
To stop playback, execute \![sound,stop].

  • SSP
  • Ninix

Example

\![sound,loop,test.wav][実行したゴーストのフォルダ]/ghost/masterフォルダにあるtest.wavを再生する。\![sound,stop]ループ再生を停止する。
\![sound,wait]

Has the same function as \_V.

  • SSP
  • Ninix

Example

\![sound,play,test.wav][実行したゴーストのフォルダ]/ghost/masterフォルダにあるtest.wavを再生する。\![sound,wait]再生が終了するまで待ってからこの文章を表示する。
\![sound,pause,ファイル名]

Pauses playback. If the filename is omitted, pauses all sounds currently playing.

  • SSP
  • Ninix

Example

\![sound,loop,test.wav][実行したゴーストのフォルダ]/ghost/masterフォルダにあるtest.wavを再生する。\![sound,pause]再生を一時停止してこの文章を表示する。
\![sound,resume,ファイル名]

Resumes playback. If the filename is omitted, resumes all sounds currently playing.

  • SSP
  • Ninix

Example

\![sound,loop,test.wav][実行したゴーストのフォルダ]/ghost/masterフォルダにあるtest.wavを再生する。\![sound,pause]再生を一時停止してこの文章を表示する。\![sound,resume]中断した箇所から再生を開始する。
\![sound,stop,ファイル名]

Stops playback completely. Unlike pause, this releases the audio data and stops playback completely. In some cases, another audio file cannot be played unless this command is used to stop playback.
If the filename is omitted, stops all sounds currently playing.

  • SSP

Example

\![sound,loop,test.wav][実行したゴーストのフォルダ]/ghost/masterフォルダにあるtest.wavを再生する。\![sound,stop]再生を完全に停止する。
\![sound,option,ファイル名,オプション...]

Change the options during playback.

  • SSP2.4

Options for sound play/load/option

--volume=0~100
Change the playback volume. Max is 100. This does not control the overall OS volume.
--balance=-100~0~100
Left/right balance. -100 is fully left; 100 is fully right.
--rate=1~100~10000
Playback speed. 100 is normal speed.
The actual available range depends on the sound driver implementation, etc. Values around 400 or higher (435 or higher) often cause an error.
--seektime=時刻 [2.8.70/72]
Specify the playback start position. For play, playback starts after seeking to the specified position. For option, if playback is in progress, it jumps to that position and continues playing; if paused, it seeks internally to that position and waits (playback does not start).
For load, the sound waits after seeking to the specified position, and that position is retained until the next play. However, specifying load again for a file that has already been loaded does not change the position. Use option in that case.
There are two time formats. Without “:”, the value is an integer in milliseconds; with “:”, it is interpreted as [[hours:]minutes:]seconds[.milliseconds]. “90500”, “1:30.5”, and “0:01:30.5” all indicate 1 minute and 30.5 seconds.
Up to three digits (milliseconds) are allowed after the decimal point; any fourth and subsequent digits are truncated. Unparseable formats and negative values are treated as 0 (the beginning).
Some file formats cannot be seeked. In that case, the option is ignored and playback starts from the beginning. In particular, wav files support seeking only for uncompressed PCM/IEEE float; compressed wave formats such as ADPCM cannot be seeked.
Prefix the value with @ to specify a relative position from the current playback position. Negative values can be specified in this case.
--window=false/true (=OFF/ON)
Whether to display a window with a seek bar. If true, the window is forced to display even for audio only. If not specified, it is hidden for audio only and shown for video.
--sound-only=false/true (=OFF/ON)
Only applies to load: allows playing only the audio of a video file. If not specified, the behavior is the same as false.
--spectrum=間隔 [2.9.18]
Notify the spectrum of the sound during playback (volume levels for each frequency band) at the specified interval (in milliseconds), using the OnSoundSpectrum event. The allowed range is 20–1000; values from 1 to 19 are clamped to 20, and values of 1001 or higher are clamped to 1000. [2.9.33] On Windows 10 (1803) and later, the interval is timed precisely and notifications arrive as specified (the period does not drift even if processing is delayed; if the ghost cannot keep up, notifications are skipped rather than queued). In 2.9.32 and earlier, and on older OSes, the actual interval depends on the OS timer resolution (usually about 15.6 milliseconds); shorter intervals are less likely to match the specified value (100 means about every 111 milliseconds). 0 (and negative values) stops notifications. No notifications are sent if this option is not specified.
Notifications can be started, stopped, or have their interval changed at any time with option, even during playback. If started partway through playback, band levels may be reported slightly low for a short time immediately afterward.
--spectrum-bands=0/5/10/15/31 [2.9.18]
Number of bands reported by --spectrum=. Specify one of 0, 5, 10, 15, or 31 (other values are rounded to the nearest option; for example, 16 becomes 15, 20 becomes 15, and 64 becomes 31). Defaults to 10. Can be changed during playback.
[2.9.19] Setting this to 0 skips analysis by frequency band and reports only the overall volume level for each channel (Reference2 and 3 of OnSoundSpectrum) and the playback position (Reference6). This can be used to report elapsed time with volume levels. The playback position is also reported for sounds such as MIDI and CD tracks, from which a waveform cannot be extracted (volume is 0).
The frequencies of each band are determined by a fixed table for each number of bands, as shown in the table below.
--spectrum-hold=ミリ秒 [2.9.18]
Hold time for the peak hold value (Reference3 and 5 of OnSoundSpectrum) reported by --spectrum=. The range is 0–10000; the default is 500. Setting this to 0 disables hold (the peak is the same as the current value). Can be changed during playback.
Whenever the current value exceeds the peak, the peak rises to that value and its hold time is reset. It remains unchanged for the hold time, then falls at a rate of 100 (the full range down to 0) per second. If the current value catches up while the peak is falling, the same behavior starts again from that point.
--spectrum-skipbusy=false/true (=OFF/ON) [2.9.33]
When reporting with --spectrum=, skip notifications while the ghost's script is playing or waiting to play. Defaults to false. Can be changed during playback.
Unless the script returned by OnSoundSpectrum starts with \C, it interrupts any script that is playing or waiting to play (including scripts returned by other events). Because notifications are frequent, they may cancel scripts returned by events such as per-second events before their tags are executed. Specify this option to avoid that.
Skipped notifications are not delivered (another notification is sent at the next interval if the ghost is no longer busy). Notifications in which all levels are 0, sent on playback start or stop, are not skipped.
One limitation this option cannot prevent is that events such as OnSecondChange that occur while the ghost is playing a notification script become NOTIFY events that cannot return a script, as with ordinary events.
--eq=ゲイン:ゲイン:… [2.9.29]
Graphic equalizer. List the gain (dB) for each band in order from the lowest-frequency band, separated by :. Example: \![sound,play,bgm.wav,--eq=-12:-12:-6:0:0:0:6:12:12:12]
The number of values determines the number of bands and must be 5, 10, 15, or 31. The frequencies of each band use the same fixed table as --spectrum-bands=, corresponding directly to the bands in the spectrum display (for 10 bands: 32, 64, 125, …, 16kHz). Gain can be an integer or decimal and may have a sign. It is clamped to the range -24 to 24 (out-of-range values become the nearest limit). If all bands are 0, the sound is not modified. Commas cannot be used as separators (they delimit arguments in \![sound,…]).
Using --eq= alone (with an empty value) resets all bands to 0dB. If the number of values is not 5, 10, 15, or 31, or any value cannot be read as a number, the entire setting is ignored and the current settings are retained.
The setting can be changed at any time during playback with \![sound,option,…]. Changes are smoothed over about 10 milliseconds, so no clicks occur. The setting applies to that sound and is not retained when the same file is played again after playback ends.
Each band is designed so that the volume at its center frequency matches the specified gain (overlap with adjacent bands is compensated). Between bands, the gain shifts slightly more as it is raised or lowered (about 1dB at ±12dB). At many boundaries, the shift is toward the specified value of 0dB (slightly lower when boosting, slightly less attenuated when cutting). Bands too close to half the sample rate (the Nyquist frequency) have no effect.
The equalizer is applied before --volume and --balance, and before analysis for OnSoundSpectrum. Therefore, the equalizer is reflected in OnSoundSpectrum values. It has no effect on sounds such as MIDI and CD tracks, from which a waveform cannot be extracted.
--eq-preamp=ゲイン [2.9.29]
Overall equalizer gain (dB). It is clamped to the range -24 to 24 (out-of-range values become the nearest limit); the default is 0. Use this to lower the overall level and prevent clipping when boosting bands makes the sound clip (become too loud and hit the limit). Can be specified separately from --eq= and takes effect even when --eq= is not specified. Can be changed during playback.

Bands and levels reported by sound's --spectrum= [2.9.18]

How the bands are divided
The bands use the standard center frequencies defined by ISO, as commonly used by graphic equalizers and spectrum analyzers in music equipment. The human ear perceives pitch in terms of “how many times” a frequency has increased, rather than “how many Hz” it has increased, so the bands are arranged at equal ratios (logarithmically).
The 10-band option uses one octave (a factor of 2) per band (32,64,125,…,16kHz, as in the equalizer displays of common music players); 15 bands use 2/3 octave per band; 31 bands use 1/3 octave per band (20Hz–20kHz); and 5 bands use two octaves (a factor of 4) per band.
The boundary between bands is the geometric mean of the adjacent center frequencies (multiply them and take the square root). The lowest and highest bands extend outward by the same ratio. As a result, the ranges covered by each band are as shown in the table below, with no gaps or overlaps between bands.
Frequencies are fixed regardless of output format
This table is the same regardless of the sound file format (sample rate, bit depth, number of channels, or file type such as mp3, wav, or flac). Internal analysis uses a window of about 85 milliseconds, adjusted to the sample rate (4096 points at 44.1kHz and 48kHz), giving a frequency resolution of about 11Hz.
However, no sound exists above half the sample rate (the Nyquist frequency), so any band whose range extends more than halfway above that frequency is always 0 (for example, in a file with a sample rate of 22.05kHz, bands above about 11kHz are 0).
Level values (0–100)
The energy of the sound within a band is summed, converted to the equivalent amplitude of a sine wave with amplitude 1.0 as full scale, and expressed in dB. The value is 0 at -60dB and 100 at 0dB (a full-scale sine wave). The same-amplitude sine wave produces the same value in every band, regardless of band width (for example, a sine wave with amplitude 0.5 = -6dB is about 90). Multiple channels, such as stereo, are analyzed as a single averaged signal.
Values respond immediately when they rise, and fall from 100 to 0 over 500 milliseconds when they drop. The overall level (Reference2) uses the same scale and is the level of the entire sound before it is divided into bands (the same value is produced with --spectrum-bands=0).
Because the low-frequency bands (roughly 100Hz and below) have widths close to the frequency resolution (about 11Hz), they are affected by sounds in immediately adjacent bands. A sine wave may therefore produce a value slightly below its expected value, or spill into an adjacent band.
5 bands (center frequencies and ranges: Hz)
Number 0 1 2 3 4
Center 63 250 1000 4000 16000
Range 32~125 125~500 500~2000 2000~8000 8000~32000
10 bands (default)
Number 0 1 2 3 4 5 6 7 8 9
Center 32 64 125 250 500 1000 2000 4000 8000 16000
Range 23~45 45~89 89~177 177~354 354~707 707~1414 1414~2828 2828~5657 5657~11314 11314~22627
15 bands
Number 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
Center 25 40 63 100 160 250 400 630 1000 1600 2500 4000 6300 10000 16000
Range 20~32 32~50 50~79 79~126 126~200 200~316 316~502 502~794 794~1265 1265~2000 2000~3162 3162~5020 5020~7937 7937~12649 12649~20239
31 bands
Number Center Range Number Center Range Number Center Range
0 20 18~22 11 250 224~281 22 3150 2806~3550
1 25 22~28 12 315 281~355 23 4000 3550~4472
2 31.5 28~36 13 400 355~447 24 5000 4472~5612
3 40 36~45 14 500 447~561 25 6300 5612~7099
4 50 45~56 15 630 561~710 26 8000 7099~8944
5 63 56~71 16 800 710~894 27 10000 8944~11180
6 80 71~89 17 1000 894~1118 28 12500 11180~14142
7 100 89~112 18 1250 1118~1414 29 16000 14142~17889
8 125 112~141 19 1600 1414~1789 30 20000 17889~22361
9 160 141~179 20 2000 1789~2236
10 200 179~224 21 2500 2236~2806

Open Commands

\j[ID]

Jump to the specified ID.
Jump to a URL beginning with http://~.
Execute a file with the extension associated with the OS using file:///~. In addition to an absolute path, a path relative to [the folder of the executing ghost]/ghost/master can be used as the file name.
※SSP only: use mailto:~ to compose a new email addressed to the specified recipient.

  • Materia
  • SSP
  • CROW
  • Ninix

Example

\j[http://ssp.shillest.net/]ばぐとら研究所をブラウザを立ち上げて表示する。
\j[file:///descript.txt][実行したゴーストのフォルダ]/ghost/masterフォルダにあるdescript.txtを開く。
\![open,browser,パラメータ]

Open the browser configured in the baseware.
This is the browser specified under "External Applications -> Browser Settings" in the baseware settings from the owner-draw menu.

  • Materia
  • SSP
  • CROW
  • Ninix

Example

\![open,browser,http://ssp.shillest.net/]ばぐとら研究所をSSP本体設定で指定されたブラウザを立ち上げて表示する。
\![open,mailer,パラメータ]

Opens the mailer configured in the baseware.
This is specified under "External Applications -> Mailer Settings" in the baseware's owner draw menu settings.

  • Materia
  • SSP

Example

\![open,mailer,test@example.com]送信先アドレスにtest@example.comが入ったメーラーを開く。
\![open,addressbar]

Open the address bar. This allows the same operation as dragging and dropping a URL.

  • SSP
\![open,editor,ファイル,表示行]

Edits the specified file using the editor configured in the baseware.
This is the editor specified under "External Applications -> Editor Settings" in the baseware's owner draw menu settings.
When opened with "display line", the cursor is moved to the specified line in advance.

If no editor is specified, the behavior is the same as right-clicking in Explorer and selecting "Edit". In this case, "display line" is ignored.

  • SSP2.5.16
\![open,explorer,ファイル]

Opens the file manager configured in the baseware, with the specified file.
This is specified under "External Applications -> File Manager Settings" in the baseware's owner draw menu settings.

If no file manager is specified, a specified folder is opened, or a specified file is selected in Explorer.

Specify \![open,explorer,種類(ghost/shell/balloon/headline/plugin),名前] to select the folder to open by type and name.
Example: \![open,explorer,ghost,Emily/Phase4]

  • SSP2.5.12
\__t

[Legacy] Open the TeachBox.

  • Materia
  • SSP
\![open,teachbox]

Open TeachBox. OnTeachStart is notified when the command runs; OnTeach is notified when the OK button in TeachBox is pressed, and OnTeachInputCancel is notified when it is closed.

  • Materia
  • SSP
  • CROW
  • Ninix

Example

\![open,teachbox]TeachBoxを開く。
\![close,teachbox]

Close the TeachBox.
Note that this does not trigger OnTeachInputCancel.

  • SSP

Example

\![close,teachbox]TeachBoxを閉じる。開いてない場合は無視される。
\__c

[Legacy] Open the CommunicateBox.

  • Materia
  • SSP
\![open,communicatebox]

Open the CommunicateBox.
After input is confirmed, OnCommunicate is triggered. When it is closed, OnCommunicateInputCancel is triggered.
Only in SSP, default text can be specified after the command (in the form \![open,communicatebox,テキスト]).
Only in SSP, ※options can be specified in the form --option=○○. This is optional.

  • Materia
  • SSP
  • CROW
  • Ninix

Example

\![open,communicatebox,テスト]CommunicateBoxを開く。最初から「テスト」の文字が入っている。
\![open,communicatebox,--text=テスト]上記と同じ(オプション指定の書き方)
\![close,communicatebox]

Close the CommunicateBox.
Note that this does not trigger OnCommunicateInputCancel.

  • SSP

Example

\![close,communicatebox]CommunicateBoxを閉じる。開いてない場合は無視される。
\![open,inputbox,ID,表示時間,テキスト,オプション,...]

Open an InputBox.
When confirmed (by pressing the OK button), the SHIORI event OnUserInput is raised.
If the display time elapses (times out), or if the box is closed with the close button, OnUserInputCancel is raised.
If there is no response to OnUserInputCancel and the display time has elapsed, OnUserInput is raised with "timeout" as the input text for compatibility.
Input used to block all other operations while being entered, but this is not the case in SSP.


The ID is stored in OnUserInput, which is raised upon confirmation. If the ID begins with "On", an event named after the ID is raised. See ※ID.
Specify the display time in milliseconds. If omitted or set to a value of 0 or less, the display time is unlimited.
The text is the text displayed in the box immediately after it opens (not available in CROW); it is optional.
In SSP only, options can be specified in the form --option=○○. See ※Options. This is optional.

  • Materia
  • SSP
  • CROW
  • Ninix

Example

\![open,inputbox,インプットテスト,10000,テスト入力]「テスト入力」と初期入力されたInputBoxを開く。OKボタンを押すか、10秒経過で自動的に閉じる。
\![open,inputbox,インプットテスト,--timeout=10000,--text=テスト入力] 上記と同じ(新オプション指定)
\![open,inputbox,OnNameInput,--placeholder=あなたの名前] 空欄に「あなたの名前」と薄く表示されたInputBoxを開く。[2.9.10]
\![open,passwordinput,ID,表示時間,テキスト,オプション]

Open an InputBox that masks the characters. Other behavior is the same as inputbox.

  • SSP
  • Ninix

Example

\![open,passwordinput,パスワードテスト,-1,--option==noclose]入力が●で伏せ字になるInputBoxを開く。OKボタンを押しても、時間経過でも自動的に閉じない。閉じるボタンを押すと閉じる。
\![open,passwordinput,パスワードテスト,--timeout=-1,--option==noclose] 上記と同じ(新オプション指定)
\![open,dateinput,ID,表示時間,年,月,日,オプション]

Open a year/month/day input InputBox.
Specify the display duration in milliseconds.
The year, month, and day are the initial values.
When input is confirmed, the SHIORI event OnUserInput is triggered, and Reference1 contains "year,month,day" as a comma-separated string.
If the display duration expires (times out), or the box is closed with the close button, OnUserInputCancel is triggered.
Options can be specified in the form --option=○○; see ※options.
Other behavior is the same as for inputbox.

  • SSP

Example

\![open,dateinput,日付入力テスト,30000,2012,12,23]初期値が2012年12月23日の年月日入力InputBoxを開く。30秒でタイムアウトする。
\![open,dateinput,日付入力テスト,--timeout=30000,--text="2012,12,23"] 上記と同じ(新オプション指定)
\![open,sliderinput,ID,表示時間,現在値,最小,最大,オプション]

Open a slider-based InputBox.
When input is confirmed, the SHIORI event OnUserInput is raised, and the input value is placed in Reference1.
Options can be specified in the form --option=○○ via ※options.
Other behavior is the same as inputbox.
The minimum allowed value is -2147483648, and the maximum is 2147483647.

  • SSP

Example

\![open,sliderinput,スライダーテスト,30000,50,0,100]初期値が50、最小値が0、最大が100のスライダー型InputBoxを開く。30秒でタイムアウトする。
\![open,sliderinput,スライダーテスト,--timeout=30000,--text="50,0,100"] 上記と同じ(新オプション指定)
\![open,timeinput,ID,表示時間,時,分,秒,オプション]

Open a time-input InputBox.
時,分,秒 are the initial values, using 24-hour time.
The input value is placed in Reference1 of OnUserInput as a comma-separated “hour,minute,second” string.
Options can be specified in the form --option=○○ via ※options.


Other behavior is the same as inputbox.

  • SSP

Example

\![open,timeinput,時間入力テスト,30000,23,45,12]初期値が23時45分12秒の時間入力InputBoxを開く。30秒でタイムアウトする。
\![open,timeinput,時間入力テスト,--timeout=30000,--text="23,45,12"] 上記と同じ(新オプション指定)
\![open,ipinput,ID,表示時間,IP1桁目,IP2桁目,IP3桁目,IP4桁目,オプション]

Opens an IP address input box.
On Windows, only IPv4 addresses can be accepted due to input box limitations.
Options can be specified in the form --option=○○ ※options.


Other behavior is the same as inputbox.

  • SSP

Example

\![open,ipinput,IP入力テスト,30000,192,168,0,1]
\![open,ipinput,IP入力テスト,--timeout=30000,--text="192,168,0,1"]
\![close,inputbox,ID]

Close the InputBox specified by ID (including date, time, slider, and hidden-input boxes). To close all of them, specify __SYSTEM_ALL_INPUT__.

  • SSP
  • Ninix

Example

\![close,inputbox,時間入力テスト]IDが「時間入力テスト」のInputBoxを閉じる。\![close,inputbox,__SYSTEM_ALL_INPUT__]その後、全てのInputBoxを閉じる。
\![open,textareabox,ID,表示時間,テキスト,オプション,...]

Open a multiline input box (textareabox).
When input is confirmed (by pressing the OK button or Ctrl+Enter), the SHIORI event OnTextAreaInput is raised. The Enter key inserts a newline.
If the display time elapses (timeout) or the box is closed with the close button, OnTextAreaInputCancel is raised.


Newlines in the input are passed as characters with byte value 1 (\1) as separators. Likewise, \1 represents newlines in the text (initially displayed content).
ID handling (an event with the ID as its name is raised when it starts with “On”) is the same as for InputBox IDs.
Display time, text, and ※options are specified in the same way as for inputbox, with the following differences.
・--limit= counts newlines as one character.
・--placeholder= (the hint text shown faintly when the field is empty) also uses \1 to represent newlines.
・Input completion (inputbox.autocomplete) is not available.
・If --balloon= is omitted, balloonc5 is used. If the balloon does not have balloonc5, the currently displayed balloon image of the speaking character is used as the background, and the validrect area is used as the input field (the text font, size, and color are also taken from the balloon text). The input field is horizontal even in a vertical-writing balloon.

  • SSP2.9.10

Example

\![open,textareabox,感想,--timeout=300000] 複数行の入力ボックスを開く。5分でタイムアウトする。
\![open,textareabox,OnDiaryInput,--limit=400] 決定時にOnDiaryInputが発生する。改行込みで400文字まで。
\![open,textareabox,OnDiaryInput,--placeholder=今日の出来事(Ctrl+Enterで決定)] 空欄に案内文を薄く表示する。
\![close,textareabox,ID]

Close the multiline input box (textareabox) specified by ID. To close all of them, specify __SYSTEM_ALL_INPUT__.
\![close,inputbox,...] does not close textareaboxes.

  • SSP2.9.10

InputBox options

Specify in the form ○○. All options are optional.

--option=(noclose|noclear)
noclose: Keep the inputbox open after input.
noclear: Keep displaying the input without clearing it after input.
Specify this together with noclose (example: \![inputbox,入力内容,,,--option=noclose,--option=noclear]).
noclear has no effect on inputboxes that do not accept text (sliderinput, dateinput, timeinput, ipinput).
--text=default display
The string to display initially.
For sliderinput: initial value, minimum, maximum / for dateinput: year, month, day / for timeinput: hour, minute, second
--placeholder=guidance text [2.9.10]
A string displayed faintly only when the input field is empty, indicating what to enter (equivalent to the HTML placeholder). It disappears when text is entered and reappears when the field is empty again.
Unlike --text=, this is not included in the input and is not counted toward the character limit set by --limit=.
The text color can be set with the balloon's communicatebox.placeholder.color. If not specified, the input text color is shifted toward the background color and its saturation is further reduced.
Valid for inputbox, passwordinput, and textareabox (passwordinput also displays the text as-is, without masking it). In textareabox, \1 represents a line break.
--timeout=timeout in milliseconds
How long to wait before automatically closing the input box. A value of zero or less prevents it from closing.
--balloon=ID
Specify an ID to use the corresponding image in place of the ? in balloonc?.png/txt.
If not specified, the default ID for each input box is used. (SSP 2.6.23)
--limit=maximum input length
Limit the number of characters that can be entered in the input box.
--reference=additional information
Add the specified information to OnUserInput's Reference3, or to Reference2 and later for a specified event that starts with On.

InputBox IDs

When input is confirmed, OnUserInput is triggered. However, if the ID is a string that starts with "On", an event named after the ID is triggered instead.
For OnUserInput, the specified ID is placed in Reference0 and the input is placed in Reference1. For an event named after the ID, the input is placed in Reference0 instead.

Example
When input is confirmed using \![open,inputbox,インプットテスト,10000,テスト入力].

  • "OnUserInput" is triggered
  • Reference0 contains "インプットテスト"
  • Reference1 contains the input
  • Reference2 contains supplementary input information (sliderinput only: minimum and maximum; otherwise empty)
  • Reference3 and later contain additional information specified by --reference=

When input is confirmed using \![open,inputbox,Onインプットテスト,10000,テスト入力].

  • "Onインプットテスト" is triggered
  • Reference0 contains the input
  • Reference1 contains supplementary input information (sliderinput only: minimum and maximum; otherwise empty)
  • Reference2 and later contain additional information specified by --reference=

Regardless of the ID, OnUserInputCancel is triggered when the close button is pressed or the input times out.

\![open,configurationdialog,ダイアログID]

Open the settings dialog ("Baseware Settings" in the owner-draw menu).
The dialog ID can specify which screen to show initially (if omitted, the screen opened last time is used).
See Reference0 of the SHIORI event ※OnConfigurationDialogHelp.

  • Materia
  • SSP
  • CROW
  • Ninix

Example

\![open,configurationdialog,talk]SSP本体設定ダイアログの喋り/バルーンのタブを開く。
\![open,ghostexplorer]

Opens the ghost explorer.
It can also be opened from the owner draw menu.
The explorers listed below can also be changed manually by selecting a type from the ghost explorer's Type (T) menu.

  • Materia
  • SSP
  • CROW

Example

\![open,ghostexplorer]ゴーストエクスプローラを開く。
\![open,shellexplorer]

Open the shell explorer. Only the shell of the currently running ghost is displayed.

  • Materia
  • SSP
  • CROW

Example

\![open,shellexplorer]シェルエクスプローラを開く。
\![open,balloonexplorer]

Open the balloon explorer.

  • Materia
  • SSP
  • CROW

Example

\![open,balloonexplorer]バルーンエクスプローラを開く。
\![open,headlinesensorexplorer]

Opens the headline sensor explorer.

  • Materia
  • SSP
  • CROW

Example

\![open,headlinesensorexplorer]ヘッドラインエクスプローラを開く。
\![open,pluginexplorer]

Open the plugin explorer.

  • SSP

Example

\![open,pluginexplorer]プラグインエクスプローラを開く。
\![open,calendarskinexplorer]

Open the calendar skin explorer.

  • SSP

Example

\![open,calendarskinexplorer]カレンダースキンエクスプローラを開く。
\![open,calendarpluginexplorer]

Open the calendar plugin (schedule sensor) explorer.

  • SSP

Example

\![open,calendarpluginexplorer]カレンダープラグインエクスプローラを開く。
\![open,rateofusegraph]

Display ghost usage statistics.

  • Materia
  • SSP
  • CROW

Example

\![open,rateofusegraph]ゴースト使用率を表示する。
\![open,rateofusegraphballoon]

Display balloon usage statistics. In unsupported environments, this has the same effect as running rateofusegraph.

  • Materia
  • SSP2.3.77

Example

\![open,rateofusegraphballoon]バルーン使用率を表示する。
\![open,rateofusegraphtotal]

Display combined ghost usage statistics. Currently, this is supported only by Materia; elsewhere, it has the same effect as running rateofusegraph.

  • Materia
\![open,calendar]

Open the calendar.

  • SSP

Example

\![open,calendar]カレンダーを開く。
\![open,help,ダイアログID]

Opens SSP Help.
If the dialog ID is the ID name of a settings dialog (see Reference0 of OnConfigurationDialogHelp), help for that settings dialog is displayed. If omitted, the index page is opened.

  • SSP

Example

\![open,help,talk]ブラウザで、https://ukatech.shillest.net/ukadoc-ssp/の喋り/バルーンのページを開く。
\![open,messenger]

Open the instant messenger.
It can be launched from the owner-draw menu via “Functions (F) -> SSP Messenger (M).”

  • SSP

Example

\![open,messenger]インスタントメッセンジャーを開く。
\![open,readme]

Open readme.txt.
If nothing is specified, the file specified as the readme in [the folder of the ghost that executed this]/ghost/master/descript.txt of the running ghost is opened.
\![open,readme,種類(ghost/shell/balloon/headline/plugin/calendar.skin/calendar.plugin),名前] と指定すると、指定したreadmeが開く。例:\![open,readme,ghost,Emily/Phase4]
calendar.skin is a calendar shell, and calendar.plugin is a calendar plugin (schedule sensor). The space-separated forms "calendar skin" and "calendar plugin" are also accepted.

  • SSP
  • Ninix

Example

\![open,readme]readme.txtを開く。
\![open,terms]

Display the terms dialog using [the folder of the executing ghost]/terms.txt for the currently running ghost.
If terms.txt does not exist, this has no effect (only an error sound is played).
Because this forcibly interrupts the user's actions with a dialog, it should not be used excessively.

  • SSP2.5.33

Example

\![open,terms]terms.txtを開く。
\![open,file,ファイル名]

Executes a file. Specify a relative path from [the folder of the running ghost]/ghost/master/ or an absolute path.
Windows environment variables (such as %SYSTEMROOT%, %SYSTEM%, and %TEMP%) can be used.
If an executable file is specified as the file name, its path is searched for automatically.

  • SSP

Example

\![open,file,shell/master/surface0.png]shell/masterフォルダのsurface0.pngが開かれる。
\![open,file,%ComSpec%]コマンドプロンプトが実行される。
\![open,file,TortoiseProc.exe]TortoiseSVNがインストールされていれば、パスを自動で検索して実行する。
\![open,dialog,open,パラメータ]

Opens a file selection dialog. Selecting a file in this dialog does not actually open the file.
When confirmed, the SHIORI event OnSystemDialog is raised, with "open" stored in reference0 and the file path stored in Reference2. Each ghost author must implement and run the actual processing here.
When the dialog is closed, the SHIORI event OnSystemDialogCancel is raised.
Specify multiple parameters as described below, separated by commas.

  • SSP

Example

\![open,dialog,open,--title=オープンダイアログ表示テスト,--dir=C:/SSP/ghost/emily4/ghost/master,--filter=辞書ファイル|dic*.txt;*.dic;*.aym;*.kis|全てのファイル|*.*,--id=テストダイアログ]SSPがCドライブ直下に、SSPという名前のフォルダで存在する場合、Emily/Phase4.5の[実行したゴーストのフォルダ]/ghost/masterを初期位置とし、dic~.txtと~.dicと~.aymと~.kisのファイルのみ表示する。
\![open,dialog,save,パラメータ]

Opens a file save dialog. Saving a file in this dialog does not actually save anything.
When confirmed, the SHIORI event OnSystemDialog is raised, with "save" stored in reference0 and the file path stored in Reference2. Each ghost author must implement and run the actual processing here.
When the dialog is closed, the SHIORI event OnSystemDialogCancel is raised.
Specify multiple parameters as described below, separated by commas.

  • SSP

Example

\![open,dialog,save,--title=セーブダイアログ表示テスト,--dir=__system_mydocument__,--filter=テキストファイル|*.txt;*.dic,--ext=txt,--name=test,--id=テスト保存ダイアログ]マイドキュメントを初期位置として、.txtと.dicのファイルのみを表示し、初期ファイル名「test.txt」の保存ダイアログを開く。
\![open,dialog,folder,パラメータ]

Opens a folder selection dialog. Selecting a folder in this dialog does not actually do anything.
When confirmed, the SHIORI event OnSystemDialog is raised, with "folder" stored in reference0 and the folder path stored in Reference2. Each ghost author must implement and run the actual processing here.
When the dialog is closed, the SHIORI event OnSystemDialogCancel is raised.
Specify multiple parameters as described below, separated by commas.

  • SSP

Example

\![open,dialog,folder,--title=フォルダ選択ダイアログ表示テスト,--id=OnTestFolderDialog]ダイアログで前回開いた場所を初期位置として、フォルダ選択ダイアログを開く。保存ボタンを押すと、指定したID名が「OnTestFolderDialog」でOnで始まっているため、同名のSHIORIイベントOnTestFolderDialogが通知される。
\![open,dialog,color,パラメータ]

Open the color palette dialog. Selecting a color in this dialog does not perform any action by itself.
When a selection is confirmed, the SHIORI event OnSystemDialog is triggered. The selected color is stored in Reference2 in the format "R,G,B", and "color" is stored in Reference0. Each ghost author must implement and run the actual processing here.
When the dialog is closed, the SHIORI event OnSystemDialogCancel is triggered.
The following parameters can be specified, separated by commas.

--color=R G B
Specify each RGB value from 0 to 255
--id=event ID
ID to send with OnSystemDialog/OnSystemDialogCancel
If the event ID starts with On, an event with that ID is triggered. The Reference contents are the same as for OnSystemDialog.
Reference0 is always set to "color".
  • SSP

Example

\![open,dialog,color,--color=255 0 0,--id=テストカラーダイアログ]初期表示色が赤のカラーパレットダイアログを表示。

Open File / Save File / Select Folder / Select Color Palette Parameters

--title=テキスト
Text displayed in the dialog's title bar
If omitted, the default is "Open File" for the open dialog, "Save File" for the save dialog, blank for the folder dialog, and "Color Settings" for the color dialog.
--dir=パス

Initial folder to display, specified as an absolute path
If omitted, the folder opened in the previous dialog is used.


Specify one of the following in the path to select a special Windows folder:
__system_mydocument__
__system_mypictures__
__system_myvideo__
__system_mymusic__
__system_desktop__

--filter=フィルタ
Specify in a format such as BMP|*.bmp|Other|*.png;*.gif
Only valid for open and save dialogs.
--ext=拡張子
Default extension when saving
Only valid for save dialogs.
--name=ファイル名
Default file name when saving
Only valid for save dialogs.
--id=イベントID
ID to send with OnSystemDialog/OnSystemDialogCancel
If the event ID starts with On~, an event with that ID is raised. The Reference contents are the same as for OnSystemDialog.
Reference0 contains one of "open", "save", or "folder", depending on the dialog type.
\![close,dialog,ID]

Close the dialog with the specified event ID. To close all dialogs, specify __SYSTEM_ALL_DIALOG__.

  • SSP

Example

\![close,dialog,テストカラーダイアログ]現在表示されているダイアログのうち、idが「テストカラーダイアログ」のものを閉じる。ダイアログが閉じられた場合、OnSystemDialogCancelが通知される。
\![open,surfacetest]

Open the surface test dialog. This command is ignored unless “Developer Features” is enabled in the main settings.

  • SSP

Example

\![open,surfacetest]サーフェステストダイアログを開く。
\![open,aigraph]

Open the AI graph. If the running ghost does not respond to the SHIORI resource getaistate, nothing happens.

  • SSP

Example

\![open,aigraph]AIグラフを開く。
\![open,developer]

Open the development palette. Nothing happens if developer mode is OFF.

  • SSP2.5.78
\![open,shiorirequest]

Open the SHIORI Request sending palette. Nothing happens when developer mode is OFF.

  • SSP2.5.78
\![open,errorlog]

Opens the error log window.

  • SSP
\![open,dressupexplorer]

Opens the dressup explorer.

  • SSP2.7.00 RC3
\![open,pictureviewer,(ファイル名)]

Open the image viewer. If (ファイル名) is specified, that file is displayed automatically (optional).

  • SSP2.8.33
\![open,archiveviewer,(ファイル名)]

Open the archive viewer. If (file name) is specified, that file is displayed automatically (optional).

  • SSP2.8.66
\![open,backlogviewer]

Open the backlog (conversation history) window.

  • SSP2.8.52

Property System Operation Commands

\![set,property,プロパティ名,値]

Set a value in the property system.
※For details about the property system, see the property system page.

  • SSP
  • CROW

Example

\![set,property,currentghost.shelllist(master).menu,hidden]オーナードローメニューのシェル(S)から、masterシェルを非表示にし手動で変更出来ないようにする。\![set,property,currentghost.shelllist(master).menu,]masterシェルを再度オーナードローメニューに表示する。
\![get,property,イベント名,プロパティ名,プロパティ名,...]

Retrieve values from the property system.
The event specified by the event name is raised, and property system values are placed in its references, starting at reference0, one value per reference.
※For details about the property system, see the property system page.

  • SSP
  • CROW

Example

このスクリプトの再生後、SHIORIイベント「SSPからバルーン情報取得」が通知される。Reference0に現在使用中のバルーンの、本体側の表示可能な幅(ピクセル数)、Reference1にその高さが入っている。\![get,property,SSPからバルーン情報取得,currentghost.balloon.scope(0).validwidth.initial,currentghost.balloon.scope(0).validheight.initial]

Unclassified commands

\![execute,http-get,URL]

Performs an HTTP GET request and stores the response in a file.
The file is stored in the [実行したゴーストのフォルダ]/ghost/master/var folder.

  • Materia
  • SSP
  • Ninix

Example

\![execute,http-get,http://ssp.shillest.net/ukadoc/manual/list_sakura_script.html]ukadocのさくらスクリプトリスト(このページ)を取得し、varフォルダにlist_sakura_script.htmlを保存する。
\![execute,http-get,URL,パラメータ]

Performs an HTTP GET request with parameters and stores the response in a file.
The file is stored in the [folder of the ghost that executed it]/ghost/master/var folder.

  • SSP
  • Ninix

Example

\![execute,http-get,http://search.yahoo.co.jp/search,p=SSP 伺か]YAHOOでの「SSP 伺か」の検索結果ページを、そのまま保存する。
\![execute,http-post,URL,パラメータ]

Sends an HTTP POST request with parameters and stores the response in a file.
The file is stored in the ghost/master/var folder of the ghost that executed it.

  • SSP
  • Ninix

Example

\![execute,http-post,http://jbbs.shitaraba.net/bbs/read.cgi/computer/44300/1432574039/,BBS=44300&KEY=1432574039&DIR=computer&MESSAGE=テストメッセージ]ゴースト回覧板3rdの、テストスレに「テストメッセージ」と本文に入れて送信する。※したらば掲示板がスパム対策を強化したため現在書き込み不可。
\![execute,http-get,URL,オプション,オプション,オプション...]

※Options performs an HTTP GET request with options and stores the response in a file.
The file is stored in the [folder of the ghost that executed it]/ghost/master/var folder.

  • SSP
  • Ninix

Example

\![execute,http-get,http://search.yahoo.co.jp/search,--async=伺か検索,--file=検索結果ファイル.txt,--nodescript,--param=p=SSP 伺か,--timeout=5]YAHOOでの「SSP 伺か」の検索結果ページを、[実行したゴーストのフォルダ]/ghost/master/var/検索結果ファイル.txtに保存する。実行時、オンラインマーカーやダウンロード状況を出さない。5秒応答がなければタイムアウトする。
\![execute,http-post,URL,オプション,オプション,オプション...]

Make an HTTP POST request with ※options and store the response in a file.
The file is stored in the [folder of the ghost that executed the command]/ghost/master/var folder.

  • SSP
  • Ninix

Example

\![execute,http-post,http://jbbs.shitaraba.net/bbs/read.cgi/computer/44300/1432574039/,--async=書き込みテスト,--param=BBS=44300&KEY=1432574039&DIR=computer&MESSAGE=テストメッセージ]ゴースト回覧板3rdの、テストスレに「テストメッセージ」と本文に入れて送信する。5秒応答がなければタイムアウトする。※したらば掲示板がスパム対策を強化したため現在書き込み不可。
\![execute,http-head,URL,オプション,オプション,オプション...]

Send an HTTP HEAD request with options.

  • SSP2.6.40
  • Ninix
\![execute,http-put,URL,オプション,オプション,オプション...]

Send an HTTP PUT request with ※options.

  • SSP2.6.40
  • Ninix
\![execute,http-delete,URL,オプション,オプション,オプション...]

Send an HTTP DELETE request with options.

  • SSP2.6.40
  • Ninix
\![execute,http-patch,URL,options,options,options...]

Make an http patch request with ※options.

  • SSP2.7.34
\![execute,http-options,URL,オプション,オプション,オプション...]

Send an HTTP OPTIONS request with options.

  • SSP2.7.34

http/rss/ical/websocket options

--accept=Accept request header contents [2.7.34]
Specify the Accept header, which indicates the Content-Type formats that can be received.
--accept-language=Accept-Language request header contents [2.7.34]
Specify the Accept-Language header, which controls internationalization-related behavior.
--async=ID
Continue executing Sakura Script without waiting for the process to finish, and notify an event when it completes.
For HTTP, the event is OnExecuteHTTPComplete or OnExecuteHTTPFailure.
For RSS, the event is OnExecuteRSSComplete or OnExecuteRSSFailure.
For iCal, the event is OnExecuteICalComplete or OnExecuteICalFailure. [2.8.90]
For WebSocket, OnExecuteWebSocketOpen/Receive/Reconnect/Close/Failure events occur at connection, receive, and disconnection, respectively (because it always operates asynchronously, --sync cannot be used).
If the ID does not begin with On, events with the names listed above occur.
If the ID begins with On, HTTP/RSS/iCal trigger [the specified ID] (success)/[the specified ID]Failure (failure). WebSocket triggers [the specified ID]Open/[the specified ID] (receive)/[the specified ID]Reconnect/[the specified ID]Close/[the specified ID]Failure.
Example: with --async=OnExample, HTTP/RSS/iCal → OnExample/OnExampleFailure, WebSocket → OnExampleOpen/OnExample/OnExampleReconnect/OnExampleClose/OnExampleFailure
However, SSLInfo-related events (OnExecuteHTTPSSLInfo/OnExecuteRSS_SSLInfo/OnExecuteICal_SSLInfo/OnExecuteWebSocket_SSLInfo) are not affected; even if an ID beginning with On is specified, notifications always use the event names listed above.
To temporarily pause Sakura Script execution, write --sync instead (not applicable to WebSocket).
--authorization=Authorization request header contents [2.6.37]
Set this in advance when an Authorization header is required, such as for OAuth.
--cookie=cookie data
Cookie data. If needed, specify the value of Reference5 from OnExecuteHTTPComplete as-is.
--content-type=(multipart/form-data | application/x-www-form-urlencoded | any other value)
Only for http-post. Specify the format used to send parameters specified with param.
If nothing is specified, application/x-www-form-urlencoded is used.
Note that the format specified may impose restrictions on how param is written.
Starting with [2.6.37], this information is also applied directly to the Content-Type request header.
--expand or --expand=number of days [2.8.90]
Only for ical-get/ical-post. See ※iCal filtering options.
Expand RRULE recurrences and return one item for each occurrence. If a number of days is specified, it is the period length used when --to is omitted (default: 30 days).
--file=filename
Specify the name to use when saving the retrieved data. It is saved to [the folder of the executing ghost]/ghost/master/var/filename.
--from=yyyymmdd [2.8.90]
Only for ical-get/ical-post and rss-get/rss-post [2.8.92]. See ※iCal filtering options and ※RSS filtering options.
The start date of the period for events to return. Defaults to today if omitted.
[2.8.92] For rss-get/rss-post, this is the lower bound for the update dates of returned items (from 00:00 on that day). No lower bound applies if omitted.
--header=SomeHeader: request header contents [2.6.40]
Set a request header with an arbitrary name. The colon separating the name and contents is required.
This overrides header information set by SSP, so ensure that the specified values do not conflict.
--insecure [2.7.34]
Skip TLS certificate verification.
--limit=number of items [2.8.90]
Only for ical-get/ical-post and rss-get/rss-post [2.8.92]. See ※iCal filtering options and ※RSS filtering options.
The maximum number of events to return. Defaults to 200; specify 0 for no limit.
If only --limit is specified, period mode is used with today as the start date. If none of --from, --to, --expand, or --limit is specified, there is no item limit (all items are returned).
[2.8.92] For rss-get/rss-post, specifying this option truncates the results to the specified number, in newest-first order. If omitted or set to 0, there is no limit; specifying only --limit does not restrict the period.
--log=filename
Log all communication with the server. Mainly for debugging during development.
--nodescript
Do not display the online view or download status.
--nofile=parameter (character encoding) [2.5.77]
Retrieve and expand data in memory without creating a temporary file, and store it in the event's Reference3.
The parameter specifies the character encoding to use when interpreting the retrieved data. If omitted, UTF-8 is assumed.
Since Reference cannot contain line breaks, line breaks are converted to byte value 1.
The maximum retrievable size is 128KB.
[2.8.90] For rss-get/rss-post and ical-get/ical-post, this option is ignored because a file is required for parsing.
--no-cache [2.7.34]
Specify Cache-Control: no-cache to suppress the use of cached data.
--param=parameter
Specify parameters for get/post/put. This option can be specified multiple times.
For multipart/form-data:
 Repeat the form --param=field name=data as many times as needed.
 Example: --param=message_body=data
For application/x-www-form-urlencoded:
 If repeated in the form --param=field name=data, all values are joined with & and sent to the server.
 Otherwise, all values are joined with line breaks (CRLF) and sent to the server (for backward compatibility).
For other content-type values:
 If defined multiple times, all values are joined with line breaks (CRLF) and sent to the server.
--param-charset=character encoding
Specify the character encoding. For example, Shift_JIS, EUC-JP, or UTF-8. The default is UTF-8.
--param-input-file=filename [2.6.40]
To send a large amount of data that cannot be specified with the --param option, specify a file containing the data to send.
If the specified path is not absolute, it is interpreted as a path relative to [the folder of the executing ghost]/ghost/master/.
Do not specify --param at the same time.
The contents are generally not inspected, so the caller is responsible for handling character encoding, encoding, and other details.
However, for multipart/form-data only, the first line is read and interpreted as a delimiter between fields.
The specified file path must be under SSP's control (at or below the location of SSP.exe, or below a folder specified for listing ghosts, etc.).
--progress-notify [2.6.44]
During downloads, notify the OnExecuteHTTPProgress event (or OnExecuteICalProgress for ical-get/ical-post [2.8.90]); if the event ID begins with On, notify an event with Progress appended to it.
If an ID beginning with On is specified, SHIORI Event [the specified ID]Progress occurs instead of the event listed above.
Example: with --async=OnExample, OnExampleProgress
Events are notified continuously while downloading, which reduces download speed.
Also note that when outputting to a file, the file is temporarily closed when an event is notified and reopened after the response is received, further reducing download speed.
--streaming or --streaming=type [2.8.14]
Specify streaming behavior for HTTP requests. Use --streaming=sse for Server-Sent Events, or --streaming=text for newline-delimited streaming (such as NDJSON).
If --streaming is specified without a type, streaming is handled appropriately according to the response Content-Type from the server.
Received data is notified through the OnExecuteHTTPStreaming event, or, if the event ID begins with On, through an event with Streaming appended, such as OnHogehogeStreaming.
--sync=ID [2.6.44]
Behaves the same as --async, except that Sakura Script execution is paused until the process completes.
--timeout=seconds
Specify how long to wait for a response (not the time required for the download). The maximum is 300 seconds.
If no response is received within the specified time, the SHIORI event "OnExecuteHTTPFailure" is notified, and Reference4 contains "timeout".
--to=yyyymmdd [2.8.90]
Only for ical-get/ical-post and rss-get/rss-post [2.8.92]. See ※iCal filtering options and ※RSS filtering options.
The end date of the period for events to return (inclusive).
[2.8.92] For rss-get/rss-post, this is the upper bound for the update dates of returned items (through the end of that day). No upper bound applies if omitted.
--m_websocketProtocol=Sec-Websocket-Protocol [2.8.08]
Specify the Sec-Websocket-Protocol header to use when connecting to a WebSocket. If not specified, this header is not sent.
\![execute,rss-get,URL,オプション,オプション,オプション...]

Make an HTTP GET request with options, parse the response as an RSS/Atom feed, and then notify the results as an event.
The parameters are specified in the same way as for http-post.

The retrieved items are reported through OnExecuteRSSComplete, and failures through OnExecuteRSSFailure.

[2.8.92] You can specify which items to return and how many with the RSS filtering options (--from, --to, and --limit). If unspecified, all items are returned.

  • SSPfiltering 2.8.92~

Example

\![execute,rss-get,https://example.com/feed.xml,--async=OnMyFeed,--limit=5]最新の5件をOnMyFeedで受け取る。
\![execute,rss-get,https://example.com/feed.xml,--async=OnMyFeed,--from=20261201,--to=20261207]2026年12月1日から7日までの項目だけを受け取る。
\![execute,rss-post,URL,オプション,オプション,オプション...]

Make an HTTP POST request with options, parse the response as an RSS/Atom feed, and then notify the results as an event.
The parsing, notification, and filtering specifications are the same as for rss-get. The parameters are specified in the same way as for http-post.

  • SSP

RSS Filtering Options [2.8.92]

These options specify which items to return from the retrieved feed with \![execute,rss-get/rss-post].
The syntax is the same as for the iCal filtering options, but the behavior when omitted is different. --expand is ignored.

If none are specified, all items are returned.

Period (--from and --to)
--from=yyyymmdd returns items with an update date and time at or after 00:00:00 on that date, and --to=yyyymmdd returns items with an update date and time up to the end of that date (inclusive). Dates are evaluated using the local date in the execution environment.
An omitted bound is unrestricted (unlike iCal, it does not default to the current day). A nonexistent date is treated the same as an omitted value. If --to is earlier than --from, no items are returned.
If either --from or --to is specified, items without an update date and time (or whose date and time cannot be interpreted) are not returned.
Maximum number of items (--limit)
Only when specified, stop once that number of items has been reached. --limit=0 means unlimited.
Unlike iCal, there is no default limit of 200 items, and specifying only --limit does not filter by period.
Items are sorted by update date and time, newest first, so --limit=5 returns the latest 5 items (if no items in the feed have an update date and time, it returns the first 5 in the order listed in the feed).
\![execute,ical-get,URL,オプション,オプション,オプション...]

Send an HTTP GET request with ※options, parse the response as an iCalendar (RFC 5545) calendar, and then notify the parsed results as events.
The parameter specification is the same as for http-post.

Retrieved events are notified through OnExecuteICalComplete, and failures through OnExecuteICalFailure.

Specify which events to return and how many with the iCal filtering options (--from, --to, --expand, and --limit). If none are specified, all VEVENTs in the file are returned, starting from the first.

The items parsed are X-WR-CALNAME, X-WR-TIMEZONE, and CALSCALE directly under VCALENDAR, as well as VEVENT (and VALARM within it). VEVENTs without SUMMARY are considered invalid and excluded.
A temporary file for parsing is created even if --nofile is specified (the option is ignored).

  • SSP2.8.90

Example

\![execute,ical-get,https://example.com/calendar.ics,--async=OnMyCalendar,--expand=7]今日から7日ぶんの予定を「発生」単位で展開し、OnMyCalendarで受け取る。
\![execute,ical-get,https://example.com/calendar.ics,--async=OnMyCalendar,--from=20261201,--to=20261231,--limit=50]2026年12月に発生する予定を最大50件、VEVENT単位で受け取る。
\![execute,ical-post,URL,オプション,オプション,オプション...]

Send an HTTP POST request with ※options, parse the response as an iCalendar (RFC 5545) calendar, and then notify the parsed results as events.
The parsing and notification behavior is the same as for ical-get. The parameter specification is the same as for http-post.

  • SSP2.8.90

iCal filtering options [2.8.90]

In \![execute,ical-get/ical-post], options for specifying which events to return from the retrieved calendar.
[2.8.92] The same options can also be used with rss-get/rss-post, but their behavior when omitted differs (see RSS filtering options). They are ignored for other requests.

Writing any of --from, --to, --expand, or --limit enables “date range mode”, which returns only events that occur within the date range. If only --limit is specified, date range mode starts from the current day.
If none are specified, all VEVENTs in the file are returned as-is, in order from the first (with no date-range filtering or event-count limit).

Date range
The start date is the date specified by --from, or the current day if omitted.
The end date is the date specified by --to (inclusive). If --to is omitted, the range is the number of days specified by --expand, if it has a number of days; 30 days if --expand is specified without a number of days; or 1830 days if --expand is not specified.
The range is limited to a maximum of 1830 days (if longer, it is truncated to 1830 days). If --to is earlier than --from, the range is empty and no events are returned.
With --expand (per occurrence)
Expand RRULE recurrences one at a time and return one Reference per occurrence. Results are sorted by date in ascending order.
If the same event occurs multiple times within the date range, a Reference is returned for each occurrence.
Without --expand (per VEVENT)
Return one item per VEVENT for each event that occurs at least once within the date range. Results are sorted by the date of the first occurrence within the range (for the same date, by start time).
In this case, each Reference's “occurrence date” is the date of the first occurrence within the date range.
Event-count limit
Stop once the number of items specified by --limit is reached. The default in date range mode is 200; --limit=0 means no limit.
There is no limit outside date range mode (when no options are specified).
Determining occurrence dates
RRULE (FREQ, INTERVAL, COUNT, UNTIL, BYDAY, BYMONTHDAY, BYMONTH) and EXDATE are interpreted to determine occurrences.
An event spanning multiple days from DTSTART through DTEND (or, if DTEND is absent, through the end specified by DURATION) is considered to occur on every day in that span.
Dates listed in EXDATE are treated as non-occurrences, regardless of whether the event recurs.
\![execute,schedule-add,オプション,オプション,オプション...]

Register one event in the ghost calendar. Registered events appear in the SSP calendar and, like the user's events, are included in today's events and in OnSchedule5MinutesToGo.
The ghost calendar is stored in a separate file (data/schedule/ghost/schedule.ics) from the user's events and the schedule sensor, and is shared by all ghosts. Events registered by other ghosts can also be overwritten or deleted.
Users can view these events in the calendar but cannot edit them. They can be deleted all at once from the calendar menu: “Delete All” → “Ghost-registered events”.
The result is reported through OnExecuteScheduleComplete, and failures through OnExecuteScheduleFailure. This command cannot be run from scripts sent externally, such as via SSTP.

Options (--summary and --start are required)
--summary=title : Event title (SUMMARY).
--start=date/time : Start date and time. yyyymmdd specifies an all-day event; yyyymmddThhmm or yyyymmddThhmmss specifies a time (local time). The - and : separators are ignored.
--end=date/time : End date and time. The format is the same as for --start. If omitted, the event lasts for one day, starting on the start date.
--uid=UID : Event identifier. Only single-byte alphanumeric characters and symbols, with no spaces, are allowed. Replaces any event with the same UID. If omitted, SSP assigns one and returns it through OnExecuteScheduleComplete.
--description=description : DESCRIPTION.
--location=location : LOCATION.
--url=URL : URL.
--categories=categories : CATEGORIES. Separate multiple values with commas (they are saved as-is as the value of iCal CATEGORIES).
--status=status : STATUS (CONFIRMED / TENTATIVE / CANCELLED).
--type=type : Event type. Included in Reference0 of OnSchedule5MinutesToGo and other events.
--rrule=rule : Recurrence rule (the value portion of RRULE; for example, FREQ=WEEKLY;BYDAY=MO).
--exdate=date : Date to exclude from the recurrence (yyyymmdd). Separate multiple dates with commas.
--notify=minutes : How many minutes in advance to notify. If omitted, SSP settings are used.
--script=script : Sakura Script to attach to the event. It runs when notifying the user and when reading the event.
--event=event ID : If an ID starting with On is specified, the result event uses that ID as its name (on failure, Failure is appended to the ID).
When specifying values that contain commas (such as --rrule, --exdate, and --categories), enclose the entire argument in " ".

  • SSP2.8.91

Example

\![execute,schedule-add,--uid=myghost-meeting,--summary=打ち合わせ,--start=20261001T1000,--end=20261001T1100,"--rrule=FREQ=WEEKLY;BYDAY=TH",--notify=10,--event=OnMyScheduleAdded]2026年10月1日から毎週木曜10時の予定を登録し、10分前に通知させる。
\![execute,schedule-add,--summary=記念日,--start=20261224,--rrule=FREQ=YEARLY]毎年12月24日の終日予定を登録する。
\![execute,schedule-delete,UID,オプション...]

Delete the event with the specified UID from the ghost calendar. Events in the user's calendar or the schedule sensor cannot be deleted.
The result is reported through OnExecuteScheduleComplete, and failures (including when no matching event exists) through OnExecuteScheduleFailure. This command cannot be run from scripts sent externally, such as via SSTP.
The only option is --event=event ID. See schedule-add.

  • SSP2.8.91
\![execute,schedule-get,オプション,オプション,オプション...]

Read the events registered in the ghost calendar and report them through OnExecuteScheduleGetComplete. The Reference format is the same as for OnExecuteICalComplete.
Only events in the ghost calendar are included; the user's events and schedule sensor events are not included.
Specify which events to return and how many with the iCal filtering options (--from, --to, --expand, and --limit). You can also use --event=event ID.

  • SSP2.8.91

Example

\![execute,schedule-get,--expand=7,--event=OnMySchedule]今日から7日ぶんのゴースト用の予定を「発生」単位で展開し、OnMyScheduleで受け取る。
\![execute,websocket,URL,オプション,オプション,オプション...]

Establish a WebSocket connection with options. SHIORI events are issued when the connection is established, when data is received, and when it is disconnected. The parameters are specified in the same way as for rss-get.

  • SSP2.8.05
\![send,websocket,URL,data1,data2,...]

Send a text frame to the connected WebSocket session. The URL identifies the target session. If two or more data values are specified, they are joined with CRLF and sent as text. If the session does not exist (before connection or after disconnection), the tag is ignored.

  • URL……The same string as the URL used when connecting.
  • data1,data2,……UTF-8 text to send. If two or more values are specified, they are joined with CRLF.
  • SSP2.8.05

Example

\![send,websocket,ws://example.com/chat,Hello!,World]ws://example.com/chat に "Hello!\r\nWorld" をテキストフレームとして送信する。
\![send,websocket-binary,URL,base64data]

Send a binary frame to the connected WebSocket session. The URL identifies the target session. If the session does not exist, the tag is ignored.

  • URL……The same string as the URL used when connecting.
  • base64data……Binary data encoded in Base64.
  • SSP2.8.05

Example

\![send,websocket-binary,ws://example.com/stream,SGVsbG8=]ws://example.com/stream に Base64デコードしたバイナリデータをバイナリフレームとして送信する。
\![close,websocket,URL]

Send a Close frame and disconnect normally, in accordance with RFC 6455. The connection is closed after receiving the server's response Close frame. After disconnection, OnExecuteWebSocketClose (Reference2="1000") is raised.

  • URL……The same string as the URL used when connecting.
  • status_code……If omitted, defaults to 1000 (normal closure). 1001=going away, 1008=policy violation, etc. (RFC 6455 §7.4.1).
  • SSP2.8.05

Example

\![close,websocket,ws://example.com/chat]ws://example.com/chat を正常に切断する。
\![close,websocket,ws://example.com/chat,1001]ステータスコード1001 (going away) で切断する。
\![cancel,websocket,URL]

Forcefully interrupt the connection without sending a Close frame. This interrupts immediately, even during an automatic-reconnection backoff wait. After disconnection, OnExecuteWebSocketClose (Reference2="userbreak") is raised. Use \![close,websocket,...] to end the conversation normally.

  • URL……The same string as the URL used when connecting.
  • SSP2.8.05
\![cancel,http,URL]

Cancel an ongoing HTTP request.

  • SSP2.8.04
\![cancel,ical,URL]

Cancel an ongoing ical-get/ical-post request.

  • URL……The same string as the URL used when starting the request.
  • SSP2.8.90
\![execute,extractarchive,ファイル名,ディレクトリ名,オプション...]

Extract a ZIP file. Using full paths is recommended. Relative paths are interpreted as relative to ghost/master/.
The options are as follows.

  • --event=イベント識別子……If an event identifier is specified, extraction continues while the rest of the Sakura Script runs, and the event is raised when extraction is complete. If the identifier begins with On, that event is raised; otherwise, OnExtractArchiveComplete or OnExtractArchiveFailure is raised. If omitted, script execution stops until processing is complete.
  • --password=パスワード……Extract using the specified password without prompting for one.

For details on events raised after execution, see OnExtractArchiveComplete and OnExtractArchiveFailure.
For security reasons, extraction is restricted to locations under folders managed by SSP (such as the ghost and balloon folders, specified in the "Folders" settings).
Since this restriction may be strengthened as needed, it is safest to limit extraction to locations under the folder containing the ghost's own data.

  • SSPOption specification supported from 2.7.23

Example

\![execute,extractarchive,C:/SSP/ghost/test.zip,C:/SSP/ghost/emily4]Cドライブ直下にSSPがインストールされている場合、test.zipをemily4フォルダに解凍する。処理が完了するまでスクリプトの実行は停止する。
\![execute,extractarchive,C:/SSP/ghost/test.zip,C:/SSP/ghost/emily4,--event=OnExtractComplete]非同期で解凍を実行し、完了時にOnExtractCompleteイベントが発生する。
\![execute,compressarchive,ファイル名,ディレクトリ名,オプション...]

Compresses files into a ZIP archive. Using full paths is recommended. Relative paths are interpreted as relative to ghost/master/.
The available options are as follows.

  • --event=Event identifier……Specifying an event identifier continues executing the Sakura Script while compression proceeds, then raises the event when compression finishes. If the identifier starts with On, that event is raised; otherwise, OnCompressArchiveComplete or OnCompressArchiveFailure is raised. If omitted, script execution pauses until processing is complete.
  • --password=Password……Enables AES-encrypted ZIP files using the specified password.

For specifications related to events raised after processing, see OnCompressArchiveComplete and OnCompressArchiveFailure.
Specify a folder for the directory name. [SSP 2.9.33] If it is not a folder (for example, if it is a file path), compression fails without creating an archive. (If --event= is specified, Reference1 of the failure event (OnCompressArchiveFailure, or the specified identifier with Failure appended) is invalid parameter.)
For security reasons, the destination is restricted to locations under folders managed by SSP (such as the ghost and balloon folders, and locations specified in the "Folder" settings).
This restriction may be strengthened as needed, so it is safest to limit the destination to a folder under the one containing the ghost's own data.

  • SSP. Option specification supported from 2.7.23

Example

\![execute,compressarchive,C:/SSP/ghost/test.zip,C:/SSP/ghost/emily4]Cドライブ直下にSSPがインストールされている場合、Emily/Phase4.5のフォルダをtest.zipに圧縮してghostフォルダに置く。処理が完了するまでスクリプトの実行は停止する。
\![execute,compressarchive,C:/SSP/ghost/test.zip,C:/SSP/ghost/emily4,--event=OnCompressComplete]非同期で圧縮を実行し、完了時にOnCompressCompleteイベントが発生する。
\![execute,dumpsurface,ディレクトリ,スコープID,サーフェスリスト,prefix,イベントID,ゼロ位置切り出し,アニメーションID]

Output the composited surface images to the specified directory.
If no event ID is specified, script execution stops until processing is complete.
Scope ID: Specify the same ID as the one used for the \s tag. This setting changes scope-dependent processing, such as the dressup state.
Surface list: Use the same format as surface ID specification, or specify one of the following.
__system_surface_all__ : Output all surfaces available to the shell
__system_surface_defined__ : Output all surfaces defined in surfaces.txt only
Note: To specify commas inside Sakura Script bracket parameters, enclose them in " ".
prefix: (Optional) The string to prepend to the output file names. Defaults to surface.
Event ID: (Optional) If specified, output continues while the rest of the Sakura Script runs, and the specified event is raised when output is complete. Reference0 contains the number of files successfully output.
Zero-origin crop: If 1 is specified, always dump from 0,0 regardless of the animation definition, ignoring parts with negative coordinates.
Animation ID: (Optional) If specified, after the normal image for each surface (prefix+surface number.png), play the animation in the same way as \i[ID], and output an image for each pattern as it advances, using sequential, zero-based, four-digit numbers starting from prefix+surface number_0000.png. Only one ID can be specified. For details, see the startup option --dump-animation. Reference0 for the event contains the number of files, including the sequential images.[2.9.05]
For security reasons, output is restricted to locations under folders managed by SSP (such as the ghost and balloon folders, specified in the "Folders" settings).
Since this restriction may be strengthened as needed, it is safest to limit output to locations under the folder containing the ghost's own data.
If the output location is outside the permitted range, nothing is output and an error is logged.

[2.9.08] The following format can also be used. Arguments beginning with -- can be in any order and may be mixed with the specifications above. (Arguments not beginning with -- are treated in order as directory, scope ID, surface list, prefix, event ID, zero-origin crop, and animation ID.)
All arguments except the directory are optional. If the scope ID is omitted, it defaults to 0.

--dir=ディレクトリ
Output directory.
--scope=スコープID
Scope ID.
--surface=サーフェスリスト
Surface list. If it contains commas, enclose the entire argument in double quotes, as in "--surface=0,10".
--prefix=prefix
String to prepend to the output file names.
--event=イベントID
Event ID. The same as --async=.
--fromzero=真偽値
Zero-origin crop.
--animation=アニメーションID
Animation ID.
  • SSP[2.5.98]

Example

\0のサーフェス0~9をdumpフォルダに出力する。\![execute,dumpsurface,--dir=dump,--scope=0,"--surface=0-9"]
\![execute,dumpballoon,ディレクトリ,スコープID,prefix,イベントID]

Output the current drawing contents of the balloon for the specified scope as an image in the specified directory.
Unlike a surface, it cannot be redrawn by specifying a state; the contents drawn in the balloon at that point are output as-is. The image is output at its original size, before scaling or applying transparency (including fades).
The image is output even if the balloon is hidden, as long as drawing contents remain.
The output filename is prefix+scope ID+.png (e.g. : balloon0.png).
scope ID : Specify the same ID used for the \s tag.
prefix : (optional) The string to prepend to the output filename. If omitted, balloon is used.
event ID : (optional) Raise the specified event when output completes. The number of files successfully output (0 or 1) is stored in Reference0.
The output destination restrictions are the same as for \![execute,dumpsurface]. If the destination is outside the allowed range, nothing is output and an error is recorded in the log.

[2.9.08] The command can also be specified in the following format. Arguments beginning with -- can be in any order and may be mixed with the specifications using the arguments above (arguments not beginning with -- are treated, in order of appearance, as directory, scope ID, prefix, and event ID).
All arguments except the directory can be omitted; if the scope ID is omitted, it defaults to 0.

--dir=ディレクトリ
Output directory.
--scope=スコープID
Scope ID.
--prefix=prefix
String to prepend to the output filename.
--event=イベントID
Event ID. The same applies to --async=.
--hide=項目
Output a redraw that omits the specified items. This does not affect the displayed balloon. To specify multiple items, separate them with commas, as in "--hide=balloonmarker,balloonnum", and enclose the entire argument in double quotes.
balloonmarker : SSTP marker (the display of \![set,balloonmarker] and the sender display for scripts received via SSTP)
balloonnum : Display of \![set,balloonnum]
When this option is specified, the output is redrawn from the state at that point, rather than using the drawing contents at that point (it is also redrawn while \![lock,balloonrepaint] is active).
  • SSP2.9.02

Example

SSTPマーカーとballoonnumを除いて、\0のバルーンをdumpフォルダに出力する。\![execute,dumpballoon,--dir=dump,--scope=0,"--hide=balloonmarker,balloonnum"]
\![execute,install,path,ファイル名]

Install the specified nar file. Specify an absolute path (relative paths are not allowed).

  • SSP

Example

\![execute,install,path,C:/SSP/emily4.nar]C:/SSPにあるemily4.narをインストールする。
\![execute,install,url,URL,種別]

Download the file at the specified URL and perform the installation or registration process appropriate to its type.
The file is automatically downloaded to a temporary-file folder, and installation is performed as appropriate.
OnURLQuery is not raised for downloads performed using this tag.

The type is optional. If omitted, it is detected automatically from the Content-Type and file contents.

  • nar……Install as a nar file
  • feed……Register as a headline sensor (RSSFeed)
  • homeurl……Treat the URL as homeurl and perform a network update
  • ical……Register as a schedule sensor that subscribes to iCal (.ics). A descript.txt is automatically created in the calendar folder, making the calendar available for display and including it in OnScheduleTodayNotify from then on
  • ssf……Retrieve as an SSF file and play the talk
  • SSP

Example

\![execute,install,url,http://ssp.shillest.net/ghost/emily4.nar,nar]Emily/Phase4.5のnarをダウンロードしてきてインストールする。
\![execute,dropdefault,file,ファイルパス,ファイルパス...] \![execute,dropdefault,url,URL,種別]

Perform the baseware's default action that was skipped because the ghost responded to a drag-and-drop event.
Use this when you want to say something in response to a drop and then leave the rest to the baseware. It can be executed later, such as after an option has been selected, not only within the script that responded to the event.

  • file……Perform the same action as when there was no response to OnFileDrop2 (including OnFileDropEx and OnFileDrop). Open images with an image viewer, audio and video with a media player, and archives with an archive viewer. Do nothing with files that cannot be opened by any of these (they are not opened with the associated application).
    For the file paths, you can pass Reference0 of OnFileDrop2 (separated by byte value 1) as is, or list multiple paths separated by commas. If a path contains a comma, enclose it in " ". Relative paths are resolved from the ghost's folder (ghost/master).
    Since there was originally no action for directories when the ghost did not respond, do nothing if the first item is a directory.
    Installing nar and SSF files and changing the wallpaper (OnWallpaperChange) are handled before OnFileDrop2, so this tag does not perform those actions.
  • url……Perform the same action as when there was no response to OnURLQuery. Pass Reference3 of OnURLQuery as the type.
    Do nothing if the type is unknown. If the type is omitted, determine it again from the Content-Type and file contents (this causes another network request for identification).
    This performs the same action as \![execute,install,url], but the scope number of events such as OnURLDropping that occur afterward is the scope that executed this tag.

Events OnPictureViewerOpen, OnMediaPlayerOpen, and OnArchiveViewerOpen also occur for image viewers and other applications opened with this tag. Reference1 (scope number) is the scope that executed this tag.

  • SSP2.9.10

Example

\0画像を見せてくれるの?\![execute,dropdefault,file,"C:/Users/user/Pictures/photo.png"]OnFileDrop2に応答して喋ったうえで、ドロップされた画像を画像ビューアーで開く。実際にはOnFileDrop2のReference0をそのまま渡す。
\0ダウンロードするね。\![execute,dropdefault,url,http://ssp.shillest.net/ghost/emily4.nar,nar]OnURLQueryに応答して喋ったうえで、本来の処理(この場合はnarのダウンロードとインストール)を続ける。実際にはOnURLQueryのReference0とReference3をそのまま渡す。
\![execute,ping,パラメータ1,パラメータ2,...]

Ping the specified host. Supports IPv6.
The parameters are as follows.

  • --host=hostname or IP address
  • --ttl=TTL……(packet lifetime (number of times it can be routed); default 255
  • --count=number of packets to send……default 3
  • --size=packet size……(--size is ignored when --data is enabled) default 32
  • --timeout=timeout (ms)……default 5000
  • --df=(true|false)……true: packet fragmentation disabled; false: fragmentation allowed; default false
  • --data=string……String to embed in the ICMP Echo data field (converted to UTF-8)
  • --event=event or identifier……If a string beginning with On is specified, that event is raised instead of the event described below

For details about events during and after execution, see OnPingProgress and OnPingComplete.

  • SSP

Example

\![execute,ping,--host=ssp.shillest.net,--event=pingテスト]ばぐとら研究所にデフォルト設定でpingを打つ。
\![execute,nslookup,パラメータ1,パラメータ2,...]

Specify a hostname to look up its IP address, or an IP address to look up its hostname. Supports IPv6.
The parameters are as follows.

  • --host=hostname or IP address
  • --event=event or identifier……If a string beginning with On is specified, that event is raised instead of the event described below

For details about events during and after execution, see OnNSLookupComplete and OnNSLookupFailure.

  • SSP

Example

\![execute,nslookup,--host=ssp.shillest.net,--event=nslookupテスト]ばぐとら研究所のホスト名指定でIPを調べる。調べた内容は成功時に通知されるOnNSLookupCompleteのReference3に入っている。
\![execute,filewatch,パス,オプション...]

Start monitoring the specified file or directory, and notify via OnExecuteFileWatchChange each time it changes. If monitoring cannot be started, or if the monitored directory disappears while being monitored, OnExecuteFileWatchFailure is raised and monitoring ends. This cannot be run from scripts sent externally, such as via SSTP.
The parameters are as follows.

  • Path……The file or directory to monitor. Relative paths are interpreted as relative to ghost/master/.
  • --async=event or identifier……If a string beginning with On is specified, that event is raised instead of the event described below.
  • --debounce=milliseconds……Wait for this duration after changes stop being reported, and notify if no further changes occur during that time. If changes continue, keep waiting, so a sequence of changes during writing is combined into a single notification. However, even if changes do not stop, notify once three times the specified duration has elapsed since the first change. Defaults to 500. If 0 is specified, notify immediately.

When a file is specified, updates, creation, and deletion are reported. A file that does not yet exist can also be specified; its creation will be reported. However, the directory containing the file must exist.
When a directory is specified, only creation, deletion, renaming, and updating of files and directories immediately within it are reported. The changed file is not identified, and changes inside subdirectories are not reported. The directory must exist when monitoring starts (a path that does not exist is monitored as a file).
Specifying the same path again replaces the previous specification. All monitoring is stopped when the ghost exits.

  • SSP2.8.91

Example

\![execute,filewatch,config.json,--async=OnConfigChanged]ghost/master/config.jsonが変化するたびに、OnConfigChangedイベントが起きる。
\![cancel,filewatch,パス]

Stop a watch started with \![execute,filewatch]. Specify the same path that was used to start the watch. If no matching watch exists, the command is ignored.

  • SSP2.8.91
\![execute,createnar,出力先ファイル]

Creates a NAR of the ghost that executed the script.
Output file: Optional. Specify a path relative to the ghost's ghost/master folder, or an absolute path. [2.8.98]
If specified, creates the file there without prompting for the destination. If a file with the same name already exists, it is overwritten. If the destination is inside the ghost's folder, the file itself is not included in the NAR.

  • SSP2.5.08
\![execute,createupdatedata,出力先ファイル]

Creates an update definition file (updates2.dau/updates.txt) for the ghost that executed the script.
Output file: Optional. Specify a path relative to the ghost's ghost/master folder, or an absolute path. [2.8.98]
If specified, creates only one file at that path. If a file with the same name already exists, it is overwritten. If the filename ends in .dau, it is output in the same format as updates2.dau; otherwise, it is output in the updates.txt format.
In this case, the usual output locations (the ghost root and ghost/master) are neither created nor deleted for updates2.dau/updates.txt. If the destination is inside the ghost's folder, the file itself is not included in the update definition.

  • SSP2.5.08
\![execute,emptyrecyclebin]

Empty the recycle bin. It is not emptied immediately; OnRecycleBinEmpty is notified when deletion is complete.

  • SSP2.6.04
\![enter,passivemode]

Start ※PassiveMode.

Active until the ghost ends.

  • Materia
  • SSP
  • CROW
  • Ninix

Example

さくらスクリプトの再生後、パッシブモードになる。\![enter,passivemode]ここから、最小化も終了も出来ない。
\![leave,passivemode]

Exit the mode described above.

  • Materia
  • SSP
  • CROW
  • Ninix

Example

\![leave,passivemode]パッシブモード解除。

PassiveMode

In passive mode, the following restrictions apply.
These restrictions apply to user operations; actions performed using Sakura Script are still possible.

  • The selectable items in the owner-draw menu are restricted.
  • Mail is not checked.
  • The headline sensor does not run.
  • Auto-change does not run.
  • Scripts are not interrupted.
  • Choices do not time out.
  • Balloons do not disappear over time.
  • Dropped files are ignored.
  • Installing by double-clicking a nar file is also ignored (in SSP, the installation still occurs, but the ghost does not receive an event).
  • OnSurfaceRestore is not issued.
  • cantalk is always false. (OnSecondChange and OnMinuteChange events are still issued.)
  • The ghost cannot be changed.
  • (Materia only:) The communicate box is closed and cannot be reopened.
  • It cannot be minimized.
  • It cannot be closed.
  • Network updates cannot be performed.
  • Uninstallation cannot be performed.
\![enter,inductionmode]

Start ※InductionMode.

Active until the ghost ends.

  • Materia
  • SSP

Example

\![enter,inductionmode]インダクションモード開始。
\![leave,inductionmode]

Exit the mode described above.

  • Materia
  • SSP

Example

\![leave,inductionmode]インダクションモード解除。

InductionMode

This is passive mode with the following restrictions removed:

  • Timeout can occur.
  • Can be minimized.
  • Can be closed.
  • (Materia only:) Communicate box is available.
\![enter,selectmode,モード(rect),左,上,右,下]\![enter,selectmode,モード(rect),当たり判定名]\![enter,selectmode,モード(rect)]

Starts selection mode. When executed, transparent areas are also displayed, and you can specify a region by dragging the mouse.
After execution, OnSelectModeBegin is executed. See also OnSelectModeMouseUp, OnSelectModeMouseDown, OnSelectModeCancel, and OnSelectModeComplete.
Currently, only "rect", which indicates rectangular selection mode, can be specified. If no mode is specified, it is treated as if rect were specified.
You can specify the initial selection position after the mode. Enter coordinates or the name of a hit region set to the same size.
The surface is not redrawn while this mode is active. Even if Sakura Script (\s[ID]) or dressup is applied, the display does not change, but the changes are applied and displayed when \![leave,selectmode] is executed.

This remains active until the ghost ends.

  • SSP

Example

\![enter,selectmode,rect,head]セレクトモードを開始する。判定名headの範囲が初期選択されている。
\![leave,selectmode]

Exit the mode described above. OnSelectModeComplete runs afterward.
If the hit-test region is invalid (not selected), for example, OnSelectModeCancel runs instead.

  • SSP

Example

\![leave,selectmode]セレクトモードを解除する。
\![enter,collisionmode]\![enter,collisionmode,rect]

Does the same thing as “Show hit regions” in the developer palette. If rect is specified as the third argument, only the region outlines are shown, without displaying collision names.

Remains in effect until the ghost ends.

  • SSP
  • Ninix

Example

\![enter,collisionmode]コリジョンモードを開始する。
\![leave,collisionmode]

Exit the mode described above.

  • SSP
  • Ninix

Example

\![enter,collisionmode]コリジョンモードを開始する。\![leave,collisionmode]ここで解除する。
\![reloadsurface]

[Legacy] Reload the surface. In SSP, this is the same as \![reload,shell].

  • Materia
  • SSP

Example

\![reloadsurface]シェルをリロードする。
\![reload,descript]

Reload all descript.txt files.

  • SSP

Example

\![reload,descript]全descript.txtをリロードする。
\![reload,descript,パラメータ]

Reload the specified descript.txt file.
Multiple files can be specified, separated by half-width spaces.
ghost shell balloon headline plugin language calendar.skin calendar.plugin

calendar.skin is a calendar skin, and calendar.plugin is a schedule sensor (the same category as install.txt type).
The same notation as in install.txt, "calendar skin" and "calendar plugin", is also accepted, but since parameters are separated by half-width spaces, the dotted notation is recommended.

  • SSP

Example

\![reload,descript,shell balloon]シェルとバルーンのdescript.txtをリロードする。
\![reload,shiori]

Reload shiori.dll.

  • SSP

Example

\![reload,shiori]shioriをリロードする。結果として辞書ファイルを全て読みなおす。起動中に書き換えた辞書ファイルの内容を適用する場合などに用いる。
\![reload,makoto]

Reload makoto.dll.

  • SSP

Example

\![reload,makoto]makotoをリロードする。
\![reload,shell]

Reload the shell.

  • SSP

Example

\![reload,shell]シェルをリロードする。
\![reload,balloon]

Reload the balloon.

  • SSP
\![reload,ghost]

Reload the entire ghost.

  • SSP

Example

\![reload,ghost]リロードする。自分自身へのゴースト切り替えと、SHIORIイベントが発生しないことを除けばほぼ同じ。
\![reload,aigraph]

Reload the AI graph only if it is currently displayed. The getaistate SHIORI request is also made again.

  • SSP2.6.89
\![unload,shiori]

Unload shiori.dll and leave it unloaded.
After unloading, load it again at an appropriate time. While it remains unloaded, it cannot respond to anything.

  • SSP2.5.58
\![unload,makoto]

Unload makoto.dll and leave it unloaded.

  • SSP2.5.58
\![load,shiori]

Load shiori.dll after running unload.

  • SSP2.5.58
\![load,makoto]

Load makoto.dll after running unload.

  • SSP2.5.58
\![set,shioridebugmode,(true/false)]

Turn SHIORI debug mode in the developer palette on or off.

  • SSP2.5.78
\![create,shortcut]

Create a desktop shortcut for launching the running ghost.
Use \![create,shortcut,startup] to create it in the Startup folder instead.

  • SSP2.5.86
\_u[0x0000]

Embed a UCS-2 code.

  • Materia
  • SSP
  • CROW
  • Ninix

Example

\_u[0x22EE]縦三点リーダを表示。\_u[8942]最初のさくらスクリプトの10進数表記。10進数の場合は0xをつけない。
\_m[0x00]

Embed an ASCII code.

  • Materia
  • SSP
  • CROW
  • Ninix

Example

\_m[0x41]半角大文字Aを表示。
\&[ID]

Entity reference by identifier.

  • Materia
  • SSP
  • CROW
  • Ninix

Example

\&[amp]半角アンパサンドを表示。実体参照の書式、&ID;のID部分を記入する。
\m[umsg,wparam,lparam]

SSTP only.
Execute
postmessage(hwnd,umsg,wparam,lparam) on the window handle set in advance by the Wnd header.

  • Materia
  • SSP
  • Ninix

Example

SSTP経由でこのスクリプトを再生すると、再生したゴーストが終了する。\m[WM_CLOSE,0,0]

Environment variables

How to specify environment variables

SSP replaces environment variables when rendering text in a balloon.
Items beginning with "word-" have multiple candidates, one of which is selected at random.

Environment Variable Examples

Example

%username、ちょっと聞いてよ。%msが%mpにある%mhで%meを食べてたら%mtを思いついたんだって。
%month

Current month.

  • Materia
  • SSP
  • CROW
  • Ninix
%day

Current day.

  • Materia
  • SSP
  • CROW
  • Ninix
%hour

Current hour.

  • Materia
  • SSP
  • CROW
  • Ninix
%minute

Current minute.

  • Materia
  • SSP
  • CROW
  • Ninix
%second

Current second.

  • Materia
  • SSP
  • CROW
  • Ninix
%username

Username.

  • Materia
  • SSP
  • CROW
%selfname

The name on the baseware side.

  • Materia
  • SSP
  • CROW
  • Ninix
%selfname2

The name on the baseware side, variant 2.

  • SSP
  • Ninix
%keroname

Name of the partner.

  • Materia
  • SSP
  • CROW
  • Ninix
%screenwidth

The width of the display screen.

  • Materia
  • SSP
  • CROW
  • Ninix
%screenheight

The height of the display screen.

  • Materia
  • SSP
  • CROW
  • Ninix
%exh

OS continuous uptime.

  • Materia
  • SSP
  • CROW
  • Ninix
%et

Incorrect continuous uptime. (Includes the unit.)

  • Materia
  • SSP
  • CROW
  • Ninix
%wronghour

Incorrect current time.

  • Materia
  • SSP
  • CROW
  • Ninix
%ms

Word—person.

  • Materia
  • SSP
  • CROW
  • Ninix
%mz

Word—inorganic object.

  • Materia
  • SSP
  • CROW
  • Ninix
%ml

Word—group.

  • Materia
  • SSP
  • CROW
  • Ninix
%mc

Word—company name.

  • Materia
  • SSP
  • CROW
  • Ninix
%mh

Word—store name.

  • Materia
  • SSP
  • CROW
  • Ninix
%mt

Word—skill.

  • Materia
  • SSP
  • CROW
  • Ninix
%me

Word—food.

  • Materia
  • SSP
  • CROW
  • Ninix
%mp

Word—place name.

  • Materia
  • SSP
  • CROW
  • Ninix
%m?

Word: unrestricted.

  • Materia
  • SSP
  • CROW
  • Ninix
%dms

Word—“~ to ~.”

  • Materia
  • SSP
  • CROW
  • Ninix
%lastghostname

For installation use. Name of the ghost that last performed an event.

  • Materia
  • SSP
%lastobjectname

For installation use. Name of the object that last performed an event.

  • Materia
  • SSP
%*

Has the same function as \![*].

  • SSP
%property[property name]

The value of the specified property system.
※For details about the property system, see the property system page.

  • SSP
  • CROW