AutoGUI - Script Editor, GUI Designer, Debugger and Tools

Old Topics related to the original "AutoGUI" ahk script editor.
User avatar
Alguimist
Posts: 428
Joined: 05 Oct 2015, 16:41
Contact:

Re: AutoGUI - GUI Designer and Script Editor

26 Apr 2017, 19:38

New tool added in version 1.4.1: COM Inspector - information about COM classes. Based on CLSID Registry Scanner and iTypeInfo.

:arrow: Download
Asmodeus
Posts: 57
Joined: 19 Oct 2015, 15:53

Re: AutoGUI - GUI Designer and Script Editor

28 Apr 2017, 13:13

Alguimist wrote:Thanks for your suggestions, Asmodeus. The keyboard shortcut to duplicate a line is Ctrl + Down arrow.
1. imo the shortcut ctrl+down is expected to move a line down as ctrl+up moves a line up.
hence, please consider changing the shortcut to ctrl + d as this is used by many (most?) editors like eg Scite4AHK, Notepad++, AHK-Studio...

2. also please add a cheat sheet for all shortcuts in the help menu.

3. found a small bug in the comment/uncomment implementation:
- add some lines of code
- set the cursor at the start (^Pos)
- press ^a
- press ^k
-> cursor moved to the end
Asmodeus
Posts: 57
Joined: 19 Oct 2015, 15:53

Re: AutoGUI - GUI Designer and Script Editor

28 Apr 2017, 13:51

Rorqual wrote:I added code folding to the autogui editor[/code]
I guess I found a bug:

Code: Select all

d::
   SendInput Hello you.{Return}
Return
Image

update:
turns out I've mixed up Return with Enter :lolno:
in this case Return seems to work as an Enter surrogate :lol:
Image

not sure whether AHK should check and bring up an error message when running {Return} ?
maybe some pro is willing to give some insight on this?

besides a (potential) AHK issue, folding in AutoGUI seems incorrect when using curly brackets:
Image
User avatar
Alguimist
Posts: 428
Joined: 05 Oct 2015, 16:41
Contact:

Re: AutoGUI - GUI Designer and Script Editor

30 Apr 2017, 01:49

It is a bug in the Scintilla lexer. I'll check it out later.
User avatar
Alguimist
Posts: 428
Joined: 05 Oct 2015, 16:41
Contact:

Re: AutoGUI - GUI Designer and Script Editor

26 May 2017, 12:57

Versions 1.4.2 and 1.4.3: new tools: Size Checker and Structor.

Version 1.4.7:
- x64 compatibility. Running AutoGUI with AHK 64-bit no longer redirects execution to AHK 32-bit.
- Tabs can be rearranged by drag and drop.
- New toolbar library.

:arrow: Download
User avatar
TheDewd
Posts: 1507
Joined: 19 Dec 2013, 11:16
Location: USA

Re: AutoGUI - GUI Designer and Script Editor

30 May 2017, 14:35

Can we get a tutorial on how to use Structor?
Asmodeus
Posts: 57
Joined: 19 Oct 2015, 15:53

Re: AutoGUI - GUI Designer and Script Editor

30 May 2017, 17:49

cloning freecom leads to error to many status bar, cloning proc ex leads to submenu does not exist.
Image
Image

create new file, then save and save as won't work for me, dialog does not appear.
after opening an existing file save /save as works as expected.
this issues has been introduced already a couple of versions ago.
or is it only me having this issue?

update: save as issue is solved using latest AHK version :roll:
User avatar
Alguimist
Posts: 428
Joined: 05 Oct 2015, 16:41
Contact:

Re: AutoGUI - GUI Designer and Script Editor

03 Jun 2017, 18:34

TheDewd wrote:Can we get a tutorial on how to use Structor?
All you need to know is how to configure the compiler path and batch files for 32 and 64-bit. Going to Settings > Help, you can see some examples. If you have the Windows SDK or Visual Studio, the compiler path is the path to CL.EXE. The batch files are vcvars32.bat and vcvars64.bat or vcvarsx86_amd64.bat.

