Re: Which computer type
Re: Which computer type
- Subject: Re: Which computer type
- From: Chris Espinosa <email@hidden>
- Date: Wed, 27 Mar 2002 12:02:34 -0800
I was afraid of that. This is checking whether it has an internal
display; I don't know why your B & W G3 says it does (I tested it on a
G4 tower, a G4 powerbook, and a G4 iMac).
There's no system attribute specifically for whether it's portable or
not. You could perhps check for machine type (though the list is long)
or keyboard type (shorter, but doesn't work if an external keyboard is
attached):
(system attribute "kbd ") is in {12, 13, 20, 21, 24, 28, 29, 30, 195,
196, 197, 201, 202, 203, 207}
A guide to what system attributes you can check and what values to look
for is at
http://developer.apple.com/techpubs/macosx/Carbon/oss/GestaltManager/Gestalt_Manager/
Functions/FunctionGroups.html
Chris
On Wednesday, March 27, 2002, at 11:47 AM, Rob Morton wrote:
>
Well, I am not entirely sure what that is suppose to find. I did a
>
display
>
dialog (computer "idsb") inside of a tell block. So far all the
>
machines I
>
have tried return -1 (iMac, G3 PowerBook, Ti PowerBook and B&W G3). The
>
actual use is to determine if it is a QuickSilver or a Ti PowerBook.
>
Currently it will be while running OS 9, but at some point in the not
>
too
>
distant future for OS X. Is there somewhere that I can see a list of all
>
System Attributes? For that matter, what is this checking for anyway?
>
>
Thanks,
>
Rob Morton
>
>
>
on 3/27/02 1:18 PM, Chris Espinosa at email@hidden wrote:
>
>
> On Tuesday, March 26, 2002, at 10:03 PM, Rob Morton
>
> <email@hidden> wrote:
>
>
>
>> I am trying to figure out if a computer is a desktop or a laptop.
>
>> Seems
>
>> easy
>
>> enough, but I am just not having any luck. Any suggestions?
>
>
>
> Two ways: you could ask Apple System Profiler (which is time-consuming
>
> but more accurate) or use the "system attribute" command:
>
>
>
> (system attribute "idsp") is -1
>
>
>
> On Mac OS 9 and earlier, substitute 'computer' for 'system attribute'
>
> and put this in a Finder tell block.
>
>
>
> Chris Espinosa
>
> Apple
_______________________________________________
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.