It is currently April 26th, 2024, 5:37 pm

Utorrent Skin, only showing active torrents

Get help with creating, editing & fixing problems with skins
Drawmly
Posts: 1
Joined: August 9th, 2010, 12:16 am

Utorrent Skin, only showing active torrents

Post by Drawmly »

Hi, I just started today with using Rainmeter and loving it so far. One of the first skins I found was one for tracking Utorrent downloads so I started modifying it to get it how I wanted it.

Here's the problem: It shows 5 bars, 1 for each torrent. If Utorrent is closed it still shows 5 bars. I managed to found a mod to it online that made only active torrents appear in the list, but if I only have 3 active torrents the 2 lower bars are still shown and empty.

I want it to show as many bars as I have active torrents, and I want the skin to be completely hidden when Utorrent isn't open. I guess that can be done by adding Hidden=1 to the DLMETER1,2,3,4,5. And then using !Execute [!RainmeterShowMeter DLMETER1] if 1 torrent is active etc. But I need some way to check if Utorrent is open and how many active torrents that are active. Since right now It's only showing active torrents in the skin this should be doable I think? I just don't know how :P

Complete code of the skin and what I've got so far:

Code: Select all

======================
  uTorrent Downloads |
======================

[Rainmeter]
Author=r3ginald
BackgroundMode=2
SolidColor=0,0,0, 0
DynamicWindowSize=2
BackgroundMargins=10,10,10,-8

;Metadata added by RainBrowser
;http://rainmeter.net/cms/Rainmeter101-EditingSkins

[Metadata]
Name=
Config=
Description=
Instructions=
Version=
Tags=
License=
Variant=
Preview=

;End of added Metadata

