Created
December 28, 2016 01:57
-
-
Save kerim/d304348808833f9fea59a5598b62cc4a to your computer and use it in GitHub Desktop.
AppleScript to find and replace text in file using TextWrangler
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
tell application "TextWrangler" | |
open theFile | |
replace "[FIND TEXT]" using "[REPLACE TEXT]" searching in text 1 of front document options {starting at top:false, wrap around:true, backwards:true, case sensitive:true, match words:true, extend selection:false} | |
replace "[FIND TEXT 2]" using "[REPLACE TEXT 2]" searching in text 1 of front document options {starting at top:false, wrap around:true, backwards:true, case sensitive:true, match words:true, extend selection:false} | |
tell front document | |
save | |
end tell | |
end tell | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment