Adventure - General-Purpose IDE, Lightweight Text Editor

Open source general-purpose IDE, lightweight text editor. Previously known as AutoGUI.
User avatar
Drugwash
Posts: 850
Joined: 29 May 2014, 21:07
Location: Ploieşti, Romania
Contact:

Re: Adventure - General-Purpose IDE, Lightweight Text Editor

27 Jul 2021, 19:41

While testing Adventure v3.0.0 in Linux under Wine 5.14 I noticed all toolbar buttons appeared to take extra empty space to the right of their icons where text would've been, thus extending the toolbar way beyond the right screen margin. Setting TBSTYLE_AUTOSIZE (0x10) to all buttons fixed the issue. Setting the entire toolbar as WRAPABLE creates other problems under Wine (Scintilla window overlapping it) so it's not advisable.
Dunno if other/later versions of Wine exhibit the same behavior - I'm forced to stick to that particular version due to certain regressions in newer versions.
Screenshot from 2021-07-28 03-45-28.png
Without TBSTYLE_AUTOSIZE
Screenshot from 2021-07-28 03-45-28.png (25.06 KiB) Viewed 6670 times
Screenshot from 2021-07-28 03-44-20.png
With TBSTYLE_AUTOSIZE
Screenshot from 2021-07-28 03-44-20.png (30.03 KiB) Viewed 6670 times
Part of my AHK work can be found here.
User avatar
Alguimist
Posts: 428
Joined: 05 Oct 2015, 16:41
Contact:

Re: Adventure - General-Purpose IDE, Lightweight Text Editor

31 Jul 2021, 14:14

Hello, @Drugwash!

I have not yet tested Adventure under Wine, but I'm convinced that it would compromise development productivity to go after "cross-platform" compatibility in this environment at this time.
User avatar
Drugwash
Posts: 850
Joined: 29 May 2014, 21:07
Location: Ploieşti, Romania
Contact:

Re: Adventure - General-Purpose IDE, Lightweight Text Editor

31 Jul 2021, 23:53

Well, I wasn't going as far as asking to attempt full cross-platform compatibility - just fixing minor issues, such as the one above, if/when possible.
Does the AUTOSIZE style break Windows compatibility in any way? The most I could do here is test under an XP virtual machine, but nothing higher than that.
Part of my AHK work can be found here.
User avatar
Alguimist
Posts: 428
Joined: 05 Oct 2015, 16:41
Contact:

Re: Adventure - General-Purpose IDE, Lightweight Text Editor

02 Aug 2021, 18:18

@Drugwash
Since you mentioned toolbar styles, I'm now trying to find out how to make the text buttons of a vertical toolbar to have all the same width. It's for a redesign of the debug window: on the left side will be a list of buttons and on the right side a tab control with the tab items "Variables|Call Stack|OutputDebug|Breakpoints|Options". But then I just found the answer: the toolbar cannot have the extended style TBSTYLE_EX_MIXEDBUTTONS, which is added by default as part of the function in use. I suppose that Wine is incompatible with this extended style.
User avatar
kczx3
Posts: 1640
Joined: 06 Oct 2015, 21:39

Re: Adventure - General-Purpose IDE, Lightweight Text Editor

02 Aug 2021, 19:49

Does Adventure have the AHK #Include parser built into it anywhere to open includes used in the current file?
User avatar
TheArkive
Posts: 1027
Joined: 05 Aug 2016, 08:06
Location: The Construct
Contact:

Re: Adventure - General-Purpose IDE, Lightweight Text Editor

03 Aug 2021, 01:22

@Alguimist

For a vertical toolbar you will want the "common control" Vert style (0x80) and the Wrap button state (0x20) on all buttons of your vertical toolbar.
https://docs.microsoft.com/en-us/windows/win32/controls/common-control-styles

Also, for more control/flexibility/consistency, if you haven't already, you may want to use the following toolbar styles:

NoParentAlign: 0x8
NoResize: 0x4

The downside is that you will need to position / size the toolbar manually, and you will need to use a "sizing" event to do so. The upside is that you won't get a ton of strange inexplicable sizing issues (particularly for vertical toolbars).

If you get undesirable flickering then you can experiment with a combo of the WS_EX_COMPOSITED (0x02000000 - window double buffering exStyle) + WS_CLIPCHILDREN (0x02000000 regular window style).

I'd personally start with WS_EX_COMPOSITED window exStyle first. I've noticed this has had the most positive effect on most of my tests.

more Links:

