HTML 書きに強い mi
などでは実装されている『プルダウンメニューから選択するだけでタグを打てる機能』を
iBlog で実現するための
AppleScript
です。 おもに、<HTMLCode>
を駆使してエントリを書いている人をターゲットにしているのですが、要は定型文を自動ペーストするだけのものですので、それ以外の用途にも転用できます。
set the clipboard to "
<HTMLCode> \
</HTMLCode>" as text \
tell application "iBlog" to activate
tell application "System Events"
key down {command}
keystroke "v"
key up {command}
end tell
set the clipboard to "<div style='margin-top: 1em; text-indent: 1em;'></div>" as text \
tell application "iBlog" to activate
tell application "System Events"
key down {command}
keystroke "v"
key up {command}
end tell
また、エントリにイメージを張り込むことが多いなら、set the clipboard to の部分を
set the clipboard to "<img src='http://arimura.ddo.jp/~kaoru/iblog_images/XXX.jpg' alt='XXX.jpg' width='306' height='208' border='0' align='left' />" as text