View Single Post
Whispering Weasel's Avatar
Posts: 54 | Thanked: 89 times | Joined on May 2011 @ Vlaardingen, Netherlands
#1388
Thanks, it is almost working now, I had issues with wget due to @ in the password, solved it..
Now it is only displaying the mailbox_empty.png but it does update the mailcount, simply pasting the command in the script doesn't let it return the correct state?
My programming skills are ehm.. at noob level so i got this far:

PHP Code:
if [ "$QBW_EXEC_REASON== "QBW_TIMER_UPDATE" ]; then
# get the new mail info
wget -t 1 -T 3 ---user=myusername --password=myp@ssword -'https://mail.google.com/mail/feed/atom' --no-check-certificate awk 'BEGIN{m=2}/<fullcount>.+<\/fullcount>/{gsub(/<[^>]*>/,"",$0);print $1 " New";if($1>0)m=1;else m=0}END{exit m}'
fi;

if [ 
"$QBW_EXEC_REASON== "QBW_CLICK" ]; then
# start claws-mail 
/usr/bin/dbus-send --dest=com.nokia.HildonDesktop.AppMgr /com/nokia/HildonDesktop/AppMgr com.nokia.HildonDesktop.AppMgr.LaunchApplication string:claws-mail
fi

__________________
Weaseling out of things is important to learn ! It's what separates us from the animals,
... except the weasel. (Homer Simpson)
 

The Following User Says Thank You to Whispering Weasel For This Useful Post: