Skip to content

Commit

Permalink
Improve DialogJumpToListerPath
Browse files Browse the repository at this point in the history
  • Loading branch information
Chaoses-Ib committed Apr 4, 2021
1 parent 1ea6e59 commit 93663ea
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 13 deletions.
27 changes: 16 additions & 11 deletions DialogJumpToListerPath.ahk
Original file line number Diff line number Diff line change
@@ -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, '<path active_lister="1" [^>]* 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, '<path active_lister="1" [^>]* tab_state="1">([^<]*)' , Match)
if(!Match)
return
Send "{Text}" . Match[1] . "`n"
return
#HotIf WinActive("ahk_class #32770") ;File dialog
^e::DOpus_SendPath()
#HotIf

#Hotstring EndChars `n `t
:OX://cur::DOpus_SendPath()
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion README.zh-Hans.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 尺寸列)
Expand Down

0 comments on commit 93663ea

Please sign in to comment.