Page 1 of 1

Do Limited Applescript Functions Work?

Posted: Tue Mar 23, 2010 7:46 pm
by adamnyc
I know Scrivener does not support Applescript, but do any of the generic functions work? What I would like to do is copy the front document to the TaskPaper application (through the clipboard or directly through the Service) perform some functions there and have it paste back into the original scrivener document, replacing the original text. Is this possible?

Re: Do Limited Applescript Functions Work?

Posted: Tue Mar 23, 2010 7:59 pm
by KB
Hi,

None of them are "hooked up" to anything in Scrivener's interface, so I doubt they will work at all as yet. It's still on the "to do" list, but won't make it into the initial 2.0 now because otherwise 2.0 is never going to get released. (AppleScript support is going to be the main focus of 2.1.)

All the best,
Keith

Re: Do Limited Applescript Functions Work?

Posted: Thu Apr 22, 2010 1:54 am
by flow
Yes.

Code: Select all

tell application "Scrivener"
   activate
end tell

tell application "System Events"
   keystroke "a" using command down
   
   delay 3
   keystroke "c" using command down
   
   set allerText to the clipboard
end tell

tell application "TaskPaper"
   make new document with properties {text contents:allerText}
end tell


For this to work, System Preferences > Universal Access > Enable access for assistive devices must be checked.