Mombu the Computer Design Forum sponsored links

Go Back   Mombu the Computer Design Forum > Computer_Design > FindChangeByList script FAQ
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 15th July 00:23
rosta_vanek
External User
 
Posts: 1
Default FindChangeByList script FAQ



iam trying to figure out how the FindChangeByList works... especially these things and please feel free to add yours:

((1)) how do i tell the script to remove something what has been found:

//removes accidental duplicate "end of story" marker after last paragraph
grep {findWhat:"\r\Z"} {changeTo:""}

{changeTo:""} empty quotes doesnt seem to work
HOW DO I TELL THE SCRIPT "REMOVE WHAT YOU JUST FOUND"

btw. this exact query works perfectlly when executed in InDesign Find/Change dialog box with empty CHANGE TO

quite a few GREP queries which work perfectlly when executed in InDesign Find/Change Dialog Box when retyped into script and ran from script doesnt work, return unexpected errors or just dont do anything at all

few examples of queries which work smooth when executed in InDesign GREP Dialog Box but when retyped into the script they do unexpected chaos or dont work at all:

//multiple spaces into single space
FIND [~m~>~f~|~S~s~<~/~.~3~4~% ]{2,} CHANGE TO \s

//prevent last to words of paragraph to separate - eliminates single word on last line of paragraph
FIND (\w)\s(\w+[[unct:]]$)
CHANGE TO \s

are there any general rules how the InDesign and the script syntax differ... any rules how to alter syntax before using the same queries between InDesign and the script

I suspect that the queries in the script should use TEXT equivalents of GREP wildcrads (eg. ^s instead of ~s for nonbreaking space) but the problem is that lot of usefull GREP wildcards doesnt have TEXT equivalent
(for example $ for End of Paragraph Location or [[unct:]] POSIX)

please help the automation of the script is very promising UNFORTUNATELLY I cannot make the script behave just exactly same as the InDesign Find/Change dialog box...
  Reply With Quote


  sponsored links


2 15th July 00:23
rosta_vanek
External User
 
Posts: 1
Default FindChangeByList script FAQ



a little tip i discovered along the way and might not be obvious for some users...

when i import Word with local Italic and Bold set by the editor i always transform them from just local overrides into proper Character Styles "Bold" and "Italic"

heres how to tell the FindChangeByList script to do it for you (you must have "Bold" and "Italic" character styles created before running the script):

//local Italic
grep {findWhat:".",fontStyle:"Italic"} {changeTo:"$0",appliedCharacterStyle:"Italic"} {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}

//local Bold
grep {findWhat:".",fontStyle:"Bold"} {changeTo:"$0",appliedCharacterStyle:"Bold"} {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}

nice, now hopefully ill be able to solve the problems from previous post and the script will be PERFECT
  Reply With Quote
3 15th July 00:23
rosta_vanek
External User
 
Posts: 1
Default FindChangeByList script FAQ


I made a mistake in the first message... the queries that work in InDesign dialog box should be like this (the way i misstyped them they wouldnt work at all)

//multiple spaces into single space
FIND [~m~>~f~|~S~s~<~/~.~3~4~% ]{2,} CHANGE TO \s

//prevent last two words of paragraph to separate - eliminates single word on last line of paragraph
FIND (\w)\s(\w+[[unct:]]$)
CHANGE TO $1\S$2
  Reply With Quote
Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666