Restore window when opening multiple folders in single mode

Discussion & Support for xplorer² professional

Moderators: fgagnon, nikos, Site Mods

Post Reply
syclonix
New Member
Posts: 3
Joined: 2008 Jan 07, 00:19

Restore window when opening multiple folders in single mode

Post by syclonix »

Hi!

I've been searching everywhere for this, is there a way to restore xplorer when opening new folders after it has been minimized? I am using single mode and right now instead of restoring the window when I open a new folder (from a quicklaunch shortcut), xplorer blinks a few times in my taskbar but stays minimized.

Thanks a lot,
Laurence
User avatar
fgagnon
Site Admin
Site Admin
Posts: 3737
Joined: 2003 Sep 08, 19:56
Location: Springfield

Post by fgagnon »

Hi syclonix,

Welcome to the board! :)

To prevent x2 from starting minimized, add the /M switch to the command line for the shortcut you use to start x2.  
(i.e. in the "Target:" field under shortcut properties)
Details are in the User Manual under the heading
Running x2 from commandline
syclonix
New Member
Posts: 3
Joined: 2008 Jan 07, 00:19

Post by syclonix »

Hi fgagnon,

Thanks for the quick reply :)

I am using xplorer as my default shell so I tried replacing the registry entries to use the /M command switch. I'm not sure if I did it right but it doesn't work. Here's my registry file (modified from this thread):

Code: Select all

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\shell]
@="open"

[HKEY_CLASSES_ROOT\Directory\shell\open]

[HKEY_CLASSES_ROOT\Directory\shell\open\command]
@="\"C:\\Program Files\\zabkat\\xplorer2\\xplorer2_UC.exe\" \"/M\" \"%1\""

[HKEY_CLASSES_ROOT\Drive\shell]
@="open"

[HKEY_CLASSES_ROOT\Drive\shell\open]

[HKEY_CLASSES_ROOT\Drive\shell\open\command]
@="\"C:\\Program Files\\zabkat\\xplorer2\\xplorer2_UC.exe\" \"/M\" \"%1\""

[HKEY_CLASSES_ROOT\Drives]

[HKEY_CLASSES_ROOT\Drives\shell]

[HKEY_CLASSES_ROOT\Drives\shell\open]

[HKEY_CLASSES_ROOT\Drives\shell\open\command]
@="\"C:\\Program Files\\zabkat\\xplorer2\\xplorer2_UC.exe\" \"/M\" \"%1\""

[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell]
@="open"

[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\open]

[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\open\command]
@="\"C:\\Program Files\\zabkat\\xplorer2\\xplorer2_UC.exe\" \"/M\" \"::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\"" 

[HKEY_CLASSES_ROOT\CLSID\{450D8FBA-AD25-11D0-98A8-0800361B1103}\shell]
@="open"

[HKEY_CLASSES_ROOT\CLSID\{450D8FBA-AD25-11D0-98A8-0800361B1103}\shell\open]

[HKEY_CLASSES_ROOT\CLSID\{450D8FBA-AD25-11D0-98A8-0800361B1103}\shell\open\command]
@="\"C:\\Program Files\\zabkat\\xplorer2\\xplorer2_UC.exe\" \"/M\" \"%1\""

[HKEY_CLASSES_ROOT\CLSID\{208D2C60-3AEA-1069-A2D7-08002B30309D}\shell]
@="open"

[HKEY_CLASSES_ROOT\CLSID\{208D2C60-3AEA-1069-A2D7-08002B30309D}\shell\open]

[HKEY_CLASSES_ROOT\CLSID\{208D2C60-3AEA-1069-A2D7-08002B30309D}\shell\open\command]
@="\"C:\\Program Files\\zabkat\\xplorer2\\xplorer2_UC.exe\" \"/M\" \"::{208D2C60-3AEA-1069-A2D7-08002B30309D}\"" 

[HKEY_CLASSES_ROOT\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\shell]
@="open"

[HKEY_CLASSES_ROOT\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\shell\open]

[HKEY_CLASSES_ROOT\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\shell\open\command]
@="\"C:\\Program Files\\zabkat\\xplorer2\\xplorer2_UC.exe\" \"/M\" \"::{645FF040-5081-101B-9F08-00AA002F954E}\"" 

[HKEY_CLASSES_ROOT\CLSID\{21EC2020-3AEA-1069-A2DD-08002B30309D}\shell]
@="open"

[HKEY_CLASSES_ROOT\CLSID\{21EC2020-3AEA-1069-A2DD-08002B30309D}\shell\open]

[HKEY_CLASSES_ROOT\CLSID\{21EC2020-3AEA-1069-A2DD-08002B30309D}\shell\open\command]
@="\"C:\\Program Files\\zabkat\\xplorer2\\xplorer2_UC.exe\" \"/M\" \"::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\::{21EC2020-3AEA-1069-A2DD-08002B30309D}\"" 

[HKEY_CLASSES_ROOT\CLSID\{2227A280-3AEA-1069-A2DE-08002B30309D}\shell]
@="open"

