├── JumpToFolder.ahk ├── README.md └── img └── JumpToFolder.gif /JumpToFolder.ahk: -------------------------------------------------------------------------------- 1 | $ThisVersion := "1.0.8" 2 | 3 | ;@Ahk2Exe-SetVersion 1.0.8 4 | ;@Ahk2Exe-SetName JumpToFolder 5 | ;@Ahk2Exe-SetDescription Change active folder using Everything. 6 | ;@Ahk2Exe-SetCopyright NotNull 7 | 8 | /* 9 | By : NotNull 10 | Info : https://www.voidtools.com/forum/viewtopic.php?f=2&t=11194 11 | 12 | 13 | 14 | v 1.0.8 15 | - Added support for Directory Opus 16 | - Added routine to select the file in file managers 17 | - BugFix: could be waiting on clipboard change indefinitely under certain conditions 18 | - Improved timing 19 | 20 | 21 | 22 | Version history at the end. 23 | 24 | */ 25 | 26 | 27 | 28 | ;_____________________________________________________________________________ 29 | ; 30 | ; SETTINGS 31 | ;_____________________________________________________________________________ 32 | 33 | #SingleInstance Force 34 | #NoEnv 35 | ;#Warn ; Enable warnings to assist with detecting common errors. 36 | SendMode Input 37 | SetBatchLines -1 38 | SetWorkingDir %A_ScriptDir% 39 | SetTitleMatchMode, RegEx 40 | 41 | 42 | $IniFile := "JumpToFolder.ini" 43 | 44 | 45 | 46 | ; When settings not found in INI, use Out-Of-The-Box settings: 47 | ; Also used for resetting settings 48 | ; Icon: Use the same structure that PickIconDlg would return (for comparison). 49 | 50 | 51 | $OOB_everything_exe := A_Space 52 | $OOB_also_search_files := 1 53 | $OOB_sort_by := "Run Count" 54 | $OOB_sort_ascending := 0 55 | $OOB_contextmenu_text := "Jump to Folder ..." 56 | $OOB_contextmenu_icon := A_WinDir . "\system32\SHELL32.dll,23" 57 | 58 | ; Non-GUI options 59 | $OOB_detected_everything_version := "" 60 | $OOB_everything_instance := """""" 61 | $OOB_debug := 0 62 | 63 | ; DopusDebug 64 | ; $OOB_slowdown := 200 65 | 66 | 67 | 68 | ; Read settings from INI file 69 | IniRead, $everything_exe, %$IniFile%, JumpToFolder, everything_exe, %$OOB_everything_exe% 70 | IniRead, $also_search_files, %$IniFile%, JumpToFolder, also_search_files, %$OOB_also_search_files% 71 | IniRead, $sort_by, %$IniFile%, JumpToFolder, sort_by, %$OOB_sort_by% 72 | IniRead, $sort_ascending, %$IniFile%, JumpToFolder, sort_ascending, %$OOB_sort_ascending% 73 | IniRead, $contextmenu_text, %$IniFile%, JumpToFolder, contextmenu_text, %$OOB_contextMenu_text% 74 | IniRead, $contextmenu_icon, %$IniFile%, JumpToFolder, contextmenu_icon, %$OOB_contextMenu_icon% 75 | 76 | 77 | ; Read non-GUI INI settings 78 | IniRead, $detected_everything_version, %$IniFile%, JumpToFolder, detected_everything_version, %$OOB_detected_everything_version% 79 | IniRead, $everything_instance,%$IniFile%, JumpToFolder, everything_instance, %$OOB_everything_instance% 80 | IniRead, $debug, %$IniFile%, JumpToFolder, debug, %$OOB_debug% 81 | IniRead, $start_everything, %$IniFile%, JumpToFolder, start_everything 82 | 83 | 84 | ; Expand environment variables in some ini entries 85 | $everything_exe := ExpandEnvVars( $everything_exe ) 86 | $contextmenu_icon := ExpandEnvVars( $contextmenu_icon ) 87 | $everything_instance := ExpandEnvVars( $everything_instance ) 88 | $start_everything := ExpandEnvVars( $start_everything ) 89 | 90 | 91 | DebugMsg( "MAIN" , "Starting JumpToFolder version [" . $ThisVersion . "]" ) 92 | 93 | 94 | ;_____________________________________________________________________________ 95 | ; 96 | ; CHECKS, PART 1 97 | ;_____________________________________________________________________________ 98 | ; 99 | 100 | ; Check if OS is 64-bit or 32-bit 101 | ; OS and ahk.exe must have the same bitness. Else exit 102 | 103 | If (A_PtrSize = 8) AND ( A_Is64bitOS ) ; Both 64-bit 104 | { 105 | $bitness := 64 106 | } 107 | Else If (A_PtrSize = 4) AND ( !A_Is64bitOS ) ; Both 32-bit 108 | { 109 | $bitness := 32 110 | } 111 | Else If ( A_Is64bitOS ) ; 64-bit Win vs 32-bit ahk 112 | { 113 | MsgBox You need the 64-bit version of JumpToFolder 114 | ExitApp 115 | } 116 | Else ; 32-bit Win vs 64-bit ahk 117 | { 118 | MsgBox You need the 32-bit version of JumpToFolder 119 | ExitApp 120 | } 121 | 122 | ; Don't Check availability and bitness Everythingnn.dll 123 | ; If not available, no incrementing runcount. No dealbreaker. 124 | ; Bitness isn't relevant either as IPC communication is always 32-bit. 125 | 126 | 127 | 128 | $everything_instance := Trim($everything_instance," """"") 129 | 130 | 131 | 132 | ; Parameter check. 133 | ; 4 possibilities: 134 | ; - started through file association ("c:\path to\ahk.exe" "x:\path to script.ahk" [parms]) 135 | ; - started through renamed ahk.exe ("x:\path to\script.exe" ["x:\path to script.ahk"] [parms]) 136 | ; - started as compiled version ("X:\path to\ahk.exe" [parms]) 137 | ; - started by random ahk.exe (drag/drop script.ahk or command D:\ahk.exe "x:\path to script.ahk" [parms]) 138 | ; 139 | ; In all cases: parm1 =-jump (or nothing) 140 | 141 | 142 | If ( A_Args[1] != "-jump" ) 143 | { 144 | Goto GUI 145 | } 146 | 147 | ; We are here because parm -jump detected. Start Everything, etc .. 148 | 149 | 150 | ;_____________________________________________________________________________ 151 | ; 152 | ; CHECKS, PART 2 153 | ;_____________________________________________________________________________ 154 | ; 155 | 156 | ; Check most important (INI) settings 157 | 158 | IfNotExist, %$everything_exe% 159 | { 160 | MsgBox "%$everything_exe%" can not be found.`nCheck your JumpToFolder settings. 161 | ; start JumpToFolder without parms to change settings 162 | ExitApp 163 | } 164 | 165 | 166 | ; Check Everything version (1.4/1.5) if not specified in INI 167 | 168 | DebugMsg( "Checks" , "Everything version = [" . $detected_everything_version . "]" ) 169 | 170 | If !( $detected_everything_version == "1.4" OR $detected_everything_version == "1.5" ) 171 | { 172 | MsgBox This is not a supported Everything version.`r`n1.4 and 1.5 are supported.`r`n`r`nCheck and save your settings in the GUI. 173 | ExitApp 174 | } 175 | 176 | 177 | 178 | 179 | ;============================================================================= 180 | ;============================================================================= 181 | ;============================================================================= 182 | ;============================================================================= 183 | ; 184 | ; MAIN PROGRAM 185 | ; 186 | ;============================================================================= 187 | ;============================================================================= 188 | ;============================================================================= 189 | ;============================================================================= 190 | 191 | ;_____________________________________________________________________________ 192 | ; 193 | ; INIT 194 | ;_____________________________________________________________________________ 195 | 196 | 197 | 198 | ; Read Doubleclick speed (system setting) 199 | 200 | $DoubleClickTime := DllCall("GetDoubleClickTime") 201 | 202 | 203 | 204 | ; Define hotkeys to be used in Everything 205 | 206 | 207 | Hotkey, Escape, HandleEscape, Off 208 | Hotkey, LButton, HandleClickHotkey, Off 209 | Hotkey, Enter, HandleEnterHotkey, Off 210 | 211 | 212 | ;_____________________________________________________________________________ 213 | ; 214 | ; REGULAR CODE 215 | ;_____________________________________________________________________________ 216 | 217 | ; MsgBox DEBUG: And we're off !!! 218 | 219 | 220 | ; How and where is this started? Will return WindowType (Open/SaveAs dialog;explorer; ...) 221 | 222 | Gosub GetWindowType 223 | 224 | DebugMsg( "MAIN" , "Detected WindowType = [" . $WindowType . "]") 225 | 226 | ; Next version; Read the currently active path in file dialog or -manager. 227 | ; And add thgat as the Everything search path. 228 | ; WIP 229 | ; If IsFunc( "PathFrom" . $WindowType ) 230 | ; MsgBox PathFrom%$WindowType% exists 231 | 232 | 233 | ; Start Everything; select a file or folder there. 234 | 235 | $EverythingID := StartEverything($everything_exe) 236 | 237 | DebugMsg( "MAIN" , "EverythingID = [" . $EverythingID . "]" ) 238 | 239 | 240 | 241 | 242 | Loop ; Start of WinWaitActive/WinWaitNotActive loop. 243 | { 244 | WinWaitActive, ahk_id %$EverythingID% 245 | 246 | ; Wait for Enter/Escape/ mouse double-click 247 | ; Read selected file/folder and .. 248 | ; Close Everything so we can continue with WinWaitNotActive 249 | 250 | DebugMsg( "Everything active" , "We are in Everything" ) 251 | 252 | 253 | ; The following hotkeys trigger getting the selected path in Everything. 254 | ; Returns $FolderPath and $FileName 255 | Hotkey, Escape, On 256 | Hotkey, LButton, On 257 | Hotkey, Enter, On 258 | 259 | 260 | 261 | ; Listen for keyboard presses ESC and ENTER and respond to that. 262 | ; Also respond to double-click in result list. 263 | ; If any of those were used, Everything will be closed, 264 | ; so we can continue with: 265 | 266 | 267 | WinWaitNotActive 268 | 269 | 270 | Hotkey, Escape, Off 271 | Hotkey, LButton, Off 272 | Hotkey, Enter, Off 273 | 274 | 275 | ; In case another window was activated before getting the path. 276 | WinClose, ahk_id %$EverythingID% 277 | 278 | 279 | ; Prepare found path to be fed to the original application (file manager/ -dialog) 280 | ; using the Feed%$WindowType% routine. 281 | 282 | ; check if found path empty. Do nothing (exit) in that case. 283 | If ( $FoundPath ) 284 | { 285 | DebugMsg( A_ThisLabel . A_ThisFunc, "Valid Path: [" . $FoundPath . "]" ) 286 | PathSplit($FoundPath, $FolderPath, $FileName) 287 | 288 | ; Add a backslash th FolderPath 289 | $FolderPath := $FolderPath . "\" 290 | 291 | DebugMsg( A_ThisLabel . A_ThisFunc, "$FolderPath = [" . $FolderPath . "]`r`n$FileName = [" . $FileName . "]") 292 | 293 | Feed%$WindowType%( $WinID, $FolderPath, $FileName ) 294 | } 295 | ExitApp 296 | 297 | 298 | } ; End of WinWaitActive/WinWaitNotActive loop. 299 | 300 | 301 | MsgBox We never get here (and that's how it should be) 302 | 303 | 304 | 305 | 306 | ;============================================================================= 307 | ;============================================================================= 308 | ; 309 | ; SUBROUTINES 310 | ; 311 | ;============================================================================= 312 | ;============================================================================= 313 | 314 | 315 | 316 | ;_____________________________________________________________________________ 317 | ; 318 | GetPathFromEverything(_EverythingID) 319 | ;_____________________________________________________________________________ 320 | ; 321 | { 322 | Global $DoubleClickTime 323 | Global $majorversion 324 | Global $detected_everything_version 325 | 326 | $EVERYTHING_IPC_ID_FILE_COPY_FULL_PATH_AND_NAME := 41007 327 | 328 | If ( $detected_everything_version == "1.5") 329 | { 330 | ControlGetText, _FoundPath, EVERYTHING_RESULT_LIST_FOCUS1, A 331 | DebugMsg( A_ThisLabel . A_ThisFunc, "detected_everything_version = [" . $detected_everything_version . "]`r`nFound path = [" . _FoundPath . "]" ) 332 | } 333 | Else If ( $detected_everything_version == "1.4") 334 | { 335 | 336 | _ClipOrg := ClipBoard 337 | 338 | ClipBoard := "" 339 | Sleep 50 340 | 341 | SendMessage, 0x111, %$EVERYTHING_IPC_ID_FILE_COPY_FULL_PATH_AND_NAME%,,, A 342 | ClipWait,1 343 | _FoundPath := Clipboard 344 | 345 | 346 | DebugMsg( A_ThisLabel . A_ThisFunc, "detected_everything_version = [" . $detected_everything_version . "]" . "`r`n" . "Found path = [" . _FoundPath . "]" ) 347 | 348 | Sleep 20 349 | 350 | ClipBoard := _ClipOrg 351 | } 352 | else ; should never happen 353 | { 354 | MsgBox Somehow this is not really Everything 1.4 or 1.5. Check your settings. 355 | } 356 | 357 | Return _FoundPath 358 | } 359 | 360 | 361 | 362 | ;_____________________________________________________________________________ 363 | ; 364 | GetWindowType: 365 | ;_____________________________________________________________________________ 366 | ; 367 | ; Get handle ($WinID) of active windows 368 | $WinID := WinExist("A") 369 | 370 | ; Get More info on this window 371 | 372 | ; Get ahk_class 373 | WinGetClass, $ahk_class, ahk_id %$WinID% 374 | 375 | ; Get ahk_exe 376 | WinGet, $ahk_exe, ProcessName, ahk_id %$WinID% 377 | 378 | ; Get executable name including path. 379 | ; We need this for some filemanagers that will be (re)started with parameters. 380 | 381 | WinGet, $Running_exe, ProcessPath, ahk_id %$WinID% 382 | 383 | 384 | ; Define window type (for usage later on) 385 | ; Detection preference order: 1. ahk_class 2. ahk_exe 386 | 387 | ; Ignore the Desktop 388 | 389 | If ( $ahk_class = "Progman" ) ; Desktop 390 | { 391 | ExitApp 392 | } 393 | 394 | 395 | else If ($ahk_class = "TTOTAL_CMD") ; Total Commander 396 | { 397 | $WindowType = TotalCMD 398 | } 399 | 400 | ; else If ($ahk_exe = "xplorer2_UC.exe" OR $ahk_exe = xplorer2.exe") ; XPlorer2 401 | else If ($ahk_class = "ATL:ExplorerFrame") ; XPlorer2 402 | { 403 | $WindowType = XPlorer2 404 | } 405 | 406 | 407 | else If ($ahk_class = "dopus.lister") ; Directory Opus 408 | { 409 | $WindowType = DirectoryOpus 410 | } 411 | 412 | else If ($ahk_class = "DClass") ; Double Commander 413 | { 414 | $WindowType = DoubleCommander 415 | } 416 | 417 | ; Q-Dir has a semi-random ahk_class: class ATL:000000014018D720 418 | ; Too risky. Fall back : ahk_exe 419 | else If ($ahk_exe = "Q-Dir_x64.exe" or $ahk_exe = "Q-Dir.exe") ; Q-Dir 420 | { 421 | $WindowType = QDirFileMan 422 | } 423 | 424 | ; ahk_class Salamander 3 and 4 is SalamanderMainWindowVer25, but might vary. 425 | else If ( InStr($ahk_class, "SalamanderMainWindow") > 0) ; Altap Salamander 426 | { 427 | $WindowType = Salamander 428 | } 429 | 430 | else If ($ahk_exe = "XYplorer.exe") ; XYplorer 431 | { 432 | $WindowType = XYPlorer 433 | } 434 | 435 | 436 | else If ($ahk_exe = "explorer.exe") ; Windows File Manager 437 | { 438 | ; Win10: WorkerW = desktop CabinetWClass = File Explorer 439 | ; Older: Progman = desktop CabinetWClass = File Explorer 440 | 441 | $WindowType := "ExplorerFileMan" 442 | } 443 | 444 | else If ($ahk_exe = "FreeCommander.exe") ; Has no easy entry point ; Free Commander 445 | { 446 | $WindowType = FreeCommander 447 | } 448 | 449 | else If ($ahk_class = "#32770") ; Open/Save dialog 450 | { 451 | 452 | $WindowType := SmellsLikeAFileDialog($WinID) 453 | 454 | If $WindowType ; This is a supported dialog 455 | { 456 | ; MsgBox WindowType = %$WindowType% 457 | } 458 | else 459 | { 460 | MsgBox This is not (yet) supported in %$ahk_exe% .. ; Rest 461 | ; MsgBox Not a supported WindowType 462 | } 463 | } 464 | 465 | else 466 | { 467 | MsgBox This is not (yet) supported in %$ahk_exe% .. ; Rest 468 | ExitApp 469 | } 470 | 471 | return 472 | 473 | 474 | 475 | 476 | ;_____________________________________________________________________________ 477 | ; 478 | SmellsLikeAFileDialog(_thisID ) 479 | ;_____________________________________________________________________________ 480 | ; 481 | { 482 | 483 | ; Only consider this dialog a possible file-dialog when: 484 | ; (SysListView321 AND ToolbarWindow321) OR (DirectUIHWND1 AND ToolbarWindow321) controls detected 485 | ; First is for Notepad++; second for all other filedialogs 486 | ; That is our rough detection of a File dialog. 487 | ; Returns the detected dialogtype ("OpenSave"/"OpenSave_SYSLISTVIEW"/FALSE) 488 | 489 | WinGet, _controlList, ControlList, ahk_id %_thisID% 490 | 491 | Loop, Parse, _controlList, `n 492 | { 493 | If ( A_LoopField = "SysListView321" ) 494 | _SysListView321 := 1 495 | 496 | If ( A_LoopField = "ToolbarWindow321") 497 | _ToolbarWindow321 := 1 498 | 499 | If ( A_LoopField = "DirectUIHWND1" ) 500 | _DirectUIHWND1 := 1 501 | 502 | If ( A_LoopField = "Edit1" ) 503 | _Edit1 := 1 504 | } 505 | 506 | 507 | If ( _DirectUIHWND1 and _ToolbarWindow321 and _Edit1 ) 508 | { 509 | Return "OpenSave" 510 | 511 | } 512 | Else If ( _SysListView321 and _ToolbarWindow321 and _Edit1 ) 513 | { 514 | Return "OpenSave_SYSLISTVIEW" 515 | } 516 | else 517 | { 518 | Return FALSE 519 | } 520 | 521 | } 522 | 523 | 524 | 525 | ;_____________________________________________________________________________ 526 | ; 527 | StartEverything(_everything_exe) 528 | ;_____________________________________________________________________________ 529 | ; 530 | ; Start Everything (new window) withe specific settings from ini) 531 | ; Returns the windowID 532 | { 533 | ; Global $everything_exe 534 | Global $sort_by 535 | Global $also_search_files 536 | Global $everything_instance 537 | Global $start_everything 538 | 539 | 540 | _folders := $also_search_files ? "" : "folder: " 541 | 542 | 543 | If ( $start_everything = "ERROR" OR $start_everything = "" ) 544 | { 545 | ; Get Working directory 546 | SplitPath, _everything_exe, , _everything_workdir 547 | _everything_workdir := Trim(_everything_workdir," """"") 548 | 549 | Run, "%_everything_exe%" -sort "%$sort_by%" -instance "%$everything_instance%" -details -filter "JumpToFolder" -newwindow -search "%_folders%",%_everything_workdir%,, $EvPID 550 | } 551 | else ; special cases if start_everything INI-entry is defined. 552 | { 553 | ; Get Working directory 554 | SplitPath, $start_everything, , _everything_workdir 555 | _everything_workdir := Trim(_everything_workdir," """"") 556 | 557 | Run, %$start_everything% -details -filter "JumpToFolder" -newwindow -search "%_folders%",%_everything_workdir%,, $EvPID 558 | } 559 | 560 | ; Wait until Everything is loaded 561 | WinWaitActive, ahk_class ^EVERYTHING 562 | 563 | 564 | ; Get the ID of the window on top (assumption: that must be the freshly started Everything) 565 | WinGet, _thisID, ID, A 566 | 567 | 568 | ; Remove menu bar of this Everything window (1.4) 569 | DllCall("SetMenu", "uint", _thisID, "uint", 0) 570 | ; Everything 1.5 draws its own menu; disble it. 571 | Control Disable,, EVERYTHING_MENUBAR1, A 572 | ; Control Hide,, EVERYTHING_MENUBAR1, A 573 | 574 | 575 | ; OK, we started Everything; we've got the ID of the Everything window, so we can talk to it later on. 576 | 577 | Return _thisID 578 | } 579 | 580 | 581 | ;_____________________________________________________________________________ 582 | ; 583 | ValidPath(_thisPath) 584 | ;_____________________________________________________________________________ 585 | ; 586 | ; Check if path exists; returns True/False 587 | { 588 | 589 | ; _thisPath := Trim( _thisFOLDER , "\") 590 | ; _withoutQuotes := Trim(_thisPath," """"") 591 | ; MsgBox _thisPath = [%_withoutQuotes%] 592 | 593 | ; IfNotExist, %_withoutQuotes% 594 | IfNotExist, %_thisPath% 595 | { 596 | return false 597 | } 598 | else 599 | { 600 | return true 601 | } 602 | } 603 | 604 | 605 | 606 | ;_____________________________________________________________________________ 607 | ; 608 | PathSplit(_thisPath, ByRef $FolderPath, ByRef $FileName) 609 | ;_____________________________________________________________________________ 610 | ; 611 | ; Splits path in folder- and filename part 612 | { 613 | 614 | ; Check if $Result is a file or a folder. Use this to define variables: 615 | ; If folder: create $FolderPath 616 | ; If file: create $FolderPath AND $FileName 617 | ; Those will be used in the "Feed" routines (if applicable) 618 | 619 | if InStr(FileExist(_thisPath), "D") 620 | { ; it's a folder 621 | ; DopusDebug 622 | ; Sleep %$slowdown% 623 | $FolderPath := _thisPath 624 | $FileName := "" 625 | } 626 | else 627 | { ; it has to be a file 628 | SplitPath, _thisPath, $FileName, $FolderPath 629 | 630 | } 631 | ; DopusDebug 632 | ; Sleep %$slowdown% 633 | 634 | DebugMsg( A_ThisLabel . A_ThisFunc , "dir = [" . $FolderPath . "]`r`n Name = [" . $FileName . "]" ) 635 | 636 | 637 | Return 638 | } 639 | 640 | 641 | 642 | ;_____________________________________________________________________________ 643 | ; 644 | HandleEscape: 645 | ;_____________________________________________________________________________ 646 | ; 647 | { 648 | WinClose, ahk_id %$EverythingID% 649 | 650 | Return 651 | } 652 | 653 | 654 | ;_____________________________________________________________________________ 655 | ; 656 | HandleClickHotkey: 657 | ;_____________________________________________________________________________ 658 | ; 659 | { 660 | 661 | ; Detect if in Result list: 662 | MouseGetPos, , , , _focus 663 | 664 | If (_focus = "SysListView321") 665 | { 666 | If !(A_ThisHotkey = A_PriorHotkey and A_TimeSincePriorHotkey < $DoubleClickTime) 667 | { ; Single-click detected 668 | Send {%A_ThisHotkey%} 669 | return 670 | } 671 | 672 | ; Double-click in resultlist detected, grab file/foldername 673 | 674 | 675 | $FoundPath := GetPathFromEverything($EverythingID) 676 | 677 | ; Strip double-quotes and spaces 678 | $FoundPath := Trim( $FoundPath, " """"" ) 679 | 680 | ; Trim trailing backslash? 681 | $FoundPath := RTrim( $FoundPath, "\" ) 682 | 683 | DebugMsg( A_ThisLabel . A_ThisFunc, "Found :`r`n[" . $FoundPath . "]" ) 684 | 685 | 686 | If ( $FoundPath ) 687 | { 688 | DebugMsg( A_ThisLabel . A_ThisFunc, "You selected path:`r`n" . "[" . $FoundPath . "]" ) 689 | } 690 | 691 | 692 | If ValidPath($FoundPath) 693 | { 694 | ; We got our path; close Everything 695 | WinClose, ahk_id %$EverythingID% 696 | 697 | } 698 | else 699 | { 700 | 701 | DebugMsg( A_ThisLabel . A_ThisFunc, "NOT a valid Path:`r`n[" . $FoundPath . "]" ) 702 | MsgBox,,,Path could not be found. Maybe off-line?`r`n[%$FoundPath%], 3 703 | $FoundPath := "" 704 | } 705 | } 706 | 707 | else if (GetKeyState("LButton","P")) ; drag event outside resultlist 708 | { 709 | sleep,20 710 | Send, {LButton Down} 711 | while (GetKeyState("LButton","P")) 712 | sleep,20 713 | Send, {LButton Up} 714 | } 715 | else ;simple click outside resultlist. Let it pass. 716 | { 717 | ; send,{LButton} 718 | Send {%A_ThisHotkey%} 719 | } 720 | } 721 | Return 722 | 723 | 724 | 725 | 726 | ;_____________________________________________________________________________ 727 | ; 728 | HandleEnterHotkey: 729 | ;_____________________________________________________________________________ 730 | ; 731 | { 732 | 733 | ; Detect if in Result list: 734 | ControlGetFocus, _focus, ahk_id %$EverythingID% 735 | 736 | If (_focus = "SysListView321") 737 | { 738 | 739 | ; ENTER in resultlist detected, grab file/foldername 740 | 741 | $FoundPath := GetPathFromEverything($EverythingID) 742 | Sleep 20 743 | 744 | DebugMsg( A_ThisLabel . A_ThisFunc, "Found :`r`n[" . $FoundPath . "]" ) 745 | 746 | 747 | If ( $FoundPath ) 748 | { 749 | DebugMsg( A_ThisLabel . A_ThisFunc, "You selected path:`r`n" . "[" . $FoundPath . "]" ) 750 | } 751 | 752 | If (ValidPath($FoundPath)) 753 | { 754 | ; We got our path; close Everything 755 | WinClose, ahk_id %$EverythingID% 756 | } 757 | Else 758 | { 759 | DebugMsg( A_ThisLabel . A_ThisFunc, "NOT a valid Path:`r`n[" . $FoundPath . "]" ) 760 | MsgBox,,,Path could not be found. Maybe off-line?`r`n[%$FoundPath%], 3 761 | 762 | } 763 | } 764 | else ; ENTER outside result list; let it through 765 | { 766 | Send {%A_ThisHotkey%} 767 | } 768 | } 769 | 770 | Return 771 | 772 | 773 | 774 | 775 | ;_____________________________________________________________________________ 776 | ; 777 | IsFocusedControl(_thiscontrol) 778 | ;_____________________________________________________________________________ 779 | ; 780 | { 781 | ; MouseGetPos, , , , _focus 782 | ControlGetFocus, _focus, A 783 | Return _focus = _thiscontrol ? true : false 784 | } 785 | 786 | 787 | ;_____________________________________________________________________________ 788 | ; 789 | ExpandEnvVars(_thisstring) 790 | ;_____________________________________________________________________________ 791 | ; 792 | { 793 | ; https://www.autohotkey.com/board/topic/9516-function-expand-paths-with-environement-variables/ 794 | VarSetCapacity( _expanded, 2000) 795 | DllCall("ExpandEnvironmentStrings", "str", _thisstring, "str", _expanded, int, 1999) 796 | return _expanded 797 | } 798 | 799 | 800 | 801 | 802 | ;_____________________________________________________________________________ 803 | ; 804 | DebugMsg(_routine, _message) 805 | ;_____________________________________________________________________________ 806 | ; 807 | { 808 | Global $Debug 809 | 810 | If ($Debug) 811 | { 812 | MsgBox, ,%_routine%, %_message% 813 | } 814 | Return 815 | } 816 | 817 | 818 | 819 | 820 | 821 | ;============================================================================= 822 | ;============================================================================= 823 | ; 824 | ; FEEDER ROUTINES PER WINDOW TYPE 825 | ; 826 | ;============================================================================= 827 | ;============================================================================= 828 | 829 | ;; Start FEEDER ROUTINES PER WINDOW TYPE 830 | 831 | ;_____________________________________________________________________________ 832 | ; 833 | FeedTotalCMD( _thisID, _thisFOLDER, _thisFILE ) 834 | ;_____________________________________________________________________________ 835 | ; 836 | { 837 | 838 | Global $Running_exe 839 | 840 | Run, "%$Running_exe%" /O /A /S /L="%_thisFOLDER%%_thisFILE%",,, $DUMMY 841 | return 842 | } 843 | 844 | 845 | ;_____________________________________________________________________________ 846 | ; 847 | FeedSalamander( _thisID, _thisFOLDER, _thisFILE ) 848 | ;_____________________________________________________________________________ 849 | ; 850 | { 851 | 852 | Global $Running_exe 853 | 854 | If !_thisFILE 855 | _thisFOLDER := RTrim( _thisFOLDER , "\") 856 | else 857 | _thisFOLDER=%_thisFOLDER%%_thisFILE% 858 | 859 | Run, "%$Running_exe%" -O -A "%_thisFOLDER%",,, $DUMMY 860 | 861 | return 862 | } 863 | 864 | 865 | 866 | ;_____________________________________________________________________________ 867 | ; 868 | FeedFreeCommander( _thisID, _thisFOLDER, _thisFILE ) 869 | ;_____________________________________________________________________________ 870 | ; 871 | { 872 | ; Details on https://freecommander.com/fchelpxe/en/Commandlineparameters.html 873 | 874 | Global $Running_exe 875 | 876 | Run, "%$Running_exe%" /C /Z /L="%_thisFOLDER%%_thisFILE%",,, $DUMMY 877 | 878 | return 879 | } 880 | 881 | 882 | 883 | ;_____________________________________________________________________________ 884 | ; 885 | FeedXYPlorer( _thisID, _thisFOLDER, _thisFILE ) 886 | ;_____________________________________________________________________________ 887 | ; 888 | { 889 | 890 | Global $Running_exe 891 | 892 | ; If ( _thisFILE = "" ) 893 | ; { 894 | ; _thisFOLDER := RTrim( _thisFOLDER , "\") 895 | ; } 896 | 897 | 898 | Run, "%$Running_exe%" "%_thisFOLDER%%_thisFILE%",,, $DUMMY 899 | ; Run, "%$Running_exe%" "%_thisFOLDER%",,, $DUMMY 900 | 901 | return 902 | } 903 | 904 | 905 | 906 | ;_____________________________________________________________________________ 907 | ; 908 | FeedDoubleCommander( _thisID, _thisFOLDER, _thisFILE ) 909 | ;_____________________________________________________________________________ 910 | ; 911 | { 912 | ; Details on https://doublecmd.github.io/doc/en/commandline.html 913 | 914 | Global $Running_exe 915 | 916 | Run, "%$Running_exe%" -C "%_thisFOLDER%%_thisFILE%",,, $DUMMY 917 | 918 | return 919 | } 920 | 921 | 922 | ;_____________________________________________________________________________ 923 | ; 924 | FeedDirectoryOpus( _thisID, _thisFOLDER, _thisFILE ) 925 | ;_____________________________________________________________________________ 926 | ; 927 | { 928 | ; Details on https://.... 929 | 930 | Global $Running_exe 931 | 932 | Run, "%$Running_exe%\..\dopusrt.exe" /CMD GO "%_thisFOLDER%%_thisFILE%",,, $DUMMY 933 | 934 | return 935 | } 936 | 937 | 938 | 939 | ;_____________________________________________________________________________ 940 | ; 941 | FeedExplorerFileMan( _thisID, _thisFOLDER, _thisFILE ) 942 | ;_____________________________________________________________________________ 943 | ; 944 | { 945 | ; REmote Control through COM object 946 | ; (Based on the research done here: https://autohotkey.com/boards/viewtopic.php?f=5&t=526) 947 | ; Go through all opened Explorer windows 948 | ; For the one that has the same ID as our Explorer window: 949 | ; Navigate to $FolderPath 950 | ; Doesn't like folderpaths with a # in it if it ends with a "\" 951 | ; so trim that one from the end. 952 | 953 | _thisFOLDER := RTrim( _thisFOLDER , "\") 954 | ; If ( _thisFILE ) 955 | ; { 956 | ; _thisFILE := "\" . _thisFILE 957 | ; } 958 | 959 | 960 | For $Exp in ComObjCreate("Shell.Application").Windows 961 | { 962 | try ; Attempts to execute code. 963 | { 964 | _checkID := $Exp.hwnd 965 | ; MsgBox CheckID = %_checkID% 966 | } 967 | catch e ; Handles the errors that Opus will generate. 968 | { 969 | ; Do nothing. Just ignore error. 970 | ; Proceed to the next Explorer instance 971 | } 972 | 973 | if ( _thisID = _checkID ) 974 | { 975 | ; Go to folder 976 | $Exp.Navigate( _thisFOLDER ) 977 | 978 | ; Select the file (if defined) 979 | If ( _thisFILE ) 980 | { 981 | sleep 100 982 | _allfiles := $Exp.Document.Folder.Items 983 | $Exp.Document.SelectItem(_allfiles.Item(_thisFILE), 0x1D) 984 | } 985 | break 986 | } 987 | } 988 | 989 | return 990 | } 991 | 992 | 993 | 994 | ;_____________________________________________________________________________ 995 | ; 996 | FeedOpenSave( _thisID, _thisFOLDER, _thisFILE ) 997 | ;_____________________________________________________________________________ 998 | ; 999 | { 1000 | Global $DialogType 1001 | 1002 | WinActivate, ahk_id %_thisID% 1003 | 1004 | sleep 50 1005 | 1006 | ; Focus Edit1 1007 | ControlFocus Edit1, ahk_id %_thisID% 1008 | 1009 | WinGet, ActivecontrolList, ControlList, ahk_id %_thisID% 1010 | 1011 | 1012 | Loop, Parse, ActivecontrolList, `n ; which addressbar and "Enter" controls to use 1013 | { 1014 | If InStr(A_LoopField, "ToolbarWindow32") 1015 | { 1016 | ; ControlGetText _thisToolbarText , %A_LoopField%, ahk_id %_thisID% 1017 | ControlGet, _ctrlHandle, Hwnd,, %A_LoopField%, ahk_id %_thisID% 1018 | 1019 | ; Get handle of parent control 1020 | _parentHandle := DllCall("GetParent", "Ptr", _ctrlHandle) 1021 | 1022 | ; Get class of parent control 1023 | WinGetClass, _parentClass, ahk_id %_parentHandle% 1024 | 1025 | If InStr( _parentClass, "Breadcrumb Parent" ) 1026 | { 1027 | _UseToolbar := A_LoopField 1028 | } 1029 | 1030 | If Instr( _parentClass, "msctls_progress32" ) 1031 | { 1032 | _EnterToolbar := A_LoopField 1033 | } 1034 | } 1035 | 1036 | ; Start next round clean 1037 | _ctrlHandle := "" 1038 | _parentHandle := "" 1039 | _parentClass := "" 1040 | 1041 | } 1042 | 1043 | If ( _UseToolbar AND _EnterToolbar ) 1044 | { 1045 | Loop, 5 1046 | { 1047 | SendInput ^l 1048 | sleep 100 1049 | 1050 | ; Check and insert folder 1051 | ControlGetFocus, _ctrlFocus,A 1052 | 1053 | If ( InStr( _ctrlFocus, "Edit" ) AND ( _ctrlFocus != "Edit1" ) ) 1054 | { 1055 | Control, EditPaste, %_thisFOLDER%, %_ctrlFocus%, A 1056 | ControlGetText, _editAddress, %_ctrlFocus%, ahk_id %_thisID% 1057 | If (_editAddress = _thisFOLDER ) 1058 | { 1059 | _FolderSet := TRUE 1060 | } 1061 | } 1062 | ; else: Try it in the next round 1063 | 1064 | ; Start next round clean 1065 | _ctrlFocus := "" 1066 | _editAddress := "" 1067 | 1068 | } Until _FolderSet 1069 | 1070 | 1071 | 1072 | If (_FolderSet) 1073 | { 1074 | ; Click control to "execute" new folder 1075 | ControlClick, %_EnterToolbar%, ahk_id %_thisID% 1076 | 1077 | ; Focus file name 1078 | Sleep, 15 1079 | ControlFocus Edit1, ahk_id %_thisID% 1080 | } 1081 | Else 1082 | { 1083 | ; What to do if folder is not set? 1084 | } 1085 | } 1086 | Else ; unsupported dialog. At least one of the needed controls is missing 1087 | { 1088 | MsgBox This type of dialog can not be handled (yet).`nPlease report it! 1089 | } 1090 | 1091 | Return 1092 | } 1093 | 1094 | 1095 | 1096 | 1097 | ;_____________________________________________________________________________ 1098 | ; 1099 | FeedOpenSave_SYSLISTVIEW( _thisID, _thisFOLDER, _thisFILE ) 1100 | ;_____________________________________________________________________________ 1101 | ; 1102 | { 1103 | Global $DialogType 1104 | 1105 | 1106 | DebugMsg( A_ThisLabel . A_ThisFunc, "ID = " . _thisID . " Folder = " . _thisFOLDER ) 1107 | 1108 | 1109 | WinActivate, ahk_id %_thisID% 1110 | Sleep, 20 1111 | 1112 | 1113 | ; Read the current text in the "File Name:" box (= $OldText) 1114 | 1115 | ControlGetText _oldText, Edit1, ahk_id %_thisID% 1116 | Sleep, 20 1117 | 1118 | 1119 | ; Make sure there exactly 1 \ at the end. 1120 | 1121 | _thisFOLDER := RTrim( _thisFOLDER , "\") 1122 | _thisFOLDER := _thisFOLDER . "\" 1123 | 1124 | Loop, 20 1125 | { 1126 | Sleep, 10 1127 | ControlSetText, Edit1, %_thisFOLDER%, ahk_id %_thisID% 1128 | ControlGetText, _Edit1, Edit1, ahk_id %_thisID% 1129 | If ( _Edit1 = _thisFOLDER ) 1130 | _FolderSet := TRUE 1131 | 1132 | } Until _FolderSet 1133 | 1134 | If _FolderSet 1135 | { 1136 | Sleep, 20 1137 | ControlFocus Edit1, ahk_id %_thisID% 1138 | ControlSend Edit1, {Enter}, ahk_id %_thisID% 1139 | 1140 | 1141 | 1142 | ; Restore original filename / make empty in case of previous folder 1143 | 1144 | Sleep, 15 1145 | 1146 | ControlFocus Edit1, ahk_id %_thisID% 1147 | Sleep, 20 1148 | 1149 | Loop, 5 1150 | { 1151 | ControlSetText, Edit1, %_oldText%, ahk_id %_thisID% ; set 1152 | Sleep, 15 1153 | ControlGetText, _2thisCONTROLTEXT, Edit1, ahk_id %_thisID% ; check 1154 | If ( _2thisCONTROLTEXT = _oldText ) 1155 | Break 1156 | } 1157 | } 1158 | Return 1159 | } 1160 | 1161 | 1162 | 1163 | 1164 | ;_____________________________________________________________________________ 1165 | ; 1166 | FeedXPlorer2( _thisID, _thisFOLDER, _thisFILE ) 1167 | ;_____________________________________________________________________________ 1168 | ; 1169 | { 1170 | WinActivate, ahk_id %_thisID% 1171 | 1172 | ControlFocus Edit1, A 1173 | 1174 | 1175 | ; Go to Folder 1176 | Loop, 5 1177 | { 1178 | ControlSetText, Edit1, %_thisFOLDER%%_thisFILE%, A ; set 1179 | Sleep, 50 1180 | ControlGetText, $CurControlText, Edit1, A ; check 1181 | if ($CurControlText = _thisFOLDER_thisFILE) 1182 | break 1183 | } 1184 | 1185 | ControlSend Edit1, {Enter}, A 1186 | 1187 | return 1188 | } 1189 | 1190 | 1191 | 1192 | 1193 | 1194 | ;_____________________________________________________________________________ 1195 | ; 1196 | FeedQDirFileMan( _thisID, _thisFOLDER, _thisFILE ) 1197 | ;_____________________________________________________________________________ 1198 | ; 1199 | { 1200 | 1201 | ; Q-Dir does not respond very well to simulated keypresses. 1202 | ; Only way to make it work is with: key down, followed by key up. 1203 | 1204 | 1205 | WinActivate, ahk_id %_thisID% 1206 | 1207 | 1208 | 1209 | ; Activate the address bar that belongs to the current pane (alt-s ; case-sensitive) 1210 | ; Q-Dir can have up to 4 address bars ..) 1211 | 1212 | Sleep, 50 1213 | SendInput {Alt Down} 1214 | sleep 15 1215 | SendInput {s Down} 1216 | sleep 15 1217 | SendInput {s Up} 1218 | Sleep 15 1219 | SendInput {Alt Up} 1220 | Sleep 15 1221 | 1222 | 1223 | 1224 | ; Read the current ClassNN 1225 | 1226 | ControlGetFocus, $ActiveControl, A 1227 | 1228 | 1229 | 1230 | ; Feed FolderPath to this ClassNN 1231 | ; 2DO: (with some re-tries to be sure) 1232 | 1233 | ControlSetText,%$ActiveControl% , %_thisFOLDER%, A 1234 | Sleep, 50 1235 | 1236 | 1237 | ; Send {Enter} 1238 | 1239 | SendInput {Enter Down} 1240 | sleep 15 1241 | SendInput {Enter Up} 1242 | 1243 | return 1244 | } 1245 | 1246 | 1247 | 1248 | MsgBox This should never be shown. 1249 | ExitApp 1250 | 1251 | 1252 | 1253 | 1254 | ;_____________________________________________________________________________ 1255 | ;============================================================================= 1256 | ;============================================================================= 1257 | ;============================================================================= 1258 | ;============================================================================= 1259 | ; 1260 | GUI: 1261 | ; 1262 | ;============================================================================= 1263 | ;============================================================================= 1264 | ;============================================================================= 1265 | ;============================================================================= 1266 | 1267 | 1268 | 1269 | ;_____________________________________________________________________________ 1270 | ; 1271 | ;------------ HANDLING SETTINGS ------------------------------ 1272 | ;_____________________________________________________________________________ 1273 | ; 1274 | 1275 | 1276 | $onlyfolders := !$also_search_files 1277 | $sort_descending := !$sort_ascending 1278 | 1279 | ; There is a "love/hate triangle" between 3 controls: 1280 | ; Browse executable, executable text field and context menu icon. 1281 | ; define 2 separate variables to "mediate" between them. 1282 | 1283 | $current_exe := $everything_exe 1284 | $current_icon := $contextmenu_icon 1285 | 1286 | 1287 | 1288 | ; Make $sort_by the visible one in dropdownlist 1289 | ; Not included: ; Extension|Date Created|Date Accessed|Attributes|File List Fileame|Type 1290 | $SortList := "Name|Path|Size|Date Modified|Run Count|Date Recently Changed|Date Run" 1291 | $SortList := StrReplace($SortList, $sort_by, $sort_by . "|") 1292 | 1293 | ; $TabList only for hide/show tab routine. 1294 | $TabList := "JumpToFolder|Settings|Applications|About" 1295 | 1296 | 1297 | ; Keep track of changes in GUI. Used to check if Apply button should be shown. 1298 | $changed_settings := ";" 1299 | 1300 | 1301 | ; Reminder 1302 | ; $ActionList := Save Settings|Save & Install Context menu||Uninstall|Restore Defaults 1303 | 1304 | ; How we are started decides wht to write in registry / TC button code / hotkey shortcut. 1305 | If ( A_IsCompiled = 1 ) { 1306 | 1307 | $context_command := """" . A_ScriptFullPath . """" . " -jump" 1308 | $TCcommand := A_ScriptFullPath 1309 | $TCparms := "-jump" 1310 | } 1311 | else { 1312 | 1313 | $context_command := """" . A_AhkPath . """ """ . A_ScriptFullPath . """" . " -jump" 1314 | $TCcommand := A_AhkPath 1315 | $TCparms := """" . A_ScriptFullPath . """" . " -jump" 1316 | 1317 | } 1318 | 1319 | 1320 | 1321 | ;_____________________________________________________________________________ 1322 | ; 1323 | ;------------ BUILD GUI ------------------------- 1324 | ;_____________________________________________________________________________ 1325 | ; 1326 | 1327 | ; All Settings controls need a gLabel and a vVariable to 1328 | ; detect changes (disable Apply button or not) 1329 | 1330 | 1331 | ;------------------------------------------------ 1332 | ; TreeView 1333 | ;------------------------------------------------ 1334 | Gui Add, TreeView, x6 y6 w122 h402 gGuiTreeView 1335 | 1336 | $TreeRoot := TV_Add("JumpToFolder", ,"Expand") 1337 | $TreeBranch1 := TV_Add("Settings", $TreeRoot) 1338 | $TreeBranch2 := TV_Add("Applications", $TreeRoot) 1339 | ; $TreeBranch3 := TV_Add("About", $TreeRoot) 1340 | 1341 | 1342 | ;------------------------------------------------ 1343 | ; Tabs 1344 | ;------------------------------------------------ 1345 | 1346 | ; Tabs are added individual; not as a group. 1347 | ; Reason: that way all separate tabs can be positioned on the 1348 | ; same spot to show only 1 tab at a time. 1349 | ; Not possible in a tabgroup. 1350 | 1351 | $TabSize := "x130 y9 w340 h402" 1352 | 1353 | ;------------------------------------------------ 1354 | ; JumpToFolder Tab 1355 | ;------------------------------------------------ 1356 | 1357 | Gui, Add, Tab, %$TabSize% vJumpToFolder, JumpToFolder 1358 | $IntroText= 1359 | ( 1360 | Current version: %$ThisVersion% 1361 | 1362 | JumpToFolder is a little utility that brings the power of Everything to file dialogs and file managers. 1363 | No longer the need to browse through lots of folders, drives and network folders, but jump to that folder immediately. 1364 | 1365 | 1366 | How to use: 1367 | 1. Right-click in an empty part of the file list and choose "Jump To Folder" from the context menu, 1368 | 2. Type part of the filename in the appearing Everything window, 1369 | 3. Choose a file or folder from the list, 1370 | 4. JumpToFolder will change the current folder in the file manager / file dialog to the selected folder. 1371 | 1372 | 1373 | 1374 | ) 1375 | 1376 | Gui Font, s10 1377 | Gui Add, Text, W320, %$IntroText% 1378 | Gui, Add, Link,, For more information, see the Everything forum. 1379 | Gui Font 1380 | 1381 | ;------------------------------------------------ 1382 | ; Settings Tab 1383 | ;------------------------------------------------ 1384 | 1385 | Gui, Add, Tab, %$TabSize% vSettings, Settings 1386 | 1387 | ;------------------------------------------------ 1388 | ; Search Settings 1389 | ;------------------------------------------------ 1390 | Gui, Font, Bold 1391 | Gui Add, Text, x146 y40 w316 h15, Search settings 1392 | Gui, Font 1393 | Gui Add, Text, x146 y65 w316 h15, Location of Everything.exe 1394 | Gui Add, Edit, v$gui_edit_exe gGuiEdit_exe x146 y85 w265 h23, %$current_exe% 1395 | Gui Add, Button, gGuiBrowse_exe x415 y85 w50 h23 , &Browse 1396 | ;2DO 1397 | Gui Add, Text, x146 y115 w61 h23 +0x200, Search In: 1398 | Gui Add, Radio, v$gui_onlyfolders gGuiSearchItems x215 y115 w83 h23 Checked%$onlyfolders%, Folders 1399 | Gui Add, Radio, v$gui_also_search_files gGuiSearchItems x310 y115 w120 h21 Checked%$also_search_files%, Folders and Files 1400 | 1401 | Gui Add, Text, x146 y160 w61 h23 +0x200, Sort By: 1402 | Gui Add, DropDownList, v$gui_sort_by gGuiSort_by x215 y160 w195, %$SortList% 1403 | Gui Add, Text, x146 y195 w61 h23 +0x200, Sort Order: 1404 | Gui Add, Radio, v$gui_sort_ascending gGuiSortOrder x215 y195 w80 h23 Checked%$sort_ascending%, Ascending 1405 | Gui Add, Radio, vDescending gGuiSortOrder x330 y195 w83 h23 Checked%$sort_descending%, Descending 1406 | 1407 | 1408 | ;------------------------------------------------ 1409 | ; Context Menu Entry Settings 1410 | ;------------------------------------------------ 1411 | 1412 | Gui, Font, Bold 1413 | Gui Add, Text, x146 y250 w316 h15, Context-menu entry (icon is clickable) 1414 | Gui, Font 1415 | ; Gui Add, Text, x146 y160 w61 h23 +0x200, Sort By: 1416 | 1417 | ;; (Clickable) Image: 1418 | ; Placeholder vf_picIcon 1419 | ; Gui, Add, Picture, v$gui_contextmenu_icon gGuiChangeIcon x146 y270 w32 h32 1420 | Gui, Add, Picture, v$gui_contextmenu_icon gGuiChangeIcon x146 y270 w32 h32 1421 | 1422 | 1423 | ; Fill (v$gui_contextmenu_icon) 1424 | Gosub GuiShowIcon 1425 | 1426 | ; Text for Context menu entry: 1427 | Gui Add, Edit, v$gui_contextmenu_text gGuiContextText x215 y270 w195 h32, %$contextmenu_text% 1428 | 1429 | ;------------------------------------------------ 1430 | ; Action Settings 1431 | ;------------------------------------------------ 1432 | 1433 | Gui, Font, Bold 1434 | Gui Add, Text, x146 y337 w56 h24 +0x200, Action: 1435 | Gui, Font 1436 | Gui Add, DropDownList, vAction x215 y343 w195, Save Settings|Save & Install Context menu||Uninstall|Restore Defaults 1437 | 1438 | 1439 | 1440 | ;------------------------------------------------ 1441 | ; Applications Tab 1442 | ;------------------------------------------------ 1443 | 1444 | Gui, Add, Tab, %$TabSize% vApplications, Applications 1445 | 1446 | $AppsText1= 1447 | ( 1448 | In all applications: 1449 | - File Dialogs like Open and Save As dialogs 1450 | 1451 | File managers: 1452 | - Windows File Explorer 1453 | - Altap Salamander 1454 | - Directory Opus 1455 | - Double Commander 1456 | - FreeCommander 1457 | - Q-Dir 1458 | - Total Commander 1459 | - XPlorer2 1460 | - XyPlorer 1461 | 1462 | ) 1463 | 1464 | $AppsText2= 1465 | ( 1466 | Total Commander is supported through a button on it's button bar. 1467 | Press the "Generate" button to put the Button Code on the clipboard. 1468 | Right-click the button bar to paste it. 1469 | ) 1470 | 1471 | Gui Font, bold 1472 | Gui Add, Text, ,Out of the box support for: 1473 | Gui Font 1474 | Gui Add, Text, W320, %$AppsText1% 1475 | 1476 | Gui Font, bold 1477 | Gui Add, Text, , Total Commander 1478 | Gui Font 1479 | Gui Add, Text, W320, %$AppsText2% 1480 | 1481 | Gui Add, Button, gGUITotalCommander x290 y343 w165 , &Generate Button Bar code 1482 | ; Gui Font 1483 | 1484 | 1485 | 1486 | ;------------------------------------------------ 1487 | ; About Tab 1488 | ;------------------------------------------------ 1489 | 1490 | Gui, Add, Tab, %$TabSize% vAbout, About 1491 | Gui Add, Text, x147 y126 w66 h23 +0x200, About page 1492 | Gui Add, Text, , (or just drop it ?) 1493 | 1494 | 1495 | Gui Tab 1496 | 1497 | 1498 | ;------------------------------------------------ 1499 | ; Global buttons 1500 | ;------------------------------------------------ 1501 | 1502 | Gui Add, Button, gGuiButtonOK x237 y414 w75 h23, OK 1503 | Gui Add, Button, gGuiButtonCancel x318 y414 w75 h23, Cancel 1504 | Gui Add, Button, gGuiButtonApply +Disabled x399 y414 w75 h23, Apply 1505 | 1506 | 1507 | 1508 | ;------------------------------------------------ 1509 | Gui Show, w480 h443, JumpToFolder settings (version %$ThisVersion%) 1510 | ;------------------------------------------------ 1511 | 1512 | return 1513 | 1514 | 1515 | ;_____________________________________________________________________________ 1516 | ; 1517 | ;------------ HANDLE GUI CHANGES ------------------------------ 1518 | ;_____________________________________________________________________________ 1519 | ; 1520 | 1521 | 1522 | 1523 | ;_____________________________________________________________________________ 1524 | ; 1525 | GuiTreeView: 1526 | ;_____________________________________________________________________________ 1527 | ; 1528 | Gui, submit, NoHide 1529 | if (A_GuiEvent != "S") ; i.e. an event other than "select new tree item". 1530 | return ; Do nothing. 1531 | 1532 | ; Otherwise, populate the ListView with the contents of the selected folder. 1533 | ; First determine the full path of the selected folder: 1534 | 1535 | TV_GetText($TreeItem, A_EventInfo) 1536 | 1537 | 1538 | ; And show that one. Hide the other ones. 1539 | 1540 | Loop, Parse, $TabList, | 1541 | { 1542 | If ($TreeItem = A_LoopField) { 1543 | GuiControl, Show, %A_LoopField% 1544 | } 1545 | else { 1546 | GuiControl, Hide, %A_LoopField% 1547 | } 1548 | } 1549 | return 1550 | 1551 | ;------------------------------------------------ 1552 | ; Tab Settings 1553 | ;------------------------------------------------ 1554 | 1555 | ;_____________________________________________________________________________ 1556 | ; 1557 | GuiBrowse_exe: 1558 | ;_____________________________________________________________________________ 1559 | ; 1560 | 1561 | 1562 | ; Browse for Everything.exe and possibly change the icon of the context menu. 1563 | 1564 | FileSelectFile, $SelectedFile, ,Everything.exe, Select Everything program, Everything executable (*.exe) 1565 | If !$SelectedFile 1566 | return 1567 | 1568 | $current_exe := $SelectedFile 1569 | 1570 | ; Edit field 1571 | GuiControl,,$gui_edit_exe, %$current_exe% 1572 | 1573 | ; Icon field 1574 | If ($OOB_contextmenu_icon = $current_icon) { 1575 | ; Still the OOB icon! Change it to the one of the chosen executable 1576 | ; And leave it alone from now on. 1577 | $current_icon := $current_exe . ",0" 1578 | gosub GuiShowIcon 1579 | } 1580 | 1581 | ; Apply button routine 1582 | ApplyButton2($contextMenu_icon, $current_icon, "ChangeIcon", $changed_settings) 1583 | 1584 | return 1585 | 1586 | 1587 | 1588 | ;_____________________________________________________________________________ 1589 | ; 1590 | GuiChangeIcon: 1591 | ;_____________________________________________________________________________ 1592 | ; 1593 | ; Based on: https://www.autohotkey.com/boards/viewtopic.php?f=76&t=72960&hilit=PickIconDlg 1594 | 1595 | 1596 | hWnd := 0 1597 | 1598 | ; Browse Icon 1599 | 1600 | VarSetCapacity(strIconFile, 260 << !!A_IsUnicode) 1601 | if !DllCall("shell32\PickIconDlg", "Ptr", hWnd, "Str", strIconFile, "UInt", 260, "IntP", intIconIndex) 1602 | return ; No icon selected; don't change anything. 1603 | 1604 | $current_icon := strIconFile . "," . intIconIndex 1605 | 1606 | 1607 | ; Show Icon 1608 | Gosub GuiShowIcon 1609 | 1610 | ; Apply button routine 1611 | ApplyButton2($contextMenu_icon, $current_icon, "ChangeIcon", $changed_settings) 1612 | 1613 | return 1614 | 1615 | 1616 | 1617 | ;_____________________________________________________________________________ 1618 | ; 1619 | GuiEdit_exe: 1620 | ;_____________________________________________________________________________ 1621 | ; 1622 | 1623 | ; Read current value 1624 | GuiControlGet, $gui_edit_exe 1625 | $current_exe := $gui_edit_exe 1626 | 1627 | 1628 | ; Apply button routine 1629 | ApplyButton2($everything_exe, $current_exe, "EditExe", $changed_settings) 1630 | 1631 | 1632 | return 1633 | 1634 | 1635 | ;_____________________________________________________________________________ 1636 | ; 1637 | GuiSearchItems: 1638 | ;_____________________________________________________________________________ 1639 | ; 1640 | ; Read current value 1641 | GuiControlGet, $gui_also_search_files 1642 | 1643 | ; Apply button routine 1644 | ApplyButton2($also_search_files, $gui_also_search_files, "SearchFiles", $changed_settings) 1645 | 1646 | return 1647 | 1648 | 1649 | ;_____________________________________________________________________________ 1650 | ; 1651 | GuiSort_by: 1652 | ;_____________________________________________________________________________ 1653 | 1654 | 1655 | ; Read current value 1656 | GuiControlGet, $gui_sort_by 1657 | 1658 | 1659 | ; Apply button routine 1660 | 1661 | ApplyButton2($sort_by, $gui_sort_by, "SortBy", $changed_settings) 1662 | 1663 | return 1664 | 1665 | 1666 | ;_____________________________________________________________________________ 1667 | ; 1668 | GuiSortOrder: 1669 | ;_____________________________________________________________________________ 1670 | 1671 | ; Read current value 1672 | GuiControlGet, $gui_sort_ascending 1673 | 1674 | ; Apply button routine 1675 | ApplyButton2($sort_ascending, $gui_sort_ascending, "SortOrder", $changed_settings) 1676 | 1677 | return 1678 | 1679 | 1680 | ;_____________________________________________________________________________ 1681 | ; 1682 | GuiContextText: 1683 | ;_____________________________________________________________________________ 1684 | ; 1685 | 1686 | ; Read current value 1687 | GuiControlGet, $gui_contextmenu_text 1688 | 1689 | ; Apply button routine 1690 | ApplyButton2($contextmenu_text, $gui_contextmenu_text, "MenuText", $changed_settings) 1691 | 1692 | return 1693 | 1694 | 1695 | ;------------------------------------------------ 1696 | ; Tab Applications 1697 | ;------------------------------------------------ 1698 | 1699 | 1700 | ;_____________________________________________________________________________ 1701 | ; 1702 | GuiTotalCommander: 1703 | ;_____________________________________________________________________________ 1704 | ; 1705 | 1706 | ; Catch OOB and unsaved changed settings 1707 | 1708 | if !FileExist($current_exe) { 1709 | MsgBox Please check settings 1710 | return 1711 | } 1712 | 1713 | ; Are settings saved? 1714 | If ($changed_settings != ";") { 1715 | MsgBox Save settings first. 1716 | return 1717 | } 1718 | 1719 | 1720 | 1721 | ; Button code looks like this: 1722 | 1723 | ;HEADER : TOTALCMD#BAR#DATA 1724 | ;COMMAND : C:\develop\JumpToFolder\JumpToFolder.exe 1725 | ;PARAMETERS : -jump 1726 | ;ICON : C:\develop\JumpToFolder\JumpToFolder.exe,4 1727 | ;TOOLTIP : JumpToFolder 1728 | ;WORKING DIR : C:\develop\JumpToFolder\ 1729 | ;??? : 1730 | ;ALWAYS? : -1 1731 | 1732 | 1733 | ; When $ButtonCode was defined through (multiline), Enters fell off on clipboard. Plan B: 1734 | 1735 | $ButtonCode=TOTALCMD#BAR#DATA`r`n%$TCcommand%`r`n%$TCparms%`r`n%$contextMenu_icon%`r`n%$contextMenu_text%`r`n`r`n`r`n-1 1736 | 1737 | 1738 | ClipBoard := $ButtonCode 1739 | 1740 | MsgBox, 1741 | ( 1742 | 1743 | The following code is now on the clipboard. 1744 | Right-click one of Total Commander's 1745 | Button Bars and paste it. 1746 | 1747 | To start JumpToFolder, press that button. 1748 | 1749 | 1750 | ================================== 1751 | 1752 | %$ButtonCode% 1753 | 1754 | ================================== 1755 | ) 1756 | 1757 | return 1758 | 1759 | 1760 | ;------------------------------------------------ 1761 | ; Global Buttons 1762 | ;------------------------------------------------ 1763 | 1764 | 1765 | 1766 | ;_____________________________________________________________________________ 1767 | ; 1768 | GuiButtonCancel: 1769 | ;_____________________________________________________________________________ 1770 | ; 1771 | 1772 | ExitApp 1773 | Return ; formality 1774 | 1775 | ;_____________________________________________________________________________ 1776 | ; 1777 | GuiButtonApply: 1778 | GuiButtonOK: 1779 | ;_____________________________________________________________________________ 1780 | ; 1781 | DebugMsg("Apply/OK", "Start Apply/OK" ) 1782 | GuiControlGet, $Action, , Action 1783 | 1784 | 1785 | ; Don't use the Switch command as it is too new. 1786 | ; Might give problems when .ahk is associated 1787 | ; with an older version of ahk.exe 1788 | 1789 | If ( $Action = "Save Settings" ) { ; Save 1790 | gosub CheckSettings 1791 | If ( !SettingsOK ) 1792 | return 1793 | gosub WriteINI 1794 | } 1795 | 1796 | Else If ( $Action = "Uninstall" ) { ; Uninstall 1797 | gosub REmoveContextMenu 1798 | } 1799 | 1800 | Else If ( $Action = "Restore Defaults" ) { ; Restore 1801 | MsgBox Not yet implemented 1802 | } 1803 | 1804 | Else If ( $Action = "Save & Install Context menu" ) { ; Install 1805 | gosub CheckSettings 1806 | If ( !SettingsOK ) 1807 | return 1808 | gosub WriteINI 1809 | gosub InstallContextMenu 1810 | } 1811 | 1812 | Else { ; Rest 1813 | MsgBox Something went wrong in the OK/Apply routine. 1814 | } 1815 | 1816 | 1817 | If ( A_ThisLabel = "GuiButtonOK" ) { 1818 | 1819 | ExitApp 1820 | } 1821 | 1822 | return 1823 | 1824 | 1825 | 1826 | ;_____________________________________________________________________________ 1827 | ; 1828 | GuiEscape: 1829 | GuiClose: 1830 | ;_____________________________________________________________________________ 1831 | ; 1832 | 1833 | ExitApp 1834 | 1835 | 1836 | 1837 | ;_____________________________________________________________________________ 1838 | ; 1839 | ;------------ SUBROUTINES ------------------------------ 1840 | ;_____________________________________________________________________________ 1841 | ; 1842 | 1843 | 1844 | 1845 | ;_____________________________________________________________________________ 1846 | ; 1847 | GuiShowIcon: 1848 | ;_____________________________________________________________________________ 1849 | ; 1850 | ;MsgBox GUUI showicon $current_icon = [%$current_icon%] 1851 | 1852 | ; Needed: 1853 | ; - $ContextMenu_Icon (c:\path to\file.exe,index) 1854 | ; - replaced with: $current_icon 1855 | ; - controlname (where the icon should be put) 1856 | 1857 | ; GuiControl uses a different numbering (Offset + 1 for index >0) so convert it. 1858 | ; also uses separate iconfile and iconindex. 1859 | 1860 | ; Split $current_icon in filename and index 1861 | ; If no index: Index = 0 1862 | 1863 | 1864 | If !InStr($current_icon, ",") 1865 | $current_icon := $current_icon . ",0" ; use its first icon 1866 | 1867 | ; Check context-menu icon. 1868 | 1869 | $IconTest := SubStr($current_icon, 1, InStr($current_icon, ",", false, -1, 1) -1) 1870 | ;MsgBox $IconTest =%$IconTest% 1871 | If !FileExist($IconTest) 1872 | { 1873 | $current_icon := $OOB_contextmenu_icon 1874 | ; MsgBox $IconTest - $current_icon does not exist 1875 | } 1876 | 1877 | 1878 | ; Search from the end because filename could also include a comma (ex.: "file,name.ico,1") 1879 | 1880 | intCommaPos := InStr($current_icon, ",", , 0) - 1 1881 | strIconFile := SubStr($current_icon, 1, intCommaPos) 1882 | intIconIndex := StrReplace($current_icon, strIconFile . ",") 1883 | 1884 | 1885 | 1886 | 1887 | 1888 | if (intIconIndex > 0) 1889 | intIconIndex := intIconIndex + 1 1890 | 1891 | 1892 | ; Finally show the icon 1893 | 1894 | GuiControl, , $gui_contextmenu_icon, *icon%intIconIndex% %strIconFile% 1895 | 1896 | 1897 | return 1898 | 1899 | 1900 | 1901 | ;_____________________________________________________________________________ 1902 | ; 1903 | ApplyButton2(_item1,_item2,_listentry, byRef $changed_settings) 1904 | ;_____________________________________________________________________________ 1905 | ; 1906 | ; If _item1 = _item2, remove _listentry from the list $changed_settings 1907 | ; If _item1 not _item2, add _listentry to the list $changed_settings 1908 | ; (remove entry first and then add it. To prevent double entries and $var from growing) 1909 | ; 1910 | ; Wnen done: if $changed_settings is empty (= ";"), 1911 | ; disable the Apply button as there are no more changes on the list. 1912 | ; (meaning that all settings are the same as when started) 1913 | 1914 | ; Also: add /remove "* " from titlebar to indicate changes (like Notepad) 1915 | 1916 | { 1917 | ; MsgBox, IN: %_item1% , %_item2% , %_listentry% , %$changed_settings% 1918 | 1919 | If ( _item1 != _item2 ) { 1920 | ; remove current and add current 1921 | $changed_settings := StrReplace( $changed_settings, ";" . _listentry . ";", ";") 1922 | $changed_settings := $changed_settings . _listentry . ";" 1923 | 1924 | ; show Apply button 1925 | GuiControl, Enable, Apply 1926 | 1927 | } 1928 | else { 1929 | ; remove current 1930 | $changed_settings := StrReplace( $changed_settings, ";" . _listentry . ";", ";") 1931 | 1932 | If ( $changed_settings = ";" ) { 1933 | GuiControl, Disable, Apply 1934 | } 1935 | 1936 | } 1937 | ; MsgBox OUT: _%$changed_settings%_ 1938 | } 1939 | 1940 | 1941 | 1942 | 1943 | ;_____________________________________________________________________________ 1944 | ; 1945 | CheckSettings: 1946 | ;_____________________________________________________________________________ 1947 | ; 1948 | DebugMsg("CheckSettings", "Start CheckSettings") 1949 | SettingsOK := True 1950 | 1951 | 1952 | if !FileExist($current_exe) 1953 | { 1954 | MsgBox Location of Everything.exe is not correct:`r`n`r`n"%$current_exe%" 1955 | SettingsOK := False 1956 | } 1957 | else 1958 | { 1959 | $EverythingVersion :=GetEverythingMajorVersion($current_exe) 1960 | 1961 | If !($EverythingVersion = "1.4" OR $EverythingVersion = "1.5") 1962 | { 1963 | MsgBox Everything 1.4 and 1.5 supported`r`nMake sure the location points to a valid Everything.exe. 1964 | SettingsOK := False 1965 | 1966 | } 1967 | } 1968 | 1969 | 1970 | if ( $gui_contextmenu_text = "") 1971 | { 1972 | MsgBox Text for Context Menu is missing .. 1973 | SettingsOK := False 1974 | } 1975 | 1976 | 1977 | If (SettingsOK) 1978 | { 1979 | 1980 | 1981 | 1982 | ; Fill all INI $vars with $gui... and $current.. values 1983 | 1984 | $everything_exe := $current_exe 1985 | $also_search_files := $gui_also_search_files 1986 | $sort_by := $gui_sort_by 1987 | $sort_ascending := $gui_sort_ascending 1988 | $contextmenu_text := $gui_contextmenu_text 1989 | $contextmenu_icon := $current_icon 1990 | 1991 | 1992 | ; Empty $changed_settings ( = ";"), 1993 | ; Disable Apply button 1994 | ; Anything else? 1995 | 1996 | $changed_settings := ";" 1997 | GuiControl, Disable, Apply 1998 | 1999 | } 2000 | 2001 | 2002 | return 2003 | 2004 | 2005 | 2006 | ;_____________________________________________________________________________ 2007 | ; 2008 | GetEverythingMajorVersion(_everything_exe) 2009 | ;_____________________________________________________________________________ 2010 | ; 2011 | { 2012 | 2013 | FileGetVersion, _longversion, %_everything_exe% 2014 | _version := StrSplit(_longversion, ".") 2015 | _majorversion := _version[1] . "." . _version[2] 2016 | 2017 | DebugMsg( A_ThisLabel . A_ThisFunc, "long version = " . _longversion . "`r`nmajorversion = [" . _majorversion . "]") 2018 | 2019 | 2020 | Return _majorversion 2021 | } 2022 | 2023 | 2024 | 2025 | ;_____________________________________________________________________________ 2026 | ; 2027 | InstallContextMenu: 2028 | ;_____________________________________________________________________________ 2029 | ; 2030 | 2031 | ; This also creates a shortcut to be put on desktop or in startmenu. 2032 | ; Pressing CTRL + ALT + J will activate JumpToFolder (alternative for using the context-menu) 2033 | ; Create it in app folder (it's optional). 2034 | 2035 | ; writing to reg requires escaping , and % : `, `% 2036 | ; RegWrite, ValueType, KeyName [, ValueName, Value] 2037 | 2038 | 2039 | ; split context_icon to put"" round filename (see GuiShowIcon:) 2040 | 2041 | intCommaPos := InStr($current_icon, ",", , 0) - 1 2042 | strIconFile := SubStr($current_icon, 1, intCommaPos) 2043 | intIconIndex := StrReplace($current_icon, strIconFile . ",") 2044 | 2045 | 2046 | 2047 | ; DIRECTORY contextmenu 2048 | 2049 | ; Add contextmenu text 2050 | RegWrite, REG_SZ, HKCU\Software\Classes\Directory\Background\Shell\JumpToFolder, MuiVerb, %$gui_contextmenu_text% 2051 | 2052 | ; Add contextmenu icon 2053 | RegWrite, REG_SZ, HKCU\Software\Classes\Directory\Background\Shell\JumpToFolder, Icon, "%strIconFile%"`,%intIconIndex% 2054 | 2055 | ; Add command 2056 | RegWrite, REG_SZ, HKCU\Software\Classes\Directory\Background\Shell\JumpToFolder\Command, , %$context_command% 2057 | 2058 | 2059 | 2060 | ; FOLDERS contextmenu 2061 | 2062 | ; Add contextmenu text 2063 | RegWrite, REG_SZ, HKCU\Software\Classes\Folder\Background\Shell\JumpToFolder, MuiVerb, %$gui_contextmenu_text% 2064 | 2065 | ; Add contextmenu icon 2066 | RegWrite, REG_SZ, HKCU\Software\Classes\Folder\Background\Shell\JumpToFolder, Icon, "%strIconFile%"`,%intIconIndex% 2067 | 2068 | ; Add command 2069 | RegWrite, REG_SZ, HKCU\Software\Classes\Folder\Background\Shell\JumpToFolder\Command, , %$context_command% 2070 | 2071 | 2072 | ; SHORTCUT 2073 | ; 2DO: FileCreateShortcut has icon offset. Compensate for that (again! Like GuiShowIcon) 2074 | 2075 | if (intIconIndex > 0) 2076 | intIconIndex := intIconIndex + 1 2077 | 2078 | ; FileCreateShortcut, Target, LinkFile [, WorkingDir, Args, Description, IconFile, ShortcutKey, IconNumber, RunState] 2079 | FileCreateShortcut, "%$TCcommand%", JumpToFolder.lnk, , %$TCparms%, %$contextmenu_text%, %strIconFile%, J, intIconIndex, 1 2080 | return 2081 | 2082 | 2083 | 2084 | ;_____________________________________________________________________________ 2085 | ; 2086 | REmoveContextMenu: 2087 | ;_____________________________________________________________________________ 2088 | ; 2089 | 2090 | 2091 | ; Synatx: RegDelete, KeyName [, ValueName] 2092 | 2093 | 2094 | ; Remove contextmenu for DIRECTORY 2095 | 2096 | RegDelete, HKCU\Software\Classes\Directory\Background\Shell\JumpToFolder 2097 | 2098 | 2099 | ; REmove contextmenu for (special) FOLDERS 2100 | 2101 | RegDelete, HKCU\Software\Classes\Folder\Background\Shell\JumpToFolder 2102 | 2103 | 2104 | return 2105 | 2106 | 2107 | 2108 | ;_____________________________________________________________________________ 2109 | ; 2110 | WriteINI: 2111 | ;_____________________________________________________________________________ 2112 | ; 2113 | 2114 | 2115 | 2116 | ; Write to INI 2117 | IniWrite, %$everything_exe%, %$IniFile%, JumpToFolder, everything_exe 2118 | IniWrite, %$sort_by%, %$IniFile%, JumpToFolder, sort_by 2119 | IniWrite, %$sort_ascending%, %$IniFile%, JumpToFolder, sort_ascending 2120 | IniWrite, %$contextmenu_text%, %$IniFile%, JumpToFolder, contextmenu_text 2121 | IniWrite, %$contextmenu_icon%, %$IniFile%, JumpToFolder, contextmenu_icon 2122 | IniWrite, %$EverythingVersion%, %$IniFile%, JumpToFolder, detected_everything_version 2123 | IniWrite, "%$everything_instance%", %$IniFile%, JumpToFolder, everything_instance 2124 | IniWrite, %$debug%, %$IniFile%, JumpToFolder, debug 2125 | ; IniRead, $debug, %$IniFile%, JumpToFolder, debug, %$OOB_debug% 2126 | 2127 | 2128 | return 2129 | 2130 | 2131 | 2132 | ;============================================================================= 2133 | ;============================================================================= 2134 | 2135 | 2136 | 2137 | /* 2138 | 2139 | ;_____________________________________________________________________________ 2140 | ; 2141 | 2142 | 2DO 2143 | 2144 | - A better name. JumpToFolder sounds .. 2145 | - Drive Warp? Everywhere? ;-) Everyway? WhereTo? Go Everywhere? WhereToGo? 2146 | - WTF! (Warp To Folder! ;-) 2147 | - Where do you want to go today? (Win95 slogan) 2148 | - ..leap .. drive 2149 | - drive dive, 2150 | V SingleInstance Force closes an already running JumpToFolder.exe, 2151 | but doesn't close it's Everything.exe child process. 2152 | Leaving an unmanaged/ orphaned Everything behind. Not a very common scenario, but still: Fix this. 2153 | Solution: Close Everything when it loses focus. 2154 | - Add JumpToFolder to "This PC" background context menu 2155 | - Other places too? 2156 | 2157 | - What should JumpToFolder do when right-click on desktop? 2158 | - Start regular Everything? 2159 | - Start Explorer in selected path? Or preferred filemgr? 2160 | - do nothing? (disable) 2161 | - Use it as a launcher? 2162 | 2163 | - GUI: relative positioning of controls. 2164 | 2165 | - Debug start: ahk path, version, size; startparms, user, elevated 2166 | - Write debug info to file too 2167 | (requires ShutDown()/similar routine instead of ExitApp to close open file handle. 2168 | ? how to handle 1.5a instances with runcount? 2169 | - Talk to TC and XY without using clipboard 2170 | (perfectly possible; implement it if all is stable) 2171 | 2172 | - pre-populate the search with current path from file manager / -dialog if available); select/highlight it so it can be easily removed. 2173 | 2174 | - Advanced Tab for extra settings? Or keep those ini-only? 2175 | 2176 | --------------------------------------- 2177 | 2178 | 2179 | v 1.0.6 2180 | - added support for FreeCommander 2181 | - Textual changes 2182 | 2183 | 2184 | v 1.0.5 2185 | - Yet another mouse-click handling routine 2186 | Now support for dragging and resizing Everything +window. 2187 | (still no solid airtight solution for the resultlist scrollbar) 2188 | - reorganized code 2189 | - added "hidden" ini entry to overrule _exe and _instance 2190 | for very special cases. 2191 | - Updated Settings page intro. 2192 | - Working directory for Everything is set to the folder of it's executable. 2193 | 2194 | 2195 | v 1.0.3 2196 | - Added support for %variables% in relevant INI entries. 2197 | 2198 | 2199 | v 1.0.2 2200 | - fixed a typo (removed extra space from path) that caused some filemanagers to be unable to open the selected folder. 2201 | 2202 | v 1.0.1 2203 | - Different mouse-click handling. 2204 | 2205 | 2206 | 2207 | */ 2208 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # JumpToFolder 2 | 3 | How to use, installation, details, discussion: 4 | 5 | https://www.voidtools.com/forum/viewtopic.php?f=2&t=11194 6 | 7 |
8 |
9 | JumpToFolder makes use of Everything to jump to a different folder in file managers and file dialogs. All without browsing the intermediate paths. 10 | (If you are not familiar with Everything: it's a very, * very * fast search tool for your files and folders on local as well as network disks with too many useful features to describe here. It is also free. (https://voidtools.com) 11 |
12 |
13 | So if your file manager is currently in folder 'c:\a\b\c\d\e\this' and you want to go to 'x:\f\g\h\i\that', start JumpToFolder, type 'that' in the appearing Everything window and select 'x:\f\g\h\i\that' from the list. The file manager will change to that folder without further effort. 14 | 15 | Or another example: you want to update the MP3 tags of an album, but can't remember where you put it or what it was called. All you can remember is that it has 'thunderstruck' on it. With JumpToFolder you can do the following: 16 | 17 | * Right-click in an empty part of the list of files in File Explorer, 18 | * Select JumpToFolder, 19 | * Everything will open; type part of a foldername or file in the resultlist, 20 | * Double-click or press ENTER on the file/folder of your choice. 21 | * Done! 22 | 23 | The file dialog /filemanager will automatically jump to the folder you selected: 24 | 25 | 26 | ![](https://github.com/gepruts/JumpToFolder/raw/main/img/JumpToFolder.gif) 27 | 28 | 29 | 30 | 31 | ## Supported file managers 32 | Beside Open/Save file dialogs, the following file managers are currently supported: 33 | 34 | * Windows Explorer / File Explorer 35 | * Altap Salamander 36 | * Directory Opus 37 | * Double Commander 38 | * Free Commander 39 | * Q-Dir 40 | * Total Commander 41 | * XPlorer2 42 | * XYplorer 43 | 44 | -------------------------------------------------------------------------------- /img/JumpToFolder.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gepruts/JumpToFolder/2852ca524355b254510c81d815798f0ecde2bc1c/img/JumpToFolder.gif --------------------------------------------------------------------------------