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
Plugin to show text from a txt?
Moderators: _X7JAY7X_, caesar, IFR, mattcro, limbo
-
- Posts: 100
- Joined: January 17th, 2018, 1:43 pm
Plugin to show text from a txt?
Hi. Could be possible to make a plugin to show text from inside a txt file?
I have a program doing a log and will be nice to have displayed on screen.
Tried webtxt but doesnt work for local HDD files.
Thanks!
I have a program doing a log and will be nice to have displayed on screen.
Tried webtxt but doesnt work for local HDD files.
Thanks!
Last edited by trihy on January 21st, 2018, 8:20 pm, edited 2 times in total.
-
- Plugin Author
- Posts: 276
- Joined: May 27th, 2011, 2:13 pm
- Location: Stirling, Scotland
Re: Plugin to show text form a txt?
I'm sure there was one out there, think it was called webtxt. but can't find it now. Should be simple enough though. Have a google for it but if you can't find it let me know and I can knock something up if you spec what you are after in a bit more detail.
-
- Posts: 100
- Joined: January 17th, 2018, 1:43 pm
Re: Plugin to show text form a txt?
dperrow wrote:I'm sure there was one out there, think it was called webtxt. but can't find it now. Should be simple enough though. Have a google for it but if you can't find it let me know and I can knock something up if you spec what you are after in a bit more detail.
Hi, just edited, yes, just tried webxt but doesnt seem to work from a local file.
Tried this:
$dll(webtxt,1,C:\Users\xxxxx\Downloads\lcd_smartie_v5.4.2.92 Beta\test.txt,30#0)
But screen shows nothing and txt contain an entire line of text.
.txt file will always show a single line of text. ie running emulator and game and will show:
"SNES SNOW BROS" without the quotes. And everytime the game launcher close, the text inside the txt file will be cleaned and replaced with the next emulator/game launched.
Thanks
Re: Plugin to show text form a txt?
Also will be nice if can display different lines from a txt.
ie. txt containing
SNES (that could be displayed on line 1)
Snow Bros (and this on line 2)
Not sure if can be defined by Y axis to read line 2. Something like (0,1) or (0,2) for the second line?
Just to get better use of the limited 2x16 space.
Thanks again!
ie. txt containing
SNES (that could be displayed on line 1)
Snow Bros (and this on line 2)
Not sure if can be defined by Y axis to read line 2. Something like (0,1) or (0,2) for the second line?
Just to get better use of the limited 2x16 space.
Thanks again!
-
- Posts: 100
- Joined: January 17th, 2018, 1:43 pm
Re: Plugin to show text form a txt?
Seems I wasnt logged
I think update interval should be 1 sec or lower.
I attached the real file when launching a game so you can have an example (had to make a zip because dont let me upload txt)

I think update interval should be 1 sec or lower.
I attached the real file when launching a game so you can have an example (had to make a zip because dont let me upload txt)
You do not have the required permissions to view the files attached to this post.
-
- Posts: 100
- Joined: January 17th, 2018, 1:43 pm
Re: Plugin to show text from a txt?
Any help with this guys? 

-
- Plugin Author
- Posts: 276
- Joined: May 27th, 2011, 2:13 pm
- Location: Stirling, Scotland
Re: Plugin to show text from a txt?
okay mate, I've knocked this up see if it works for you. Copy all 3 files from the zip to the plugins folder
The file FileText.cfg contains a pointer to the file, you can change this to suit. My test file is in the plugins folder and is called FileText.txt
start Smartie and wherever you want the text put in the line $dll(FileText,1,L,S#E) where L=the line number in the file that you want (starting at 0), S is the starting character on that line (starting at 0) and E is the ending character on the line (starting at 0) the last parameter is optional. e.g. $dll(FileText,1,1,) will display the whole of line 1, $dll(FileText,1,2,3,6) will display characters 3 to 6 from line 2.
Let me know how it goes.
The file FileText.cfg contains a pointer to the file, you can change this to suit. My test file is in the plugins folder and is called FileText.txt
start Smartie and wherever you want the text put in the line $dll(FileText,1,L,S#E) where L=the line number in the file that you want (starting at 0), S is the starting character on that line (starting at 0) and E is the ending character on the line (starting at 0) the last parameter is optional. e.g. $dll(FileText,1,1,) will display the whole of line 1, $dll(FileText,1,2,3,6) will display characters 3 to 6 from line 2.
Let me know how it goes.
You do not have the required permissions to view the files attached to this post.
-
- Plugin Author
- Posts: 276
- Joined: May 27th, 2011, 2:13 pm
- Location: Stirling, Scotland
Re: Plugin to show text from a txt?
Sorry, that should have been $dll(FileText,1,2,3#6)
-
- Posts: 100
- Joined: January 17th, 2018, 1:43 pm
Re: Plugin to show text from a txt?
Hi @dperrow Thats an amazing job!dperrow wrote:okay mate, I've knocked this up see if it works for you. Copy all 3 files from the zip to the plugins folder
The file FileText.cfg contains a pointer to the file, you can change this to suit. My test file is in the plugins folder and is called FileText.txt
start Smartie and wherever you want the text put in the line $dll(FileText,1,L,S#E) where L=the line number in the file that you want (starting at 0), S is the starting character on that line (starting at 0) and E is the ending character on the line (starting at 0) the last parameter is optional. e.g. $dll(FileText,1,1,) will display the whole of line 1, $dll(FileText,1,2,3,6) will display characters 3 to 6 from line 2.
Let me know how it goes.
A little problem, I cant get plugin to show anything from line 1. It will show always line 2 on both LCD lines.
I made a txt containing this:
1
2
Then I used:
$dll(FileText,1,1,)
$dll(FileText,1,2,)
And LCD will display:
2
2
Hope it can be easily fixed, its so close to be perfect

Thanks for all your work
Last edited by trihy on February 21st, 2018, 3:25 am, edited 1 time in total.
-
- Posts: 100
- Joined: January 17th, 2018, 1:43 pm
Re: Plugin to show text from a txt?
@dperrow I found the problem. My bad.
Line 1 is 0
Line 2 is 1
So, using this:
$dll(FileText,1,0,)
$dll(FileText,1,1,)
Now works perfect.
Again, thanks
Only small problem I noticed, is that when line 2 is empty, plugin will show line 1 in both lcd lines. When line 1 is empty, doesnt have this problem, will show only line 2.
Line 1 is 0
Line 2 is 1
So, using this:
$dll(FileText,1,0,)
$dll(FileText,1,1,)
Now works perfect.
Again, thanks

Only small problem I noticed, is that when line 2 is empty, plugin will show line 1 in both lcd lines. When line 1 is empty, doesnt have this problem, will show only line 2.
-
- Plugin Author
- Posts: 276
- Joined: May 27th, 2011, 2:13 pm
- Location: Stirling, Scotland
Re: Plugin to show text from a txt?
o.k., my bad, didn't clear the result before reading the file.
Try this:
Try this:
You do not have the required permissions to view the files attached to this post.
-
- Posts: 100
- Joined: January 17th, 2018, 1:43 pm
Re: Plugin to show text from a txt?
Now is just perfect.dperrow wrote:o.k., my bad, didn't clear the result before reading the file.
Try this:
Thanks!
Will make a tutorial on kodi forums crediting you and linking this thread

-
- Plugin Author
- Posts: 276
- Joined: May 27th, 2011, 2:13 pm
- Location: Stirling, Scotland
Re: Plugin to show text from a txt?
Thanks,
this must be the easiest plugin I've written. Probably took a total of 20 mins since I had all the infrastructury code (logging, config file etc.) already available. So no great shakes but I can imagine lots of uses for it.
this must be the easiest plugin I've written. Probably took a total of 20 mins since I had all the infrastructury code (logging, config file etc.) already available. So no great shakes but I can imagine lots of uses for it.
-
- Plugin Author
- Posts: 276
- Joined: May 27th, 2011, 2:13 pm
- Location: Stirling, Scotland
Re: Plugin to show text from a txt?
Thanks,
this must be the easiest plugin I've written. Probably took a total of 20 mins since I had all the infrastructury code (logging, config file etc.) already available. So no great shakes but I can imagine lots of uses for it.
this must be the easiest plugin I've written. Probably took a total of 20 mins since I had all the infrastructury code (logging, config file etc.) already available. So no great shakes but I can imagine lots of uses for it.
-
- Posts: 100
- Joined: January 17th, 2018, 1:43 pm
Re: Plugin to show text from a txt?
Hi. Yes, it could be as great as webtxt, but for local use. It could display reports from many programs, etc.
Since it was easy, maybe you can take a look to the netflix plugin
not sure if that one could be possible. I guess all depends on how netflix app reports what is playing.
Too bad there are few people around here. With arduino, this lcd are getting lot of different uses.
But also is a little complicated for a normal pc. There arent many lcd to usb interface boards. And building one is not for everyone. I guess this makes people lost interest.
Since it was easy, maybe you can take a look to the netflix plugin

Too bad there are few people around here. With arduino, this lcd are getting lot of different uses.
But also is a little complicated for a normal pc. There arent many lcd to usb interface boards. And building one is not for everyone. I guess this makes people lost interest.
-
- Plugin Author
- Posts: 276
- Joined: May 27th, 2011, 2:13 pm
- Location: Stirling, Scotland
Re: Plugin to show text from a txt?
Netflix would be a bit difficult. I don't have it on my PC and don't know where I'd find any info on hte API. If I had the API details I'd have a go though.
-
- Posts: 100
- Joined: January 17th, 2018, 1:43 pm
Re: Plugin to show text from a txt?
Yes, no idea really. And not sure how open the netflix api is.
Lets hope someone familiar with the api take a look.
Lets hope someone familiar with the api take a look.