Applescript and Mail
Given the following code, how do I define, in Apple Script, the currently selected message which is the message I want to move:
set DeleteThis to ""
tell application "Keyboard Maestro Engine"
set DeleteThis to getvariable "theMajorDomain"
end tell
tell application id "com.apple.mail"
move currentmessage to mailbox "Junk" of account "Lindscape"
tell rule "Delete"
make new rule condition at end of rule conditions with properties {rule type:from header, qualifier:does contain value, expression:DeleteThis}
end tell
end tell