RiCK_420_333 Posted April 25, 2008 Share Posted April 25, 2008 I need some help with hotkeys. I made a hotkey that uses Window Logo button and also one that uses shift. When I use the window logo button to send the hotkey, the hotkey works, but also the winlogo button triggers the start menu to popup. So what I would like to do is have autoit not send the winlogo to the system when it's used as a hotkey combo, like Winlogo +1 would do my fuction and not send winlogo to the system to open start menu. But if I press only winlogo button by itself, I would like it to function normally still. Also same problem with the shift hotkeys, if i do shift + numpad1 it excutes the End button and does not excute my function at all. Can either or both of these be fixed or worked around with some code? anyone know how? If so please post the code I will need, thanks much!! Here is some examples from my code: ; ^ Ctrl ! Alt + Shift # Win HotKeySet("^+{NUMPAD3}", "GetData13") HotKeySet("^+3", "GetData13") HotKeySet("#{NUMPAD5}", "PasteData5") HotKeySet("#5", "PasteData5") HotKeySet("#+{NUMPAD7}", "PasteData17") HotKeySet("#+7", "PasteData17") Summary: Basically if I wasn't clear enough above. I want the hotkey to work, but block the keys from passing through to the system. Thanks again, RiCK Link to comment Share on other sites More sharing options...
Xenobiologist Posted April 25, 2008 Share Posted April 25, 2008 Hi, no problem here: HotKeySet('#1', '_1') HotKeySet('#+1', '_1') HotKeySet('#^1', '_1') While 1 Sleep(1000) WEnd Func _1() If @HotKeyPressed == '#1' Then ConsoleWrite('! WindowsKey and 1' & @CRLF) If @HotKeyPressed == '#+1' Then ConsoleWrite('+> WindowsKey and Shift and 1' & @CRLF) If @HotKeyPressed == '#^1' Then ConsoleWrite('> WindowsKey and CTRL and 1' & @CRLF) EndFunc Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
herewasplato Posted April 25, 2008 Share Posted April 25, 2008 Good test code Mega!Maybe this thread code be locked and the discussion moved to here:http://www.autoitscript.com/forum/index.php?showtopic=69723 [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
RiCK_420_333 Posted April 25, 2008 Author Share Posted April 25, 2008 Hi, no problem here: HotKeySet('#1', '_1') HotKeySet('#+1', '_1') HotKeySet('#^1', '_1') While 1 Sleep(1000) WEnd Func _1() If @HotKeyPressed == '#1' Then ConsoleWrite('! WindowsKey and 1' & @CRLF) If @HotKeyPressed == '#+1' Then ConsoleWrite('+> WindowsKey and Shift and 1' & @CRLF) If @HotKeyPressed == '#^1' Then ConsoleWrite('> WindowsKey and CTRL and 1' & @CRLF) EndFunc Did I mess something up? Or should that also work? My data is being pasted, however it's still opening the Start Menu Link to comment Share on other sites More sharing options...
Xenobiologist Posted April 25, 2008 Share Posted April 25, 2008 Hi, is your script running? You need a loop! HotKeySet("#{NUMPAD1}", "PasteData") HotKeySet("#1", "PasteData") HotKeySet("#{NUMPAD2}", "PasteData") HotKeySet("#2", "PasteData") while 1 Sleep(100) WEnd Func PasteData() If @HotKeyPressed == '#1' Then PasteData1() If @HotKeyPressed == "#{NUMPAD1}" Then PasteData1() If @HotKeyPressed == '#2' Then PasteData2() If @HotKeyPressed == "#{NUMPAD2}" Then PasteData2() EndFunc Func PasteData1() ConsoleWrite(@HotKeyPressed & @CRLF) EndFunc Func PasteData2() ConsoleWrite(@HotKeyPressed & @CRLF) EndFunc It works for me! Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
herewasplato Posted April 25, 2008 Share Posted April 25, 2008 ...You need a loop!...I beat ya to that point :-) http://www.autoitscript.com/forum/index.ph...st&p=511555 ...once I added the stuff needed to test it :-( [The While/Sleep/WEnd and the two Functions] I bet the OP knows that kinda stuff... but I sure like code that I can copy/paste/test. So much for only having one thread on this topic :-( [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
Xenobiologist Posted April 25, 2008 Share Posted April 25, 2008 Ha, two topics! Okay, that explains a lot. Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
herewasplato Posted April 25, 2008 Share Posted April 25, 2008 Ha, two topics! Okay, that explains a lot.I sent the OP a PM and asked if he could delete this thread after I posted to the other one. No one had posted to this one at that time.The OP does not have a high enough "post count" to be able to delete yet. Does anyone know how high in the post count you must get before you can delete your own post (or topic/thread - as long as it has no replies)? [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
Xenobiologist Posted April 25, 2008 Share Posted April 25, 2008 I guess 10 Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now