AutoGUI - Script Editor, GUI Designer, Debugger and Tools

Old Topics related to the original "AutoGUI" ahk script editor.
MANKIND

Re: AutoGUI - Script Editor and GUI Designer

22 Jul 2018, 05:02

Is it possible to set breakpoint on some data condition ?
Let`s say, stop after current command if variableXY is changed.
Or, stop after current command if variableXY is ... (=x || <x || ...).

Is it possible to set group of user variables to show in the variables window ?

Is there any information for AUTOGUI development/plan/to-do-list/... ?
kiwichick
Posts: 189
Joined: 21 Jan 2014, 22:03

Re: AutoGUI - Script Editor and GUI Designer

22 Jul 2018, 20:41

burque505 wrote:You can do it. Start your script.
(Using AutoGui 2.2.0, should work with other versions)
File -> Import Gui -> Clone window. You'll see a window where it says "Activate the target window and click the "Clone" button".
Choose your script, click "Activate", click "Clone". You'll see a clone of your script on top of the AutoGui window (look at the caption). Now you can edit the layout. If you click into the AutoGui window, you can choose the View menu item and switch back and forth between "Editor" and "Design".
Regards,
burque505
Hi there, I still have trouble with the Import feature regardless of whether I choose Clone or Parse.

1. The import doesn't include all the code that's in the script.
For example:
I set the Font for a control using Properties and save the script. When opened in a text editor, the ahk file includes the font code but when imported into AutoGUI it's missing.

2. Sometimes when I save what I've created, the saved script doesn't contain all the code.
For example:
I set a gLabel for a control using Properties, add target code for the label (below 'do not edit above this line') and save the script. When opened in a text editor the target code is missing and, obviously, the script won't run because the label doesn't have a target.

How does this happen? Or am I doing something wrong? Cheers.
User avatar
Alguimist
Posts: 428
Joined: 05 Oct 2015, 16:41
Contact:

Re: AutoGUI - Script Editor and GUI Designer

23 Jul 2018, 01:59

MANKIND wrote:Is it possible to set breakpoint on some data condition ?
Conditional and watch breakpoint types are not supported.
MANKIND wrote:Is it possible to set group of user variables to show in the variables window ?
It can be done using a regular expression. For example, if you want to show only the variables "a" and "b", enter the following in the search field: "^(a|b)$".
MANKIND wrote:Is there any information for AUTOGUI development/plan/to-do-list/... ?
Some of the features planned for AutoGUI are: theme customization and context-aware autocompletion. Currently I'm redesigning the properties dialog. After that, I will continue working on a AHK-WinAPI HTML table.
kiwichick wrote:The target code is missing...
AutoGUI doesn't strip any portion of the code when saving. To avoid the confusion with the delimiter, I'm considering to remove it and make the generated code read-only. Then, when an attempt is made to modify the generated code, a message box asks if the user wants to leave the designer, if the GUI has been finished. Another way to modify the generated code is to right-click the tab and select "Duplicate Tab Contents". This opens a new tab with the contents of the current tab, which is not associated with the GUI designer. By making the generated code read-only, AutoGUI will be able to generate more content. Pre-defined snippets of code, for example.
MANKIND

Re: AutoGUI - Script Editor and GUI Designer

23 Jul 2018, 07:50

Alguimist wrote: Conditional and watch breakpoint types are not supported.
Why is it so?
Is it hard/... to include that in your/AutoHotkey debug implementation?
Or that doesn't fit well in your plans now?
In the other words, can we expect these in AUTOGUI in some/when future time?
User avatar
Alguimist
Posts: 428
Joined: 05 Oct 2015, 16:41
Contact:

Re: AutoGUI - Script Editor and GUI Designer

23 Jul 2018, 11:52

MANKIND wrote:Why is it so?
A watch could be improvised by making all execution pass through the debugger break function, where the value of the watched variable is compared with the previously stored value. And then set a breakpoint in the next line. A conditional breakpoint, on the other hand, requires some coding.

Code: Select all

e := "2 > 3 || 4 < 7 || 2 == 3 || 0 || 3 <= 4"

o := StrSplit(e, "||", " ")

For Each, Item in o {
    If (Evaluate(Item)) {
        MsgBox %Item% is true.
    } Else {
        MsgBox %Item% is false.
    }
}

Evaluate(Expression) {
    v := StrSplit(Expression, " ")
    op := v[2]

    If (op == ">") {
        Return (v[1] > v[3])
    } Else If (op == "<") {
        Return (v[1] < v[3])
    } Else If (op == "==") {
        Return (v[1] == v[3])
    } Else If (op == "!=") {
        Return (v[1] != v[3])
    } Else If (op == "<=") {
        Return (v[1] <= v[3])
    } Else If (op == ">=") {
        Return (v[1] >= v[3])
    } Else If (op == "") {
        Return v[1]
    } Else {
        ; ...
    }
}
I will do some tests later and see if it works. ;)
MANKIND

Re: AutoGUI - Script Editor and GUI Designer

24 Jul 2018, 01:18

It sounds interesting.
Conditional and watch breakpoint types
would greatly increase debugging power of AUTOGUI.
User avatar
joedf
Posts: 9097
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

Re: AutoGUI - Script Editor and GUI Designer

24 Jul 2018, 08:50

+1 Breakpoints
Image Image Image Image Image
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]
autocart
Posts: 218
Joined: 12 May 2014, 07:42

Re: AutoGUI - GUI Designer and Script Editor

03 Aug 2018, 15:11

Hello Alguimist,

As Asmodeus pointed out already here: https://autohotkey.com/boards/viewtopic ... 66#p163066
Asmodeus wrote:; *********************************************************************** OPEN ISSUES ****************************************************************************************************
...
i re-checked there is def. an issue with replace all. replace should work no matter where the cursor is:
Image
...
there is an issue with replace all.

I am really happy with AutoGUI existing. Thx a lot for that!!!!
Still, it really needs to live a bit more up to its potential. AHK has quite a number of Editors and IDEs but none of them is *really* good. AutoGUI IMHO is the best of all that I tried but, as mentioned, also falls a few steps short. Therefore my feedback is meant as some form of friendly help to improve AutoGUI. Thx for listening.

Regards, S.
User avatar
Alguimist
Posts: 428
Joined: 05 Oct 2015, 16:41
Contact:

Re: AutoGUI - Script Editor and GUI Designer

03 Aug 2018, 19:28

Thank you! Your feedback is much appreciated.
autocart wrote:As Asmodeus pointed out already...
What is lacking in the Find/Replace dialog is a group box with the options "From cursor" and "Entire scope", as well as the option "Wrap around". I will start to work on it as soon as I finish some changes in progress.
autocart
Posts: 218
Joined: 12 May 2014, 07:42

Re: AutoGUI - Script Editor and GUI Designer

03 Aug 2018, 19:58

Ok, thx, Alguimist!
The problem with the behaviour right now is that it opens up doors for really bad code mess up. This makes this one a really dangerous editor, if "replace all" only replaces text after or below the caret (by default and without warning), apart from the inconvenience.
Therefore, if implementing these options into the dialog might take a considerable amount of time, may I suggest to "quickly" change the default behaviour either to "entire scope" or "wrap around", which should result in the same end result for the "replace all" operation, right?
Regards, and have a good day, S.
User avatar
Alguimist
Posts: 428
Joined: 05 Oct 2015, 16:41
Contact:

Re: AutoGUI - Script Editor, GUI Designer, Debugger and Tools

03 Aug 2018, 20:40

Some text editors also do Replace All from current position. But if you want to change this behavior, change the following lines in FindReplace.ahk:

Code: Select all

314: StartPos := StrLen(TempText) + 1
   > StartPos := 1

344: Sci[n].SetTargetStart(Sci[n].GetCurrentPos())
   > Sci[n].SetTargetStart(0)
autocart
Posts: 218
Joined: 12 May 2014, 07:42

Re: AutoGUI - Script Editor, GUI Designer, Debugger and Tools

03 Aug 2018, 21:57

Thank you, that's what I needed!
Nice acceptable workaround that purrs like a kitten!
THANK'S A LOT for this quick helpful support!
autocart
Posts: 218
Joined: 12 May 2014, 07:42

Re: AutoGUI - Script Editor, GUI Designer, Debugger and Tools

03 Aug 2018, 22:09

another question:
It seems that I can not change the keyboard-shortcuts in the GUI.
Can I change them in the code somewhere?
User avatar
kczx3
Posts: 1677
Joined: 06 Oct 2015, 21:39

Re: AutoGUI - Script Editor, GUI Designer, Debugger and Tools

04 Aug 2018, 05:49

A way to change them would be handy
User avatar
Alguimist
Posts: 428
Joined: 05 Oct 2015, 16:41
Contact:

Re: AutoGUI - Script Editor, GUI Designer, Debugger and Tools

04 Aug 2018, 11:07

The keyboard processing in AutoGUI is done through WM_KEYDOWN, WM_SYSKEYDOWN and SCN_CHARADDED.

The keyboard shortcuts follow the standards, except in a few cases.

What keyboard shortcuts would you like to change? You can write a script with hotkeys to send keys or activate menu items.

Example:

Code: Select all

#IfWinActive AutoGUI v
^E:: WinMenuSelectItem A,, Tools, Expressive
I'm currently in doubt about some keyboard shortcuts:
- The "Script" tab in GUI Properties (F10), where you can see only a few directives, and they only apply to the code generated by the GUI designer, was moved to a separate script, where almost all directives and commands of AHK that comprise the preamble of a script are available and can be applied to any tab. What should be the shortcut for this window? Ctrl+D (Script Directives), Ctrl+P (Script Properties)? Some other key combination?
- F10 is in use by GUI Properties. I'm planning to eventually implement "Compile and Run", and set F10 to it (or maybe Ctrl+F9, since "Run Selected Text" is rarely used). And then move GUI Properties to F11. The functionality of F11 (Show/Hide preview window) would then be moved to F12 or Shift+F12.
autocart
Posts: 218
Joined: 12 May 2014, 07:42

Re: AutoGUI - Script Editor, GUI Designer, Debugger and Tools

04 Aug 2018, 11:16

Alguimist wrote:You can write a script with hotkeys to send keys or activate menu items.

Example:

Code: Select all

#IfWinActive AutoGUI v
^E:: WinMenuSelectItem A,, Tools, Expressive
Seems good enough for me atm. Thx very much! Can't say much about the rest. Must play with the Software a bit more.
User avatar
kczx3
Posts: 1677
Joined: 06 Oct 2015, 21:39

Re: AutoGUI - Script Editor, GUI Designer, Debugger and Tools

04 Aug 2018, 12:58

I’m more interested in changing the hotkeys for the code editor itself. To match those of Visual Studio Code
User avatar
Alguimist
Posts: 428
Joined: 05 Oct 2015, 16:41
Contact:

Re: AutoGUI - Script Editor, GUI Designer, Debugger and Tools

05 Aug 2018, 16:48

kczx3 wrote:I’m more interested in changing the hotkeys for the code editor itself.
Which hotkeys?
User avatar
kczx3
Posts: 1677
Joined: 06 Oct 2015, 21:39

Re: AutoGUI - Script Editor, GUI Designer, Debugger and Tools

05 Aug 2018, 19:04

I’m not sure it matters which ones specifically. Don’t want you changing it for everybody. If it bothered me enough I’d look at changing them in code myself. But as an example, most modern browsers use Ctrl + / to toggle a line comment.
User avatar
SL5
Posts: 878
Joined: 12 May 2015, 02:10
Contact:

Re: AutoGUI or AHK-Studio

28 Sep 2018, 07:07

kczx3 wrote:I’m not sure it matters which ones specifically. Don’t want you changing it for everybody. If it bothered me enough I’d look at changing them in code myself. But as an example, most modern browsers use Ctrl + / to toggle a line comment.
I’m also interested in changing the hotkeys for the code editor itself.
for e.g. i use about 10 editors the use ^d for duplicate line.
BTW in AHK-Studio every hotkeys is reconfigurable. BTW also in ida,phpstorm,resharper,webstorm all hotkeys are reconfigurable.
BTW too all otthers who know also AHK-Studio. what you like more? thats my fist time i try AutoGUI

Return to “Old Topics”

Who is online

Users browsing this forum: No registered users and 0 guests