A simple solution for automatically typing sequences of text, when scripting product demos.
I provide a list of blocks of text to type, then I cycle through them triggering their playback, by pressing command+shift+p.
-
Install Hammerstone
-
Give Hammerstone accessbility permissions
- Run Hammerstone (Command+Spacebar, Type Hammerstone)
- Go to it's Preferences (found via the system tray menu, look for a hammer)
- Press Enable Accessibility, and it will take you System Settings -> Accessibility. Enable Hammerstone
-
Restart hammerstone and verify that accessility permissions are given
-
Copy the init.lua to hammerstone's config location (This is file is what Hammerstone calls its Config)
./sync.sh -
Edit the array of strings at the top of
~/.hammerspoon/init.luato set your sequence of text blocks to paste. -
Now select Reload Config from Hammerstone's menu
-
To run a demo
- Go to an input box and press command+shift+p to trigger the first text block
- To trigger the next block, press command+shift+p again.
-
Press shift+option+P to restart the sequence
This doesn't have a great workflow for saving/editing multiple demo plans, for now you'll just have to modify the ~/.hammerspoon/init.lua file with new keyboard sequences.
