Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[VB] AUtoBot

Junior Spellweaver
Joined
Feb 23, 2008
Messages
131
Reaction score
1
Hello i want to make an autobot that will move ur ingame accounts for maybe like maplestory like every 10 secs it will press the left key for u then every 5 secs it will press right key for you i wanna make it in VB im just not sure where to start with coding if someone could help that would be great sorry for before for not giving more info

if this helps i would like to make something Send Input Keys on a timer so if i want the program to hold z for me i want it to hold z for 20 secs i hope this is more info
 
Experienced Elementalist
Joined
Apr 18, 2005
Messages
254
Reaction score
0
Sure but bots in games are not usually now allowed, so you've really come to the wrong place.
 
Junior Spellweaver
Joined
Feb 23, 2008
Messages
131
Reaction score
1
oh crap lol i didnt even know sorry you thin k u can help me in chat or something since we cant tlak in forums
 
Newbie Spellweaver
Joined
Oct 17, 2005
Messages
11
Reaction score
0
Get a handle on the window using FindWindow... Then use PostMessage to send the key strokes...


Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" ( _
ByVal lpClassName As String, ByVal lpWindowName As String) As Long

Private Declare Function PostMessage Lib "user32" Alias "PostMessageA" ( _
ByVal hwnd As Long, _
ByVal wMsg As Long, _
ByVal wParam As Long, _
ByVal lParam As Long _
) As Long

Private Sub sendKey(windowName as string, sKey as long) as boolean
dim hWnd as long
hWnd = FindWindow(vbnullstring, windowName)
if hWnd = 0 then
sendKey false
else
WM_KEYUP = &H101
WM_KEYDOWN = &H100
PostMessage(hwnd, WM_KEYDOWN, sKey, ByVal 0&)
PostMessage(hwnd, WM_KEYUP, sKey, ByVal 0&)
sendKey = true
end if
End Sub
 
Joined
Oct 11, 2007
Messages
1,706
Reaction score
517
Get a handle on the window using FindWindow... Then use PostMessage to send the key strokes...


Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" ( _
ByVal lpClassName As String, ByVal lpWindowName As String) As Long

Private Declare Function PostMessage Lib "user32" Alias "PostMessageA" ( _
ByVal hwnd As Long, _
ByVal wMsg As Long, _
ByVal wParam As Long, _
ByVal lParam As Long _
) As Long

Private Sub sendKey(windowName as string, sKey as long) as boolean
dim hWnd as long
hWnd = FindWindow(vbnullstring, windowName)
if hWnd = 0 then
sendKey false
else
WM_KEYUP = &H101
WM_KEYDOWN = &H100
PostMessage(hwnd, WM_KEYDOWN, sKey, ByVal 0&)
PostMessage(hwnd, WM_KEYUP, sKey, ByVal 0&)
sendKey = true
end if
End Sub



Dude, isnt it just way easier to do :



Private Sub Form_Load()

AppActivate ("Notepad") 'Finds the window NOTEPAD

SendKeys ("W") 'Sends the key W


End Sub
 
Back
Top