Skip to main content
avid_body16B8
Legend
January 10, 2011
Question

Script running when opening a file.

  • January 10, 2011
  • 2 replies
  • 434 views

I am new at this so forgive me if this is a stupid question.

I have a script that allows me to insert today's date in a text box. So far, it works well when I run the script. However, I would like the script to automatically run when I open the file. This would save me from having to update the date manually.

Is there a way to accomplish that?

This topic has been closed for replies.

2 replies

Kasyan Servetsky
Legend
January 11, 2011

This question was discussed several times on this forum. If you search for "afterOpen", you'll find a few threads you might be interested to read -- for example this one. In short, the built-in InDesign beforeOpen and afterOpen events don't work well and are not very useful: the event occurs before the layout window is open which results in error if you try to do something in the document by script -- e.g. edit text.

Most probably you'll need APID ToolKit to do what you want.

Kasyan

Participant
January 11, 2011

Hi,

try to put "#target indesign" at the bigening of you sript code, then you can launch the script from out of InDesign