Use the power of Everything in Explorer and File dialogs

General discussion related to "Everything".
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Use the power of Everything in Explorer and File dialogs

Post by NotNull »

EDIT: Reworked version can be found here





There was a (good, imho) suggestion on these forums to extend the Save/Open dialog boxes with Everything-powers (see viewtopic.php?t=6406 ).

That idea stuck in my mind and it looked like a good candidate to use to learn myself some Autohotkey programming.
This is the first draft (proof of concept) and has only a few of the intended options "programmed".
This is how version 0.0.2 works:


[*] When in a File Open / File Save / ... file dialog (Microsoft calls those Common File Dialog (Winversion < Vista) or Common Item Dialog (from Vista on)), click on the scrollwheel of the mouse somewhere in the "big red frame"
2018-02-16 14_43_19-Open.png
2018-02-16 14_43_19-Open.png (111.19 KiB) Viewed 118849 times
This will open a new Everything window on the exact same spot where the FileOpen dialog was before, with the Folder-filter enabled. Notice that it has no title bar, nor menu bar.
2018-02-16 14_44_48-_ever - Everything.png
2018-02-16 14_44_48-_ever - Everything.png (108.2 KiB) Viewed 118849 times
[*] Now search for the name of the folder like you always do
[*] Select the folder that you want to use, so that it is highlighted (in my example: C:\2INSTALL\Everything).
[*] Press <Enter>

Now you are back in the original FileOpen dialog, but with an important difference:
The folder you selected in Everything, is filled-in in the File name box (this one also accepts foldernames)
2018-02-16 14_45_16-Open.png
2018-02-16 14_45_16-Open.png (113.96 KiB) Viewed 118849 times
[*] Press <Enter> or click on the Open button to open in your selected folder.

So there you are, in the folder you wanted, without browsing through the complete foldertree.


As said, this is just a proof of concept. A lot of functionality has not been build yet; a lot of security measures to be taken.
Let's put it this way: if you want to cross the street, you watch left, right; if you're smart you also listen for sirens and if you are really suspicious, you also look out for cows falling from the sky ...
This scriptversion (v0.0.2) crosses the street blindfolded (but gets there alive surprisingly often!)



If you are adventurous and want to try it, follow these steps:

