Give this little plugin a try....StArL0rd84 wrote: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
This will search for open Windows File Explorer windows by window "Title". It's only for Explorer windows, not other applications.
You use the plugin as a [&SectionVariable] with the syntax:
[&PluginMeasureName:FindIt([NameOfFolder])]
Quotes around the string are optional. DynamicVariables=1 IS required.
The plugin will return 1 (the Explorer window was found) or -1 (the Explorer window was not found)
Code: Select all
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
[Metadata]
Name=ExplorerWindow
Author=JSMorley
Information=Description:|Demonstrates the ExplorerWindow plugin
Version=Feb 17, 2018
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0
[Variables]
Folder1=Test Folder
Folder2=Another Test Folder
[MeasureTitle]
Measure=Plugin
Plugin=ExplorerWindow
Disabled=1
[MeasureCheckFolders]
Measure=Calc
IfCondition=[&MeasureTitle:FindIt([#Folder1])] = 1
IfTrueAction=[!SetOption MeterOpenFolder1 FontColor "0,237,27,255"][!UpdateMeter MeterOpenFolder1][!Redraw]
IfFalseAction=[!SetOption MeterOpenFolder1 FontColor "180,180,180,255"][!UpdateMeter MeterOpenFolder1][!Redraw]
IfCondition2=[&MeasureTitle:FindIt([#Folder2])] = 1
IfTrueAction2=[!SetOption MeterOpenFolder2 FontColor "0,237,27,255"][!UpdateMeter MeterOpenFolder2][!Redraw]
IfFalseAction2=[!SetOption MeterOpenFolder2 FontColor "180,180,180,255"][!UpdateMeter MeterOpenFolder2][!Redraw]
DynamicVariables=1
[MeterOpenFolder1]
Meter=String
FontSize=14
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=Open #Folder1#
LeftMouseUpAction=["#@##Folder1#"]
[MeterOpenFolder2]
Meter=String
Y=5R
FontSize=14
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=Open #Folder2#
LeftMouseUpAction=["#@##Folder2#"]
Code: Select all
#include <Windows.h>
#include "../../API/RainmeterAPI.h"
#include <string>
struct Measure
{
Measure() {}
};
PLUGIN_EXPORT void Initialize(void** data, void* rm)
{
Measure* measure = new Measure;
*data = measure;
}
PLUGIN_EXPORT void Reload(void* data, void* rm, double* maxValue)
{
Measure* measure = (Measure*)data;
}
PLUGIN_EXPORT double Update(void* data)
{
Measure* measure = (Measure*)data;
return 0, 0;
}
//PLUGIN_EXPORT LPCWSTR GetString(void* data)
//{
// Measure* measure = (Measure*)data;
// return L"";
//}
PLUGIN_EXPORT LPCWSTR FindIt(void* data, const int argc, const LPCWSTR* argv)
{
Measure* measure = (Measure*)data;
// no args
if (argc == 0) return L"0";
std::wstring str = argv[0];
if (str[0] == L'"')
{
str.erase(0, 1);
}
if (str[str.size() - 1] == L'"')
{
str.erase(str.size() - 1);
}
if (FindWindow(L"CabinetWClass", str.c_str())) {
return L"1";
}
return L"-1";
}
PLUGIN_EXPORT void Finalize(void* data)
{
Measure* measure = (Measure*)data;
delete measure;
}
Do keep in mind that by default the "Title" of an explorer window is the name of the specific folder you are in, not the entire path. That can be changed, in Folder Options.