[Variables]
Updatetorrent=3
REGEX1=(.*201,\"[^\"]+\"[^\]]*.*\](?:,|\])?\n|)
REGEX2=(?siU)201,\"(.*)",\d*?,(\d*?),\d*?,\d*?,(\d*?),(\d*?),(\d*?)
URL=http://user:lol123@127.0.0.1:8080/gui/?list=1


[SOURCE]
	Measure=Plugin
	Plugin=Plugins\WebParser.dll
	UpdateRate=#Updatetorrent#
	Url=#URL#
	RegExp="(?siU)\"torrents\": \[\n(?:\n|\]|)#REGEX1##REGEX1##REGEX1##REGEX1#"
	Debug=1


[ITEM1]
	Measure=Plugin
	Plugin=Plugins\WebParser.dll
	Url=[SOURCE]
	RegExp="#REGEX2#"
	StringIndex=1
	StringIndex2=1
[DL1]
	Measure=Plugin
	Plugin=Plugins\WebParser.dll
	Url=[ITEM1]
	StringIndex=2
	MaxValue=1000
[ITEM2]
	Measure=Plugin
	Plugin=Plugins\WebParser.dll
	Url=[SOURCE]
	RegExp="#REGEX2#"
	StringIndex=2
	StringIndex2=1
[DL2]
	Measure=Plugin
	Plugin=Plugins\WebParser.dll
	Url=[ITEM2]
	StringIndex=2
	MaxValue=1000
[ITEM3]
	Measure=Plugin
	Plugin=Plugins\WebParser.dll
	Url=[SOURCE]
	RegExp="#REGEX2#"
	StringIndex=3
	StringIndex2=1
[DL3]
	Measure=Plugin
	Plugin=Plugins\WebParser.dll
	Url=[ITEM3]
	StringIndex=2
	MaxValue=1000
[ITEM4]
	Measure=Plugin
	Plugin=Plugins\WebParser.dll
	Url=[SOURCE]
	RegExp="#REGEX2#"
	StringIndex=4
	StringIndex2=1
[DL4]
	Measure=Plugin
	Plugin=Plugins\WebParser.dll
	Url=[ITEM4]
	StringIndex=2
	MaxValue=1000
[ITEM5]
	Measure=Plugin
	Plugin=Plugins\WebParser.dll
	Url=[SOURCE]
	RegExp="#REGEX2#"
	StringIndex=5
	StringIndex2=1
[DL5]
	Measure=Plugin
	Plugin=Plugins\WebParser.dll
	Url=[ITEM5]
	StringIndex=2
	MaxValue=1000

[(title1)]
	MeasureName=ITEM1
	Meter=String
	X=90
	Y=10
	W=150
	H=16
	FontColor=0, 0, 0
	FontFace=Tahoma
	FontSize=8
	Antialias=1
	ClipString=1
	
[(title2)]
	MeasureName=ITEM2
	Meter=String
	X=0r
	Y=25r
	W=150
	H=16
	FontColor=0, 0, 0
	FontFace=Tahoma
	FontSize=8
	Antialias=1
	ClipString=1
	
[(title3)]
	MeasureName=ITEM3
	Meter=String
	X=0r
	Y=25r
	W=150
	H=16
	FontColor=0, 0, 0
	FontSize=8
	FontFace=Tahoma
	Antialias=1
	ClipString=1
	
[(title4)]
	MeasureName=ITEM4
	Meter=String
	X=0r
	Y=25r
	W=150
	H=16
	FontColor=0, 0, 0
	FontFace=Tahoma
	FontSize=8
	Antialias=1
	ClipString=1
	
[(title5)]
	MeasureName=ITEM5
	Meter=String
	X=0r
	Y=25r
	W=150
	H=16
	FontColor=0, 0, 0
	FontFace=Tahoma
	FontSize=8
	Antialias=1
	ClipString=1
	
[(download1)]
	MeasureName=DL1
	Meter=Bar
	X=90
	Y=28
	W=145
	H=3
	BarColor=0, 0, 0
	BarOrientation=HORIZONTAL
	
[(download2)]
	MeasureName=DL2
	Meter=Bar
	X=0r
	Y=25r
	W=145
	H=3
	BarColor=0, 0, 0
	BarOrientation=HORIZONTAL
	
[(download3)]
	MeasureName=DL3
	Meter=Bar
	X=0r
	Y=25r
	W=145
	H=3
	BarColor=0, 0, 0
	BarOrientation=HORIZONTAL
	
[(download4)]
	MeasureName=DL4
	Meter=Bar
	X=0r
	Y=25r
	W=145
	H=3
	BarColor=0, 0, 0
	BarOrientation=HORIZONTAL
	
[(download5)]
	MeasureName=DL5
	Meter=Bar
	X=0r
	Y=25r
	W=145
	H=3
	BarColor=0, 0, 0
	BarOrientation=HORIZONTAL



[DLMETER1]
Meter=IMAGE
SolidColor=0, 0, 0, 160
x=90
y=29
W=145
H=1


[DLMETER2]
Meter=IMAGE
SolidColor=0, 0, 0, 160
x=90
y=54
W=145
H=1


[DLMETER3]
Meter=IMAGE
SolidColor=0, 0, 0, 160
x=90
y=79
W=145
H=1


[DLMETER4]
Meter=IMAGE
SolidColor=0, 0, 0, 160
x=90
y=104
W=145
H=1


[DLMETER5]
Meter=IMAGE
SolidColor=0, 0, 0, 160
x=90
y=129
W=145
H=1



;---------------------


[torrentdl]
Meter=IMAGE
ImageName=utorrent2.png
X=10
Y=24
W=60
H=60
AntiAlias=1
Aarowaim
Posts: 97
Joined: July 25th, 2010, 7:23 am

Re: Utorrent Skin, only showing active torrents

Post by Aarowaim »

I remember that there was a thread that was asking how to check if a program is open. Here it is, look at the first post Then you would make a meter that hides the extra meters if the utorrent process isn't running and shows them if it is running. use task manager to find out the process name (under the process tab).
Away for a while :(
Programming isn't a hobby, it's a lifestyle choice.
[url=http://www.rainmeter.net/forum/viewtopic.php?f=83&t=1207][b]T34M V.1.5.0.|2[/b][/url] <----I'ts l33t, look it up

Coding Skills: [color=#00FFFF]4.5[/color]
Answering Skills: [color=#00FFFF]4[/color]
Image Editing: [color=#00FFFF]3[/color]
Knowledge: [color=#00FFFF]4.5[/color]
Technical Skills: [color=#00FFFF]3[/color]