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

Re: Folder Action problem


  • Subject: Re: Folder Action problem
  • From: Luis Oliveira <email@hidden>
  • Date: Tue, 07 Aug 2001 17:55:36 +0100

> On 8/6/2001 4:54 PM, "Luis Oliveira" <email@hidden> wrote:
>
>> Everytime that I put inside the the handler code this fragment
>>
>> tell application "Finder" of machine "Impressor" of zone "Producao"
>> set appsRunning to all processes -- this is from Akua Sweets
>> if appsRunning contains "Impressor 1.0.1.app" then
>> set theLabel to 1
>> else
>> set theLabel to 0
>> end if
>> end tell
>>
>> It errors with a -2753 error, but if you run this piece of code separately
>> it runs well.
>
> You don't need the Finder tell block if you are using Akua Sweets to get the
> process list. Try it without Akua Sweets:
>
> tell application "Finder" of machine "Impressor" of zone "Producao"
> set nameList to the name of every process
> if nameList contains "Impressor 1.0.1.app" then
> set theLabel to 1
> else
> set theLabel to 0
> end if
> end tell
>


I've done the changes that you suggested but I still get the same error
-2753. It seems to me that the problem is related to the use of tell app
"Finder" on a remote machine inside of the "on adding folder items..." code.
Below you will find the entire code for the folder action:


property disk_name : path to startup disk
property storage_folder : " 04 Rev. pag."


on adding folder items to this_folder after receiving added_items
tell application "Finder" of machine "Impressor" of zone "Producao"
set nameList to the name of every process
if nameList contains "Impressor 1.0.1.app" then
set theLabel to 1
else
set theLabel to 0
end if
end tell
set aData to my getDate(current date)
repeat with ThisItem in added_items
tell application "Finder"
set the label index of ThisItem to theLabel
AkuaCopy ThisItem to "Paginas:Cad. p/ acabar:Testes:" with
overwriting
set the name of ThisItem to ("x" & name of ThisItem)
move file ThisItem to folder (storage_folder & aData as string)
of disk disk_name with replacing
end tell
end repeat
end adding folder items to




on getDate(theDate)
-- French Vanilla Date Handler -- Format: dd/mm/yyyy
copy theDate to b
set month of b to January
set theShortDate to text -2 thru -1 of ("0" & (theDate's day) + 1) & "/"
& ,
text -2 thru -1 of ("0" & (1 + (theDate - b + 1314864) div 2629728))
& ,
"/" & (text -2 thru -1 of (year of theDate as string))
end getDate



Does anyone on this list tried to refer to a remote app inside a "on adding
folder items..." and not seen this error ? I forgot to mention that I'm
running Mac OS 9.1 and the latest version of Applescript 1.6


Thanks


  • Prev by Date: Re: RegEx Commands
  • Next by Date: Re: File copy application
  • Previous by thread: Re: Folder Action Problem
  • Next by thread: Re: move folder & copy image ? (newbie)
  • Index(es):
    • Date
    • Thread