Passing app property names
Passing app property names
- Subject: Passing app property names
- From: Steve Mills <email@hidden>
- Date: Tue, 04 Aug 2015 18:43:18 +0000 (GMT)
I think I asked about this many years ago, but am not in a place where I can look through my archived mail. Is there a way to pass application declared property codes in a list or record and then use them? Here's what I'm trying to do. I have a script for InDesign CS6 that needs to do a bunch of different "change grep"s. I wrote a function in the script to do the repeated work:
on changeStuff(findObj, findText, changeProps)
tell application "Adobe InDesign CS6"
set find grep preferences to nothing
set find what of find grep preferences to findText
set change grep preferences to nothing
set properties of change grep preferences to changeProps
tell findObj to change grep
set change grep preferences to nothing
set change to of change grep preferences to ""
tell findObj to change grep
end tell
end changeStuff
This doesn't work for all properties of change grep preferences. When called like so:
my changeStuff(findObj, "!!ALPH!!", {bullets and numbering list type:numbered list, numbering start at:3, numbering format:"a, b, c, d..."})
The "numbering format" property does not get set in the "set properties of change grep preferences to changeProps". InDesign bug. I've tried changing the order of the properties, but that didn't help. So I thought there might be some way to loop through a list/record and set each property individually. But I can't find a way to do that. Thoughts? Some sort of chevron notation or conversion to and from strings?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden