Googler24022 Posted January 4, 2007 Posted January 4, 2007 (edited) Hello I am writing a script to place down nodes for an application I'm running. I plan to map a square with the nodes which are placed and they need to start where the cursor is already.HotKeySet("{F6}", "_support") HotKeySet("{ESC}", "Terminate") While 1 Sleep(100) WEnd Func _support() MouseClick("left") MouseClick("left", +100) EndFunc Func Terminate() Exit 0 EndFuncI am trying to get the mousemove function to move the mouse 100 pixels from it's current position. Is this possible? Regards,-Matt. Edited January 29, 2012 by Googler24022
TheCuz Posted January 4, 2007 Posted January 4, 2007 For a start, look up MouseGetPos in the help file. You can then use those numbers to move the mouse to the new position. [font="Verdana"]People who say it cannot be done should not interrupt those who are doing it. - George Benard Shaw[/font]
/dev/null Posted January 4, 2007 Posted January 4, 2007 I am trying to get the mousemove function to move the mouse 100 pixels from it's current position. Is this possible?MouseGetPos() and then MouseMove()CheersKurt __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *
locomaestro Posted January 5, 2007 Posted January 5, 2007 MouseGetPos() and then MouseMove() Cheers Kurtyour func support should go like this Func _support() $position = mousegetpos() $x = $position[0] + 100 $y = $position[1] + 100 ;sorry buti kinda forgot the syntax of mouse click i mean the way they are put, i know that you have to specify x and y and what button to click and times and speed , but there i pretty much did almost everything for you just put that together endfunc MouseClick() EndFunc
Paulie Posted January 5, 2007 Posted January 5, 2007 HotKeySet("{HOME}", "MoveMouse");Sets the hotkey to "movemouse" function While 1 Sleep(1000);Waits for Hotkey to be pressed WEnd Func MoveMouse();WHat happens when Hotkey is presed $Pos = MouseGetPos() ;Gets current possition of mouse Mousemove($pos[0], $pos[1]-100); moves the mouse 100 pixels up from current location EndFunc If you want it to click, you can substitute mousemove for mouseclick
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