Help AppleScript Mavericks

I have an applescript named HardwareOverview

The AppleScript is …
do shell script “system_profiler SPHardwareDataType”

and I call it like this…

Dim S as string
S = HardwareOverview
msgbox “HardwareOverview " + S + "

This used to work, but now in Maverics nothing seems to happen when I call it.

What am I doing wrong or what would be a better way to get Hardware Overview?

Thanks.

Lennox

[quote=134615:@Lennox Jacob]I have an applescript named HardwareOverview

The AppleScript is …
do shell script “system_profiler SPHardwareDataType”

and I call it like this…

Dim S as string
S = HardwareOverview
msgbox “HardwareOverview " + S + "

This used to work, but now in Maverics nothing seems to happen when I call it.

What am I doing wrong or what would be a better way to get Hardware Overview?

Thanks.

Lennox[/quote]

Open Terminal
Type in the command system_profiler SPHardwareDataType
Do you get any results ?
If not then there’s the problem

MacOSLib may have a replacement that works
Like the MacSystemProfiler module in it

and you really don’t need an applescript for that
run it in a shell and just read the results

Thanks Norman,

It works well in the shell…

sh.Execute "system_profiler SPHardwareDataType"
S = sh.Result
msgbox   S

Lennox