Many thanks to Marcus Jarrett for posting that script for changing
subject lines.

I've expanded the script as shown below. With this version, if you select
more than one message, you then have the option of either giving them all
the same subject line or going through the list one at a time and giving
each one a new name.

Give it a try and see if it works. (If it doesn't, don't blame me! I
barely know what I'm doing.)

Tom Gally      [EMAIL PROTECTED]      (Yokohama, Japan)

==========================

To compile this script in the Script Editor, you will need to wrap each
set of single-spaced lines into a single line. Then save it as a script
document in the PM Scripts folder.

========Start of Script========

tell application "PowerMail"

set cm to the current messages

set nm to the number of cm

if nm = 0 then

display dialog "Select some messages!" buttons {"OK"} with icon 2

else

if nm = 1 then

set tm to item 1 of cm

set tName to tm's subject

set newName to text returned of 
(display dialog "Enter the new subject line:" 
default answer tName with icon note)

else

set theReply to display dialog 
"Do you want to use the same subject line for all of the messages?" 
buttons {"Cancel", "No", "Yes"} default button "Yes"

if button returned of theReply is "Yes" then

set tm to item 1 of cm

set tName to tm's subject

set newName to text returned of 
(display dialog "Enter the new subject line for all of the messages:" 
buttons {"Cancel", "OK"} default button "OK" 
default answer tName with icon note)

repeat with w from 1 to nm

set tm to item w of cm

set tm's subject to newName

end repeat

else

repeat with w from 1 to nm

set tm to item w of cm

set tName to tm's subject

set newName to text returned of 
(display dialog "Enter the new subject line for message " & w & ":" 
default answer tName with icon note)

set tm's subject to newName

end repeat

end if

end if

end if

end tell
========End of Script========


Reply via email to