ie47 发表于 2013-11-23 18:09:36

求助啊~~~如果实现按了某键就会执行某个程序?

RT。。
看了手册还是不会弄~~
意思就是比如我按F1键就会执行C:\1.EXE
按F2就会执行C:\2.EXE
实在不行弄,请高手不吝赐教。。。谢谢了。{:face (293):}

ie47 发表于 2013-11-23 18:50:34

不好意思,新手了。刚查到了,麻烦了HOTKEYSET

freewaybsq 发表于 2013-11-23 22:09:26

HotKeySet("{enter}", "butt1_Click")
HotKeySet("{RIGHT}", "butt2_Click")

Func butt1_Click()
        MsgBox(0, "Tip:", "This is the Enter_Key_Event")
EndFunc   ;==>butt1_Click

Func butt2_Click()
        MsgBox(0, "Tip:", "This is the Right_Key_Event")
EndFunc   ;==>butt2_Click

zhybxyz 发表于 2013-11-23 22:14:35

_IsPressed()也可以……
If _IsPressed("12") And _IsPressed("53") Then WinShow()                ;ALT+S

freewaybsq 发表于 2013-11-23 22:15:05

回复 1# ie47

HotKeySet("{enter}", "butt1_Click")
HotKeySet("{RIGHT}", "butt2_Click")

Func butt1_Click()
        MsgBox(0, "Tip:", "This is the Enter_Key_Event")
EndFunc;==>butt1_Click

Func butt2_Click()
        MsgBox(0, "Tip:", "This is the Right_Key_Event")
EndFunc;==>butt2_Click
页: [1]
查看完整版本: 求助啊~~~如果实现按了某键就会执行某个程序?