Vzy Posted September 23, 2009 Share Posted September 23, 2009 Hey, I'm a little puzzled here. I'm trying to make a script where, you put the mouse at a position on the screen, then you press a button, and the cursor moves left from the current position. Perhaps my explaining is a little confusing, I'll try this: 1 2 3 4 5 6 7 8 Say, I hold the cursor on "1", then press a button, and it auto moves to 2, right through to 8. Oh, and have it click on each one. I would need to get the current position, then make the mouse movement go off that? That's what I'm trying to figure out. This is my first time trying to make a script, I hope my explaining wasn't too bad Link to comment Share on other sites More sharing options...
Demonic Posted September 23, 2009 Share Posted September 23, 2009 Hey, I'm a little puzzled here. I'm trying to make a script where, you put the mouse at a position on the screen, then you press a button, and the cursor moves left from the current position. Perhaps my explaining is a little confusing, I'll try this: 1 2 3 4 5 6 7 8 Say, I hold the cursor on "1", then press a button, and it auto moves to 2, right through to 8. Oh, and have it click on each one. I would need to get the current position, then make the mouse movement go off that? That's what I'm trying to figure out. This is my first time trying to make a script, I hope my explaining wasn't too bad HotKeySet("{NumPad0}", "ToTheRight") While 1 Sleep(100) WEnd Func ToTheRight() $OriginalX = MouseGetPos(0) $OriginalY = MouseGetPos(1) $MoveX = 50 $MoveY = 0 MouseMove($OriginalX + $MoveX, $OriginalY + $MoveY, 5) MouseClick("left", MouseGetPos(0), MouseGetPos(1), 1, 0) EndFunc Link to comment Share on other sites More sharing options...
Vzy Posted September 23, 2009 Author Share Posted September 23, 2009 HotKeySet("{NumPad0}", "ToTheRight") While 1 Sleep(100) WEnd Func ToTheRight() $OriginalX = MouseGetPos(0) $OriginalY = MouseGetPos(1) $MoveX = 50 $MoveY = 0 MouseMove($OriginalX + $MoveX, $OriginalY + $MoveY, 5) MouseClick("left", MouseGetPos(0), MouseGetPos(1), 1, 0) EndFunc Ah, of course >.<! Cheers. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now