[*] Download Autohotkey.zip (https://autohotkey.com/download/ahk.zip)
[*] Extract this to some folder
[*] Download attached ExtendFileDialogV0.0.2.ahk.zip
[*] Extract this the same folder
[*] Change the path to Everything.exe to match your situation (currently set to "C:\Program Files\Everything\Everything.exe"). It's under SETTINGS. You can open the AHK file in notepad.

[*] Drag ExtendFileDialogV0.0.2.ahk to AutoHotkeyU64.exe (or AutoHotkeyU32.exe; depending on the "bitness" of your Windows)

The programs runs from the System Tray (aka Notification Area). It's a green icon with an "H". It might be hidden at first.

[*] To stop the program: right-click on the systray icon and choose Exit.

Good luck!

Suggestions (the intended concept is described in the AHK file itself) and code improvements (this is my very first Autohotkey script, so probably a lot of rookie mistakes) are welcome.

P.S. I wanted to post this message in the Development sub-forum, but adding pictures isn't allowed there. This is "plan B".
Last edited by NotNull on Fri Mar 30, 2018 1:34 pm, edited 5 times in total.
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Extend File Open dialogs with Everything-powers!

Post by NotNull »

It seems there is a max of 3 attached files per message.
See attachment for the code.

Current version: 0.0.3
Attachments
ExtendFileDialogV0.0.3.ahk.zip
(4 KiB) Downloaded 2240 times
Last edited by NotNull on Sun Feb 18, 2018 7:46 pm, edited 1 time in total.
mdsy
Posts: 2
Joined: Sun Sep 14, 2014 1:46 am

Re: Use the power of Everything in File dialogs

Post by mdsy »

thanks for the great idea.
it didn't work for me, because i have QTTabBar installed and it is 'stealing' the ENTER keypress !
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Use the power of Everything in File dialogs

Post by NotNull »

mdsy wrote:thanks for the great idea.
it didn't work for me, because i have QTTabBar installed and it is 'stealing' the ENTER keypress !
Thanks for testing, mdsy! Really appreciated!!

I knew about possible issues with the way this script was stealing <Enter> (it's in the remarks in the .AHK file : "; This Enter-handling routine definitely needs improvement! ..." ).

It was needed because some AHK routine didn't function as advertised. I still have to contact the good folks from the AHK forum to ask what's going on, but in the meantime I've found a (way!) better workaround. This one should keep his fingers of of non-Everything windows.


Further improvements (hopefully :-)) in version 0.0.3:

- Changed the detection of Enter (less brute force)
- Changed detection of the Everything-window (independent of the name in the title bar).
- Go to selected folder directly (without extra <Enter>)

I replaced version 0.0.2 with 0.0.3 (don't throw away your copy of version 0.0.2; it will probably be a collector's item a few years from now :D ;)

And again: thanks for taking the effort to test this!
void
Developer
Posts: 16745
Joined: Fri Oct 16, 2009 11:31 pm

Re: Use the power of Everything in File dialogs

Post by void »

Thanks for the script and ideas.

I've always wanted to add something like this to Everything and it is often requested.

Maybe typing in es: into the save/open filename edit could show an Everything dropdown list of results matching the term after es:?
This could be extended to any edit box..

I'm not a fan of hooking into all windows to catch the open/save dialog, unless there is some other way to do this..

I'll explore some ideas for the Everything 1.5 release..
Stamimail
Posts: 1122
Joined: Sat Aug 31, 2013 9:05 pm

Re: Use the power of Everything in File dialogs

Post by Stamimail »

The real problem will be with this kind of dialog-box:
Image
Need to find a way how to send the PATH to every program.
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Use the power of Everything in File dialogs

Post by NotNull »

Stamimail wrote:The real problem will be with this kind of dialog-box:
[..]
Need to find a way how to send the PATH to every program.
Thanks for bringing that up!
I actually did research that (shortly). It *is* very hard to interact with that. Turns out, this is actually not a foldertree, but a menu with (sub,sub)submenu's
AHK can't handle that out of the box, but someone wrote a library (routine?/?) for that. hundreds of lines of code; way above my current skill-set.
Luckily, this type of dialog boxes is deprecated. Since Vista they should look like this (first hit on Google):
Image

or this:
2018-02-21 00_56_13-Browse For Folder.png
2018-02-21 00_56_13-Browse For Folder.png (8.62 KiB) Viewed 118790 times

I don't expect a lot of the older type (Notepad++ still uses them btw), so I don't think it is worth the effort (luckily :D )
Last edited by NotNull on Tue Feb 20, 2018 11:58 pm, edited 2 times in total.
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Use the power of Everything in File dialogs

Post by NotNull »

void wrote:Thanks for the script and ideas.

I've always wanted to add something like this to Everything and it is often requested.
Although it was/is mainly an excuse to learn myself som AHK, it turns out that it is very useful (IMO, of course). I Actually miss it when the program is not running.
In the current version (not posted yet), you can also search for filenames. Quite often I don't know exactly what the folder was called, but do know a flename inside this folder. Now I can search for "ext:sh reboot" (because I know there is a Linux shell script in that folder, which name I only half remember). Press <Enter> and I'm in that folder. That's the best feature so far. If you decide to implement "File dialog add-on", please concider this. too.
Maybe typing in es: into the save/open filename edit could show an Everything dropdown list of results matching the term after es:?
This could be extended to any edit box..
I have no experience with the es: protocol, but I assume it isn't "search as you type"? Nevertheless, that is a nice way to do it. At least it is fully integrated (my way isn't)
I'm not a fan of hooking into all windows to catch the open/save dialog, unless there is some other way to do this..
Neither am I (mainly based on intuition). I tried other options first, but this was the most feasible (with my skillset)
I did read about hooking. Microsoft suggests to keep the hooks as shortly as possible alive. The AHK folks say it isn't a problem, as long as you handle the detection itself in a short time (and pass the "hook" to the next application).

Upon further reading, this hooking is more subtle than I thought it was. It is all done in userspace (no driver/DLL hacking) and it requires the application to "subsribe" to certain events (built-in Windows mechanism).
What helps (I think) is that it is in dialog boxes. If there ever is a moment where your system is close to idle, it must be in dialog boxes ..
I'll explore some ideas for the Everything 1.5 release..
[/quote]
Nice! Looking forward to that! If you need a sparring partner for ideas ...
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Use the power of Everything in File dialogs

Post by NotNull »

Stamimail wrote:The real problem will be with this kind of dialog-box:
Image
Need to find a way how to send the PATH to every program.
NotNull wrote:Luckily, this type of dialog boxes is deprecated. Since Vista they should look like ...
I was rewriting the script, because of:
void wrote:I'm not a fan of hooking into all windows to catch the open/save dialog, unless there is some other way to do this..
(and I agree ..)
Turns out that it is possible without this hooking stuff. Works nicely and now also supports folder-switching in File Explorer (new script will be posted after some more optimizing and testing)

When testing I stumbled upon this Windows 10 dialog box (for creating a shortcut):
2018-03-28 03_04_05-Project2.png
2018-03-28 03_04_05-Project2.png (19.54 KiB) Viewed 118770 times
Apparently Microsoft has some trouble keeping up with their own standards (from 10 years ago :-))
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Use the power of Everything in File dialogs

Post by NotNull »

