Can you determine what OS is running?

Is there an Applescript statement that will tell me what OS is running? I will be running either 9.2.2 or Classic on Jaguar, but need to determine what version my program is running on at run time.

Thanks again all!

James.

Hi,

I think the Apple System Profiler (in the Utilities folder) may help you out. You may need different scripts for OS 9 and Mac OS X, but a try statement should solve the problem there.

Below the script I use when I report bugs with developers.

HTH

Bye for now,

Bert

– This part of the scripts launches the ASP and puts the report into a variable.

tell application “Apple System Profiler”
activate
set newReport to system profile
set theReportText to newReport as text
close newReport saving no
quit
end tell

– The 4 lines below put the report on the clipboard.

tell application “Finder”
activate
set the clipboard to theReportText
end tell

do shell script “sw_vers”

For a “hybrid” solution:
http://bbs.applescript.net/viewtopic.php?p=11941#11941

Try the Applescript Resources routines at
http://www.apple.com/applescript/guidebook/sbrt/pgs/sbrt.06.htm
There’s lots of other good stuff there, also.

Jim

which, of course, works well under Mac OS 9

ahh look at the name of the forum AppleScript | OS X :stuck_out_tongue:

There is also :

 
system attribute "sysv"

But don’t ask me how to decipher it I dont know, but willing to learn …