Please make sure you have tried the latest (alpha) version of BetterTouchTool and that you have already tried to restart your system :-).
System restarted many times. Currently running 6.315.
Describe the bug
The Action “Set Value for Variable”, which I use several times in an Action Sequence I run multiple times a day, is not updating the variable. The variable I am saving is the mouse cursor position. These variables retain an old value.
It had been working for months.
I have "Persist" checked at each Action Configuration. I will uncheck this and see if that makes a difference.
These Actions are triggered by a Floating Menu. I run BetterTouchTool on a PowerBook M4 running MacOS 26.3.1 (a) .
(Adding:) The Action "Ask for input, Save to Variable" is also not being updated.
(Adding:) The list in "btt_user_variables" does seem complete. Afaict, it is missing variable that should be there.
There has not been a change to variables recently. Do you have a concrete example of how you are using it? Maybe it conflicts with a built in variable?
Seems unlikely. All my Action Sequences that use a saved custom variable worked previously. I had to work on something else for the last five weeks. On returning to this work and these Action Sequences (I have them organized on a Floating Menu I use to control video play in Adobe's Lightroom Classic), they are not working.
Do you have a concrete example of how you are using it?
In most (perhaps all) cases where I am saving the mouse cursor coordinates to a variable, I move the mouse cursor to a location by image search or screen coordinates, I then use a "Save Current Mouse Position" Action that gives a field named "Save To Variable With Name" in which I specify a value such as "tempPlayPauseButtonLocation", and I follow that directly with a "Set Value for Variable" Action in which I specify a Variable Name, e.g.: "PlayPauseButtonLocation" and a value that specifies the just-named variable with the name in curly braces, e.g.: "{tempPlayPauseButtonLocation}", the Variable Type set to "Text", and "Only set … " not checked and "Persist … " checked.
In Action sequences that use the saved variable, I use the Action "Restore Saved Mouse Position" with "Restore Position From Variable With Name" set to the second-named variable above, e.g.: "PlayPauseButtonLocation", in this case not enclosed by curly braces or any other characters.
Afaik, I got that method from you or from an example posted here.
The Action Sequences are similar when I am saving other information – not mouse cursor coordinates – to variables.
(Adding:) Using the Action "Show HUD Overlay" and specifying the variables I can now confirm that the "temp" variables are being saved correctly and the "non-temp" variables are not. The "Show HUD" action shows the expected value when I preview the the HUD for, e.g.: "{tempPlayPauseButtonLocation}" but displays "btt-undefined" when I preview e.g.: "{PlayPauseButtonLocation}".
I found several errors. Most of the Actions that save the temp variable to a named variable (I don't think I have the lingo correct) had a space after "temp" in the temp variable name specified, e.g.: "{temp TimeStampLocation}" where the correct string is "{tempTimeStampLocation}".
I have corrected these.
(I removed a few paragraphs written when I thought this was working. It may have once, but that has not persisted.)
There are still many oddities. The saved values are still not being used to position the mouse cursor.
I have tried to reproduce, but seem to be unable to. Could you check whether this action sequence works for you or whether I misunderstood something here?
Your Action Sequence works. I have used it to check what is being saved in my "btt_user_variables" file. I checked both with and without external monitors attached. There does not seem to be any problem getting and saving the mouse cursor locations that I use.
To confirm: all six of the screen locations I use in my Floating Menu to control video play in Lightroom Classic are properly found and saved to named variables. I have confirmed the x,y values manually using CleanShotX.
The problem seems to occur when an Action restores the mouse cursor to a saved location.
None of the Actions that restore the mouse cursor to "x,y" place the cursor correctly. They seem to be using old values that were once saved but should be replaced each time I run the Action Sequence that gets the current values from the Lightroom Classic UI.
I have included "Show HUD" Actions in the sequence I use to confirm the saved locations. The numbers shown are correct – they match (no surprise) the values saved in the variable. But the position of the cursor is incorrect. I don't think the difference is in any way dependent on the current saved values. I have resized different elements in the Lightroom Classic UI so that the saved locations vary in x and in y: in all cases, so far, the "Restore" Actions put the mouse cursor in the same incorrect places while the "Show HUD" displays the correct, saved, locations.
Afaict, the issue was caused by these variable names: "tempPlay/Pause Trigger by Screen X,Y" and "Play/Pause Trigger by Screen X,Y".
That worked for months, and stopped working three weeks ago. (It may have failed due to changes I made; I can't say that it was caused by BetterTouchTool or MacOS.) As part of extensive trouble-shooting, I renamed all variables to use only alphabet and numeral characters, and so changed the names to "tempPlayPauseButtonLocation" and "PlayPauseButtonLocation".
I have had no further issues. My numerous ActionSequences triggered from my Floating Menu that I made to control video playback and frame saving in Adobe Lightroom Classic work without issue. I may have made additional changes, but this seemed to be the one that made the difference. I don't know why it worked for some time, and then stopped working (BTT was not getting the correct mouse cursor location from the saved variables).
I could have hard-coded the coordinates of the video controls, but that depended on always having the Lightroom Classic interface set up the same way. It has sliding resizable panels top, bottom, left, and right, their size determines where the video controls are on the screen – I wanted to dynamically retrieve the positions of the controls (and save them to variables).