AHK Studio

Editor for AutoHotkey written completely in AutoHotkey.

Moderator: maestrith

User avatar
maestrith
Posts: 802
Joined: 16 Oct 2013, 13:52

Re: AHK Studio

11 Mar 2020, 05:59

81793 wrote:
04 Feb 2020, 07:50
@maestrith thank you!
You are very welcome.
John H Wilson III 05/29/51 - 03/01/2020. You will be missed.AHK Studio OSDGUI Creator
Donations
Discord
All code is done on a 64 bit Windows 10 PC Running AutoHotkey x32
DaveT1
Posts: 77
Joined: 07 Oct 2014, 11:23

Re: AHK Studio

02 Apr 2020, 11:52

Hi,

Is it possible for AHK Studio to export a list of all function and lable names of the currently loaded code?

Many thanks.
User avatar
maestrith
Posts: 802
Joined: 16 Oct 2013, 13:52

Re: AHK Studio

02 Apr 2020, 20:46

DaveT1 wrote:
02 Apr 2020, 11:52
Hi,

Is it possible for AHK Studio to export a list of all function and lable names of the currently loaded code?

Many thanks.
Currently no.
I'm sure a plugin can be made for that purpose but it's not built in.
John H Wilson III 05/29/51 - 03/01/2020. You will be missed.AHK Studio OSDGUI Creator
Donations
Discord
All code is done on a 64 bit Windows 10 PC Running AutoHotkey x32
User avatar
maestrith
Posts: 802
Joined: 16 Oct 2013, 13:52

Re: AHK Studio

02 Apr 2020, 20:58

Something like:

Code: Select all

;menu Show Functions And Labels
x:=Studio()
CEXML:=x.Get("CEXML")
Current:=x.Current(2).ID
All:=CEXML.SN("//main[@id='" Current "']/descendant::*[@type='Function' or @type='Label']")
while(aa:=All.Item[A_Index-1],ea:=CEXML.EA(aa)){
	List.=ea.Type " - " ea.Text " - " ea.Att "`n"
}
MsgBox,%List%
ExitApp
that will display the current files Functions and Labels
Save that as an ahk file in the Studio\Plugins directory
then do Alt+M Refresh Plugins{Enter}
John H Wilson III 05/29/51 - 03/01/2020. You will be missed.AHK Studio OSDGUI Creator
Donations
Discord
All code is done on a 64 bit Windows 10 PC Running AutoHotkey x32
DaveT1
Posts: 77
Joined: 07 Oct 2014, 11:23

Re: AHK Studio

03 Apr 2020, 13:28

Many thanks Maestrith,
I'll give that a go and report back.

Edit: Err, flippin' eck! This does it straight out of the tin. Very many thanks Maestrith :D

I did change the MsgBox to a FileAppend as the msgbox seemed to hang.

