• 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: Dual Purpose Applet Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dual Purpose Applet Question


  • Subject: Re: Dual Purpose Applet Question
  • From: Michelle Steiner <email@hidden>
  • Date: Tue, 5 Dec 2000 09:11:40 -0800

On 12/5/00 8:40 AM, Mr Tea <email@hidden> wrote

>Is there any way to make an applet that behaves differently depending on
>whether it is double-clicked or has something dragged onto it?

>on open
> beep 1
>end open
>on run
> beep 2
>end run
>
>Sure enough, it beeps when I drag something onto it, but does nothing when I
>double-click. Clearly the latter is different to running the script, as it
>obediently beeps twice when run from the script editor. Where do I go from
>here?

Your script is working properly; you just can't hear the extra beeps.

Try this:

on open
display dialog "help"
end open
on run
beep 1
end run

Actually, you don't need to use on run; you could also write it this way:

beep 1
on open
display dialog "help"
end open

--Michelle

----------------------------------------------------------------------
| Michelle Steiner | Hard as it may be to believe, my |
| email@hidden | life has been based on a true story. |
----------------------------------------------------------------------


  • Prev by Date: Re: Name of Finder
  • Next by Date: Fetch
  • Previous by thread: Dual Purpose Applet Question
  • Next by thread: Re: Dual Purpose Applet Question
  • Index(es):
    • Date
    • Thread