Hotkey Prefs Help

I've been spending a lot of time editing hotkeys\menus and trying to understand js in hotkeys...

I've set F12 to open "Prefs CUSTOMIZE=keys" simple enough. is there way to add a line that save and close the Customize panel [if its open] by tapping F12 again ?

I don't think there's a way to do that, at least without involving external tools (e.g. Autohotkey).

oh boy, that might be opening a can of worms. ha. been playing with ahk for a couple months.... it ... might work. ill get back if i attempt it.

okay, that only took and hour. a bit surprised it was this easy, had to play with 3 scripts and control options to meet this end but it works.

especially cause dopus is calling f12 to open the customize window and ahk is sending a click [even if
the window is in the background] to the OK button of the custimize window with the same key. i was half expecting the window would automatically close upon opening it.

works like a charm, don't need to mouse to the window or title bar. my first try was send a click to title bar button but the syntax was trickier that i thought ahk wasn't seeing the button to click even thou window spy could label it. :man_shrugging:

in any case if you want to play with it, this is the code....

#IfWinExist Customize - Directory Opus
F12:: ;click\accept "OK" to close Custimize Window in Dopus
ControlClick, OK, Customize - Directory Opus, , Left, 1,
return
#IfWinExist

;syntax for ControlClick , Control-or-Pos, WinTitle, WinText, WhichButton, ClickCount, Options, ExcludeTitle, ExcludeText

Great work!

Would it it be minimal code change and effort to attach it to a button? If minimal could I ask you to do so?

TIA for your attention

i wouldn't know where to begin to bring ahk scripts into dopus.

I'm a complete amature at scripting, I've only been playing in ahk for about 2 months, doing mostly simple\basic window management kind of task. teaching myself off of youtube and forums. i barely know what I'm doing when i copy and paste. LOL.

I'm sill lost and confused by 98% of .js code.

if anyone else know how to incorporate or convert any ahk into js code that dopus could use I'm all ears!

@xavierarmand

Thanks for the response. We're all on a learning curve here!