• 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: Folder Action Script: Detect a certain Volume in /Volumes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Folder Action Script: Detect a certain Volume in /Volumes


  • Subject: Re: Folder Action Script: Detect a certain Volume in /Volumes
  • From: David C Andrews <email@hidden>
  • Date: Fri, 13 May 2005 22:49:10 -0400

Does one need a run-handler within a stay-open AS app?

If not, couldn't the entire script suggested by Kurt be simplified as:

on idle
tell application "Finder" to set volume_list to the name of every disk of desktop
if (volume_list contains search_string) then
-- do back up operations
end if
return 60 -- Time in seconds, will check every minute.
end idle


David A

On May 13, 2005, at 12:03 PM, Kurt Schreckengost wrote:

Hi Tilo,

I don't have Tiger yet so I can't say anything about Automator. While I am no expert :-[ this should get you started with a plain vanilla applescript.
property search_string : "BackUp"


on run
   my check_volumes()
end run

on idle
   delay 60 -- Time in seconds, will check every minute.
   my check_volumes()
end idle

on check_volumes()
tell application "Finder" to set volume_list to the name of every disk of desktop
if (volume_list contains search_string) then
-- do back up operations
end if
end check_volumes



You'll need to save the script as a stay open application. Then place the app. in your start up sequence. This script will activate when you start up and remain active checking for mounted volumes every 60 seconds. I wouldn't check any more frequently than that but you can figure out what works best for you. From here I'll let the experts hash out performance of this script and other options. Hope this helps.


Good health always,
Kurt Schreckengost

Reliance Vitamin Co.
TEL: 732.537.1220 ext. 33
FAX: 732.537.1526


Tilo Bauer wrote:

I'd like to start a (automator-)backup-routine upon pluging in an external harddiskdrive called "BackUp". I guess this would be a folder action attached to /Volumes.
All I can find are examplescripts regarding any files added to the folder. Does anybody has an idea how to detect that certain volume?


Thanks
Tilo
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden


This email sent to email@hidden


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden


This email sent to email@hidden


_______________________________________________ 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
  • Follow-Ups:
    • Re: Folder Action Script: Detect a certain Volume in /Volumes
      • From: kai <email@hidden>
References: 
 >Folder Action Script: Detect a certain Volume in /Volumes (From: Tilo Bauer <email@hidden>)
 >Re: Folder Action Script: Detect a certain Volume in /Volumes (From: Kurt Schreckengost <email@hidden>)

  • Prev by Date: Re: Propmpting user to enter Variables
  • Next by Date: Re: FMP Container Field crashes & oddities...
  • Previous by thread: Re: Folder Action Script: Detect a certain Volume in /Volumes
  • Next by thread: Re: Folder Action Script: Detect a certain Volume in /Volumes
  • Index(es):
    • Date
    • Thread