Skrevs ursprungligen av macgunde
Jag testade ändra lite, men fick det inte att funka...
Om du flyttar parentesen från den andra till den första söksträngen så hämtas ditt externa IP från <http://checkip.dyndns.org/> istället
då kommer det att funka...
så här...
(*-- hämtar aktuellt IP mha ifconfig
set myip to ¬
do shell script "ifconfig | grep 'broadcast' | awk '{print $2}'"*)
--alternativ IP-hämtning:
set myip to characters 1 thru -2 of (words 31 thru 32 of ¬
((do shell script "curl http://checkip.dyndns.org/ ") ¬
as international text) as text) as text
tell application "Mail"
-- titel på mailet:
set theTitle to "Min delade musik!"
-- Mailets innehåll:
set theText to "Klicka på
daap://" & myip & "
(Kräver iTunes4)
"
set accountAddresses to (email addresses of first account)
set fromAddress to first item of accountAddresses
set theMessage to make new outgoing message
set visible of theMessage to true
set subject of theMessage to theTitle
set content of theMessage to theText
activate
end tell
Lycka till
/Teeway
(edit) ändrade mellan första och andra söksträngen...virr virr