Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

v1.0.19 released: Create GUI windows & controls


  • Please log in to reply
17 replies to this topic
Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
Here are the changes for v1.0.19: http://www.autohotkey.com/changelog/

A note about GUI windows & controls:
For this version, I just wanted to have a solid set of core features on which to build more later. I think this release -- while not as feature-rich as some might want -- is a good foundation. More options, control types, sub-commands, and other improvements will be made in upcoming versions.

Rajat's SmartGUI Creator (a great layout editor), is described and available here.

Here are a few small demonstration scripts: 10 KB Zip File

For anyone who has been trying out the test versions of the GUI feature, here are the changes since the last test release. Note: this list does not include the non-GUI changes mentioned in the changelog.

When the following control types use automatic width, the width is set to 15 multiplied by the current font size (except GroupBox, which uses a multiplier of 18 to provide room inside for margins): DropDownList, ComboBox, ListBox, GroupBox, and Edit.

When window is first shown, it is centered on the desktop in either or both dimensions if those dimensions were not specified. In addition, the word Center can be used to explicitly center the window for subsequent showings.

The current tray icon will be used as the GUI window's icon.

For multi-line Edit controls:
- The Submit command translates CRLF (`r`n) to LF (`n) automatically.
- If default text is to appear in an edit field, use plain LF (`n) rather than CRLF (`r`n) to start new lines.

The R (rows) option obeys a floating point value such as 2.5.

Fixed button/checkbox ignoring rapid consecutive clicks. [thanks Rajat]

Fixed checkbox auto-height when multiple lines existed as a consequence of word-wrapping.

If a width/height is specified for a picture control, the image will be scaled to fit. There is also an option for "keep aspect ratio".

Added ability to assign options to main window. Currently, the only option is +owner, which makes one window owned by another. An owned window has no taskbar button by default and is always on top of its owner when visible. An owned window is also automatically destroyed when its owner is destroyed. The +owner option must be used after its owner is created but before its own window is created by a command such as "gui add". Examples:
gui, 2:+owner1 ; Make #2 window owned by #1 window.
gui, +owner ; Make #1 window owned by script's main window.

Options:
- Include the word NoTab to prevent the tab key from navigating to a control.
- The C (color) option can be specified in an individual control to override the current font color.
- Include one of the following words to change alignment/justification: left, center, right.
- Include the word Disabled to create a disabled control.
- Include the word Hidden to create an invisible control.
- Include the word ReadOnly to make an Edit control read-only.
- Include the word Password followed immediately by the character with which to conceal the user's input for an edit control.

Removed the special gSubmit label because it doesn't seem useful.

All GUI threads now start off with their "last found window" set to the GUI window, which allows window and control commands -- such as WinMove, WinHide, WinSet, WinSetTitle, and ControlGetFocus -- to omit WinTitle and WinText when operating upon the GUI window itself.

DropDownLists, ComboBoxes, and ListBoxes always display at least one row in their list portion. In addition, for DropDownList and ComboBox, the R option now specifies the number of rows to display in the drop-list itself.

Added radio buttons.

beardboy
  • Members
  • 443 posts
  • Last active: May 27 2017 08:41 AM
  • Joined: 02 Mar 2004
Chris, awesome work, GUI support in AHK has blown past my expectations.

thanks,
beardboy

Nemroth
  • Members
  • 278 posts
  • Last active: Dec 31 2011 10:53 PM
  • Joined: 07 Sep 2004
What a release !!!

Again major improvements.
The +owner option : great !
Alignment - Disabled, Hidden and other options : Super !!!
Allowing window and control commands to omit WinTitle and WinText : Extra !!!
Added radio buttons : a dream come true !!!

All that is OK. But no tabbed control, no button bar, no skinable window ? What are you waiting for, Chris ?

No !!!!! I just kidding !!!!! :D :D :D :D

Again a really great job. Congratulations for this new release.

