Page 1 of 1

Request a user input invisibly?

Posted: 07 Nov 2020 22:23
by WirlyWirly
I use AHK for a vim-like experience in XYplorer. I have quite a bit of hotkeys that do various tasks and they're getting fairly complicated to keep track of.

I'm looking to simplify the whole thing and I believe Command ID's are the way to do it. I'd like to write an xys script that will request a command ID and then execute that ID. The built-in input() function works for getting a command ID, however the window it produces is pretty distracting (It flashes very briefly).

My current .xys script looks like this...

Code: Select all

/*
Run the user provided Command ID
*/

    $id = input(,,s,,250,150);

    load $id,, s;
On the AHK side, I'll setup my keyboard shortcuts to be something like this...

Code: Select all

+o::
    Send {xys_script_hotkey} ; Load script
    Send {#}1063{Enter} ; Open Folder in Other Pane in New Tab
o::
    Send {xys_script_hotkey} ; Load script
    Send {#}1043{Enter} ; Open Folder in New Tab
Anyone know how I can possibly remove the input window or if not then a better approach to take? Compared to the keyboard shortcuts menu, this approach is just a tiny bit slower, but nothing I can't live with (though I'm not sure how it'll respond to lag, probably badly).

Like I said, the keyboard shortcuts menu works well, however it's pretty hard to keep track of all the shortcuts I have and has become a huge mess.

Re: Request a user input invisibly?

Posted: 07 Nov 2020 23:25
by highend
Do it the other way round? Let AHK display a window where you enter the id and then send it to XYplorer as a script?

viewtopic.php?f=7&t=9233#p82412