Oh well that works too lol, i used the variable because it was a part of my other script,
tell application "System Events"
tell application "Mail"
activate
set myEmail to text returned of (display dialog "To: " default answer "")
set myIPAddress to (do shell script "curl checkip.dyndns.org")
set newMessage to make new outgoing message with properties {subject:"IP Address", content:"My IP Address Is: " & result, visible:false}
tell newMessage
make new to recipient at end of every to recipient with properties {address:myEmail}
delay 0
send
display dialog "Your IP Address Is: " & word 25 of myIPAddress
end tell
end tell
end tell
Model: Macbook Pro
AppleScript: Version 2.3 (118)
Browser: Firefox 9.0.1
Operating System: Mac OS X (10.6)
set macInfo to system info
set macName to computer name of macInfo
set macIpAddress to IPv4 address of macInfo
set username to long user name of macInfo
set AppleScript's text item delimiters to {"Domain Name:"}
try (* get rid of unavailable domain *)
set macDomainName to paragraph 1 of text item 2 of networkInfo
on error
set macDomainName to "unknown"
end try
set AppleScript's text item delimiters to {" "}
set userInfo to {}
set the end of userInfo to {"Computer Name: ", macName} as text
set the end of userInfo to {"User Name: ", username} as text
set AppleScript's text item delimiters to return & return
set theIP to do shell script "ifconfig | grep 'broadcast' | awk '{print $2}'"
try
set ip1 to first paragraph of theIP
on error
set ip1 to ""
end try
try
set ip2 to second paragraph of theIP
on error
set ip2 to ""
end try
try
if ip1 = "" and ip2 = "" then
display dialog (userInfo as text) & return & return & "You do not seem to be connected to any network.Please connect your computer to a network and try again."
else
display dialog (userInfo as text) & return & return & "Primary IP : " & ip1 & return & return & "Secondary IP : " & ip2
end if
end try
Model: Mac Mini & Mac Book Pro
AppleScript: 2.4.1
Operating System: Mac OS X (10.7)