• We recently switched our forum platform. If you experience any issues please email support@crystalfontz.com

Reading values from a file?

jayklm

New member
Any idea when this will be added? I noticed others have suggested something similar. I don’t think it will be that hard to add that functionality. I would be satisfied if just the screen config files can be re-loaded at a given interval. This way all we need to do is format the data the same way the screen config files are. :)

I think the 634 and CrystalControl rocks.

jay
 

CF Mark

Administrator
Ok, well ive been thinking about text file support for a while but cant work out the best way to implement it.

I cant put text file names inside ~tags~ as it woiuld make them too long.
I guess i could allow the setup of say 10 text files in the settings window... but then how do i get the text from the file?
Hmmm... i guess i could make the ~tag~ represent which file and then which line number to read.

Would that be what you guys are after?
 

jayklm

New member
To me making 10 text file places in the setup will be more difficult. I think if you have 1 setting for the base directory. This way all the text files have to be in a given spot. Better yet don’t give a choice where the files can be. Just make them live in \program files\CrystalControl\txt\.

This way the tags will be short and simple:

~file:news.txt~
~file:pingtime.txt~

I would make the text routine simple. Read in the first line of the file. Make the files read in every 30 seconds or have it selectable. Realistically you don’t want to be loading a file every second.

Like I said in my other post. I will be happy with any file reading, even re-reading the .csc files.

jayklm
 
Last edited:

CF Mark

Administrator
Hmmm, i guess that would be a good way of doing it, but i doubt that would suit everyone as most text files would not be easily placed in one directory (application logs for example).

Any of you other people browsing the forums have an opinion?
 

jayklm

New member
I was planing on using cron.exe ( http://www.kalab.com/freeware/cron/cron.htm) to run perl scripts. It would be simple to pars any logfile/website using perl to get the data you would like to display.

What do you use to program CrystalControl in? my C skills are rusty but maybe I could help write a module :).

jayklm
 
Last edited:

CF Mark

Administrator
Yeh, see thats beyond most people who would use CrystalControl.

CrystalControl is written under Borland C++ Builder 5.
Writing the code to get it going will not be difficult, its just a matter of working out the best way to fit it into CrystalControl.
 

Americanfreak

New member
I would think that tags that would allow you to read from different lines in different text files would be best. Can you set it up so that more than one textfile be inputed into CC?

Textfile 1: News.txt =~textfile1~
Textfile 2: Weather.txt =~textfile2~
Textfile 3: Sports.txt =~textfile3~


screen 1
~textfile1~ ~line2~

screen 2
~textfile3~ ~line3~

etc.....
 

jayklm

New member
I think that would be fine. I would be happy with that :)

CC is the best LCD software I tried. LCD Smartie is ok but not as stable. I prefer the setup that CC uses. It is simple. The only thing I thought CC was lacking was reading a line from a file. so if the logic is easer to do 10 files that’s cool :) Actually all I would need is one file and use the one file with all the lines I would need :)

jayklm
 
Top