AutoGUI - Script Editor, GUI Designer, Debugger and Tools

Script editor, GUI designer, debugger and tools for AutoHotkey
0sync0
Posts: 46
Joined: 05 Aug 2016, 13:57

Re: AutoGUI - GUI Designer and Script Editor

14 Nov 2016, 19:07

Alguimist wrote:In order to import the GUI elements from a script, use the Window Cloning Tool.
Even if the script was created by AutoGUI and hasn't been modified?
Asmodeus
Posts: 57
Joined: 19 Oct 2015, 15:53

Re: AutoGUI - GUI Designer and Script Editor

15 Nov 2016, 17:00

add a text box, enter something like 5,4, then double click, OK, and so forth
each time a "`" is added:
Image
User avatar
Drugwash
Posts: 737
Joined: 29 May 2014, 21:07
Location: Ploieşti, Romania

Re: AutoGUI - GUI Designer and Script Editor

17 Nov 2016, 07:19

Today I had some spare time so I checked this script, not in a thorough manner but only a few bits of it. Environment: XP-SP3, AHK 1.1.24.02 Unicode 32bit. Below are some considerations that may be useful for the future development.

- Separator should have an option for Horizontal or Vertical. Currently 0x11 (vertical separator) does not even exist in the list of control styles.
- Alternatively (or additionally) a Rotate option would be useful (and maybe not only for Separators but also Sliders, Progressbars, Pictures, Buttons, Text, UpDown spinners)
- When Separator is selected in window the move/resize rectangle should only allow the control to be resized according to its type (horizontally or vertically), not in both directions
- A possibly useful option for separators could be 'Full width' or 'Full height' when placed freely in window and maybe 'Full width inside' or 'Full height inside' when placed inside a GroupBox / Tab / Edit / Text control
- Statusbar should not be allowed any move/resize
- Another possibly useful option would be for the Test window to keep its current position when launched again while it's already open, overriding any explicit window position declared in the script (when fine-tuning controls' size/position it's a pain to move the test window out of the way for every adjustment)
- Alternatively (or additionally) update the Test window in real time after each change in the working window

- Have the About window link point to autohotkey.com instead of old ahkscript.org and maybe the logo or title point directly to this script's topic

- Bug: when left-click is down on a control as per moving and simultaneously right-click is performed bringing up the context menu, releasing both mouse buttons and then clicking outside the menu to dismiss it moves the selected control to the cursor position although no drag was performed by the user
- Bug: (related to higher above) when statusbar is moved/resized and then working window is resized, the sizing rectangle of the status bar remains in its old position until clicked inside or outside it (there should be no sizing rectangle for statusbar as said above)
- Controls that contain text with commas get the escape character multiplied on each edit operation (has been reported before for Text controls but happens in ComboBoxes too and most likely others)
- Bug: although a design window has been closed together with its tab and other tab (say a Sample script) has been opened, selecting 'Show/Hide Preview Window' in toolbar will always bring up the old deleted tab/script's window instead of the currently selected tab's

- Limitation: When changing Slider / Progressbar / UpDown control from horizontal to vertical or the other way around (and also their other options), the actual control does not change in the working window, nor do its dimensions (swap width for height); that can be overcome by destroying and recreating the working window

Otherwise it's a good script, looks nice. Congratulations and keep up the good work! :)
I've deleted my CloudMe account because of GDPR - the now legal base for privacy invasion and data theft.
User avatar
Alguimist
Posts: 347
Joined: 05 Oct 2015, 16:41
Contact:

Re: AutoGUI - GUI Designer and Script Editor

18 Nov 2016, 15:32

@Asmodeus and @Drugwash: commas will not be escaped in the control text, only in the window title. Some other characters will be escaped/unescaped when necessary.
Drugwash wrote:... keep its current position when launched again...
Go to Properties, Window tab, and uncheck "Center on Screen" (this option omits the x and y coordinates). Move the preview window to the desired location and hit Apply in Properties.
Drugwash wrote:When changing Slider / Progressbar / UpDown control from horizontal to vertical or the other way around (and also their other options), the actual control does not change in the working window, nor do its dimensions (swap width for height); that can be overcome by destroying and recreating the working window
Some styles cannot be applied without recreating the control, but this is not the case. The plus sign is missing in front of the option, which also needs to be removed when the option is unset. This issue will be fixed in the next release.