Usage example: recently I needed to make the Scintilla library compatible with x64. For that I added the path to Scintilla.h to the list of includes and then pasted the declaration of the SCNotification structure in Structor.
Asmodeus wrote:cloning proc ex leads to submenu does not exist.
The Users menu of Process Explorer is created when the menu is activated.
User avatar
derz00
Posts: 497
Joined: 02 Feb 2016, 17:54
Location: Middle of the round cube
Contact:

Re: AutoGUI - GUI Designer and Script Editor

14 Jun 2017, 10:58

Hi Alguimist,

I'm am new to AutoGUI, and need a little help.

Is there a way to refresh the child design window when you have edited the text? I thought "Repaint" does that, but now it doesn't cooperate for me. I am sure I'm just missing something. This would be really nice if it would work...

Thanks,
derz00
try it and see
...
User avatar
Alguimist
Posts: 428
Joined: 05 Oct 2015, 16:41
Contact:

Re: AutoGUI - GUI Designer and Script Editor

16 Jun 2017, 00:07

derz00, if you want to edit the generated code while the GUI has not been finished, right click the tab and select "Duplicate Tab Contents".
User avatar
Tomer
Posts: 366
Joined: 21 Aug 2016, 05:11

Re: AutoGUI - GUI Designer and Script Editor

22 Jun 2017, 06:23

any chance to have ctrl+z to undoes all recent actions in the window clone ?
like in word, notepad etc

will be really useful
User avatar
Alguimist
Posts: 428
Joined: 05 Oct 2015, 16:41
Contact:

Re: AutoGUI - GUI Designer and Script Editor

24 Jun 2017, 05:02

There's no undo for the GUI designer yet, but (as a workaround) you can undo in the script editor and then re-clone the GUI.
User avatar
Tomer
Posts: 366
Joined: 21 Aug 2016, 05:11

Re: AutoGUI - GUI Designer and Script Editor

25 Jun 2017, 10:13

Alguimist wrote:There's no undo for the GUI designer yet, but (as a workaround) you can undo in the script editor and then re-clone the GUI.
how i make re-clone ?
User avatar
Alguimist
Posts: 428
Joined: 05 Oct 2015, 16:41
Contact:

Re: AutoGUI - GUI Designer and Script Editor

25 Jun 2017, 15:46

Run the script. Its title will appear in the list of the Cloning Tool.
Redpr0star
Posts: 8
Joined: 28 Jun 2017, 20:23

Re: AutoGUI - GUI Designer and Script Editor

29 Jun 2017, 13:52

can you make it so that it is not a 7-Zip file
User avatar
Maasq
Posts: 10
Joined: 09 Jun 2017, 14:36
Contact:

Re: AutoGUI - GUI Designer and Script Editor

31 Jul 2017, 12:39

Hi Alguimist

Is it possible to have toolbars running in different windows? I have my main GUI, and then a child GUI launches when I press a button. I'd like this window to have its own toolbar.

Thanks

Maasq
Maasq
Author of Engineer Suite (Written in AHK)
www.masq.net
User avatar
Alguimist
Posts: 428
Joined: 05 Oct 2015, 16:41
Contact:

Re: AutoGUI - GUI Designer and Script Editor

31 Jul 2017, 18:15

Redpr0star wrote:can you make it so that it is not a 7-Zip file
Any reason for that?
Maasq wrote:Is it possible to have toolbars running in different windows? I have my main GUI, and then a child GUI launches when I press a button. I'd like this window to have its own toolbar.
See this example:

Code: Select all

#NoEnv
#SingleInstance Force
SetWorkingDir %A_ScriptDir%
SetBatchLines -1

;#Include %A_ScriptDir%\Toolbar.ahk

