ticker tape PNN - Puppy News Network

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Message
Author
User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

ticker tape PNN - Puppy News Network

#1 Post by Lobster »

this is my latest almost masterpiece of bash :)
It does not quite work :cry:

The idea is to call any text in advert (as the example)
and display on screen, one character after another - a bit like a ticker tape
- As I am such a useless programmer I will have to resign from Puppy hacker school
http://puppylinux.org/wikka/PuppySchoolProgramming

There must be a simpler more efficient way to use yaf-splash to achieve this?
Grateful for any help.
Do I need an array (whatever that is)?

8)


code and text file enclosed as a tar file

Code: Select all

#!/bin/bash
# Lobster Jan 2012 yellow autocue using yaf-splash
# will read the text file "advert"
# and display one character after another

INPUT=advert
clear
#plainchar="     "

while IFS= read -r -n 100 char
do
    # display one character at a time
     sleep 0.05
   yaf-splash -bg yellow -fontsize x-large -timeout 1 -text $char
#  yaf-splash -bg yellow -fontsize x-large -timeout 1 -text $plainchar

done < "$INPUT"
Attachments
scroller.tar.gz
(421 Bytes) Downloaded 393 times
Last edited by Lobster on Fri 03 Feb 2012, 22:20, edited 1 time in total.
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#2 Post by SFR »

I wasn't able to run your script (and I don't fully understand some commands in it, 'coz I'm relatively new to Bash :wink: ), therefore I'm not sure, if this is what you want to achieve..?

Code: Select all

#!/bin/bash 

# Scroll using yaf-splash example

INPUT="     Hello World..."  # or INPUT=`cat sometextfile` for external text
WIDTH=5					     # width of scroll
LEN=${#INPUT}

for i in `seq 0 $LEN`; do

TEXT="${INPUT:$i:$WIDTH}"

yaf-splash -bg yellow -fontsize x-large -timeout 1 -text "$TEXT"

done
It works, but the annoying thing is that this yellow box dissapears for a second after every refresh...

BTW, thanks for introducing this "yaf-splash" thing for me, good to know for future use :)

Greetings!
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#3 Post by Lobster »

Greetings!
:D

Hi - many thanks :)

Ah new code and it works and easy to understand . . .
From your code I guess you are more used to BASIC?
Now how do we get rid of that flashing . . . ?
We have worlds to subjugate . . .

Here are some changes - I now see this as leading to a daily or occasional messaging for those who opt in . . .

Code: Select all

#!/bin/bash
# Scroll using yaf-splash example

INPUT="    Welcome to Puppy. We are the Dorg. Resistance is Futile. Prepare to be Puppied"  # or INPUT=`cat sometextfile` for external text
WIDTH=20                    # width of scroll
LEN=${#INPUT}

for i in `seq 0 $LEN`; do

TEXT="${INPUT:$i:$WIDTH}"
yaf-splash -bg yellow -fg red -fontsize x-large -timeout 1 -placement bottom -text "$TEXT"

done
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#4 Post by SFR »

Lobster wrote:From your code I guess you are more used to BASIC?
I bet you've deduced it from "LEN" and "for i in `seq 0 $LEN`", right? :D
Yup, I fiddled with BASIC first, and later mainly Assembler on c64.
And now I have started "the new beginning" with Bash/Gtkdialog.

I can't find any way to get rid of this flashing. And the second thing is that yaf-splash can refresh for 1 sec minimum. A bit too slow...

But I think we could also try Gtkdialog-Desklet to display borderless and transparent window with scroller.
But on the other hand it's not implemented in every Puppy... :?

Any other ideas? :)

Greetings!
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#5 Post by SFR »

Ok, another approach...
This time I used text2svg routine from this post.
Font changed to Monospace and no spaces allowed, to preserve smoothness of scrolling.
Most of parameters are now scattered all over the code and hard to tweak, sorry.
The important parameter is X window position in here:
gtkdialog -G 0x0+450+0 -p MAIN
450 is good for my 1366x768 screen resolution.

Yeah, I know - if I lived in a country ruled by programmers, I'd be sentenced to death for this code... :roll: 8)

Code: Select all

#!/bin/bash

# =================================
# Scroller - The Next Generation ;)
# =================================

echo -n "0" > /tmp/scroll_var

# a bit tweaked text2svg() function