https://docs.microsoft.com/en-us/windows/win32/winmsg/window-styles
https://docs.microsoft.com/en-us/windows/win32/winmsg/extended-window-styles

Hope this helps.

EDIT: The "Wrappable" toolbar style may be of use for vertical toolbars. I just realized that may have been what I was missing in some of my tests for vertical toolbars. Then you can omit NoParentAlign and NoResize.

EDIT2: If you don't actually want text + img buttons (or the ability to toggle text + img buttons) then you don't need the MixedButtons exStyle.
Last edited by TheArkive on 03 Aug 2021, 07:09, edited 1 time in total.
User avatar
Drugwash
Posts: 850
Joined: 29 May 2014, 21:07
Location: Ploieşti, Romania
Contact:

Re: Adventure - General-Purpose IDE, Lightweight Text Editor

03 Aug 2021, 07:05

Alguimist wrote:
02 Aug 2021, 18:18
[...] the toolbar cannot have the extended style TBSTYLE_EX_MIXEDBUTTONS, which is added by default as part of the function in use. I suppose that Wine is incompatible with this extended style.
That remains to be tested. You could crop together a simple test script containing more combinations of toolbars and styles (and provide a screenshot for comparison), and I could test it here and report back which ones worked correctly and which didn't, if any.

In most recent Wine releases (6.13 and 6.14) they fixed certain longstanding theme-related issues that affected toolbars but unfortunately the 6.x releases behave very badly here on my system, rendering them unusable on a daily basis; I can still perform tests when necessary though with the aid of PlayOnLinux.
Part of my AHK work can be found here.
User avatar
Alguimist
Posts: 428
Joined: 05 Oct 2015, 16:41
Contact:

Re: Adventure - General-Purpose IDE, Lightweight Text Editor

04 Aug 2021, 10:22

kczx3 wrote:
02 Aug 2021, 19:49
Does Adventure have the AHK #Include parser built into it anywhere to open includes used in the current file?
This functionality was directly integrated with Auto-GUI in the past. Now you have to open "Find in Files", select "Current File and Its Includes" in the drop-down menu of the "Browse" button and press the Start button to perform a search. All includes will be listed.

@TheArkive
Common control styles are added by Toolbar.ahk when position is specified. In regard to double buffering, I have not yet seen a situation where it is needed for toolbars, even though there is a specific extended style for that: TBSTYLE_EX_DOUBLEBUFFER.

As a side note: ListViews and TreeViews also have an extended style for double buffering, which should be applied when making use of the Explorer theme.

@Drugwash
A simple test: remove the option "SHOWTEXT" from the Execute button (Adventure.ahk).
User avatar
kczx3
Posts: 1640
Joined: 06 Oct 2015, 21:39

Re: Adventure - General-Purpose IDE, Lightweight Text Editor

04 Aug 2021, 10:44

Alguimist wrote:
04 Aug 2021, 10:22
This functionality was directly integrated with Auto-GUI in the past. Now you have to open "Find in Files", select "Current File and Its Includes" in the drop-down menu of the "Browse" button and press the Start button to perform a search. All includes will be listed.
Is there the possibility of adding this back in? I could even do this if there was a plugin system of sorts.
User avatar
Alguimist
Posts: 428
Joined: 05 Oct 2015, 16:41
Contact:

Re: Adventure - General-Purpose IDE, Lightweight Text Editor

04 Aug 2021, 11:21

@kczx3
The "plugin system" is the Tools Manager/menu. You can write a script that receives the full path of the current file and then perform EnumIncludes to display its output in a list.
User avatar
kczx3
Posts: 1640
Joined: 06 Oct 2015, 21:39

Re: Adventure - General-Purpose IDE, Lightweight Text Editor

04 Aug 2021, 12:29

Bummer, it would be nice to be able to right-click an include and have a context-menu option to open that file.
User avatar
oldbrother
Posts: 273
Joined: 23 Oct 2013, 05:08

Re: Adventure - General-Purpose IDE, Lightweight Text Editor

04 Aug 2021, 14:09

Please let us know when the High-DPI error will be fixed.
Any plan for V2 support?
Snap5.png
(69.52 KiB) Downloaded 306 times
User avatar
Alguimist
Posts: 428
Joined: 05 Oct 2015, 16:41
Contact:

Re: Adventure - General-Purpose IDE, Lightweight Text Editor

04 Aug 2021, 15:03

