• 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: Sending key combinations
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sending key combinations


  • Subject: Re: Sending key combinations
  • From: Steve Mills <email@hidden>
  • Date: Tue, 10 Nov 2015 21:20:16 +0000 (GMT)

On Nov 10, 2015, at 02:19 PM, - <email@hidden> wrote:


i'm new to apple script. I want to send key commands to an open
application. I found what it is for a single key:

tell application \"System Events\" to keystroke \"l\""

I cann't find how to do a key combination such as control+f. Can someone
help please? Is there a web page that shows how to use such combinations?

The "using" parameter is where you put the modifiers.

keystroke "f" using control down
keystroke "f" using {command down,option down}

There's also the "key code" command, which I've had to use several times instead. But you have to look up the key codes (easy to do with the Key Codes app).

Sent from iCloud's ridiculous UI, so, sorry about the formatting

 
 _______________________________________________
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

  • Prev by Date: Sending key combinations
  • Next by Date: Re: Save as application - run only
  • Previous by thread: Re: Sending key combinations
  • Next by thread: Re: Save as application - run only-uipdate
  • Index(es):
    • Date
    • Thread