Article View: adobe.scripting.indesign
Article #17413Re: What am I doing?
From: Shane Stanley
Date: Mon, 09 Jun 2003 22:26
Date: Mon, 09 Jun 2003 22:26
25 lines
1764 bytes
1764 bytes
in article 1de973af.-1@WebX.la2eafNXanI, Richard Ronnback wrote:
> Ok, so I had this really clever idea that I could store my find and change
> preferences in a file and load them when I needed. Fine, I get the find
> preferences and manage to write them to disk, or so I thought. The problem is
> that I have no idea what the gibberish in the file is, let alone how to load
> it back again
Dave was on the right track. You're wanting to read and write records, so
you need to say so:
tell application "InDesign 2.0.2"
set myFindPrefs to properties of find preferences
set theFIle to (choose file name with prompt "Where do you want to store
your Find settings")
set fileRef to (open for access theFIle with write permission)
set eof fileRef to 0
write myFindPrefs to fileRef as record
close access fileRef
set findPrefs to read theFIle as record
return findPrefs
end tell
--
Shane Stanley, sstanley@myriad-com.com.au
Technical Details
Message-ID:
<BB0B46CD.5C257%sstanley@myriad-com.com.au>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!WebXReferences:
<1de973af.-1@WebX.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,c96d2f46ce21a187 X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-06-09 15:37:42 PST From: Shane Stanley <sstanley@myriad-com.com.au> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: Re: What am I doing? Message-ID: <BB0B46CD.5C257%sstanley@myriad-com.com.au> Date: Mon, 9 Jun 2003 15:26:53 -0700 References: <1de973af.-1@WebX.la2eafNXanI> Lines: 32 User-Agent: Microsoft-Outlook-Express-Macintosh-Edition/5.0.6 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit