• 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: Stupid Newbie Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Stupid Newbie Question


  • Subject: Re: Stupid Newbie Question
  • From: Rob Lewis <email@hidden>
  • Date: Mon, 18 Feb 2008 12:28:35 -0800

For debugging purposes, I generally include an "on run" handler in my Folder Action scripts. This handler typically contains a "choose file" and then calls the "meat" of the script (as a subroutine) to do the actual processing. 

on run
   set theTestFile to (choose file)
   processIt(theTestfile)
end run

on processIt(theItem)
--your code here
end processIt

Then I can test the script just by running it. 

On Feb 18, 2008, at 12:00 PM, email@hidden wrote:

Should this error actually appear somewhere?  Because when the script  

runs (as a Folder Action, of course, since running it in the Script  

Editor does nothing), I never get an error of any kind.  To be  

certain the script was running at all, I inserted a display dialog  

command at the beginning of the script, which did pop up.  But once  

it gets to the tell application "Finder" handler, nothing.


As per your advice, I modified the core of the repeat structure to  

the following, without success:


set theInfo to (get info for alias eachFile)

display dialog theInfo buttons {"OK"} default button 1


theInfo is a record and display dialog wants a text value. Maybe "theInfo as text" will do it. 

I will take a closer look at Apple's code.  I based my original  

script (without reference to "alias") on one found online, which may  

have been an error, I suppose.


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Prev by Date: Re: Fields in Word
  • Next by Date: (no subject)
  • Previous by thread: Re: Updating records in Address Book
  • Next by thread: (no subject)
  • Index(es):
    • Date
    • Thread