lohriialo/indesign-scripting-python

How to access specialCharacters

RomanTschirf opened this issue · 2 comments

In JS a specialCharacters object seems to be present and can be used like this:

aTextFrame.contents = SpecialCharacters.autoPageNumber

Is it possible to access this object with python?

I found a workaround but the question remains.

aTextFrame.contents = 1396797550

I've added the Python Scripting object definitions from InDesign Scripting Type library doc_reference. Please see indesign_CC_2018.py for more details

The constant for special character auto page number marker is

idAutoPageNumber = 1396797550 # from enum idSpecialCharacters

Usage example:

idAutoPageNumber = 1396797550
myTextFrame.Contents = idAutoPageNumber

Thanks alot! Great resource!