WndRules: customizing session opening

WndRules is a special registry value that instructs Cameyo how to initialize sessions and/or modify initial app window styles.

WndRules server-side registry value

Registry key HKLM\Software\Cameyo\[AppName] -> string value WndRules takes a JSON-syntax set of app Window rules.
Replace [AppName] with either the application's name as define in the portal, or "PlayServer" to indicate all applications on that server.
The string can either be a one-line or multiple-lines string.
Example (multi-line string):
{
"rules": [
  {
    "title": "~pacific",
    "ops": [
      "StyleRemove:caption",
      "Resize:max",
      "Session:start"
    ],
    "once": "true"
  }
]
}
 Or (single-line string):
{ "rules": [ { "title": "~pacific", "ops": [ "StyleRemove:caption", "Resize:max", "Session:start" ], "once": "true" } ] }

Rules

"rules": one or several rules containing the following fields:
  • "title": the exact title of the window, case insensitive. If starting with "~", means: any window title containing this string. For example "title=pacific" will match windows having the title "Pacific", but not "Pacific Ocean". Whereas "title=~ocean" will match the latter example.
  • "class": instead of "title". Identifies the window by class name, when title identification is not possible or not wished. To determine a window's class name, we suggest using Window Detective.
  • "ops": a set of actions to perform on such windows:
    • "Resize":
      • "max": maximizes the window.
    • "StyleRemove": removes one of the following window's items:
      • "visible": hides the window.
      • "caption": removes the window's caption bar.
      • "sys": removes the window's system menu (the Window's minimize / maximize / close menu).
    • "MoveXY":
      • "center": centers the window (only if not maximized).
    • "Session":
      • "start": starts the session, hiding the "Connecting..." splash screen.
  • "once":
    • "true": executes this rule just once. This avoids checking for the window condition in a loop, hence reducing CPU usage. Use this whenever possible.
    • "false": keeps looking for the above conditions infinitely, even when the rule was already applied once. This is only useful in cases where the same condition should be watched for over and over again (uncommon).
Note: not all commands are documented here. Some less frequent commands are kept undocumented awaiting use-case validation.

Example 1

HKLM\SOFTWARE\Cameyo\MyApp\WndRules:
{ "rules": [ { "title": "~pacific", "ops": [ "Resize:max" ], "once": "true" } ] }
Result: as soon as a window with the word "pacific" (case-insensitive) in its title appears, it will get maximized.

Example 2

HKLM\SOFTWARE\Cameyo\MyApp\WndRules:
{ "rules": [ { "title": "pacific ocean", "ops": [ "StyleRemove:caption", "Resize:max", "Session:start" ], "once": "true" } ] }
Result: as soon as a window titled "Pacific ocean" (case-insensitive) appears, it gets maximized, its title bar removed, and the session gets started (Cameyo's "Connecting..." screen removed).
The rule only performs once.