After few search on the internet, I still cannot figure this out. Any tips on doing it? Is it the way i declare the window object wrong?
Below is my code:
#include <Excel.au3> #include <File.au3> Global $szDrive, $szDir, $szFName, $szExt ,$filelocation="C:\Users\SoonYee\Desktop\test.xls" Global $oExcel = ObjCreate("Excel.Application") $oExcel.Visible = 1 $oExcel.Application.ScreenUpdating = True $oExcel.Application.DisplayAlerts = False $oExcel.WorkBooks.Open($filelocation,2 ) Dim $view=_PathSplit($filelocation, $szDrive, $szDir, $szFName, $szExt) Local $arr[3] = ["Graph", "Rawdata", "Data_t50"] $oExcel.Sheets($arr).Printout WinWaitActive("Save As") WinActivate ( "") ControlSend ( "[CLASS:#32770", "", "Edit1", "Testing purpose")
The code run fines up to open the file. For controlsend part, it is not working. Where is the problem actually??