Thread View: adobe.scripting.indesign
3 messages
3 total messages
Started by sorour
Fri, 26 Dec 2008 17:09
Grep find change
Author: sorour
Date: Fri, 26 Dec 2008 17:09
Date: Fri, 26 Dec 2008 17:09
17 lines
1424 bytes
1424 bytes
in This script i need to replace single word لا with the same + Hair Space: ~|. app.findGrepPreferences = app.changeGrepPreferences = null; app.findGrepPreferences.findWhat = '\bلا\b' app.changeGrepPreferences.changeTo = 'لا~|' app.activeDocument.changeGrep(); While nothing happens with the first with the metacharacter \b, the second work good but changes both on single words that other words with the two fianle letters (es: i need to replace be, and no in "be" and "no" word not "be" or "no" in adobe, and in casino, milano, ...) app.findGrepPreferences = app.changeGrepPreferences = null; app.findGrepPreferences.findWhat = 'لا ' app.changeGrepPreferences.changeTo = 'لا~|' app.activeDocument.changeGrep(); لا is an arabic word = No Does anyone know the proper syntax to get this to work? Thanks!
Re: Grep find change
Author: Peter Kahrel
Date: Fri, 26 Dec 2008 20:12
Date: Fri, 26 Dec 2008 20:12
8 lines
713 bytes
713 bytes
You need to escape the backslashes:
app.findGrepPreferences.findWhat = '\\bلا\\b'
Peter
Re: Grep find change
Author: sorour
Date: Fri, 26 Dec 2008 23:25
Date: Fri, 26 Dec 2008 23:25
4 lines
681 bytes
681 bytes
Thanks Peter it work great with latin words, but not with arabic words! i'm traying now to solve the problem. sorour
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads