Our new official repo is on github
LCD Smartie version 5.6 is released!
Download it now: https://github.com/LCD-Smartie/LCDSmartie/releases
LCD Smartie version 5.6 is released!
Download it now: https://github.com/LCD-Smartie/LCDSmartie/releases
WarnIf Errors...
Moderators: _X7JAY7X_, caesar, IFR, mattcro, limbo
-
- Posts: 53
- Joined: September 26th, 2007, 5:33 pm
- Contact:
WarnIf Errors...
Before I begin, I apologize if I've made an error.
Consider this statement
$dll(warnif.dll,2,$dll(warnif.dll,11,$dll(volume,2,,)/15,Good)/15,Bad)
So, if the system volume is less than 15, then show BAD, else show GOOD.
But, it doesn't work.
When the volume is less than 10, it shoes GOOD. and the moment volume hits 100, it shows BAD.
Can anyone help me? I'm just trying to setup free space checking on my hard drive. I test with the volume because it's quick to change realtime
Consider this statement
$dll(warnif.dll,2,$dll(warnif.dll,11,$dll(volume,2,,)/15,Good)/15,Bad)
So, if the system volume is less than 15, then show BAD, else show GOOD.
But, it doesn't work.
When the volume is less than 10, it shoes GOOD. and the moment volume hits 100, it shows BAD.
Can anyone help me? I'm just trying to setup free space checking on my hard drive. I test with the volume because it's quick to change realtime
-
- Forum Supporter
- Posts: 734
- Joined: October 15th, 2005, 10:39 am
- Location: Romania
- Contact:
-
- Posts: 53
- Joined: September 26th, 2007, 5:33 pm
- Contact:
-
- Forum Supporter
- Posts: 734
- Joined: October 15th, 2005, 10:39 am
- Location: Romania
- Contact:
there could be some plugins, ask the search buttonEvylRat wrote:Is there a newer version of WarnIf? I'm still getting the same results.
see http://www.eserver.gr
i haven't tested, check if the () are fine.EvylRat wrote:Once the check value falls below 10, it returns a false for <15 and once it hits 100, it returns a TRUE for < 15.
EvylRat wrote:The WarnIf statements always get me confused, I wish there was an easier way to do logical expressions.