oldbrother wrote:Please let us know when the High-DPI error will be fixed.
Not in the upcoming release, but soon. You can remove that warning, if you want, and see if it works correctly.
oldbrother wrote:Any plan for V2 support?
Menu: AHK > AutoHotkey Settings. There you can set the path to AHKv2.
User avatar
Alguimist
Posts: 428
Joined: 05 Oct 2015, 16:41
Contact:

Re: Adventure - General-Purpose IDE, Lightweight Text Editor

04 Aug 2021, 17:33

Adventure IDE 3.0.1 is available for download.

What has been made since the previous release (a hundred of days ago):
 • New tool: Sort Panel - a text sorting tool, a front-end for the Sort command.
 • Keywords for syntax highlighting and autocomplete: FreeBASIC and CSS.
 • Basic syntax highlighting for Lua and Rust (no keywords yet).
 • Syntax highlighting and keywords for Ruby.
 • Syntax highlighting for Markdown files.
 • Updated list of keywords for AutoHotkey.
 • Improved color scheme for many programming languages.
 • Improvements in the Syntax Type window (Syntax > More Lexers > context menu): Edit and Reload.
 • New templates: FreeBASIC Win32 GUI, C# and VB.NET WinForms Application.
 • New example code for HTML\JavaScript and C-C++\File IO.
 • Keyboard shortcuts to open the current folder in file manager (Ctrl + E) and in the command prompt (Ctrl + P).
 • The option "Show Indentation Lines" (or "Guides") was made into a menu item in the View menu.
 • Items in the list of autocomplete may now contain spaces.
 • A few corrections and additions to FileTypes.xml.
 • Filenames were not being updated/added to the list of recent files when closing files.
 • Bugfix: undo was allowed right after opening a file, without any modification made to the file.
 • Bugfix: barricade metadata created by the native file extractor of Windows (now that Adventure is distributed as a zip file) was preventing the correct opening of AutoHotkey.chm.
 • Bugfix: AutoHotkey debugger was failing to continue execution with the F5 key.
 • Bugfix: added WS_CLIPCHILDREN to the main window to prevent flickering on resize.
 • Bugfix: replacement of multiple selections was creating an extra cursor under some circumstances.
 • Bugfix: pressing Esc to dismiss a calltip was also removing selections.
 • Bugfix: incorrect information about the presence of keywords in the Syntax Type list for some languages.
 • Tools: minor changes to Auto-GUI and ErrorView.
Last edited by Alguimist on 07 Aug 2021, 12:34, edited 1 time in total.
tuzi
Posts: 223
Joined: 27 Apr 2016, 23:40

Re: Adventure - General-Purpose IDE, Lightweight Text Editor

06 Aug 2021, 02:23

thank you. i love it! :bravo: :thumbup: :thumbup:

there is a little mistake in change log ,WS_CHIPCHILDREN should be WS_CLIPCHILDREN.
User avatar
Drugwash
Posts: 850
Joined: 29 May 2014, 21:07
Location: Ploieşti, Romania
Contact:

Re: Adventure - General-Purpose IDE, Lightweight Text Editor

06 Aug 2021, 06:16

Alguimist wrote:
04 Aug 2021, 10:22
@Drugwash
A simple test: remove the option "SHOWTEXT" from the Execute button (Adventure.ahk).
Test performed under v3.0.0 only:
When SHOWTEXT is removed from the Execute button all buttons revert to their correct size, regardless of the AUTOSIZE option being present or not in all buttons.
The text of the Execute button (with its original options enabled) being cut off is most likely a bug in Wine, one that happens in all other applications. Probably related to measuring string size. They may come around to fixing it at some point.

Could you please provide a sample script with a vertical toolbar (and tab control) for testing purposes?
Part of my AHK work can be found here.
User avatar
Alguimist
Posts: 428
Joined: 05 Oct 2015, 16:41
Contact:

Re: Adventure - General-Purpose IDE, Lightweight Text Editor

07 Aug 2021, 12:37

Drugwash wrote:
06 Aug 2021, 06:16
Could you please provide a sample script with a vertical toolbar (and tab control) for testing purposes?
The following script is a modified version of the initial sketch of the window I'm working on.

Code: Select all

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

Menu Tray, Icon, user32.dll, 2

Gui Debug: New, +Resize +LabelOn +MinSize176x362 +AlwaysOnTop

Gui Add, Progress, vHdr x0 y0 w824 h48 +C1E90FF, 100
Gui Font, s12 cWhite, Segoe UI
Gui Add, Text, x12 y12 w300 h24 +BackgroundTrans, AutoHotkey Debugger
Gui Font
Gui Font, s9, Segoe UI

