Hi, i am new to Autoit. I was trying to automate a simple process with excel on win10. the code is below. i initially ran with mousecoordinates set to screen option(default) - it ran seamless
#include <AutoItConstants.au3>
run("C:\Program Files (x86)\Microsoft Office\root\Office16\EXCEL.EXE","",@SW_MAXIMIZE)
;run(
winwait("Excel")
;MouseClick("left", 555, 272, 3, 0)
MouseClick("primary", 490, 351, 32, 0)
winwait("Book1 - Excel")
MouseClick("primary", 56, 236, 1, 0)
send("hello")
Send("{TAB 4}")
send("check")
.. the code was slightly altered, and when i opted mousecoords to window origin, excel window opens behind the active window ( i have to minimise the active window and click manually to continue from line 4 below)
#include <AutoItConstants.au3>
AutoItSetOption("MouseCoordMode",0)
run("C:\Program Files (x86)\Microsoft Office\root\Office16\EXCEL.EXE","",@SW_MAXIMIZE)
;run(
Global $a1, $a2 , $a3
$a1=1.0
$a2=2.5
$a3=$a1+$a2
winwait("Excel")
;
DirCreate ( "d:\xyz\abc" )
MouseClick("primary", 513, 227, 33, 0)
winwait("Book1 - Excel")
MouseClick("primary", 62, 242, 1, 0);Opt("MouseCoordMode",0)
;
send($a1)
Send("{TAB 1}")
send($a2)
Send("{TAB 1}")
send($a3)
mouseclick("primary",0,0,3,0)
;Send("{TAB 1}")
send("{enter}")
mouseclick("primary",218,352,1,0)
send("d:\xyz\abc\11.xlsx" )
send("{enter}")