$TextSpeed = 9 ; 99
Local $Text[9]
$Text[1] = " Снижение TCO ИТ (total cost of ownership, совокупная стоимость владения)... "
$Text[2] = " Абстрагирование и ООП. Объектно-ориентированное программирование... "
_TxtSend ()
Func _TxtSend ()
Opt("SendKeyDownDelay", $TextSpeed)
$FileCurentNameFullPath = @MyDocumentsDir & '\' & 'Мой.документ.№' & Random(1, 99, 1) & '.doc'
$hFile = FileOpen($FileCurentNameFullPath, 2)
FileWrite($hFile,"{\rtf1}")
sleep(5000)
FileClose(FileOpen($hFile, 1))
sleep(5000)
;; MsgBox(64, $hFile, "swriter.exe" & " " & $FileCurentNameFullPath)
;; Run(@ComSpec & " /c " & $FileCurentNameFullPath)
;; Run(@ComSpec & " /c " & $FileCurentNameFullPath & " & pause")
Run("C:\Program Files\OpenOffice.org 3\program\swriter.exe" & " " & $FileCurentNameFullPath)
sleep(3000)
WinWaitActive($FileCurentNameFullPath & " - OpenOffice.org Writer")
sleep(3000)
Send($Text[Random(1, 2, 1)], 1)
; Send("{ENTER}")
sleep(3000)
WinClose($FileCurentNameFullPath & " - OpenOffice.org Writer")
sleep(3000)
Send("!д") ; Send("!y")
Opt("SendKeyDownDelay", 5)
EndFunc