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

Re: My folder action problem


  • Subject: Re: My folder action problem
  • From: Luis Oliveira <email@hidden>
  • Date: Thu, 09 Aug 2001 17:41:17 +0100

Hi Olivier,

Unfortunately you can't use display dialog inside a tell app "Finder" of
machine..., and as soon as you drop a file inside the folder it gives the
error -2753. It doesn't tell you the name of the variable that is giving the
problem


./ luis oliveira



> did you try to put some display dialog "your variable" to check that they
> are what you expect?
>
> olivier


Original message

> Hi everyone,
>
> Sorry to insist on this question but can anyone tell why is this folder
> action giving me error -2753 everytime I run it
>
> -------------------------------------------------------------------
>
> 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
>
> -----------------------------------------------------------------------
>
> If I remove this piece of code,
>
> 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
>
> From the script everything runs ok. In the Applescript Language Guide in the
> section of Applescript errors this error is documented as
>
> -2753 The variable <name> is not defined
>
> What variable in this case ? Should be something inside the tell app
> "Finder" of machine ... Anyone ? This thing is driving me mad.
>
>
> Thanks
>
> ./ luis oliveira


  • Follow-Ups:
    • Re: My folder action problem
      • From: Olivier Destrebecq <email@hidden>
    • Re: My folder action problem
      • From: Jon Pugh <email@hidden>
References: 
 >Re: My folder action problem (From: Olivier Destrebecq <email@hidden>)

  • Prev by Date: Re: Good AppleScript Book? * O' Reilly *
  • Next by Date: Re: AppleScript Books
  • Previous by thread: Re: My folder action problem
  • Next by thread: Re: My folder action problem
  • Index(es):
    • Date
    • Thread