Hi all,
Is it somehow possible to get the hotkey-combo by which a script was called (if that was the case)?
I know about get("Shift") but I would like to know the whole key-combination, not just the modifier keys.
Thx in advance.
SC: get hotkey-combo that started the script?
-
autocart
- Posts: 1391
- Joined: 26 Sep 2013 15:22
SC: get hotkey-combo that started the script?
[AHK] redirecting Windows Explorer to XY, [XYS] Mini Tree with open tabs (cur loc expanded, tab folders highlighted), [AHK] customInlineRenameKeys, [AHK] clipboardHelper_and_XYEscToList
-
highend
- Posts: 14996
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: SC: get hotkey-combo that started the script?
Code: Select all
$caption = "Test current script";
$commands = get("listofcommands", 2);
$ourself = regexmatches($commands, $caption . ".*");
$keyCombo = regexreplace($ourself, "^(.*\()(.*?)(\))", "$2");
One of my scripts helped you out? Please donate via Paypal
-
autocart
- Posts: 1391
- Joined: 26 Sep 2013 15:22
Re: SC: get hotkey-combo that started the script?
Wow, nice, how do u even KNOW such things?
One thing, though. AFAI can see that construct does not return the info, whether the script was actually called by that hotkey (or by some other way).
Is that possible also, with some more of ur magic?
One thing, though. AFAI can see that construct does not return the info, whether the script was actually called by that hotkey (or by some other way).
Is that possible also, with some more of ur magic?
[AHK] redirecting Windows Explorer to XY, [XYS] Mini Tree with open tabs (cur loc expanded, tab folders highlighted), [AHK] customInlineRenameKeys, [AHK] clipboardHelper_and_XYEscToList
-
highend
- Posts: 14996
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: SC: get hotkey-combo that started the script?
1. Get what XY makes available via scripting
2. Creative use of it (parse it)
3. Hope that Don will finally switch all config files into plain readable (non binary) files
-> More profit
If it was called: Not for scripts that didn't use a modifier, otherwise get("shift") and if one of it's values are present, the script was called via the hotkey (at least with a 99% chance)
2. Creative use of it (parse it)
3. Hope that Don will finally switch all config files into plain readable (non binary) files
-> More profit
If it was called: Not for scripts that didn't use a modifier, otherwise get("shift") and if one of it's values are present, the script was called via the hotkey (at least with a 99% chance)
One of my scripts helped you out? Please donate via Paypal
-
autocart
- Posts: 1391
- Joined: 26 Sep 2013 15:22
Re: SC: get hotkey-combo that started the script?
Mmm, thx, at least that is an idea, but for my taste a very dangerous one that I would not want to rely on. But thx anyway for the brainstorming.highend wrote:If it was called: Not for scripts that didn't use a modifier, otherwise get("shift") and if one of it's values are present, the script was called via the hotkey (at least with a 99% chance)
[AHK] redirecting Windows Explorer to XY, [XYS] Mini Tree with open tabs (cur loc expanded, tab folders highlighted), [AHK] customInlineRenameKeys, [AHK] clipboardHelper_and_XYEscToList
-
highend
- Posts: 14996
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: SC: get hotkey-combo that started the script?
Then use a background running .ahk script that checks which key was pressed and communicate with XY via WM_COPYDATA...
One of my scripts helped you out? Please donate via Paypal
-
autocart
- Posts: 1391
- Joined: 26 Sep 2013 15:22
Re: SC: get hotkey-combo that started the script?
Yes, if it is absolutely necessary then that would probably be the way to go. Thank you very much.
For now it is too much of an overhead for what I had in mind, though.
For now it is too much of an overhead for what I had in mind, though.
[AHK] redirecting Windows Explorer to XY, [XYS] Mini Tree with open tabs (cur loc expanded, tab folders highlighted), [AHK] customInlineRenameKeys, [AHK] clipboardHelper_and_XYEscToList
XYplorer Beta Club