Advertisement
Guest User

Untitled

a guest
Nov 6th, 2018
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. on textexpander(abbreviation)
  2.         set clipboardData to (the clipboard as text)
  3.     return findAndReplaceInText(clipboardData, ".c", "[.]c")
  4. end textexpander
  5.  
  6. on findAndReplaceInText(theText, theSearchString, theReplacementString)
  7.     set AppleScript's text item delimiters to theSearchString
  8.     set theTextItems to every text item of theText
  9.     set AppleScript's text item delimiters to theReplacementString
  10.     set theText to theTextItems as string
  11.     set AppleScript's text item delimiters to ""
  12.     return theText
  13. end findAndReplaceInText
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement