GUI - Complete Command & Property Listing

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
jwinfl
Posts: 89
Joined: 16 Aug 2017, 12:37

GUI - Complete Command & Property Listing

31 Mar 2018, 08:27

I have searched several times for a COMPLETE list of GUI Commands and each Command's Options and sub options (Properties, etc.).
I'm sure its out there but I can't seem to locate one.
AHK GUI help lists some of the options for some of the commands but not all options available for each command.
For example, Gui, Add, Text... AHK shows some options and sub options, I would like a source that lists all of them.
Thank you for your help.
garry
Posts: 3763
Joined: 22 Dec 2013, 12:50

Re: GUI - Complete Command & Property Listing

31 Mar 2018, 09:48

have you tried autohotkey help and type GUI
run,%a_programfiles%\autohotkey\autohotkey.chm
jwinfl
Posts: 89
Joined: 16 Aug 2017, 12:37

Re: GUI - Complete Command & Property Listing

31 Mar 2018, 11:52

Garry,
Thank you for your reply.
Yes I have, per my post; "AHK GUI help lists some of the options for some of the commands but not all options available for each command."
I'm hopefull someone will know where to get a more complete list of GUI options.
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: GUI - Complete Command & Property Listing

31 Mar 2018, 18:00

There is a good AHK v1 to v2 list here, under Gui sub-commands:
v2-changes
https://autohotkey.com/v2/v2-changes.htm

I did some lists for AHK v2's GUI and menu objects:
list of every object type/property/method - AutoHotkey Community
https://autohotkey.com/boards/viewtopic ... 37&t=44081

In general I keep lists of things, and links, here:
list of every command/function/variable from across all versions - AutoHotkey Community
https://autohotkey.com/boards/viewtopic ... 42#p131642
And here:
jeeswg's homepage - AutoHotkey Community
https://autohotkey.com/boards/viewtopic ... 17&t=30931

I might do a list for AHK v1 GUIs. I've done a list for mostly everything else.

Btw please do a slightly extended example, so I can see what you had in mind.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
jwinfl
Posts: 89
Joined: 16 Aug 2017, 12:37

Re: GUI - Complete Command & Property Listing

01 Apr 2018, 03:44

Jeeswg,
Thank you for your reply.
I appreciate your idea of maybe doing a list.
What I don't understand is how there isn't a complete list somewhere already otherwise how would AHK and Windows know how to use those commands?
One example, Gui,Add,Edit, has dozens of Options, for example; c???, center, left, right x??? y??? h??? w??? v???? plus many more I can't remember.
It would be nice to know all the Options for this and all the other GUI commands.
Again I have a hard time believing such a listing of GUI commands, sub-commands and properties doesn't exist somewhere already.
gregster
Posts: 9001
Joined: 30 Sep 2013, 06:48

Re: GUI - Complete Command & Property Listing

01 Apr 2018, 03:56

jwinfl wrote:One example, Gui,Add,Edit, has dozens of Options, for example; c???, center, left, right x??? y??? h??? w??? v???? plus many more I can't remember.
It would be nice to know all the Options for this and all the other GUI commands.
Again I have a hard time believing such a listing of GUI commands, sub-commands and properties doesn't exist somewhere already.

I think you have to differentiate between specific and general options. These options you mention for Edit seem all to be covered (directly or indirectly) by https://autohotkey.com/docs/commands/Gu ... it_Options (these are the element-specific options) or at least in the general remarks here towards the end: https://autohotkey.com/docs/commands/Gu ... f_Contents

But there is also this hint in that section:
Docs wrote:See general options for other options like Right, Center, and Hidden. See also: position and sizing of controls.
v for variables and g-labels, on the other hand, are also covered in one of the general sections: https://autohotkey.com/docs/commands/Gui.htm#Events

Because these latter options are all shared, it would cause a lot of redundancy to repeat them for every element, don't you think?
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: GUI - Complete Command & Property Listing

18 Apr 2018, 20:46

Here is a list with information for the Gui/GuiControl/GuiControlGet commands and their subcommands, and general/specific properties for windows/controls.

Code: Select all

==================================================

Gui/GuiControl/GuiControlGet general info

==================================================

> Links
GUI
https://autohotkey.com/docs/commands/Gui.htm
GUI Control Types
https://autohotkey.com/docs/commands/GuiControls.htm
GuiControl
https://autohotkey.com/docs/commands/GuiControl.htm
GuiControlGet
https://autohotkey.com/docs/commands/GuiControlGet.htm
ListView (GUI)
https://autohotkey.com/docs/commands/ListView.htm
TreeView (GUI)
https://autohotkey.com/docs/commands/TreeView.htm

