• 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
on run, Expected a reference
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

on run, Expected a reference


  • Subject: on run, Expected a reference
  • From: Robert Poland <email@hidden>
  • Date: Sun, 21 Aug 2005 17:28:35 -0600

Hi,

OS 10.4.2. I thought I was being clever here but I get an error "Expected a reference". What am I misunderstanding? The "on open (droppedItems)" part works fine, only the "on run " fails.

Tia,

on run
	set droppedItems to choose folder
	main(droppedItems)
end run

on open (droppedItems)
	main(droppedItems)
end open

on main(droppedItems)
repeat with i from 1 to the count of droppedItems --> gets an error here
set this_item to (item i of droppedItems)
tell application "Finder" to set theKind to kind of this_item
if theKind is "Folder" then
process_folder(this_item, selectedOption)
end if
end repeat
beep
return
end main


--
Bob Poland - Fort Collins, CO
http://www.ibrb.org/
_______________________________________________
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: on run, Expected a reference
      • From: Andrew Oliver <email@hidden>
  • Prev by Date: Re: Emailing scripts for execution
  • Next by Date: Re: Reading from a socket
  • Previous by thread: Re: [OT] Why don't I read anything about what is happening?... (Applescript-users Digest, Vol 2, Issue 547)
  • Next by thread: Re: on run, Expected a reference
  • Index(es):
    • Date
    • Thread