Hi im playing a game on the net its a gambling game in flash you've to push a button the whole time so i wanted to create a program that keeps pressing the button but now im stuck.. my code is the following:
Dim ORIGINAL_TIME As Date
Dim SECONDS_TO_WAIT As String
Private Sub Timer1_Timer()
Dim Result As Long
Dim Pos As PointAPI
Result = GetCursorPos(Pos)
If Result <> 0 Then
StatusBar1.SimpleText = Pos.X & "," & Pos.Y
Else
StatusBar1.SimpleText = "Error"
End If
End Sub
Public Sub HoldOn(Seconds)
Dim CurrentTime As Long
CurrentTime = Timer
Do
DoEvents
Loop Until CurrentTime + Seconds <= Timer
End Sub
Private Sub Command1_Click()
MsgBox "Over 5 Secondes Begint De AutoGok Ga Naar Het GokAutomaat Venster", vbInformation
HoldOn (5)
Timer1.Enabled = True
Timer2.Enabled = True
Timer3.Enabled = True
End Sub
Private Sub Command2_Click()
Timer1.Enabled = False
Timer2.Enabled = False
Timer3.Enabled = False
End Sub
Private Sub Timer2_Timer()
Call SetMousePos(622, 117)
LeftClick
End Sub
Private Sub Timer3_Timer()
If StatusBar1.SimpleText = "622,117" Then
Timer2.Enabled = True
Else
Timer2.Enabled = False
End If
End Sub
command 1 & 2 are the start and stop buttons the holdon() command is so that the user can open the internet explorer with the gambling game in it, so far so good but i want timer2 (wich clicks all the time) to stop when the user moves the mouse. thats why i put in timer 3 wich checks if the coordinates are changed and if they are it will stop timer2. Well i thought the code was ok but since i added the 3rd timer i get this error: Compile Error Ambigious Name Detected: PointAPI, wich i didn't have before i added it and when i delete it it still gives the error.. anyone knows what i'm missing here?
Thanks in advance,
Greets,
ThaVolt
Dim ORIGINAL_TIME As Date
Dim SECONDS_TO_WAIT As String
Private Sub Timer1_Timer()
Dim Result As Long
Dim Pos As PointAPI
Result = GetCursorPos(Pos)
If Result <> 0 Then
StatusBar1.SimpleText = Pos.X & "," & Pos.Y
Else
StatusBar1.SimpleText = "Error"
End If
End Sub
Public Sub HoldOn(Seconds)
Dim CurrentTime As Long
CurrentTime = Timer
Do
DoEvents
Loop Until CurrentTime + Seconds <= Timer
End Sub
Private Sub Command1_Click()
MsgBox "Over 5 Secondes Begint De AutoGok Ga Naar Het GokAutomaat Venster", vbInformation
HoldOn (5)
Timer1.Enabled = True
Timer2.Enabled = True
Timer3.Enabled = True
End Sub
Private Sub Command2_Click()
Timer1.Enabled = False
Timer2.Enabled = False
Timer3.Enabled = False
End Sub
Private Sub Timer2_Timer()
Call SetMousePos(622, 117)
LeftClick
End Sub
Private Sub Timer3_Timer()
If StatusBar1.SimpleText = "622,117" Then
Timer2.Enabled = True
Else
Timer2.Enabled = False
End If
End Sub
command 1 & 2 are the start and stop buttons the holdon() command is so that the user can open the internet explorer with the gambling game in it, so far so good but i want timer2 (wich clicks all the time) to stop when the user moves the mouse. thats why i put in timer 3 wich checks if the coordinates are changed and if they are it will stop timer2. Well i thought the code was ok but since i added the 3rd timer i get this error: Compile Error Ambigious Name Detected: PointAPI, wich i didn't have before i added it and when i delete it it still gives the error.. anyone knows what i'm missing here?
Thanks in advance,
Greets,
ThaVolt