Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on textexpander(abbreviation)
- set clipboardData to (the clipboard as text)
- return findAndReplaceInText(clipboardData, ".c", "[.]c")
- end textexpander
- on findAndReplaceInText(theText, theSearchString, theReplacementString)
- set AppleScript's text item delimiters to theSearchString
- set theTextItems to every text item of theText
- set AppleScript's text item delimiters to theReplacementString
- set theText to theTextItems as string
- set AppleScript's text item delimiters to ""
- return theText
- end findAndReplaceInText
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement