If you send a command to R with applescript you must move the mouse or
push a key before command is run.
To replicate:
* start with R closed
* on the command line, osascript -e 'tell application "R" to activate'
* then osascript -e "tell application \"R\" to cmd \"print('hi')\""
* print('hi') doesn't appear until you move the mouse or press a key
What should happen:
* print('hi') should appear immediately
GUI version: Version 1.12 (1622)
Hadley
Bug report: applescript command
3 messages · Hadley Wickham, Rob Goedman
An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/r-sig-mac/attachments/20050820/241512cc/attachment.pl
Hi, That applescript code is actually getting run from textmate (http://macromates.com/) - doing pretty much the same thing you're doing with Spark and see. I'm a bit doubtful that it's a bug with osascript, because it's an apple app, and others have complained about menu actions not triggering until they move the mouse, which may well be related. Hadley