project file version check through scripting
Hi,
how can I check the version of project file through scripting in AE?
I am using getStyleAt() expression which was added in AE 2020 i believe. If I have a project that was created in earlier version, even if opened in AE 2022 it will say getStyleAt() function does not exist. If I import the projects to 2022 instead of opening it in 2022, it works. So I need to add a check to my script, if the project file currently opened was actually created in version 2020 or later. Similarly to app.version, but basically app.project.version. I have looked into scripting guide, no such method exists. However, there is this app.project.xmpPacket. Which i believe should contain this info. If I open old project in notepad it shows lines like:
<xmp:CreatorTool>Adobe After Effects CC 2018 (Windows)</xmp:CreatorTool>
<stEvt:softwareAgent>Adobe After Effects CC 2018 (Windows)</stEvt:softwareAgent>
But i do not see the same info when opening project created in version 2022.
Also I am no programmer, i can write a simple code, but this xmpPacket stuff is way more than i can chew.
Can anyone help me how to check the version of AE project file through scripting, please?
Thank you