

Moving from Microsoft Office VBA to AppleScript:
MacTech's Guide to Making the Transition
Introduction
|
Table of Contents
Page Prev and Page Next buttons at bottom of the page.
|
April, 2007
Page 116
try
if window 1 = main window then
set theMsg to item 1 of (get current messages)
else if class of window 1 = message window then
set theMsg to displayed message of window 1
else
error number -128
end if
if class of theMsg incoming message then error number -128
on error
beep
display dialog "You must have a received message in the " & ¬
"front or selected in the message pane of the main " & ¬
"window for the Reply script to work." buttons {"OK"} ¬
default button "OK" with icon 0
return
end try
if replyUsingMessageFormat then
if theMsg's has html then
set htmlText to true
else
set htmlText to false
end if
end if
if attributionStyle = "short headers" then
reply to theMsg attribution style short attribution ¬
html text htmlText
else if attributionStyle = "internet" then
reply to theMsg attribution style internet attribution ¬
place insertion point on top insertionPointOnTop ¬
html text htmlText
else -- no attribution
< Previous Page Next Page>

- SPREAD THE WORD:
- Slashdot
- Digg
- Del.icio.us
- Newsvine