Is there a command to toggle checked/unchecked in checkbox mode as {SPACE}?

Of course, this is a "workaround" but it does - I think - what you've sought. Put this code in a button and set the hotkey of your choice. The hotkey is currently set to F10.

If checkbox is enabled, it will select the current item and move down one, ready to do it again.

If checkbox is NOT enabled, it will select the current item and move down one, ready to do it again.

Select Checkbox If Enabled-Select Item Toggle.dcf (909 Bytes)

1 Like

In fact, this will conflict with the AHK script.
If I run my ahk script, 〈ctrl+alt+space〉 will trigger 〈alt+space〉 (pop-up menu in the title bar).
Therefore, having an internal switching command is better than the sendkey method.

  1. There is a version above that does not use sendkey.
  2. This is probably something I'm overlooking, but I don't see the need to difference in this case between the command being internal or not.
  3. Trying to use a hotkey sequence from outside, IMHO, it's like going around looking for troubles, whether there is an internal command or not.
  4. It seems like this thread is about at least 2 different things now.

The problem is :
the keys combination send by @sendkey will be first captured by the AHK script.
<ctrl+alt+space> : physically, these 3 keys are not strictly pressed simultaneously.

But if there is a internal command, for example, "Set CheckSelFiles=Toggle",
there will be no jamming keys issue since we do not need send virtual keys.

Please read the 1. You can create a User Command with that script code and use it the same as a internal one.
I still don't understand why you need to invoke Opus commands via hotkeys using AHK if you can do it from the app itself.

I get it!
My AHK code for test:

#Requires AutoHotkey v2.0
#SingleInstance Force
InstallKeybdHook
InstallMouseHook
Persistent
;Space::Space
Space::Sendinput "{Space}"

It is〈Space::Space〉that caused <ctrl+alt+space> to trigger〈alt+space〉.
Now, I replace it with〈Space::Sendinput "{space}"〉, All are OK!

In the next update, Select INVERT TYPE=focus can be used for this.

5 Likes

Fantastic, thanks @Jon.

@bytim I just read through this thread and I'm impressed with how things turned out for you. You believed in yourself and stood for what you knew to be right lol.

1 Like