You are very welcome.
AHK Studio
Moderator: maestrith
Re: AHK Studio
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
Donations
Discord
All code is done on a 64 bit Windows 10 PC Running AutoHotkey x32
Re: AHK Studio
Hi,
Is it possible for AHK Studio to export a list of all function and lable names of the currently loaded code?
Many thanks.
Is it possible for AHK Studio to export a list of all function and lable names of the currently loaded code?
Many thanks.
Re: AHK Studio
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
Donations
Discord
All code is done on a 64 bit Windows 10 PC Running AutoHotkey x32
Re: AHK Studio
Something like:
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}
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
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
Donations
Discord
All code is done on a 64 bit Windows 10 PC Running AutoHotkey x32
Re: AHK Studio
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
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.
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
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.
Re: AHK Studio
No problem. Glad it works. OH! I edited the code, all Studio plugins need an ExitApp.DaveT1 wrote: ↑03 Apr 2020, 13:28Many 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
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.
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
Donations
Discord
All code is done on a 64 bit Windows 10 PC Running AutoHotkey x32
Re: AHK Studio
Thanks Maestrith, added ExitApp to the plugin. Much apreaciated as always.
Re: AHK Studio
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
Donations
Discord
All code is done on a 64 bit Windows 10 PC Running AutoHotkey x32
Re: AHK Studio
The code assistant will not work when you close a long bracket.
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
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()
https://i.imgur.com/tYlS77i.png
Bracket is close. The code helper not works.
https://i.imgur.com/IZbkDcH.png
Re: AHK Studio
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.hasantr wrote: ↑11 May 2020, 04:14The code assistant will not work when you close a long bracket.
Bracket is open. The code helper works.Code: Select all
hi @maestrith .
https://i.imgur.com/tYlS77i.png
Bracket is close. The code helper not works.
https://i.imgur.com/IZbkDcH.png
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
Donations
Discord
All code is done on a 64 bit Windows 10 PC Running AutoHotkey x32
Re: AHK Studio
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.maestrith wrote: ↑11 May 2020, 07:41I 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.hasantr wrote: ↑11 May 2020, 04:14The code assistant will not work when you close a long bracket.
Bracket is open. The code helper works.Code: Select all
hi @maestrith .
https://i.imgur.com/tYlS77i.png
Bracket is close. The code helper not works.
https://i.imgur.com/IZbkDcH.png
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.
-
- Posts: 29
- Joined: 24 Jun 2020, 16:42
Re: AHK Studio
I'm trying to use this on a PC that I don't have admin rights for, so I'm not able to properly install AHK, just using a portable version. So when going to Tools > Run nothing happens, and Run As returns the following:
Is there some way I can manually set the path for the ahk executable?Error: Failed attempt to launch program or document:
Action: <\AutoHotkeyU64 "C:\Users\username\ahk\project.ahk">
Params: <>
Specifically: The system cannot find the file specified.
Line#
---> 11503: Run,%dir%\%exe% "%file%",%fdir%,,pid
The current thread will exit.
Re: AHK Studio
I "think" that if you put Autohotkey.exe in the same folder as AHK-Studio, it'll run it.evilmanimani wrote: ↑24 Jun 2020, 16:53I'm trying to use this on a PC that I don't have admin rights for, so I'm not able to properly install AHK, just using a portable version. So when going to Tools > Run nothing happens, and Run As returns the following:Is there some way I can manually set the path for the ahk executable?Error: Failed attempt to launch program or document:
Action: <\AutoHotkeyU64 "C:\Users\username\ahk\project.ahk">
Params: <>
Specifically: The system cannot find the file specified.
Line#
---> 11503: Run,%dir%\%exe% "%file%",%fdir%,,pid
The current thread will exit.
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
Donations
Discord
All code is done on a 64 bit Windows 10 PC Running AutoHotkey x32
-
- Posts: 29
- Joined: 24 Jun 2020, 16:42
Re: AHK Studio
Wow, quick reply! Thanks, yeah I had tried that before, but that was with ahk-studio complied; curiously it works when I run it using ahk in the same folder, but not while compiled. I suppose I can just open it with a batch file if there's no workaround for the complied exe.
Re: AHK Studio
Let me know exactly how you're running it, is it compiled or not, and I will look and see what the actual run function entails and see what I can do.
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
Donations
Discord
All code is done on a 64 bit Windows 10 PC Running AutoHotkey x32
Re: AHK Studio
Hi Maestrith!! I just love your AHK-Studio Editor and have been using for a while.
Lately, I've notice that when AHK-Studio first loads, I'm getting an error from the Middle Scroll.ahk plugin: "Error: 0x800401F3 - Invalid class string".
The rest of the error dialog shows code lines from the plugin and points to -----> line 27: x:=ComObjActive("AHK-Studio")
I click on the Yes button to continue the script and scrolling with my mouse wheel seems to work fine in Studio, but I'd very much like to understand and fix the error, if possible.
Here's a screenshot of the error I'm getting... Any ideas? Oh, and the path to AutoHotKey is "C:\Program Files\AutoHotkey", while the path to AHK Studio is "G:\AHK-Studio", if that makes any difference.
Lately, I've notice that when AHK-Studio first loads, I'm getting an error from the Middle Scroll.ahk plugin: "Error: 0x800401F3 - Invalid class string".
The rest of the error dialog shows code lines from the plugin and points to -----> line 27: x:=ComObjActive("AHK-Studio")
I click on the Yes button to continue the script and scrolling with my mouse wheel seems to work fine in Studio, but I'd very much like to understand and fix the error, if possible.
Here's a screenshot of the error I'm getting... Any ideas? Oh, and the path to AutoHotKey is "C:\Program Files\AutoHotkey", while the path to AHK Studio is "G:\AHK-Studio", if that makes any difference.
Re: AHK Studio
What version of AHK are you using? I believe there are problems with the 64 bit version of AHK and plugins. I always run x32 so I never really had any issues.drosenhe wrote: ↑25 Jun 2020, 17:42Hi Maestrith!! I just love your AHK-Studio Editor and have been using for a while.
Lately, I've notice that when AHK-Studio first loads, I'm getting an error from the Middle Scroll.ahk plugin: "Error: 0x800401F3 - Invalid class string".
The rest of the error dialog shows code lines from the plugin and points to -----> line 27: x:=ComObjActive("AHK-Studio")
I click on the Yes button to continue the script and scrolling with my mouse wheel seems to work fine in Studio, but I'd very much like to understand and fix the error, if possible.
Here's a screenshot of the error I'm getting... Any ideas?
2020-06-25 15_21_02-Middle Scroll.ahk.png
Oh, and the path to AutoHotKey is "C:\Program Files\AutoHotkey", while the path to AHK Studio is "G:\AHK-Studio", if that makes any difference.
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
Donations
Discord
All code is done on a 64 bit Windows 10 PC Running AutoHotkey x32
Re: AHK Studio
Interesting. Didn’t know you could register an AHK script for COM.
Re: AHK Studio
Yep. It's pretty cool You can setup a Class that works with the Com and it basically works just like it was integrated like IE
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
Donations
Discord
All code is done on a 64 bit Windows 10 PC Running AutoHotkey x32
Re: AHK Studio
Is there any documentation out there on doing this or any tutorials you know of? Or even files/lines in your code I could look at?