Created
January 8, 2012 18:45
-
-
Save simonster/1579282 to your computer and use it in GitHub Desktop.
Making a new custom document property
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// PY-APPSCRIPT | |
self.asApp.make(new=k.custom_document_property, at=self.asDoc, with_properties={k.name:docPropertyName, k.value:docPropertyValue}) | |
// SCRIPTING BRIDGE | |
NSAppleEventDescriptor *rd = [NSAppleEventDescriptor recordDescriptor]; | |
[rd setDescriptor:[NSAppleEventDescriptor descriptorWithString:currentPropertyName] forKeyword:'pnam']; | |
[rd setDescriptor:[NSAppleEventDescriptor descriptorWithString:currentPropertyValue] forKeyword:'DPVu']; | |
[doc->sbApp sendEvent:'core' id:'crel' parameters:'kocl', @"mCDP", 'insh', doc->sbDoc, 'prdt', rd]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment