It is currently May 7th, 2024, 10:43 am

Local IP address in Desk Cloud - I can't get it.

Get help with creating, editing & fixing problems with skins
Epidermis
Posts: 5
Joined: November 21st, 2011, 2:55 am

Local IP address in Desk Cloud - I can't get it.

Post by Epidermis »

I am using Desk Cloud 2.1 by UltimateRT. It is written to use WebParser.dll. The WebParser.dll is unable to return any information because I am behind a proxy, and that info would be of limited value anyway. (All the PCs on this network will have the same IP from the Internet's perspective.) I have attempted to alter it to use sysinfo.dll, but I'm doing it wrong.

Here is the original code. The bit that displays the network info is toward the end.

Code: Select all

[Rainmeter]
Update=1000

[Metadata]
Name=
Information=
License=
Version=

[bg]
meter=image
W=410
H=210

[Panel]
meter=image
solidcolor=255,255,255,20
Y=5
X=5
W=400
H=200

[LineUpper]
meter=image
solidcolor=255,255,255,100
Y=5
X=5
W=400
H=1

[LineLeft]
meter=image
solidcolor=255,255,255,100
Y=6
X=5
W=1
H=198

[LineBotom]
meter=image
solidcolor=255,255,255,100
Y=204
X=5
W=400
H=1

[LineRight]
meter=image
solidcolor=255,255,255,100
Y=6
X=404
W=1
H=198

----------------------------------------------------------------------------

VARIABLES--------------------

[variables]
Player=WMP
MusicDir=

----------------------------------------------------------------------------

SYSTEM-------------------------


[Uptime]
Measure=Uptime
Format="%4!02i! days, %3!02i! hours and %2!02i! minutes"
Substitute="00 days,":"","01 days":"1 day","02 days":"2 days","03 days":"3 days","04 

days":"4 days","05 days":"5 days","06 days":"6 days","07 days":"7 days","08 days":"8 

days","09 days":"9 days","00 hours and":"","01 hours":"1 hour","02 hours":"2 hours","03 

hours":"3 hours","04 hours":"4 hours","05 hours":"5 hours","06 hours":"6 hours","07 

hours":"7 hours","08 hours":"8 hours","09 hours":"9 hours","and 00 minutes":"","01 

minutes":"1 minute","02 minutes":"2 minutes","03 minutes":"3 minutes","04 minutes":"4 

minutes","05 minutes":"5 minutes","06 minutes":"6 minutes","07 minutes":"7 minutes","08 

minutes":"8 minutes","09 minutes":"9 minutes"
UpdateDivider=60

[TopProcess]
Measure=Plugin
Plugin=Plugins\AdvancedCPU.dll
TopProcess=2
CPUExclude=Idle

[measureCPU]
Measure=CPU
Processor=0

[MeasureCPUMhz]
Measure=Plugin
Plugin=Plugins\PowerPlugin.dll
PowerState=MHZ

[measureRAM]
Measure=PhysicalMemory
UpdateDivider=20

[measureSWAP]
Measure=SWAPMemory
UpdateDivider=20

-------------------------

[CPUMHz]
Meter=STRING
MeasureName=MeasureCPUMHz
X=290
Y=30
FontColor=255,255,255,25
FontSize=30
StringAlign=center
StringStyle=normal
FontFace=Segoe UI
AntiAlias=1
Text=%1 MHz

[Subtitle]
Meter=STRING
MeasureName=Uptime
MeasureName2=TopProcess
FontFace=Segoe UI
FontSize=9
FontColor=255,255,255,150
StringAlign=left
Y=10
X=10
Text="Uptime %1 | Top process: %2"
Antialias=1

[CPUGraphLine]
Meter=Line
MeasureName=MeasureCPU
X=176
Y=30
H=52
W=220
LineCount=1
LineColor=255,255,255,40
AntiAlias=0

[CPUGraphFill]
Meter=HISTOGRAM
MeasureName=MeasureCPU
X=r
Y=r
H=52
W=220
PrimaryColor=255,255,255,20
AntiAlias=0

---------

[CPUtext]
Meter=STRING
FontFace=Segoe UI
FontSize=9
FontColor=255,255,255,150
StringAlign=left
X=10
Y=30
Text="CPU Usage"
Antialias=1

[CPU]
Meter=STRING
MeasureName=measureCPU
FontFace=Segoe UI
FontSize=9
FontColor=255,255,255,150
StringAlign=right
X=150r
Y=r
Text="%1%"
Antialias=1

[MeterCPU]
MeasureName=measureCPU
Meter=BAR
BarOrientation=HORIZONTAL
SolidColor=255,255,255,50
BarColor=255,255,255,150
W=163
H=1
X=-150r
Y=17r

[RAMtext]
Meter=STRING
FontFace=Segoe UI
FontSize=9
FontColor=255,255,255,150
StringAlign=left
X=r
Y=r
Text="RAM Usage"
Antialias=1

[RAM]
Meter=STRING
MeasureName=measureRAM
FontFace=Segoe UI
FontSize=9
FontColor=255,255,255,150
StringAlign=right
X=150r
Y=0r
Text="%1%"
Percentual=1
Antialias=1

[MeterRAM]
MeasureName=measureRAM
Meter=BAR
BarOrientation=HORIZONTAL
SolidColor=255,255,255,50
BarColor=255,255,255,150
W=163
H=1
X=-150r
Y=17r

[SWAPtext]
Meter=STRING
FontFace=Segoe UI
FontSize=9
FontColor=255,255,255,150
StringAlign=left
X=r
Y=r
Text="SWAP Usage"
Antialias=1

[SWAP]
Meter=STRING
MeasureName=measureSWAP
FontFace=Segoe UI
FontSize=9
FontColor=255,255,255,150
StringAlign=right
X=150r
Y=0r
Text="%1%"
Percentual=1
Antialias=1

[MeterSWAP]
MeasureName=measureSWAP
Meter=BAR
BarOrientation=HORIZONTAL
SolidColor=255,255,255,50
BarColor=255,255,255,150
W=163
H=1
X=-150r
Y=17r

HDD
-------------------------------------------------------------------------------

[MeasureDiskFree]
Measure=FreeDiskSpace
Drive=C:
IfAboveValue=3
IfAboveAction=!Execute [!RainmeterHideMeter alarm1]
IfBelowValue=3
IfBelowAction=!Execute [!RainmeterShowMeter alarm1]

[MeasureDiskTotal]
Measure=FreeDiskSpace
Drive=C:
Total=1

[MeasureAlways1]
Measure=FreeDiskSpace
Total=1
MaxValue=1
MinValue=0
UpdateDivider=86400

-------------------------------

[MeterDiskFree]
Meter=STRING
MeasureName=MeasureDiskFree
X=10
Y=150
FontFace=Segoe UI
FontSize=9
FontColor=255,255,255,150
StringAlign=left
AntiAlias=1
AutoScale=1
NumofDecimals=2
Text="Free: %1B"

[MeterDiskNum]
Meter=STRING
MeasureName=MeasureDiskUsed
X=r
Y=15r
FontFace=Segoe UI
FontSize=9
FontColor=255,255,255,150
StringAlign=left
AntiAlias=1
AutoScale=1
NumofDecimals=1
Text="Used: %1B"

[MeasureDiskUsed]
Measure=FreeDiskSpace
Drive=C:
InvertMeasure=1

[MeterDiskTotal]
Meter=STRING
MeasureName=MeasureDiskTotal
X=r
Y=15r
FontFace=Segoe UI
FontSize=9
FontColor=255,255,255,150
StringAlign=left
AntiAlias=1
AutoScale=1
NumofDecimals=2
Text="Total: %1B"

[MeasureHDCFree]
Measure=FreeDiskSpace
Drive=C:

[MeterHDCroundUsed]
Meter=ROUNDLINE
MeasureName=MeasureAlways1
X=95
Y=-41r
W=70
H=70
LineWidth=5
StartAngle=4.7123889
RotationAngle=-6.2831853
LineLength=22
LineStart=17
AntiAlias=1
LineColor=255,255,255,100
Solid=1

[MeterHDCAroundFree]
Meter=ROUNDLINE
MeasureName=MeasureHDCFree
X=r
Y=r
W=70
H=70
LineWidth=5
StartAngle=4.7123889
RotationAngle=6.2831853
LineLength=22
LineStart=17
AntiAlias=1
LineColor=255,255,255,150
Solid=1

[Alarm1]
Meter=ROUNDLINE
MeasureName=MeasureAlways1
X=r
Y=r
W=70
H=70
LineWidth=5
StartAngle=4.7123889
RotationAngle=6.2831853
LineLength=17
LineStart=0
AntiAlias=1
LineColor=230,10,10,150
Solid=1

[MeterDiskPercent]
Meter=STRING
MeasureName=MeasureDiskFree
StringStyle=bold
X=35r
Y=30r
FontFace=255,255,255,150
FontSize=9
FontColor=255,255,255,150
StringAlign=center
AntiAlias=1
AutoScale=1
Percentual=1
Postfix=%

-----------------------------------------BATTERY-------------------------

[MseAc]
Measure=Plugin
PlugIn=PlugIns\PowerPlugin.dll
PowerState=ACLINE
IfAboveValue=0
IfAboveAction=!execute [!RainmeterShowMeter MeterAC][!RainmeterShowMeter MeterAC2]

[MeasurePercent]
Measure=Plugin
PlugIn=PlugIns\PowerPlugin.dll
PowerState=PERCENT
IfAboveValue=20
IfAboveAction=!Execute [!RainmeterHideMeter alarm2]
IfBelowValue=20
IfBelowAction=!Execute [!RainmeterShowMeter alarm2]

-----------------------------------------

[MeterBatteryroundUsed]
Meter=ROUNDLINE
MeasureName=MeasureAlways1
X=80
Y=70
W=100
H=100
LineWidth=5
StartAngle=4.7123889
RotationAngle=-6.2831853
LineLength=22
LineStart=17
AntiAlias=1
LineColor=255,255,255,100
Solid=1

[MeterBatteryAroundFree]
Meter=ROUNDLINE
MeasureName=MeasurePercent
X=r
Y=r
W=100
H=100
LineWidth=5
StartAngle=4.7123889
RotationAngle=6.2831853
LineLength=22
LineStart=17
AntiAlias=1
LineColor=255,255,255,150
Solid=1

[Alarm2]
Meter=ROUNDLINE
MeasureName=MeasureAlways1
X=r
Y=r
W=100
H=100
LineWidth=5
StartAngle=4.7123889
RotationAngle=6.2831853
LineLength=17
LineStart=0
AntiAlias=1
LineColor=230,10,10,150
Hidden=1
Solid=1

[MeterPercent]
Meter=STRING
MeasureName=MeasurePercent
X=50r
Y=45r
FontColor=255,255,255,150
FontFace=Century Gothic
FontSize=9
StringAlign=CENTER
StringStyle=Normal
AntiAlias=1
Text="%1%"

[MeterAC]
Meter=STRING
X=r
Y=10r
FontColor=255,255,255,100
FontFace=Century Gothic
FontSize=7
StringAlign=CENTER
StringStyle=normal
AntiAlias=1
Text="AC"
Hidden=1

[Battery]
Meter=STRING
MeasureName=measureSWAP
FontFace=Century Gothic
FontSize=20
FontColor=255,255,255,150
StringAlign=left
X=5
Y=102
Text=Battery
Percentual=1
Antialias=1

-------------------------------------------------------------------------R-

BIN----------------------------

[measureBinItems]
Measure=Plugin
Plugin=RecycleManager.dll
RecycleType=COUNT
IfAboveValue=1
IfAboveAction=!Execute [!RainmeterShowMeter BinFull][!RainmeterShowMeter BinFull2][!

RainmeterHideMeter BinEmpty][!RainmeterHideMeter Bin1]
IfBelowValue=1
IfBelowAction=!Execute [!RainmeterShowMeter BinEmpty][!RainmeterHideMeter BinFull][!

RainmeterHideMeter BinFull2][!RainmeterHideMeter Bin1]
IfEqualValue=1
IfEqualAction=!Execute [!RainmeterHideMeter BinEmpty][!RainmeterHideMeter BinFull][!

RainmeterHideMeter BinFull2][!RainmeterShowMeter Bin1]
UpdateDivider=5

[measureBinSize]
Measure=Plugin
Plugin=RecycleManager.dll
RecycleType=SIZE
UpdateDivider=5

[BinFull]
Meter=STRING
MeasureName=measureBinItems
MeasureName2=measureBinSize
FontFace=Century Gothic
FontSize=9
FontColor=255,255,255,150
StringAlign=left
X=190
Y=100
Text="%1 items in Recycle Bin"
Antialias=1
Hidden=1

[BinFull2]
Meter=STRING
MeasureName=measureBinSize
FontFace=Century Gothic
FontSize=9
FontColor=255,255,255,150
StringAlign=left
X=330
Y=100
Text="(%1)"
Hidden=1
Autoscale=1
Antialias=1

[BinEmpty]
Meter=STRING
FontFace=Century Gothic
FontSize=9
FontColor=255,255,255,150
StringAlign=left
X=190
Y=100
Text="Recycle Bin is empty"
Antialias=1

[Bin1]
Meter=STRING
MeasureName=measureBinSize
FontFace=Century Gothic
FontSize=9
FontColor=255,255,255,150
StringAlign=left
X=190
Y=100
Text="One item in Recycle Bin (%1B)"
AutoScale=1
Hidden=1
Antialias=1

Network
------------------

[measureIP]
Measure=Plugin
Measure=Plugin
Plugin=WebParser.dll
Url=http://checkip.dyndns.org
UpdateRate=14400
RegExp="(?siU)Address: (.*)</body>"
StringIndex=1
Substitute="":"N/A"

[measureNetIn]
Measure=NetIn
NetInSpeed=#maxDownload#

[measureNetOut]
Measure=NetOut
NetOutSpeed=#maxUpload#

----------

[MeterNetTitle]
Meter=STRING
FontFace=Century Gothic
FontSize=9
FontColor=255,255,255,150
StringAlign=left
X=190
Y=130
Text=Network
Antialias=1

[meterIPLabel]
Meter=STRING
FontFace=Century Gothic
FontSize=9
FontColor=255,255,255,150
StringAlign=left
X=r
Y=18r
Text="IP Address"
Antialias=1

[meterIPValue]
Meter=STRING
MeasureName=measureIP
FontFace=Century Gothic
FontSize=9
FontColor=255,255,255,150
StringAlign=right
X=200r
Y=0r
Text="XX.XXX.XXX.XX"
Antialias=1

[meterUploadLabel]
Meter=STRING
FontFace=Century Gothic
FontSize=9
FontColor=255,255,255,150
StringAlign=left
X=-200r
Y=15r
Text="Upload"
Antialias=1

[meterUploadValue]
Meter=STRING
MeasureName=measureNetOut
FontFace=Century Gothic
FontSize=9
FontColor=255,255,255,150
StringAlign=right
X=200r
Y=0r
Text="%1B/s"
NumOfDecimals=1
AutoScale=1
Antialias=1

[MeterUpload]
MeasureName=measureNetOut
Meter=BAR
BarOrientation=HORIZONTAL
SolidColor=255,255,255,50
BarColor=255,255,255,150
W=200
H=1
X=-200r
Y=15r

[meterDownloadLabel]
Meter=STRING
FontFace=Century Gothic
FontSize=9
FontColor=255,255,255,150
StringAlign=left
X=r
Y=2r
Text="Download"
Antialias=1

[meterDownloadValue]
Meter=STRING
MeasureName=measureNetIn
FontFace=Century Gothic
FontSize=9
FontColor=255,255,255,150
StringAlign=right
X=200r
Y=r
Text="%1B/s"
NumOfDecimals=1
AutoScale=1
Antialias=1

[MeterDownload]
MeasureName=measureNetIn
Meter=BAR
BarOrientation=HORIZONTAL
SolidColor=255,255,255,50
BarColor=255,255,255,150
W=200
H=1
X=-200r
Y=15r
The skin can be found here: http://ultimatert.deviantart.com/art/Desk-Cloud-2-1-Jan-15-2012-278322366

There seems to be more going in the relevant bit of code than I comprehend.
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Local IP address in Desk Cloud - I can't get it.

Post by jsmorley »

Should be enough to change that [measureIP] section that is currently using WebParser to get your WAN IP address from checkip.dyndns.org to look like this instead:

[measureIP]
Measure=Plugin
Plugin=Plugins\SysInfo.dll
SysInfoType=IP_ADDRESS

Then it should return the local (LAN) IP address for your computer.
User avatar
UltimateRT
Posts: 9
Joined: October 9th, 2011, 3:55 pm
Location: Riga, Latvia

Re: Local IP address in Desk Cloud - I can't get it.

Post by UltimateRT »

I forgot to change that after I took a screenshot of the suite. To fix it just find [meterIPValue] and replace Text="XX.XXX.XXX.XX" to Text="%1"
Epidermis
Posts: 5
Joined: November 21st, 2011, 2:55 am

Re: Local IP address in Desk Cloud - I can't get it.

Post by Epidermis »

Thanks, both of you!