Win+E integration

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
jorick
Posts: 15
Joined: 03 May 2017 15:06

Win+E integration

Post by jorick »

Is there any way to get XYplorer to open when Win+E is typed? Currently Windoze Exploder comes up when I type that.

VeeGee

Re: Win+E integration

Post by VeeGee »

Good afternoon,
I saw your message and did a quick search. I found this article : http://www.techrepublic.com/blog/window ... -you-want/. Instead of using their example line of code, I put this line in the AHK file :

Code: Select all

#e:: Run "C:\Program Files (x86)\XYplorer\XYplorer.exe"
Saved the file, double-clicked it to have AutoHotKey run it, pressed WIN+E and XY came up.

jorick
Posts: 15
Joined: 03 May 2017 15:06

Re: Win+E integration

Post by jorick »

Not quite what I was looking for since I thought XYplorer integrated itself into Windows like Xplorer2 does (it opens on Win+E when installed). But it looks interesting so I'll try it. Maybe it will restore my Alt-K key since some app took it and won't give it back.

jorick
Posts: 15
Joined: 03 May 2017 15:06

Re: Win+E integration

Post by jorick »

It's a bit more complex than the line you gave. The following code works to activate XYplorer if running and run it if not:

Code: Select all

#e::
   SetTitleMatchMode, 2
   IfWinExist, XYplorer
   {
      WinActivate
   }
   else
   {
      Run, "C:\Program Files (x86)\XYplorer\XYplorer.exe"
   }
Return
And yes, it restored my Ctrl-K! Yaay!

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: Win+E integration

Post by highend »

Not a good idea to do it that way...

Why? Have a browser with the XYplorer forum open in the foreground and hit Win+e...

A better way (but still not perfect because other applications with this ahk_class can exist as well)

Code: Select all

#e::
    if (WinExist("ahk_class ThunderRT6FormDC"))
        WinActivate
   else
        Run, "C:\Program Files (x86)\XYplorer\XYplorer.exe"
Return
WinGet with the process name / path combined with ahk_class -> 99,9% but I'm too
lazy to do that atm...
One of my scripts helped you out? Please donate via Paypal

kunkel321
Posts: 645
Joined: 10 Jun 2012 03:45
Location: Near Seattle

Re: Win+E integration

Post by kunkel321 »

Perhaps another way (with jorick's) would be
IfWinExist, XYplorer 1
Good through XYplorer version 19.99.9999 :titter: :ugeek:
ste(phen|ve) kunkel

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: Win+E integration

Post by highend »

And when somebody creates a thread "XYplorer 17 crashes" and you have that open when pressing
Win+e... :P
One of my scripts helped you out? Please donate via Paypal

kunkel321
Posts: 645
Joined: 10 Jun 2012 03:45
Location: Near Seattle

Re: Win+E integration

Post by kunkel321 »

highend wrote:And when somebody creates a thread "XYplorer 17 crashes" and you have that open when pressing
Win+e... :P
Hmmm yes, that is true!
ste(phen|ve) kunkel

Leito
Posts: 561
Joined: 26 Sep 2016 15:37
Location: Windows 10 1809 x64

Re: Win+E integration

Post by Leito »

This is ugly - but you could customize the title bar of XYplorer (Colors and StylesTemplates) to add a unique term to it. Then use:

Code: Select all

IfWinExist, XYplorer {unique-term}

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: Win+E integration

Post by highend »

The most reliable way is:

Code: Select all

#NoEnv
#SingleInstance Force

#e::
    WinGet, winList, list, ahk_class ThunderRT6FormDC

    found := false
    Loop, % winList
    {
        winID := winList%A_Index%
        WinGet, processName, ProcessName, ahk_id %winID%
        if (Format("{:L}", processName) = "xyplorer.exe") {
            found := true
            WinActivate, ahk_id %winID%
            break
        }
    }
    if !(found)
        Run, "C:\Program Files (x86)\XYplorer\XYplorer.exe"
return

One of my scripts helped you out? Please donate via Paypal

kunkel321
Posts: 645
Joined: 10 Jun 2012 03:45
Location: Near Seattle

Re: Win+E integration

Post by kunkel321 »

Leito wrote:This is ugly - but you could customize the title bar of XYplorer (Colors and StylesTemplates) to add a unique term to it. Then use:

Code: Select all

IfWinExist, XYplorer {unique-term}
I suppose that Highend's point is still valid though... If anyone posted a forum topic bout this:
Image

EDIT: I should point out that I often use multiple instances of xyplorer--so I just went with the first simple oneliner that was suggested..
ste(phen|ve) kunkel

jorick
Posts: 15
Joined: 03 May 2017 15:06

Re: Win+E integration

Post by jorick »

The following seems to work well for me.

Code: Select all

#e::
   if (WinExist ("ahk_exe XYplorer.exe"))
   {
      WinActivate, ahk_exe XYplorer.exe
   }
   else
   {
      Run, "C:\Program Files (x86)\XYplorer\XYplorer.exe"
   }
Return

hyzhangzhy
Posts: 27
Joined: 05 Jan 2017 02:52

Re: Win+E integration

Post by hyzhangzhy »

I do this in C, and works nice on my pc.

Since it is done in C, no extra framework or Runtime Environment are needed, you don't need to install anything else.
And the exe file size is only 10KB. :D

There are also some cons, since it does not have any gui currently, so it is not very easy to exit it.
You may need to kill its process to exit...
Attachments
XYWINE.zip
(6.11 KiB) Downloaded 137 times

hyzhangzhy
Posts: 27
Joined: 05 Jan 2017 02:52

Re: Win+E integration

Post by hyzhangzhy »

Play something more with Win+E.

Here is the changes. :D

Code: Select all

1. Add long-press Win+E to open another XYplorer window.
2. If there are more than one XYplorer window exist, you can use Win+E to switch between them cycling. 
3. Now the actions are all triggered when Win+E key up not key down. (In order to detect long press.) 
I also complied a static-linked version for those whose VC runtime dlls are missing.

The file md5 value is:

Code: Select all

05aec8d1fae823a0fb06c9429737f231
Attachments
XYWINE.zip
(64.79 KiB) Downloaded 140 times

shpkong
Posts: 6
Joined: 14 Jan 2017 04:20
Location: Myanmar

Re: Win+E integration

Post by shpkong »

hyzhangzhy!

Your program launch dozens of XYplorer instance when long pressing Win+E...
which stuck my OS... :x
Attachments
suck.png
suck.png (114.02 KiB) Viewed 3248 times

Post Reply