Re: AHK Studio
Posted: 11 Mar 2020, 05:59
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
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.
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()
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
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
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.
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.
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.
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?