|
-
Feb 17th, 2000, 10:00 AM
#1
Thread Starter
Member
I wanna make this program that will move the mouse by giving it some move mouse command, i know the move cursor or sumthing like that and then make em loop or is that it?, anyways is there a better one I can do? HELP!!!
-
Feb 17th, 2000, 11:05 AM
#2
Frenzied Member
You might check out the mouse_event API, which synthesizes mouse movement and button clicking by placing mouse input information into the input stream.
Check out this link for details:
http://www.vbapi.com/ref/m/mouse_event.html
Hope that helps!
~seaweed
-
Feb 17th, 2000, 11:09 AM
#3
So Unbanned
Or if you don't want to do that... here's source code!!! Yay...
Declare the following in a module:
[code]
Option Explicit
Type POINTAPI
x As Long
y As Long
End Type
Declare Function SetCursorPos& Lib "user32" _
(ByVal x As Long, ByVal y As Long)
Declare Function GetCursorPos Lib "user32" _
(lpPoint As POINTAPI) As Long
[code]
Put this in a timer:
Code:
Private Sub Timer1_Timer()
Dim mp As POINTAPI
GetCursorPos mp
SetCursorPos mp.x + (Int(Rnd * 20 + 1) - 10), mp.y + (Int(Rnd * 20 + 1) - 10)
End Sub
This moves it x, y from the current position of the mouse rather then scattering all over the screen.
Good luck,
------------------
DiGiTaIErRoR
VB, QBasic, Iptscrae, HTML
Quote: There are no stupid questions, just stupid people.
-
Feb 17th, 2000, 12:21 PM
#4
Thread Starter
Member
Thanxx to both of ye!!!!! I appreciate it!!!!!
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
|