Sign in to follow this  
Followers 0
RiCK_420_333

HotKeys Assistance Needed

8 posts in this topic

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 point me in the right direction, 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


Share this post


Link to post
Share on other sites



HotKeySet("#2", "msg")

While 2
    Sleep(222)
WEnd

Func msg()
    MsgBox(0, "", "", 2)
EndFunc   ;==>msg
This worked for me every time using v3.2.10.0 on XP SP2.

(Worked = no start menu displayed.)

It got flaky using HotKeySet("#+2", "msg")

Is this consistent for you: HotKeySet("#5", "PasteData5")


[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

HotKeySet("#2", "msg")

While 2
    Sleep(222)
WEnd

Func msg()
    MsgBox(0, "", "", 2)
EndFunc   ;==>msg
This worked for me every time using v3.2.10.0 on XP SP2.

(Worked = no start menu displayed.)

It got flaky using HotKeySet("#+2", "msg")

Is this consistent for you: HotKeySet("#5", "PasteData5")

Well I already used Ctrl + all numbers 0-9

and also Win + all numbers 0-9

so now I wanna add another 10 hotkeys by using the Shift too. like Ctrl + Shift + 0-9 & Win + Shift +0-9

So if it gets flaky, then it won't help, I need some stable code that can do this if possible.

I do appreciate your effort in helping me though, thanks a lot!!!


Share this post


Link to post
Share on other sites

I looked through the documents, but I can't even find a function to block a key.

only BlockInput which blocks all keys.

Any suggestions on that?


Share this post


Link to post
Share on other sites

...So if it gets flaky, then it won't help,...

Using Mega's code in your duplicate thread...

http://www.autoitscript.com/forum/index.ph...showtopic=69719

...I learned that I R flaky.

In other words, I cannot reliably hold the Win key, Shift key and any number key on this laptop keyboard. I just cannot get the timing right every time. Maybe if I had learned how to type.

When I did manage to get all of the keys pressed correctly and quickly enough - the Start menu did not come up.

I do not know of a way to stop the menu from coming up for you via AutoIt. I'm not sure if there is an Operating System setting that would help with that or not... maybe some delay setting before the Win modifier key brings up the Start menu.

I'm not sure what else to try - maybe others have a clue.


[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Just wondering, what version of AutoIt are you all running?

I noticed when compiled with the older version autoit-v3.2.0.1-setup.exe that the Start Menu does not popup.

However I went and upgraded my auto to version autoit-v3.2.10.0-setup.exe thinking it would be better.

I also installed the AutoIt3Wrapper 1.10.1.7, but it reports the version of AutoIt Production as 3.2.11.2

So now im a lil confused..

Can anyone shed some light?

UPDATE: ok my AutoIt.exe is version 3.2.10.0, but my Aut2exe.exe is version 3.2.11.2.

Edited by RiCK_420_333

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

...I noticed when compiled with the older version autoit-v3.2.0.1-setup.exe that the Start Menu does not popup...

Then you have your work around :-)

No upgrade for you!

[in my best soup-nazi voice.]

Your code at the bottom of this post works for me...

http://www.autoitscript.com/forum/index.ph...st&p=511542

...once I added the stuff needed to test it :-(

[The While/Sleep/WEnd and the two Functions]

The "@HotKeyPressed" is not a work around for your problem, it is just another way of doing the same thing. There is no need to put that in your regular script... but it is great for test code 'cuz it lets you use just one Func during the test.

Edited by herewasplato

[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

...This worked for me every time using v3.2.10.0 on XP SP2...

I'm still ruining the same version that I mentioned above :-)

I know, you was talkin' to the others... but you might want to ask for the OS too.


[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0