hToolbar := CreateToolbar()
SendMessage 0x43B, 0, 160,, ahk_id %hToolbar% ; TB_SETBUTTONWIDTH

Gui Add, Tab3, vTab x180 y56 w640 h420 -Wrap, Variables|Call Stack|Error Stream|Breakpoints|Attach|Options

Gui Tab, 1
Gui Add, ListView, hWndhLV vLV x186 y86 w626 h382 +LV0x14000 +0x40, Name|Value|Type

Gui Tab

Gui Add, StatusBar

Gui Show, w824 h504, Debugger - Stopped
Return

OnSize() {
    AutoSize("w", "Hdr")
    AutoSize("wh", "Tab")
    AutoSize("wh", "LV")
}

OnClose() {
    OnEscape:
    ExitApp
    Return
}

CreateToolbar() {
    ImageList := IL_Create(7)
    IL_Add(ImageList, "shell32.dll", 16)
    IL_Add(ImageList, "shell32.dll", 18)
    IL_Add(ImageList, "shell32.dll", 19)
    IL_Add(ImageList, "shell32.dll", 21)
    IL_Add(ImageList, "shell32.dll", 22)
    IL_Add(ImageList, "shell32.dll", 23)
    IL_Add(ImageList, "shell32.dll", 24)
    IL_Add(ImageList, "shell32.dll", 17)
    IL_Add(ImageList, "shell32.dll", 47)
    IL_Add(ImageList, "shell32.dll", 41)
    IL_Add(ImageList, "shell32.dll", 25)

    Buttons = 
    (LTrim
        Run / Continue (F5),,,, 2500
        Pause
        Stop (F8)
        -
        Step Into (F6)
        Step Over (F7)
        Step Out (Shift + F6)
        -
        Toggle Breakpoint (F4)
        Delete All Breakpoints
        -
        Reload List
        Clear Error Stream
        -
        Modify Variable
    )

    Return Toolbar_Create("OnToolbar", Buttons, ImageList, "Flat List Vertical ShowText Tooltips NoDivider",, "x8 y56 w160 h300",, 0)
}

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

    If (ID == 2500) {

    }
}

Toolbar_Create(Handler, Buttons, ImageList := "", Options := "Flat List ToolTips", Extra := "", Pos := "", Padding := "", ExStyle := 0x9) {
    Local fShowText, fTextOnly, Styles, hWnd, TBB_Size, cButtons, TBBUTTONS
    , Index, Button, iBitmap, idCommand, fsState, fsStyle, iString, Offset, SIZE, 

    Static TOOLTIPS := 0x100, WRAPABLE := 0x200, FLAT := 0x800, LIST := 0x1000
    , TABSTOP := 0x10000, BORDER := 0x800000, TEXTONLY := 0, BOTTOM := 0x3
    , ADJUSTABLE := 0x20, NODIVIDER := 0x40, VERTICAL := 0x80
    , CHECKED := 1, HIDDEN := 8, WRAP := 32, DISABLED := 0 ; States
    , 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 gToolbar_Handler -Tabstop %Pos% %Styles% %Extra%
    Toolbar_Store(hWnd, Handler)

    TBB_Size := A_PtrSize == 8 ? 32 : 20
    Buttons := StrSplit(Buttons, "`n")
    cButtons := Buttons.Length()
    VarSetCapacity(TBBUTTONS, TBB_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) * TBB_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")
    }

    If (Padding) {
        SendMessage 0x457, 0, %Padding%,, ahk_id %hWnd% ; TB_SETPADDING
    }

    If (ExStyle) { ; 0x9 = TBSTYLE_EX_DRAWDDARROWS | TBSTYLE_EX_MIXEDBUTTONS
        SendMessage 0x454, 0, %ExStyle%,, 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
}

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

Toolbar_Handler(hWnd) {
    Static n := {-2: "Click", -5: "RightClick", -20: "LDown", -713: "Hot", -710: "DropDown"}
    Local Handler, Code, ButtonId, Pos, Text, Event, RECT, Left, Bottom

    Handler := Toolbar_Store(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, 0)
    SendMessage % A_IsUnicode ? 0x44B : 0x42D, ButtonId, &Text,, ahk_id %hWnd% ; TB_GETBUTTONTEXT

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

    VarSetCapacity(RECT, 16, 0)
    SendMessage 0x433, ButtonId, &RECT,, ahk_id %hWnd% ; TB_GETRECT
    DllCall("MapWindowPoints", "Ptr", hWnd, "Ptr", 0, "Ptr", &RECT, "UInt", 2)
    Left := NumGet(RECT, 0, "Int")
    Bottom := NumGet(RECT, 12, "Int")

    %Handler%(hWnd, Event, Text, Pos, ButtonId, Left, Bottom)
}

