讓外掛有快速鍵(按鍵精靈版)
本方式以 洋洋技術 BNB111 基本功能程式 為例(如有冒犯請告知,在下會盡快刪除)
安裝按鍵精靈,編輯一個腳本(....廢話)
可以建議作者添加快捷鍵
我相信作者會看見你的想法的
:) 很用心 圖文解說 棒~
另外 句柄的部分可以這樣寫 這樣就不用每次都要用抓抓工具抓一次句柄了Hwnd = Plugin.Window.Find(0, "洋洋技術 BNB v111 基本功能")
HwndEx = Plugin.Window.FindEx(Hwnd, 0, 0, "無限光盾") // 一樣以 無限光盾 為例
Call Plugin.Bkgnd.KeyPress(HwndEx, 32) #2F 我也想跟作者建議,不過不好意思麻煩作者
#3F 多謝你 又學到新的東西
#4F 我用的是舊版(阿榮福利社下載的),後台都還可以用 不錯唷~~ 之後我會新增快捷鍵的~~ 洋洋技術 發表於 2018-2-14 17:12 static/image/common/back.gif
之後我會新增快捷鍵的~~
' --------------------------------------------------------------------------------------
'声明注册热键API函数
Public Declare Function RegisterHotKey Lib "user32" (ByVal hWnd As Integer, ByVal id As Integer,
ByVal fsModifiers As Integer, ByVal vk As Integer) As Integer
'声明注销热键API函数
Public Declare Function UnregisterHotKey Lib "user32" (ByVal hWnd As Integer, ByVal id As Integer) As Integer
Public Const WM_HOTKEY As Short = &H312S '热键消息ID,此值固定,不能修改
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
RegisterHotKey(Me.Handle.ToInt32, 1, Nothing, Keys.F3) '注册的热键为F3
RegisterHotKey(Me.Handle.ToInt32, 2, Nothing, Keys.F5) '注册的热键为F5
RegisterHotKey(Me.Handle.ToInt32, 3, Nothing, Keys.F2) '注册的热键为F2
End Sub
'窗体的消息处理函数
Protected Overrides Sub WndProc(ByRef m As Message)
If m.Msg = WM_HOTKEY Then '判断是否为热键消息
Select Case m.WParam.ToInt32 '判断热键消息的注册ID
Case 1
If CheckBox5.Checked = True Then
CheckBox5.Checked = False
Else
CheckBox5.Checked = True
End If
' 计数1 = 计数1 + 1 '两种方法
' CheckBox5.Checked = True
' If 计数1 > 1 Then
' CheckBox5.Checked = False
' 计数1 = 0
' End If
Case 2
If CheckBox7.Checked = True Then
CheckBox7.Checked = False
Else
CheckBox7.Checked = True
End If
Case 3
If CheckBox4.Checked = True Then
CheckBox4.Checked = False
Else
CheckBox4.Checked = True
End If
End Select
End If
MyBase.WndProc(m) '循环监听消息
End Sub
'最后别忘记注销热键哦
Private Sub Form1_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
UnregisterHotKey(Me.Handle.ToInt32, Keys.F3)
UnregisterHotKey(Me.Handle.ToInt32, Keys.F2)
UnregisterHotKey(Me.Handle.ToInt32, Keys.F5)
End Sub lonelylove 發表於 2018-2-14 17:22 static/image/common/back.gif
' --------------------------------------------------------------------------------------
' ...
這些我知道 但是我比較想讓他門打勾就好 都已經有過CRC 就不需要快捷建了~~ 洋洋技術 發表於 2018-2-14 17:55 static/image/common/back.gif
這些我知道 但是我比較想讓他門打勾就好 都已經有過CRC 就不需要快捷建了~~ ...
:lol 有些还是要快捷键的... 嘿嘿~ 有點不太懂上面的意思
頁:
[1]