Thank you.
User avatar
Alguimist
Posts: 347
Joined: 05 Oct 2015, 16:41
Contact:

Re: AutoGUI - GUI Designer and Script Editor

18 Nov 2016, 19:23

Fixed a bug in the RegEx tool. Save as Expressive.ahk in AutoGUI\Tools.

Code: Select all

; Expressive - Regular Expression Tool

EnsureU32()

#NoEnv
#Warn All, Off
#SingleInstance Off
;#NoTrayIcon
SetWorkingDir %A_ScriptDir%
SetControlDelay -1
SetBatchLines -1

#Include %A_ScriptDir%\..\Lib\Scintilla.ahk
#Include %A_ScriptDir%\..\Lib\ControlColor.ahk

Global Version := "1.3"
, SciLexer := A_ScriptDir . "\..\SciLexer.dll"
, hMatchCount
, Groups := False
, Replace := False
, IconLib := A_ScriptDir . "\..\Icons\Expressive.icl"
, TT := {}

Menu Tray, Icon, %IconLib%, 1

Gui New, hWndhWindow -DPIScale

; "Regular Expression" section
Gui Font, s9 Bold, Segoe UI
Gui Add, Text, hWndhRegExHdr x10 y12 w710 h29 +0x200 +E0x200, %A_Space%Regular Expression
Gui Font
Gui Add, Picture, hWndhHelpIcon gShowHelp x697 y18 w16 h16 Icon4 BackgroundTrans, %IconLib%
Gui Font, s13, Lucida Console
Gui Add, Edit, vRegEx gSearch x10 y44 w709 h25 -VScroll
Gui Font

; Options
Gui Font, s8, MS Shell Dlg 2
If (A_ScreenDPI > 96) {
    Gui Add, CheckBox, vIgnoreCase gSetOption x12 y72 w90 h23, Ignore case
    Gui Add, CheckBox, vMultiline gSetOption xp+100 y72 w80 h23, Multiline
    Gui Add, CheckBox, vDOTALL gSetOption xp+90 y72 w80 h23, DOTALL
    Gui Add, CheckBox, vHighlightAll gSearch x580 y72 w140 h23 Checked, Highlight all matches
} Else {
    Gui Add, CheckBox, vIgnoreCase gSetOption x12 y72 w80 h23, Ignore case
    Gui Add, CheckBox, vMultiline gSetOption x100 y72 w60 h23, Multiline
    Gui Add, CheckBox, vDOTALL gSetOption x178 y72 w60 h23, DOTALL
    Gui Add, CheckBox, vHighlightAll gSearch x600 y72 w120 h23 Checked, Highlight all matches
}

; "Text" section
Gui Font, s9 Bold, Segoe UI
Gui Add, Text, hWndhTextHdr x10 y98 w710 h29 +0x200 +E0x200, %A_Space%Text
Gui Add, Text, hWndhMatchCount x612 y104 w100 h20 Right
Gui Font
Global Sci := New Scintilla
Sci.Add(hWindow, 10, 130, 710, 232, SciLexer)
Sci.SetLexer(SCLEX_CONTAINER)
Sci.SetCodePage(65001)
Sci.SetWrapMode(1)
Sci.SetMarginWidthN(0, 0)
Sci.SetMarginWidthN(1, 0)
Sci.StyleSetFont(SCE_AHKL_NEUTRAL, "Lucida Console")
Sci.StyleSetSize(SCE_AHKL_NEUTRAL, 10)
Sci.SetSelFore(1, 0xFFFFFF)
Sci.SetSelBack(1, 0x3399FF)
Sci.StyleSetBack(SCE_AHKL_USERDEFINED1, 0xABDFEE)
Sci.StyleSetFont(SCE_AHKL_USERDEFINED1, "Lucida Console")
Sci.StyleSetSize(SCE_AHKL_USERDEFINED1, 10)
;Sci.SetText("", "")
Sci.Notify := "OnNotify"

