Do Limited Applescript Functions Work?

Posts: 26
Joined: Fri May 29, 2009 6:40 pm

Tue Mar 23, 2010 7:46 pm Post

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?

User avatar
Site Admin
Posts: 20922
Joined: Tue Jun 13, 2006 11:23 pm
Platform: Mac
Location: Truro, Cornwall

Tue Mar 23, 2010 7:59 pm Post


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,

Posts: 66
Joined: Tue Jul 24, 2007 12:16 am

Thu Apr 22, 2010 1:54 am Post


Code: Select all

tell application "Scrivener"
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.