Align position of gui?

Get help with using AutoHotkey and its commands and hotkeys
User avatar
Scr1pter
Posts: 370
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] [Download] GeSHi © Codebox Plus

^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] [Download] GeSHi © Codebox Plus

^F2::
Gui, Show, w100 h500, Right
return

but it had no effect.

Regards
I'm not an expert, just an enthusiastic AutoHotkey user. 8-)
Please do not support cheaters! :thumbdown:
Keyboard: Logitech G15 first generation - Mice: Logitech G9, G502, 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: anobayan, shgilad81 and 80 guests