Re: [applescript] Automator find and replace text string
Re: [applescript] Automator find and replace text string
- Subject: Re: [applescript] Automator find and replace text string
- From: Alastair Leith <email@hidden>
- Date: Sun, 17 Jun 2018 23:44:17 +0800
Much obliged, Shane. Thx.
> On 17 Jun 2018, at 8:34 pm, Shane Stanley <email@hidden> wrote:
>
> On 17 Jun 2018, at 10:23 pm, Jean-Christophe Helary <email@hidden
> <mailto:email@hidden>> wrote:
>>
>> I don't think I'd use AS for that. I'd use [Run shell script] and do a sed
>> replace on the string you get.
>
> Seems like a bit of overkill for a simple literal replace.
>
> tell application "Finder" to set finderSelectionList to selection as alias
> list
> if length of finderSelectionList = 0 then error "No files were selected in
> the Finder!"
> set thePath to POSIX path of item 1 of finderSelectionList
> set saveTID to AppleScript's text item delimiters
> set AppleScript's text item delimiters to {"/"}
> set thePath to text items of thePath
> set AppleScript's text item delimiters to {" ➤ "}
> set thePath to thePath as text
> set AppleScript's text item delimiters to saveTID
> set the clipboard to thePath
>
> --
> Shane Stanley <email@hidden <mailto:email@hidden>>
> <www.macosxautomation.com/applescript/apps/
> <http://www.macosxautomation.com/applescript/apps/>>, <latenightsw.com
> <http://latenightsw.com/>>
>
>
> _._,_._,_
> Groups.io Links:
> You receive all messages sent to this group.
>
> View/Reply Online (#224)
> <https://apple-dev.groups.io/g/applescript/message/224> | Reply To Group
> <mailto:email@hidden?subject=Re: Re: [applescript] Automator find and replace text string>
> | Reply To Sender
> <mailto:email@hidden?subject=Private: Re: Re: [applescript] Automator find and replace text string>
> | Mute This Topic <https://groups.io/mt/22393675/1177585> | New Topic
> <https://apple-dev.groups.io/g/applescript/post>
>
> Your Subscription <https://apple-dev.groups.io/g/applescript/editsub/1177585>
> | Contact Group Owner <mailto:email@hidden> |
> Unsubscribe
> <https://apple-dev.groups.io/g/applescript/leave/2696940/805404827/xyzzy>
> [email@hidden]
> _._,_._,_
_______________________________________________
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