• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Scripting Adding computers to a list in ARD
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scripting Adding computers to a list in ARD


  • Subject: Re: Scripting Adding computers to a list in ARD
  • From: "J. Stewart" <email@hidden>
  • Date: Wed, 23 Aug 2006 04:58:37 -0400

On 8/22/06 at -0400 Megan Mamalis said this

>Does someone have a handler to take a list of IP addresses and spit back a
>list of computer names? I’m not sure how to express the idea that I’m
>looking for the name property of the computer whose internet address
>property is xxx.xxx.xxx.xxx. Well, that could be expanded to any given
>property of any item whose other any given property is x.
>--

--> Cut <--
tell application "Remote Desktop"
	set cList to every computer in computer list "test"
	set eList to {}
	repeat with aComp in cList
		set end of eList to {Internet address of (contents of aComp), name of (contents of aComp)}
	end repeat
end tell
--> Cut <--

This returns a paired name, address listing of the computers on the list.

Given this, it's fairly simple to extract the names from the results of your existing script which already returns the address.

A simple loop like this one should be all you need -

--> Cut <--
repeat with j from 1 to count of eList
	if first item of item j of eList contains "192.168.1.2" then return second item of item j of eList
end repeat
--> Cut <--

JBS
--
Whatever happened to Preparations A through G? - George Carlin
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: Scripting Adding computers to a list in ARD (From: Megan Mamalis <email@hidden>)

  • Prev by Date: Re: Data from html table to excel
  • Next by Date: Re: Data from html table to excel
  • Previous by thread: Re: Scripting Adding computers to a list in ARD
  • Next by thread: Share information between two AppleScripts running on different boxes.
  • Index(es):
    • Date
    • Thread