Quickstart

  1. Download director-bootstrap.el (opens in a new tab).

  2. Download demo.el (opens in a new tab):

(director-bootstrap
 :user-dir "/tmp/director-demo")
 
(director-run
 :version 1
 :before-start (lambda ()
                 (switch-to-buffer (get-buffer-create "*example*"))
                 (menu-bar-mode -1)
                 (setq python-indent-guess-indent-offset nil)
                 (python-mode))
 :steps '((:call run-python)
          (:type "def greet():\r")
          (:type "print(\"hello, world!\")")
          (:type "\M-x")
          (:type "python-shell-send-defun")
          (:type [return])
          (:type "\C-xo")
          (:type "greet()\r"))
 :typing-style 'human
 :delay-between-steps 1
 :after-end (lambda () (kill-emacs 0))
 ;; give useful feedback during development
 :on-error (lambda (err) (message "Error while executing director script: %S" err)))
  1. Launch the demo:
$ emacs -Q -nw -l director-bootstrap.el -l demo.el
  1. Emacs starts and plays:

  1. To write your own scripts, you can use demo.el as starting point. Unless you’re hacking on Director itself, director-bootstrap.el is best left unmodified.

  2. See the API reference for things you can do in a script. See the guides about automating screencasts and end-to-end testing for specific use cases.