Old 02-23-2020, 09:01 AM   #1
Archie
Human being with feelings
 
Archie's Avatar
 
Join Date: Oct 2017
Location: Russia
Posts: 366
Default Bug EnumProjects

Hi.
The function "reaper.EnumProjects(-1)" during the opening of a new project does not change its value (GIF). Is this a mistake or not and is it possible to fix it?
Thanks!


__________________
=================================
ReaPack| Archie-ReaScript: Discussion | Donate | Donate2 | Donate3 | PayPal |
Archie is offline   Reply With Quote
Old 02-23-2020, 09:06 AM   #2
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 15,749
Default

The object that represents the current project doesn't change when you switch to a new project, but the attributes of that object change. For example if you chose "open recent", you would not see the object change, but the value of the aprojfn variable would change.
schwa is offline   Reply With Quote
Old 02-23-2020, 09:20 AM   #3
Archie
Human being with feelings
 
Archie's Avatar
 
Join Date: Oct 2017
Location: Russia
Posts: 366
Default

So, if the project is not saved and I open a new project from an unsaved project, then how can I find out that the project has changed?

And the second question is off topic:
When a project is loaded from a template, ProjExtState data can be saved in it. Is it possible to make a function that clears ProjExtState when opening a project from a template
Thanks!
__________________
=================================
ReaPack| Archie-ReaScript: Discussion | Donate | Donate2 | Donate3 | PayPal |
Archie is offline   Reply With Quote
Old 02-23-2020, 09:24 AM   #4
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 15,749
Default

Presumably you want to do something specific when the project changes, so it's probably best to detect the project change in whatever way is most relevant to whatever it is you want to do. For example if you are displaying the project name, you should look for the project name changing; if you are looking at the project extstate, you should look for the project extstate changing, etc.
schwa is offline   Reply With Quote
Old 02-23-2020, 09:46 AM   #5
Archie
Human being with feelings
 
Archie's Avatar
 
Join Date: Oct 2017
Location: Russia
Posts: 366
Default

Thank you very much for the answer.
__________________
=================================
ReaPack| Archie-ReaScript: Discussion | Donate | Donate2 | Donate3 | PayPal |

Last edited by Archie; 02-23-2020 at 10:06 PM.
Archie is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 06:57 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.