"You stopped harvesting" notification script
2 posters
Page 1 of 1
"You stopped harvesting" notification script
Plays a sound whenever you stop harvesting.
- Code:
#!/bin/sh
tail -0f ~/.elc/main/chat_log.txt | \
while read; do
echo "== $REPLY"
case "$REPLY" in
*"You stopped harvesting"*)
echo "STOP"
# Install Xdialog and uncomment the line below if you want a popup displayed when you stop harvesting
# Xdialog --msgbox 'You stopped harvesting !' 0 0
mplayer ~/snd/thunder1.wav
;;
esac
done
Doggy- Posts : 122
Join date : 2009-05-03
Location : Paris area (France)
Re: "You stopped harvesting" notification script
I remember some versions of bash do not set $REPLY as default so you have to write:
while read REPLY
while read REPLY
boognish- Posts : 32
Join date : 2009-05-02
Age : 44
Location : Windy City
Re: "You stopped harvesting" notification script
Boog is right (but if your bash don't set $REPLY, you can install Debian and Debian's Bash will set it )
Modified code (not tested, but i don't anticipate any problem with that little change ) :
Modified code (not tested, but i don't anticipate any problem with that little change ) :
- Code:
#!/bin/sh
tail -0f ~/.elc/main/chat_log.txt | \
while read REPLY; do
echo "== $REPLY"
case "$REPLY" in
*"You stopped harvesting"*)
echo "STOP"
# Install Xdialog and uncomment the line below if you want a popup displayed when you stop harvesting
# Xdialog --msgbox 'You stopped harvesting !' 0 0
mplayer ~/snd/thunder1.wav
;;
esac
done
Doggy- Posts : 122
Join date : 2009-05-03
Location : Paris area (France)
Similar topics
» Harvesting closest to storage
» "News" from Annatira for who's interrested ...
» Radu's "Other" Project
» "News" from Annatira for who's interrested ...
» Radu's "Other" Project
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|