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)