diff --git a/DialogJumpToListerPath.ahk b/DialogJumpToListerPath.ahk index f4a9ffe..4cd225a 100644 --- a/DialogJumpToListerPath.ahk +++ b/DialogJumpToListerPath.ahk @@ -1,16 +1,21 @@ ; DialogJumpToListerPath -; Description: When in file dialog, focus on the edit control, and press Ctrl+E to jump to the last actived folder of listers. (AHK v2) +; Description: When in file dialog, focus on the editor, and press Ctrl+E to jump to the last actived folder of listers. If Ctrl+E not work, type "//cur " to trigger it. (AHK v2) ; Author: Chaoses Ib -; Version: 210310 +; Version: 210404 ; Git: https://github.com/Chaoses-Ib/IbDOpusScripts -#If WinActive("ahk_class #32770") ;File dialog +DOpus_SendPath(){ + RunWait A_ProgramFiles . "\GPSoftware\Directory Opus\dopusrt.exe /info " . A_Temp . "\DOpus_pathlist.txt,paths" + paths := FileRead(A_Temp . "\DOpus_pathlist.txt") + RegExMatch(paths, ']* tab_state="1">([^<]*)' , Match) + if(!Match) + return + Send "{Text}" . Match[1] . "`n" +} -^e:: -RunWait A_ProgramFiles . "\GPSoftware\Directory Opus\dopusrt.exe /info " . A_Temp . "\DOpus_pathlist.txt,paths" -paths := FileRead(A_Temp . "\DOpus_pathlist.txt") -RegExMatch(paths, ']* tab_state="1">([^<]*)' , Match) -if(!Match) - return -Send "{Text}" . Match[1] . "`n" -return \ No newline at end of file +#HotIf WinActive("ahk_class #32770") ;File dialog +^e::DOpus_SendPath() +#HotIf + +#Hotstring EndChars `n `t +:OX://cur::DOpus_SendPath() \ No newline at end of file diff --git a/README.md b/README.md index 54c1b88..af88a75 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Extract selected archive to subfolder if there's more than one file under the ro * [CloseTabOrLister](CloseTabOrLister.js) If there's only one tab, close the lister, otherwise close current tab. * [DialogJumpToListerPath](DialogJumpToListerPath.ahk) -When in file dialog, focus on the edit control, and press Ctrl+E to jump to the last actived folder of listers. (Need AutoHotkey v2) +When in file dialog, focus on the editor, and press Ctrl+E to jump to the last actived folder of listers. If Ctrl+E not work, type "//cur " to trigger it. (Need AutoHotkey v2) * [PasteInto](PasteInto.js) Paste files into every selected folder. * [SizeColByEverything](SizeColByEverything/README.zh-Hans.md) diff --git a/README.zh-Hans.md b/README.zh-Hans.md index 8a84f8a..e71c311 100644 --- a/README.zh-Hans.md +++ b/README.zh-Hans.md @@ -8,7 +8,7 @@ * [CloseTabOrLister](CloseTabOrLister.js)(关闭标签页) 关闭当前标签页,如果只剩一个,就直接关闭窗口。 * [DialogJumpToListerPath](DialogJumpToListerPath.ahk)(对话框跳转) -在文件对话框的编辑框中按 Ctrl+E,跳转到 DOpus 最后激活的文件夹。(需要 AutoHotkey v2) +在文件对话框的编辑框中按 Ctrl+E,跳转到 DOpus 最近激活的文件夹。如果 Ctrl+E 用不了,输入“//cur ”来触发。(需要 AutoHotkey v2) * [PasteInto](PasteInto.js)(粘贴进去) 把文件粘贴进每个选中的文件夹。 * [SizeColByEverything](SizeColByEverything/README.zh-Hans.md)(Ev 尺寸列)