The blabla regarding the background:
I created a skin, which informs me if a user/computer on the network is online or offline; I abused the pingplugin to realize this. This is pretty handy, because I can see that "Computer3rdFloor" is online, without phoning through the house, trying to reach someone who can tell me the status or just ping the pc with some other command.
Works pretty charming, but I recognized that the skin loses some functionality when it's set to stay on the desktop. I mean, I do not need the information all the time - just in some cases...
Now I thought it would be more charming, if a message box would pop up, when one of the computers on the network go off- or online.
Perhaps it is time for a new "message box skin", but right now I would be happy to secure the basic functionality. Therefore I just created a vbs-file with the following code:
Code: Select all
x=msgbox("Computer3rdFloor is online.",64,"Status")
The actual skin, that informs me if a certain computer is online contains code like:
Code: Select all
[mPingComputer3rdFloor]
Measure=Plugin
Plugin=Plugins\PingPlugin.dll
DestAddress=#Computer3rdFloor_ID#
UpdateRate=2
[mActionComputer3rdFloor]
Measure=Calc
Formula=mPingComputer3rdFloor
IfAboveValue=1000
IfAboveAction=!execute [!RainmeterShowMeter txtOfflineComputer3rdFloor][!RainmeterHideMeter txtOnlineComputer3rdFloor]
IfBelowValue=999
IfBelowAction=!execute [!RainmeterShowMeter txtOnlineComputer3rdFloor][!RainmeterHideMeter txtOfflineComputer3rdFloor]
...but I'm superwrong.[mPingComputer3rdFloor]
Measure=Plugin
Plugin=Plugins\PingPlugin.dll
DestAddress=#Computer3rdFloor_ID#
UpdateRate=2
[mActionComputer3rdFloor]
Measure=Calc
Formula=mPingComputer3rdFloor
IfAboveValue=1000
IfAboveAction=!execute [!RainmeterShowMeter txtOfflineComputer3rdFloor][!RainmeterHideMeter txtOnlineComputer3rdFloor]["#CurrentPath#\Computer3rdFloorOffline.vbs"]
IfBelowValue=999
IfBelowAction=!execute [!RainmeterShowMeter txtOnlineComputer3rdFloor][!RainmeterHideMeter txtOfflineComputer3rdFloor]["#CurrentPath#\Computer3rdFloorOnline.vbs"]
The main trouble:
When I start the skin the message box pops up, telling me that the Computer3rdFloor is offline. After the skin is done with the ping measure (a sec later) the message box pops up again, telling me that the Computer3rdFloor is online.
After that it works just like it should:
Telling me if a computer is on- or offline.
The riddle:
Yes. Indeed the computer is kind of offline, when ping measure is not finished. And indeed the computer is online a sec later after finishing it's job.
But this is kind of annoying. I don't need the message after starting the skin, where I can see clearly which computer is online or not. It's more like a gimmick, during the day... kind of an useful information... And with around five computers in the house, I am totally "message boxed" as soon the skin is started.
Thought about implementing a timer, that "overrides" the first on- or offline check, but with the above code I'm not getting the picture how to manage that.
Guys - I've got my wires crossed somewhere... need some food for thought. Help would be really appreciated!
Thanks in advance!
Regards,
Shinson