Align position of gui?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
Scr1pter
Posts: 1272
Joined: 06 Aug 2017, 08:21
Location: Germany

Align position of gui?

17 Aug 2018, 16:17

Hi,

When I create a guy and don't specify its x or y position, it's usually center-aligned.
I'm trying to find a way to make it right-aligned, so that its right border ends where the screen ends.

This method works, but I believe there is a better way:

Code: Select all

^F1::
pos := A_ScreenWidth - 100
Gui, Show, w100 h500 x%pos%
return
I would always have to subtract the guis width from the whole screen width.

What I also tried was this:

Code: Select all

^F2::
Gui, Show, w100 h500, Right
return
but it had no effect.

Regards
Please use [code][/code] when posting code!
Keyboard: Logitech G PRO - Mouse: Logitech G502 LS - OS: Windows 10 Pro 64 Bit - AHK version: 1.1.33.09

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: mikeyww and 350 guests