• 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
How can I use "if keyboard.OptionKey is down then" ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How can I use "if keyboard.OptionKey is down then" ?


  • Subject: How can I use "if keyboard.OptionKey is down then" ?
  • From: Emile Schwarz <email@hidden>
  • Date: Sat, 06 Oct 2007 21:53:41 +0200

Hi knowlegeable people (the list),

I want to have the ability to make a default selection and an optional selection.

The default selection is actually "use the Finder front window", the optional selection would be "ask the user for a target folder".

The problem I have is to make the differentiation at AppleScript run time. In another language I use, I check the fn key at image file drop and fill the window with a reduced (or expanded) copy of the image.

What I want to do here with AppleScript is something like:

if the Option Key is down then
ask the user to choose a folder -- set Source_Folder to choose folder

else
 set Source_Folder to target of front window as alias
end if


How can I wrote the "if the Option Key is down then" part ?

Please, do not tell me to use display dialog as the original code (an AppleScript source example)
has.


TIA,

Emile

_______________________________________________
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: How can I use "if keyboard.OptionKey is down then" ?
      • From: "J. Stewart" <email@hidden>
  • Prev by Date: Re: Scripting InDesign Tables
  • Next by Date: Creating shapes in Illustrator
  • Previous by thread: Re: Set bounds of a window with NO dictionary
  • Next by thread: Re: How can I use "if keyboard.OptionKey is down then" ?
  • Index(es):
    • Date
    • Thread