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
Norman_P
(Norman P)
2
[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
Norman_P
(Norman P)
3
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