I wish to create an AppleScript application in Xcode that launches Terminal and runs emacs. I would also like it to type Esc–X after it finishes and follow that with whatever emacs program I need to run. I’ve tried do shell script "emacs" but the log output is
[XXAppDelegate applicationWillFinishLaunching:]: emacs: standard input is not a tty (error 1)
and that still does not solve the issue of typing in Esc–X later.
Being new to AppleScript, I don’t know much beyond basic commands, so any help is greatly appreciated.
Just found this to work:
This makes the current tab (or new tab) of Terminal run emacs and type Esc.