regexp could be your best friend but demanding too http://forums.lcdsmartie.org/viewtopic.php?t=440
-
- Plugin Author
- Posts: 1604
- Joined: February 13th, 2005, 7:38 pm
- Location: Athens - Greece
- Contact:
There are few examples on the Read me text inside the warnif package...EvylRat wrote:Is there a newer version of WarnIf? I'm still getting the same results.
Once the check value falls below 10, it returns a false for <15 and once it hits 100, it returns a TRUE for < 15.
The WarnIf statements always get me confused, I wish there was an easier way to do logical expressions.
The Warnif Plugin is quite simple to use
Examples:
$dll(warnif.dll,1,$HDFreg(C)/10, Space Normal) returns "Space Normal" if the free space on drive C is more than 10 GB, otherwise returns the free space in GB
$dll(warnif.dll,2,$HDFreg(C)/10, Space Low) returns "Space Low" if the free space on drive C is less than 10 GB , otherwise returns the free space in GB
-
- Posts: 53
- Joined: September 26th, 2007, 5:33 pm
- Contact:
$dll(warnif.dll,11,99/15,True)
Returns TRUE, as it should because 99 IS greater than 15
$dll(warnif.dll,11,100/15,True)
returns 100, although it should've returned TRUE.
$dll(warnif.dll,2,15/15,True)
Returns 15 (correct)
$dll(warnif.dll,2,14/15,True)
Returns TRUE, as 14 IS smaller than 15.
$dll(warnif.dll,2,9/15,True)
Returns 9, although it should've returned TRUE.
Am i using the correct syntax?
Returns TRUE, as it should because 99 IS greater than 15
$dll(warnif.dll,11,100/15,True)
returns 100, although it should've returned TRUE.
$dll(warnif.dll,2,15/15,True)
Returns 15 (correct)
$dll(warnif.dll,2,14/15,True)
Returns TRUE, as 14 IS smaller than 15.
$dll(warnif.dll,2,9/15,True)
Returns 9, although it should've returned TRUE.
Am i using the correct syntax?
-
- Forum Supporter
- Posts: 734
- Joined: October 15th, 2005, 10:39 am
- Location: Romania
- Contact:
Right!EvylRat wrote:$dll(warnif.dll,11,99/15,True)
Returns TRUE, as it should because 99 IS greater than
Right again, but if limbo can notice this:EvylRat wrote:$dll(warnif.dll,11,100/15,True)
returns 100, although it should've returned TRUE.
$dll(warnif.dll,11,100/015,True)
this works!
Fine also!EvylRat wrote:$dll(warnif.dll,2,15/15,True)
Returns 15 (correct)
$dll(warnif.dll,2,14/15,True)
Returns TRUE, as 14 IS smaller than 15.
Right again, but this works...EvylRat wrote:$dll(warnif.dll,2,9/15,True)
Returns 9, although it should've returned TRUE.
$dll(warnif.dll,2,09/15,True)
Limbo, could you help if you have any spare time?
-
- Posts: 53
- Joined: September 26th, 2007, 5:33 pm
- Contact:
temporary fix... using width
$dll(width.dll,1,3r#0,24)
returns 024
$dll(width.dll,1,3r#0,100)
returns 100
$dll(width.dll,1,3r#0,9)
returns 009
So, as earlier post;
$dll(warnif.dll,11,$dll(width.dll,1,3r#0,100)/$dll(width.dll,1,3r#0,15),True)
Actually returns true!
Maybe I can get my HDfree space warning to work, along using WIDTH to make a bar graph
$dll(width.dll,1,3r#0,24)
returns 024
$dll(width.dll,1,3r#0,100)
returns 100
$dll(width.dll,1,3r#0,9)
returns 009
So, as earlier post;
$dll(warnif.dll,11,$dll(width.dll,1,3r#0,100)/$dll(width.dll,1,3r#0,15),True)
Actually returns true!
Maybe I can get my HDfree space warning to work, along using WIDTH to make a bar graph
-
- Plugin Author
- Posts: 1604
- Joined: February 13th, 2005, 7:38 pm
- Location: Athens - Greece
- Contact:
07/06/08: I'm checking the source code today about this specific error...caesar wrote:Right!EvylRat wrote:$dll(warnif.dll,11,99/15,True)
Returns TRUE, as it should because 99 IS greater thanRight again, but if limbo can notice this:EvylRat wrote:$dll(warnif.dll,11,100/15,True)
returns 100, although it should've returned TRUE.
$dll(warnif.dll,11,100/015,True)
this works!
Fine also!EvylRat wrote:$dll(warnif.dll,2,15/15,True)
Returns 15 (correct)
$dll(warnif.dll,2,14/15,True)
Returns TRUE, as 14 IS smaller than 15.Right again, but this works...EvylRat wrote:$dll(warnif.dll,2,9/15,True)
Returns 9, although it should've returned TRUE.
$dll(warnif.dll,2,09/15,True)
Limbo, could you help if you have any spare time?
The problem is that the check function is a general function that can compare text. which means that if I narrow the code to compare only integers the plugin will fail to compare texts.
The solution is to add some functions to compare only numerical values and release a new version of this plugin.
Hopefully I will release this version one of the following days.
-
- Plugin Author
- Posts: 1604
- Joined: February 13th, 2005, 7:38 pm
- Location: Athens - Greece
- Contact:
The new version of the Warnif plugin is released.
http://forums.lcdsmartie.org/viewtopic. ... 3975#13975
New function added to compare integer values and fix this annoying behavior.
Thanks to Ceasar for his help on the bug localization
Coding time: 11:19:40 to 13:06:50
http://forums.lcdsmartie.org/viewtopic. ... 3975#13975
New function added to compare integer values and fix this annoying behavior.
Thanks to Ceasar for his help on the bug localization
Coding time: 11:19:40 to 13:06:50

-
- Plugin Author
- Posts: 1604
- Joined: February 13th, 2005, 7:38 pm
- Location: Athens - Greece
- Contact:
In actions you can use:EvylRat wrote:temporary fix... using width
$dll(width.dll,1,3r#0,24)
returns 024
$dll(width.dll,1,3r#0,100)
returns 100
$dll(width.dll,1,3r#0,9)
returns 009
So, as earlier post;
$dll(warnif.dll,11,$dll(width.dll,1,3r#0,100)/$dll(width.dll,1,3r#0,15),True)
Actually returns true!
Maybe I can get my HDfree space warning to work, along using WIDTH to make a bar graph
if $dll(warnif.dll,1,$CPUUsage%/80,theme2) = theme2 then GotoTheme(2)
and
if $dll(warnif.dll,2,$CPUUsage%/30,theme1) = theme1 then GotoTheme(1)
and you can set only one screen to second theme.
this will cause your display to go to CPU stats when the CPU usage goes higher than 80% and stay there until it drops below 30%
Edit: the functions must be 14 and 15 not 1 and 2
Last edited by limbo on June 7th, 2008, 1:11 pm, edited 1 time in total.
-
- Posts: 53
- Joined: September 26th, 2007, 5:33 pm
- Contact:
Very nice! That's an excellent solution. Just been scratching my head with that one. The escalate in conjuction with the new warnif triggered the escalate countdown, but then returned to 0 because the CPU usgae (still either above 80, or idle) doesn't change.
I will use this idea for the hard drive scenario and other error reporting.
I could activate a THEME when a condition is met, and use the ENABLE/DISABLE screen to toggle those error/info screens.
Info screens could return to theme 1 when a threshold value is no longer met, error screens could remain on screen until I use a global hotkey.
caesar/limbo thanks!
I will use this idea for the hard drive scenario and other error reporting.
I could activate a THEME when a condition is met, and use the ENABLE/DISABLE screen to toggle those error/info screens.
Info screens could return to theme 1 when a threshold value is no longer met, error screens could remain on screen until I use a global hotkey.
caesar/limbo thanks!