[HKEY_CLASSES_ROOT\CLSID\{2227A280-3AEA-1069-A2DE-08002B30309D}\shell\open]

[HKEY_CLASSES_ROOT\CLSID\{2227A280-3AEA-1069-A2DE-08002B30309D}\shell\open\command]
@="\"C:\\Program Files\\zabkat\\xplorer2\\xplorer2_UC.exe\" \"/M\" \"::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\::{21EC2020-3AEA-1069-A2DD-08002B30309D}\\::{2227A280-3AEA-1069-A2DE-08002B30309D}\""
User avatar
nikos
Site Admin
Site Admin
Posts: 15842
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Post by nikos »

for single window mode, that's a side effect without a solution, sorry!
there is always a cat and mouse game between tricks and m$ bringing windows to the front, a bit like popup blockers :)
czechboy
New Member
Posts: 2
Joined: 2008 Jan 01, 13:00

Post by czechboy »

I am not programmer but how can it be that if I have single mode firefox minimized and open it by clicking on any icon it maximizes itself?
User avatar
snakebyte
Gold Member
Gold Member
Posts: 430
Joined: 2003 May 07, 07:14
Location: Seattle
Contact:

Post by snakebyte »

What you are looking for can be achieved using following AutoIt3 script

Code: Select all

; Restore xplorer2 if running; else run.
#NoTrayIcon

$xplorerLocation = "C:\Program Files\zabkat\xplorer2\xplorer2_UC.exe"
If $CmdLine[0]="0" then
   $xplorerArguments = ""
Else
   $xplorerArguments = $CmdLine[1]
EndIf

$splitLocation = StringSplit($xplorerLocation, "\")
$procName = $splitLocation[UBound($splitLocation)-1]
If ProcessExists($procName) Then
    Opt("WinTitleMatchMode", 4)
    WinActivate("classname=ATL:ExplorerFrame", "")
    ;If parameter is passed, then open it in a new tab
    If $xplorerArguments <> "" Then
        sleep(100)
        Send("^{INSERT}")
        sleep(100)
        ControlClick("classname=ATL:ExplorerFrame", "", "Edit1")
        ControlSetText("classname=ATL:ExplorerFrame", "", "Edit1",  $xplorerArguments )
        Send("{ENTER}")
    EndIf
Else
    Run ($xplorerLocation & ' "' & $xplorerArguments & '"')
EndIf
Exit 
Compile this script as an exe say x2launch.exe and update your registery like

Code: Select all

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\open\command] 
@="\"C:\\Program Files\\zabkat\\xplorer2\\x2launch.exe\" \"%1\"" 
This trick was discussed in the following thread
http://forum.zabkat.com/viewtopic.php?t=25 ... c&start=30
Help! I'm an AI running around in someone's universe simulator.
User avatar
snakebyte
Gold Member
Gold Member
Posts: 430
Joined: 2003 May 07, 07:14
Location: Seattle
Contact:

Post by snakebyte »

I have updated the script posted above to open passed parameter in a new tab.

You can download the compiled version of above script from here
http://hacks.anunay.com/xplorer2/downlo ... Launch.exe

To launch Xplorer2, create a shortcut of xplorer2Launch.exe on your desktop. If xplorer2 is not running it will create a new instance of x2 otherwise it will activate and bring X2 to the front.

When X2 is already running and a path parameter is passed to this exe, it will open the passed path in a new tab.

For shell integration, call xplorer2Launch.exe instead of xplorer2 exe from the registry
Last edited by snakebyte on 2008 Jan 09, 00:27, edited 1 time in total.
Help! I'm an AI running around in someone's universe simulator.
syclonix
New Member
Posts: 3
Joined: 2008 Jan 07, 00:19

Post by syclonix »

You guys are SO awesome :D thanks for all the help, I will definately try this as soon as I get home.

BTW I love AutoHotkey. I've been using it for a while and I made a script that will help xplorer act more like firefox. It now opens tabs on middle click, closes tabs on middle click and some other stuff, but it's not quite ready to be released yet--I'm having some troubles when middle clicking the tree.

But since you guys use AHK already, am I wasting my time? Is there already a script like this?
User avatar
Ray
Member
Member
Posts: 69
Joined: 2008 Feb 02, 22:31

Post by Ray »

Works for folders and drives. A couple of points...

1. Is code snippet above the updated version? I have a different location so had to update+recompile. If not, could you please post the updated code?

2. The code I compiled does open folders in new tabs (the way I've set x2 to open them) so if the code snipped pasted here isn't the latest version could you explain what the new version does?

3. I also modified
[HKEY_CLASSES_ROOT\Drive\shell\Open_X2\command]
to point to the loader, since it wouldn't open root drives

4. I have set up a few quicklaunch shortcuts (.lnk) to open two folders side by side, this doesn't seem to work - any suggestions?
If the folders could be forced to open in opposite panes that would be even better.

Thanks for your help.
Post Reply