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 


[C] Simple AutoClicker

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Tue Dec 25, 2007 10:11 pm    Post subject: Re: [C] Simple AutoClicker Reply with quote

x0r wrote:
P.S. I was too lazy to use SendInput Crying or Very sad Also, I didn't add an exiting option, but who cares?! It uses barely any system resources and it's practically idle Very Happy


What was so hard about a few extra lines? Razz



The Extension 'rar' was deactivated by an board admin, therefore this Attachment is not displayed.

Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Tue Dec 25, 2007 11:54 pm    Post subject: Reply with quote

But but but... threads are sexy Sad Timers are... so old.. and ... old >.> Multiple threads would be useless though, no need for it. Would only need one Mad
_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Aikos
Cheater
Reputation: 0

Joined: 26 Nov 2007
Posts: 47

PostPosted: Thu Dec 27, 2007 8:38 pm    Post subject: Reply with quote

Wiccaan wrote:
But but but... threads are sexy Sad Timers are... so old.. and ... old >.> Multiple threads would be useless though, no need for it. Would only need one Mad


I used a thread to house the clicking procedure, and used Hotkey to suspend/resume the thread. Is it the right method?
Back to top
View user's profile Send private message
DeletedUser14087
I post too much
Reputation: 2

Joined: 21 Jun 2006
Posts: 3069

PostPosted: Fri Dec 28, 2007 4:03 am    Post subject: Reply with quote

Threads FTW !, timers sucks cocks
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: Fri Dec 28, 2007 5:07 am    Post subject: Reply with quote

That attitude, kaspersky, is why your shit will always be horribly coded and inefficient.
_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
DeletedUser14087
I post too much
Reputation: 2

Joined: 21 Jun 2006
Posts: 3069

PostPosted: Fri Dec 28, 2007 9:22 am    Post subject: Reply with quote

the_undead wrote:
That attitude, kaspersky, is why your shit will always be horribly coded and inefficient.


don't be jealous noob
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: Fri Dec 28, 2007 9:26 am    Post subject: Reply with quote

Kaspersky wrote:
the_undead wrote:
That attitude, kaspersky, is why your shit will always be horribly coded and inefficient.


don't be jealous noob

Laughing
That is all.

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Renkokuken
GO Moderator
Reputation: 4

Joined: 22 Oct 2006
Posts: 3249

PostPosted: Fri Dec 28, 2007 9:27 am    Post subject: Reply with quote

Kaspersky wrote:
the_undead wrote:
That attitude, kaspersky, is why your shit will always be horribly coded and inefficient.


don't be jealous noob
LOOOOLOLLOLOLOLOLOLOLOLLOLOLOLOLOLOOOOLLOOLOLOLOOLOLOLOLOLOLOLOLOLOLOLLOLOLOOOOOOLLLLLLLOOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOLOL.
Back to top
View user's profile Send private message
g3nuin3
Cheater
Reputation: 0

Joined: 08 Jan 2007
Posts: 28

PostPosted: Fri Dec 28, 2007 11:36 am    Post subject: Reply with quote

Timers are pretty inefficient if you ask me, there are alot of bottlenecks to them, threads win my vote, especially for a looping procedure, threads will take close to no resources, cause the stack wont be destroyed and recreated like what happens with timers most the time, and can cause performance problems in the application itself..or some shit like that :/


On a side note, wutup x0r, long time no see!

_________________
Xtrap /CRC bypass for GO for sale!
http://mark.web-uploader.com/ape/
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Fri Dec 28, 2007 12:07 pm    Post subject: Reply with quote

Aikos wrote:
Wiccaan wrote:
But but but... threads are sexy Sad Timers are... so old.. and ... old >.> Multiple threads would be useless though, no need for it. Would only need one Mad


I used a thread to house the clicking procedure, and used Hotkey to suspend/resume the thread. Is it the right method?


Either way is up to you to use, you could always time them both to see which performs better. There are tons of articles on the net about Threads vs. Timers, most will say so and so is better then the other, and then the other half will be the other way around. It's mainly personal preference on which you decide to use. I wouldn't say using either method is right or wrong either.

g3nuin3 wrote:
Timers are pretty inefficient if you ask me, there are alot of bottlenecks to them, threads win my vote, especially for a looping procedure, threads will take close to no resources, cause the stack wont be destroyed and recreated like what happens with timers most the time, and can cause performance problems in the application itself..or some shit like that :/


