Skip to content

Instantly share code, notes, and snippets.

@MasonM
Last active August 29, 2015 14:02
Show Gist options
  • Select an option

  • Save MasonM/38a8a1d9287776188bd3 to your computer and use it in GitHub Desktop.

Select an option

Save MasonM/38a8a1d9287776188bd3 to your computer and use it in GitHub Desktop.
reproduce indesign 5.5 applescript bug
script GetElementsRule
property name : "GetElementsRule"
property xpath : "//foo"
property elements : {}
on apply(xml_element, rule_processor)
set elements to elements & xml_element
return false
end apply
end script
set Glue to load script file ("Applications:Adobe InDesign CS5.5:Scripts:XML Rules:glue code.scpt")
tell application ("Adobe InDesign CS5.5")
set doc to make document
set doc_id to id of doc
tell document id doc_id
Glue's __processRuleSet(first XML element, {GetElementsRule}, {})
"success"
end tell
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment