Re: Folder action script
Re: Folder action script
- Subject: Re: Folder action script
- From: kai <email@hidden>
- Date: Tue, 28 Feb 2006 02:58:13 +0000
On 25 Feb 2006, at 13:10, Serge Ségu wrote:
It is possible to attach a script to a folder by script
but, is it possible to activate 'folder action script' by script ?
without using GUI scripting
I meant to throw in one or two examples in response to this, Serge -
but was distracted (and then promptly forgot).
Specified folder action:
----------------
tell application "System Events" to set enabled of ¬
folder action "some folder" to true
----------------
Contiguous folder actions:
----------------
tell application "System Events" to set enabled of ¬
folder actions 1 thru 3 to true
----------------
Non-contiguous folder actions:
----------------
tell application "System Events" to set enabled of ¬
folder actions whose name is "some folder" or ¬
name is "some other folder" to true
----------------
Every folder action:
----------------
tell application "System Events" to set enabled of ¬
folder actions to true
----------------
================
Specified script attached to specified folder:
----------------
tell application "System Events" to set enabled of script ¬
"some script.scpt" of folder action "some folder" to true
----------------
Contiguous scripts attached to specified folder:
----------------
tell application "System Events" to set enabled of scripts ¬
"some script.scpt" thru "some other script.scpt" of ¬
folder action "some folder" to true
----------------
Non-contiguous scripts attached to specified folder:
----------------
tell application "System Events" to set enabled of ¬
scripts of folder action "some folder" whose ¬
name is "some script.scpt" or name is ¬
"some other script.scpt" to true
----------------
Every script attached to specified folder:
----------------
tell application "System Events" to set enabled of scripts ¬
of folder action "some folder" to true
----------------
================
Every script attached to every folder:
----------------
tell application "System Events" to set enabled of ¬
scripts of folder actions to true
----------------
Referencing by name or index is generally interchangeable - apart
from when filtering (using a 'whose'/'where' clause).
---
kai
_______________________________________________
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