|
-
Jun 29th, 2005, 07:34 PM
#1
Thread Starter
New Member
A little help with 6.0 please :) *Resolved...*
*EDIT* Easyer way of saying it:
How do you make it so when somethign in a list is selected and F1 is pressed it does soemthing every milisecond and when you press F1 again it stops. Help please.
Last edited by SlipKnot; Jun 29th, 2005 at 11:10 PM.
Reason: Easyer Way of Saying
-
Jun 29th, 2005, 07:46 PM
#2
Re: A little help with 6.0 please :)
You can't really do anything that quickly. Maybe 50 milliseconds would be more realistice. What are you trying to do?
-
Jun 29th, 2005, 07:48 PM
#3
Thread Starter
New Member
Re: A little help with 6.0 please :)
Im trying make an autoclicker that clicks FAST, but if u cant do 1 every milisecond 50 is ok too, think you can help?
-
Jun 29th, 2005, 07:49 PM
#4
Fanatic Member
Re: A little help with 6.0 please :)
VB Code:
Option Explicit
Dim intPressed As Integer
Private Sub List1_KeyDown(KeyCode As Integer, Shift As Integer)
If intPressed = 0 Then
If KeyCode = vbKeyF1 Then
intPressed = intPressed + 1
MsgBox "pressed! :)"
End If
Else: intPressed = 1
If KeyCode = vbKeyF1 Then
intPressed = intPressed - 1
MsgBox "PRESSED! ;)"
End If
End If
End Sub
That will do something when F1 is press, then do something else when pressed again.
-Sir Loin
-
Jun 29th, 2005, 07:54 PM
#5
Re: A little help with 6.0 please :)
What do you want to do when F1 is pressed? Is it your program, or are you accessing another program?
-
Jun 29th, 2005, 07:54 PM
#6
Addicted Member
Re: A little help with 6.0 please :)
Hi,
This may help...
VB Code:
Option Explicit
Dim AutoClick As Boolean
Private Sub Form_Load()
With List1
.AddItem "AutoClick"
End With
End Sub
Private Sub List1_KeyDown(KeyCode As Integer, Shift As Integer)
Select Case KeyCode
Case vbKeyF1
If List1.ListIndex <> -1 Then
AutoClick = Not AutoClick
Timer1.Interval = 50
Timer1.Enabled = True
End If
End Select
End Sub
Private Sub Timer1_Timer()
Static Cnt As Long
If AutoClick Then
Cnt = Cnt + 1
Debug.Print Cnt
Else
Timer1.Enabled = False
End If
DoEvents
End Sub
Have a good one!
BK
-
Jun 29th, 2005, 07:55 PM
#7
Thread Starter
New Member
Re: A little help with 6.0 please :)
didne work only pressed! no PRESSED!
-
Jun 29th, 2005, 08:11 PM
#8
Thread Starter
New Member
Re: A little help with 6.0 please :)
 Originally Posted by Black__Knight
Hi,
This may help...
VB Code:
Option Explicit
Dim AutoClick As Boolean
Private Sub Form_Load()
With List1
.AddItem "AutoClick"
End With
End Sub
Private Sub List1_KeyDown(KeyCode As Integer, Shift As Integer)
Select Case KeyCode
Case vbKeyF1
If List1.ListIndex <> -1 Then
AutoClick = Not AutoClick
Timer1.Interval = 50
Timer1.Enabled = True
End If
End Select
End Sub
Private Sub Timer1_Timer()
Static Cnt As Long
If AutoClick Then
Cnt = Cnt + 1
Debug.Print Cnt
Else
Timer1.Enabled = False
End If
DoEvents
End Sub
Have a good one!
BK
All that do is count it doesnt click.. where do i put vbKeyLButton ?
-
Jun 29th, 2005, 08:49 PM
#9
Re: A little help with 6.0 please :)
You mean it will automatically click L? Try to put it here..
VB Code:
Private Sub Timer1_Timer()
Static Cnt As Long
If AutoClick Then
Cnt = Cnt + 1
[B]SendKeys "L"[/B]
Else
Timer1.Enabled = False
End If
DoEvents
End Sub
-
Jun 29th, 2005, 08:53 PM
#10
Thread Starter
New Member
Re: A little help with 6.0 please :)
No for vbkeycode lbutton is left click i want it to left click...
-
Jun 29th, 2005, 09:05 PM
#11
Re: A little help with 6.0 please :) *Almost Done, Help*
-
Jun 29th, 2005, 10:15 PM
#12
Thread Starter
New Member
Re: A little help with 6.0 please :) *RESOLVED*
Last edited by SlipKnot; Jun 29th, 2005 at 11:02 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|