use framework "Foundation"
set osversion to system version of (system info)
I get the error “Expected end of line, etc but found property” but if I comment out the use framework line then its ok. Any ideas on how I get rid of this error?
I think that’s it also. When you add the use foundation, I think the AScript Editor thinks that you’re writing an AppleScript Objective C program for the applet or for the library. Just guessing.
Correct. Once you include any use statement, everything other than built-in commands must be either targeted (with a tell/using terms from statement or similar) or covered by its own use statement.