Merci, le script marche tres bien et il bien mieux que ceux que j utilisais pour d autre fil rss , je vais pour le transposé sur les autre
Salut, et bienvenue.
Essaye ce script :
Pour afficher plus de news, il faut augmenter la valeur en 4ème ligne par pallier de 2.Bloc de code:URL="http://www.lemonde.fr/rss/une.xml" maxLength="800" start="3" end="2" curl --silent "$URL" | sed -e :a -e '$!N;s/\n//;ta' | sed -e 's/<title>/\ <title>/g' | sed -e 's/<\/title>/<\/title>\ /g' | sed -e 's/<description>/\ <description>/g' | sed -e 's/<\/description>/<\/description>\ /g' | grep -E '(title>|description>)' | sed -n "$start,$"'p' | sed -e 's/<title>//' | sed -e 's/<\/title>//' | sed -e 's/<description>/ /' | sed -e 's/<\/description>//' | sed -e 's/<!\[CDATA\[//g' | sed -e 's/\]\]>//g' | sed -e 's/</</g' | sed -e 's/>/>/g' | sed -e 's/<[^>]*>//g' | cut -c 1-$maxLength | head -$end | sed G | fmt
- 1 news : end="2"
- 2 news : end="4"
- 3 news : end="6"
... etc
Amuse toi bien.
P.S : moins de smileys dans les messages s'te plaît.
P.S 2 : wath ... pas what
http://www.macosxtips.co.uk/geeklets/messaging/visual-or-audio-unread-email-message/
Le premier script, Visual.
http://www.macosxtips.co.uk/geeklets/messaging/visual-or-audio-unread-email-message/
Le premier script, Visual.
Visual :
*****************************************************************
tell application "System Events"
if exists process "Mail" then
try
tell application "Mail"
set unreadCount to unread count of inbox
if (unreadCount is equal to 1) then
set the_sender to get the sender of (messages of inbox whose read status is false) as string
set name_senders to extract name from the_sender
return "There is a new message from " & name_senders
else
if (unreadCount is greater than 1) then
set the_sender to get the sender of (messages of inbox whose read status is false) as string
set name_senders to extract name from the_sender
return "There is " & (unreadCount as string) & " new messages"
end if
end if
end tell
end try
end if
end tell
*****************************************************************
Audio :
*****************************************************************
tell application "System Events"
if exists process "Mail" then
try
tell application "Mail"
set unreadCount to unread count of inbox
if unreadCount is equal to 1 then
set the_sender to get the sender of (messages of inbox whose read status is false) as string
set name_senders to extract name from the_sender
say "you have a new mail from " & name_senders
else
if unreadCount is greater than 1 then
say "you have " & unreadCount & " new mails "
end if
end if
end tell
end try
end if
end tell
*****************************************************************
Ouvre l'éditeur de script, puis colle le code.
Ensuite tu enregistres ça quelque part sur ton DD.
Par exemple chez moi, j'ai un dossier Scripts dans Documents.
Donc je crée un nouveau shell et je colle: osascript /Users/wath/Documents/Scripts/Mailscript.scpt