• 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: Basic: scripting OS X System Profiler
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Basic: scripting OS X System Profiler


  • Subject: Re: Basic: scripting OS X System Profiler
  • From: steve harley <email@hidden>
  • Date: Wed, 10 Mar 2004 15:00:56 -0700

on 10 Mar 2004, at 11:12 AM, Chap Harrison wrote:
I am still confused about figuring out what can be scripted in a given application .

I want to script the System Profiler in OS X 10.3. So I opened its dictionary in Script Editor. Aside from the Standard Suite and the Text Suite, which didn't have anything specific to System Profiler, there was System Profiler suite. Within its two classes were a couple of properties named 'profile' and 'system profiler'.

That's it. I did a script to "get system profile" and it gave me the hardware overview.

So I'm thinking - is that it? Are there any other nouns? What if I want to obtain the "Get Info String" for the AppleMesh kernel extension? Network details? What if I want all the information that the System Profiler could possibly give me?


take a look at the man page for the system_profiler shell command -- it can spit out excruciating detail in XML format.. one drawback to executing it from AppleScript is that the command may generate a lot of noise on stderr, which will get mixed in with stdout in the AppleScript result.. so i would direct stdout to a file and then process the file contents with something like Late Night's XML Tools
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Basic: scripting OS X System Profiler
      • From: Chap Harrison <email@hidden>
References: 
 >Basic: scripting OS X System Profiler (From: Chap Harrison <email@hidden>)

  • Prev by Date: Reply to 'New to AS... What am I doing wrong? (CP)'
  • Next by Date: Re: Ignoring responses from "do shell script"
  • Previous by thread: Re: Basic: scripting OS X System Profiler
  • Next by thread: Re: Basic: scripting OS X System Profiler
  • Index(es):
    • Date
    • Thread