need help with callbacks or similar
ok, i am stuck with a script i am doing and after googling and testing stuff nearly the whole day i could need some help...
- i have a script creating a dialog that stores some information on some userdefined object property
- the script is meant to be executet by shortcut or better from a custom toolbar
- also this script is stored in the scripts/startup folder
... here the problem appears. i want the dialog to open automatically on startup but only if it has been used in the scene and has stored some information. if not it should not open.
i used "callbacks.addScript #filePostOpen "destroyDialog()" id:#postfileCB" which calls a function checking if the script has been used before in the scene or not and then let the dialog open or destroys it. so far it is working nice but i cant find a solution to do the same if 3ds max is opening a new instance (e.g. by clicking the max.exe).
i am looking for something like "callbacks.addScript #newMaxInstanceOpened" ^^ ... or some other solution/workaround. i tried fiddling for example with maxfilename or objects.count to determine this is a new file but that does not work in that moment the script is executet from the startup folder.
any help is much appreciated. thanks in advance.