Hi, im making a automated recruiter for Dark Throne for who know the game, 350 clicks are to much , i'm done with greater part of the program
this consist the mouse movement, number of repeats and a delay function if their server is to crowed and have lag
But my problem is -I need hotkeys for : _A pause function
_A fast quit function
Why those hotkeys? well when the programs run you have you mosue moving so you can do anything with the pause function you can
I searched the API forum and found some topics about it but im newbie on API, so is their anyone that cna help me?
You can find the project on : Here
or dload here below
If you want to test my project you will need to ahve an acconut on dark throne and
use This frameset
you will need a screen size of 800 on 600 to ... srry for that
and browes with that frameset to the recruiter
Last edited by darkbee; Jul 10th, 2005 at 03:38 AM.
To create a hotkey you can use the RegisterHotKey API (look here : http://www.vbforums.com/showthread.php?t=273458 ). To have multiple hotkeys, you need to check the wParam of the message and then depending on that execute the code you want. Here I changed that example a bit and instead of minimizing the form when you press Ctrl-F, you register another hotkey (Ctrl-E) and depending on what you press you change the caption of the form
VB Code:
Private Const MOD_ALT = &H1
Private Const MOD_CONTROL = &H2
Private Const MOD_SHIFT = &H4
Private Const PM_REMOVE = &H1
Private Const WM_HOTKEY = &H312
Private Type POINTAPI
x As Long
y As Long
End Type
Private Type Msg
hWnd As Long
Message As Long
wParam As Long
lParam As Long
time As Long
pt As POINTAPI
End Type
Private Declare Function RegisterHotKey Lib "user32" (ByVal hWnd As Long, ByVal id As Long, ByVal fsModifiers As Long, ByVal vk As Long) As Long
Private Declare Function UnregisterHotKey Lib "user32" (ByVal hWnd As Long, ByVal id As Long) As Long
Private Declare Function PeekMessage Lib "user32" Alias "PeekMessageA" (lpMsg As Msg, ByVal hWnd As Long, ByVal wMsgFilterMin As Long, ByVal wMsgFilterMax As Long, ByVal wRemoveMsg As Long) As Long
Private Declare Function WaitMessage Lib "user32" () As Long
Private bCancel As Boolean
Private Sub ProcessMessages()
Dim Message As Msg
'loop until bCancel is set to True
Do While Not bCancel
'wait for a message
WaitMessage
'check if it's a HOTKEY-message
If PeekMessage(Message, Me.hWnd, WM_HOTKEY, WM_HOTKEY, PM_REMOVE) Then