Examples

Worked, runnable examples of driving Windows with MCEC. Each one is written to serve two readers at once: a person skimming to see what MCEC can do, and an agent that executes it. So every example leads with the artifact and the plain-English prompt, then gives the exact recipe an agent follows.

Example Flavor What it shows Recipe
MCEC hero GIF Scripted recipe One MCEC drives a second MCEC through a guided tour (Settings tabs, mouse-resize, drag the title bar, Help ▸ About) while the overlay narrates; recorded with the record tool. hero-gif.md
WinPrint hero GIF Scripted recipe MCEC drives installed WinPrint through a guided tour (launch, settings/zoom, Print to PDF), recorded as a clean, window-only GIF. Owned and produced in the WinPrint repo. hero-gif-win.md
Paint → smiley → email Prompt demo Hand a computer-use agent one sentence and it drives the desktop: open Paint, draw a smiley, copy it, start a new email, paste it in. paint-smiley-email.md

Two flavors

How these examples work

Everything below is common to every example; individual pages assume it and don’t repeat it.

Adding an example

Copy this skeleton to dev/<name>.md, fill it in, and add a row to the gallery table above (link to the GitHub blob URL under dev/). Keep the prompt at the very top so a human sees the payoff first and an agent finds the task fast. Scripted recipes that produce a committed asset (e.g. hero.gif) still land the GIF/PNG under docs/.

# <Title>

<One sentence on what it shows.> <Embed the artifact: ![...](<name>.gif).>

**Flavor:** Scripted recipe | Prompt demo

## The prompt

> <The exact natural-language instruction you'd give an agent.>

## Preconditions

- Gates/commands to enable (link [Agent Safety](/mcec/safety-emergency-stop-and-provisioning.html)).
- Bootstrap script, if one is needed.

## Recipe

<Numbered tool-call steps (scripted), OR "hand the agent the prompt and let it improvise" (prompt demo).>

## Expected result

<What success looks like: the artifact, frame count, the final on-screen state.>

## Gotchas

<Anything specific to this example beyond the shared list in examples.md.>

See also AGENTS.md for the connect-time guidance an agent gets, and Agent Control for the full tool reference.


Example mcec.commands recipes

Community-contributed mcec.commands recipes. They may serve as inspiration when building your own command table (see Remote Control for the Commands window and XML format).

Start playing the movie Blade Runner on Netflix

<startprocess cmd="bladerunner" enabled="true" file="shell:AppsFolder\4DF9E0F8.Netflix_mcm4njqhnhss8!Netflix.App">
    <pause args="5000" enabled="true" />
    <sendinput enabled="true" alt="false" ctrl="false" shift="false" win="false" vk="VK_TAB" />
    <sendinput enabled="true" alt="false" ctrl="false" shift="false" win="false" vk="VK_TAB" />
    <sendinput enabled="true" alt="false" ctrl="false" shift="false" win="false" vk="VK_RETURN" />
    <pause args="1000" enabled="true" />
    <chars args="Blade Runner" enabled="true" />
    <pause args="1000" enabled="true" />
    <sendinput enabled="true" alt="false" ctrl="false" shift="false" win="false" vk="VK_RETURN" />
    <pause args="1000" enabled="true" />
    <sendinput enabled="true" alt="false" ctrl="false" shift="false" win="false" vk="VK_TAB" />
    <sendinput enabled="true" alt="false" ctrl="false" shift="false" win="false" vk="VK_TAB" />
    <sendinput enabled="true" alt="false" ctrl="false" shift="false" win="false" vk="VK_RETURN" />
    <sendinput enabled="true" alt="false" ctrl="false" shift="false" win="false" vk="VK_TAB" />
    <sendinput enabled="true" alt="false" ctrl="false" shift="false" win="false" vk="VK_RETURN" />
</startprocess>

The same flow can be driven as discrete commands from the Commands window test client:

Commands

Start Notepad and do stupid tricks with the window

<StartProcess enabled="true" Cmd="notepad" File="notepad.exe" > <!-- start notepad -->
    <Pause Args="100"/>                          <!-- wait 100ms for it to start -->
    <Chars Cmd="test" Args="this is a test." />  <!-- type some text -->
    <SendInput vk="VK_RETURN"/>                  <!-- hit enter -->
    <Pause Args="100"/>                      <!-- pause -->
    <SendInput vk="VK_RIGHT" Shift="true" Win="true"/> <!-- Win-Shift-Right to move Notepad to 2nd monitor -->
    <Pause Args="100"/>                      <!-- pause -->
    <SendMessage Cmd="maximize" Msg="274" wParam="61488" lParam="0" /> <!-- maximize notepad -->
    <SendInput vk="VK_RETURN"/>                  <!-- hit enter -->
    <Chars Args="Second "/>                      <!-- type a second line of text -->
    <Chars Args="line.." />
    <SendInput vk="h" Alt="true"/>           <!-- Alt-H, Alt-A to pop Help About dialog -->
    <SendInput vk="a" Alt="false"/>
</StartProcess>

Move the mouse

<Chars enabled="true" Cmd="movemouse">
<Mouse Args="mm,100,100"/>
<Pause Args="250"/>
<Chars Args="moved"/>
</Chars>

Controlling HDHomeRun

<StartProcess enabled="true" Cmd="Start_HDHomeRun" File="C:\AppShortcuts\HDHomeRun.lnk" />
<SendInput Cmd="Nfs" vk="13" Shift="false" Ctrl="false" Alt="true" />
<SendInput Cmd="Npause" vk="81" Shift="false" Ctrl="true" Alt="false" />
<SendInput Cmd="Nplay" vk="80" Shift="false" Ctrl="true" Alt="false" />
<SendInput Cmd="Nstop" vk="83" Shift="false" Ctrl="true" Alt="false" />
<SendInput Cmd="Nrecord" vk="75" Shift="false" Ctrl="true" Alt="false" />
<SendInput Cmd="Nch+" vk="33" Shift="false" Ctrl="false" Alt="false" />
<SendInput Cmd="Nch-" vk="34" Shift="false" Ctrl="false" Alt="false" />
<SendInput Cmd="Nprev" vk="87" Shift="false" Ctrl="true" Alt="false" />
<SendInput Cmd="Ntvguide" vk="F1" Shift="false" Ctrl="false" Alt="false" />
<SendInput Cmd="Nrew" vk="82" Shift="false" Ctrl="true" Alt="false" />
<SendInput Cmd="Nfwd" vk="70" Shift="false" Ctrl="true" Alt="false" />
<SendInput Cmd="Nskipback" vk="37" Shift="false" Ctrl="true" Alt="false" />
<SendInput Cmd="Nskipfwd" vk="39" Shift="false" Ctrl="true" Alt="false" />
<SendInput Cmd="Nexit" vk="115" Shift="false" Ctrl="false" Alt="true" />
<SendInput Cmd="Nmute" vk="173" Shift="false" Ctrl="false" Alt="false" />

Start Media Center (eHome)

<StartProcess enabled="true" Cmd="mcestart" File="C:\windows\ehome\ehshell.exe">
<nextCommand xsi:type="SendMessage" 
            ClassName="ehshell"
            Msg="274" wParam="61488" lParam="0" />
</StartProcess>