Copy link to clipboard
Copied
So right now i have a simple script that will go through a document and find words/characters and replace them with something else. Right now it loops through the document trying to find words in one array and replace them with the text of a second array.
How would I add in tab spaces for alignment and then a new line return?
For example, how do I tell it to replace "Text One" with (SHIFT \ RETURN, "Some Text", TAB space, "More Text")
Specifically I need it to work like this
----script----
agencies = ["Account", "Department", "Department 2", "Department 3", .......];
newagencies = ["Accountancy Board", (SHIFT \ RETURN, "Department", TAB, "#2"), (SHIFT \ RETURN, "Department", TAB, "#3") ];
----results----
Account. Department 2 Department 3
Accountancy Board
Department #2
Department #3
any help at all would be great.
Copy link to clipboard
Copied
Hello.
I don't know if this helps but in the framemaker search/replace dialog you code return with "\p" soft-return with "\n" and tab with "\t".
I am very new to extendscript and would like to do the exact same thing you do. Would it be possible to have a look on your script?
cheers
Copy link to clipboard
Copied
To enter special characters you need to use either the octal or hexcodes for their values (see: http://help.adobe.com/en_US/framemaker/scripting/WSfbe285cf4bf3fffd-491bdbc212f9bbd97f1-7f82.html)
Shift-Return = \x09
Tab = \x08
For the last version of the FrameMaker Character Sets documentation, see: http://help.adobe.com/en_US/FrameMaker/9.0/CharacterSets/character_sets.pdf