Re: Sending Key Commands?
Re: Sending Key Commands?
- Subject: Re: Sending Key Commands?
- From: Alex Hall <email@hidden>
- Date: Sat, 11 Oct 2014 10:48:06 -0400
I'll try that, thank you. Do I need to specify the releasing of the modifiers anywhere, or is that implicit?
On Oct 11, 2014, at 10:41 AM, Bill Cheeseman < email@hidden> wrote:
Use the System Events application, which has 'keystroke' and 'key code' commands in its Processes Suite. For example, to create a new folder on the desktop:
activate application "Finder" tell application "System Events" keystroke "n" using {shift down, command down} end tell
I don't think of this as being part of what we call "GUI Scripting" because it is not necessary to have a nested block inside the tell block to 'tell process "Finder"' to send the keystroke. Instead, System Events sends the keystroke to the active application. That's why the script activates the Finder first.
On Oct 11, 2014, at 10:11 AM, Alex Hall < email@hidden> wrote: I know AS can send key commands, but I can't seem to find documentation on it. I just want to script a short series of commands I use all the time in Xcode:
cmd-ctrl-option-f5 cmd-ctrl-option-shift-space ctrl-option-shift-f3
My Mac is set to require the function key for using the F keys to control things like volume or brightness, so I don't need to simulate it's pressing in this sequence. Oh, I may also add ctrl-option-arrows at some point. Thanks for any suggestions.
--
Have a great day, Alex Hall
|
_______________________________________________
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