<purpose> is optional and specifies the purpose for the mouse click.
Screen casts are a popular way to demonstrate and teach new software. However, creating them can be tedious. Typically one needs to practice a couple of times before obtaining the desired result. Even then, it might happen that you do a wrong click, you forget some steps, or an OS message pops up, and you need to start over again.
Then with every software update that changes the software's user interface, screencasts should be be re-created, so that they are in sync with the current software version, to not confuse users, and to not feel outdated.
This is where Screenplay trys to help:
It creates screen captures automatically based on instructions given in natural English language
It features plenty of UI automation functions, like moving the mouse pointer, clicking, entering text, activating windows, sizing windows, etc (see below).
Instructions don't need to be remembered. Intuitive user input is supported by auto-completion (e.g., click coordinates can be picked visually with the mouse pointer).
It has a so-called validation mode, to update mouse positions to create a cast on a changed/different screen configuration.
Start recording the primary screen.
Wait for 2 second(s).
// Click on the Firefox icon in the taskbar
Mouse click left at (512, 1062) on the Firefox icon.
// Wait until Firefox is open
Wait for window 'Mozilla Firefox'.
// Visit a website
Enter 'https://youtu.be/PKXRzivIRfM', <ENTER>.
Wait for 2 second(s).
Stop recording.
Below is a video that demonstrates how to use Screenplay to create the above screen recording. It also demonstrates Screenplay's autocompletion features, which
F2So overall, we have created a screen recording using Screenplay, showing how to create a screen recording using Screenplay.
A key benefit of Screenplay is the ease with wich screen recordings can be re-created. This is particularly useful if the software illustrated in the recording has been updated with a new user interface.
Recorded cursor positions, however, will in general change over time, for various reasons: The icon arrangement in the taskbar might have changed because new programs have been installed, the screen resolution might have changed due to a new monitor, etc.
To address this, Screenplay features a validation mode. To invoke it, use Validate instead of Run from the Run menu. This runs the script (with increased speed, and without recording or speech), and stops right before executing any mouse pointer action, allowing the user to update its coordinates.
The video below demonstrates this, using the sample recording from above:
Mouse click <left | middle | right> at (<x>, <y>) <purpose>.<purpose> is optional and specifies the purpose for the mouse click.
Mouse double-click <left | middle | right> at (<x>, <y>) <purpose>.<purpose> is optional and specifies the purpose for the mouse click.
Mouse press <left | middle | right> at (<x>, <y>) <purpose>.<purpose> is optional and specifies the purpose for the mouse press.
Mouse release <left | middle | right> at (<x>, <y>) <purpose>.<purpose> is optional and specifies the purpose for the mouse release.
Mouse move to (<x>, <y>) <purpose>.<purpose> is optional and specifies the purpose for the mouse move.
Mouse move along coordinates (<x1>, <y1>), (<x2>, <y2>), ..., (<xn>, <yn>).Mouse drag <left | middle | right> along coordinates (<x1>, <y1>), (<x2>, <y2>), ..., (<xn>, <yn>).Mouse scroll by <n> tick(s).Enter ['text1' | <keystroke1>], ['text2' | <keystroke2>], ... .Press key <keystroke>.Release key <keystroke>.// <comment>// represents a script comment and will be ignored during execution.
[message]Text surrounded by [ and ] is interpreted as a message and will be shown on screen, while execution is paused, for 70 milliseconds per character.
The appearance of messages can be configured using the Messages menu.
Messages can span multiple lines; line breaks will be preserved.
Pause.Wait for <n> second(s).Wait for window 'window-title'.Position the window 'window-title' <width> x <height> at (<x>, <y>).Activate the window 'window-title'.Set the state of the window 'window-title' to [normal | maximized | minimized].Speak "text-to-speak-out-loud".Start recording [screen <n> |
the primary screen |
area <width> x <height> at (<x>, <y>) |
window 'window-title'].Starts screen recording, using FFmpeg. For this to work, FFmpeg must be installed and its executable must be in the PATH.
Stop recording.Stops screen recording and opens the recorded video in the system video player.
FFmpeg: Actual screen recording is performed using FFmpeg. It needs to be installed separately, e.g. from https://github.com/GyanD/codexffmpeg/releases/latest. Most likely you will want to get ffmpeg-X.X-full_build.zip. Unzip it and add the bin/ folder to the PATH environment variable (Hit Win-S, type Edit environment variables for your account, edit the Path variable (either from the user or from the system variables) and add FFmpeg's bin/ folder.)
Screen-capture-recorder: If you want to use the Speak command above and record its audio (using FFmpeg), install the Screen-capture-recorder from https://github.com/rdp/screen-capture-recorder-to-video-windows-free/.