Jump to content

MoveMouse a specific number of pixels?


Phaethon
 Share

Recommended Posts

Well, I'm making a series of programs using "PixelSearch" and some things like that, but what I'd like some help with it moving the mouse a certain number of pixels, rather than to a certain coordinate set.. Is there a function for this? Or is there another way to do this?

(I need to right click on something, then move down to one of the options)

If anyone could help me, that would be great!

:)

Edited by Phaethon

Coder's Helper >> Here[center][/center]

Link to comment
Share on other sites

Func _MouseMove($x=0, $y=0, $speed=10)
$pos = MouseGetPos()
MouseMove($pos[0] + $x, $pos[1] + $y, $speed)
EndFunc

should work

Edit: you gotta use negative or positive values for whether you wanna move to the left or right or up or down and whatnot.

Edited by the_lord_mephy
My site for HTML Help :)[quote name='Valik' date='Oct 15 2004, 12:29 PM']Maybe nobody is an "elite uber-coder" like me because thinking is a capital offense in today's online-world?[right][snapback]36427[/snapback][/right][/quote]
Link to comment
Share on other sites

Works beautifully!

Thank you very much! :)

One other thing if anyone would like to help me out again :">

With "PixelSearch", what would the values be if I wanted to search the whole screen on 1280 x 1024 res screen?

(i.e. PixelSearch(left,top,right,bottom...)), I am confused as to what "left","top", etc would be..

Edited by Phaethon

Coder's Helper >> Here[center][/center]

Link to comment
Share on other sites

...(i.e. PixelSearch(left,top,right,bottom...)), I am confused as to what "left","top", etc would be..

"Most" get confused and "most" is the clarification -

left-most = 0

top-most = 0

right-most = 1280

bottom-most = 1024

...but alas, I'm posting too late...

[size="1"][font="Arial"].[u].[/u][/font][/size]

Link to comment
Share on other sites

...(I need to right click on something, then move down to one of the options)...

You may find that sending a letter to the menu works as well... even if the menu changes options based on what was selected before the right-click. Not all option menus show the shortcut keys - notepad does, SciTE does not - but they are there nonetheless... at least within XP.

-MSP-

[size="1"][font="Arial"].[u].[/u][/font][/size]

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...