; Original: http://ahkscript.org/boards/viewtopic.php?t=1079
AutoSize(DimSize, cList*) {
    Static cInfo := {}

    If (DimSize = "reset") {
        Return cInfo := {}
    }

    For i, ctrl in cList {
        ctrlID := A_Gui ":" ctrl
        If (cInfo[ctrlID].x = "") {
            GuiControlGet i, %A_Gui%: Pos, %ctrl%
            MMD := InStr(DimSize, "*") ? "MoveDraw" : "Move"
            fx := fy := fw := fh := 0
            For i, dim in (a := StrSplit(RegExReplace(DimSize, "i)[^xywh]"))) {
                If (!RegExMatch(DimSize, "i)" . dim . "\s*\K[\d.-]+", f%dim%)) {
                    f%dim% := 1
                }
            }

            If (InStr(DimSize, "t")) {
                GuiControlGet hWnd, %A_Gui%: hWnd, %ctrl%
                hParentWnd := DllCall("GetParent", "Ptr", hWnd, "Ptr")
                VarSetCapacity(RECT, 16, 0)
                DllCall("GetWindowRect", "Ptr", hParentWnd, "Ptr", &RECT)
                DllCall("MapWindowPoints", "Ptr", 0, "Ptr", DllCall("GetParent", "Ptr", hParentWnd, "Ptr"), "Ptr", &RECT, "UInt", 1)
                ix := ix - NumGet(RECT, 0, "Int")
                iy := iy - NumGet(RECT, 4, "Int")
            }

            cInfo[ctrlID] := {x: ix, fx: fx, y: iy, fy: fy, w: iw, fw: fw, h: ih, fh: fh, gw: A_GuiWidth, gh: A_GuiHeight, a: a, m: MMD}
        } Else If (cInfo[ctrlID].a.1) {
            dgx := dgw := A_GuiWidth - cInfo[ctrlID].gw, dgy := dgh := A_GuiHeight - cInfo[ctrlID].gh
            Options := ""
            For i, dim in cInfo[ctrlID]["a"] {
                Options .= dim . (dg%dim% * cInfo[ctrlID]["f" . dim] + cInfo[ctrlID][dim]) . A_Space
            }
            GuiControl, % A_Gui ":" cInfo[ctrlID].m, % ctrl, % Options
        }
    }
}
User avatar
Alguimist
Posts: 428
Joined: 05 Oct 2015, 16:41
Contact:

Re: Adventure - General-Purpose IDE, Lightweight Text Editor

14 Aug 2021, 16:29

Version 3.0.2: totally redesigned debug window. Individual debug windows (variables, call stack, error stream, attach and settings) were consolidated into a single window. All existing functionality was maintained and some were improved/extended.
Debugger.png
Debugger.png (68.76 KiB) Viewed 5930 times
Note: when the debug window is resized, the active tab is switched to the Options tab. Without this workaround, if the window is persistently resized on a tab that has a ListView, the application ended up freezing at some point. If you know how to solve this issue, let me know.
User avatar
kczx3
Posts: 1640
Joined: 06 Oct 2015, 21:39

Re: Adventure - General-Purpose IDE, Lightweight Text Editor

14 Aug 2021, 18:47

Are you using Tab3’s? I thought these types of issues had to do with how AHK’s message pump/queue handled things. Like it gets overwhelmed and starts throwing away messages or something. Did any amount of Critical help?
lexikos
Posts: 9553
Joined: 30 Sep 2013, 04:07
Contact:

Re: Adventure - General-Purpose IDE, Lightweight Text Editor

14 Aug 2021, 19:40

Making a thread Critical while an "external" message loop is active, such as the system message loop that handles window resizing, may cause deadlock in some situations. This is generally because the external message loop dispatches all messages to the corresponding window procedures, while Critical causes AutoHotkey to try to keep certain messages in the queue (posting them back into the queue if necessary). Critical N may help in that it may prevent the program from checking for messages for a time, but if a message check is going to occur under these circumstances you might be better off not using Critical at all.

In short, using Critical is more likely to cause the freezing issue than solve it.

Return to “Adventure IDE”

Who is online

Users browsing this forum: No registered users and 30 guests