Align position of gui?

Get help with using AutoHotkey and its commands and hotkeys
User avatar
Scr1pter
Posts: 774
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
I ignore every thread which contains the P-word :x
(Hint: It rhymes on Shython)
Please do not support cheaters!
Keyboard: Logitech G15 FE - Mice: Logitech G9 FE, G502 FE, G602 - OS: Windows 7 Pro 64 Bit - AHK version: 1.1.29.00

Return to “Ask For Help”

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], TeachMeHowToHotkey and 155 guests