Autoclose Brackets

Open source general-purpose IDE, lightweight text editor. Previously known as AutoGUI.
Rafio
Posts: 41
Joined: 07 Oct 2018, 05:14

Autoclose Brackets

Post by Rafio » 21 Nov 2022, 08:31

Hi everyone!

Now that I have changed AutoGui for Adventure, I'm not able to make this script work:
viewtopic.php?f=90&t=68521

I tried to simplify it, using the menu's position but it's not returning the checked state properly.

Could somebody help me on this?
Thanks.

Code: Select all

WinGet theApp, ProcessName , A 
if theApp != Adventure.exe
    SoundBeep, return 

WinGet windowID, ID, A 
mainMenu := DllCall("GetMenu", "Ptr", windowID, "Ptr")
subMenu := DllCall("GetSubMenu", "Ptr", mainMenu, "UInt", 7, "Ptr")

menuState := DllCall("GetMenuState", "Ptr", subMenu, "UInt", 4, "UInt", 0x400) ; By position
isChecked := menuState & 0x8

if (!isChecked) {
 WinMenuSelectItem A,, 8&, 5&
}


Rafio
Posts: 41
Joined: 07 Oct 2018, 05:14

Re: Autoclose Brackets

Post by Rafio » 23 Nov 2022, 05:06

Does someone have a clue?
Thanks!
--
Windows 11
AHK 1.1.35.00
Adventure 3.0.4

Post Reply

Return to “Adventure IDE”