Detect - on file open

is it possible to automatically run a script when rhino opens a file / creates a new document? thanks

check this (duplicate ? ) topic:

a Rhinocommon plug-in can subscribe to the events of RhinoApp and RhinoDoc
https://developer.rhino3d.com/api/RhinoCommon/html/Events_T_Rhino_RhinoApp.htm

https://developer.rhino3d.com/api/RhinoCommon/html/Events_T_Rhino_RhinoDoc.htm

thanks