Automatic writing

We didn't get any responses to our September contest, but contributions will always be welcome in the comments section, below.

Readers were invited to use the command-line version of the virtual keyboard program xvkbd to create ingenious examples of automatic writing � writing that magically appears, character after character, in a text editor.

Here are four examples. To work them, install xvkbd (it's all the GNU/Linux repositories). Paste the code into a terminal and hit the Enter key, then move to a text editor and watch what happens at the cursor. With sleep 5, you have 5 seconds to make the move.

Self-destroying message:

sleep 5; xvkbd -delay 50 -text "This message will self-destruct \b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b"

Animated counter:

sleep 5; xvkbd -text "Counting to 5:\t\t\D91\D9\b\D92\D9\b\D93\D9\b\D94\D9\b\D95"

Dropping text:

sleep 5; xvkbd -text "Going...\D9\rdown\D9\b\b\b\b\rdown\D9\b\b\b\b\rdown\D9\b\b\b\b\rdown\D9\b\b\b\b\rdown\D9\b\b\b\b\rbottom"

A jumping wordbug:

sleep 5; xvkbd -text "Jumping bug\D9\b\b\b\t\tbug\D5\b\b\b\t\tbug\D5\b\b\b\t\tbug\D5\b\b\b\t\tbug\D5\b\b\b\t\tbug"

A real-world use

I had a practical use for automatic writing in 2013. I'd been asked to try out a website 'in beta' which had comment boxes. Site visitors could click inside a comment box and type some text, and as soon as the visitor clicked outside the box, the text was saved as a comment.

The site had a mysterious bug. Text entry was smooth but would fail for some seconds. For example, you might be typing

Readers were invited to use the command-line version of the virtual keyboard program

and what would appear in the comment box was

Readers were invited to use the coirtual keyboard program

because the page had somehow frozen while the characters mmand-line version of the v were being entered.

I wrote a long piece of repetitive 'dummy' text and fed it to the comment box with xvkbd, using the delay option to feed the characters one at a time with 100 milliseconds between them. From the pattern of missed characters, the website developer could work out how often the freezes occurred, and how long they lasted.

The freezes mysteriously disappeared when something else in the application changed, but xvkbd was a nice tool for studying the bug while it lasted!