🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #14811

Help with PageMaker find/change style script

#14811
From: sandy_johnson
Date: Mon, 12 Jan 2004 16:47
26 lines
2107 bytes
I know a lot of you have crossed over from the PageMaker side and there's not a lot of script help on PM forum. I've written a script to apply style sheets based on keywords in PM 7.01. Most of it works fine but I'm having trouble with applying "Product Head" stylesheet to ChangeAll "^p^p", "^p^p$". (the reason I add the $ to the return is so it will apply style sheet to the line after the double return. $ could be anything. I then take out $ and double return. This works great manually, but I think I may be having trouble with the script clearing matchcase and wholeword affecting the changeall.) Any help would be most appreciated.

SelectAll
FindParaAttr "Any", any, any
ChangeParaAttr "Any", any, any
style "Body no indent"
textcursor -story
--Problem area.................................
ChangeParaAttr "Product Head", any, any
try ChangeAll "^p^p", "^p^p$", anycase, allinstances, currentstory
ChangeParaAttr "Any", any, any
try ChangeAll "^p^p$", "^p^p"
--It works great from here on..................
ChangeParaAttr "Circle number", any, any
try ChangeAll "Circle", "" wholeword, currentstory
ChangeParaAttr "Company/Mfg", any, any
try ChangeAll "Inc, ", ""
try ChangeAll "Co, ", ""
try ChangeAll "Corp, ", ""
try ChangeAll "Ltd, ", ""
try ChangeAll "LLC, ", ""
try FindWhat "Any", any, any
ChangeParaAttr "Any", any, any
try ChangeAll "^p^p", "^p"

I can supply a small .pmd with a chunk of text and style sheets if that helps. Sandy
Technical Details
Message-ID: <2ccf5317.-1@webx.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.tpinternet.pl!newsfeed01.sul.t-online.de!t-online.de!webx

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,2ffd419917fea6aa,start
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2004-01-12 09:08:00 PST
From: sandy_johnson@adobeforums.com
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.tpinternet.pl!newsfeed01.sul.t-online.de!t-online.de!webx
Newsgroups: adobe.scripting.indesign
Subject: Help with PageMaker find/change style script
Message-ID: <2ccf5317.-1@webx.la2eafNXanI>
Date: Mon, 12 Jan 2004 08:47:14 -0800
Lines: 35
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit