Moving a window

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
Madison01
Posts: 1
Joined: 14 May 2024, 12:41

Moving a window

Post by Madison01 » 14 May 2024, 12:56

Hello everybody!
I'm using the ChatGPT AutoHotkey Utility and loving it. Sometimes I have to work with just one screen, so it would be great if I could move de window of the answer tray.
Is that possible? How should I include in the .ahk file?
I'm sorry if I'm asking something basic, but I'm a total beginner.
Thanks in advance,

Jorge
WKen
Posts: 187
Joined: 21 Feb 2023, 00:01

Re: Moving a window

Post by WKen » 15 May 2024, 16:28

This was created when I was just learning AutoHotkey, not sure if it will be helpful to you.

Code: Select all

#Requires AutoHotkey v2
CoordMode "Mouse"

^m::      ; Ctrl+M
{
    MouseGetPos , , &id
	WinGetPos , , &WW, &WH, 'ahk_id ' id
    while getKeyState("m", "P") {
       MouseGetPos &x, &y
	   winMove x-(WW/2), y-(WH/2), , , 'ahk_id ' id
	   sleep 10
	}
}
Post Reply

Return to “Ask for Help (v2)”