Re: Apple System Profiler not closed
Re: Apple System Profiler not closed
- Subject: Re: Apple System Profiler not closed
- From: Richard 23 <email@hidden>
- Date: Sat, 10 Mar 2001 23:27:11 -0800
>
"close" is for windows. You would have to write
>
>
tell application "Apple System Profiler"
>
set The_IP_Address to TCPIP address as string
>
close window 1
>
end tell
>
>
Unless you actually want the application to quit rather than to only
>
close the window, in which case you would have to write
>
>
tell application "Apple System Profiler"
>
set The_IP_Address to TCPIP address as string
>
activate
>
(*for some reason, "quit" will not work if the aplication is in the
>
background
>
*)
>
quit
>
end tell
Well this is old territory. When this came up before I submitted:
http://homepage.mac.com/richard23/applescript01.html#ASPquery
It provides an easier method for getting info from Apple System Profiler
as well as running ASP in the background, never bringing it to the front,
and ASP quits when the window is closed. I never issue a quit command.
Here's the launch...close fragment:
-- ---------------------------------------------------------
-- Preprocessed by Convert Script 1.0d5
-- ---------------------------------------------------------
-- author: Richard 23, date: Saturday, March 10, 2001
-- ---------------------------------------------------------
launch application "Apple System Profiler"
tell application "Apple System Profiler"
try
open anything
close window 1
on error errTxt number errNum
close window 1
end try
end tell
-- ---------------------------------------------------------
R23