Re: Apple system profiler
Re: Apple system profiler
- Subject: Re: Apple system profiler
- From: Jonathan Neff <email@hidden>
- Date: Tue, 7 Nov 2000 12:05:34 -0500 (EST)
Here's a more complete version of the script that you found. It might
give you some more insight into how it works. I'm sure there are better
ways to do this, but this way works for me. I've heard that this won't
work with OS 8.6, but I'm not sure about that. I am using 9.0.4
Good luck,
Jonathan
--- *********
tell application "HardDisk:Desktop Folder:Apple System Profiler"
make new report at beginning
repeat until gathering is false
end repeat
set macOSInfo to MacOS info
set memoryInfo to memory info
set ethernetinfo to network info
set productionInfo to production info
set hardwareInfo to hardware info
set finderVersion to finder version of macOSInfo
set systemVersion to system version of macOSInfo
set quicktimeVersion to QuickTime version of macOSInfo
set videoMemorySize to video memory size of memoryInfo
set VMInfo to VM info of memoryInfo
set VMSize to VM size of memoryInfo
set physicalRAM to physical RAM size of memoryInfo
set diskCache to memory cache size of memoryInfo
set logicBdNum to logicboard num of hardwareInfo
set ratedSpeed to rated speed of hardwareInfo
set modelName to model name of hardwareInfo
set keyboardType to keyboard type of hardwareInfo
set processorType to processor type of hardwareInfo
set processorsLocal to processors of hardwareInfo
set ethernetSpeed to Ethernet speed of ethernetinfo
set ethernetDuplex to Ethernet duplex of ethernetinfo
set appletalkZone to default AppleTalk zone of ethernetinfo
set networkPorts to active network ports of ethernetinfo
set appletalkNetwork to AppleTalk network of ethernetinfo
set appletalkNode to AppleTalk node of ethernetinfo
set appletalkAddress to AppleTalk address of ethernetinfo
set appletalkRouter to AppleTalk router of ethernetinfo
set TCPIPnetmask to TCPIP netmask of ethernetinfo
set TCPIPaddress to TCPIP address of ethernetinfo
set TCPIPgateway to TCPIP gateway of ethernetinfo
set TCPIPdomain to TCPIP domain of ethernetinfo
set TCPIPnameserver to TCPIP nameserver of ethernetinfo
set romRevision to ROM revision of productionInfo
set bootROM to boot ROM version of productionInfo
set bootROMfile to boot ROM file version of productionInfo
set serialNumber to serial number of productionInfo
activate
quit
end tell
set fileRef to open for access file "HardDisk:Desktop
Folder:gestaltoutput.txt" with write permission
try
writeData("Finder version:", finderVersion, fileRef)
writeData("System version:", systemVersion, fileRef)
writeData("Quicktime version:", quicktimeVersion, fileRef)
writeData("Video Memory size:", videoMemorySize, fileRef)
writeData("Virtual Memory status:", VMInfo, fileRef)
writeData("Virtual Memory size:", VMSize, fileRef)
writeData("Physical RAM:", physicalRAM, fileRef)
writeData("Disk Cache:", diskCache, fileRef)
writeData("Logic Board number:", logicBdNum, fileRef)
writeData("Processor speed:", ratedSpeed, fileRef)
writeData("Model Name:", modelName, fileRef)
writeData("Keyboard Type:", keyboardType, fileRef)
writeData("Processor Type:", processorType, fileRef)
writeData("Number of Processors:", processorsLocal, fileRef)
writeData("Ethernet Speed:", ethernetSpeed, fileRef)
writeData("Ethernet Duplex:", ethernetDuplex, fileRef)
writeData("AppleTalk zone:", appletalkZone, fileRef)
writeData("Network Port:", networkPorts, fileRef)
writeData("AppleTalk Network:", appletalkNetwork, fileRef)
writeData("AppleTalk Node:", appletalkNode, fileRef)
writeData("AppleTalk Address:", appletalkAddress, fileRef)
writeData("AppleTalk Router:", appletalkRouter, fileRef)
writeData("TCPIP Netmask:", TCPIPnetmask, fileRef)
writeData("TCPIP Address:", TCPIPaddress, fileRef)
writeData("TCPIP Gateway:", TCPIPgateway, fileRef)
writeData("TCPIP Domain:", TCPIPdomain, fileRef)
writeData("TCPIP Nameserver:", TCPIPnameserver, fileRef)
writeData("ROM Revision:", romRevision, fileRef)
writeData("Boot ROM:", bootROM, fileRef)
writeData("Boot ROM File:", bootROMfile, fileRef)
writeData("Serial Number:", serialNumber, fileRef)
close access fileRef
on error
close access fileRef
end try
on writeData(desc, value, fileLocation)
try
write desc & tab & tab & tab & value & return to fileLocation
on error
display dialog "oops"
end try
end writeData
--- **************
On Tue, 7 Nov 2000, Mike Tuller wrote:
>
I want to gather information from Apple System Profiler, and have the
>
information put into a tab delimited file. I found this script in a search:
>
>
tell application "Apple System Profiler"
>
activate
>
set ethernetinfo to network info
>
set MACaddress to AppleTalk address of ethernetinfo
>
quit
>
end tell
>
>
set fileRef to open for access file "Macintosh HD:Desktop
>
Folder:scripts:MacAddress" with write permission
>
write MACaddress to fileRef
>
close access fileRef
>
>
I tried to modify it so that I can pull all information, but not knowing
>
much about Applescript, I can seem to get it to go. If I use this to gather
>
system info:
>
>
tell application "Apple System Profiler"
>
activate
>
set SystemInfo to system info
>
quit
>
end tell
>
>
set fileRef to open for access file "Macintosh HD:Desktop
>
Folder:scripts:SystemInfo" with write permission
>
write SystemInfo to fileRef
>
close access fileRef
>
>
The result is this:
>
>
recofilsfalsfndvTEXT9.0sysvTEXT 9.0.4 USenbvTEXTMac
>
OS ROM
>
4.6.1atevTEXT1.3qtmvTEXT4.1.2carvTEXT1.0.4stnmTEXTsttpTEXT
>
Pager
>
cardstlcTEXT
>
Not availablestbsTEXTATA Busmcovtruestovtrueswovtrue
>
>
Which doesn't contain all of the information, and is ina format that I don't
>
want. Can someone help me with this?
>
>
Thanks,
>
Mike
>
_______________________________________________
>
applescript-users mailing list
>
email@hidden
>
http://www.lists.apple.com/mailman/listinfo/applescript-users
>
***********
Jonathan Neff
Student Technology Centers
Indiana University - Bloomington
email@hidden