I'd manually got 454 function and label names out of the code I'm interrogating (get this, I used OCR with AHK Studio's Code Explorer, repeatedly copying and pasting and mopping up), and your code gave me, err, 454 function and label names all easy peasy. Great stuff, this will be really useful for all sorts of things. Many thanks again.

:bravo:
User avatar
maestrith
Posts: 802
Joined: 16 Oct 2013, 13:52

Re: AHK Studio

06 Apr 2020, 06:56

DaveT1 wrote:
03 Apr 2020, 13:28
Many thanks Maestrith,
I'll give that a go and report back.

Edit: Err, flippin' eck! This does it straight out of the tin. Very many thanks Maestrith :D

I did change the MsgBox to a FileAppend as the msgbox seemed to hang.

I'd manually got 454 function and label names out of the code I'm interrogating (get this, I used OCR with AHK Studio's Code Explorer, repeatedly copying and pasting and mopping up), and your code gave me, err, 454 function and label names all easy peasy. Great stuff, this will be really useful for all sorts of things. Many thanks again.

:bravo:
No problem. Glad it works. OH! I edited the code, all Studio plugins need an ExitApp.
John H Wilson III 05/29/51 - 03/01/2020. You will be missed.AHK Studio OSDGUI Creator
Donations
Discord
All code is done on a 64 bit Windows 10 PC Running AutoHotkey x32
DaveT1
Posts: 77
Joined: 07 Oct 2014, 11:23

Re: AHK Studio

06 Apr 2020, 08:15

Thanks Maestrith, added ExitApp to the plugin. Much apreaciated as always.
User avatar
maestrith
Posts: 802
Joined: 16 Oct 2013, 13:52

Re: AHK Studio

06 Apr 2020, 10:58

DaveT1 wrote:
06 Apr 2020, 08:15
Thanks Maestrith, added ExitApp to the plugin. Much apreaciated as always.
Yep
John H Wilson III 05/29/51 - 03/01/2020. You will be missed.AHK Studio OSDGUI Creator
Donations
Discord
All code is done on a 64 bit Windows 10 PC Running AutoHotkey x32
User avatar
hasantr
Posts: 473
Joined: 05 Apr 2016, 14:18
Location: İstanbul

Re: AHK Studio

11 May 2020, 04:14

The code assistant will not work when you close a long bracket.

Code: Select all

hi [mention]maestrith[/mention] .

{ ;Menus ;
	Gui +hWndhMainWnd +Resize
	Menu FileMenu, Add, &Save Commands`tCtrl+S, MenuHandler
	Menu FileMenu, Icon, &Save Commands`tCtrl+S, shell32.dll, 259
	Menu FileMenu, Add, &Save As Commands, MenuHandler
	Menu FileMenu, Icon, &Save As Commands, shell32.dll, 279
	Menu FileMenu, Add, Exit, MenuHandler
	Menu FileMenu, Icon, Exit, shell32.dll, 28
	Menu MenuBar, Add, &File, :FileMenu
	Menu EditMenu, Add, Edit Command, MenuHandler
	Menu EditMenu, Icon, Edit Command, shell32.dll, 134
	Menu EditMenu, Add, Add Command, MenuHandler
	Menu EditMenu, Icon, Add Command, shell32.dll, 280
	Menu EditMenu, Add, Delete Command, MenuHandler
	Menu EditMenu, Icon, Delete Command, shell32.dll, 272
	Menu MenuBar, Add, &Edit, :EditMenu
	Menu OptionsMenu, Add, Show CMD, MenuHandler
	Menu OptionsMenu, Check, Show CMD
	Menu OptionsMenu, Add, ADB Folder, MenuHandler
	Menu OptionsMenu, Add, Language, MenuHandler
	Menu MenuBar, Add, &Options, :OptionsMenu
	Menu LanguageMenu, Add, English, MenuHandler
	Menu LanguageMenu, Add, Turkish, MenuHandler
	Menu MenuBar, Add, &Language, :LanguageMenu
	Menu HelpMenu, Add, Info, MenuHandler
	Menu HelpMenu, Icon, Info, shell32.dll, 278
	Menu HelpMenu, Add, Help, MenuHandler
	Menu HelpMenu, Icon, Help, shell32.dll, 155
	Menu MenuBar, Add, &Help, :HelpMenu
	Menu ToolsMenu, Add, Start Shell, MenuHandler
	Menu ToolsMenu, Icon, Start Shell, cmd.exe
	Menu MenuBar, Add, &Tools, :ToolsMenu
	Gui Menu, MenuBar
	Menu ContextMenu, Add, Select Command, MenuHandler
	Menu ContextMenu, Icon, Select Command, shell32.dll, 25
	Menu ContextMenu, Add, Add Command, MenuHandler
	Menu ContextMenu, Icon, Add Command, shell32.dll, 280
	Menu ContextMenu, Add, Edit Command, MenuHandler
	Menu ContextMenu, Icon, Edit Command, shell32.dll, 134
	Menu ContextMenu, Add, Delete Command, MenuHandler
	Menu ContextMenu, Icon, Delete Command, shell32.dll, 146
	Menu ContextMenu, Add, Copy Command, MenuHandler
	Menu ContextMenu, Icon, Copy Command, shell32.dll, 251
	Menu Tray, Add, Show, MenuHandler
	Menu Tray, Icon, Show, shell32.dll, 160
	Menu Tray, Add, Exit, MenuHandler
	Menu Tray, Icon, Exit, shell32.dll, 132
}

LV_Add()
Bracket is open. The code helper works.
https://i.imgur.com/tYlS77i.png

Bracket is close. The code helper not works.
https://i.imgur.com/IZbkDcH.png
User avatar
maestrith
Posts: 802
Joined: 16 Oct 2013, 13:52

Re: AHK Studio

11 May 2020, 07:41

hasantr wrote:
11 May 2020, 04:14
The code assistant will not work when you close a long bracket.

Code: Select all

hi @maestrith .

Bracket is open. The code helper works.
https://i.imgur.com/tYlS77i.png

Bracket is close. The code helper not works.
https://i.imgur.com/IZbkDcH.png
I coppied your code into Studio and collapsed your code. While the code assistant did hide itself when I clicked the collapse button all you "should" have to do to get it to come back is to either move the caret or hit the escape key. Please let me know if this doesn't resolve the issue so we can schedule a zoom meeting so that I can help troubleshoot this matter.
John H Wilson III 05/29/51 - 03/01/2020. You will be missed.AHK Studio OSDGUI Creator
Donations
Discord
All code is done on a 64 bit Windows 10 PC Running AutoHotkey x32
User avatar
hasantr
Posts: 473
Joined: 05 Apr 2016, 14:18
Location: İstanbul

Re: AHK Studio

11 May 2020, 10:52

maestrith wrote:
11 May 2020, 07:41
hasantr wrote:
11 May 2020, 04:14
The code assistant will not work when you close a long bracket.

Code: Select all

hi @maestrith .

Bracket is open. The code helper works.
https://i.imgur.com/tYlS77i.png

Bracket is close. The code helper not works.
https://i.imgur.com/IZbkDcH.png
I coppied your code into Studio and collapsed your code. While the code assistant did hide itself when I clicked the collapse button all you "should" have to do to get it to come back is to either move the caret or hit the escape key. Please let me know if this doesn't resolve the issue so we can schedule a zoom meeting so that I can help troubleshoot this matter.
I managed to run this code when I moved it alone. But when the brackets open and close, sometimes one movement is not enough to run.
It will never work in multi-line work. It works only when parentheses are open. Very frustrating. I can't find where the error originated from.

Return to “AHK Studio”

Who is online

Users browsing this forum: No registered users and 8 guests