Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to access specialCharacters #1

Closed
RomanTschirf opened this issue Aug 18, 2018 · 2 comments
Closed

How to access specialCharacters #1

RomanTschirf opened this issue Aug 18, 2018 · 2 comments

Comments

@RomanTschirf
Copy link

RomanTschirf commented Aug 18, 2018

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

@lohriialo
Copy link
Owner

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

@RomanTschirf
Copy link
Author

Thanks alot! Great resource!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants