cocoa - Applescript not accepting arRsync sdef commands? -
i'm using opensource gui frontend rsync called "arrsync". works great, there's no way automate it.
what i'm trying use applescript run preset (which define in application) using following simple script:
tell application "arrsync" runpreset "presettest1"
the problem applescript thinks "runpreset" variable, not command. i've tried tell/end-tell variation of above, no dice. 'runpreset' command part of arrsync.sdef
you can find arrsync project here
i've tried opening both info.plist files inside app , ticking 'scriptable' box (or setting 'true' of without property list editor) i'm still stuck.
i'm scripting noob when comes cocoa :p appreciated
the arrsync binary missing scripting dictionary. build source, first making following changes:
- edit info.plist in project, setting "scriptable" option true.
fix project's script dictionary, arrsync.sdef. code
runpreset
command has 1 letter few (command codes must 2 fourccs, or 8 characters, long). add characterrunpreset
's code attribute; character work. if want, file can shortened , simplified replacing standard , text suites include. orignal file , make new arrsync.sdef containing:<?xml version="1.0" encoding="utf-8"?> <!doctype dictionary system "file://localhost/system/library/dtds/sdef.dtd"> <dictionary title="arrsync terminology" xmlns:xi="http://www.w3.org/2003/xinclude"> <xi:include href="file:///system/library/scriptingdefinitions/cocoastandard.sdef" xpointer="xpointer(/dictionary/suite)"/> <suite name="arrsync suite" code="arrs"> <command name="runpreset" code="runpprst"> <cocoa name="runpreset" class="scriptcontroller"/> <direct-parameter type="any"/> </command> </suite> </dictionary>
alternatively, replace
runpreset
command element 1 above.- add arrsync.sdef "copy bundle resources" phase of arrsync target
- switch release build ("blackbeard" name debug build).
- build it.
that should produce scriptable version of arrsync. you've figured out, might need play target sdk.
Comments
Post a Comment