• 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
System Info oddity
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

System Info oddity


  • Subject: System Info oddity
  • From: Yvan KOENIG <email@hidden>
  • Date: Tue, 9 Jun 2009 17:30:49 +0200

System Info oddity.

Trying to help an asker, I have to identify the machine on which one script is used.

I use this code:

set intelInside to CPU type of (system info) contains "Intel"

On my G5 (PowerPC 970) it behaves well.
On my Imac (Intel 80486) it behaves well.

Alas, on the askers imac, it fails with this log report:

tell application "System Events"
choose folder
alias "iMac HD:Users:rrrrr:Desktop:Test:"
get UI elements enabled
true
end tell
tell current application
system info
{AppleScript version:"1.10.7", AppleScript Studio version:"1.4.1", system version:"10.4.11", short user name:"rrrrr", long user name:"RRRRR XXXXX", user ID:501, user locale:"en_GB", home directory:alias "iMac HD:Users:rrrrr:", boot volume:"iMac HD", computer name:"imac", host name:"imac.local", IPv4 address:"*****", primary Ethernet address:"*****", CPU type:"PowerPC 7450", CPU speed:1249, physical memory:1024}
"Can't get CPU type of {AppleScript version:\"1.10.7\", AppleScript Studio version:\"1.4.1\", system version:\"10.4.11\", short user name:\"rrrrr\", long user name:\"RRRRR XXXXX\", user ID:501, user locale:\"en_GB\", home directory:alias \"iMac HD:Users:rrrrr:\", boot volume:\"iMac HD\", computer name:\"imac\", host name:\"imac.local\", IPv4 address:\"*****\", primary Ethernet address:\"*****\", CPU type:\"PowerPC 7450\", CPU speed:1249, physical memory:1024}."

So I'm forced to use this ugly workaround:

set maybe to (get system info)
log class of maybe
(* it's supposed to be a record *)
(* Here I will try an ugly workaround *)
set maybe to maybe as list
set CPUtype to item 14 of maybe
log CPUtype

It correctly claims that maybe is a record but can't extract the embedded property.
Happily I may grab it after an ugly coercion to list.

What may be the wrongdoer ?

Don't worry upon the foolish addresses, I dropped the true ones (it's not my own machine).

Yvan KOENIG (from FRANCE mardi 9 juin 2009 17:25:59)


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: System Info oddity
      • From: Axel Luttgens <email@hidden>
References: 
 >Re: Problem creating new mailbox (From: Mark Lawrence <email@hidden>)
 >Re: Problem creating new mailbox (From: Barry Wainwright <email@hidden>)
 >Re: Problem creating new mailbox (From: Mark Lawrence <email@hidden>)
 >Re: Problem creating new mailbox (From: Philip Aker <email@hidden>)

  • Prev by Date: Re: Mail's Sent Messages
  • Next by Date: Re: System Info oddity
  • Previous by thread: Re: Problem creating new mailbox
  • Next by thread: Re: System Info oddity
  • Index(es):
    • Date
    • Thread