Re: Apple System Profiler
Re: Apple System Profiler
- Subject: Re: Apple System Profiler
- From: "John B. Stewart" <email@hidden>
- Date: Fri, 8 Dec 2000 20:03:26 -0500
At 2:44 PM -0600 12/8/00, Bill Tandy wrote:
>
What MacOS version are you using to get your script to pull individual
>
pieces of information? With MacOS 8.6, I have just the opposite problem.
>
I can make ASP make a text report but I can't get it to give me individual
>
pieces of information. I am going to have to write scripts to parse the
>
text report unless your script will work on MacOS 8.6 (or we'll have to
>
upgrade to a higher MacOS).
>
-Bill Tandy
>
Austin, TX
>
>
On 12/8/2000 1:52 PM Mike Tuller email@hidden wrote:
>
>
>Inside the dictionary for Apple System Profiler there is
>
>something for report text. It says that it will create a tab-delimited text
>
>file of the information within ASP. How do you call on it to write the data
>
>to a file?
>
>
>
>I have a script that will pull out individual pieces of information, but I
>
>would prefer just to pull it all out in one shot with one command rather
>
>than multiple commands.
>
>
>
>Michael Tuller
>
>Technology Coordinator for Community Education
>
>Anoka-Hennepin ISD #11
>
>Anoka, MN 55303
>
_______________________________________________
>
applescript-users mailing list
>
email@hidden
>
http://www.lists.apple.com/mailman/listinfo/applescript-users
I don't remember who originally posted this but -
tell application "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 ((path to desktop as string) & "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, val, fileLocation)
try
write desc & tab & tab & tab & val & return to fileLocation
on error
display dialog "oops"
end try
end writeData