Is ExploreWClass is not used in Win7 and newer?

Get help with using AutoHotkey and its commands and hotkeys
john_c
Posts: 148
Joined: 05 May 2017, 13:19

Is ExploreWClass is not used in Win7 and newer?

21 Jul 2018, 03:51

Sometimes I see ExploreWClass in someone's else scripts. Something like this:

Code: [Select all] [Download] GeSHi © Codebox Plus

F1::
If (WinActive("ahk_class CabinetWClass") || WinActive("ahk_class ExploreWClass"))
; Do something
Return


However, as I tested on my Windows 7 PC, I can't see any occurences of it.

Here are excerpts from the old thread from 2009:

sinkfaze
It has to do with Microsoft's distinction between a directory being explored (ExploreWClass) and being opened (CabinetWClass). I practically tore my hair out for about a month while I was trying to figure out why I couldn't use my hotkeys consistently to sort my music files in a certain directory because the class of the window would change between those two even though the title stayed the same.

Here's an example (albeit shaky). If you create a new My Computer window using Win+E, that is really a command to explore My Computer, thus the window will be ExploreWClass. However if you were to use the AHK command to create a new My Computer window:

Code: [Select all] [Download] GeSHi © Codebox Plus

Run ::{20d04fe0-3aea-1069-a2d8-08002b30309d}


That is a command to open My Computer, so the window will instead be CabinetWClass.

Now if you want things to get really funky, use Win+E to "explore" My Computer, check the class: ExploreWClass. Then right-click a drive/folder and select Open. Check the class again: CabinetWClass! Right-click a folder inside of there and select Explore, it becomes ExploreWClass again!

kli6891
I just pressed win+e, but window spy still shows CabinetWClass. Perhaps MS changed something in Windows 7?

sinkfaze
Could be, I did fail to mention that I was using Windows XP.


So, it seems ExplorerWClass could be removed from newer scripts?

Return to “Ask For Help”

Who is online

Users browsing this forum: Hellbent, ZeroX4 and 65 guests