• 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
ARD Applescript Help
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ARD Applescript Help


  • Subject: ARD Applescript Help
  • From: David Rocamora <email@hidden>
  • Date: Tue, 13 Jun 2006 14:57:33 -0400
  • Thread-topic: ARD Applescript Help

Hello everyone. I'm trying to write what I would  think is a simple
applescript (and I bet it is!) but I'm having trouble getting my head around
some of the subtleties of Applescript.

I would like to create a script that will execute a unix command on a group
of computers via ARD. The command determines the netboot server that booted
the machine. I would like the script to place the computers in groups that
have the same name as the output of the command (the netboot server
hostname).

Here is what I have so far:

tell application "Remote Desktop"
    set myNetBootList to computer list "test"

    set aNewTask to make new send unix command task with properties
{name:"Which Netboot Server", user:"adminx", showing output:true,
script:"netstat -W | grep 2049 | awk {'print $5'} | sed
's/\\(.*\\)\\(\\.2049\\)/\\1/'"}

    set myCommandResults to execute aNewTask on myNetBootList

    set stati to |computerStatuses| of myCommandResults
    repeat with aResult in stati

        set thisServer to results of aResult
        set thisId to |id| of aResult
        set thisComputer to computer id thisId

        if thisServer is in {"Offline", "Not supported", "No console user"}
then
            set thisServer to "Unknown NetBoot Server"
        end if

        add thisComputer to computer list thisServer
    end repeat
end tell

My problem is that the variable thisServer contains "servername" with the
quotes. I need to have it without the quotes.

Is there an easy way to remove the quotes? Am I doing this totally
backwards?

Thanks in advance!

David Rocamora Systems Administrator






This message is the property of R/GA and contains information which may be privileged or confidential. It is meant only for the intended recipients and/or their authorized agents. If you believe you have received this message in error, please notify us immediately by return e-mail or by forwarding this message to email@hidden, and destroy any printed or electronic copies of the message. Any unauthorized use, dissemination, disclosure, or copying of this message or the information contained in it, is strictly prohibited and may be unlawful. Thank you.
 _______________________________________________
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

  • Prev by Date: Re: Photoshop CS2 overall scriptability
  • Next by Date: Re: ARD Applescript Help
  • Previous by thread: Adobe Illustrator Script Menu
  • Next by thread: Re: ARD Applescript Help
  • Index(es):
    • Date
    • Thread