void wrote: I'm not a fan of hooking into all windows to catch the open/save dialog, unless there is some other way to do this..
I thought so too and came up with this alternative:
  • In File Explorer or in OPen/Save dialog boxes: Right-click on an empty part of the file/folder list.
    It's a little hard to describe where exactly (The little space left from the file/folder icons is always OK to use), but you should end up with a context menu entry "Jump to Folder" with the familiar Everything logo:
    2018-03-30 00_54_41-Movies & TV.png
    2018-03-30 00_54_41-Movies & TV.png (155.56 KiB) Viewed 118752 times
  • After choosing that option, you will see an Everything window where you can select the folder to jump to:
    2018-03-30 00_55_28-TEST.png
    2018-03-30 00_55_28-TEST.png (185.51 KiB) Viewed 118752 times
  • Press <Enter> on the right folder (or <Escape> to do nothing and go back)
  • Now you are in the choosen folder in the Explorer / file dialog window:
    2018-03-30 00_55_49-etc.png
    2018-03-30 00_55_49-etc.png (176.02 KiB) Viewed 118752 times
  • That's it.
Next post: installation (there seems to be a max number of attachments ...)
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Use the power of Everything in File dialogs

Post by NotNull »

Installation
  1. Download Autohotkey.zip (https://autohotkey.com/download/ahk.zip)
  2. Extract this to some folder
  3. Delete all files, except AutoHotkeyU64.exe /AutoHotkeyU32.exe
    Which one depends on the bit-ness of your Windows. If you don't know what that means, then leave both of them in place. Or better: wait for a next, more streamlined version of this.
  4. Download attached JumpToFolderV0.0.5.zip
  5. Extract this zip to the same folder
  6. Change the settings in JumpToFolder.ini to match your situation:

    Code: Select all

    [JumpToFolder]
    
    ;   Where is Everything installed?
    	EverythingEXE=C:\Program Files\Everything\Everything.exe
    ;	EverythingEXE=C:\Tools\Everything\Everything.exe
    
    ;   Extra Parameters for Everything (like instance). Not yet implemented.
    ;	EverythingParms=
    	
    ;   Icon to use in the context menu
    	Icon=C:\Program Files\Everything\Everything.exe
    ;	Icon=C:\Tools\Everything\Everything.exe
    
    ;   Text to use in the context menu
    	MenuText=Jump to Folder ...
    
    
  7. Run JumpToFolderContextmenu.cmd. You will get this:
    2018-03-30 15_16_25-C__WINDOWS_system32_cmd.exe.png
    2018-03-30 15_16_25-C__WINDOWS_system32_cmd.exe.png (6.71 KiB) Viewed 118750 times
  8. Press <i> to install the context menu (and do some other stuff).
  9. Done.
Attachments
JumpToFolderV0.0.5.zip
(2.9 KiB) Downloaded 2258 times
Stamimail
Posts: 1122
Joined: Sat Aug 31, 2013 9:05 pm

Re: Use the power of Everything in Explorer and File dialogs

Post by Stamimail »

At step 8, I got:

Code: Select all

Enter your choice : I
The system cannot find the file JumpToFolder.ini.
The operation completed successfully.
The operation completed successfully.
The operation completed successfully.

Press any key to continue . . .
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Use the power of Everything in Explorer and File dialogs

Post by NotNull »

Stamimail wrote:At step 8, I got:

Code: Select all

The system cannot find the file JumpToFolder.ini.
.. and that leads to a non-functioning context-menu, I guess.

Probably the script is started from a different folder than the one where JumpToFolder's INI and CMD are.



Try it with this CMD:
(difference is the extra pushd "%~dp0" (3rd line), that will make the script go to the folder where the script is)

Code: Select all

@echo off
setlocal
pushd "%~dp0"
color 1b
echo.
echo.
echo.	[I] Install JumpToFolder context menu
echo.	[R] Remove JumpToFolder context menu
echo.	[Q] Quit
echo.

choice /c IRQ /N /M "Enter your choice : "
call :Option%ERRORLEVEL%

echo.
pause
goto :EOF



:Option1
::	32 or 64 bit? (rough check is enough ..)
	set BITNESS=64
	if not exist "%windir%\SysWOW64\" set BITNESS=32
::	Read settings from INI
	for /f "delims=" %%x in (JumpToFolder.ini) DO set %%x 2>nul >nul

::	Add contextmenu to registry

::	Add contextmenu entry
	REG ADD HKCU\Software\Classes\Directory\Background\Shell\JumpToFolder /v MuiVerb /d "%MenuText%" -f

::	Add icon to conetxmenu
	REG ADD HKCU\Software\Classes\Directory\Background\Shell\JumpToFolder /v Icon /d "\"%Icon%\"" -f

::	Add command
	REG ADD HKCU\Software\Classes\Directory\Background\Shell\JumpToFolder\Command /ve /d "\"%CD%\AutoHotkeyU%BITNESS%.exe\" \"%CD%\JumpToFolder.ahk\"" -f
goto :EOF

:Option2
::	Remove context menu
	REG DELETE HKCU\Software\Classes\Directory\Background\Shell\JumpToFolder /f
goto :EOF


:Option3
::	Quit
goto :EOF
Stamimail
Posts: 1122
Joined: Sat Aug 31, 2013 9:05 pm

Re: Use the power of Everything in Explorer and File dialogs

Post by Stamimail »

Now "The operation completed successfully."
Probably the script is started from a different folder than the one where JumpToFolder's INI and CMD are.
I don't think so.
Here is my structure:

Code: Select all

C:\Everything\NN\Everything-1.4.1.896.x64
C:\Everything\NN\AutoHotkeyU64.exe
C:\Everything\NN\JumpToFolder.ahk
C:\Everything\NN\JumpToFolder.ini
C:\Everything\NN\JumpToFolderContextmenu.cmd
C:\Everything\NN\JumpToFolderContextmenu2.cmd
C:\Everything\NN\Everything-1.4.1.896.x64\Everything.db
C:\Everything\NN\Everything-1.4.1.896.x64\Everything.exe
C:\Everything\NN\Everything-1.4.1.896.x64\Everything.ini
C:\Everything\NN\Everything-1.4.1.896.x64\Run History.csv
(Edit: it's probably RunAsAdmin effect, which set the current directory to C:\Windows\System32. https://ss64.com/nt/pushd.html)

Results:

I tryed with Firefox open dialog-box (Ctrl+O).
Everything showed up.
2 problems:
1. <Enter> in SearchBox should jump to Results Pane (MaxValueRunHistory). That's the way it works in Everything.
2. <Enter> in Results pane didn't make the expected behaviour.
Instead, I could notice it took affect on my current webpage, Google.
It typed in "2018-04-01" in Google search bar.
https://snag.gy/jauDSI.jpg
Last edited by Stamimail on Sun Apr 01, 2018 6:00 pm, edited 1 time in total.
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Use the power of Everything in Explorer and File dialogs

Post by NotNull »

Stamimail wrote:
Probably the script is started from a different folder than the one where JumpToFolder's INI and CMD are.
I don't think so.
If you want to be sure, create a TEST.cmd in the folder where umpToFolderContextmenu.cmd is:

Code: Select all

pause
It should show you the current working directory when started (the same way you started the other .cmd).


1. <Enter> in SearchBox should jump to Results Pane (MaxValueRunHistory). That's the way it works in Everything.
<Enter> is reserved for passing through the selected folder to the Open/Save dialogbox. Use <Tab> to go to the resultlist.

2. <Enter> in Results pane didn't make the expected behaviour.
Instead, I could notice it took affect on my current webpage, Google.
It typed in "2018-04-01" in Google search bar.
Can't reproduce that. Will look into it. What might be a factor: the AHK assumes the first column of the result-list contains the filename and the second one the path. Do you have this configured any other way?


BTW: thank you very much for testing!! Good feedback!
Stamimail
Posts: 1122
Joined: Sat Aug 31, 2013 9:05 pm

Re: Use the power of Everything in Explorer and File dialogs

Post by Stamimail »

Just added an edit I hope you see it.
Last edited by Stamimail on Sun Apr 01, 2018 6:14 pm, edited 1 time in total.
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Use the power of Everything in Explorer and File dialogs

Post by NotNull »

[quote="Stamimail"
(Edit: it's probably RunAsAdmin effect, which set the current directory to C:\Windows\System32. https://ss64.com/nt/pushd.html)
[/quote]

No need, all settings are for current user. You can run the CMD and the AHK as a restricted user.
Stamimail
Posts: 1122
Joined: Sat Aug 31, 2013 9:05 pm

Re: Use the power of Everything in Explorer and File dialogs

Post by Stamimail »

It should show you the current working directory when started (the same way you started the other .cmd).
Oh, current working directory...
In past I set the .cmd extension in my system, to be opened by Notepad.
So I needed at the beginning to open CMD manually, and dragged the .cmd to CMD window and run it...
What might be a factor: the AHK assumes the first column of the result-list contains the filename and the second one the path. Do you have this configured any other way?
https://snag.gy/H8J7iq.jpg
ovg
Posts: 294
Joined: Thu Oct 27, 2016 7:19 pm

Re: Use the power of Everything in Explorer and File dialogs

Post by ovg »

Hi, NotNull!

Thanks for sharing!
It works for me.
But I didn't like EV window without menu and title, sorry. :oops:

BTW, many thanks for efforts! :D
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Use the power of Everything in Explorer and File dialogs

Post by NotNull »

ovg wrote: It works for me.
But I didn't like EV window without menu and title, sorry. :oops:
No problem :) That's a matter of personal taste.
You can get the menu and/or title back by commenting out lines 132 and 135, like this:

Code: Select all

;   Remove title bar of this Everything window (WS_CAPTION)
;   WinSet, Style, -0xC00000, ahk_id %@EverythingID%

;   Remove menu bar of this Everything window
;   DllCall("SetMenu", "uint", @EverythingID, "uint", 0)
EDIT: replaced # with ; (mixed things up)

But you probably knew that already (didn't you write an AHK script for @Stamimail for files that are/are not already downloaded? )

Thanks for feedback! Glad it works for at least 1 person beside myself :mrgreen:
Last edited by NotNull on Mon Apr 02, 2018 8:40 pm, edited 1 time in total.
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Use the power of Everything in Explorer and File dialogs

Post by NotNull »

Stamimail wrote:
What might be a factor: the AHK assumes the first column of the result-list contains the filename and the second one the path. Do you have this configured any other way?
https://snag.gy/H8J7iq.jpg
Hmmm, then I have to think really hard what's going on here :(

Do you see this behaviour only in Firefox or also in File Explorer / Notepad's Open dialog box? MAybe some add-on that gets in the way (thinking out loud here ..)
Oh, current working directory...
In past I set the .cmd extension in my system, to be opened by Notepad.
So I needed at the beginning to open CMD manually, and dragged the .cmd to CMD window and run it...
Or right-click the CMD > Open
ovg
Posts: 294
Joined: Thu Oct 27, 2016 7:19 pm

Re: Use the power of Everything in Explorer and File dialogs

Post by ovg »

NotNull wrote: You can get the menu and/or title back by commenting out lines 132 and 135, like this:
Already done :-)
Program is very well commented!
Stamimail
Posts: 1122
Joined: Sat Aug 31, 2013 9:05 pm

Re: Use the power of Everything in Explorer and File dialogs

Post by Stamimail »

@ovg
Hi ovg, I'm glad it works for you.
btw, ToDownload was/is great. thank you very much for that. :D

@NotNull
I tryed in Notepad (haven't it in context menu), and Chrome+Everything (failed, with inserting "2018-04-01").
Anyway, thanks, it's not critical.
Currently I'm using Direct Folders. It has a feature that makes the Dialog navigation more easy:
ClickSwitch

This feature will make a file dialog instantly jump to the folder already opened in Explorer, Total Commander or Directory Opus. Just switch to the window you need.
but still, I think the kind of dialog I've mentioned above, is the main problem here.
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Use the power of Everything in Explorer and File dialogs

Post by NotNull »

ovg wrote:
NotNull wrote: You can get the menu and/or title back by commenting out lines 132 and 135, like this:
Already done :-)
Program is very well commented!
Thanks!
The reason why I removed those is that I wanted it to look different from the regular Everything, to avoid confusion. And to make it less easy to drag the windows around, showing the underlying window. But if you know what you're doing, this should be no problem.
ovg
Posts: 294
Joined: Thu Oct 27, 2016 7:19 pm

Re: Use the power of Everything in Explorer and File dialogs

Post by ovg »

NotNull wrote: The reason why I removed those is that I wanted it to look different from the regular Everything, to avoid confusion. And to make it less easy to drag the windows around, showing the underlying window.
I suspected this :-)
Stamimail
Posts: 1122
Joined: Sat Aug 31, 2013 9:05 pm

Re: Use the power of Everything in Explorer and File dialogs

Post by Stamimail »

maybe we have a beginning of an answer...
I thought about the string "2018-04-01".
I have a hotkey app (HotkeyP), which Alt+Shift+D is configured to paste the current date, with YYYY-MM-DD pattern.
And I suspected that HotkeyP gets what JumpToFolder is sending.
And indeed, I can see the icon of HotkeyP in system tray is flashing after I <Enter> in Result Pane. It means HotkeyP launch a hotkey.
Another thing I can see, that now, the date was changed to 2018-04-02.

One more thing,
I could see this line in the AHK

Code: Select all

Activate Address bar (Alt-D)
I did some tests in my system.
It appears that there is no one rule for focusing the Address bar in my system.
For some dialogs the key is Alt+D
For some dialogs the key is Alt+C
The Keyboard langauge input (Alt+Shift) and CapsLock, are also affect this key.
ovg
Posts: 294
Joined: Thu Oct 27, 2016 7:19 pm

Re: Use the power of Everything in Explorer and File dialogs

Post by ovg »

2Stamimail
Welcome, was glad to help :-)
ovg
Posts: 294
Joined: Thu Oct 27, 2016 7:19 pm

Re: Use the power of Everything in Explorer and File dialogs

Post by ovg »

2NotNull
2Stamimail

I forgot to mention that line #185

Code: Select all

SendInput !D
for some reason doesn't work for me, should have been replaced with:

Code: Select all

Send !D
May be feature of my system? :lol:
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Use the power of Everything in Explorer and File dialogs

Post by NotNull »

ovg wrote: I forgot to mention that line #185

Code: Select all

SendInput !D
for some reason doesn't work for me, should have been replaced with:

Code: Select all

Send !D
May be feature of my system? :lol:
That surprises me. You can send input with Send, SendInput or SendEvent. I tested all 3 on different machines. All worked (minus some timing isues)
If SendInput doesn't work (for some technical reason), it falls back to ... Send :? Beats me why it doesn't work in your case. Are you running this with an older version of AHK? (just guessing ...)

Stamimail wrote: I could see this line in the AHK

Code: Select all

Activate Address bar (Alt-D)
I did some tests in my system.
It appears that there is no one rule for focusing the Address bar in my system.
For some dialogs the key is Alt+D
For some dialogs the key is Alt+C
The Keyboard langauge input (Alt+Shift) and CapsLock, are also affect this key.
EDIT:
What happens if you replace SendInput !D with: SendInput {Alt Down}{d}{Alt Up} ?

That would be a real pity, if that doesn't work (I needed that for my file manager - Q-Dir - that has multiple address bars for multiple tabs. It is hard/impossible to figure out which address bar belongs to the active tab otherwise).

Originally code like this took care of the "Alt-D" routine:

Code: Select all

;       Put _FolderPath in Edit1 control of the Open dialog (where the filename is put; it also accepts folders)
        Control, EditPaste, %@FolderPath%, Edit1, ahk_id %@WinID%
I think it's better when I switch back to the old method ... Too bad, as the Alt-D is quite universal in Windows (so is <F4>, btw).


Which programd do have the <Alt-C> for the address bar? Is the "Jump to Folder" context menu active in those?
BTW: If you try to run "Jump to Folder" in a not supported application, you get a dialog box that says This program is not (yet) supported .. Routines for that program can be added later (the script is prepared for that). Your "Alt-C" program could be added that way.
Last edited by NotNull on Mon Apr 02, 2018 8:58 pm, edited 1 time in total.
ovg
Posts: 294
Joined: Thu Oct 27, 2016 7:19 pm

Re: Use the power of Everything in Explorer and File dialogs

Post by ovg »

NotNull wrote:Are you running this with an older version of AHK? (just guessing ...)
No, I use 1.1.28.01.
I have a script which notify me about new version of AHK:

Code: Select all

whr := ComObjCreate("WinHttp.WinHttpRequest.5.1")
whr.Open("GET", "https://autohotkey.com/download/1.1/version.txt", true)
whr.Send()
;Using 'true' above and the call below allows the script to remain responsive.
whr.WaitForResponse()
version := whr.ResponseText
If (version != A_AhkVersion)
{
   MsgBox, 4160,  New Version Of AHK Is Available, Version %version% of AutoHotKey Is Available!
   RunWait, wget64 -On:\Downloads\AutoHotkey_%version%.zip https://autohotkey.com/download/ahk.zip --no-check-certificate
}
From Autohotkey.com
Stamimail
Posts: 1122
Joined: Sat Aug 31, 2013 9:05 pm

Re: Use the power of Everything in Explorer and File dialogs

Post by Stamimail »

Which programd do have the <Alt-C> for the address bar?
I could find this in Firefox and Notepad Open Dialogs (Ctrl+O). Only when Keyboard Input is Hebrew. When Keyboard input is English, neither Alt+C or alt+D works.
Is the "Jump to Folder" context menu active in those?
Firefox yes. Noetpad - it's not found in the context menu.
BTW: If you try to run "Jump to Folder" in a not supported application, you get a dialog box that says This program is not (yet) supported ..
I encountered this, when I was trying Word2003 dialog.
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Use the power of Everything in Explorer and File dialogs

Post by NotNull »

Stamimail wrote:
Which programd do have the <Alt-C> for the address bar?
I could find this in Firefox and Notepad Open Dialogs (Ctrl+O). Only when Keyboard Input is Hebrew.
Aha, now I get it! That will probably mean that other languages use even different shotcut keys.
That convinces me to go back to the old style. Thanks! I'm glad this comes up so soon in the process...

Strange you don't get the Jump .. context menu in Notepad. That was my primary test-case.
Anyone else here seeing that same issue?
ovg
Posts: 294
Joined: Thu Oct 27, 2016 7:19 pm

Re: Use the power of Everything in Explorer and File dialogs

Post by ovg »

I've noticed that "Jump to folder" appears only if there is a "free space" in Open/Save dialog.
1.png
1.png (153.11 KiB) Viewed 118677 times
2.png
2.png (201.15 KiB) Viewed 118677 times
ovg
Posts: 294
Joined: Thu Oct 27, 2016 7:19 pm

Re: Use the power of Everything in Explorer and File dialogs

Post by ovg »

Hmm, now SendInput !D also working :roll: :evil:
Stamimail
Posts: 1122
Joined: Sat Aug 31, 2013 9:05 pm

Re: Use the power of Everything in Explorer and File dialogs

Post by Stamimail »

I've noticed that "Jump to folder" appears only if there is a "free space" in Open/Save dialog.
I've noticed that it's actaully "Libraries\Documents" vs Desktop difference.
When set to Desktop, I do have it.
ovg
Posts: 294
Joined: Thu Oct 27, 2016 7:19 pm

Re: Use the power of Everything in Explorer and File dialogs

Post by ovg »

Stamimail wrote:I've noticed that it's actaully "Libraries\Documents" vs Desktop difference.
For me - in any place, if there is some "free space"
Untitled.png
Untitled.png (150.92 KiB) Viewed 118662 times
Stamimail
Posts: 1122
Joined: Sat Aug 31, 2013 9:05 pm

Re: Use the power of Everything in Explorer and File dialogs

Post by Stamimail »

ovg wrote:
Stamimail wrote:I've noticed that it's actaully "Libraries\Documents" vs Desktop difference.
For me - in any place, if there is some "free space"
"Desktop" means "in any place", except for libraries.
If you in location that it looks like there is not "free space", put the cursor in the space between the Navigation Pane and the Name column, and then Right Click.

@NotNull
viewtopic.php?f=7&t=6095
ovg
Posts: 294
Joined: Thu Oct 27, 2016 7:19 pm

Re: Use the power of Everything in Explorer and File dialogs

Post by ovg »

Wow, thanks!
"put the cursor in the space between the Navigation Pane and the Name column, and then Right Click." :oops: :D
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Use the power of Everything in Explorer and File dialogs

Post by NotNull »

ovg wrote:Wow, thanks!
"put the cursor in the space between the Navigation Pane and the Name column, and then Right Click." :oops: :D
Hidden in pages long discussions was this instruction:
  • In File Explorer or in OPen/Save dialog boxes: Right-click on an empty part of the file/folder list.
    It's a little hard to describe where exactly (The little space left from the file/folder icons is always OK to use), but you should end up with a context menu entry "Jump to Folder" with the familiar Everything logo:
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Use the power of Everything in Explorer and File dialogs

Post by NotNull »

Stamimail wrote:
I've noticed that "Jump to folder" appears only if there is a "free space" in Open/Save dialog.
I've noticed that it's actaully "Libraries\Documents" vs Desktop difference.
When set to Desktop, I do have it.
Currently only implemented for "normal" folders.
If you would like to have it in "special folders", like libraries, Recycle bin, add/remove programs .. no problem.
Same goes for Drives (rightclicking C:\ does not (yet) bring up the context menu in this test version)
Also easy to implement.

Note that the context menu entry is available on the Desktop, but selecting it, does nothing (no directory to change here :))


