Re: automatic unmount
Re: automatic unmount
- Subject: Re: automatic unmount
- From: Malcolm Fitzgerald <email@hidden>
- Date: Fri, 17 Sep 2004 10:27:08 +1000
Stefan Eriksson wrote:
Trying to create an application that automatic mounts a servervolume if
a certain application is started and the opposite aswell, if the
application is quit, then the servervolume will be unmounted... this is
so far i´ve got on the unmountpart:
set is_running to 0
repeat
tell application "Finder" to exists process "TextEdit"
set result to is_running
if is_running is "false" then
tell application "Finder"
eject disk "kain" -- Mounted name of fileserver
end tell
end if
delay 10
end repeat
Two problems.
first, you set result to is_running instead of setting is_running to result.
second, In your script "false" is a string and you are comparing it to a
boolean.
try this:
repeat
tell application "Finder"
if (exists process "TextEdit") then
eject disk "kain" -- Mounted name of fileserver
end if
end tell
delay 10
end repeat
--
Malcolm Fitzgerald ph : 02 9318 0877
Database Manager fax: 02 9318 0530
The Australian Society of Authors <http://www.asauthors.org>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden