Hi! i'm just taking my first steps into applescript
and i have the following script that displays my ip
to getInternalIP()
set the_interface to 0
repeat
set ip_internal to ""
try
set ip_internal to do shell script ("ipconfig getifaddr en" & the_interface)
end try
if ip_internal is not "" then exit repeat
set the_interface to the_interface + 1
if the_interface = 5 then
set ip_internal to " unknown "
exit repeat
end if
end repeat
return ip_internal
end getInternalIP
set myIP to getInternalIP()
display dialog "Your current IP is: " & myIP buttons "ok" default button "ok"
I wonder how can that be executed automatically when i obtain an ip
or
if there is a way to make my script executable. That's because when i double-click me file it opens the applescript editor first and then i hit "run".
Thank you and i'd appreciate any links to some tutorial or so for applescripting
and i have the following script that displays my ip
to getInternalIP()
set the_interface to 0
repeat
set ip_internal to ""
try
set ip_internal to do shell script ("ipconfig getifaddr en" & the_interface)
end try
if ip_internal is not "" then exit repeat
set the_interface to the_interface + 1
if the_interface = 5 then
set ip_internal to " unknown "
exit repeat
end if
end repeat
return ip_internal
end getInternalIP
set myIP to getInternalIP()
display dialog "Your current IP is: " & myIP buttons "ok" default button "ok"
I wonder how can that be executed automatically when i obtain an ip
or
if there is a way to make my script executable. That's because when i double-click me file it opens the applescript editor first and then i hit "run".
Thank you and i'd appreciate any links to some tutorial or so for applescripting