It is currently May 18th, 2021, 10:56 pm

Help with reverse engineering a skin

Help with creating, editing & fixing problems with skins
User avatar
StArL0rd84
Posts: 357
Joined: February 8th, 2015, 10:07 pm
Location: EU, Denmark.

Help with reverse engineering a skin

Post by StArL0rd84 »

Hi there, thanks for clicking ;P
For the longest time now i have tried different approaches for detecting which explorer windows are open for use in my folder launcher skin.
What i really need is just the names of the folders that are currently open.
I can then just check and see if they match with one of the names of the folders saved in the launcher.
I can then take the desired action which is just to change the color of the icon for the folder.

Jsmorley suggested a small program he made.
But since my skin needs to update fairly often, it proved to be too recourse hungry.

I think i found a skin made by theAzack9 that does it.
But after some time picking it apart, i still quite cannot figure out how he did it.
https://forum.rainmeter.net/viewtopic.php?f=18&t=22868
Tried to ask on the thread but i got no response there.
foldernames.png
From what i can understand, he is using a lua script to fetch the information from somewhere and then it changes a mouseoveraction with the names of the folders. but i could be totally wrong :/

The plugin that he created for his skin (ProgramOptions.dll) creates a slough of variables which is basically a list of opened programs.
Which explorer is too, but it does not list the "childs/folders"
pluginorino.png
Please help
Download link for the skin is in the link above.
You do not have the required permissions to view the files attached to this post.
([mWorkTime] = 1 ? #Work# : ([mEnergyLoss:%] >= 70% ? #Chillmode# : </>))
User avatar
jsmorley
Developer
Posts: 21694
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Help with reverse engineering a skin

Post by jsmorley »

Sorry, but I just don't have the patience for that plugin / skin. I'm sure TheAzack9 will weigh in at some point.

I will point out however, that in my opinion, there is no way to do what you want.

The problem is that "windows" are identified by the system with a combination of Class name, which for Windows File Manager / Explorer is always "CabinetWClass", and a Title. There is the rub. By default in Explorer, the Title will be the name of the folder that is open. It's not the full path, but just the name of the individual folder. That means that it is incredibly easy to have two folders like:

C:\Folder1\Temp
C:\Folder2\Temp

Be indistinguishable when using routines that are looking for a particular Explorer window. They both with have a Title of "Temp" and a Class name of "CabinetWClass".

I think you might be going down a rabbit hole you don't want to here... First, I don't believe that plugin will do the trick, as it is looking for "processes" and not "windows". Nothing about the explorer.exe process tells you anything about what windows it has open. Explorer is managing it's windows internally with numeric window "handles", and it's not exposing anything that ties that handle to a folder. So you would need a different plugin, probably not rocket science, that examines "windows" by Class and Title, but as noted above, I don't think it can be reliable. TheAzack9 may know of something I'm missing here.
User avatar
StArL0rd84
Posts: 357
Joined: February 8th, 2015, 10:07 pm
Location: EU, Denmark.

Re: Help with reverse engineering a skin

Post by StArL0rd84 »

jsmorley wrote:I think you might be going down a rabbit hole you don't want to here... First, I don't believe that plugin will do the trick, as it is looking for "processes" and not "windows". Nothing about the explorer.exe process tells you anything about what windows it has open. So you would need a different plugin, probably not rocket science, that examines "windows" by Class and Title, but as noted above, I don't think it can be reliable. TheAzack9 may know of something I'm missing here.
Thank you for your input J :great:
I won't get my hopes up, but the evidence points towards that he knows something we do not.
([mWorkTime] = 1 ? #Work# : ([mEnergyLoss:%] >= 70% ? #Chillmode# : </>))
User avatar
SilverAzide
Rainmeter Sage
Posts: 1251
Joined: March 23rd, 2015, 5:26 pm

Re: Help with reverse engineering a skin

Post by SilverAzide »

jsmorley wrote:The problem is that "windows" are identified by the system with a combination of Class name, which for Windows File Manager / Explorer is always "CabinetWClass", and a Title. There is the rub. By default in Explorer, the Title will be the name of the folder that is open. It's not the full path, but just the name of the individual folder. That means that it is incredibly easy to have two folders like:

C:\Folder1\Temp
C:\Folder2\Temp

Be indistinguishable when using routines that are looking for a particular Explorer window. They both with have a Title of "Temp" and a Class name of "CabinetWClass".
StArL0rd84,
There is a work-around that you can use to allow seeing the whole path. Open Windows Explorer and in the View tab, select Options (this assumes Windows 10). On the Folder Options dialog, select the View tab, then check the "Display the full path in the title bar" option. This is NOT the default setting, as Mr. Morley implies, so this work-around will only work for you and those that have this option set. Perhaps TheAzack9's code relies on this trick.
Gadgets Wiki GitHub More Gadgets...
User avatar
theAzack9
Developer
Posts: 522
Joined: March 2nd, 2016, 6:23 pm

Re: Help with reverse engineering a skin

Post by theAzack9 »

Sorry... i didn't see that you posted wherever i posted that... :oops: (Also, i have been quite busy lately, so i might have seen it and forgotten it... sorry...)

I will warn you though, while you might be able to use it for getting the path of the open explorer windows, do i not recommend using the plugin i made for it.(ProgramOptions) It is buggy and might some times crash (also, i can't even remember how it works...). Sorry for the inconvenience... (However, you would be able to get the path of the explorer windows since the path is also the window title, as long as you know which ones are open ofc) Sorry that i can't be of more help though.

I will say though, i am working on something much more powerful than that plugin, but it will take a while before that is finished. I wouldn't really count on it being finished in the nearest future, sorry. It will be cool though, i hope :)
User avatar
jsmorley
Developer
Posts: 21694
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Help with reverse engineering a skin

Post by jsmorley »

theAzack9 wrote:Sorry... i didn't see that you posted wherever i posted that... :oops: (Also, i have been quite busy lately, so i might have seen it and forgotten it... sorry...)

I will warn you though, while you might be able to use it for getting the path of the open explorer windows, do i not recommend using the plugin i made for it.(ProgramOptions) It is buggy and might some times crash (also, i can't even remember how it works...). Sorry for the inconvenience... (However, you would be able to get the path of the explorer windows since the path is also the window title, as long as you know which ones are open ofc) Sorry that i can't be of more help though.

I will say though, i am working on something much more powerful than that plugin, but it will take a while before that is finished. I wouldn't really count on it being finished in the nearest future, sorry. It will be cool though, i hope :)
To be clear, the full path is NOT in the window Title by default in Windows...
1.jpg
You do not have the required permissions to view the files attached to this post.
User avatar
theAzack9
Developer
Posts: 522
Joined: March 2nd, 2016, 6:23 pm

Re: Help with reverse engineering a skin

Post by theAzack9 »

jsmorley wrote:To be clear, the full path is NOT in the window Title by default in Windows...

1.jpg
:oops: you might be right, i can't remember anymore, sorry >.>
User avatar
jsmorley
Developer
Posts: 21694
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Help with reverse engineering a skin

Post by jsmorley »

theAzack9 wrote::oops: you might be right, i can't remember anymore, sorry >.>
Might???? Oh, it's on...
User avatar
SilverAzide
Rainmeter Sage
Posts: 1251
Joined: March 23rd, 2015, 5:26 pm

Re: Help with reverse engineering a skin

Post by SilverAzide »

jsmorley wrote:Might???? Oh, it's on...
:rofl: LOL, don't worry jsmorley, it's not "might be",...it's "are". Here's the OP's one and only option, AFAIK:
Image1.jpg
You do not have the required permissions to view the files attached to this post.
Gadgets Wiki GitHub More Gadgets...
User avatar
StArL0rd84
Posts: 357
Joined: February 8th, 2015, 10:07 pm
Location: EU, Denmark.

Re: Help with reverse engineering a skin

Post by StArL0rd84 »

I'm sorry but i don't see how 'Display the full path in the title bar' helps my situation.
I just need the title, which the skin achieves somehow.
I'm fishing for how i might get that title info it into my skin.
looking forward to see what you come up with, with the new plugin Azack :thumbup:
([mWorkTime] = 1 ? #Work# : ([mEnergyLoss:%] >= 70% ? #Chillmode# : </>))