Balala,
The whole widget is not working anymore with these changes
The INI skin (truncated because of 21.000 lines) :
Code: Select all
[Rainmeter]
; *****************************************************************************
; RAINMETER
; *****************************************************************************
MiddleMouseUpAction=[!Refresh]
@include1=#@#Rainmeter.inc
[Metadata]
; *****************************************************************************
; METADATA
; *****************************************************************************
@include2=#@#Metadata.inc
[Variables]
LargeurModuleExterieur = 748
LargeurModuleInterieur = 737
LargeurSeparateurHorizontal = 725
HauteurModuleExterieur = 300
HauteurModuleInterieur = 279
RefreshModule = 120
; JSMORLEY
; TORRENT INFOS
UserName=piregwan
Password=XXXXX
uTorrentPort=8080
ProcessName="utorrent"
PathToUTorrent="C:\Program Files (x86)\uTorrent\uTorrent.exe"
; COULEURS POUVANT ETRE CHANGEES
ListFontColor=255,255,255,255
HeaderColor=239,219,137,255
UTorrentColor=239,219,137
PanelColor=0,0,0,180
ProgressBarColor=#Blanc#
SeparatorLineColor=150,150,150,255
GreyColor=210,210,210,255
; DO NOT CHANGE THIS
uTorrentURL=http://#UserName#:#Password#@127.0.0.1:#uTorrentPort#/gui/?list=1
Item=(?(?=.*\[\").*\[\"(.*)\",(.*),\"(.*)\",(.*),(.*),(.*),(.*),(.*),(.*),(.*),(.*),\"(.*)\",(.*),(.*),(.*),(.*),(.*),(.*),(.*)\])
BackgroundHeight=230
; *****************************************************************************
; INCLUDES
; *****************************************************************************
@include3=#@#CSS-General.inc
@include4=#@#CSS-Modules-Widgets.inc
BG_Interieur_DecalageY = 11
@include5=#@#Debug.inc
; *****************************************************************************
; STYLES PROPRES AU MODULE
; *****************************************************************************
[Style-Barre-Progression]
X=r
Y=#HauteurDeLigne_TexteNormal#r
H=3
W=77
BarColor=255,255,255,255
BarOrientation=HORIZONTAL
SolidColor=255,255,255,75
SolidColor2=255,255,255,10
; *****************************************************************************
; MEASURES
; *****************************************************************************
; JSMORLEY
;[CHECK UTORRENT PROCESS]===========================================
[MeasureProcessPID]
Measure=Plugin
Plugin=Perfmon.dll
PerfMonObject="Process"
PerfMonCounter="ID Process"
PerfMonInstance=#ProcessName#
PerfMonDifference=0
UpdateDivider=#Refresh_Torrent#
[CalcTranslatePIDToRunningState]
Measure=Calc
Formula=MeasureProcessPID > 0 ? 1 : 0
IfAboveValue=0
IfAboveAction=!Execute [!EnableMeasure MeasureWebUI][!SetOption MeterUTorrent ImageTint 224,56,59,255][!SetOption MeterUTorrent ToolTipText "Close uTorrent application"][!SetOption MeterUTorrent LeftMouseUpAction """!Execute ["#CURRENTPATH#KillUTorrent.exe"]["#ADDONSPATH#PlayTone\PlayTone.exe" "500" "200"]"""]
IfEqualValue=0
IfEqualAction=!Execute [!DisableMeasure MeasureWebUI][!SetOption MeterUTorrent ImageTint #HeaderColor#][!SetOption MeterUTorrent ToolTipText "Run uTorrent application"][!SetOption MeterUTorrent LeftMouseUpAction """!Execute ["#PathToUTorrent#"]["#ADDONSPATH#PlayTone\PlayTone.exe" "500" "200"]"""]
;[GET UTORRENT INFO FROM WEB UI]=====================================
[MeasureWebUI]
Group=AllMeasures
Measure=Plugin
Plugin=Plugins\WebParser.dll
URL=#uTorrentURL#
RegExp="(?siU)^(.*)$"
ForceReload=1
UpdateRate=#Refresh_Torrent#
Disabled=1
FinishAction=!Execute [!EnableMeasure MeasureLua]
;[LUA MEASURE]========================================================
[MeasureLua]
Measure=SCRIPT
ScriptFile=#@#Scripts_Lua\Torrent-Uploads.lua
UpdateDivider=#Refresh_Torrent#
Disabled=1
[MeasureTailleTotale]
Measure=Calc
; *****************************************************************************
; METERS
; *****************************************************************************
[Titre1-Module]
Meter=String
MeterStyle=Style-Titre
Text="Uploads Torrent (Seed) Volume Vitesse Ratio"
Y=15
[Titre1_Module_Totale]
Meter=String
MeterStyle=Style-Titre
Y=r
X=514
[Spacer]
Meter=String
MeterStyle=Style-Titre
Y=12r
; JSMORLEY
[Meter1Icone]
Meter=Image
x=#PaddingModuleInterieur#
; Y=150
ImageName=#@#Images\Ping\Dot.png
[Meter1Name]
Group=Torrent1
Meter=String
MeterStyle=Style-Contenu
W=285
H=15
ClipString=1
X=18r
Y=1r
[Meter1Size]
Group=Torrent1
Meter=String
MeterStyle=Style-Contenu
X=428
Y=r
StringAlign=RIGHT
[Meter1DLSpeed]
Group=Torrent1
Meter=String
MeterStyle=Style-Contenu
X=513
Y=r
StringAlign=RIGHT
; [Meter1Seeds]
; Group=Torrent1
; Meter=String
; MeterStyle=Style-Contenu
; X=310
; Y=r
; [Meter1Status]
; Group=Torrent1
; Meter=String
; MeterStyle=Style-Contenu
; X=316
; Y=r
; [Meter1Line]
; Group=Torrent1
; Meter=Image
; SolidColor=#SeparatorLineColor#
; W=70
; H=1
; X=537
; Y=5r
; Hidden=1
[Measure1BarCalc]
Group=Torrent1
Measure=Calc
Formula=#Bar1Calc#
MinValue=0
MaxValue=100
DynamicVariables=1
[Meter1Bar]
MeterStyle=Style-Barre-Progression
Group=Torrent1
Meter=Bar
MeasureName=Measure1BarCalc
BarColor=#ProgressBarColor#
BarOrientation=Horizontal
W=70
H=3
X=537
Y=5r
[Meter1%]
Group=Torrent1
Meter=String
MeterStyle=Style-Contenu
; FontSize=7
StringAlign=RIGHT
X=739
Y=-5r
;=============================================
[Meter2Icone]
Meter=Image
x=#PaddingModuleInterieur#
Y=#HauteurDeLigne_TexteNormal#r
ImageName=#@#Images\Ping\Dot.png
[Meter2Name]
Group=Torrent2
Meter=String
MeterStyle=Style-Contenu
W=285
H=15
ClipString=1
x=18r
Y=1r
[Meter2Size]
Group=Torrent2
Meter=String
MeterStyle=Style-Contenu
X=428
Y=0r
StringAlign=RIGHT
[Meter2DLSpeed]
Group=Torrent2
Meter=String
MeterStyle=Style-Contenu
X=513
Y=0r
StringAlign=RIGHT
; [Meter2Seeds]
; Group=Torrent2
; Meter=String
; MeterStyle=Style-Contenu
; X=310
; Y=0r
; [Meter2Status]
; Group=Torrent2
; Meter=String
; MeterStyle=Style-Contenu
; X=316
; Y=0r
; [Meter2Line]
; Group=Torrent2
; Meter=Image
; SolidColor=#SeparatorLineColor#
; W=70
; H=1
; X=537
; Y=5r
; Hidden=1
[Measure2BarCalc]
Group=Torrent2
Measure=Calc
Formula=#Bar2Calc#
MinValue=0
MaxValue=100
DynamicVariables=1
[Meter2Bar]
MeterStyle=Style-Barre-Progression
Group=Torrent2
Meter=Bar
MeasureName=Measure2BarCalc
BarColor=#ProgressBarColor#
BarOrientation=Horizontal
W=70
H=3
X=537
Y=5r
[Meter2%]
Group=Torrent2
Meter=String
MeterStyle=Style-Contenu
; FontSize=7
StringAlign=RIGHT
X=739
Y=-5r
;=============================================
[...........................................]
; *****************************************************************************
; HISTOGRAMME UPLOAD
; *****************************************************************************
[Fond-Grillage-UPLOAD]
Meter=IMAGE
ImageName=#@#Images\Graphiques\Fond_0_piece_10min.png
X=19
Y=195
H=42
W=659
; UPLOAD TORRENT
[Histogramme-UPLOAD-1]
Meter=Line
MeasureName=MeasureTailleTotale
-- MeasureName=XXXXXXXXX
LineColor=#Vert#
X=r
Y=r
W=#LargeurHistogramme2#
H=#HauteurHistogramme#
AntiAlias=#AntiAliasHistogramme#
; *****************************************************************************
; VALEUR UPLOAD
; *****************************************************************************
[MeterUPLOADText]
Meter=String
X=719r
Y=12r
MeterStyle=Style-Contenu
NumOfDecimals=2
; FontColor=#Vert#
AutoScale=1
StringAlign=Right
; [Image-RATIO-1]
; Meter=IMAGE
; ImageName=#@#Images\Ratio\fleche_haut_3_1.png
; X=-341r
; Y=-40r
; ImageAlpha=22
; [Image-RATIO-2]
; Meter=IMAGE
; ImageName=#@#Images\Ratio\fleche_bas_3_1.png
; X=r
; Y=21r
; ImageAlpha=22
The LUA file :
Code: Select all
function Initialize()
dofile(SKIN:GetVariable('@')..'Scripts_Lua\\Torrent-General.lua')
tItem = {}
tHASH = {}
tSTATUS = {}
tNAME = {}
tSIZE = {}
tPERCENTPROGRESS = {}
tDOWNLOADED = {}
tUPLOADED = {}
tRATIO = {}
tUPLOADSPEED = {}
tDOWNLOADSPEED = {}
tETA = {}
tLABEL = {}
tPEERSCONNECTED = {}
tPEERSINSWARM = {}
tSEEDSCONNECTED = {}
tSEEDSINSWARM = {}
tAVAILABILITY = {}
tTORRENTQUEUEORDER = {}
tREMAINING = {}
tField21 = {}
tField22 = {}
tTEXTSTATUS = {}
tField24 = {}
tField25 = {}
tField26 = {}
tField27 = {}
tSAVEFOLDER = {}
sNormalColor = SKIN:GetVariable("ListFontColor")
sGreyColor = SKIN:GetVariable("GreyColor")
RunningState = SKIN:GetMeasure("CalcTranslatePIDToRunningState")
msMain = SKIN:GetMeasure("MeasureWebUI")
CurrDir = SKIN:GetVariable("CURRENTPATH")
end -- function Initialize
function Update()
IsRunning = RunningState:GetValue()
if IsRunning == 1 then --uTorrent running
Pos = 0
Cpt = 1
TailleTotale = 0
sAllText = msMain:GetStringValue()
sAllText = string.match(sAllText, ".-\034torrents\034%:(.-)$")
sTemp, iItemCount = string.gsub(sAllText, ".-%[\"(.-)\"%]", "")
--
-- ICI 1/3 POUR LES ITERATIONS DE DOWNLOADS
--
iItemCount = (iItemCount < 301) and iItemCount or 300
for i = 1, iItemCount do
tItem[i] = "[\""..string.match(sAllText, ".-%[\"(.-)\"%]", Pos).."\"]"
Pos = Pos + string.len(tItem[i])+1
tHASH[i], tSTATUS[i], tNAME[i], tSIZE[i], tPERCENTPROGRESS[i], tDOWNLOADED[i], tUPLOADED[i], tRATIO[i], tUPLOADSPEED[i], tDOWNLOADSPEED[i], tETA[i], tLABEL[i], tPEERSCONNECTED[i], tPEERSINSWARM[i], tSEEDSCONNECTED[i], tSEEDSINSWARM[i], tAVAILABILITY[i], tTORRENTQUEUEORDER[i], tREMAINING[i], tField21[i], tField22[i], tTEXTSTATUS[i], tField24[i], tField25[i], tField26[i], tField27[i], tSAVEFOLDER[i] = string.match(tItem[i], '%[\"(.-)\",(.-),\"(.-)\",(.-),(.-),(.-),(.-),(.-),(.-),(.-),(.-),\"(.-)\",(.-),(.-),(.-),(.-),(.-),(.-),(.-),\"(.-)\",\"(.-)\",\"(.-)\",\"(.-)\",(.-),(.-),\"(.-)\",\"(.-)\".-%]')
-- RENDRE INVISIBLE
if (i>1) then
SKIN:Bang("!SetOption Meter"..i.."Icone Y \"-1r\"")
else
SKIN:Bang("!SetOption Meter"..i.."Icone Y \"27\"")
end
SKIN:Bang("!HideMeter Meter"..i.."Icone")
SKIN:Bang("!HideMeter Meter"..i.."DLSpeed")
SKIN:Bang("!HideMeter Meter"..i.."Bar")
SKIN:Bang("!HideMeter Meter"..i.."Status")
SKIN:Bang("!HideMeter Meter"..i.."Name")
SKIN:Bang("!HideMeter Meter"..i.."Size")
SKIN:Bang("!HideMeter Meter"..i.."%")
tTEXTSTATUS[i] = string.gsub(tTEXTSTATUS[i], "Connecting to peers", "Connexion")
tTEXTSTATUS[i] = string.gsub(tTEXTSTATUS[i], "Downloading", "Download")
tTEXTSTATUS[i] = string.gsub(tTEXTSTATUS[i], "Queued", "Pause")
tTEXTSTATUS[i] = string.gsub(tTEXTSTATUS[i], "Finding peers", "Recherche")
tTEXTSTATUS[i] = string.gsub(tTEXTSTATUS[i], "Seeding", "Upload")
tTEXTSTATUS[i] = string.gsub(tTEXTSTATUS[i], "%d", "")
tTEXTSTATUS[i] = string.gsub(tTEXTSTATUS[i], "%%", "")
tTEXTSTATUS[i] = string.gsub(tTEXTSTATUS[i], "%.", "")
tTEXTSTATUS[i] = string.gsub(tTEXTSTATUS[i], " ", "")
if ( ( tTEXTSTATUS[i]=="Upload" ) and ( round(tonumber(tUPLOADSPEED[i]/1024),0) > 0 ) ) then
tSAVEFOLDER[i] = string.gsub(tSAVEFOLDER[i], "\092\092", "\092")
tNAME[i] = NettoyerTitreFilm(tNAME[i])
-- SKIN:Bang("!ShowMeterGroup Torrent"..i)
-- RENDRE VISIBLE
SKIN:Bang("!SetOption Meter"..i.."Icone Y \"#HauteurDeLigne_TexteNormal#r\"")
SKIN:Bang("!ShowMeter Meter"..i.."Icone")
SKIN:Bang("!ShowMeter Meter"..i.."DLSpeed")
SKIN:Bang("!ShowMeter Meter"..i.."Status")
SKIN:Bang("!ShowMeter Meter"..i.."Name")
SKIN:Bang("!ShowMeter Meter"..i.."Size")
SKIN:Bang("!ShowMeter Meter"..i.."%")
SKIN:Bang("!SetOption Meter"..i.."Size Text \" "..format_num(round(tonumber(tDOWNLOADED[i]*tRATIO[i]/(1024*1024*1024*1024)),1),1).." Go / "..format_num(round(tonumber(tSIZE[i]/1073741824),1),1).." Go\"")
-- SKIN:Bang("!SetOption Meter"..i.."\% Text \"* Up *\"")
-- SKIN:Bang("!SetOption Meter"..i.."Size Text \"Upload\"")
SKIN:Bang("!SetOption Meter"..i.."DLSpeed Text \""..round(tonumber(tUPLOADSPEED[i]/1024),0).." Ko/s\"")
-- Cpt = Cpt - 1
-- SKIN:Bang("!SetOption Meter"..i.."Name Text \""..tLABEL[i].." \t "..tNAME[i].."\"")
SKIN:Bang("!SetOption Meter"..i.."Name Text \""..tLABEL[i].." \t "..string.format("%02d",Cpt)..". "..tNAME[i].."\"")
-- SKIN:Bang("!SetOption Meter"..i.."% Text \""..tonumber(tRATIO[i]/1000).." ("..round(tonumber(100*(tRATIO[i]/1000)),0).." %) \"")
SKIN:Bang("!SetOption Meter"..i.."% Text \""..round(tonumber(100*(tRATIO[i]/1000)),1).." %\"")
-- TOOLTIPS
-- SKIN:Bang("!SetOption Meter"..i.."Name ToolTipText \""..tNAME[i].."#CRLF#Dossier : "..tSAVEFOLDER[i].."\092#CRLF#Pairs : "..tPEERSCONNECTED[i].."("..tPEERSINSWARM[i]..")#CRLF#Téléchargé : "..round(tonumber(tDOWNLOADED[i]/1048576),0).." Mo".."#CRLF#Restant : "..round(tonumber(tREMAINING[i]/1048576),0).." Mo#CRLF#Ratio : "..round(tonumber(tRATIO[i]/1000),3).."\"")
SKIN:Bang("!SetOption Meter"..i.."Name FontColor \"#Blanc#\"")
SKIN:Bang("!SetOption Meter"..i.."Size FontColor \"#Blanc#\"")
SKIN:Bang("!SetOption Meter"..i.."DLSpeed FontColor \"#Blanc#\"")
SKIN:Bang("!SetOption Meter"..i.."Status FontColor \"#Blanc#\"")
SKIN:Bang("!SetOption Meter"..i.."Bar BarColor \"#Blanc#\"")
SKIN:Bang("!SetOption Meter"..i.."Icone ImageTint \"#Blanc#\"")
SKIN:Bang("!SetOption Meter"..i.."% FontColor \"#Blanc#\"")
Cpt = Cpt + 1
TailleTotale = TailleTotale + round(tonumber(tUPLOADSPEED[i]/1024),0)
-- COULEURS
if round(tonumber(tUPLOADSPEED[i]/1024),0) >30 then
SKIN:Bang("!SetOption Meter"..i.."Name FontColor \"#Vert#\"")
SKIN:Bang("!SetOption Meter"..i.."Size FontColor \"#Vert#\"")
SKIN:Bang("!SetOption Meter"..i.."DLSpeed FontColor \"#Vert#\"")
SKIN:Bang("!SetOption Meter"..i.."Status FontColor \"#Vert#\"")
SKIN:Bang("!SetOption Meter"..i.."Bar BarColor \"#Vert#\"")
SKIN:Bang("!SetOption Meter"..i.."Icone ImageTint \"#Vert#\"")
SKIN:Bang("!SetOption Meter"..i.."% FontColor \"#Vert#\"")
end
if round(tonumber(tUPLOADSPEED[i]/1024),0) >200 then
SKIN:Bang("!SetOption Meter"..i.."Name FontColor \"#Jaune#\"")
SKIN:Bang("!SetOption Meter"..i.."Size FontColor \"#Jaune#\"")
SKIN:Bang("!SetOption Meter"..i.."DLSpeed FontColor \"#Jaune#\"")
SKIN:Bang("!SetOption Meter"..i.."Status FontColor \"#Jaune#\"")
SKIN:Bang("!SetOption Meter"..i.."Bar BarColor \"#Jaune#\"")
SKIN:Bang("!SetOption Meter"..i.."Icone ImageTint \"#Jaune#\"")
SKIN:Bang("!SetOption Meter"..i.."% FontColor \"#Jaune#\"")
end
if round(tonumber(tUPLOADSPEED[i]/1024),0) >750 then
SKIN:Bang("!SetOption Meter"..i.."Name FontColor \"#Orange#\"")
SKIN:Bang("!SetOption Meter"..i.."Size FontColor \"#Orange#\"")
SKIN:Bang("!SetOption Meter"..i.."DLSpeed FontColor \"#Orange#\"")
SKIN:Bang("!SetOption Meter"..i.."Status FontColor \"#Orange#\"")
SKIN:Bang("!SetOption Meter"..i.."Bar BarColor \"#Orange#\"")
SKIN:Bang("!SetOption Meter"..i.."Icone ImageTint \"#Orange#\"")
SKIN:Bang("!SetOption Meter"..i.."% FontColor \"#Orange#\"")
end
if round(tonumber(tUPLOADSPEED[i]/1024),0) >2000 then
SKIN:Bang("!SetOption Meter"..i.."Name FontColor \"#Rouge#\"")
SKIN:Bang("!SetOption Meter"..i.."Size FontColor \"#Rouge#\"")
SKIN:Bang("!SetOption Meter"..i.."DLSpeed FontColor \"#Rouge#\"")
SKIN:Bang("!SetOption Meter"..i.."Status FontColor \"#Rouge#\"")
SKIN:Bang("!SetOption Meter"..i.."Bar BarColor \"#Rouge#\"")
SKIN:Bang("!SetOption Meter"..i.."Icone ImageTint \"#Rouge#\"")
SKIN:Bang("!SetOption Meter"..i.."% FontColor \"#Rouge#\"")
end
-- SKIN:Bang("!SetOption Meter"..i.."Seeds Text \""..tSEEDSCONNECTED[i].."("..tSEEDSINSWARM[i]..")\"")
-- SKIN:Bang("!SetOption Meter"..i.."Status Text \""..tTEXTSTATUS[i].."\"")
end
end
SKIN:Bang("!EnableMeasureGroup AllMeasures")
-- if iItemCount == 0 then
-- SKIN:Bang("!HideMeterGroup Body")
-- else
-- SKIN:Bang("!ShowMeterGroup Body")
-- end
-- SKIN:Bang("!SetVariable BackgroundHeight "..tostring(iItemCount * 31))
SKIN:Bang("!SetOption MeterUPLOADText Text \""..TailleTotale.." Ko/s\"")
SKIN:Bang('!SetOption', 'MeasureTailleTotale', 'Formula', TailleTotale
-- ICI 2/3 POUR LES ITERATIONS DE DOWNLOADS
if iItemCount < 300 then
for i = iItemCount + 1, 300 do
-- SKIN:Bang("!HideMeterGroup Torrent"..i)
-- RENDRE INVISIBLE
SKIN:Bang("!SetOption Meter"..i.."Icone Y \"-1r\"")
SKIN:Bang("!HideMeter Meter"..i.."Icone")
SKIN:Bang("!HideMeter Meter"..i.."DLSpeed")
SKIN:Bang("!HideMeter Meter"..i.."Bar")
SKIN:Bang("!HideMeter Meter"..i.."Status")
SKIN:Bang("!HideMeter Meter"..i.."Name")
SKIN:Bang("!HideMeter Meter"..i.."Size")
SKIN:Bang("!HideMeter Meter"..i.."%")
end
end
else -- uTorrent not running
SKIN:Bang("!DisableMeasureGroup AllMeasures")
-- SKIN:Bang("!HideMeterGroup Body")
--
-- ICI 3/3 POUR LES ITERATIONS DE DOWNLOADS
--
for i = 1, 300 do
-- SKIN:Bang("!HideMeterGroup Torrent"..i)
-- RENDRE INVISIBLE
SKIN:Bang("!SetOption Meter"..i.."Icone Y \"-1r\"")
SKIN:Bang("!HideMeter Meter"..i.."Icone")
SKIN:Bang("!HideMeter Meter"..i.."DLSpeed")
SKIN:Bang("!HideMeter Meter"..i.."Bar")
SKIN:Bang("!HideMeter Meter"..i.."Status")
SKIN:Bang("!HideMeter Meter"..i.."Name")
SKIN:Bang("!HideMeter Meter"..i.."Size")
SKIN:Bang("!HideMeter Meter"..i.."%")
end
end -- Test for uTorrent running
return IsRunning
end -- function Update
Your were true. Looks like there is a problem with this syntax (if commented, works well without error but without line) :
Code: Select all
SKIN:Bang('!SetOption', 'MeasureTailleTotale', 'Formula', TailleTotale
In my case, working syntax is :
Code: Select all
SKIN:Bang("!SetOption MeterUPLOADText Text \""..TailleTotale.." Ko/s\"")
How can I make your syntax compatible ?