I will write a new version of the AHK and the CMD tonight (if nothing else interferes ...)
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Use the power of Everything in Explorer and File dialogs

Post by NotNull »

Stamimail wrote: @NotNull
viewtopic.php?f=7&t=6095
Yesterday, during some non-related experiments, I messed up my Q-Dir filemanager. No problem - I'm used to that - but I noticed it was in German (author is German). Instead of Menu:File, I now got Menu:Datei (the German word for file), meaning Alt-D was bound to this menu entry.

Luckily I do have 2 à 3 other ways to get this working again (on paper; still have to build and test those)
ben74
Posts: 1
Joined: Thu Nov 14, 2019 12:40 pm

Re: Use the power of Everything in Explorer and File dialogs

Post by ben74 »

Well I've been looking for this in ages ... !

> Is there a way to have a dialog in order to select files too ? ( being a webdeveloper require me to select the right files in so much locations .. ) :D
Coldblackice
Posts: 79
Joined: Sun Jul 13, 2014 12:20 am

Re: Use the power of Everything in Explorer and File dialogs

Post by Coldblackice »

You beautiful, beautiful bastard! This is brilliant. Awesome idea and script!
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Use the power of Everything in Explorer and File dialogs

Post by NotNull »

Coldblackice wrote: Sun Nov 17, 2019 4:02 am You beautiful, beautiful bastard! This is brilliant. Awesome idea and script!
Thank you!! :D
ben74 wrote: Thu Nov 14, 2019 12:50 pm Is there a way to have a dialog in order to select files too ? ( being a webdeveloper require me to select the right files in so much locations .. )
I did write a version once that when selecting a file, it would jump to the folder of that file (and if you selected a folder, it would jump to that folder).
But I must have deleted it - even Everything couldn't find it ;) - as I'm converting the script from AutoHotKey to AutoIt (more possibilities; less "chaotic").

