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

Scrolling seperator?

General discussion about LCD Smartie.

Moderators: _X7JAY7X_, caesar, IFR, mattcro, limbo, Fast351

Post Reply
Randy_84dger
Posts: 4
Joined: September 11th, 2006, 10:57 pm
Contact:

Scrolling seperator?

Post by Randy_84dger »

Hello all,

Reasonably new to LCDsmartie, tho have used LCDproc for the last couple of months. I'm wondering if there's a known/quick/hacky way to insert a seperator character when the line (string) length is over 20...

Currently:

Code: Select all

$CustomChar(1,0,15,15,9,11,27,24,0)$Chr(176) $dll(regexp.dll,1,.*(?= - ),$dll(itunes2,1,Title,)) $Chr(176) 
$Chr(176) $dll(regexp.dll,1,(?<= - ).*,$dll(itunes2,1,Title,)) $Chr(176) 
$dll(sandr.dll,1,$dll(itues2,1,Stat,),)$Chr(263)  $dll(regexp,3,0:(\d*):#\1:#:(\d)#:0\1#0(\d\d)#\1,0:$dll(itunes2,1,Posh,))
$dll(itunes2,1,Position,20)
The trouble occurs when the artist or album is long enough to need scrolling (>20). The regexpr'ed sections end up with no spaces between them, looking awful. If i "manually" add spaces/characters they're always there and can then cause the line to scroll. If there a way to add extra characters when certain strings are a certain length- an automatic seperator for scrolling titles & albums?

I've had a blast throught the forum (and found most of the formatting code above as a nice side effect :D), but couldn't find what I'm after.

Thanks,
Al.

Edit: would be possible with warnif.dll, if strlen.dll existed..?
limbo
Plugin Author
Posts: 1604
Joined: February 13th, 2005, 7:38 pm
Location: Athens - Greece
Contact:

Post by limbo »

A new plugin may be usable for this....

Unfortunatelly I'm busy for the moment.... I should give it a try ASAP.
I can't something else than your solution for the moment :smt017
Randy_84dger
Posts: 4
Joined: September 11th, 2006, 10:57 pm
Contact:

Post by Randy_84dger »

Had a look at the plugin dev intro, didn't look too bad so... strlen.dll! :lol:

Does what I wanted:

Code: Select all

$CustomChar(1,0,15,15,9,11,27,24,0)$dll(regexp.dll,1,.*(?= - ),$dll(itunes2,1,Title,))$dll(strlen,2,$dll(regexp.dll,1,.*(?= - ),$dll(itunes2,1,Title,)), $Chr(176) )
$dll(regexp.dll,1,(?<= - ).*,$dll(itunes2,1,Title,))$dll(strlen,2,$dll(regexp.dll,1,(?<= - ).*,$dll(itunes2,1,Title,)), $Chr(176) )
$dll(sandr.dll,1,$dll(itunes2,1,Stat,),)$Chr(263)  $dll(regexp,3,0:(\d*):#\1:#:(\d)#:0\1#0(\d\d)#\1,0:$dll(itunes2,1,Posh,))
$dll(itunes2,1,Position,20) 
This auto inserts a custom char, if the title or album name is >20.

Hope someone else finds it useful!
IFR
Plugin Author
Posts: 201
Joined: April 6th, 2005, 12:59 am
Location: Canada
Contact:

Post by IFR »

Good job! I'm sure some other people will find it useful. Don't hesitate to ask questions or post tips!
limbo
Plugin Author
Posts: 1604
Joined: February 13th, 2005, 7:38 pm
Location: Athens - Greece
Contact:

Post by limbo »

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

Post by mattcro »

I made a plugin to do this kind of thing a while ago, called scrollpad. It allows you to make a string scroll within a specified number of characters, eg 20 for a 4x20 display, or whatever you want. You can specify the separator too, which is typically " - " or " ** ". download source, compiled dll and usage info from Erlis's wiki here.

To scroll Winamp's track title in 20 characters (if longer than 20) with a double-asterisk separator (" ** "):

Code: Select all

$dll(scrollpad.dll,1,20# ** ,$WinampTitle)
Hope it's useful! I use it all the time.
Post Reply