Script ReplyDirectlyToSender ()
var
handle hFrom,
handle hTo
let hFrom=FindDescendantWindow (GetRealWindow(GetFocus()), From_Field2)
If hFrom Then ; Are in an open message.
SayUsingVoice(VCTX_MESSAGE,msgReplyingDirectlyToSender,OT_SCREEN_MESSAGE)
SpeechOff() ; Don't need to hear this.
If MoveToWindow(hFrom) Then ; Were we successful in moving to that window?
Pause()
LeftMouseButton() ; Make it the active window.
Delay(1)
PerformScript SelectAll() ; Select the text.
Pause()
PerformScript CopySelectedTextToClipboard()
Delay(1)
TypeKey(ksReply) ; Reply to current message.
Delay(3) ; Give screen time to settle.
let hTo=FindDescendantWindow (GetRealWindow(GetFocus()), To_Field)
If hTo Then ; Is the To: field present?
If MoveToWindow(hTo) Then ; Were we successful in moving to this window?
Pause()
LeftMouseButton() ; Make it the active window.
Pause()
PerformScript SelectAll() ; Select its contents.
Pause()
TypeKey(cksDelete) ; Delete the text.
Delay(1)
PerformScript PasteFromClipboard() ; Paste address.
EndIf ; End of MoveTo To field.
EndIf ; End of Is to field present?
EndIf ; End of move to from field successful.
Delay(3)
SpeechOn()
PerformScript GoToMessageField()
Delay(2)
EnterKey()
JAWSTopOfFile()
PerformScript ReadToField()
Else
SayMessage (OT_ERROR, msg_NoOpenMessage1_L, msg_NoOpenMessage1_S)
EndIf
EndScript
Close Window