text2svg() 
{ 
#generate an image 
WIDTH=$(($(echo "$1"|wc -c)*19)) 
T=35 
BG="$2" 
echo '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> 
  <rect width="'$WIDTH'" 
     height="50" 
     x="10" 
     y="0" 
     style="font-size:'${T}';fill:'$BG';fill-opacity:0.35;fill-rule:evenodd;stroke-width:3pt;" 
     id="rect1" />
  <text 
     x="0" 
     y="35" 
     style="font-size:'${T}';font-weight:normal;fill-opacity:0.75;stroke-width:3pt;font-family:monospace;" 
     id="text1"> 
    <tspan 
       id="tspan1">'"${1}"'</tspan>
  </text> 
</svg>' > /tmp/${3}.svg 
} 
export -f text2svg

scroll (){
INPUT="Welcome_to_Puppy._We_are_the_Dorg._Resistance_is_Futile._Prepare_to_be_Puppied"
INPUT="____________________"$INPUT"____________________"
LEN=${#INPUT}
WIDTH="40"
I=`cat /tmp/scroll_var`
TEXT="[""${INPUT:$I:20}""]"
text2svg "${TEXT}" "#ADD8E6" scroller
I=$(($I+1))
if [ "$I" == "$(($LEN-20))" ]; then I=0;fi
echo -n $I > /tmp/scroll_var
} 
export -f scroll

export MAIN='
<window decorated="false">
  <vbox>
    <pixmap> 
      <variable>PIX</variable>
      <input file>/tmp/scroller.svg</input>
    </pixmap>
    <hbox>
      <progressbar visible="true">
        <input>echo 100</input>
      </progressbar>
      <button width-request="150"><label>Assimilate!</label></button>
      <progressbar visible="true">
        <input>while [ A = A ]; do sleep 0.2; echo 99; echo 100; done</input>
        <action>scroll</action>
        <action>refresh:PIX</action>
      </progressbar>
    </hbox>
  </vbox>
</window>
'

scroll

gtkdialog -G 0x0+450+0 -p MAIN

rm -f /tmp/*.svg
rm -f /tmp/scroll_var 
TEST=`ps | grep while | grep sleep | grep done | cut -d"r" -f 1`
kill $TEST

# END
EDIT: changed echo 0 --> echo 99 - less flashing progressbar...and removed unnecessary touch /tmp/scroll_var line...

Greetings!
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#6 Post by Lobster »

Gtkdialog-Desklet I like for the transparency
The code which could result in death
I liked the font the excellent non flashing and font
but not the window decoration or the code

I appreciate your ideas . . . :)
May have to look at Bacon or C

Once the messaging is in place the idea is to call
info when online - maybe a weekly news or updates
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

#7 Post by seaside »

sfr,

Nicely done gtkdialog scroller and I'll bet you hated placing underlines between the words :)

For pure simplicity, it's a shame we don't have this html tag solution.

Code: Select all

<marquee>Here's the scrolling text</marquee>	
Wait, maybe we do.... can you call some html code with a minimal browser straight to an undecorated window...

Cheers,
s

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#8 Post by SFR »

Lobster wrote:May have to look at Bacon or C
Right, probably BaCon/C could provide the most efficient way to achieve a good looking, smooth scroller...
I must begin to learn it at last (but I have brain torsion when I see C code :lol: ).

or...
seaside wrote:Nicely done gtkdialog scroller and I'll bet you hated placing underlines between the words :)

For pure simplicity, it's a shame we don't have this html tag solution.

Code: Select all

<marquee>Here's the scrolling text</marquee>


Wait, maybe we do.... can you call some html code with a minimal browser straight to an undecorated window...
You are reading my mind! :shock: :D
Since yesterday I'm searching the way to launch HTML code in self sized/placed and undecorated window.
<marquee> would be a very clean & aesthetic solution.
But I'm stuck for now.
Eg. Semonkey/Firefox do not have any X/Y/width/height/ command line parameters.
Unless I'll try to dig out something useful from the hundreds of lines of "about:config" :roll:

Is there any other way to do it..?
Lobster wrote:Once the messaging is in place the idea is to call
info when online - maybe a weekly news or updates
I support this idea, would be great to receive:
"PNN* - Breaking News: the new version of your favourite Puppy is available now!"

* PNN = Puppy News Network

Greetings!
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#9 Post by Lobster »

Wait, maybe we do.... can you call some html code with a minimal browser straight to an undecorated window...
well the code is easy from a bit of hacked javascript
http://tmxxine.com/news/.
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#10 Post by SFR »

Lobster wrote:
Wait, maybe we do.... can you call some html code with a minimal browser straight to an undecorated window...
well the code is easy from a bit of hacked javascript
http://tmxxine.com/news/.
Cool! :D

Works out-of-box with:
- Seamonkey 2.7
- Opera 11.57

Dillo doesn't support <marquee>, as I managed to figure out before, but I couldn't make it working with Chromium 17, Firefox 7.0 & Iron 15 :cry:
Are these browsers have 'status bar' at all? Couldn't find one or I'm blind...

Greetings!
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#11 Post by Lobster »

Dillo may not support Javascript. Chromium and Iron probably have it off by default . . .
I just tried it on Seamonkey 2.7 in Saluki 009, which worked . . .

OK better go find some C code 8)
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

#12 Post by seaside »

How about Puppy-browser to the rescue...

Code: Select all

echo '<html>
<font size=+46 face="DejaVu Sans"  color=red> <marquee>
- And Now For Something Different ...... - 
</marquee> </font>
</html>' >/tmp/banner.html

/usr/local/PuppyBrowser/puppy-browser /tmp/banner.html -w=500 -h=500 -x=150 -y=50
It takes geometry, plays marquee and now if someone can figure out how to ditch the window decoration in /usr/local/PuppyBrowser/ - maybe theme.rc?

Cheers,
s
EDIT: Found this parameter -profile=fullscreen (seems slower) and hardcoded geometry

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#13 Post by SFR »

Hmm, for an unknown reason <marquee> doesn't work for me in puppybrowser-1.1-lucid.pet
On the other hand it works in, eg. this version: http://dotpups.de/files/puppybrowser-te ... ws_412.sfs
...but this one has only width/height parameters, no X/Y and -profile.
BTW, I'm using Lupu-528.004

Anyway, my /root/.PuppyBrowser/profiles/fullscreen/settings.rc looks like this now:

Code: Select all

always_show_tabs=0
show_bookmarks=0
show_status=0
show_urlbar=0
use_tabs=0
show_no_bars=1
start_fullscreen=0
...and this code displays resized, widgetless (but still decorated) PuppyBrowser-1.1's window in the bottom-right corner of the screen, independently of current screen resolution:

Code: Select all

#!/bin/sh

WIDTH=500
HEIGHT=80
MESSAGE="     We're almost there... "

# Determine current screen resolution

RES=$(xrandr | grep "current" | cut -d 'c' -f1,3 | tr -cd 'x [:digit:]' | cut -d 'x' -f1,2)
MAXX=$(echo $RES | cut -d 'x' -f1,1)
MAXY=$(echo $RES | cut -d 'x' -f2,3)

X=$(($MAXX-$WIDTH))
Y=$(($MAXY-$HEIGHT))

# seaside's tweaked routine

echo '
<html> 
  <font size="+4" face="DejaVu Sans"  color=red>
    <marquee scrollamount="4" scrolldelay="50">'"$MESSAGE"'</marquee>
  </font>
</html>' >/tmp/banner.html 

/usr/local/PuppyBrowser/puppy-browser /tmp/banner.html -title="PNN" -profile=fullscreen -x=$X -y=$Y -w=$WIDTH -h=$HEIGHT
Greetings!
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

#14 Post by seaside »

SFR wrote: ...and this code displays resized, widgetless (but still decorated) PuppyBrowser-1.1's window in the bottom-right corner of the screen, independently of current screen resolution:

Code: Select all

#!/bin/sh

WIDTH=500
HEIGHT=80
MESSAGE="     We're almost there... "

# Determine current screen resolution

RES=$(xrandr | grep "current" | cut -d 'c' -f1,3 | tr -cd 'x [:digit:]' | cut -d 'x' -f1,2)
MAXX=$(echo $RES | cut -d 'x' -f1,1)
MAXY=$(echo $RES | cut -d 'x' -f2,3)

X=$(($MAXX-$WIDTH))
Y=$(($MAXY-$HEIGHT))

# seaside's tweaked routine

echo '
<html> 
  <font size="+4" face="DejaVu Sans"  color=red>
    <marquee scrollamount="4" scrolldelay="50">'"$MESSAGE"'</marquee>
  </font>
</html>' >/tmp/banner.html 

/usr/local/PuppyBrowser/puppy-browser /tmp/banner.html -title="PNN" -profile=fullscreen -x=$X -y=$Y -w=$WIDTH -h=$HEIGHT
Greetings!
SFR,

Your code on puppy 431 shows up in the upper left hand corner (and ignores xy coordinates). It is fullscreen (without decorations) at the WH size.

The version for pup 431 is "puppybrowser-0.5.1-1-pup4".

It seems there are a few variations around :)

Regards,
s
EDIT: I noticed that your /fullscreen/settings.rc has "start_fullscreen=0". Perhaps "start_fullscreen=1" might work.

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#15 Post by SFR »

What a mess with those PuppyBrowsers, indeed. :lol:
It was so close...

"start-fullscreen=1" was by default and I've change it to "...=0" to disable fullscreen, but in your version might be inversely.
Lobster wrote:OK better go find some C code 8)
I found this snippet in C (?). It's about GTK#, but might be useful for someone.
Personally I've no idea what to do with that code...

Greetings!
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

#16 Post by seaside »

One more try.....

/root/.PuppyBrowser/profiles/flashviewer/settings.rc

Code: Select all

always_show_tabs=0
show_bookmarks=0
show_status=0
show_urlbar=0
use_tabs=0
show_no_bars=1
start_fullscreen=0

Code: Select all

#!/bin/sh
#marquee scroller using PuppyBrowser

#setup notitle, noborder, ontop

sed -i 's|</JWM>||' /root/.jwm/jwmrc-personal

echo '<Group>
<Name>puppybrowser-nodec</Name>
<Option>layer:12</Option>
<Option>noborder</Option>
<Option>notitle</Option>
</Group>

</JWM>' >>/root/.jwm/jwmrc-personal

jwm -restart

#setup PuppyBrowser link to allow normal call

ln -s /usr/local/PuppyBrowser/PuppyBrowser /usr/bin/puppybrowser-nodec

#start marquee

WIDTH=500
HEIGHT=80
MESSAGE="     This looks promising... "

# Determine current screen resolution

RES=$(xrandr | grep "current" | cut -d 'c' -f1,3 | tr -cd 'x [:digit:]' | cut -d 'x' -f1,2)
MAXX=$(echo $RES | cut -d 'x' -f1,1)
MAXY=$(echo $RES | cut -d 'x' -f2,3)

X=$(($MAXX-$WIDTH))
Y=$(($MAXY-$HEIGHT))

# seaside's tweaked routine

echo '
<html>
  <font size="+4" face="DejaVu Sans"  color=red>
    <marquee scrollamount="4" scrolldelay="50">'"$MESSAGE"'</marquee>
  </font>
</html>' >/tmp/banner.html

#/usr/local/PuppyBrowser/puppy-browser /tmp/banner.html -title="PNN" -profile=fullscreen -x=$X -y=$Y -w=$WIDTH -h=$HEIGHT

puppybrowser-nodec /tmp/banner.html -profile=flashviewer -x=$(($X/2)) -y=$(($Y/2)) -w=$WIDTH -h=$HEIGHT 
The xy coordinates were halved and it shows up around center on my screen.

Regards,
s

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#17 Post by Lobster »

Personally I've no idea what to do with that code...
you need the devx
put the code in test.c
you need code to open a gtk window. Dunno how to
do that and not gonna search

so far:

Code: Select all

# gcc test.c -o test && ./test
test.c:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'partial'
Last edited by Lobster on Sun 05 Feb 2012, 15:36, edited 1 time in total.
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#18 Post by SFR »

@Lobster:
This C... :roll:
I found another one (third listing, seems to be complete), but I'm getting:
test.c:1:24: error: ./gtk/gtk.h: No such file or directory
I have all these header files in '/usr/include/gtk-2.0' and in folder where 'test.c' is, but doesn't work...
Nevermind...maybe not today, not for a week, not for a month, but sooner or later I'll do it! :twisted:

@seaside:
I was unable to run your code, unfortunately...
I tried to install puppybrowser-0.5.1-1-pup4.pet (+ an older version of Seamonkey, which is required, AFAIK),
but after 15 min. of symlinking, I've got "segmentation fault" in reward. :lol:

Greetings!
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#19 Post by SFR »

Ok, my final attempt to achieve good-looking scroll in GtkDialog.
This time I used Zigbert's routine from GtkDialog-Tips thread, to get monospace font in <entry><input> field.
(I don't know how, but it works. :) )

Details in code itself...

Code: Select all

#!/bin/sh

# =========================================
# Scroller - The Final Frontier by SFR'2012
# =========================================

# Tweakable parameters

MESSAGE="Maybe this one..? Thanks to Zigbert's routine it looks pretty decent."
WIDTH=320	# Window width
HEIGHT=35	# Window height
SPEED=0.2	# This parameter accepts even "0.01", but CPU dies then...
POSX=2		# 0 = left, 1 = center, 2 = right
POSY=2		# 0 = top,  1 = center, 2 = bottom
# =============================================================================

# Setting up everything

export SPEED

CHARWIDTH=$(($WIDTH/8))
export CHARWIDTH

# Adding spaces in front of the message

for i in `seq 0 $CHARWIDTH`; do
 MESSAGE=" "$MESSAGE
done

# Using temp files to keep the message and current text position

echo "$MESSAGE" > /tmp/scroll_text
echo > /tmp/scroll_var

# Determine current screen resolution and set up X and Y

RES=$(xrandr | grep "current" | cut -d 'c' -f1,3 | tr -cd 'x [:digit:]' | cut -d 'x' -f1,2)
MAXX=$(echo $RES | cut -d 'x' -f1,1)
MAXY=$(echo $RES | cut -d 'x' -f2,3)

case "$POSX" in
  0) X=0 ;;
  1) X=$((($MAXX/2)-($WIDTH/2))) ;;
  2) X=$(($MAXX-$WIDTH)) ;;
  *) X=$((($MAXX/2)-($WIDTH/2))) ;;
esac

case "$POSY" in
  0) Y=0 ;;
  1) Y=$((($MAXY/2)-($HEIGHT/2))) ;;
  2) Y=$(($MAXY-$HEIGHT)) ;;
  *) Y=$((($MAXY/2)-($HEIGHT/2))) ;;
esac


# Zigbert's routine to achieve monospace font.
# Source: OP in http://www.murga-linux.com/puppy/viewtopic.php?t=38608

echo 'style "specialmono"
{
  font_name="Mono 12"
}
widget "*mono" style "specialmono"
class "GtkText*" style "specialmono"' > /tmp/gtkrc_mono
export GTK2_RC_FILES=/tmp/gtkrc_mono:/root/.gtkrc-2.0
# =============================================================================

# Main scroll function

scroll () {
GET=$(cat /tmp/scroll_text)
POS=$(cat /tmp/scroll_var)
LEN=${#GET}

TEXT=${GET:$POS:$CHARWIDTH}
POS=$(($POS+1))
if [ "$POS" == "$LEN" ]; then POS=0; fi
echo $POS > /tmp/scroll_var
echo "$TEXT"
}
export -f scroll

# Gtkdialog structure

export MAIN='
<window title="Puppy News Network" allow-grow="false">
    <vbox>
    <progressbar visible="false">
      <input>while [ A = A ]; do sleep $SPEED; echo 99; echo 100; done</input>
      <action>refresh:SCROLL</action>
    </progressbar>
    
    <entry name=\"mono"\ sensitive="true">
      <variable>SCROLL</variable>
      <input>scroll</input>
    </entry>
    </vbox>
</window>
'

# Ok, let's begin!

gtkdialog -G "$WIDTH"x"$HEIGHT"+$X+$Y -p MAIN

# Cleaning, cleaning...

rm -f /tmp/scroll_text
rm -f /tmp/scroll_var
unset CHARWIDTH
unset SPEED
unset MAIN
unset scroll

# This part is to kill 'broken pipe' or whatever it is...
# To see what I mean, comment the following lines, launch the code in Terminal,
# and close the application's window (but not Terminal).
# If you know better way to do it, change the code please :)

TEST=`ps | grep while | grep sleep | grep done | cut -d"r" -f 1`
kill $TEST
exit

# THE END
Greetings!
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

#20 Post by vovchik »

Dear puppians,

That source seems to be C#, which is not c++ or C. You need Mono, and that ain't a part of any normal devx.

With kind regards,
vovchik

Post Reply