I will rewrite the file routine (couple of lines of code), but you have to be patient as i am quite busy the next couple of days.
zuzu_kuc
Posts: 5
Joined: Fri Feb 14, 2020 11:23 am

Re: Use the power of Everything in Explorer and File dialogs

Post by zuzu_kuc »

Yep, i wrote a script to open(show) selected file in Total Commander.
AHK is AWESOME
horst.epp
Posts: 1447
Joined: Fri Apr 04, 2014 3:24 pm

Re: Use the power of Everything in Explorer and File dialogs

Post by horst.epp »

zuzu_kuc wrote: Fri Feb 14, 2020 11:30 am Yep, i wrote a script to open(show) selected file in Total Commander.
AHK is AWESOME
No script is needed for this, just some entries in the Everything Context menu settings.
Also Total Commander integrates Everything itself so one can search from inside of TC using Everything.
RonIOU2
Posts: 3
Joined: Tue Mar 31, 2020 12:55 pm

Re: Use the power of Everything in Explorer and File dialogs

Post by RonIOU2 »

Having recently switched over from Listary which has this function, but is nowhere near as good. I was wondering how difficult it would be to also have the item selected by the left mouse click as well as the enter key, is this possible?
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Use the power of Everything in Explorer and File dialogs

Post by NotNull »

