This is the script which I am writing. But is not working as expected.
Anyone can help me to improve it?
Shell("saplogon",1)
UseWindow("SAPLOGON.EXE|#32770|SAP Logon 740",1)
SendKeys("<Enter>")
UseWindow("SAPLOGON.EXE|Afx:60960000:1008|SAP|1",1)
ClickMouse(Left,Down,207,64)
ClickMouse(Left,Up,207,64)
SendKeys("e<Backspace>teste01<Tab>mudar123<Num Enter>")
UseWindow("SAPLOGON.EXE|SAP_FRONTEND_SESSION|SAP",1)
SendKeys("<Enter>")
ssap=UseWindow("SAPLOGON.EXE|Edit|SAP Easy Access|1")
SendKeys("S_ALR_87013611")
pause 2
SendKeys("<Enter>")
pause 2
UseWindow("SAPLOGON.EXE|Afx:69540000:1008|Centros custo: real/plano/desvio: Selecionar|1",1)
ClickMouse(Left,Down,256,40)
ClickMouse(Left,Up,256,40)
SendKeys("<Down><Down><Down><Down><Down><Down><Down><Down><Down>")
pause 2
SendKeys("5113003002")
pause 2
SendKeys("<F8>")
oet = UseOCREngine(2)
UseWindow("SAPLOGON.EXE|Afx:69540000:1008|CeCst:real/plan/desv|1",1)
ClickOnTextOCR("39.170,OO", left, double, InArea(263, 184, 100, 15))
pause 2
UseWindow("SAPLOGON.EXE|Afx:69540000:b|Selecionar relatório|1",1)
ClickMouse(Left,Up,129,32)
ClickMouse(Left,Double,129,32)
pause 2
UseWindow("SAPLOGON.EXE|Afx:69540000:0:00010003:00000010:00000000|Exibir part.indiv.de custos reais p/centros de custo|1",1)
WriteCombo("1","/nex")
SendKeys("<Enter>")