| View previous topic :: View next topic |
| Author |
Message |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
|
| Back to top |
|
 |
Aikos Cheater
Reputation: 0
Joined: 26 Nov 2007 Posts: 47
|
Posted: Thu Dec 27, 2007 8:38 pm Post subject: |
|
|
| Wiccaan wrote: | But but but... threads are sexy Timers are... so old.. and ... old >.> Multiple threads would be useless though, no need for it. Would only need one  |
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 |
|
 |
DeletedUser14087 I post too much
Reputation: 2
Joined: 21 Jun 2006 Posts: 3069
|
Posted: Fri Dec 28, 2007 4:03 am Post subject: |
|
|
| Threads FTW !, timers sucks cocks
|
|
| Back to top |
|
 |
the_undead Expert Cheater
Reputation: 1
Joined: 12 Nov 2006 Posts: 235 Location: Johannesburg, South Africa
|
Posted: Fri Dec 28, 2007 5:07 am Post subject: |
|
|
That attitude, kaspersky, is why your shit will always be horribly coded and inefficient.
_________________
|
|
| Back to top |
|
 |
DeletedUser14087 I post too much
Reputation: 2
Joined: 21 Jun 2006 Posts: 3069
|
Posted: Fri Dec 28, 2007 9:22 am Post subject: |
|
|
| 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 |
|
 |
the_undead Expert Cheater
Reputation: 1
Joined: 12 Nov 2006 Posts: 235 Location: Johannesburg, South Africa
|
Posted: Fri Dec 28, 2007 9:26 am Post subject: |
|
|
| Kaspersky wrote: | | the_undead wrote: | | That attitude, kaspersky, is why your shit will always be horribly coded and inefficient. |
don't be jealous noob |
That is all.
_________________
|
|
| Back to top |
|
 |
Renkokuken GO Moderator
Reputation: 4
Joined: 22 Oct 2006 Posts: 3249
|
Posted: Fri Dec 28, 2007 9:27 am Post subject: |
|
|
| 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 |
|
 |
g3nuin3 Cheater
Reputation: 0
Joined: 08 Jan 2007 Posts: 28
|
Posted: Fri Dec 28, 2007 11:36 am Post subject: |
|
|
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!
_________________
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Fri Dec 28, 2007 12:07 pm Post subject: |
|
|
| Aikos wrote: | | Wiccaan wrote: | But but but... threads are sexy Timers are... so old.. and ... old >.> Multiple threads would be useless though, no need for it. Would only need one  |
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! |
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 |
|
 |
Haxory' Grandmaster Cheater Supreme
Reputation: 92
Joined: 30 Jul 2007 Posts: 1900
|
Posted: Sat Dec 29, 2007 7:34 am Post subject: |
|
|
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 |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
|
| Back to top |
|
 |
nox Expert Cheater
Reputation: 0
Joined: 09 Apr 2007 Posts: 227 Location: brooklyn
|
Posted: Sun Dec 30, 2007 4:26 am Post subject: |
|
|
| where's the C source?
|
|
| Back to top |
|
 |
|