/ Published in: AppleScript
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
set patternFile to "~/Library/Application Support/BBEdit/Setup/Grep Patterns.xml" set patternFile to do shell script "echo " & patternFile tell application "System Events" tell property list file patternFile's property list item "SavedGrepPatterns" set SavedGrepPatterns to value of property list items end tell end tell set patternList to {} repeat with i in SavedGrepPatterns tell (contents of i) set end of patternList to its Title set end of patternList to its SearchPattern set end of patternList to its ReplacePattern set end of patternList to "" end tell end repeat set AppleScript's text item delimiters to return set patternList to patternList as text tell application "BBEdit" activate make new document with properties {text:patternList} end tell