Quote:
Originally Posted by jmseight
Yep. The problem is in the eips. Thanks for the great help.
The following works:
eips $XP $YP "$ST""_ "
I can use this to type commands into the shell, correct?
eips 10 10 "Type command?"
S="$(getkb 10 11)"
sh < S
Is the last statement correct?
Thanks,
James
|
You can pipe the filtered keyboard ascii into the shell, and pipe the shell output to eips, but you need to use "tr" or whatever to remove bad characters from the text eips gets or it will be unhappy again. For example, it does not like '!' characters... Also, eips can be told to scroll the display, just like a terminal. I have a script around here somewhere that does that, and inserts a delay every screenful of data. Fast scrolling text is not readable.
In fact, there are so many characters eips does not like that I was planning to quit using it and blit small images of individual ascii characters using "dd" to display each row of pixels from a character map image. I was also planning to finish my Hershey vector font support. I have too many "mostly working" projects.

But eips is a great way to start...
I will post my script when I find it (I was using it to scroll output from "dmesg" to the eink display in a RUME.sh script, with a generic "Press any key to continue . . ." message at the bottom), but now, back to work.
P.S. Regarding your question, you are missing a '$' on S and it is missing quotes despite my "It's the law!" statement, and I would echo it into sh:
eips 10 10 "Type command?"
S="$(getkb 10 11)"
echo "$S"|sh
Or if you do not plan to reuse $S, then do:
eips 10 10 "Type command?"
echo "$(getkb 10 11)"|sh
Of course, if your intent is to display the command output on the display, then you need to pipe the output of sh to eips, probably filtered with:
L=$(sh|tr...);eips x y "$L"
Again, these answers are just "off the top of my head" so need testing and possible adjustments...