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

Re: System Info oddity


  • Subject: Re: System Info oddity
  • From: Axel Luttgens <email@hidden>
  • Date: Tue, 9 Jun 2009 17:57:31 +0200

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"'?



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?

Just a guess... ;-)
Axel _______________________________________________
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: Yvan KOENIG <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>)
 >System Info oddity (From: Yvan KOENIG <email@hidden>)

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