• 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: Chap Harrison <email@hidden>
  • Date: Wed, 10 Mar 2004 22:15:47 -0600

Thanks Andrew and Steve, for the help. Somewhere I thought I had read you could ask SysProfiler for specific things but apparently not - that's fine, I can parse what I need from an XML dump.
Appreciate your help,
Chap

On Mar 10, 2004, at 4:00 PM, steve harley wrote:

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.


References: 
 >Basic: scripting OS X System Profiler (From: Chap Harrison <email@hidden>)
 >Re: Basic: scripting OS X System Profiler (From: steve harley <email@hidden>)

  • Prev by Date: Re: do visual basic
  • Next by Date: Reverse Offset (was Getting the Folder name when using drag-&-drop Scripts)
  • Previous by thread: Re: Basic: scripting OS X System Profiler
  • Next by thread: Number stuff revisited
  • Index(es):
    • Date
    • Thread