AppleScript名:TextEditで色置換 v2 |
— Created 2018-01-09 by Takaaki Naganoya — 2018 Piyomaru Software use AppleScript version "2.4" use scripting additions use framework "Foundation" use bPlus : script "BridgePlus" –https://www.macosxautomation.com/applescript/apps/BridgePlus.html load framework (* set targColor to {65535, 10023, 4626} set newColor to {19018, 0, 59109} repTextEditColor(targColor, newColor) of me *) set targColor to {19018, 0, 59109} set newColor to {65535, 10023, 4626} repTextEditColor(targColor, newColor) of me on repTextEditColor(targColor, newColor) set hitIndex to {} tell application "TextEdit" tell text of front document set colList to color of every attribute run end tell end tell set hitIndex to (current application’s SMSForder’s indexesOfItem:targColor inArray:(colList) inverting:false) as list tell application "TextEdit" tell text of front document repeat with i in hitIndex ignoring application responses set color of attribute run (i + 1) to newColor –0 based index to 1 based index conversion end ignoring end repeat end tell end tell end repTextEditColor |
More from my site
(Visited 48 times, 1 visits today)