I would like to prevent UI refreshing (in the arrange window) while a deferred script is running in the MIDI editor. (In the hope of improving the speed of the script.)
I have tried setting reaper.PreventUIRefresh(1) when the deferred script starts, and then reaper.PreventUIRefresh(-1) when the scripts eventually exits, but this doesn't seem to work. (Nor if I use any other integer.)
According to a post in another thread:
Quote:
Originally Posted by X-Raym
These scripts doesn't work because a post 5.0 REAPER updates put a prevention system for "orphelin" prevent UI refresh not resolve in a scripts (for eg, if you script broke before the PreventUIRefresh(-1) call, the interface will be buggy, untill you call PreventUIRefresh(-1) yourself. The fix aims to prevent that.
|
This prevention system also seems to override PreventUIRefresh in deferred scripts.
So... is there any way to prevent UI refresh while a deferred script is running?