; "Groups" section
Gui Font, Bold, Segoe UI
Gui Add, Text, hWndhGroupsHdr gShowGroups x10 y368 w710 h29 +0x200 +E0x200, %A_Space%Groups
Gui Font
Gui Add, Picture, hWndhGroupsChevron x697 y374 w16 h16 Icon2 BackgroundTrans, %IconLib%
Global SciGroups := CreateScintilla(hWindow, 10, 282, 710, 115, SciLexer, "0x40010000")
SciGroups.SetReadOnly(True)

; "Replace" section
Gui Font, Bold, Segoe UI
Gui Add, Text, hWndhReplaceHdr gShowReplace x10 y403 w710 h29 +0x200 +E0x200, %A_Space%Replace
Gui Font
Gui Add, Picture, hWndhReplaceChevron x697 y409 w16 h16 Icon2 BackgroundTrans, %IconLib%
Gui Font, s13, Lucida Console
Gui Add, Edit, hWndhReplaceField vReplacement gReplace x10 y267 w709 h25 -VScroll Hidden
Gui Font
Global SciReplace := CreateScintilla(hWindow, 10, 297, 710, 100, SciLexer, "0x40010000")

Gui Add, Picture, hWndhCollapseChevron x-16 y0 w16 h16 Icon3 BackgroundTrans, %IconLib%

ControlColor(hRegExHdr,   hWindow, 0x336699, 0xFFFFFF)
ControlColor(hTextHdr,    hWindow, 0x336699, 0xFFFFFF)
ControlColor(hMatchCount, hWindow, 0x336699, 0xFFFFFF)
ControlColor(hGroupsHdr,  hWindow, 0xC0C0C0, 0xFFFFFF)
ControlColor(hReplaceHdr, hWindow, 0xC0C0C0, 0xFFFFFF)

Gui Show, w730 h441, Expressive - Regular Expression Tool

hSysMenu := DllCall("GetSystemMenu", "UInt", hWindow, "Int", False)
DllCall("AppendMenu", "UInt", hSysMenu, "UInt", 0x800, "UInt", 0, "Str", "")
DllCall("AppendMenu", "UInt", hSysMenu, "UInt", 1, "UInt", 0, "Str", "Version " . Version)

OnMessage(0x100, "OnWM_KEYDOWN")
OnMessage(0x200, "OnWM_MOUSEMOVE")

TT.IgnoreCase := "Case-insensitive matching. Letters match`ntheir lowercase/uppercase counterparts."
TT.Multiline  := "Beginning and end metacharacters (^ and $)`nmatch the beginning or the end of each line."
TT.DOTALL     := "Makes the ""."" (dot) metacharacter`nmatch anything including line breaks."

Return ; End of the auto-execute section

Search:
    Gui Submit, NoHide

    ; Clear old matches
    Sci.StartStyling(0, 0x1F)
    Sci.SetStyling(Sci.GetLength() + 1, SCE_AHKL_NEUTRAL)

    If (RegExMatch(RegEx, "^([\w``]*)i([\w``]*)\)")) {
        If (!IgnoreCase) {
            GuiControl,, IgnoreCase, 1
        }
    } Else If (IgnoreCase) {
        GuiControl,, IgnoreCase, 0
    }

    If (RegExMatch(RegEx, "^([\w``]*)m([\w``]*)\)")) {
        If (!Multiline) {
            GuiControl,, Multiline, 1
        }
    } Else If (Multiline) {
        GuiControl,, Multiline, 0
    }

    If (RegExMatch(RegEx, "^([\w``]*)s([\w``]*)\)")) {
        If (!DOTALL) {
            GuiControl,, DOTALL, 1
        }
    } Else If (DOTALL) {
        GuiControl,, DOTALL, 0
    }

    If (RegEx == "") {
        GuiControl,, %hMatchCount%, No Match
        SciGroups.SetReadOnly(False)
        SciGroups.ClearAll()
        SciGroups.SetReadOnly(True)
        Return
    }

    Sci.GetText(Sci.GetLength() + 1, SciText)
    Sci.GetText(Sci.GetLength() + 1, SciText)

    StartPos := 1
    Loop {
        FoundPos := RegExMatch(SciText, RegEx, Match, StartPos)
        If (Match == "") {
            HighlightAll := False
            Break
        }

        StartPos := FoundPos + 1

        Length := StrPut(SubStr(SciText, FoundPos, StrLen(Match)), "UTF-8") - 1
        FoundPos := StrPut(SubStr(SciText, 1, FoundPos - 1), "UTF-8") - 1
        Highlight(FoundPos, Length)
    } Until (!HighlightAll)

    UpdateCounter(SciText, RegEx)

    If (Groups) {
        GoSub UpdateGroups
    }

    If (Replace) {
        GoSub Replace
    }
