Macbook pro 16" 2021 m1 max
macos Sonoma 14.7.6
BTT 5.445
I created a temporary number variable called isExternalMonitorConnected some months ago.
I use two actions to assign the value of this variable to 0 or 1. One action sets it to 0 and the other one sets it to 1.
Today I have enabled the persist checkbox in both actions, as I want to make isExternalMonitorConnected a persistent variable.
The problem is that the variable is always shown as temporary in the variables window. It seems that it doesn't change to persistent.
I have tried to fix it without success:
- rebooting computer
- restarting BTT
- removing this variable in the variables window and restarting BTT
I have found that the problem is only happening when BTT starts.
Example:
- I restart BTT with my external monitor unplugged
- the variable isExternalMonitorConnected is set to 0 as temporary
- I connect my external monitor
- the variable isExternalMonitorConnected is set to 1 as persistent
- I restart BTT
- the variable isExternalMonitorConnected is set to 1 as temporary
I have tried to add a delay before assigning the value but it doesn't fix it.
@Andreas_Hegenberg I have seen that the problem is that the variable is saved in the "btt_user_variables.plist" file as a real number instead of an integer number (only when BTT restarts).
When the variable is saved as a real number in the persistent variables of the plist file, it is shown as temporary variable in the BTT variables window.
I have changed other temporary number variables to persistent number variables without issues.
I think that this variable was created at the beginning as a temporary string variable, and changing it to persistent number variable causes this issue.
I can't fix the problem, hope you can fix it or recommend me a solution.
EDIT: If you create a persistent number variable using the BTT variables window, it is saved in the plist as a real number. Same if you modify any variable using the BTT variables window.
are you sure you are not still setting it as temporary variable somewhere? It seems to work fine here. (integer / vs real doesn't matter, BTT variables don't differentiate there). Maybe in some script that is called when btt is started?
You could add something like this to check whether it is changing:
I would say that the problem is inside BTT, as this issue is not happening if I substitute the Assign/Set Value for Variable action for a Run Apple Script (async in background) action:
If I restart BTT using the Assign/Set Value for Variable action, the variable is shown as temporary in the variables window, and it's saved as real in the plist file.
If I restart BTT using the Run Apple Script (async in background) action, the variable is shown as permanent in the variables window, and it's saved as integer in the plist file.
Regarding the "real" vs "integer": Another temporary variable that I have changed to persistent is having the same problem. When this variable is zero, is it shown as real in the plist file wiath a value of 0,0 instead of 0.
Can this 0,0 cause an error if BTT don't understand it as 0?

EDIT: just to reminder that this problem is only happening after restarting BTT. Once BTT is running, the execution of Assign/Set Value for Variable action works as expected and sets the variable as permanent, even it is still saving it as real.
@Andreas_Hegenberg did you check this issue? Did you see my last post? The real value of 0,0 can cause some error?
real value doesn't cause the issue.
I'll look into your issue on Monday, I think I know why it happens.
1 Like
hi @Andreas_Hegenberg
did you look into this issue? do you know what is going on?
Hi @Andreas_Hegenberg
Could you check this issue?