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:

  1. edit info.plist in project, setting "scriptable" option true.
  2. fix project's script dictionary, arrsync.sdef. code runpreset command has 1 letter few (command codes must 2 fourccs, or 8 characters, long). add character runpreset'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.

  3. add arrsync.sdef "copy bundle resources" phase of arrsync target
  4. switch release build ("blackbeard" name debug build).
  5. build it.

that should produce scriptable version of arrsync. you've figured out, might need play target sdk.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -