[ Direct Link ]
It is currently June 10th, 2023, 6:28 pm
ActiveDock
-
- Developer
- Posts: 22571
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
-
- Posts: 104
- Joined: September 18th, 2011, 6:37 am
- Location: Nanjing, China
Re: ActiveDock
figure out a way to use lua to get exe's name
in skin:
in Lua:
in skin:
Code: Select all
[Variables]
Path="C:\Program Files (x86)\Internet Explorer\iexplore.exe"
Exe=
[ms]
Measure=Script
ScriptFile="#CURRENTPATH#Process.lua"
[mp]
Measure=Plugin
Plugin=Plugins\Process.dll
ProcessName=#Exe#.exe
Code: Select all
function Update()
sPath=tostring(SKIN:GetVariable("Path"))
sExe=tostring(SKIN:GetVariable("Exe"))
sEP=string.match(sPath,"(.*)\.exe")
if type(sEP)=="nil" then
sEN=""
else
sEN=string.gsub(sEP,".*%\\","")
end
if sExe~=sEN then
SKIN:Bang("!WriteKeyValue Variables Exe \""..sEN.."\"")
SKIN:Bang("!Refresh")
end
end
-
- Developer
- Posts: 22571
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
-
- Posts: 397
- Joined: June 22nd, 2010, 4:11 am
Re: ActiveDock
If you want a real example (though crudely done) of what XANXI said, my Total Control! suite has a dock that does this x12.
I have three rules when I'm trying to help you.
- Don't get mad when you don't understand something
- Be VERY specific with what you ask for.
The more specific you are, the higher the quality of support you receive. - Do not just copy and paste what I put in examples and come back saying it doesn't work.
It does work, but I purposely left blanks that you need to fill for your specific needs.
-
- Posts: 104
- Joined: September 18th, 2011, 6:37 am
- Location: Nanjing, China
Re: ActiveDock
made a little modification incase some programs use a launcher exe, which different from the actual process
use "ExeOverride=" to set actual process, leave blank if you don't need to override
in skin:
in Lua:
use "ExeOverride=" to set actual process, leave blank if you don't need to override
in skin:
Code: Select all
[Variables]
Path="C:\Program Files (x86)\Internet Explorer\iexplore.exe"
Exe=
ExeOverride=
[ms]
Measure=Script
ScriptFile="#CURRENTPATH#Process.lua"
[mp]
Measure=Plugin
Plugin=Plugins\Process.dll
ProcessName=#Exe#.exe
Code: Select all
function Update()
sPath=tostring(SKIN:GetVariable("Path"))
sExe=tostring(SKIN:GetVariable("Exe"))
sEO=tostring(SKIN:GetVariable("ExeOverride"))
if sEO=="" then
sEP=string.match(sPath,"(.*)\.exe")
if type(sEP)=="nil" then
sEN=""
else
sEN=string.gsub(sEP,".*%\\","")
end
else
sEN=sEO
end
if sExe~=sEN then
SKIN:Bang("!WriteKeyValue Variables Exe \""..sEN.."\"")
SKIN:Bang("!Refresh")
end
end
-
- Developer
- Posts: 22571
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: ActiveDock
Link in first post changed to a new version that works with the new Release Candidate version of Rainmeter 2.2.