| View previous topic :: View next topic |
| Author |
Message |
rayz321 Grandmaster Cheater
Reputation: 0
Joined: 17 Aug 2008 Posts: 579
|
Posted: Wed Apr 08, 2009 11:48 pm Post subject: help with vb 2008 code for mouse control (+rep for help) |
|
|
ok i need a code to make the mouse click xy coordinates but how do i do it and i did google it already so dont say that ok +rep if you help _________________
|
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Thu Apr 09, 2009 1:44 am Post subject: |
|
|
| Get/SetCursorPos + SendInput |
|
| Back to top |
|
 |
rayz321 Grandmaster Cheater
Reputation: 0
Joined: 17 Aug 2008 Posts: 579
|
Posted: Thu Apr 09, 2009 9:41 am Post subject: |
|
|
could you explain better  _________________
|
|
| Back to top |
|
 |
TraxMate Master Cheater
Reputation: 0
Joined: 01 Mar 2008 Posts: 363
|
Posted: Thu Apr 09, 2009 9:46 am Post subject: |
|
|
| You use SetCursorPos() to move the cursor then you use GetCursorPos() to get the mouse current position and use SendInput to click. |
|
| Back to top |
|
 |
Slugsnack Grandmaster Cheater Supreme
Reputation: 71
Joined: 24 Jan 2007 Posts: 1857
|
Posted: Thu Apr 09, 2009 9:55 am Post subject: |
|
|
| or simply mouse_event() |
|
| Back to top |
|
 |
Jorg hi I post too much
Reputation: 7
Joined: 24 Dec 2007 Posts: 2276 Location: Minnesota
|
|
| Back to top |
|
 |
rayz321 Grandmaster Cheater
Reputation: 0
Joined: 17 Aug 2008 Posts: 579
|
Posted: Fri Apr 10, 2009 5:23 pm Post subject: |
|
|
| GGoogle wrote: | Lol its my rep
To set X & Y for forum. Unless you want an API... use SetCursorPosition
| Code: | ntrol.Cursor.Position= New Point(X,Y)
|
| wil that make it click there too or just go there? _________________
|
|
| Back to top |
|
 |
Deve Expert Cheater
Reputation: 0
Joined: 20 Jan 2007 Posts: 245 Location: Stockholm, Sweden
|
Posted: Fri Apr 10, 2009 6:38 pm Post subject: |
|
|
It will only move it. _________________
Leecher. |
|
| Back to top |
|
 |
rayz321 Grandmaster Cheater
Reputation: 0
Joined: 17 Aug 2008 Posts: 579
|
Posted: Fri Apr 10, 2009 6:45 pm Post subject: |
|
|
| develito wrote: | | It will only move it. | is there a way i can make it click ? _________________
|
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Fri Apr 10, 2009 6:54 pm Post subject: |
|
|
| rayz321 wrote: | | develito wrote: | | It will only move it. | is there a way i can make it click ? |
How about you read your own thread? |
|
| Back to top |
|
 |
talkerzero Grandmaster Cheater
Reputation: 1
Joined: 24 Jul 2008 Posts: 560 Location: California
|
Posted: Fri Apr 10, 2009 8:29 pm Post subject: |
|
|
| Code: | Private Declare Sub SetCursorPos Lib "user32" (ByVal x as Integer, y as Integer)
Private Declare Sub mouse_event Lib "user32" (ByVal a as Long, b as Long, c as Long, d as Long, e as Long)
Private Const MOUSEEVENTF_LEFTDOWN = 2
Private Const MOUSEEVENTF_LEFTUP = 4 |
| Code: | SetCursorPos( 100, 200 ) 'change 100 and 200 to x/y values
mouse_event( MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0 )
mouse_event( MOUSEEVENTF_LEFTUP, 0, 0, 0, 0 ) |
 |
|
| Back to top |
|
 |
|