Windows 10 and WinMove issues Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
jadams0173
Posts: 8
Joined: 06 May 2021, 09:35

Windows 10 and WinMove issues

Post by jadams0173 » 07 May 2021, 10:49

I've read the FAQ about UAC and Windows 10. I've went back and added the "Run with UI Access" to my AHK installation. I've also read numerous posts on the issue. I've actually turned my UAC in Win10 all the way down as a test. I'm trying to resize and move the active window to facilitate using known coordinates for mouse clicks. Can anyone give me some more guidance on what I'm missing to get the WinMove to work. I moved the .ahk file to the same directory as the .exe for the file I'm running. I even complied it and it still didn't work. Everything below works, except moving the window.

Code: Select all

#SingleInstance force
#NoEnv
^+o::

WinMove, A, 577, 257
msgbox, Did it move?

WinGetPos, X, Y,,, A
MsgBox, The active window is at %X%`,%Y%

WinGetTitle, Title, A
MsgBox, The active window is "%Title%".

Return
gregster
Posts: 9002
Joined: 30 Sep 2013, 06:48

Re: Windows 10 and WinMove issues  Topic is solved

Post by gregster » 07 May 2021, 11:35

Afaics, your WinMove syntax matches neither of the two allowed variants (the second being the relevant one here):
https://www.autohotkey.com/docs/commands/WinMove.htm wrote:WinMove, X, Y
WinMove, WinTitle, WinText, X, Y [, Width, Height, ExcludeTitle, ExcludeText]
Try

Code: Select all

WinMove, A, , 577, 257
jadams0173
Posts: 8
Joined: 06 May 2021, 09:35

Re: Windows 10 and WinMove issues

Post by jadams0173 » 07 May 2021, 11:41

gregster wrote:
07 May 2021, 11:35
Afaics, your WinMove syntax matches neither of the two allowed variants (the second being the relevant one here):
https://www.autohotkey.com/docs/commands/WinMove.htm wrote:WinMove, X, Y
WinMove, WinTitle, WinText, X, Y [, Width, Height, ExcludeTitle, ExcludeText]
Try

Code: Select all

WinMove, A, , 577, 257
Thank you so much! I stared at that missing comma way to long. I'm still rather new but should have caught that one. Thanks again! It worked!
Post Reply

Return to “Ask for Help (v1)”