[AHK v1 to v2 changes, see: Gui sub-commands]
v2-changes
https://autohotkey.com/v2/v2-changes.htm
[AHK v2's GUI and menu objects:]
list of every object type/property/method - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=37&t=44081

==================================================

> GUI subcommands
New
Add
Show
Submit
Cancel / Hide
Destroy
Font
Color
Margin
(Options and styles for a window)
Menu
Minimize / Maximize / Restore
Flash
Default
(Positioning and sizing of controls)
(Storing and responding to user input)
(Options and styles for controls)
(Window Events)
(Creating Multiple GUI windows)
(GUI Events, Threads, and Subroutines)
(Miscellaneous: Keyboard Navigation | Window Appearance | General Remarks)

==================================================

> New
Gui, New [, Options, Title]

> Add
Gui, Add, ControlType [, Options, Text]

Text [Static]
Edit [Edit]
UpDown [msctls_updown32]
Picture [Static] [also: Pic]
Button [Button]
Checkbox [Button]
Radio [Button]
DropDownList [ComboBox] [also: DDL]
ComboBox [ComboBox]
ListBox [ListBox]
ListView [SysListView32]
TreeView [SysTreeView32]
Link [SysLink]
Hotkey [msctls_hotkey32]
DateTime [SysDateTimePick32]
MonthCal [SysMonthCal32]
Slider [msctls_trackbar32]
Progress [msctls_progress32]
GroupBox [Button]
Tab3 [SysTabControl32] [also: Tab, Tab2]
StatusBar [msctls_statusbar32]
(ActiveX) [e.g. Internet Explorer_Server]
(Custom) [e.g. RICHEDIT50W, Scintilla, ScrollBar, ToolbarWindow32]

> Show
Gui, Show [, Options, Title]

W
H
Y
X
Center
xCenter
yCenter
AutoSize

Minimize
Maximize
Restore
NoActivate
NA
Hide

> Submit
Gui, Submit [, NoHide]

> Cancel / Hide
Gui, Cancel
Gui, Hide [equivalent to 'Gui, Cancel']

> Destroy
Gui, Destroy

> Font
Gui, Font [, Options, FontName]

C [color (colour)]
S [size]
W [weight]
Q [quality]
bold
italic
strike
underline
norm

> Color
Gui, Color [, WindowColor, ControlColor]

> Margin
Gui, Margin [, X, Y]

> (Options and styles for a window)
Gui, +/-Option1 +/-Option2 ...

AlwaysOnTop
Border
Caption [present by default]
Delimiter
Disabled
DPIScale
Hwnd [HwndOutputVar]
Label
LastFound
LastFoundExist
MaximizeBox
MinimizeBox [present by default]
MinSize
MaxSize
OwnDialogs
Owner
Parent
Resize
SysMenu [present by default]
Theme
ToolWindow
(Unnamed Style) [e.g. +0x40000]
(Unnamed ExStyle) [e.g. +E0x40000]

> Menu
Gui, Menu [, MenuName]

> Minimize / Maximize / Restore
Gui, Minimize
Gui, Maximize
Gui, Restore

> Flash
Gui, Flash [, Off]

> Default
Gui, GuiName:Default

> (Positioning and sizing of controls)
R [rows of text]
W [width in pixels]
H [height in pixels]
wp+n, hp+n, wp-n, hp-n [width/height relative to previous control]
X
Y
x+n, y+n, x+-n, y+-n [X/Y relative to (right/bottom of) previous control]
x+m, y+m, x+-m, y+-m [relative to margin]
xp+n, yp+n, xp-n, yp-n [X/Y relative to (X/Y of) previous control]
xm, ym [relative to margin]
xs, ys [relative to section]
xs+n, xs-n, ys+n, ys-n [relative to section]

> (Storing and responding to user input)
V [variable]
G [gosub/g-label/(or call function)]

CtrlEvent(CtrlHwnd, GuiEvent, EventInfo, ErrLevel:="")

> (Options and styles for controls)
AltSubmit
C [color of text (colour)]
Disabled
Hidden
Left
Right
Center
Section
Tabstop
Wrap
VScroll
HScroll

BackgroundTrans
Background [-Background]
Border
Hwnd [HwndOutputVar]
Theme
(Unnamed Style)
(Unnamed ExStyle) [e.g. +E0x200 (or E0x200)]

> (Window Events)
The following labels (subroutines) will be automatically associated with a GUI window if they exist in the script:
GuiClose
GuiEscape
GuiSize
GuiContextMenu
GuiDropFiles

If a label does not exist for a given event, a function with that name can be called instead.

For windows other than number 1, the window's name or number (if it has one) is used as a prefix for the special labels mentioned above; for example, 2GuiEscape and 2GuiClose would be the default labels for window number 2, while MyGuiGuiEscape and MyGuiGuiClose would be the default labels for MyGui. To set a custom prefix, use Gui +Label.

GuiClose(GuiHwnd)
GuiEscape(GuiHwnd)
GuiSize(GuiHwnd, EventInfo, Width, Height)
GuiContextMenu(GuiHwnd, CtrlHwnd, EventInfo, IsRightClick, X, Y)
GuiDropFiles(GuiHwnd, FileArray, CtrlHwnd, X, Y) {

> (Creating Multiple GUI windows)
To operate upon a window other than the default, include its name or number (or its HWND) followed by a colon in front of the sub-command, as in these examples:
Gui, MyGui:Add, Text,, Text for about-box.
Gui, MyGui:Show

Gui MyGui:Default can be used to avoid the need for the "MyGui:" prefix above. In addition, the prefix is not necessary inside a GUI thread that operates upon the same window that launched the thread.

> (GUI Events, Threads, and Subroutines)

> (Miscellaneous: Keyboard Navigation | Window Appearance | General Remarks)

==================================================

> GuiControl subcommands
(Blank)
Text
Move
MoveDraw
Focus
Enable / Disable
Hide / Show
Delete [not yet implemented]
Choose
ChooseString
Font
(+/-Option1 +/-Option2)

To set a function object for handling the control's events, Param3 must be a single variable reference, as in either of the following examples. Other expressions which return objects are currently unsupported.

==================================================

> GuiControlGet subcommands
(Blank)
Pos
Focus
FocusV
Enabled
Visible
Hwnd
Name

==================================================

> defunct(?) options from 'Keywords.txt'
NoTab
Top

==================================================

> properties specific to control types

> Text [Static]

> Edit [Edit]
Limit
Lowercase
Multi
Number
Password
ReadOnly
Tn
Uppercase
WantCtrlA
WantReturn
WantTab
Wrap [-Wrap]

> UpDown [msctls_updown32]
Horz
Left
Range
Wrap

> Picture [Static] [also: Pic]

> Button [Button]
Default
Wrap [-Wrap]

> Checkbox [Button]
Check3
Checked
CheckedGray
Wrap [-Wrap]

> Radio [Button]
Group
Checked

> DropDownList [ComboBox] [also: DDL]
Choose
Uppercase
Lowercase
Sort
Delimiter

> ComboBox [ComboBox]
Choose
Uppercase
Lowercase
Sort
Delimiter
Limit
Simple

> ListBox [ListBox]
Choose
Multi
ReadOnly
Sort
Tn

> ListView [SysListView32]
AltSubmit
Background
C
Checked
Count
Grid
Hdr
LV
LV0x10
LV0x20
Multi
NoSortHdr
NoSort
ReadOnly
R
Sort
SortDesc
WantF2

Icon
Tile
IconSmall
List
Report

> TreeView [SysTreeView32]
AltSubmit
Background
Buttons
C
Checked
HScroll
ImageList
Lines
ReadOnly
R
WantF2

> Link [SysLink]
MyFunction(CtrlHwnd, GuiEvent, LinkIndex, HrefOrID)

> Hotkey [msctls_hotkey32]
Limit

> DateTime [SysDateTimePick32]
Choose
ChooseNone
Range
Right

> MonthCal [SysMonthCal32]
Multi
Range

> Slider [msctls_trackbar32]
Buddy1
Buddy2
Center
Invert
Left
Line
NoTicks
Page
Range
Thick
TickInterval
ToolTip
Vertical

> Progress [msctls_progress32]
Cn
BackgroundN
Range
Smooth [-Smooth]
Vertical

> GroupBox [Button]
Wrap

> Tab3 [SysTabControl32] [also: Tab, Tab2]
Choose
Background [-Background]
Buttons
Left/Right/Bottom
Wrap [-Wrap]
To specify the number of rows of text inside the control (or its height and width), see position and sizing of controls.
Icons in Tabs

> StatusBar [msctls_statusbar32]

> (ActiveX) [e.g. Internet Explorer_Server]

> (Custom) [e.g. RICHEDIT50W, Scintilla, ScrollBar, ToolbarWindow32]

==================================================
[EDIT:] Added properties specific to control types.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Google [Bot] and 417 guests