Copy link to clipboard
Copied
Is it possible to add a right indent tab simply without resorting to
SpecialCharacters?
myString += "Price:\t$19.99";
that adds a regular tab. I'd like that to be a right-indent tab.
Possible?
Thanks,
Ariel
Copy link to clipboard
Copied
Insert one in your text then look at the Unicode in the info panel.
Hint: Adobe uses this code not per its original intended usgae, "Backspace".
Copy link to clipboard
Copied
Bingo! Thanks Jongware.
Now, why didn't I do this myself first? I know about the Info panel etc.
It's just that there's a whole bunch of special characters (can't
remember which right now), that share the same Unicode value. If I'm not
mistaken. So I'd given up using the Info panel trick -- too soon, it seems.
Ariel
Copy link to clipboard
Copied
You can also use Special characters as in:
SpecialCharacters.RIGHT_INDENT_TAB;
You are right there is an issue with different characters having same unicode value. Can’t remember which ones, though.
Ralf
Copy link to clipboard
Copied
Ralf, the problem with that is that you cannot use these SpecialCharacters in a simple Javascript string -- you have to insert them into 'live' InDesign text. And unfortunately, ID does not provide a "new Text" constructor! Ariël needs them in a simple string.
Copy link to clipboard
Copied
I know, it is a problem. He would need to do something like:
story.insertionPoints.item(-1).contents="Prize";
story.insertionPoints.item(-1).contents=SpecialCharacters.RIGHT_INDENT_TAB;
story.insertionPoints.item(-1).contents="$19.99";
Not very elegant. I only mentioned it because I seem to remember that there are some characters that can not be accessed by unicode.
Ralf
Copy link to clipboard
Copied
> You are right there is an issue with different characters having same unicode value.
> Can’t remember which ones, though.
Break characters. Column Break, Frame Break and Page Breaks are all coded in ID as Paragraph Return (U+000D).
@+
Marc
Copy link to clipboard
Copied
Here is my work around if anyone wants it...
I use special characters enumerations in a .jsx file, but I don't use them as strings, set the type to number to get it working.
Use it like this in your .jsx file:
/* after I've loaded the xml into textframes */
app.findPreferences = app.changePreferences = null;
var myFound = app.activeDocument.search( "I_want_a_right_indent_tab_here" ); /* you can put any code for right indent tabs in your textframes as long as you reference it here */
myFound[0].contents = 1397909876;
Here is all the special characters enumeration codes for CS2
[Link to plagiarized site removed by host]
Enjoy!
Copy link to clipboard
Copied
davekinross wrote:
Enjoy!
Sorry, but I'm not enjoying that reference you gave. That site is a plain copy of my hard work, unattributed, and with advertisements sprinkled on top. It's a piece of blatant theft. (The site producer even refers to himself "an XML expert" -- ha ha. I would laugh if only it weren't so pathetic.)
For the original, see http://www.jongware.com/idjshelp.html or its online incarnation at MIT: http://jongware.mit.edu/idcs5js/pe_SpecialCharacters.html
Copy link to clipboard
Copied
I removed the link for you...
Harbs
Copy link to clipboard
Copied
Do you have the Decimal codes on your site? That is why I pointed to the link which has been removed.
Here are the Special Character Decimal codes I use:
auto Page Number
1396797550
next Page Number
1397649518
previous Page Number
1397780590
section Marker
1400073805
bullet Character
1396862068
copy right Symbol
1396929140
degree Symbol
1396991858
ellipsis Character
1397518451
forced Line Break
1397124194
paragraph Symbol
1397776754
registered Trademark
1397904493
section Symbol
1400073811
trademark Symbol
1398041963
right Indent Tab
1397909876
indent Here Tab
1397319796
em Dash
1397058884
en Dash
1397059140
discretionary Hyphen
1396983920
nonbreaking Hyphen
1397645928
end Nested Style
1396855379
double Left Quote
1396984945
double Right Quote
1396986481
single Left Quote
1397967985
single Right Quote
1397969521
em Space
1397058899
en Space
1397059155
flush Space
1397124179
hair Space
1397256787
nonbreaking Space
1397645907
thin Space
1398042195
figure Space
1397122899
punctuation Space
1397780051
column Break
1396927554
frame Break
1397125698
page Break
1397778242
odd Page Break
1397715010
even Page Break
1397059650
footnote Symbol
1399221837
Copy link to clipboard
Copied
Did you try my link? Of course I have the decimal codes on my site!!! That's the only reason they appeared on that copy-cat site in the first place!!!