Link to home
Start Free TrialLog in
Avatar of Luis Diaz
Luis DiazFlag for Colombia

asked on

AutoHotkey: Install ahk studio

Hello experts,
I would like to move on ahk studio as I am not fully satisfied with sciTE4AutoHotkey.
I follow instruction and download reference zip file at:
https://github.com/maestrith/AHK-Studio/archive/master.zip
I run ahk file:
User generated imageHowever I don't know how to:
1-Open with (by default) .ahk file with ahk studio. Where should I place the AHK-Studio-master folder?
User generated image2-I also don't see ahk studio in my programs features.
User generated imageI supposed that this is due to the fact that it is not a compiled version.
3-I have also the following script which allows me to edit by default .ahk files.
https://www.experts-exchange.com/questions/29157425
It open by default .ahk file with sciTE4AutoHotkey I would review it to open with ahk studio.
;====================================
;Edit file based on extension
;====================================

#NoEnv ; avoid checking empty variables to see if they are environment variables. Potential regressions if so comment this line
#SingleInstance Force ; replace old instance immediately
SetBatchLines,-1 ; run at maximum speed

+F4::
FileSelected:=GetSelectedFile()
SplitPath,FileSelected,,,FileExt
If (FileExt="ahk")
 Run,%SciTE4exe% %FileSelected%
Else
 Run,%NPPexe% %FileSelected%
Return

GetSelectedFile(hwnd="") {
; this function by sinkfaze: https://www.autohotkey.com/boards/viewtopic.php?f=6&t=77#p395
 WinGet, process, processName, % "ahk_id" hwnd := hwnd? hwnd:WinExist("A")
 WinGetClass class, ahk_id %hwnd%
 if (process = "explorer.exe")
 if (class ~= "Progman|WorkerW") {
 ControlGet, files, List, Selected Col1, SysListView321, ahk_class %class%
 Loop, Parse, files, `n, `r
 ToReturn .= A_Desktop "\" A_LoopField "`n"
 }
 else if (class ~= "(Cabinet|Explore)WClass") {
 for window in ComObjCreate("Shell.Application").Windows
 if (window.hwnd==hwnd)
 sel := window.Document.SelectedItems
 for item in sel
 ToReturn .= item.path "`n"
 }
 return Trim(ToReturn,"`n")

Open in new window


The process name of ahk studio is:
AutoHotkeyU32.exe

Thank you in advance for your feedback.
SOLUTION
Avatar of Joe Winograd
Joe Winograd
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Luis Diaz

ASKER

Thank you very much for your feedback Joe.
For the moment I am not fully convinced by ahk studio. Probably because I am accustom to use sciTE4AutoHotkey and I realized that it works not so bad. I also realized that some of my shortcuts keys clash with the one set up by ahk studio.
Additionally, what I was looking is the previous position however I don't get this on ahk studio.
As regards edit file based on extension AutoHotkey.
I would like to extend to files witch finished with .vbs.
vbsedit.exe exists at:
C:\Program Files\Vbsedit\vbsedit.exe
The following adjustment is enough?
If (FileExt="ahk")
 Run,%SciTE4exe% %FileSelected%
Else
If (FileExt="vbs")
 Run,%vbsedit.exe% %FileSelected%
Else
 Run,%NPPexe% %FileSelected%
Return

Open in new window

Thank you for your help.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Noted Joe.
I will keep the question opened for a moment as I can not adjust my ahk file right now. Thank you very much for your help.
Joe,
I tested the proposal and it works!
Thank you for your help.
You're welcome, Luis, and thanks to you for letting me know that it works. Regards, Joe