• 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: Keystroke question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Keystroke question


  • Subject: Re: Keystroke question
  • From: Iurista GmbH <email@hidden>
  • Date: Tue, 24 Nov 2015 16:23:47 +0100

Maybe a late answer, but this one works in 10.6.8

(* test, with Finder item selected and ready for editing name. *)
tell application "Finder"
	activate
	set x to selection
	if length of x ≠ 0 then
		tell application "System Events" to tell process "Finder"
			set frontmost to true
			key code 36
			key code 125
			keystroke "f" using {option down}
		end tell
	else
		tell application "Mail" to activate
		delay 1
		repeat 1 times
			tell application "System Events"
				keystroke "f" using {option down}
			end tell
		end repeat
	end if
end tell

Rudolf


Am 22.11.2015 um 18.05 schrieb Robert Poland:

> 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.
>
> Robert Poland
> iMac, Late 2013, 14,2
>  3.2 GHz Intel Core I5, 27”
>  16 GB Ram, 1TB Fusion HD
>  OS X 10.11.1



 _______________________________________________
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


References: 
 >Keystroke question (From: Robert Poland <email@hidden>)

  • Prev by Date: Re: Keystroke question
  • Next by Date: Re: Keystroke question
  • Previous by thread: Re: Keystroke question
  • Next by thread: AppleScript-Users Digest, Vol 12, Issue 576, Reply to message 2 - Send port for process has no send right
  • Index(es):
    • Date
    • Thread