• 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: Axel Luttgens <email@hidden>
  • Date: Sun, 20 Aug 2006 16:21:42 +0200

On 18/08/06 23:13, Megan Mamalis wrote:

[...] but the “is equal to” statement never comes out true.

set myIP to "192.168.1.1"
set allcomps to the Internet address of every computer of computer list "All Computers"
repeat with thisIP in allcomps
if myIP is thisIP then
beep
end if
end repeat


Oddly enough, running “if myIP is in allcomps then...” comes out true

In "repeat with thisIP in allcomps", "thisIP" is set to references (item 1 of allcomps, item 2 of allcomps,... and so on).


On the other hand, the equality comparison operator takes the classes of its operands into account.
In this case, "myIP" is a string, while "thisIP" is a reference; as a result, they will always differ...


Try with this:

[...]
if myIP is contents of thisIP then
[...]

This should work (assuming the Internet address of a computer indeed is a string).

HTH,
Axel
_______________________________________________
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


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

  • Prev by Date: Re: New to the group
  • Next by Date: Re: Image Events
  • Previous by thread: Scripting Adding computers to a list in ARD
  • Next by thread: Re: Scripting Adding computers to a list in ARD
  • Index(es):
    • Date
    • Thread