Re: System Info oddity
Re: System Info oddity
- Subject: Re: System Info oddity
- From: Yvan KOENIG <email@hidden>
- Date: Tue, 9 Jun 2009 18:27:16 +0200
Le 9 juin 2009 à 17:57, Axel Luttgens a écrit :
Le 9 juin 09 à 17:30, Yvan KOENIG a écrit :
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.
And here, on a PowerPC 7450 with 10.4.11, it works as expected...
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
Does the above really appear in the events log when just running
'set intelInside to CPU type of (system info) contains "Intel"'?
Oops, I left too much lines of the report.
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 ?
No non-standard scripting additions installed on that box?
Thanks for the track.
I will ask the original asker to send a list of the contents of
Scripting additions folders.
Yvan KOENIG (from FRANCE mardi 9 juin 2009 18:12:19)
_______________________________________________
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