3

I have been using a launcher application (Listary), however, it hasn't been updated in a long time and I would like to stop using it as it tends to eat memory for breakfast.

However, it has a useful feature that I use many times a day, and that is if you have a normal file explorer window open, and you also have a file dialogue open (e.g. saving or opening a file in an application), then Listary will synchronise/jump to the same folder in your file dialogue.

It's a bit hard to explain in text, so here's a video showing what it does, along with a screenshot:

enter image description here

So my question is, what could I use to replicate this without using Listary? I've tried searching but the only thing I came up with is this question, but I'd rather not use unsupported software if possible.

Any solution is fine really, Autohotkey or a third-party application (preferably free/O/S).

1
  • 1
    I continue using Listary only for this feature. Did you find any alternative? Commented Jul 22, 2022 at 14:39

1 Answer 1

3

Try this Autohotkey script:

#NoEnv
#SingleInstance Force
#Persistent

; create a group of the file dialogue windows
GroupAdd, file_dialogue_Group, Open ahk_class #32770
GroupAdd, file_dialogue_Group, Save As ahk_class #32770

SetTimer, ExplorerPathInFileDialogue, 300  ; check every 300 ms
Return

ExplorerPathInFileDialogue: 
    If !WinActive("ahk_group file_dialogue_Group")  ; "!" means "NOT" in this case
        return  ; do nothing
    If !WinExist("ahk_class CabinetWClass") ; explorer
        return
    ; otherwise:
    SendInput, % GetExplorerPath() 
    Sleep, 100
    SendInput, {Enter}{Del}
    SetTimer, ExplorerPathInFileDialogue, Off
    WinWaitClose, ahk_group file_dialogue_Group
    SetTimer, ExplorerPathInFileDialogue, On
Return

GetExplorerPath(){
    for window in ComObjCreate("Shell.Application").Windows
    {
       explorer_path := ""
       try explorer_path := window.Document.Folder.Self.Path
       if (explorer_path != "")
            return explorer_path
    }
}

https://autohotkey.com/docs/commands/SetTimer.htm

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .