It is currently April 19th, 2024, 12:53 am

module doesn't show external IP, why?

Get help with installing and using Rainmeter.
anbr07
Posts: 82
Joined: July 17th, 2016, 12:19 pm

module doesn't show external IP, why?

Post by anbr07 »

Any idea, why the external IP is not showing?

Code: Select all

[Rainmeter]
; This section contains general settings that can be used to change how Rainmeter behaves.
Author=Pul53dr1v3r
AppVersion=1.3
Background=#@#Background.png
; #@# is equal to Rainmeter\Skins\illustro\@Resources
Update=1000
BackgroundMode=3
BackgroundMargins=0,34,0,11
AccurateText=1

[Metadata]
; Contains basic information of the skin.
Description=Shows your IP address and network activity.

[Variables]
; Variables declared here can be used later on between two # characters (e.g. #MyVariable#).
FontFamily=Trebuchet MS
textSize=8
ColorRe=255,0,0,200
ColorR=255,140,0,200
colorText=255,255,255,205
EmptyBarColor=255,255,255,25
NetInColor=51,153,255,205
NetOutColor=51,255,0,205
MaxBytesPerSec=0
MaxUSBytesPerSec=0
SkinState=0
IPState=0

;[""""""""""""""""""""""""""""""[[Styles]]""""""""""""""""""""""""""""""]

[styleTitle]
StringAlign=CENTER
StringStyle=Bold
StringEffect=SHADOW
FontEffectColor=0,0,0,20
FontColor=#colorText#
FontFace=#FontFamily#
FontSize=10
AntiAlias=1
ClipString=1

[styleCenterText]
StringAlign=Center
StringCase=NONE
StringStyle=BOLD
StringEffect=Shadow
FontEffectColor=0,0,0,20
FontColor=#colorText#
FontFace=#FontFamily#
FontSize=8
AntiAlias=1
;ClipString=1

[styleLeftText]
StringAlign=LEFT
StringCase=NONE
StringStyle=BOLD
StringEffect=SHADOW
FontEffectColor=0,0,0,20
FontColor=#colorText#
FontFace=#FontFamily#
FontSize=8
AntiAlias=1

[styleRightText]
StringAlign=RIGHT
StringCase=NONE
StringStyle=BOLD
StringEffect=SHADOW
FontEffectColor=0,0,0,20
FontColor=#colorText#
FontFace=#FontFamily#
FontSize=8
AntiAlias=1

[styleTotalText]
StringAlign=Left
StringCase=NONE
StringStyle=BOLD
StringEffect=SHADOW
FontEffectColor=0,0,0,20
FontColor=255,255,255,50
FontFace=#FontFamily#
FontSize=#textSize#
AntiAlias=1
;ClipString=1

[styleBar]
BarOrientation=Vertical
SolidColor=#EmptyBarColor#

; ----------------------------------
; METERS display images, text, bars, etc.
; ----------------------------------

;[""""""""""""""""""""""""""""""[[Title]]""""""""""""""""""""""""""""""]

[meterTitle]
Meter=STRING
MeterStyle=styleTitle
X=104
Y=12
W=152
H=20
Text="NETWORK"
LeftMouseUpAction=["Shell:::{7007ACC7-3202-11D1-AAD2-00805FC1270E}"]
MouseOverAction= [!SetOption "meterTitle" "FontColor" "#ColorR#"][!SetOption "meterTitle" "Text" "Network Connections"] [!UpdateMeter "meterTitle"][!Redraw]
MouseLeaveAction= [!SetOption "meterTitle" "FontColor" "#colorText#"][!SetOption "meterTitle" "Text"  "NETWORK"] [!UpdateMeter "meterTitle"][!Redraw]
DynamicVariables=1
; Even though the text is set to Network, Rainmeter will display
; it as NETWORK, because styleTitle contains StringCase=UPPER.

;[""""""""""""""""""""""""""""""[[Main Measures]]""""""""""""""""""""""""""""""]