On a side note, wutup x0r, long time no see!


Surprised that the g3nuin3 I think it is? Long time no see >.> I also agree with your statement, I prefer using threads for doing anything that is going to be looping for any period of time. It keeps things running smooth and prevents program lockups.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Haxory'
Grandmaster Cheater Supreme
Reputation: 92

Joined: 30 Jul 2007
Posts: 1900

PostPosted: Sat Dec 29, 2007 7:34 am    Post subject: Reply with quote

Free VB6 source

Place in module:

Code:

Public 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)
Public Declare Function SetCursorPos Lib "user32" (ByVal x As Long, ByVal y As Long) As Long
Public Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
    Public Const MOUSEEVENTF_LEFTDOWN = &H2
    Public Const MOUSEEVENTF_LEFTUP = &H4
    Public Const MOUSEEVENTF_MIDDLEDOWN = &H20
    Public Const MOUSEEVENTF_MIDDLEUP = &H40
    Public Const MOUSEEVENTF_RIGHTDOWN = &H8
    Public Const MOUSEEVENTF_RIGHTUP = &H10
    Public Const MOUSEEVENTF_MOVE = &H1
Public Type POINTAPI
    x As Long
    y As Long
    End Type
Public Function GetX() As Long
    Dim n As POINTAPI
    GetCursorPos n
    GetX = n.x
End Function
Public Function GetY() As Long
    Dim n As POINTAPI
    GetCursorPos n
    GetY = n.y
End Function
Public Sub LeftClick()
    LeftDown
    LeftUp
End Sub
Public Sub LeftDown()
    mouse_event MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0
End Sub
Public Sub LeftUp()
    mouse_event MOUSEEVENTF_LEFTUP, 0, 0, 0, 0
End Sub
Public Sub MiddleClick()
    MiddleDown
    MiddleUp
End Sub
Public Sub MiddleDown()
    mouse_event MOUSEEVENTF_MIDDLEDOWN, 0, 0, 0, 0
End Sub
Public Sub MiddleUp()
    mouse_event MOUSEEVENTF_MIDDLEUP, 0, 0, 0, 0
End Sub
Public Sub RightClick()
    RightDown
    RightUp
End Sub
Public Sub RightDown()
    mouse_event MOUSEEVENTF_RIGHTDOWN, 0, 0, 0, 0
End Sub
Public Sub RightUp()
    mouse_event MOUSEEVENTF_RIGHTUP, 0, 0, 0, 0
End Sub
Public Sub MoveMouse(xMove As Long, yMove As Long)
    mouse_event MOUSEEVENTF_MOVE, xMove, yMove, 0, 0
End Sub
Public Sub SetMousePos(xPos As Long, yPos As Long)
    SetCursorPos xPos, yPos
End Sub



In the form's code put:

Code:

Private Sub Command1_Click()
    If Command1.Caption = "Start" Then
        Timer1.Enabled = True
        Command1.Caption = "Stop"
        Text1.Enabled = False
    Else
        Timer1.Enabled = False
        Command1.Caption = "Start"
        Text1.Enabled = True
    End If
End Sub

Private Sub Text1_Change()
If Val(Text1.Text) < 0.01 Then
        Text1.Text = "0.05"
    End If
    Timer1.Interval = Val(Text1.Text) * 1000
End Sub

Private Sub Timer1_Timer()
    LeftClick
End Sub



In the form'a interface put:

Code:


One textbox named: Text1
A label with name: Label1  And caption: Seconds
A button named: Command1  And caption Start
Name the form: Form1



You may use but give credits to me

(or +rep me and leave my name out of the application)[/code]

_________________
you and me baby ain't nothing but mammals so lets do it like they do on the discovery channel
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Sat Dec 29, 2007 3:26 pm    Post subject: Reply with quote

@haxory'

http://www.pscode.com/vb/scripts/ShowCode.asp?txtCodeId=2795&lngWId=1

Nice try, don't rip others code. You will just be another Kasper.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
nox
Expert Cheater
Reputation: 0

Joined: 09 Apr 2007
Posts: 227
Location: brooklyn

PostPosted: Sun Dec 30, 2007 4:26 am    Post subject: Reply with quote

where's the C source?
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