on run
try
set the clipboard to «class ktxt» of ((the clipboard as text) as record)
set orig_txt to the clipboard as text
if orig_txt is not "" then
set the clipboard to orig_txt
tell application "iBlog" to activate
tell application "System Events"
key down {command}
keystroke "v"
key up {command}
end tell
else
error "The clipboard is empty..." number 1
end if
on error err_msg number err_num
reportErr(err_num, err_msg)
end try
end run
--
on reportErr(err_num, err_msg)
set err_msg to "Error #" & err_num & ": " & err_msg
beep
display dialog err_msg buttons "OK" default button 1 with icon 2
end reportErr