Hi
I am trying to do a simple task i thought
Click at current cursor position and Drag to an Absolute location on the active screen
Numpad2::MouseClickDrag, L, 50, 630
How can i make this drag from current click posiiton to an absolute position
I am dragging items from current click position to a absolute posiiton
I have looked at the docs but i cant seem to figure it out i read about cord mode but that didnt work
Thank you
Click Position Move To Absolute Location - Drag Mouse
Re: Click Position Move To Absolute Location - Drag Mouse
It is simple. The docs show that you need two sets of coordinates, and what you showed only has one. Use MouseGetPos to determine the current position, and use that for X1, Y1. Use the coordinates you want to drag to as X2, Y2.
Re: Click Position Move To Absolute Location - Drag Mouse
You probably want something like this, change the numbers as appropriate:
This script needs 3 lines of code (4 if you include the 'return'), so you can't do it as a one-liner 'hotkey::code line' hotkey.
I always like to test mouse dragging on MS Paint, it's very visual. It draws a straight line between 2 points.
Code: Select all
Numpad2::
CoordMode, Mouse, Screen
MouseGetPos, vMouseX, vMouseY
MouseClickDrag, L, % vMouseX, % vMouseY, 0, 0
return
I always like to test mouse dragging on MS Paint, it's very visual. It draws a straight line between 2 points.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
Who is online
Users browsing this forum: doodles333 and 268 guests