I'm trying to determine via George whether or not the current script has run since the current project was opened.
Using the project ID is not really useful since it is consistent between sessions.
I think what I need is access to the system file information - especially the "Last Opened" property. If I could access that, I could also log the time every time I run the script in the user string. Then each time I can compare the time of the last script execution vs the time the project was opened - if earlier, then this must be the first script execution since opening the project.
I'm open to other suggestions too. My larger goal is to be able to uniquely identify clips and layers between sessions. It's easy within a session as you can just store the clip ID and layer ID in the userstring and call them up whenever needed, but these are re-assigned every time you open a project so if you've just re-opened a project any scripting that was specific to a clip or layer is now in a state of uncertainty until you do some verifications in your scripts (check the name, the position, etc.). Even then - you can never regain total certainty that you are looking at the same clip or layer that you originally stored and not a duplicate, or different one that was renamed for example.
All this to say - if I could get my script to do this verification work ONLY on its first execution since opening the project, then the script could proceed to only use the ID's for the rest of the session - which is much faster and less ambiguous.
I'm working towards a custom tool that I intend to share when it's ready - so I prefer to avoid any external solutions like command line scripts and the like. Pure George over here
![Wink ;)](./images/smilies/icon_wink.gif)
Thanks!