S
svenson1
Aktives Mitglied
Thread Starter
- Dabei seit
- 18.07.2007
- Beiträge
- 111
- Reaktionspunkte
- 12
ich habe es ;-)
Mit dieser grep-Option steht in myURL genau der FTP-Link drin. Aber ein Download findet noch nicht statt. Wenn ich die Zeile in die Zwischenablage kopiere und im Terminal einfüge rennt der Download sofort los. Was kann da noch falsch sein?
Code:
using terms from application "Mail"
on perform mail action with messages theMessages for rule theRule
repeat with eachMessage in theMessages
tell application "Mail"
set this_subject to subject of eachMessage
set this_body to content of eachMessage
#display dialog this_subject
#display dialog this_body
#say 1
#set myURL to paragraph 5 of this_body # variante 1
set myURL to do shell script "echo " & quoted form of this_body & " | grep -iom 1 'ftp:.*zip'" # variante 2
#display dialog myURL
do shell script "wget -p ~/Downloads " & myURL
#say 2
end tell
end repeat
end perform mail action with messages
end using terms from
Mit dieser grep-Option steht in myURL genau der FTP-Link drin. Aber ein Download findet noch nicht statt. Wenn ich die Zeile in die Zwischenablage kopiere und im Terminal einfüge rennt der Download sofort los. Was kann da noch falsch sein?