Return

Highlight(Pos, Length) {
    Sci.StartStyling(Pos, 0x1F)
    Sci.SetStyling(Length, SCE_AHKL_USERDEFINED1)
}

UpdateCounter(Text, RegEx) {
    If (RegExMatch("", RegEx)) {
        Count := -1 ; ERROR: The expression can match nothing and all at the same time.
    } Else {
        RegExReplace(Text, RegEx,, Count)
    }
    
    If (Count == 0) {
        CountMsg := "No Match"
    } Else If (Count == 1) {
        CountMsg := "1 Match"
    } Else If (Count > 1) {
        CountMsg := Count . " Matches"
    } Else If (Count == -1) {
        CountMsg := "..."
    }

    GuiControl,, %hMatchCount%, %CountMsg%
}

SetOption:
    Gui Submit, NoHide

    If (A_GuiControl == "IgnoreCase") {
        Option := "i"
    } Else If (A_GuiControl == "Multiline") {
        Option := "m"
    } Else If (A_GuiControl == "DOTALL") {
        Option := "s"
    }

    If (RegExMatch(RegEx, "^([\w``]*)" . Option . "([\w``]*)\)")) {
        NewStr := RegExReplace(RegEx, "^([\w``]*)" . Option . "([\w``]*)\)", "$1$2)")
        If (SubStr(NewStr, 1, 1) == ")") {
            NewStr := SubStr(NewStr, 2)
        }
    } Else {
        If (!RegExMatch(RegEx, "^[\w``]+\)")) {
            Option .= ")"
        }
        NewStr := Option . RegEx
    }

    GuiControl,, RegEx, %NewStr%
Return

ShowHelp:
    HelpFile := A_AhkPath . "\..\AutoHotkey.chm"
    Run HH mk:@MSITStore:%HelpFile%::/docs/misc/RegEx-QuickRef.htm
Return

ShowGroups:
    If (!Groups) {
        ControlMove,,,,, 115, % "ahk_id " . Sci.hWnd
        GuiControl Move, %hGroupsHdr%, y250
        GuiControl Move, %hCollapseChevron%, x697 y256
        Control Show,,, % "ahk_id " . SciGroups.hWnd
        ControlColor(hGroupsHdr, hWindow, 0x336699, 0xFFFFFF)
        Groups := True

        GuiControl Move, %hReplaceHdr%, y403
        Control Hide,,, % "ahk_id " . hReplaceField
        Control Hide,,, % "ahk_id " . SciReplace.hWnd
        ControlColor(hReplaceHdr, hWindow, 0xC0C0C0, 0xFFFFFF)
        Replace := False

        GoSub UpdateGroups
    } Else {
        ControlMove,,,,, 232, % "ahk_id " . Sci.hWnd
        GuiControl Move, %hGroupsHdr%, y368
        GuiControl Move, %hCollapseChevron%, x-16
        Control Hide,,, % "ahk_id " . SciGroups.hWnd
        ControlColor(hGroupsHdr, hWindow, 0xC0C0C0, 0xFFFFFF)
        Groups := False
    }

    WinSet Redraw,, ahk_id%hWindow%
Return

UpdateGroups:
    Gui Submit, NoHide

    If (RegEx == "") {
        Return
    }

    Sci.GetText(Sci.GetLength() + 1, SciText)

    RegEx := RegExReplace(RegEx, "^(\w*)\)", "O$1)", Count)
    If (!Count) {
        RegEx := "O)" . RegEx
    }

    RegExMatch(SciText, RegEx, o)
    GrpCount := o.Count()

    Output := ""
    Loop % GrpCount {
        n := (o.Name(A_Index) != "") ? o.Name(A_Index) : A_Index
        Value := (o.Value(A_Index) != "") ? o.Value(A_Index) : "None"
        Output .= n . ": " . Value . "`n"
    }

    SciGroups.SetReadOnly(False)
    If (GrpCount) {
        SciGroups.SetText("", Output)
    } Else {
        SciGroups.ClearAll()
    }
    SciGroups.SetReadOnly(True)
Return

ShowReplace:
    If (!Replace) {
        ControlMove,,,,, 100, % "ahk_id " . Sci.hWnd
        GuiControl Move, %hReplaceHdr%, y235
        GuiControl Move, %hCollapseChevron%, x697 y241
        Control Show,,, % "ahk_id " . hReplaceField
        Control Show,,, % "ahk_id " . SciReplace.hWnd
        ControlColor(hReplaceHdr, hWindow, 0x336699, 0xFFFFFF)
        Replace := True

        Control Hide,,, % "ahk_id " . SciGroups.hWnd
        GuiControl Move, %hGroupsHdr%, y403
        ControlColor(hGroupsHdr, hWindow, 0xC0C0C0, 0xFFFFFF)
        Groups := False

        ControlFocus,, ahk_id%hReplaceField%
    } Else {
        ControlMove,,,,, 232, % "ahk_id " . Sci.hWnd
        GuiControl Move, %hReplaceHdr%, y403
        GuiControl Move, %hCollapseChevron%, x-16
        Control Hide,,, % "ahk_id " . hReplaceField
        Control Hide,,, % "ahk_id " . SciReplace.hWnd
        ControlColor(hReplaceHdr, hWindow, 0xC0C0C0, 0xFFFFFF)
        Replace := False

        GuiControl Move, %hGroupsHdr%, y368
    }

    WinSet Redraw,, ahk_id%hWindow%
Return

Replace:
    Gui Submit, NoHide

    If (RegEx == "") {
        SciReplace.ClearAll()
        Return
    }

    Sci.GetText(Sci.GetLength() + 1, SciText)
    NewStr := RegExReplace(SciText, RegEx, Replacement)
    SciReplace.SetText("", NewStr)
Return

CreateScintilla(hParent, x, y, w, h, SciLexer, Style := "0x50010000", ExStyle := 0x200) {
    Scintilla := New Scintilla
    Scintilla.Add(hParent, x, y, w, h, SciLexer, Style, ExStyle)
    Scintilla.SetLexer(SCLEX_CONTAINER)
    Scintilla.SetCodePage(65001)
    Scintilla.SetMarginWidthN(0, 0)
    Scintilla.SetMarginWidthN(1, 0)
    Scintilla.SetWrapMode(1)
    Scintilla.StyleSetFont(SCE_AHKL_NEUTRAL, "Lucida Console")
    Scintilla.StyleSetSize(SCE_AHKL_NEUTRAL, 10)
    Scintilla.SetSelFore(1, 0xFFFFFF)
    Scintilla.SetSelBack(1, 0x3399FF)
    Return Scintilla
}

OnNotify(wParam, lParam, msg, hWnd, obj) {
    If (obj.SCNCode == SCN_MODIFIED && obj.modType != 20) {
        GoSub Search
    }
}

GuiEscape:
GuiClose:
    ExitApp

EnsureU32() {
    If (A_PtrSize == 8 || !A_IsUnicode) {
        If (FileExist(U32 := A_AhkPath . "\..\AutoHotkeyU32.exe")) {
            Run % U32 . " """ . A_LineFile . ""
        } Else {
            MsgBox 0x10, Expressive, AutoHotkey 32-bit Unicode not found.
        }
        ExitApp
    }
}

