Hello,
I found a possible bug in Shotcut 26.9.27 relating to how AutoHotKey interacts. I was previously on 26.4.30 and didn’t experience this issue which is why I think the problem could be with Shotcut.
I have an AutoHotKey script with a bunch of my most commonly used edits. All custom shortcuts work as expected unless a double or triple click is sent. If I manually perform a double or triple click within an editable parameter box in Shotcut, it responds as expected. A double-click highlights the digits to the left or right of the decimal, depending which side the double-click is performed, and a triple-click highlights everything in the box. However, when a double or triple click is sent via AutoHotKey, it acts like a single click.
For example, I have a shortcut to change the speed of a clip to 4x and it looks like this:
In versions 26.4.30 and prior, this would open the Properties tab and triple click in the “Speed” parameter box to highlight the entire value. Then the number 4 is sent and Enter is pressed which would set the speed to 4.000000x.
In version 26.9.27, it’s setting the speed to 41 because the triple click isn’t happening to select all. So, instead of overwriting everything with the number 4, it’s adding a 4 at the front of what’s already there, which is 1.000000x and gives me 41.000000x.
Is there any way the newest version of Shotcut could be interfering with what’s being sent from AutoHotKey?
I had never even heard of a triple-click until today!
I do not know why the behavior would change. Sometimes, when we find unexpected UI behavior changes it is because we upgraded the QT UI library. But we did not do that for this release.
As a work-around, can you use “CTRL-A” instead of tripple click? “CTRL-A” will select all in the field.
Thanks for the quick response! I tested it and yes, modifying the AutoHotKey script to use “CTRL A”, instead of a triple click, does work.
I appreciate the suggestion and I really wasn’t trying to get you to help me with a separate program. I’ve been using this script for about 10 months now, over at least a couple different versions of Shotcut so I was just confused that it stopped working even though I could still manually double and triple click within Shotcut. I just wanted to be sure it wasn’t a larger issue.
Yeah. That is really curious - especially since I can’t think of any changes we made that might have caused this. I’m glad we found a way to get you back on track.
I have a question to the OP. Do you have any “Sleep” intergers in your AutoHotKey code? It is possible that your code was running straight through and by the time it got to your triple click code, Shotcut was still catching up. So by the time you got to the triple click in your code, it could have only been a single click (because the other clicks ran while something else was still going on). I know you have a solution, but using the same code you were using and adding “Sleep” intergers may have also fixed your problem.
Focusing the box and sending a select-all shortcut is much more dependable across Qt and Shotcut updates than relying on rapid multi-clicks to clear the field. In newer Qt builds, rapid simulated clicks often get coalesced or treated as a single event unless an explicit interval is configured.
You can click once to focus the Speed field, then send Ctrl+A before typing the replacement value:
I usually have to make some minor tweaks to the script after installing a new version of Shotcut. Prior to posting here, I played around with adding different sleep intervals before a double-click or triple-click, but it didn’t seem to make a difference. I did have to add sleep commands to another shortcut that previously worked fine without them, so the current UI seems to be just enough slower to require it now. This isn’t something you’d ever notice when applying these changes manually. That’s fine though because even if the UI is sped up in the future, the sleep commands won’t mess up the script.
I agree, CTRL A is better than a triple-click and should always work with without tweaking after installation of future versions. Luckily, like your Home+End suggestion, there are multiple ways to do the same thing. I did try using the sleep command before the triple click but I didn’t try SetMouseDelay, maybe that would have worked.
Like you said in a different post, there is multiple ways to do the same thing. I had/have a AHK script that does the same thing that you appear to be doing, but instead of a triple click, I was using a click to put the curser into the Speed box, and then a double click to highlight the number “1” before changing it to however fast I wanted the clip to be sped up to. This is what I was using.
Click 2110, 80 ;Clicks the "Properties" menu button
Sleep 150
Click 1813, 273 ;Clicks inside the Speed box
Sleep 150
Click 2 ;Selects the number "1" in the Speed box
Sleep 150
Send "10" ;Changes the number "1" to "10"
Sleep 150
Send "{Tab}" ;Executes the speed change
Sleep 750
My script doesn’t stop there though. I also have code that will automatically delete the blank space that’s left after the clip, from having sped the clip up.