Gui Show, w481 h381, Main Window

hMainToolbar := CreateToolBar()
Return

GuiEscape:
GuiClose:
    ExitApp

CreateToolbar() {
    ImageList := IL_Create(1)
    IL_Add(ImageList, "shell32.dll", 3)

    Buttons = 
    (LTrim
        New Window,,, SHOWTEXT
    )

    Return ToolbarCreate("OnToolbar", Buttons, ImageList, "Flat List Tooltips")
}

OnToolbar(hWnd, Event, Text, Pos, Id) {
    If (Event != "Click") {
        Return
    }

    If (Text == "New Window") {
        GoSub NewWindow
    }
}

NewWindow:
    Gui NewGUI: New, +LabelNewGUI
    Gui Show, w383 h252, New Window

    ImageList := IL_Create(1)
    IL_Add(ImageList, "shell32.dll", 4)

    Buttons = 
    (LTrim
        Open
    )

    hNewToolbar := ToolbarCreate("OnToolbar2", Buttons, ImageList, "Flat List Tooltips")
Return

NewGUIEscape:
NewGUIClose:
    Gui NewGUI: Destroy
Return

OnToolbar2(hWnd, Event, Text, Pos, Id) {
    If (Event != "Click") {
        Return
    }

    If (Text == "Open") {
        MsgBox
    }
}

; Toolbar.ahk
ToolbarCreate(Handler, Buttons, ImageList := "", Options := "Flat List ToolTips", Pos := "") {
    Static TOOLTIPS := 0x100, WRAPABLE := 0x200, FLAT := 0x800, LIST := 0x1000, TABSTOP := 0x10000,  BORDER := 0x800000, TEXTONLY := 0
    Static BOTTOM := 0x3, ADJUSTABLE := 0x20, NODIVIDER := 0x40, VERTICAL := 0x80
    Static CHECKED := 1, HIDDEN := 8, WRAP := 32, DISABLED := 0 ; States
    Static CHECK := 2, CHECKGROUP := 6, DROPDOWN := 8, AUTOSIZE := 16, NOPREFIX := 32, SHOWTEXT := 64, WHOLEDROPDOWN := 128 ; Styles

    StrReplace(Options, "SHOWTEXT", "", fShowText, 1)
    fTextOnly := InStr(Options, "TEXTONLY")

    Styles := 0
    Loop Parse, Options, %A_Tab%%A_Space%, %A_Tab%%A_Space% ; Parse toolbar styles
        IfEqual A_LoopField,, Continue
        Else Styles |= A_LoopField + 0 ? A_LoopField : %A_LoopField%

    If (Pos != "") {
        Styles |= 0x4C ; CCS_NORESIZE | CCS_NOPARENTALIGN | CCS_NODIVIDER
    }

    Gui Add, Custom, ClassToolbarWindow32 hWndhWnd g@ToolbarHandler -Tabstop %Pos% %Styles%
    @ToolbarStorage(hWnd, Handler)

    TBBUTTON_Size := A_PtrSize == 8 ? 32 : 20
    Buttons := StrSplit(Buttons, "`n")
    cButtons := Buttons.Length()
    VarSetCapacity(TBBUTTONS, TBBUTTON_Size * cButtons , 0)

    Index := 0
    Loop %cButtons% {
        Button := StrSplit(Buttons[A_Index], ",", " `t")

        If (Button[1] == "-") {
            iBitmap := 0
            idCommand := 0
            fsState := 0
            fsStyle := 1 ; BTNS_SEP
            iString := -1
        } Else {
            Index++
            iBitmap := (fTextOnly) ? -1 : (Button[2] != "" ? Button[2] - 1 : Index - 1)
            idCommand := (Button[5]) ? Button[5] : 10000 + Index

            fsState := InStr(Button[3], "DISABLED") ? 0 : 4 ; TBSTATE_ENABLED
            Loop Parse, % Button[3], %A_Tab%%A_Space%, %A_Tab%%A_Space% ; Parse button states
                IfEqual A_LoopField,, Continue
                Else fsState |= %A_LoopField%

            fsStyle := fTextOnly || fShowText ? SHOWTEXT : 0
            Loop Parse, % Button[4], %A_Tab%%A_Space%, %A_Tab%%A_Space% ; Parse button styles
                IfEqual A_LoopField,, Continue
                Else fsStyle |= %A_LoopField%

            iString := &(ButtonText%Index% := Button[1])
        }

        Offset := (A_Index - 1) * TBBUTTON_Size
        NumPut(iBitmap, TBBUTTONS, Offset, "Int")
        NumPut(idCommand, TBBUTTONS, Offset + 4, "Int")
        NumPut(fsState, TBBUTTONS, Offset + 8, "UChar")
        NumPut(fsStyle, TBBUTTONS, Offset + 9, "UChar")
        NumPut(iString, TBBUTTONS, Offset + (A_PtrSize == 8 ? 24 : 16), "Ptr")
    }

    ExtendedStyle := 0x89 ; (mixed buttons, draw DD arrows, double buffer)
    SendMessage 0x454, 0, %ExtendedStyle%,, ahk_id %hWnd% ; TB_SETEXTENDEDSTYLE
    SendMessage 0x430, 0, %ImageList%,, ahk_id %hWnd% ; TB_SETIMAGELIST
    SendMessage % A_IsUnicode ? 0x444 : 0x414, %cButtons%, % &TBBUTTONS,, ahk_id %hWnd% ; TB_ADDBUTTONS

    If (InStr(Options, "VERTICAL")) {
        VarSetCapacity(SIZE, 8, 0)
        SendMessage 0x453, 0, &SIZE,, ahk_id %hWnd% ; TB_GETMAXSIZE
    } Else {
        SendMessage 0x421, 0, 0,, ahk_id %hWnd% ;TB_AUTOSIZE
    }

    Return hWnd
}

