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] Help with making "Auto Clicker".

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

Joined: 10 Apr 2007
Posts: 170

PostPosted: Thu Jun 07, 2007 4:06 am    Post subject: [VB] Help with making "Auto Clicker". Reply with quote

Well, I'm working on a bot, and need help with the auto clicker.
How can I make a Auto Clicker?
I want this to click X times per Y seconds. (X\Y means vars, not coords, which could be edited via text boxes.).

And little question,
Can I make the AutoClicker keep clicking on the postion I configured (using GetCursorPos or something), and I will be able to move the cursor whereever I wants, and its will keep clicking on the configured postion?
Back to top
View user's profile Send private message
the_undead
Expert Cheater
Reputation: 1

Joined: 12 Nov 2006
Posts: 235
Location: Johannesburg, South Africa

PostPosted: Thu Jun 07, 2007 5:16 am    Post subject: Reply with quote

Ok, well I discourage you from using VB, but Ive argued that point so many times a quick search return all of them.

NON-VB code:

Code:
//mSeconds is the how often you would like to click, of course its in
//milliseconds, so 1000 == 1 SECOND
//HowManyClicks is how many clicks you would like to preform
int mSeconds, HowManyClicks
LONG Coords = MAKELONG(100, 200); //100X, 200Y

for ( int a= 0; a<= HowManyClicks; a++ )
{
      SendMessage(Hwnd,WM_LBUTTONDOWN, BUTTON,Coords);
      SendMessage(Hwnd,WM_LBUTTONUP,MK_LBUTTON,Coords);
      Sleep(mSeconds);
}

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
O-RLY
Expert Cheater
Reputation: 0

Joined: 10 Apr 2007
Posts: 170

PostPosted: Thu Jun 07, 2007 9:39 am    Post subject: Reply with quote

If its non VB code, seems like its won't help me though =]
I've already searched, don't found any good thread.
Back to top
View user's profile Send private message
MooMooCow
Newbie cheater
Reputation: 0

Joined: 07 Jun 2007
Posts: 21

PostPosted: Thu Jun 07, 2007 12:01 pm    Post subject: Reply with quote

I've never messed with VB code, but in most cases the functions are very similar across different languages. Just type "VB SendMessage" in google, and see what you get. I got a few results that looked promising.

-Hipopo
Back to top
View user's profile Send private message
jammie
Newbie cheater
Reputation: 0

Joined: 27 Aug 2006
Posts: 12

PostPosted: Thu Jun 07, 2007 4:58 pm    Post subject: Reply with quote

i love vb so i might aswell add something....

general stuff

Code:

Private Declare Sub mouse_event Lib "user32" (ByVal dwFlags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cButtons As Long, ByVal dwExtraInfo As Long)
Private Const MOUSEEVENTF_LEFTDOWN = &H2
Private Const MOUSEEVENTF_LEFTUP = &H4
Private Const MOUSEEVENTF_RIGHTDOWN = &H8
Private Const MOUSEEVENTF_RIGHTUP = &H10
Private Const MOUSEEVENTF_ABSOLUTE = &H8000
Private Declare Function SetCursorPos Lib "user32" (ByVal x As Long, ByVal y As Long) As Long
Dim x As Integer
Dim y As Integer


then to simulate a mouseclick just use:

Code:

mouse_event MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0
mouse_event MOUSEEVENTF_LEFTUP, 0, 0, 0, 0


to click a specific location just use this

Code:

SetCursorPos 100, 100

// where 100,100 is x,y co-ords (in pixels)


easiest way to have it click x times in y seconds would be to to divide x by y and set this as a timers interval, then loop until its been completed x times.


hope this helped!

made a little program myself for a clicking game.

ps - quickest you can click in VB is about every 35 milliseconds in most flash apps.
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