Single instance only

Discussion & Support for xplorer² professional

Moderators: fgagnon, nikos, Site Mods

Robert2
Gold Member
Gold Member
Posts: 673
Joined: 2004 Jun 17, 15:39

Post by Robert2 »

Greetings–
You would not need to find an icon for xplorer². TrayIt uses the native xplorer² icon. Also icons in the System Tray can be hidden. You’d only need to display the xplorer² icon. It should be easy to target with the mouse then.
I use a program launcher called MomShell. It is installed in the System Tray. I use it all the time to launch applications, often up to 20 applications together. Some of these are automatically sent to the System Tray. This spares clutter and works perfectly on a 19” monitor with a 1024x768 screen resolution. Of course I cannot say about 1600x1200 resolutions, but maybe habits are with us only so that they can be outgrown... :)
Anyway, until xplorer² has an option to run as a single instance, you’ll have to use it as it is, or choose the only alternative that seems to be available, i.e. TrayIt.
Cheers
Robert
Whitman
Member
Member
Posts: 44
Joined: 2003 Aug 23, 01:14

Post by Whitman »

By "find the icon" I meant that it wouldn't be in the same place all of the time.  Depending on when it loads it could be at the end of the system tray or it could be somewhere in the middle.

Anyway, this was a feature request, so I'm willing to wait for it assuming Nikos decides it's a worthwhile feature.  Right now though it seems as though he doesn't.  :(
User avatar
nikos
Site Admin
Site Admin
Posts: 15791
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Post by nikos »

it's not that it isn't worthwhile, but it isn't trivial to change so it'll have to wait its turn, considering other higher priorities
Whitman
Member
Member
Posts: 44
Joined: 2003 Aug 23, 01:14

Post by Whitman »

That's all I wanted to hear.  Now that it is on the "to do" list I can wait patiently for it.  :)
goggin
Member
Member
Posts: 26
Joined: 2003 Mar 01, 16:45

Post by goggin »

Robert2 wrote:Greetings–
3. If too many programs are cluttering up your Taskbar, you could put some of them in the System Tray. I am using TrayIt for this purpose. If you register explorer² with TrayIt, it is automatically minimised to the Windows System Tray. It can then be activated by a single click on its “new” System Tray icon. In this way, you would never run 2 instances of xplorer². Xplorer² is only minimised, then reactivated from the Tray. TrayIt is freeware and is available from http://www.teamcti.com/TrayIt.

Cheers
Robert
I've used TrayIt for this purpose for several years now and it's a decent, but not perfect, solution. I use a Multiple Desktop software app that gives me several "virtual" desktops that I can switch between with a hotkey. Inevitably, I either forget I have x2 open, or can't recall right off the bat which desktop it's on.

*IF* I have minimized x2 to the tray, I can use a hotkey to quickly restore it on whatever desktop I happen to be on. But this only works if it's been minimized to the tray. Otherwise, when I hit my hotkey shortcut for x2, it starts another instance.

Just FYI...
---
dgg
User avatar
snakebyte
Gold Member
Gold Member
Posts: 430
Joined: 2003 May 07, 07:14
Location: Seattle
Contact:

Post by snakebyte »

nikos wrote:it's not that it isn't worthwhile, but it isn't trivial to change so it'll have to wait its turn, considering other higher priorities
The idea behind having multiple tabs in Xplorer2 was to avoid opening mulitple Xplorer2 windows. Thank you Nikos, limiting Xplorer2 to a single instance and ensuring that all new folder launches from OS adds a new tab in Xplorer2 will be really cool. I'm ready to wait  :) .
Help! I'm an AI running around in someone's universe simulator.
goggin
Member
Member
Posts: 26
Joined: 2003 Mar 01, 16:45

Post by goggin »

snakebyte wrote:The idea behind having multiple tabs in Xplorer2 was to avoid opening mulitple Xplorer2 windows.
Yes, yes, yes! I use this feature constantly.

I frequently need 4+ different folders open in my work and it's much, much more convenient to have them all accessible in one tabbed x2 window than to have multiple x2 boxes open...or worse, multiple instances of x2 running needlessly. Tabbed browsing is a killer feature for me!

Now if I can ensure that I only get one instance of x2 no matter which of several virtual destops I'm working on...and a different pane background color for tabs with a view filter active...I'll have it all :-)

Thx!
--
dgg
gladely
Member
Member
Posts: 9
Joined: 2004 Jun 11, 19:51
Location: california
Contact:

Source Control Integration - Part 1, Single Instance

Post by gladely »

