Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: OSAX to Tokenize Record Field Names from List Items ???



The thought just occurred to me -- though no time to experiment now -- that perhaps I could build a script within the script, by creating and massaging a string which would ultimately become a script which could then be run via do script, assuming I could return the built record. Somewhat on the model of this snippet form the InDesign sample script "FindChangeByList.applescript":

---
set myScript to "tell application \"Adobe InDesign CS3\"" & return & "set properties of find text preferences to " & myFindPreferences & return

set myScript to myScript & "set properties of change text preferences to " & myChangePreferences & return

set myScript to myScript & "set properties of find change text options to " & myFindChangeOptions & return

set myScript to myScript & "end tell" & return

do script myScript language applescript language
---

A direct method still sounds appealing, though.


Rick Gordon

------------------

On 6/22/07 at 5:20 PM -0700, Rick Gordon wrote in a message entitled
"OSAX to Tokenize Record Field Names from List Items ???":

>How might one go about the process of parsing a list, for instance:
>
>{"fSource", "PicName", "fObjStyle", "[Basic Graphics Frame]", "fWidth", "12p6", "fHeight", "9p3"}
>
>... and dynamically build a record, such as:
>
>{fSource:"PicName", fObjStyle:"[Basic Graphics Frame]", fWidth:"12p6", fHeight:"9p3"}
>
>... without having those field names predefined.
>
>In other words, I would like to dynamically tokenize each odd-indexed filed in the list and pair it with the following even-indexed value. Is this possible with some sort of OSAX?

-- 
 
___________________________________________________

RICK GORDON
EMERALD VALLEY GRAPHICS AND CONSULTING
___________________________________________________
-- 
 
___________________________________________________

RICK GORDON
EMERALD VALLEY GRAPHICS AND CONSULTING
___________________________________________________

EMAIL: email@hidden
PHONE: 415-663-8652

WWW:   http://www.shelterpub.com
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-users/email@hidden
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.