RonIOU2 wrote: Wed Apr 01, 2020 10:52 pm Having recently switched over from Listary which has this function, but is nowhere near as good. I was wondering how difficult it would be to also have the item selected by the left mouse click as well as the enter key, is this possible?
Yes, this is possible. Should be quite straightforward. I am in a process of rewriting this in AutoIT (instead of AutoHotKey) and will implement this too.
But don't hold your breath: that will take me probably more than 6 months due to lack of (large blocks of) time.
RonIOU2
Posts: 3
Joined: Tue Mar 31, 2020 12:55 pm

Re: Use the power of Everything in Explorer and File dialogs

Post by RonIOU2 »

Hi
Thanks for your offer to look at this when you can. In the meantime I had a shot at it myself and using the KeyWinC script. I have been able to now select the row using the mouse and then double click on it to start the same process as using the enter key.
I am sure that there are some issues I have missed but it does seem to work ok if you select the row first that you want and then double click on it.
Would be interested to see what you think.

These are the following amendments that I have made to your script. Including loading everything up to show the most recent folders that have been accessed.


The following was amended at the start:

Code: Select all

;_____________________________________________________________________________
;
;   REGULAR CODE
;_____________________________________________________________________________

;   MsgBox And we're off !!!

;	How and where is this started? Will retun WindowType (Open/SaveAs dialog;explorer; ...)
	Gosub CheckOrigin

;	Start Everything
	Gosub StartEverything

;	Waitfor Enter/Escape (handled by #IfWinActive)
;	After that, this will start the FeedFolder routine to
;	enter resulks from Everything in the original window.

	#IfWinActive ahk_class EVERYTHING
		Enter::
		{
			gosub GetSelection
	;		We got our folder, now check which window we came from (Explorer/Save As / ..) and act accordingly
			gosub FeedFolder
		}
		
		LButton::    ; shift and left click add by ROLAND
		if ClickCount > 0 ; SetTimer already started, so we log the keypress instead.
		{
			ClickCount += 1
			return
		}
	
	; 		Otherwise, this is the first press of a new series. Set count to 1 and start the timer:
			ClickCount = 1
			SetTimer, KeyDoubleClick, 300 ; Wait for more presses within a 400 millisecond window.
			Return
		
; 		Roland blanked out next five lines as esc works already within Everything
;		Esc::
;		{
;			Send {Escape}
;		}


The following was added as at the end:

Code: Select all

;_____________________________________________________________________________
;
	KeyDoubleClick:
;_____________________________________________________________________________

SetTimer, KeyDoubleClick, off
if ClickCount = 2 ; The key was pressed twice.
	{
		gosub GetSelection
	;	We got our folder, now check which window we came from (Explorer/Save As / ..) and act accordingly
		gosub FeedFolder
		ExitApp		
	}
mouseclick
	; Regardless of which action above was triggered, reset the count to
	; prepare for the next series of presses:
ClickCount = 0
return
;_____________________________________________________________________________

This was the amendments to show the most recent folders used.

Code: Select all

;_____________________________________________________________________________
;
    StartEverything:
;_____________________________________________________________________________

; Added by Roland to set the search up to the most show most recent folders.
Sendinput dm:Today
Sendinput {Control down}6{Control up}   ;Sorts by Date Modified
Sendinput {Alt down}ff{Alt up}	;Filters by Folders Only needs to be two f's as first only sets it to everything
 								;Alt will be depend on individual's own shortcut keys
Sendinput {Control down}a{Control up}
Return
( code tags added for readability by NotNull )
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Use the power of Everything in Explorer and File dialogs

Post by NotNull »

Hi Roland,

will take a closer look later today, but my first suggestion, regarding the most recent folders part, is that you are changing the sort when Everything is already started.
You can use Everything command line options to open it with a specific sort(-order) and/or filter straight away!. Makes life easier :)


(btw: I added code tags to improve readability (opening tag:
[code]
and closing tag
[/code]
or use the
</>
button )
Locked