A lot of people want to stop their screen from refreshing while their macro is running but I want the opposite. I’d like to update my spreadsheet periodically to let the user know the script is running and calc has not locked up. My macro can take a minute or two to run, so after 10 seconds or so the screen dims and it looks like an app that’s frozen.
Looking into this, I’ve seen people refer to ThisComponent.lockControllers
and ThisComponent.unLockControllers
, but I haven’t been able to get those functions to work. From my limited understand of the API it seems like from com.sun.star.lang import XComponent
should get me there but I’m getting an AttributeError when I try to call either function.
And I’m not 100% convinced that I’m barking up the right tree - it sounds like (from all the people who are trying to turn lock it to prevent screen refreshes) like the controller should be unlocked by default.
So any tips on visually updating the spreadsheet while a macro is running are appreciated. Ideally in python, since I haven’t been able to convert the basic examples successfully.