Hi,
I’m pretty new at AppleScript. I was hoping to get some help on trying to get a 10X MAC’s copmuter name or Rendezvous Name. I have tried using the GUI scriping but have not managed to get it working,
If anyone has an idea of doing this, I’d appreciate it.
This isn’t my code but it seems to work well. I’m sorry that I don’t recall who provided it (maybe Greggo??).
-- Get Rendezvous Name --
set rendezvousName to do shell script "echo $HOSTNAME"
display dialog "Rendezvous Name: " & rendezvousName
-- Get Computer Name --
set the_host to do shell script "grep APPLETALK_HOSTNAME /etc/hostconfig"
try
set old_delims to AppleScript's text item delimiters
set AppleScript's text item delimiters to "="
set the_name to the second text item of the_host
set AppleScript's text item delimiters to old_delims
on error
set AppleScript's text item delimiters to old_delims
end try
display dialog "Computer Name: " & the_name
Rob,
Thanks for the quick response. The Rendezvous name works perfect. when I run the computer name script, I get an execution error type 1. Would you know what this is ?