• 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 to set property
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Folder action script to set property


  • Subject: Re: Folder action script to set property
  • From: Simon Forster <email@hidden>
  • Date: Thu, 9 Jun 2005 09:09:29 +0100


On 9 Jun 2005, at 07:54, Yvan KOENIG wrote:


Le 8 juin 2005 , à 16:03, Simon Forster a écrit :


Can a folder action script set a global property so that it's remembered when the script is run?


property watchedFolder : ""

on adding folder items to thisWatchedFolder after receiving theseWatchedFolderItems
global watchedFolder
set watchedFolder to (thisWatchedFolder as string)
tell application (path to me as string) to run
end adding folder items to


on run()
    global watchedFolder
    watchedFolder -->empty string
end

on idle()
    --stuff which needs to keep on happening
end


At the moment I'm having to get the folder action to write out to a file and then load it in the run handler - which seems kinda pointless.



Hello

You didn't wrote which OS you are using.

10.4.1

With Panther, property are NOT stored in Folder actions scripts.

In Tiger, they are !

Hmm - which one's which again?

Anyway, maybe something of a moot point? IIRC, Folder Actions are run as different process compared to simply double clicking an application - so presumably namespaces are different? Where does that leave properties and their storage?

Simon Forster
_____________________________________________________
 LDML Ltd, 62 Pall Mall, London, SW1Y 5HZ, UK
 Tel: +44 (0)70 9230 5244   Fax: +44 (0)70 9230 5247
_____________________________________________________

_______________________________________________
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 to set property
      • From: DigitEL <email@hidden>
References: 
 >Folder action script to set property (From: Simon Forster <email@hidden>)
 >Re: Folder action script to set property (From: Yvan KOENIG <email@hidden>)

  • Prev by Date: Re: Search & Replace multiple Paragraph returns
  • Next by Date: Re: Problem setting a script to check for a running app
  • Previous by thread: Re: Folder action script to set property
  • Next by thread: Re: Folder action script to set property
  • Index(es):
    • Date
    • Thread