• 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: Robert Poland <email@hidden>
  • Date: Mon, 23 Nov 2015 22:08:17 -0700
  • Z-usanet-msgid: XID649TkXFis2768X33

> On Nov 23, 2015, at 6:21:PM, Stan Cleveland <email@hidden> wrote:
>
>> On Nov 23, 2015, at 11:30 AM, Robert Poland <email@hidden> wrote:
>>
>> Essentially using the (option f) as a dual purpose function.
>
> Hi Robert,
>
> Forget the dual-purpose bit. It’s clever, but also complicates things unnecessarily. Keep it simple with something like this:
>
> 	tell application "Finder" to set sel to selection
> 	repeat with i from 1 to (count sel)
> 		set {cl, nm, thisItem} to {class, name, it} of item i of sel
> 		if cl as text is "folder" then
> 			if nm does not contain "ƒ" then
> 				tell application "System Events" to set name of thisItem to nm & " ƒ"
> 			end if
> 		else -- class is NOT folder
> 			-- use System Events to do the keystroke
> 		end if
> 	end repeat
>
> Notice the limited use of "tell application" commands. Some keywords, like "class" and "name", may be usable without a "tell".
>
> HTH,
> Stan C.

It’s too late to dig into this for now.

But one issue; This doesn’t seem to deal with a folder alias.

Robert Poland
Fort Collins, CO


 _______________________________________________
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>)
 >Re: Keystroke question (From: "Stockly, Ed" <email@hidden>)
 >Re: Keystroke question (From: "Stockly, Ed" <email@hidden>)
 >Re: 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: Re: Keystroke question
  • Index(es):
    • Date
    • Thread