Open System profiler for Memory information

I can open the System profiler but not the “memory” document or information located in - - System/Library/System Profiler/SPMemoryReporter.spreporter

set thefile to “SPMemoryReporter.spreporter”

tell application “System Profiler”
open thefile
end tell

The two last lines of code below will both do the same thing, opening a file with the default application:

set myFile to choose file

do shell script "open " & quoted form of (POSIX path of myFile)
open myFile

Hope it helps,
ief2

EDIT: I just looked at the open help (or what do you call it) in the terminal and this code opens it with a specified application:

set myApp to path to application "System Profiler"

do shell script "open " & quoted form of POSIX path of (choose file) & " -a " & quoted form of POSIX path of myApp

Not sure exactly what you’re looking for. But you can access the System Profiler data via command line:

do shell script “system_profiler SPHardwareDataType SPMemoryDataType”

returns the memory info as text.

do shell script “system_profiler SPHardwareDataType SPMemoryDataType -xml”

returns it as XML.

Thanks for the info. They all work but all I am after is for the screen to open up with the memory information in it. We use the info for QA on numerous laptops to check if memory has been stolen or not working. Any ideas on how just to open it the screen? Thanks

do you mean just


display dialog "" default answer (do shell script "system_profiler SPHardwareDataType SPMemoryDataType")

Nice one, didn’t think of it. :cool:

Can also do something like this:


choose from list every paragraph of (do shell script "system_profiler SPHardwareDataType SPMemoryDataType") cancel button name ""