[measureNetIn]
Measure=NetIn
IfEqualValue=0
IfEqualAction=[!SetOption meterDownloadArrow ImageTint 255,255,255,100]
IfAboveValue=0
IfAboveAction=[!SetOption meterDownloadArrow ImageTint #NetInColor#]

[measureNetOut]
Measure=NetOut
IfEqualValue=0
IfEqualAction=[!SetOption meterUploadArrow ImageTint 255,255,255,100]
IfAboveValue=0
IfAboveAction=[!SetOption meterUploadArrow ImageTint #NetOutColor#]

;[""""""""""""""""""""""""""""""[[IP]]""""""""""""""""""""""""""""""]
;(""""""""""((External_IP_Address))"""""""""")

[meterExtIPLabel]
Meter=STRING
MeterStyle=styleLeftText
X=10
Y=35
W=190
H=14
Text="External IP:"
Group=meterExtIP
LeftMouseUpAction=[!SetVariable "IPState" "1"][!WriteKeyValue "Variables" "IPState" "1"][!UpdateMeasure "measureIPState"]
MouseOverAction=[!SetOptionGroup "meterExtIP" "FontColor" "#ColorR#"][!UpdateMeterGroup "meterExtIP"][!Redraw]
MouseLeaveAction=[!SetOptionGroup "meterExtIP" "FontColor" "#colorText#"][!UpdateMeterGroup "meterExtIP"][!Redraw]
ToolTipText=Toggle IP Address

[meterExtIPValue]
Meter=STRING
MeterStyle=styleRightText
MeasureName=measureExtIP
X=198
Y=r
W=190
H=14
Text="%1"
DynamicVariables=1
Group=meterExtIP

[meterSeperator]
Meter=IMAGE
SolidColor=#EmptyBarColor#
X=10
Y=12r
W=190
H=1

[measureExtIP]
Measure=Registry
RegHKey=HKEY_CURRENT_USER
RegKey=Software\FinalWire\AIDA64\SensorValues
RegValue=Value.SEXTIPADDR
StringIndex=1
Substitute="%1":"N/A"

[measureIPState]
Measure=Calc
Formula=#IPState#
IfCondition=(#CURRENTSECTION#=0)
IfTrueAction=[!ShowMeterGroup "meterExtIP"][!HideMeterGroup "meterIntIP"][!Update]
IfFalseAction=[!ShowMeterGroup "meterIntIP"][!HideMeterGroup "meterExtIP"][!Update]

;IfTrueAction=[!ShowMeterGroup "meterIntIP"][!HideMeterGroup "meterExtIP"][!Update]
;IfFalseAction=[!ShowMeterGroup "meterExtIP"][!HideMeterGroup "meterIntIP"][!Update]
DynamicVariables=1

;(""""""""""((Internal_IP_Address))"""""""""")

[meterIntIPLabel]
Meter=STRING
MeterStyle=styleLeftText
Text="Internal IP:"
X=10
Y=[meterExtIPLabel:Y]
W=190
H=14
Group=meterIntIP
LeftMouseUpAction=[!SetVariable "IPState" "0"][!WriteKeyValue "Variables" "IPState" "0"][!UpdateMeasure "measureIPState"]
MouseOverAction=[!SetOptionGroup "meterIntIP" "FontColor" "#ColorR#"][!UpdateMeterGroup "meterIntIP"][!Redraw]
MouseLeaveAction=[!SetOptionGroup "meterIntIP" "FontColor" "#colorText#"][!UpdateMeterGroup "meterIntIP"][!Redraw]
ToolTipText=Toggle IP Address
Hidden=1

[meterIntIPValue]
Meter=STRING
MeterStyle=styleRightText
MeasureName=measureIntIP
Text="%1"
X=198
Y=r
W=190
H=14
Hidden=1
Group=meterIntIP
; %1 stands for the value of MeasureName (measureIP in this case).

[measureIntIP]
Measure=Registry
RegHKey=HKEY_CURRENT_USER
RegKey=Software\FinalWire\AIDA64\SensorValues
RegValue=Value.SPRIIPADDR
StringIndex=1
Substitute="%1":"N/A"

;[""""""""""""""""""""""""""""""[[Upload]]""""""""""""""""""""""""""""""]

[SpeedString]
Meter=String
MeterStyle=styleCenterText
Text=SPEED
FontSize=7
X=104
Y=48

[meterUploadValue]
Meter=STRING
MeterStyle=styleLeftText
MeasureName=measureNetOut
X=10
Y=r
W=190
H=14
Text="%1B/s"
NumOfDecimals=1
AutoScale=1

[meterMaxUploadArrow2]
Meter=Image
ImageName=#@#Images\Arrow.png
ImageTint=#NetOutColor#
X=80
;Y=91
Y=49
H=9
W=8
AntiAlias=1
ImageAlpha=100

;[""""""""""""""""""""""""""""""[[Download]]""""""""""""""""""""""""""""""]

[meterDownloadValue]
Meter=STRING
MeterStyle=styleRightText
MeasureName=measureNetIn
X=198
Y=48
W=188
H=14
Text="%1B/s"
NumOfDecimals=1
AutoScale=1

[DownloadSeparator]
Meter=Image
MeterStyle=styleBar
X=10
Y=12r
W=188
H=1

[meterMaxDownloadArrow2]
Meter=Image
ImageName=#@#Images\Arrow.png
ImageTint=#NetInColor#
X=120
Y=([meterMaxUploadArrow2:Y]+1)
H=9
W=8
ImageFlip=VERTICAL
AntiAlias=1
ImageAlpha=100

;[""""""""""""""""""""""""""""""[[Peak]]""""""""""""""""""""""""""""""]
;(""""""""""((Peak_Upload_Speed))"""""""""")

[MeasureMaxBytesPerSecUS]
Measure=Calc
Formula=Max(Max(measureNetOut, measureNetOut), #MaxUSBytesPerSec#)
IfConditionMode=1
IfCondition=((MeasureMaxBytesPerSecUS > #MaxUSBytesPerSec#) && (MeasureMaxBytesPerSecUS < 134217728))
IfTrueAction=[!SetVariable MaxUSBytesPerSec ([MeasureMaxBytesPerSecUS])]
DynamicVariables=1

[MeterNetMaxSpeedUS]
Meter=String
MeasureName=MeasureMaxBytesPerSecUS
MeterStyle=styleTotalText 
StringAlign=Left
FontColor=255,255,255,100
AutoScale=1
Text="%1B/s"
X=10
Y=61
ToolTipText=Peak UploadSpeed 

[meterSeperator2]
Meter=IMAGE
SolidColor=#EmptyBarColor#
X=9
Y=12r
W=190
H=1

[PeakString]
Meter=String
MeterStyle=styleCenterText
Text=PEAK
FontSize=7
X=104
Y=([MeterNetMaxSpeedUS:Y]+0)

;(""""""""""((Peak_Download_Speed))"""""""""")

[MeasureMaxBytesPerSecDS]
Measure=Calc
Formula=Max(Max(measureNetIn, measureNetIn), #MaxBytesPerSec#)
IfConditionMode=1
IfCondition=((MeasureMaxBytesPerSecDS > #MaxBytesPerSec#) && (MeasureMaxBytesPerSecDS < 134217728))
IfTrueAction=[!SetVariable MaxBytesPerSec ([MeasureMaxBytesPerSecDS])]
DynamicVariables=1

[MeterNetMaxSpeedDS]
Meter=String
MeasureName=MeasureMaxBytesPerSecDS
MeterStyle=styleTotalText
StringAlign=Right
FontColor=255,255,255,100
AutoScale=1
Text="%1B/s"
X=198
Y=61
ToolTipText=Peak DownloadSpeed

;(""""""""""((Peak_Indocators))"""""""""")

[MaxUploadArrow]
Meter=image
ImageName=#@#Images\Arrow.png
ImageTint=#NetOutColor#
X=80
;Y=91
Y=62
H=9
W=8
AntiAlias=1
ImageAlpha=100

[MaxDownloadArrow]
Meter=image
ImageName=#@#Images\Arrow.png
ImageTint=#NetInColor#
X=120
Y=1r
H=9
W=8
ImageFlip=VERTICAL
AntiAlias=1
ImageAlpha=100

;[""""""""""""""""""""""""""""""[[Histograms]]""""""""""""""""""""""""""""""]

[UploadGraphLine]
Meter=Histogram
GraphStart=Left
MeasureName=measureNetOut
PrimaryColor=#NetOutColor#
MeterStyle=styleBar
X=27
;Y=84
Y=74
H=25
W=164
AutoScale=1
Group=Graphs

[DownloadGraphLine]
Meter=Histogram
GraphStart=Left
MeasureName=measureNetIn
PrimaryColor=#NetInColor#
MeterStyle=styleBar
X=r
Y=26r
H=25
W=164
AutoScale=1
Group=Graphs

;(""""""""""((Bars))"""""""""")

[meterDownloadBar]
Meter=BAR
BarColor=#NetInColor#
MeterStyle=styleBar
MeasureName=measureNetIn
X=195
Y=105
W=3
H=25
AntiAlias=1
Group=Graphs

[meterUploadBar]
Meter=BAR
BarColor=#NetOutColor#
MeterStyle=styleBar
MeasureName=measureNetOut
X=r
Y=-26r
W=3
H=25
AntiAlias=1
Group=Graphs

;[""""""""""""""""""""""""""""""[[Total]]""""""""""""""""""""""""""""""]

[measureNetInTotal]
Measure=NetIn
Cumulative=1

[measureNetOutTotal]
Measure=NetOut
Cumulative=1

[meterTotalTitle]
Meter=STRING
MeterStyle=styleCenterText
FontSize=7
;FontColor=255,255,255,100
X=104
;Y=82
Y=131
H=11
Text=TOTAL
;Group=Total

[meterUploadTotal]
Meter=STRING
MeasureName=measureNetOutTotal
MeterStyle=styleLeftText
FontColor=255,255,255,100
;StringStyle=Normal
Text=%1B
X=10
Y=130
H=r
NumOfDecimals=1
AutoScale=1
;Group=Total

[meterDownloadTotal]
MeasureName=measureNetInTotal
Meter=STRING
MeterStyle=styleRightText
FontColor=255,255,255,100
;StringStyle=Normal
X=198
Y=130
H=r
Text=%1B
NumOfDecimals=1
AutoScale=1
;Group=Total

[TotalSeparator]
Meter=Image
MeterStyle=styleBar
X=10
;Y=142
W=188
H=1

[TotalUlArrow]
Meter=image
ImageName=#@#Images\Arrow.png
ImageTint=#NetOutColor#
X=80
;Y=91
;Y=131
H=9
W=8
AntiAlias=1
ImageAlpha=100

[TotalDlArrow]
Meter=image
ImageName=#@#Images\Arrow.png
ImageTint=#NetInColor#
X=120
;Y=r
H=9
W=8
ImageFlip=VERTICAL
AntiAlias=1
ImageAlpha=100

;[""""""""""""""""""""""""""""""[[Reset_Button]]""""""""""""""""""""""""""""""]

[meterUploadTotalTitleReset]
Meter=image
ImageName=#@#Images\Icons\refresh.png
 ImageTint=255,255,255,50
X=11
Y=15
LeftMouseUpAction=[!ResetStats] 
MouseOverAction=[!SetOption meterUploadTotalTitleReset ImageTint #ColorRe#] [!UpdateMeter meterUploadTotalTitleReset] [!Redraw]
MouseLeaveAction=[!SetOption meterUploadTotalTitleReset ImageTint 255,255,255,50] [!UpdateMeter meterUploadTotalTitleReset] [!Redraw]
ToolTipText=Reset Total

;[""""""""""""""""""""""""""""""[[Indicators-Arrows]]""""""""""""""""""""""""""""""]

[meterUploadArrow]
Meter=image
ImageName=#@#Images\Arrow.png
X=11
;Y=91
Y=86
Group=Graphs

[meterDownloadArrow]
Meter=image
ImageName=#@#Images\Arrow.png
X=r
Y=21r
ImageFlip=VERTICAL
Group=Graphs

;[""""""""""""""""""""""""""""""[[Collapse-Expand]]""""""""""""""""""""""""""""""]

[meterHideGraphs]
Meter=Button
ButtonImage=#@#Images\left.png
X=185
Y=15
ImageTint=255,255,255,150
LeftMouseUpAction=[!SetVariable SkinState "0"][!WriteKeyValue Variables SkinState "0"][!UpdateMeasure "MeasureSkinState"]
TooltipText=Hide graphs

[meterShowGraphs]
Meter=Button
ButtonImage=#@#Images\right.png
X=r
Y=r
ImageTint=255,255,255,150
LeftMouseUpAction=[!SetVariable SkinState "1"][!WriteKeyValue Variables SkinState "1"][!UpdateMeasure "MeasureSkinState"]
TooltipText=Show graphs
Hidden=1

[MeasureSkinState]
Measure=Calc
Formula=#SkinState#
IfCondition=(#CURRENTSECTION#=0)
IfTrueAction=[!HideMeterGroup "Graphs"][!HideMeterGroup "Total"][!ShowMeter "meterShowGraphs"][!HideMeter "meterHideGraphs"][!ShowMeter "TotalSeparator"][!SetOptionGroup "Graphs" "Y" "1"][!SetOption "meterDownloadTotal" "Y" "74][!SetOption "meterTotalTitle" "Y" "75"][!SetOption "meterUploadTotal" "Y" "74"][!SetOption "TotalSeparator" "Y" "86"][!SetOption "TotalUlArrow" "Y" "75"][!SetOption "TotalDlArrow" "Y" "75"][!Update]
IfFalseAction=[!ShowMeterGroup "Graphs"][!HideMeter "meterShowGraphs"][!ShowMeterGroup "Total"][!ShowMeter "meterHideGraphs"][!HideMeter "TotalSeparator"][!SetOption "UploadGraphLine" "Y" "79"][!SetOption "DownloadGraphLine" "Y" "105"][!SetOption "meterUploadArrow" "Y" "86"][!SetOption "meterDownloadArrow" "Y" "107"][!SetOption "meterDownloadBar" "Y" "105"][!SetOption "meterUploadBar" "Y" "79"][!SetOption "meterDownloadTotal" "Y" "130][!SetOption "meterTotalTitle" "Y" "130"][!SetOption "meterUploadTotal" "Y" "130"][!SetOption "TotalUlArrow" "Y" "131"][!SetOption "TotalDlArrow" "Y" "132"][!SetOption "TotalSeparator" "Y" "0"][!Update]
DynamicVariables=1
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: module doesn't show external IP, why?

Post by jsmorley »

I don't know anything about AIDA64, but another way to get your external IP address is:

Code: Select all

[MeasureIPWeb]
Measure=WebParser
URL=http://whatismyip.host/ipv4
RegExp=(?siU)<p class="ipaddress">(.*)</p>
StringIndex=1
RegExpSubstitute=1
Substitute="^$":"None"
anbr07
Posts: 82
Joined: July 17th, 2016, 12:19 pm

Re: module doesn't show external IP, why?

Post by anbr07 »

Hmm, all it shows now, is "%1". Not sure, why. But thanks!
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: module doesn't show external IP, why?

Post by jsmorley »

anbr07 wrote: December 15th, 2018, 2:48 pm Hmm, all it shows now, is "%1". Not sure, why. But thanks!
Dunno. I simply changed the measure [measureExtIP] to:

Code: Select all

[measureExtIP]
Measure=WebParser
URL=http://whatismyip.host/ipv4
RegExp=(?siU)<p class="ipaddress">(.*)</p>
StringIndex=1
RegExpSubstitute=1
Substitute="^$":"None"
1.png
You do not have the required permissions to view the files attached to this post.
anbr07
Posts: 82
Joined: July 17th, 2016, 12:19 pm

Re: module doesn't show external IP, why?

Post by anbr07 »

I guess, the rest of the code above isn't matching your code bit. The "%1" is contained in this module:

Code: Select all

[meterExtIPValue]
Meter=STRING
MeterStyle=styleRightText
MeasureName=measureExtIP
X=198
Y=r
W=190
H=14
Text="%1"
DynamicVariables=1
Group=meterExtIP
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: module doesn't show external IP, why?

Post by jsmorley »

anbr07 wrote: December 15th, 2018, 3:12 pm I guess, the rest of the code above isn't matching your code bit. The "%1" is contained in this module:

Code: Select all

[meterExtIPValue]
Meter=STRING
MeterStyle=styleRightText
MeasureName=measureExtIP
X=198
Y=r
W=190
H=14
Text="%1"
DynamicVariables=1
Group=meterExtIP
Use About from the Rainmeter tray icon. Are you getting any errors in the Log panel? What is the value of [measureExtIP] in the Skins panel?

I changed NOTHING in the skin except that one measure, and it's working for me.
anbr07
Posts: 82
Joined: July 17th, 2016, 12:19 pm

Re: module doesn't show external IP, why?

Post by anbr07 »

The measure in the skins panel (measureIPWeb) shows the correct IP. But "measureIPState", as well as "measureIntIP" both show the value "0". "MeasureSkinState" and "ipstate" also show zero.

And no errors so far.