Get IP address of remote machine

Hi
I’m working in a LAN based environment where the clients are all picking up IP addresses via a DHCP server. Is there a way to find out what a remote computer’s IP address is over AppleTalk so that I can then use this IP address to transfer files over IP rather than using AppleTalk, which doesn’t have error checking.
I’ve tried various things such as Network Scripting Additons, but I’ve only be able to get network information for my MY Mac rather than the REMOTE Mac.
We’re also using Timbuktu - I was wondering if there was a way to script Timbuktu so that I could discover the remote machine via it’s AppleTalk name but actually transfer files over IP…
Any ideas?

: Hi

: I’m working in a LAN based environment where the clients are all picking up
: IP addresses via a DHCP server. Is there a way to find out what a remote
: computer’s IP address is over AppleTalk so that I can then use this IP
: address to transfer files over IP rather than using AppleTalk, which
: doesn’t have error checking.

: I’ve tried various things such as Network Scripting Additons, but I’ve only
: be able to get network information for my MY Mac rather than the REMOTE
: Mac.

This might work; when ever I have trouble scripting a remote machine, I use an stay-open applet to execute a script.

[b:000]on[/b:000] networkRun(theScript) run script theScript [b:000]end[/b:000] networkRun

I save that as a StayOpen applet called “NetScript” and put it in the Startup folder. Then, the script that gets the net info you need can be passed to the networkRun handler:

[b:000]tell[/b:000] application "NetScript" [b:000]of[/b:000] machine "RemoteMachineName" networkRun(getIP) [b:000]end tell[/b:000] [b:000]script[/b:000] getIP [b:000]tell me[/b:000] activate display dialog "Hi" giving up after 5 [b:000]end tell[/b:000] [b:000]return[/b:000] "testing, testing...is this thing on?" [b:000]end script[/b:000]

Of course, the script ‘getIP’ should be your script that fetches and returns info from Network Setup instead of displaying a dialog and returning a text string. Something to watch out for, on older OS’s, a ‘tell application "…’ will stop and display a dialog on the remote machine asking for the location of the application, so if it does that you’ll have to use a double-tell or tell-by-variable method.

: This might work; when ever I have trouble scripting a remote machine, I use
: an stay-open applet to execute a script.
:

  on  networkRun(theScript)
: run script theScript
: end networkRun

: I save that as a StayOpen applet called “NetScript” and put it in
: the Startup folder. Then, the script that gets the net info you need can
: be passed to the networkRun handler:
  tell  application
: “NetScript” of machine “RemoteMachineName”
: networkRun(getIP)
: end tell
: script getIP
: tell me
: activate
: display dialog “Hi”
: giving up after 5
: end tell
: return “testing, testing…is this thing
: on?”
: end script

: Of course, the script ‘getIP’ should be your script that fetches and returns
: info from Network Setup instead of displaying a dialog and returning a
: text string. Something to watch out for, on older OS’s, a ‘tell
: application "…’ will stop and display a dialog on the remote
: machine asking for the location of the application, so if it does that
: you’ll have to use a double-tell or tell-by-variable method.

Cheers Kirk…I’ll try this out…it certainly looks promising…not quite sure how “tell-by-variable” or “double-tell” works…in the past I’ve used an application’s creator code as a means of getting around the asking for the location of the app with varying degrees of success - thanks again

Andy

: Cheers Kirk…I’ll try this out…it certainly looks promising…not quite
: sure how “tell-by-variable” or “double-tell”
: works…in the past I’ve used an application’s creator code as a means of
: getting around the asking for the location of the app with varying degrees
: of success - thanks again
: Andy
Tell By Variable in Bill Cheeseman’s AppleScript Sourcebook explains the double-tell, but tell by creator code works, too. The double-tell uses a nested tell (to a variable of the application; path or process), and compiles the target application’s terms using the literal tell. Usually works. I’ve also just discoverd that I can grab an application’s path using the creator code, and to get the terms of the script to compile without a literal tell around the variable tell I use Smile to tranlate all the keywords and commands that require a literal tell into raw events. Working good so far…

: Tell By Variable in Bill Cheeseman’s AppleScript Sourcebook explains the
: double-tell, but tell by creator code works, too. The double-tell uses a
: nested tell (to a variable of the application; path or process), and
: compiles the target application’s terms using the literal tell. Usually
: works. I’ve also just discoverd that I can grab an application’s path
: using the creator code, and to get the terms of the script to compile
: without a literal tell around the variable tell I use Smile to tranlate
: all the keywords and commands that require a literal tell into raw events.
: Working good so far…
Ah…! Suddenly it becomes clear - thanks again.