Relativity - Add relative positioning to controls in GUIs created by AutoGUI's GUI designer

Script editor, GUI designer, debugger and tools for AutoHotkey
User avatar
joedf
Posts: 7694
Joined: 29 Sep 2013, 17:08
Facebook: J0EDF
Google: +joedf
GitHub: joedf
Location: Canada
Contact:

Re: Relativity - Add relative positioning to controls in GUIs created by AutoGUI's GUI designer

07 Apr 2020, 09:35

Very nice work, it's "Font-astic" if I may say so myself. :+1:
Image Image Image Image Image
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x8GB G.Skill RipJaws V - DDR4 3280 MHz | [About Me] | [ASPDM - StdLib Distribution]
[Populate the AHK MiniCity!] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library] | [About the AHK Foundation]
User avatar
Alguimist
Posts: 369
Joined: 05 Oct 2015, 16:41
Contact:

Re: Relativity - Add relative positioning to controls in GUIs created by AutoGUI's GUI designer

07 Apr 2020, 09:42

Hello, Boiler :D. I tested your script. It has a nice looking user interface, that resembles the ribbon concept, appropriate for this category of information handling (by the way: I have a ribbon designer under construction).

Some time ago I started to work on a partially similar feature in AutoGUI, intended only to provide the following functionality: reordering of controls and overview of control properties. I had to interrupt this task because, at that moment, it was a priority to remove the GUI designer from the code editor, making it a separate tool, which I have already accomplished in the version I'm current working on.

Suggestions: add a button to directly load another script from the main window. And a status bar that displays a brief description of the options. For example: when hovering the mouse over the checkbox "yp", the following text could be helpful in the status bar (or in a tooltip): "Applies the Y-coordinate of the previous control to the selected control". The button "Save" doesn't become enabled after reordering only. It should always be enabled. So, right after the groupbox "Update GUI script", or preferably at the opposite side of the bar, there should be the buttons "Open", "Save" and a checkbox for "AHK v2", since it may be trivial to convert the code to AHK v2 at this point, except that the original script may include libraries not yet compatible. More details: tray menu "Exit" icon uses an icon index which is not the same across Windows versions, which may cause the incorrect icon to be loaded or an error message to be displayed if the icon index goes beyond the valid range. Add the icon to the Icons folder or load it from its resource ID. It should also be noted that font can be applied to all controls in the preview window at once, generating a single line in the output code, as long as the Font Dialog has the preview window as target.

I'm now planning to make AutoGUI able to generate GUI code for other programming languages, all of which relying on absolute values, so I must adhere to some generic guidelines in the process of adapting AutoGUI to conform to this plan. It doesn't mean that the properties dialog, specific for AHK, could not be preserved, though, where options for relative coordinates may be implemented.
User avatar
boiler
Posts: 5557
Joined: 21 Dec 2014, 02:44

Re: Relativity - Add relative positioning to controls in GUIs created by AutoGUI's GUI designer

07 Apr 2020, 10:00

joedf wrote:
07 Apr 2020, 09:35
Very nice work, it's "Font-astic" if I may say so myself. :+1:
Thanks! I appreciate that! :)
User avatar
boiler
Posts: 5557
Joined: 21 Dec 2014, 02:44

Re: Relativity - Add relative positioning to controls in GUIs created by AutoGUI's GUI designer

07 Apr 2020, 10:33

Hey, Alguimist. Thank you for the detailed feedback! Very helpful! :thumbup:
Alguimist wrote: Suggestions: add a button to directly load another script from the main window.
That is a good suggestion. I'll add it, perhaps in a File menu along with other menu options.
Alguimist wrote: And a status bar that displays a brief description of the options. For example: when hovering the mouse over the checkbox "yp", the following text could be helpful in the status bar (or in a tooltip): "Applies the Y-coordinate of the previous control to the selected control".
A status bar is a good idea, but did you notice (since I see you said "or in a tooltip") that the checkboxes and buttons do have tooltips associated with them? Perhaps I need to reduce the hover delay so that they pop up more quickly. Do you think it is adequate with just the tooltips, especially if they pop up faster?
Alguimist wrote: The button "Save" doesn't become enabled after reordering only. It should always be enabled. So, right after the groupbox "Update GUI script", or preferably at the opposite side of the bar, there should be the buttons "Open", "Save" and a checkbox for "AHK v2", since it may be trivial to convert the code to AHK v2 at this point, except that the original script may include libraries not yet compatible.
OK. I'm not really up to speed on AHK v2 syntax yet since I've been waiting for it to be officially released. It doesn't seem like it's close to happening, so I guess now is as good a time as any to jump in.
Alguimist wrote: More details: tray menu "Exit" icon uses an icon index which is not the same across Windows versions, which may cause the incorrect icon to be loaded or an error message to be displayed if the icon index goes beyond the valid range. Add the icon to the Icons folder or load it from its resource ID.
I didn't realize that. I'll add the icon to the Icons folder.
Alguimist wrote: It should also be noted that font can be applied to all controls in the preview window at once, generating a single line in the output code, as long as the Font Dialog has the preview window as target.
Ah, I wasn't aware of that. That's useful to know. It seems that the "Fontalyzer" functionality is still useful in cases where a font applies to many but not all controls, though.
Alguimist wrote: I'm now planning to make AutoGUI able to generate GUI code for other programming languages, all of which relying on absolute values, so I must adhere to some generic guidelines in the process of adapting AutoGUI to conform to this plan. It doesn't mean that the properties dialog, specific for AHK, could not be preserved, though, where options for relative coordinates may be implemented.
Looking forward to seeing that. And if you end up adding options for relative coordinates directly into AutoGUI, I'm sure many including myself would find that valuable.

Thanks again for the input! :D
User avatar
haichen
Posts: 484
Joined: 09 Feb 2014, 08:24

Re: Relativity - Add relative positioning to controls in GUIs created by AutoGUI's GUI designer

07 Apr 2020, 11:04

Alguimist wrote:
07 Apr 2020, 09:42
I'm now planning to make AutoGUI able to generate GUI code for other programming languages.
Very interesting. Do you plan to support Powershell?
User avatar
Alguimist
Posts: 369
Joined: 05 Oct 2015, 16:41
Contact:

Re: Relativity - Add relative positioning to controls in GUIs created by AutoGUI's GUI designer

27 Apr 2020, 09:57

@boiler
"Do you think it is adequate with just the tooltips, especially if they pop up faster?"
Sorry, I didn't notice the tooltips. I don't know what is the proper guideline in this respect, so leave as it is.

@haichen
"Do you plan to support Powershell?"
I have not tested GUIs in PowerShell yet, I will check it out later. The other programming languages that I am considering to implement as generated code are: C (pure Win32 GUI and RC) and Pascal.
User avatar
boiler
Posts: 5557
Joined: 21 Dec 2014, 02:44

Re: Relativity - Add relative positioning to controls in GUIs created by AutoGUI's GUI designer

26 May 2020, 19:26

The first post has been updated with version 1.2 including the following changes, several as suggested by Alguimist:

- Added new Open File feature
- Welcome screen display now a selectable option
- Optionally remembers window position
- Added menu with File, Script, Options, Help
- Save As/Save always active allowing simple reordering to be saved
- Uses all local icons instead of calling them from the Windows files
- Button ribbon updated/improved

Regarding support for AHK v2 output, that is a planned future update.

Return to “AutoGUI”

Who is online

Users browsing this forum: No registered users and 3 guests