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?
try to put "#target indesign" at the bigening of you sript code, then you can launch the script from out of InDesign
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.