it dosen't work correctly.
you might want to try it out your self.
running it from the command prompt works as it should, displaying the dialogue and everything. But setting the file to open with "/Applications/Utilities/Launcher" works but dosen't display the results correctly.
i wrote this script in a hurry though,, not sure if the syntax is correct. (but i'm sure it prints out the right results, in the terminal al least.)
<layer z-index=2><font size=2 face="courier"><hr>#!/usr/bin/perl<br><br>use warnings;<br>use strict;<br><br>our $query = system("wget -q -O /dev/stdout 'http://checkip.dyndns.org/'");<br><br>our ($extIP) = $query =~ /.*Current IP Address.+?(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}).*/i;<br> chomp $extIP;<br> <br>our ($hostname) = $query =~ /.*hostname:.(.*)/i;<br> chomp $hostname;<br><br>our $localhostname = `hostname`;<br> chomp $localhostname;<br> <br>our $intIP = `ipconfig getifaddr en0`;<br> chomp $intIP;<br><br>our $result = <<"__END__";<br><br>Dynamic Hostname : $hostname<br>Local Hostname : $localhostname<br>External IP address : $extIP<br>Internal IP address : $intIP<br><br>__END__<br><br>print $result;<br><br>our $value = `osascript -e 'tell app "Finder" \n activate \n set value to "$result" \n display dialog value buttons "Ok" \n end tell'`;<br><br>#print $value;<hr></font></layer>
you might want to try it out your self.
running it from the command prompt works as it should, displaying the dialogue and everything. But setting the file to open with "/Applications/Utilities/Launcher" works but dosen't display the results correctly.
i wrote this script in a hurry though,, not sure if the syntax is correct. (but i'm sure it prints out the right results, in the terminal al least.)
<layer z-index=2><font size=2 face="courier"><hr>#!/usr/bin/perl<br><br>use warnings;<br>use strict;<br><br>our $query = system("wget -q -O /dev/stdout 'http://checkip.dyndns.org/'");<br><br>our ($extIP) = $query =~ /.*Current IP Address.+?(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}).*/i;<br> chomp $extIP;<br> <br>our ($hostname) = $query =~ /.*hostname:.(.*)/i;<br> chomp $hostname;<br><br>our $localhostname = `hostname`;<br> chomp $localhostname;<br> <br>our $intIP = `ipconfig getifaddr en0`;<br> chomp $intIP;<br><br>our $result = <<"__END__";<br><br>Dynamic Hostname : $hostname<br>Local Hostname : $localhostname<br>External IP address : $extIP<br>Internal IP address : $intIP<br><br>__END__<br><br>print $result;<br><br>our $value = `osascript -e 'tell app "Finder" \n activate \n set value to "$result" \n display dialog value buttons "Ok" \n end tell'`;<br><br>#print $value;<hr></font></layer>