Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[VB.NET (08)] Quick question.

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Rur3k
Expert Cheater
Reputation: 0

Joined: 19 Aug 2008
Posts: 235
Location: HaHaVille Maryland

PostPosted: Wed Oct 21, 2009 7:47 pm    Post subject: [VB.NET (08)] Quick question. Reply with quote

Ok, so I am trying to make a bot for a game, just a simple flash game for now. Anyway, I tried using, "SendKeys.Send("{RIGHT}"), just to make the in game character move but it doesn't work.

Now the question, what other function could I use for this?

Taking any and all advice, if you have a source or sample code you wouldn't mind showing, that would be a appreciated, or just let me know of a function that would work too.

EDIT: The game is offline, single player.

And also, if anyone is interested in Diablo2, and hacking it, let me know I am trying to start up a team!

_________________
*Rur3k's Haven*

_______________________________________
The wise rapper "Chino" once said, "You can't mapquest your life direction"

My BEST super trainer for Hands of War
Back to top
View user's profile Send private message MSN Messenger
LaBe1
Master Cheater
Reputation: 0

Joined: 14 Jun 2007
Posts: 380

PostPosted: Fri Oct 23, 2009 12:31 am    Post subject: Reply with quote

Well i have an idea of what you could try, It involves using virtual keys.

heres a segment of code from an auto login program i created in VB 2008:

Code:
        AppActivate("*Insert name of windows here*")
        keybd_event(VK_ESCAPE, 0, 0, 0)
        keybd_event(VK_ESCAPE, 0, KEYEVENTF_KEYUP, 0)
        Timer3.Interval = 40000
        Timer3.Start()
        tmropen.Stop()


You would have to declare each key you wanted to press with the key const as such:

Code:

    Const VK_ALT = 18
    Const VK_LBUTTON = 1
    Const VK_ENTER = 13
    Const VK_CTRL = 17
    Const VK_TAB = 9
    Const VK_ESCAPE = 27
    Const VK_V = 86

    Const KEYEVENTF_EXTENDEDKEY = &H1
    Const KEYEVENTF_KEYUP = &H2
    Const MOUSEEVENTF_LEFTDOWN = &H2
    Const MOUSEEVENTF_LEFTUP = &H4

    Private Declare Sub keybd_event Lib "user32.dll" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)


Here is a link to all the keyboard virtual key constants: http://msdn.microsoft.com/en-us/library/aa243025(VS.60).aspx

Here are the constants for the arrow keys:
vbKeyLeft 37 LEFT ARROW key
vbKeyUp 38 UP ARROW key
vbKeyRight 39 RIGHT ARROW key
vbKeyDown 40 DOWN ARROW key

You would obviously want the virtual keys set on a timer of course.

Hope this helps

_________________

R.I.P. : UberHaxorz, ClericFoSho
Back to top
View user's profile Send private message MSN Messenger
Opaque02
Expert Cheater
Reputation: 0

Joined: 30 Aug 2009
Posts: 145

PostPosted: Fri Oct 23, 2009 1:39 am    Post subject: Reply with quote

I just tested

Code:
My.Computer.Keyboard.SendKeys("{RIGHT}")



And it worked. Make sure you're in the form. For example, if you want to move right in a textbox, make sure you have:

Code:
TextBox1.Focus()
My.Computer.Keyboard.SendKeys("{RIGHT}")


That will focus on the textbox, then move right once.

If you are doing this in a Shockwave Flash, try this:

Code:
Flash1.Focus
My.Computer.Keyboard.SendKeys("{RIGHT}")



Let me know how it goes Smile

_________________
Nothing is impossible to hack; just some things are very hard
Back to top
View user's profile Send private message MSN Messenger
Rur3k
Expert Cheater
Reputation: 0

Joined: 19 Aug 2008
Posts: 235
Location: HaHaVille Maryland

PostPosted: Sat Oct 24, 2009 7:01 pm    Post subject: Reply with quote

@Opaque02

Well, I tried focusing, AxShockWaveFlash1.Focus(). And it still didn't work, trying your method Lebe1

_________________
*Rur3k's Haven*

_______________________________________
The wise rapper "Chino" once said, "You can't mapquest your life direction"

My BEST super trainer for Hands of War
Back to top
View user's profile Send private message MSN Messenger
Opaque02
Expert Cheater
Reputation: 0

Joined: 30 Aug 2009
Posts: 145

PostPosted: Sun Oct 25, 2009 1:30 am    Post subject: Reply with quote

Rur3k wrote:
@Opaque02

Well, I tried focusing, AxShockWaveFlash1.Focus(). And it still didn't work, trying your method Lebe1


Maybe you have to hold it down? This just presses {RIGHT} once

_________________
Nothing is impossible to hack; just some things are very hard
Back to top
View user's profile Send private message MSN Messenger
Rur3k
Expert Cheater
Reputation: 0

Joined: 19 Aug 2008
Posts: 235
Location: HaHaVille Maryland

PostPosted: Tue Oct 27, 2009 1:10 pm    Post subject: Reply with quote

Opaque02 wrote:
Rur3k wrote:
@Opaque02

Well, I tried focusing, AxShockWaveFlash1.Focus(). And it still didn't work, trying your method Lebe1


Maybe you have to hold it down? This just presses {RIGHT} once


Lol i looped it in a timer.

_________________
*Rur3k's Haven*

_______________________________________
The wise rapper "Chino" once said, "You can't mapquest your life direction"

My BEST super trainer for Hands of War
Back to top
View user's profile Send private message MSN Messenger
Opaque02
Expert Cheater
Reputation: 0

Joined: 30 Aug 2009
Posts: 145

PostPosted: Tue Oct 27, 2009 9:27 pm    Post subject: Reply with quote

Rur3k wrote:
Opaque02 wrote:
Rur3k wrote:
@Opaque02

Well, I tried focusing, AxShockWaveFlash1.Focus(). And it still didn't work, trying your method Lebe1


Maybe you have to hold it down? This just presses {RIGHT} once


Lol i looped it in a timer.


Did it work now?

_________________
Nothing is impossible to hack; just some things are very hard
Back to top
View user's profile Send private message MSN Messenger
Jorg hi
I post too much
Reputation: 7

Joined: 24 Dec 2007
Posts: 2276
Location: Minnesota

PostPosted: Wed Oct 28, 2009 2:37 pm    Post subject: Reply with quote

Lol your using flash... Why don't you create the bot in flash? You should be using SendKeys.SendWait(Keys.LButton) in VB08 and you should focus before it sends. M
_________________
CEF will always stay alive.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites