lock_set_foreground_window - work on folder window?

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
harryray2
Posts: 1104
Joined: Sat Oct 15, 2016 9:56 am

lock_set_foreground_window - work on folder window?

Post by harryray2 »

Can the new "lock_set_foreground_window" be made to work when opening a folder window?
void
Developer
Posts: 16680
Joined: Fri Oct 16, 2009 11:31 pm

Re: lock_set_foreground_window - work on folder window?

Post by void »

This feature is currently broken.

It will work with folders/Windows Explorer for the next alpha update.

Thank you for the bug report.
harryray2
Posts: 1104
Joined: Sat Oct 15, 2016 9:56 am

Re: lock_set_foreground_window - work on folder window?

Post by harryray2 »

Will I be able to choose to show files or folder?

I would like files to open in the foreground but not folders.
void
Developer
Posts: 16680
Joined: Fri Oct 16, 2009 11:31 pm

Re: lock_set_foreground_window - work on folder window?

Post by void »

I will consider adding a separate lock_set_foreground_window setting for files and folders.
Thank you for the suggestion.

For now, enabling lock_set_foreground_window will run programs opened from Everything in the background.

If you want more control, please consider running a powershell script to call LockSetForegroundWindow when opening folders under Tools -> Options -> Context Menu -> Open Folder -> Command.
harryray2
Posts: 1104
Joined: Sat Oct 15, 2016 9:56 am

Re: lock_set_foreground_window - work on folder window?

Post by harryray2 »

Thank you, it would be useful.

Absolutely no idea how to write the script unfortunately...
harryray2
Posts: 1104
Joined: Sat Oct 15, 2016 9:56 am

Re: lock_set_foreground_window - work on folder window?

Post by harryray2 »

Will this now be fixed in the 1284 update? It doesn't yet seem to be working in 1283

Thanks
harryray2
Posts: 1104
Joined: Sat Oct 15, 2016 9:56 am

Re: lock_set_foreground_window - work on folder window?

Post by harryray2 »

I've tried with /lock_set_foreground_window=1 on 1284 but it doesn't seem to be working yet, directories open in the foreground.

Is it just the above command or is there another that needs to be enabled?
void
Developer
Posts: 16680
Joined: Fri Oct 16, 2009 11:31 pm

Re: lock_set_foreground_window - work on folder window?

Post by void »

/lock_set_foreground_window=1 should be working in Everything 1.5.0.1284.

You will need to restart Everything for the setting to take effect.

Everything should keep keyboard focus when another program is opened from within Everything.
If you find the opened program is visually in the foreground, consider setting Everything to show always on top from View -> On Top -> While searching.
harryray2
Posts: 1104
Joined: Sat Oct 15, 2016 9:56 am

Re: lock_set_foreground_window - work on folder window?

Post by harryray2 »

Thanks, running a programme, as expected, runs in the background, but when opening a directory it still opens in the foreground.
I don't mind programmes starting in the foreground, but directories I would prefer to start in the background.

Setting Everything on top always does solve it, but I don't want Everything on top all the time, and setting it on top while searching doesn't solve the problem.
void
Developer
Posts: 16680
Joined: Fri Oct 16, 2009 11:31 pm

Re: lock_set_foreground_window - work on folder window?

Post by void »

I'll put on my TODO list to add an option to launch folders minimized.

Thanks for the suggestion.



This should be possible already by setting your Open (Folders) command to a BAT file which starts Windows Explorer minimized.

For example:
startmin.bat

Code: Select all

start /min explorer.exe /n,/e,"%1"
Set your Open (folders) command:
  • In Everything, from the Tools menu, click Options.
  • Click the Context menu tab on the left.
  • Select Open (folders)
  • Change the command to:
    $exec("C:\Everything\startmin.bat" "%1")
  • Click OK.
harryray2
Posts: 1104
Joined: Sat Oct 15, 2016 9:56 am

Re: lock_set_foreground_window - work on folder window?

Post by harryray2 »

Thanks, it's not really about launching the folders minimised but opening the folders behind the Everything window as happens with opening files with the
lock_set_foreground_window enabled.

Ideally, for me, I would like to start programmes in the foreground (in front) of the Everything window and folders to open behind.

The reason being is that I often use the open path command for opening multiple folders and usually only open one programme from Everything.

lock_set_foreground_window enabled works when opening a programme but not when opening folders.
void
Developer
Posts: 16680
Joined: Fri Oct 16, 2009 11:31 pm

Re: lock_set_foreground_window - work on folder window?

Post by void »

lock_set_foreground_window does not prevent a new window from positioning itself in front of Everything.

lock_set_foreground_window will only prevent the new window from gaining keyboard input.



Try a powershell script that calls IShellDispatch2.ShellExecute with the vShow value set to 4 (Open the application with its window at its most recent size and position. The active window remains active.)
harryray2
Posts: 1104
Joined: Sat Oct 15, 2016 9:56 am

Re: lock_set_foreground_window - work on folder window?

Post by harryray2 »

Ah, thanks, I misunderstood..I'll look at the powershell script (no guarantee I'll understand it :0))

Would it be possible to implement a way of doing it within Everything?

Although I wasn't really aiming at starting the folders minimised I suppose it would be useful when opening a lot of folders.
I can try changing, as you suggested, the entry in the context menu tab, but the problem is that I don't always want to open the folders minimised, only for when I'm opening more than about seven folders.
void
Developer
Posts: 16680
Joined: Fri Oct 16, 2009 11:31 pm

Re: lock_set_foreground_window - work on folder window?

Post by void »

Everything 1.5.0.1291a adds a $execminimized() context menu command.

To Open folders minimized:
  • In Everything, from the Tools menu, click Options.
  • Click the Context menu tab on the left.
  • Select Open (folders)
  • Change the Command to:
    $execminimized("%1")
  • Click OK.


A $execmaximized() command is also available.
harryray2
Posts: 1104
Joined: Sat Oct 15, 2016 9:56 am

Re: lock_set_foreground_window - work on folder window?

Post by harryray2 »

Would it be possible to have this command show up on the context menu as an option to minimise?
void
Developer
Posts: 16680
Joined: Fri Oct 16, 2009 11:31 pm

Re: lock_set_foreground_window - work on folder window?

Post by void »

Context menu customization is on my TODO list.

For now, please consider using "Explorer" to open minimized:
  • In Everything, from the Tools menu, click Options.
  • Click the Context menu tab on the left.
  • Select Explore.
  • Change the Command to:
    $execmaximized("%1")
  • Click OK.
Now when you right click folders and click Explore, the folder will be opened minimized.

Consider setting a keyboard shortcut to "Explore" from Tools -> Options -> Keyboard -> File | Explore

Consider renaming Explore to Open Minimized
Post Reply