Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

GuiHotKey UDF


  • Please log in to reply
7 replies to this topic

#1 Yashied

Yashied

    Happy in Moscow

  • MVPs
  • 2,574 posts

Posted 10 May 2011 - 12:27 AM

LAST VERSION - 1.0
10-May-11

This is a very small but useful UDF library for support native API HotKey controls. This library is written similary as other AutoIt GUI libraries. For more information, see detailed descriptions of all functions inside GuiHotKey.au3.

If you need more capacity to work with hot keys, you can use HotKey UDF and HotKeyInput UDF libraries.


HotKey.png



Available functions

Spoiler


HotKey UDF Library v1.0
Previous downloads: 117

Attached File  HotKey.zip   4.4KB   737 downloads


Example

#include <GUIConstantsEx.au3> #include <GUIHotKey.au3> Global $HK, $VK $hForm = GUICreate("MyGUI", 300, 92) $hHotKey = _GUICtrlHotKey_Create($hForm, _GUICtrlHotKey_MakeKeyCode($HOTKEYF_ALT, $VK_F5), 20, 20, 260, 19) $Button = GUICtrlCreateButton('OK', 115, 54, 70, 23) GUISetState() While 1     Switch GUIGetMsg()         Case $GUI_EVENT_CLOSE             ExitLoop         Case $Button             $Code = _GUICtrlHotKey_GetHotKey($hHotKey)             _GUICtrlHotKey_GetKeys($Code, $HK, $VK)             MsgBox(64, "Info", "Hot key code:" & @TAB & "0x" & Hex($Code, 4) & @CR & "Key modifier flags:" & @TAB & "0x" & Hex($HK, 2) & @CR & "Virtual key code:" & @TAB & "0x" & Hex($VK, 2), 0, $hForm)     EndSwitch WEnd

Edited by Yashied, 10 December 2013 - 03:11 PM.








#2 Mat

Mat

    43 38 48 31 30 4E 34 4F 32

  • MVPs
  • 4,976 posts

Posted 10 May 2011 - 08:32 AM

I did the same thing last year. I just got mine out to test though and there are a few bugs, so I'll probably be using yours from now on :unsure:

The one thing I did like about mine was that it autoit hotkey strings rather than virtual keys. Saves a lot of hassle. All I need to do is fix mine so that using letters means lower case letter output unless shift is pressed (like autoit does).

#3 monoscout999

monoscout999

    a member

  • Active Members
  • PipPipPipPipPipPip
  • 1,064 posts

Posted 17 May 2011 - 11:58 AM

Thanks this is very good i post this crapy array thing but yours is far far beyond better.. this will be usefull....

@Off-Topic: I think the only problem with this forum is that it is very large and many things happen unnoticed

#4 Emiel Wieldraaijer

Emiel Wieldraaijer

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 703 posts

Posted 12 June 2011 - 07:52 AM

Thanks Yashied for this UDF very nice

There is one thing missing.. i cannot select the Pause Key and as far as i know this key isn't used a lot. Very useful as a hotkey.

Cheers

Emiel

Edited by Emiel Wieldraaijer, 12 June 2011 - 07:54 AM.

Best regards,Emiel WieldraaijerPosted Image

#5 Zedna

Zedna

    AutoIt rulez!

  • MVPs
  • 8,669 posts

Posted 24 June 2011 - 03:58 PM

Very nice! :huh2:
I hope this will become part of standard UDFs one day.

#6 Mat

Mat

    43 38 48 31 30 4E 34 4F 32

  • MVPs
  • 4,976 posts

Posted 24 June 2011 - 06:07 PM

Very nice! :huh2:
I hope this will become part of standard UDFs one day.

+1

I hope one day we have a complete collection of all the windows controls. I don't see any reason why not.

#7 Vulckain

Vulckain

    Seeker

  • Normal Members
  • 1 posts

Posted 23 December 2012 - 09:58 PM

Hi :)
Very nice UDF ! Thanks a lot ! It was really helpfull !
BTW, when I try to use it with the function "_IsPressed" it works with every HotKey like "A, B, C, F12, F5, etc..." but it doesn't work with CTRL + F2 or ALT + F1

If _IsPressed(Hex($Code, 4))


There is another way to do this?
Thank ! :)

#8 Yashied

Yashied

    Happy in Moscow

  • MVPs
  • 2,574 posts

Posted 10 December 2013 - 03:15 PM

Links updated.

P.S.

If you can't download my programs in other posts please change address:

http://yashied.narod2.ru/

to

http://yashied.ru/




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users