OnWM_KEYDOWN(wParam, lParam, msg, hWnd) {
    Global

    If (wParam == 113) { ; F2
        GoSub ShowGroups
    } Else if (wParam == 114) { ; F3
        GoSub ShowReplace
    } Else If (wParam == 116) { ; F5
        GuiControlGet RegEx,, Edit1

        If (Replace) {
            GuiControlGet ReplaceRegEx,, %hReplaceField%
            Clipboard := "NewStr := RegExReplace(Haystack, """ . RegEx . """, """ . ReplaceRegEx . """)"
        } Else {
            Clipboard := "FoundPos := RegExMatch(Haystack, """ . RegEx . """, OutputVar)"
        }
    }
}

OnWM_MOUSEMOVE(wParam, lParam, msg, hWnd) {
    Static CurrControl, PrevControl := ""
    CurrControl := A_GuiControl

    If (CurrControl != PrevControl && !InStr(CurrControl, " ")) {
        ToolTip ; Turn off any previous tooltip.
        SetTimer DisplayToolTip, 600
        PrevControl := CurrControl
    }
    Return

    DisplayToolTip:
        SetTimer DisplayToolTip, Off
        ToolTip % TT[CurrControl]
        SetTimer RemoveToolTip, 4500
    return

    RemoveToolTip:
        SetTimer RemoveToolTip, Off
        ToolTip
    Return
}
User avatar
Drugwash
Posts: 737
Joined: 29 May 2014, 21:07
Location: Ploieşti, Romania

Re: AutoGUI - GUI Designer and Script Editor

19 Nov 2016, 06:03

Alguimist wrote:@Asmodeus and @Drugwash: commas will not be escaped in the control text, only in the window title. Some other characters will be escaped/unescaped when necessary.
That's great, thank you. :)
Alguimist wrote:
Drugwash wrote:... keep its current position when launched again...
Go to Properties, Window tab, and uncheck "Center on Screen" (this option omits the x and y coordinates). Move the preview window to the desired location and hit Apply in Properties.
For some reason that doesn't always stick. Actually it only did once, then only opening Properties > Window [tab] and closing it without any change reverted the Test window to current position.

Anyway, if I'm not mistaken that setting deals with the window position as it has to appear in the final script. As such, the user may actually want that behavior in their script but not in the Test window. Maybe the best solution would be to add specific properties for the Test window alone that would filter out any unwanted behavior inherited from the script.

For example, user may want their window to start out as Centered and Hidden, but when hitting Test the Test window obviously should be visible and if the user chooses (as per Test window options, as suggested) for that Test window to always appear somewhere out of the way, then the Centered option should be omitted for the Test window but would still be present in the final script.
I should implement such option myself in SmartGUI XP Creator Mod, if I ever get to work on that script again. :oops:

Oh and there's another minor issue related to that: when the user script is freshly created with only a control or so and the Test is invoked repeatedly, any subsequent invoke brings up the warning that an older instance is already running, meaning #SingleInstance is not set to Force by default on the Test window at script creation.
Alguimist wrote:Some styles cannot be applied without recreating the control, but this is not the case. The plus sign is missing in front of the option, which also needs to be removed when the option is unset. This issue will be fixed in the next release.
Can't remember now all the details but I believe some options in AHK commands may need to be specified explicitly with a minus in order to disable them, while others are just disabled by default if not explicitly enabled through a plus sign or simply by the presence of the option. Therefore a three state may be required for the generic function that deals with command options (+Option / Option / -Option). I'm thinking of numeric styles that may behave differently if they do or do not have a plus in front of them. Or I may be wrong.
Alguimist wrote:Thank you.
You're welcome. :thumbup:
I've deleted my CloudMe account because of GDPR - the now legal base for privacy invasion and data theft.
User avatar
Drugwash
Posts: 737
Joined: 29 May 2014, 21:07
Location: Ploieşti, Romania

Bug

19 Nov 2016, 07:00

Follow up with a bug. Sorry.
Started the script, added a checkbox.
Interested in how multi-selection looks like, I selected part of the window including the checkbox.
Then I pressed the direction arrows on keyboard to move the selection around.
At some point I dragged the working window to a different position; checkbox background lost its selection color.
I clicked the checkbox, selection color came back together with the move/size rectangle.
Started pressing direction arrows again to move the checkbox around.
Immediately the error popped up, pointing to a line related to a progressbar (???) --> see here: link

Most likely some variable(s) get reused or the script jumps to the wrong subroutine.

The board is giving me a hard time uploading a darn screenshot. :( --> see here: link
I've deleted my CloudMe account because of GDPR - the now legal base for privacy invasion and data theft.
User avatar
Joe Glines
Posts: 644
Joined: 30 Sep 2013, 20:49
Facebook: https://www.facebook.com/theAutomatorGuru/
Google: https://plus.google.com/105328929654286634910
GitHub: joetazz
Location: Dallas
Contact:

Re: AutoGUI - GUI Designer and Script Editor

19 Nov 2016, 09:17

btw- When I use Expressive for my RegEx it only matches the first sub-pattern. Is this as designed? It would be nice if it matched the first several (but understand it doesn't have to be all). I really like the simplicity of the tool! I featured it in many of my Regular Expression videos. :bravo:
utellme

Re: AutoGUI - GUI Designer and Script Editor

28 Nov 2016, 09:52

adding or changing GUI elements seems not to work.
after loading a GUI I press "Recreate from script" adding or altering any GUI elements does not update the code. why?
User avatar
Alguimist
Posts: 347
Joined: 05 Oct 2015, 16:41
Contact:

Re: AutoGUI - GUI Designer and Script Editor

02 Dec 2016, 18:38

@Drugwash:
I'll check all the information you provided and reply as soon as possible.

@Joe Glines
Nice videos :). I'll try to add more functionality to Expressive later, while preserving a simple interface.

@utellme
"Recreate from script" is partially implemented. Try the Window Cloning Tool.
User avatar
Alguimist
Posts: 347
Joined: 05 Oct 2015, 16:41
Contact:

Re: AutoGUI - GUI Designer and Script Editor

02 Dec 2016, 18:54

New version: 1.3.0a.

Initial implementation of autocompletion and calltips. Autocomplete is disabled by default because it is not context-aware yet. If enabled, it is automatically triggered when at least 3 characters are typed, but can also be invoked with Ctrl+Enter, even if it is disabled. Pressing Ctrl+Insert when an autocomplete list is active, completes the keyword and inserts the parameters of the selected item immediately.

Calltips (also know as parameters hint or code tooltips) popup when: 1) a space, comma or left parenthesis is typed after a command/function name. 2. Pressing Ctrl+Space when the caret is on the keyword or on a following space or comma (this works even if calltips is disabled). 3. Hovering the keyword with the cursor. 4. After autocompletion.

When a command or function has a varied number of parameters or multiple signatures (overload), an arrow is displayed on the calltip box. Click the arrow to alternate the calltip. Clicking somewhere else in the calltip causes the parameters of the current item to be inserted near the keyword.

Ctrl+Insert inserts the parameters of the command/function even if no calltip or autocomplete list is active.

Improved Find/Replace dialog. Regular expression mode uses AHK, not Scintilla. More tests are needed.

Mark/bookmark selected text with Ctrl+M. Go to Next/Previous Mark with Ctrl+PgUp/PgDn. Clear All Marks with Alt+M. Text can also be marked in the Find/Replace dialog. These marks are not preserved when the file is reloaded.

More:
- Win32 constants autocompletion (Win+Enter).
- Files can be opened via command line parameters. A registry association can be made to add "Edit with AutoGUI" to the shell context menu for ahk files.
- Options Menu > Highlight active line (light blue, as suggested by gallaxhar).
- Options Menu > Indentation guides.
- GUI: new options in the Layout menu: Stretch Horizontally and Stretch Vertically.
- GUI: support for Command Link notes (separate the button label with a "`n" in the Change Text dialog).
- Improved Help menu. Quick access to a selection of help articles.
- Minor bug fixes and optimizations.

Known bug: sometimes the window is not repainted correctly. If this occurs, go to the Window menu > Repaint.

Requirements: AutoHotkey 1.1.23+. Upgrade to the newest version if an error message displays a warning "call to nonexistent function" or similar.

:arrow: Download
User avatar
Alguimist
Posts: 347
Joined: 05 Oct 2015, 16:41
Contact:

Re: AutoGUI - GUI Designer and Script Editor

04 Dec 2016, 16:05

Version 1.3.1: fixed the bug with repainting mentioned above.

:arrow: Download
User avatar
Drugwash
Posts: 737
Joined: 29 May 2014, 21:07
Location: Ploieşti, Romania

Re: AutoGUI - GUI Designer and Script Editor

04 Dec 2016, 17:52

Thanks for your continued work.

There still are problems in 1.3.1 with repainting SciLexer window and working window. Mainly after a menu is shown. Please see screenshot here: link
I've deleted my CloudMe account because of GDPR - the now legal base for privacy invasion and data theft.
User avatar
Alguimist
Posts: 347
Joined: 05 Oct 2015, 16:41
Contact:

Re: Bug

21 Dec 2016, 19:12

Drugwash wrote: (...) Immediately the error popped up, pointing to a line related to a progressbar
Issues with repainting may occur sometimes, specially on Windows XP, but I couldn't reproduce the error following the steps of your description.
User avatar
Alguimist
Posts: 347
Joined: 05 Oct 2015, 16:41
Contact:

Re: AutoGUI - GUI Designer and Script Editor

21 Dec 2016, 23:45

Version 1.3.2a:
- Highlight identical text. Select a word, for example: Gui, and all occurrences of that word will be highlighted in a different color.
- Run/Test (F9) acts as "Save and Run" (if the file has already been saved).
- New tool: Scripts Manager. Derived from a script written by tmplinshi.
- Minor bug fixes.

:arrow: Download

Scintilla: the source code of the DLL (lexer for AHK only) is also available for download.
mandus
Posts: 12
Joined: 27 Oct 2016, 01:33
GitHub: MHketbi

Re: AutoGUI - GUI Designer and Script Editor

22 Dec 2016, 03:06

Alguimist wrote:Version 1.3.2a:
- Highlight identical text. Select a word, for example: Gui, and all occurrences of that word will be highlighted in a different color.
- Run/Test (F9) acts as "Save and Run" (if the file has already been saved).
- New tool: Scripts Manager. Derived from a script written by tmplinshi.
- Minor bug fixes.

:arrow: Download

Scintilla: the source code of the DLL (lexer for AHK only) is also available for download.
thank you.
User avatar
Drugwash
Posts: 737
Joined: 29 May 2014, 21:07
Location: Ploieşti, Romania

Re: Bug

22 Dec 2016, 04:41

Alguimist wrote:
Drugwash wrote: (...) Immediately the error popped up, pointing to a line related to a progressbar
Issues with repainting may occur sometimes, specially on Windows XP, but I couldn't reproduce the error following the steps of your description.
I'm confused, maybe you misquoted?
The quote related to an error refers to moving controls around by very rapidly tapping the arrow keys, alone or în different combinations (such as up+left, down-left etc). My keyboard settings in Control Panel are all set to shortest delay, fastest repeat rate. Maybe the script can't catch some keypress which falls through. Dunno.

Repainting issues appear when navigating through main menu. Moving working window around doesn't repaint. Could be system's fault. No big deal.
I've deleted my CloudMe account because of GDPR - the now legal base for privacy invasion and data theft.
MaxAstro
Posts: 552
Joined: 05 Oct 2016, 13:00

Re: AutoGUI - GUI Designer and Script Editor

06 Jan 2017, 11:50

Awesome tool, this is going to save me huge amounts of time!

One question, though - is there any way to include variable names in text fields, or put text fields in expression mode? Currently if I try to put, for example, %variable% into a text field it escapes the % signs.
User avatar
Alguimist
Posts: 347
Joined: 05 Oct 2015, 16:41
Contact:

Re: AutoGUI - GUI Designer and Script Editor

07 Jan 2017, 13:15

@MaxAstro: It is more convenient to place these variables directly in the code once the GUI has been finished.
User avatar
Alguimist
Posts: 347
Joined: 05 Oct 2015, 16:41
Contact:

Re: AutoGUI - GUI Designer and Script Editor

07 Jan 2017, 13:22

Version 1.3.3a:
- New Toolbar Editor (select Toolbar in the list of Control Types to open it).
- Control types: Tab is now Tab3 (the preview window uses Tab2 with theme, but the output is Tab3).
- The user is prompted to reload the file if it has been modified outside of AutoGUI.
- Window menu: "Fit Window to Contents".
- File menu: "New From Template" (Ctrl+T).
- Fixed the bugs related to repainting on XP and moving controls with arrow keys reported by Drugwash.
- Tools: fixed bugs in Expressive and Scripts Manager.

:arrow: Download

Return to “AutoGUI”

Who is online

Users browsing this forum: No registered users and 23 guests