-
-
Save jw-miaem/68a3454b2d16dc111e2cb47d399022bf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| on searchReplace(theText, SearchString, ReplaceString) | |
| set OldDelims to AppleScript's text item delimiters | |
| set AppleScript's text item delimiters to SearchString | |
| set newText to text items of theText | |
| set AppleScript's text item delimiters to ReplaceString | |
| set newText to newText as text | |
| set AppleScript's text item delimiters to OldDelims | |
| return newText | |
| end searchReplace | |
| on run {input, parameters} | |
| set myClip to the input | |
| set mytext to searchReplace(myClip, "<", "") | |
| set mytext to searchReplace(mytext, ">.", "") | |
| set mytext to searchReplace(mytext, ">", "") | |
| set findIt to "\\" | |
| set replaceIt to "/" | |
| set mylocation to searchReplace(mytext, findIt, replaceIt) | |
| set mylocation to "smb:" & mylocation | |
| tell application "Finder" | |
| open location mylocation | |
| end tell | |
| return input | |
| end run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment