@robcolonia just FYI: Floating Menus are completely different than the (deprecated) Notch Bar. Your issues is most likely not related to this.
Also your script is completely different as it is using the BTT variables (which are only available if a "now playing widget" is configured in BTT)
I've faced similar issue, let me know if separate issue should be opened for this. My issue is that sometimes the menu item values are only update on hover over the item. I have not selected "Run Script On Menu Hover", the scripts are running every 60sec or 8sec. I was thinking to maybe install "Process Priority Helper Tool", but not sure if this will help.
what kind of values are you updating? (a hover will always rerender the ui, so it seems your script ran fine but the rerender did not trigger)
Values are custom variables, like for example at what time (timestamp) a specific shortcut was executed and the other value is the elapsed time from that timestamp.
Ah, you are using set_menu_item_value, not update_menu_item, correct?
Maybe there is an issue with that (I'm mostly using update_menu_item myself thus I might not hav noticed)
Actually I'm not using neither, I use it like this:
on itemScript(itemUUID)
tell application "BetterTouchTool"
set aws_login_time to get_string_variable "custom_var_current_time"
end tell
return aws_login_time
end itemScript
ok that should be the same as using update_menu_item. I'll have a look!
I have tried to reproduce this by calling a script that just updates the time regularly, however I haven't seen it fail yet. How often does this happen in your case?
on itemScript(itemUUID)
set currentTime to do shell script "date '+%H:%M:%S'"
return currentTime
end itemScript
Here's an example:
- Yesterday the initial variable (when a shortcut is executed) was set correctly
- Today even after whole night and half a day when the macbook was in "sleep" after login the elapsed time menu item was showing correct value and continue to update until without issue. Then I've moved on to step 3 below.
- Sometime afterwards I've executed step 1 again, and after around 20 min the 2nd menu item stopped updating - there's an screen recording of it - how it is updated after hover.
I'm constantly facing this behaviour, I'm not sure if I can reproduce it on purpose, but today I've encountered it at least 5 times. All of the items had the issue at the same time, but I've also faced the previous issue where only one of the items was not updating.
exported_firstfloatingmenu.bttpreset (104.9 KB)
thanks for sharing the menu! I'll try with that because I haven't been able to reproduce it with my test setups yet
I also have this problem. I hide the Top menu in MacOS and have a widget for battery and time made with apple scripts. It gets stuck from time to time. My quick fix was to restart BTT periodically.
I have started seeing Floating Menus not being updated in the past couple of days as well. Nothing has changed, and the script works manually.
The Apple Script being run is:
try
do shell script "/path/to/script.sh"
on error errorMessage
return "Calendar script error"
end try
And the script result is correct when I run it in BTT UI, but the Floating Menus don't update. When I restart BTT, it updates, but never again after that.
That sounds like a different issue to me because as far as I know the issue initially described here only happens sometimes.
Do you have a refresh rate set for the script? (By default BTT will only execute it once)
Yes, I have set a refresh rate. And it did work before. It stopped working seemingly without changing any settings. Not sure if there was an automatic update that might be related. I'll look into it and won't hijack this topic. Thanks for the comment.
could you try with a simple script to see whether the script is the problem?
E.g. the one I posted that just returns the time
on itemScript(itemUUID)
set currentTime to do shell script "date '+%H:%M:%S'"
return currentTime
end itemScript
tried it
I've also start facing the other issue, where even on hover menu items are not updating, and only restart of BTT helps (disable/enable on menu/item level does not work). The "Action Executed On Trigger" is working for the item which have it configured. At this very moment I'm facing this issue, let me know if some traces/logs can be collected so that you can troubleshoot?
would be great if you could go to help-> export diagnostic debug information and send the result to me (andreas@folivora.ai) when this happens
I have added some additional change triggers to the next alpha (will be uploaded tomorrow), but Iām not yet sure whether they will solve the issue
Thanks for the logs! Unfortunately they didn't contain anything that would explain the issue (and I haven't seen it with my test setups yet).
With v4.863 alpha I have added some more change detection and also more debug logs. Would be great if you could test with that version.
If it happens again, it would also be interesting to know whether calling the predefined action "Reset Floating Menu / Item Properties" does work.