• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: automatic unmount
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >automatic unmount (From: Stefan Eriksson <email@hidden>)

  • Prev by Date: Re: Count lines in a textfile
  • Next by Date: Re: Count lines in a textfile
  • Previous by thread: automatic unmount
  • Next by thread: Count lines in a textfile
  • Index(es):
    • Date
    • Thread