compuboy_r
  • Members
  • 68 posts
  • Last active: Oct 29 2005 03:17 PM
  • Joined: 04 May 2004
Awsome Work Chris !!!!!

Congratulations !!!!!

Great Going

Tekl
  • Guests
  • Last active:
  • Joined: --
Hello Chris,

it would be nice to post all new keywords if an update will be released, so authors of syntax-highlighting-files for text-editors can update their files.

Tekl

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
The following files installed as part of AutoHotkey contain an updated list of keywords:

\Extras\Editors\TextPad\AutoHotkey.syn (plain text)

\Extras\Editors\TextPad\AHKcommands.txt (a list made by Rajat containing all commands and their syntax)

I keep the above and all other included syntax files up-to-date. If you have a syntax file for a different Editor that's in a state usable by others -- and you would like it distributed with AutoHotkey -- send it to [email protected].

Thanks.

Tekl
  • Guests
  • Last active:
  • Joined: --
Hi Chris,

thanks, so I'll compare them with Winmerge to get the new words. Thanks.

I've already send you two syntax-files for MED-Editor and EmEditor.

Tekl

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004

I've already send you two syntax-files

Oh, that was you. I didn't know it was the same person.

thanks, so I'll compare them with Winmerge to get the new words.

You won't need to do this in the future. I'll include your syntax files in the next release and keep them up-to-date with all the changes.

Thanks.

Stefan
  • Members
  • 74 posts
  • Last active: Apr 15 2009 09:33 PM
  • Joined: 30 Jul 2004
Great to hear that AHK comes now with GUI. THX.


I suggest to update the keywords for PSPad too.
(may i help you?)

Thanks again
stefan
Posted Image Stefan

This post was created with the kindly help of http://dict.leo.org/ and remember: “Allways look on the bright side of Life”

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004

I suggest to update the keywords for PSPad too.

PSPad is one of the editors I've been keeping up-to-date with each new release. However, since I don't actually use PSPad, I haven't been testing that the config changes actually work. Have you spotted any keywords in particular that are missing?

One thing that would really save me a lot of time is this item that's already on the to-do list:

Auto-generation of editor syntax files from one master list of commands and keywords. Publish the master files somewhere, along with the conversion scripts, so that others can use them to make things for new editors.

However, this is no small task so I don't expect anyone here to volunteer for it unless they have a lot of spare time and they feel they have the know-how to do it.

beardboy
  • Members
  • 443 posts
  • Last active: May 27 2017 08:41 AM
  • Joined: 02 Mar 2004

Have you spotted any keywords in particular that are missing?

Through all the changes I haven't noticed any that have been missing, thanks for updating it.

thanks,
beardboy

Rajat
  • Members
  • 1904 posts
  • Last active: Jul 17 2015 07:45 AM
  • Joined: 28 Mar 2004
i think keywords for gui (checkbox etc.) are not there in TextPad syntax files. (i've the official .20 last).

MIA

CleanNews.in : Bite sized latest news headlines from India with zero bloat


Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
Thanks; they will be in the next update along with the GuiControl and GuiControlGet sub-commands.

Many of these lesser keywords are omitted from the PSPad because I'm not sure how many syntax colors it supports. Since the original file contained keywords only for the command names, I've kept it that way for now.

  • Guests
  • Last active:
  • Joined: --

...
Many of these lesser keywords are omitted from the PSPad because I'm not sure how many syntax colors it supports. ...


FYI:

PSPad Highlighter definitions:

Posted Image


I can handel 4 different keywords (since the last few releases of PSpad):
Keyword 1
Keyword 2
Keyword 3
Reserved Words

Hope thats helps you?

best regards
stefan

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
Thanks. If anyone feels that having more keyword groups would be good -- hopefully while retaining compatibility with older versions of PSPad -- feel free to modify the PSPad config file included in AutoHotkey's extras folder. Then send me the updated version.