Skip to content

Commit ced51b5

Browse files
committed
Edit Update
Fixed button images for binary Added ability to set edit path Added shortcut to the registry edit entry
1 parent 378d95c commit ced51b5

File tree

6 files changed

+24
-4
lines changed

6 files changed

+24
-4
lines changed

ScriptUp.ahk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ if(a_isCompiled){
1414
fileInstall,data\dlls\std64.dll,data\dlls\std64.dll
1515
fileInstall,data\imgs\b1.png,data\imgs\b1.png
1616
fileInstall,data\imgs\b2.png,data\imgs\b2.png
17+
fileInstall,data\imgs\b3.png,data\imgs\b3.png
18+
fileInstall,data\imgs\b4.png,data\imgs\b4.png
19+
fileInstall,data\imgs\b5.png,data\imgs\b5.png
1720
fileInstall,data\imgs\MXIII.png,data\imgs\MXIII.png
1821
fileInstall,data\workerH.ahk,data\workerH.ahk
1922
}
@@ -30,6 +33,7 @@ if(!fileExist(sini))
3033
firstRun:=1
3134

3235
; load settings
36+
iniRead,editPath,% sini,settings,editPath,0
3337
iniRead,hideDeleteWarning,% sini,settings,hideDeleteWarning,0
3438
regRead,loginRun,% regStartupPath:="HKCU\Software\Microsoft\Windows\CurrentVersion\Run",ScriptUp
3539
if(!errorLevel) ; auto-correct if the script has been moved

data/guiSubs.ahk

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,17 @@ if(!ahkDir)
6262
fileCreateShortcut,% ahkDir . "\Lib",% a_scriptDir . "\Lib.lnk"
6363
return
6464

65+
editPath:
66+
inputBox,editPathNew,Edit Path,% "Set the path of the editor to use for the ""Edit"" item on the context menu. Leave empty to use registry entry.`nCurrent path: " . (editPath?editPath:"Use Registry") . "."
67+
if(!errorLevel)
68+
iniWrite,% editPath:=editPathNew,% sini,settings,editPath
69+
return
70+
71+
regEditPath:
72+
regWrite,REG_SZ,HKCU\Software\Microsoft\Windows\CurrentVersion\Applets\Regedit,LastKey,Computer\HKEY_CLASSES_ROOT\AutoHotkeyScript\shell\Edit\command
73+
run,regedit.exe
74+
return
75+
6576
lvCallback:
6677
if(a_guiEvent="Normal")
6778
selectedRow:=a_eventInfo

data/imgs/b4.png

762 Bytes
Loading

data/imgs/b5.png

1.02 KB
Loading

data/menuSubs.ahk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ return
2020

2121
editScript:
2222
lv_getText(scr,selectedRow)
23-
worker.ahkPostFunction("do","edit",scr,"")
23+
worker.ahkPostFunction("do","edit",scr,editPath)
2424
return
2525

2626
removeScript:

data/workerH.ahk

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,14 @@ class fileList {
101101
}
102102
toolTip
103103
}
104-
edit(scriptName){
105-
try
106-
run,% "edit """ . this.scripts[scriptName].path . """"
104+
edit(scriptName,editor:=""){
105+
if(editor){
106+
try
107+
run,% """" . editor . """ """ . this.scripts[scriptName].path . """"
108+
}else{
109+
try
110+
run,% "edit """ . this.scripts[scriptName].path . """"
111+
}
107112
}
108113
exec(scriptName,code){
109114
if(this.pauseState(scriptName))

0 commit comments

Comments
 (0)