I licked that one. The VB.Net syntax for extracting a series of strings from the array generated by the GREP search:
Dim found = myDoc.FindGrep() If found.Count > 0 Then Dim skulist As String = "" Dim i As Integer = 1 For i = 1 To found.Count skulist = found.Item(i).Contents.ToString Dim skufile skufile = fso.OpenTextFile("M:\Catops\SKUlist.txt", 8, True) skufile.WriteLine(skulist) skufile.Close() Next
And NOW, of course, I'm wondering if there isn't some way to get code to render up the document's current page number as a string (or integer, not fussy) so I know what page the found SKU was on...
-----Original Message----- From: InDesign Talk [mailto:indesign@lists.lassosoft.com] On Behalf Of Rick Gordon Sent: Saturday, December 19, 2009 11:42 AM To: InDesign Talk Subject: [SPAM-BAYESIAN] - Re: Scripting FindGrep
I agree. My understanding is that there is very little overhead in simply assigning variables, and the resulting scripts can be so much more readable.
------------------
On 12/19/09 at 1:33 PM +0100, Roy McCoy wrote in a message entitled "Re: Scripting FindGrep":
>yeah, thanks. I guess I like it >better with the superfluous variable, though. :-} > >Rick Gordon wrote: > >>tell (make document) >> make text frame with properties {contents:s, ¬ >> geometric bounds:{"5mm", "5mm", "100mm", "100mm"}} end tell > >>Or yet more arcane: >> >>tell (make document) to make text frame with properties ¬ {contents:s, >>geometric bounds:{"5mm", "5mm", "100mm", "100mm"}} > >tell (make document) [to] [end tell] > >I took too long to adapt the script because I kept trying to >concatenate with + rather than & and couldn't figure out why I kept >getting alerts about not being able to make something into type number. Dumb dumb dumb.
RICK GORDON EMERALD VALLEY GRAPHICS AND CONSULTING ___________________________________________________
WWW: http://www.shelterpub.com
-- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/InDesign/Browse/ Manage your subscription: http://www.ListSearch.com/InDesign/
-- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/InDesign/Browse/ Manage your subscription: http://www.ListSearch.com/InDesign/
Dec 21
Peter Kahrel Re: [SPAM-BAYESIAN] - Re: Scripting FindGrep
This site manages and broadcasts several email lists pertaining to Lasso Programming and technologies related and used by Lasso developers. Sign up today!