@ToolbarStorage(hWnd, Callback := "") {
    Static o := {}
    Return (o[hWnd] != "") ? o[hWnd] : o[hWnd] := Callback
}

@ToolbarHandler(hWnd) {
    Static n := {-2: "Click", -5: "RightClick", -20: "LDown", -713: "Hot", -710: "DropDown"}

    Handler := @ToolbarStorage(hWnd)

    Code := NumGet(A_EventInfo + 0, A_PtrSize * 2, "Int")

    If (Code != -713) {
        ButtonId := NumGet(A_EventInfo + (3 * A_PtrSize))
    } Else {
        ButtonId := NumGet(A_EventInfo, A_PtrSize == 8 ? 28 : 16, "Int") ; NMTBHOTITEM idNew
    }

    SendMessage 0x419, ButtonId,,, ahk_id %hWnd% ; TB_COMMANDTOINDEX
    Pos := ErrorLevel + 1

    VarSetCapacity(Text, 128)
    SendMessage % A_IsUnicode ? 0x44B : 0x42D, ButtonId, &Text,, ahk_id %hWnd% ; TB_GETBUTTONTEXT

    Event := (n[Code] != "") ? n[Code] : Code

    %Handler%(hWnd, Event, Text, Pos, ButtonId)
}
User avatar
Maasq
Posts: 10
Joined: 09 Jun 2017, 14:36
Contact:

Re: AutoGUI - GUI Designer and Script Editor

01 Aug 2017, 05:11

Thanks for the reply, Alguimist. I poked around in the code and I concluded I'd need 2 functions to do it - nice to see I was right, even if my version was far less elegant!

Thanks for the quick response :)
Maasq
Author of Engineer Suite (Written in AHK)
www.masq.net
Asmodeus
Posts: 57
Joined: 19 Oct 2015, 15:53

Re: AutoGUI - GUI Designer and Script Editor

02 Aug 2017, 17:46

