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

drapplet?


  • Subject: drapplet?
  • From: Mitchell L Model <email@hidden>
  • Date: Wed, 25 Jan 2017 17:51:46 -0500

I rarely make script apps, so this may be a really naive question. Is it widely (at all?) recognized that you can have a script app that can be run either by double-clicking or by dragging files over it? A "drapplet"? As follows:

-- Demonstration of a "drapplet": 
-- a script that can be run either by double-clicking
-- or by dragging files over its icon
--
-- Mitchell L Model, email@hidden, 2017-01-25

on run argv
display alert "Double-clicked or run from editor"
-- I don't know how to tell the difference
end run

on open args
set oldDelimiters to AppleScript's text item delimiters
set AppleScript's text item delimiters to {return & return}
try
display alert "Files dropped:" & return & return & (args as text)
end try
set AppleScript's text item delimiters to oldDelimiters
end open





 _______________________________________________
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

  • Follow-Ups:
    • Re: drapplet?
      • From: "S. J. Cunningham" <email@hidden>
    • Re: drapplet?
      • From: "Stockly, Ed" <email@hidden>
  • Prev by Date: Re: I broke AppleScript
  • Next by Date: Re: drapplet?
  • Previous by thread: Re: I broke AppleScript
  • Next by thread: Re: drapplet?
  • Index(es):
    • Date
    • Thread