Re: Keystroke question
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