When I switch the event handler to OnCreated (because I want the on-disk file to run when this node is created), it creates a new file instead of making it so my on-disk file is run when the node is created.
Is there a straightforward way to make a Python script stored on disk run when an HDA is created?
The simplest way is in the hda, in the onCreated.py like you have in your attachments above , is to simply import your script and run the method you want to run, you can pass kwargs to it if its setup to use it.
so if its a lop node called myNode, the path would be : scripts/lop/myNode_onCreated.py
however you cant have both, either the hda level or the having it in your `HOUDINI_PATH`, if you set it up as a script in the `HOUDINI_PATH` it will ignore the onCreated.py in the hda. I found that out recently