Latest Forum Posts
Andymon on 07 Nov : 14:16
I won't add something regardin[more]

Andymon on 07 Nov : 14:15
You must Activate xDesktop Em[more]

GothsSecret on 07 Nov : 14:05
@Niza:
no, cause xLab[more]

Niza on 07 Nov : 10:15
Don't you need to load the xDe[more]

Wolzly on 07 Nov : 06:09
Here's my theme.rc to see if[more]

Backend
Our headlines can be syndicated by using either our rss or text feeds.
news.xml - news.txt





 
The Litestep Site for News, Modules, Sources, and all the other stuff around Litestep.

 
 
   
LS-Universe.info -> Forums -> Modules -> xLabel - read from text file
xLabel - read from text file
<< Previous thread | Next thread >>  
Author Post
dandersahn
Thread: xLabel - read from text file
             Thu Oct 14 2004, 07:51PM
Registered Member #162
Joined Wed Oct 13 2004, 10:15PM
posts 13
is there any way to set the text of an xLabel to the contents of a text file? e.g. !LabelSetText fooLabel fooFile.txt

I am trying to find a way to set the text of a label to the content generated by a shell script. Right now I am using the the following shell command in my shell script "litestep.exe !LabelSetText labelName content". The problem is that command line arguments are limited in the length of data that can be passed. I would like to be able to write the output to a file then make a call to set the label text to the content of the file.

Does anyone know if there is a way currently to read the contents of a file or the stdout from a shell command into an evar??

Maybe it would be good modify the xTextEdit module to allow reading of file contents into an evar.
Back to top
Backslash
Thread: xLabel - read from text file
             Fri Oct 15 2004, 02:02AM

Registered Member #38
Joined: Mon May 31 2004, 11:48AM
posts 87
Well there's [line('file', number)] if you hadn't seen that already. But you want to return the WHOLE file?

Actually, there brings up an interesting idea. Perhaps the line escape sequence could be modified to optionally have another line number argument, so something like [line('file', startline, endline)], returning all text from line # startline to line # endline.

Now that you get me started, another idea:
Perhaps the line escape sequence could accept negative numbers for the line numbers, and this would mean counting upward from the end of the file. So [line('file', 1, -1)] would return the whole file. I know, a similar same thing can be achieved with lineCount, but I dunno, it might be something useful.
Back to top
dandersahn
Thread: xLabel - read from text file
             Fri Oct 15 2004, 06:47PM
Registered Member #162
Joined: Wed Oct 13 2004, 10:15PM
posts 13
that will definitely work. thanks! i didn't think to look there.
Back to top

Quick Reply:

 

Jump:     Back to top



Chatbox



Maestr0
   on 07 Nov : 17:35
chatbox looks very cool, very nicely done!


GothsSecret
   on 07 Nov : 15:27
ok, to all xLabel Desktop users, if you want to enable the desktop funtion, you need to set "xLabelUsexDesktop"!
!! else it couldn't work. sorry for forgetting to mention it in the readme *g* next time it will be in there


GothsSecret
   on 02 Nov : 19:54
hehe doin my best


Wolzly
   on 01 Nov : 18:54
ROFL!

You guys never fail to entertain


GothsSecret
   on 01 Nov : 15:47
oh.. sorry to those 2 online ppl, Just fucked up the site for a short mement


Backslash
   on 01 Nov : 06:00
xPopup 1.0.8 ROCKS!


Juan Guillermo
   on 31 Oct : 23:46
Thanks a lot for your GREAT work guis , xmodules are transforming the Litestep shell in a much more fancy/varsatile thing.


AngelKnight
   on 30 Oct : 16:44
^_^


Backslash
   on 29 Oct : 00:54
>Andymon - woot!
>GothsSecret - If necessary, you could probably reduce the gaps between the center and the sides, for those with lower resolutions (not me, I'm at 1280x1024!).


Andymon
   on 28 Oct : 13:02
Just wanna tell:
HighColor(16bit) is coming for all xModules in the near future, finally.









© by LS-Universe.info