• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

SHIFT \ RETURN, and TAB space for find/replace array

Guest
Jan 23, 2013 Jan 23, 2013

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.

TOPICS
Formatting and numbering , Scripting

Views

2.8K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 24, 2013 Jan 24, 2013

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 24, 2013 Jan 24, 2013

Copy link to clipboard

Copied

LATEST

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines