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.
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.
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
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.