It is currently May 9th, 2024, 2:50 pm

SysinfoData IP_ADDRESS changes

Get help with creating, editing & fixing problems with skins
DaveHouser
Posts: 4
Joined: January 23rd, 2012, 4:50 pm

SysinfoData IP_ADDRESS changes

Post by DaveHouser »

Hello all,

I am editing the ENIGMA NETWORK Network.ini file to display IP addresses for all my network adapters (LAN, VPN, WiFi). The problem is when disconnecting one network adapter, the information will shift up to the next network adapter. Take a look at "Connected" and "Disconnected" images below.

Connected:
Connected.JPG
Disconnected:
Disconnected.JPG
[WAN is blanked out but its there]

I know this an ongoing topic, I have looked on this site and searched it extensively, but to no avail. If someone could tell me how I can make the SysinfoData value from changing! Or maybe an if-then-else statement.

Thanks :)

Dave
You do not have the required permissions to view the files attached to this post.
User avatar
Kaelri
Developer
Posts: 1721
Joined: July 25th, 2009, 4:47 am

Re: SysinfoData IP_ADDRESS changes

Post by Kaelri »

I don't know of a way to stop Windows from rearranging your adapters. However, you can get around having to guess which is which. If you use

Code: Select all

[MeasureAdapterName1]
Measure=Plugin
Plugin=SysInfo
SysInfoType=ADAPTER_DESCRIPTION
SysInfoData=0

[MeasureAdapterName2]
Measure=Plugin
Plugin=SysInfo
SysInfoType=ADAPTER_DESCRIPTION
SysInfoData=1
then you can get the adapter name that corresponds to each IP address. Then - assuming the adapter names are constant - you can use Substitutes to shorten them, then display them as the "Label" text.
DaveHouser
Posts: 4
Joined: January 23rd, 2012, 4:50 pm

Re: SysinfoData IP_ADDRESS changes

Post by DaveHouser »

Thanks for the tip! Although a little confused.
Kaelri wrote:Then - assuming the adapter names are constant - you can use Substitutes to shorten them, then display them as the "Label" text.
Are you recommending i use adapter_description as a variable some how? How would i associate the adapter name to the IP address? Through an if than else? (If adapter_description = {adapter name} then SysInfoData= ... equals what?) the only value i see fit to show the IP address is SysInfoData, and it only recognizes "0" "1" "2" etc., or the adapter name.

Odd thing about putting the adapter name in this field, It retained the IP address of only one adapter for all meters. See adapter.jpg image below. (after refreshes, and restarting the Rainmeter application.

adapter
01.JPG
You do not have the required permissions to view the files attached to this post.
User avatar
Kaelri
Developer
Posts: 1721
Joined: July 25th, 2009, 4:47 am

Re: SysinfoData IP_ADDRESS changes

Post by Kaelri »

No... let me try again.

For both "IP_ADDRESS" and "ADAPTER_DESCRIPTION," the option "SysInfoData" is used to specify a network adapter. This must be a number: 0, 1, 2, etc. Which means that these two measures -

Code: Select all

[MeasureName]
Measure=Plugin
Plugin=SysInfo
SysInfoType=ADAPTER_DESCRIPTION
SysInfoData=0

[MeasureIP]
Measure=Plugin
Plugin=SysInfo
SysInfoType=IP_ADDRESS
SysInfoData=0
- will return the name and address of the same adapter, no matter how Windows has ordered them.

So instead of fixing your labels to "VPN," "LAN" and "WiFi," you can bind them to an ADAPTER_DESCRIPTION measure to show the correct adapter name.