Script which will grab window and pull it to certain place on screen.

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Kamil2022
Posts: 8
Joined: 21 Oct 2022, 02:44

Script which will grab window and pull it to certain place on screen.

Post by Kamil2022 » 09 Dec 2022, 11:03

Hi, I would like to know if it's possible to create script which will grab window and pull it to certain place on screen.

To be specific I would like to create such script for windows clipboard manager (Windows 11). When I press default hotkey combination the tool will appear in the right lower corner of the screen.

Because of my vision problems I have to grab this window and move it to the left.

WindowSpy don't recognize the app.

Is it possible to create script which will click left mouse button and move coursor to another place with left click still being hold till the "destination" place will be reached?

User avatar
mikeyww
Posts: 26601
Joined: 09 Sep 2014, 18:38

Re: Script which will grab window and pull it to certain place on screen.

Post by mikeyww » 09 Dec 2022, 12:57

Yep, it sounds like you wrote the documentation itself: :arrow: MouseClickDrag
Clicks and holds the specified mouse button, moves the mouse to the destination coordinates, then releases the button.


Kamil2022
Posts: 8
Joined: 21 Oct 2022, 02:44

Re: Script which will grab window and pull it to certain place on screen.

Post by Kamil2022 » 10 Dec 2022, 11:06

I've created this sript:

Code: Select all

^#V::
MouseClickDrag, left, 1545, 537, 391, 171
Return
but it works only in Firefox, in other applications hotkey "^#V" does nothing.
Why?

User avatar
mikeyww
Posts: 26601
Joined: 09 Sep 2014, 18:38

Re: Script which will grab window and pull it to certain place on screen.

Post by mikeyww » 10 Dec 2022, 12:55

By default, coordinates are relative to the active window. You can use :arrow: CoordMode to change the point of reference.

Post Reply

Return to “Ask for Help (v1)”