Re: Keystroke question
Re: Keystroke question
- Subject: Re: Keystroke question
- From: Yvan KOENIG <email@hidden>
- Date: Sun, 22 Nov 2015 18:10:55 +0100
> Le 2015/11/22 à 18:05, Robert Poland <email@hidden> a écrit :
>
> Hi,
>
> The line;
> tell application “System Events” to keystroke “f” using {option down}
>
> gets me the Application ‘Searching “This Mac”’ rather than typing a Option f.
>
> What I’m trying to do is add an Option F to the name of a folder in a Finder window whose name is selected with the entry point set to the end of the name
>
> TIA.
As you failed to tell it which process must be targeted, System Events send the keystroke to the frontmost one which appear to be the Finder.
Use :
tell application “System Events” to tell process "theProcessSupposedToTreatTheKeystroke"
set frontmost to true
keystroke “f” using {option down}
end
Yvan KOENIG (VALLAURIS, France) dimanche 22 novembre 2015 18:10:50
_______________________________________________
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