Sign in to follow this  
Followers 0
PcExpert

Question about hotkeys

7 posts in this topic

Hi all,

I want to let something run if I press a key conbination. For example: I press the keys 001 and then a msgbox pops up. But I didn't find a way to do that. So my question is: Is there a way to do that? And if yes, how? This is my test code:

HotKeySet("001", "func1")

While 1
Sleep(10)
WEnd

Func Func1()
    MsgBox(64, "test", "test")
EndFunc

Thanks!

Share this post


Link to post
Share on other sites



Do you mean this or did you mean another topic?

Share this post


Link to post
Share on other sites

Sorry Larry, but I really can't find the post about the mousehook. I searched for your username and for Mousehook, but both didn't return the right results. Please post a link to that forum. Thanks!

Share this post


Link to post
Share on other sites

You know you can list up a user's topics, right ? Open Larry's profile, click on the

"Profile Options" button and click on the "Find member's topics" item. Voila !

Share this post


Link to post
Share on other sites

Hello,

I don't want to just give you the correct link, but want to help you find it.

- open the search

- type "mousehook" into the search field (without quotes)

- select "AutoIT V3" in the "Search Where" list, as first try, just to be sure

- press search

- now focus on the "Topic Starter" column, try to find a post from Larry

- if you found Larry's post, look at the thread title, if it might be of interest

- have fun :)

Share this post


Link to post
Share on other sites

OK, thanks! I found the post now, but how do I let a program run when I press for example 001? While the mousehook program was active I pressed 001, then the program adds 3 lines to the tooltip, but what do I have to do with the info?

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

This was fun to make, and a great way to learn about GUIGetMsg() :lmao:

#region Unimportant stuff
Const $WH_KEYBOARD = 2
Const $WM_KEYUP H

ÈLÌÛÛÝ ÌÍÕÓWÒÑVQÕÓH

ÈLÌBÛØ[ ÌÍÛ  3c¶×6rÂb33c¶'VffW"ÒgV÷C²gV÷C²Âb33c¶Ò¢b33c¶wVÒuT7&VFRgV÷íÑÍÐÅÕ½Ðì¤)±½°ÀÌØí11¥¹ÍÐô11
±° ÅÕ½Ðí­É¹°Ìȹ±°ÅÕ½Ðì°ÅÕ½Ðíwnd","LoadLibrary","str",".\hook.dll&quoÊBÛØ[ ÌÍÚÙ^RÓÒÜØÈHØ[
    ][ÝÚÙ[Ì ][ÝË  ][ÝÚÛ    V÷C²ÂgV÷C´vWE&ö4FG&W72gV÷C²ÂgV÷C¶væBgV÷C²Âb33c´DÄÄç7E³ÒÂgV÷C·7G"ÅÕ½Ðì°ÅÕ½Ðí-åAɽÅÕ½Ðì¤)±½°ÀÌØí¡¡-äô11
±° ÅÕ½ÐíÕÍÈÌȹ±°ÅÕt;,"hwnd","SetWindowsHookEx","int",$WH_KVPÐT  ][ÝÚÛ    ][ÝË  ÌÍÚÙ^RÓÒÜØÖÌK ][ÝÚÛ    ][ÝË  3c´DÄÆç7E³ÒÂgV÷C¶çBgV÷C²Ã¤DÄÄ6ÆÂgV÷C¶öö²æFÆÂgV÷C²ÂgV÷C¶çBgVÐì°ÅÕ½ÐíMÑY±ÕÍ-äÅÕ½Ðì°ÅÕ½Ðí¡Ý¹ÅÕ½Ðì°ÀÌØíÕ¤°ÅÕ½Ðí¡Ý¹ÅÕ½Ðì°À6;hhKey[0])
GUIRegisterMsg($WM_KEYDOWN,"myKeyfunc")
#endregiÛÚ[HBTÛY
L
BÑ[[ÈÖÓÛJ
BSÙÐÞ
    ][ÝÉ][ÝË    ]÷C³2&W76VBgV÷C² W@¤VæDgVæ0 ¢7&VvöâgVæ7Föç2&WV&V@¤gVæ2×åÕ¹ ÀÌØí¡]¹U$°ÀÌØí5Í%°ÀÌØí]AÉ´°ÀÌØí1AÉ´¤(%M±Ð($%
e $i = 0
            If $WParam = 0x00000060 OR $WParam = 0x00000030 [BBBIÌÍÚHHBBBQ[ÙBBBBIÌÍÚHHBBQ[YBPØÙH   ÌÍÚHHHBbb33cµu&ÒÒcõ"b33cµu&ÒÒ3FVà b33c¶ôÈ($$%±Í($$$$ÀÌØí¤ôÀ($$%¹%($%
ÍÀÌØí¤ôÈ($$%%ÀÌØí]AÉ´ 0x00000061 OR $WParam = 0x00000031 Then
                ZeroZeroOne()
            Else
            IÌÍÚHHBBQ[YQ[Ù[XÝ[[Â[ÈÛ]]Ò]^]

BØ[
    V÷C·W6W#3"æFÆÂgV÷C²ÂgV÷C¶çBgV÷C²ÂgV÷CµVæööµvæF÷w4öö´WgV÷C²ÂgV÷C¶Ý¹ÅÕ½Ðì°ÀÌØí¡¡-ålÁt¤(11
±° ÅÕ½Ðí­É¹°Ìȹ±°ÅÕ½Ðì°ÅÕ½Ðí¥¹ÐÅÕt;,"FreeLibrary","hwnd",$DLLinst[0])
EndFunc
#endrYÚ[Û
Edited by Manadar

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