When selecting "Explore" on any folder within the source control view I want it to open a new tab in the existing instance, not spawn another window thats compares it to a folder I haven't used in 3 hours.  The position of the window is wrong, the content is wrong...  the new window is just wrong :)  

Instead I would prefer it re-uses the real estate i've already donated to the application, in the location that I've already placed it in.  In fact, even NEW windows should open right on top of the old one... putting them at the top of the screen when I have neatly arranged the current window on top of the taskbar is horribly inconvenient.

Just another use case for background while considering what great feature goes in next to this fantastic product.

Gladely
eyals
Member
Member
Posts: 10
Joined: 2005 Apr 07, 09:51

Post by eyals »

I join the single-instance petition.
It's the one thing I miss the most.
I too feel that the whole concept is to eliminate the need to search for the right window.

And while you're at it... :) - add a "Close to tray" feature. (Or at least minimize to tray)

Since we ALWAYS explore files - it would be best to keep this environment running always.
Demetris
Silver Member
Silver Member
Posts: 217
Joined: 2004 Jul 04, 17:18

Post by Demetris »

I solved the single-instance problem by writing an AutoIt script, and pointing the x2 hotkey to the script, instead of the x2 exe.
The script checks to see if x2 is running. If it is not, it starts it. If it is, it brings up the window.
It was very simple to write (well, even I could do it). Here it is:

Code: Select all

; Restore xplorer2 if running; else run.
#NoTrayIcon
If ProcessExists("xplorer2_UC.exe") Then
	Opt("WinTitleMatchMode", 4)
	WinActivate("classname=ATL:ExplorerFrame", "")
ElseIf Not ProcessExists ("xplorer2_UC.exe") Then
	Run ("D:\xplorer2\xplorer2_UC.exe")
EndIf
Exit
I did the same for all apps one needs to access all the time while working (or playing): editor, word processor, PIM, browser, music player etc. etc.
Now I will have to find something else to bother developers with. ;)

Of course, AutoIt has been designed to be useful for much more complex tasks, like automation in general or making GUIs. It is also free, and its sripting engine is tiny and completely self-contained.

PS.
Off the top of my head, I can recall only one app that does this of itself, without tricks: NetTransport, the download manager (the best, IMO).
If started while running in single-instance mode, the window is activated, even if it was minimized to the tray.
Whitman
Member
Member
Posts: 44
Joined: 2003 Aug 23, 01:14

Post by Whitman »

Single window mode has been implemented now.  Take a look at registry.txt for the bSingleWindow registry item.
Demetris
Silver Member
Silver Member
Posts: 217
Joined: 2004 Jul 04, 17:18

Post by Demetris »

bSingleWindow does not allow for this.
See also this new thread, started by gladely:

http://forum.zabkat.com/viewtopic.php?t=2910

(Now that I see it, my post would be more relevant there.)
eyals
Member
Member
Posts: 10
Joined: 2005 Apr 07, 09:51

Post by eyals »

Demetris,
How do I implement your script?
Do you have a link to a file that runs it?
Demetris
Silver Member
Silver Member
Posts: 217
Joined: 2004 Jul 04, 17:18

Post by Demetris »

Hello, eyals.

http://www.autoitscript.com/autoit3/index.php

Install the package. It will associate .au3 extensions with the engine.

Then save the script in a file with the extension .au3, and use this file (or a shortcut or hotkey to it) to start x2.

To see what each command is, search in the extensive help file.

In the script, of course, you will have to change the executable name if you use the non-unicode version of x2, and also adjust the executable path to the actual path in your system. (To make sure you get the path right, copy it with Alt+C from within x2.)

I have tried this kind of scripts in a few machines and they work fine, but please bear in mind that I'm not exactly an expert at scripting. :)

HTH
Whitman
Member
Member
Posts: 44
Joined: 2003 Aug 23, 01:14

Post by Whitman »

Wow, AutoIt is great.  Thanks for pointing this out. :D

I've edited your script slightly, now you only have to enter the full path to xplorer, the application name will get worked out from the path.  Also I've added a var for arguments incase you want to open specific folders when running xplorer.

Code: Select all

; Restore xplorer2 if running; else run.
#NoTrayIcon

$xplorerLocation = "C:\Program Files\zabkat\xplorer2\xplorer2_UC.exe"
$xplorerArguments = "C:\ D:\"

$splitLocation = StringSplit($xplorerLocation, "\")
$procName = $splitLocation[UBound($splitLocation)-1]
If ProcessExists($procName) Then
   Opt("WinTitleMatchMode", 4)
   WinActivate("classname=ATL:ExplorerFrame", "")
Else
   Run ($xplorerLocation & " " & $xplorerArguments)
EndIf
Exit
Post Reply