Our new official repo is on github
LCD Smartie version 5.6 is released!
Download it now: https://github.com/LCD-Smartie/LCDSmartie/releases

How to make text stay put!

Discuss anything to do with plugins

Moderators: _X7JAY7X_, caesar, IFR, mattcro, limbo

Post Reply
Watermelons
Posts: 4
Joined: May 13th, 2007, 10:36 pm
Location: UK

How to make text stay put!

Post by Watermelons »

Howdy,

Basically I have the first part of my line 1 showing CPU usage (%)which means that any text to the RIGHT of it keeps moving about (e.g. when CPU goes from 2% upto 60%, it all gets shifted one character to the right. This is very annoying, but I can't find a plugin that fixes this...(i need something like hold'n'scroll).


Thanks in advance...

rfryar
Posts: 36
Joined: July 17th, 2007, 2:12 pm
Contact:

Post by rfryar »

Look into the $Fill command. This will force the character after the fill command to be at location XX

So I use $perf then a $Fill(12)%
This will keep the % sign in one place two characters from the moving percentage.

Rick

mattcro
Forum Supporter
Posts: 590
Joined: March 8th, 2006, 1:58 pm
Location: Scotland

Post by mattcro »

I use the $Right() command. This give the rightmost N characters of the input string.

For the CPU usage, I have:

Code: Select all

CPU: $Right($CPUUsage%,$3%)%
This gives you a 3-digit space with the CPU usage, followed by the percent symbol. It looks better since the number will be right-justified, like so:
Image

I've used the same technique for the memory and page file percentages on line 2.

Watermelons
Posts: 4
Joined: May 13th, 2007, 10:36 pm
Location: UK

Post by Watermelons »

Thanks guys...working like a dream now!

Post Reply