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

Re: drapplet?


  • Subject: Re: drapplet?
  • From: "Stockly, Ed" <email@hidden>
  • Date: Wed, 25 Jan 2017 23:01:22 +0000
  • Thread-topic: drapplet?

Yes. Applets have worked that way from the very start. If they have an open handler they are dropplets but will also respond to a double-click. 



From: applescript-users-bounces+ed.stockly=email@hidden <applescript-users-bounces+ed.stockly=email@hidden> on behalf of Mitchell L Model <email@hidden>
Sent: Wednesday, January 25, 2017 2:51:46 PM
To: AppleScript Users List
Subject: drapplet?
 
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

References: 
 >drapplet? (From: Mitchell L Model <email@hidden>)

  • Prev by Date: drapplet?
  • Next by Date: Re: I broke AppleScript
  • Previous by thread: drapplet?
  • Next by thread: Re: drapplet?
  • Index(es):
    • Date
    • Thread