; *********************************************************************** OPEN ISSUES ****************************************************************************************************

[*] code folding issue with {}, mentioned already though I thought I put it here for the sake of clarity (bug)
Image

Select All should be greyed out in an empty document
Image

there seems to be an Syntax highlighting issue when putting a colon in front:
Image

in AutoGUI some (many?) commands' parameter do not show up as above (bug):
Image

there seems to be an issue with hotstrings, for instance this simple code
Spoiler
ctrl+q
Image
ctrl+r
Image

there seems to be an issue with curly brackets where the Open dialog or go to dialog may be invoked
Image

issue with syntax highlighting {return} correctly, details see here:
https://autohotkey.com/boards/viewtopic ... 52#p165052
there seems to be more coloring issues, eg CRLF should be of the same color as well as posx & posy
Image

Various Tools (ErrorView, Script Manager, Constantine) won't start if AHK has not been installed (portable mode).
Image

to reproduce configure the tool to run like this:
Image
i figured out adding %A_ScriptDir% seems to solve the issue
Change #Include ..\Lib\AutoXYWH.ahk to #Include %A_ScriptDir%\..\Lib\AutoXYWH.ahk

there seems to be an issue with replace all
Image
i re-checked there is def. an issue with replace all. replace should work no matter where the cursor is:
Image

a small bug in the comment/uncomment implementation:
- add some lines of code
- set the cursor at the start (^Pos)
- press ^a
- press ^k
-> cursor moved to the end
; ************************************************************************ WISH LIST ****************************************************************************************************
please add highlighting parameters like shown here (feature request):
Image

thanks for adding drag & drop functionality. please consider adding a visual feed-back (feature request):
Image

dual monitor support (feature request)
eg. open notepad, drag it to the second monitor, type some chars then close the app.
The message "Do you want to save changes?" will be displayed on the second monitor where the main window lives.
in AutoGUI messages are always on the first (main) monitor. to reproduce, drag the AutoGUI to a second monitor, then display a message box
(the messagebox will appear on a different screen, unlike NotePad).

preselect return in autocomplete code window (reason: return is probably one of the most used commands) when typing ret rather than retry like in SciTe to save some time (feature request)
Image

optionally filter commands by matching anywhere (auto-complete). box eg. shows IfMsgBox, InputBox & MsgBox like here. (feature request)
Image

please add an option to hide the toolbar/statusbar. i use the program most times in editor mode via shortcuts, hidding the toolbar/statusbar would often come handy.
Image

inconsistency: as ctrl+up moves a line up ctrl+down is expected to move a line down instead it duplicates the line. hence, please consider changing the shortcut to ctrl + d as this is used by many (most?) editors like eg Scite4AHK, Notepad++, AHK-Studio...
; *********************************************************************** NICE2HAVE ****************************************************************************************************
[*] auto load/save session
[*] Themes
[*] Update Check
[*] Gui design without need to import gui
[*] cheat sheet for all shortcuts (according to old release notes there was sth implemented when pressing F1, F1 opens help file atm)
[*] quick filter field in status bar. sometimes it's faster to filter rather than searching.
[*] wildcard support
Image
; ************************************************************************* FIXED / IMPLEMENTED **************************************************************************************
if parameter starts with quotation marks, they get deleted [added in 1.4.9]
Spoiler
windows properties issue [fixed in 1.4.9]
Spoiler
Error when Cancelling: move open script file, [fixed in 1.4.9]
Spoiler
Portable Mode [added in 1.4.9]
Spoiler
[*] show number of selected chars in status bar [added in 1.4.9]
Last edited by Asmodeus on 30 Aug 2017, 11:48, edited 22 times in total.
mel152

Re: AutoGUI - GUI Designer and Script Editor

03 Aug 2017, 08:21

I have downloaded, but how do i install it please?

Return to “Old Topics”

Who is online

Users browsing this forum: No registered users and 4 guests