14 posts in this topic
UDF to intercept the error window of AutoIt, showing more details about the error, including ability to save and send by email!
How are you
I have a question, please.
I've created a window and i need
when i run the script if it detect an other copy from the same script was runing
the script close the first copy Automatically and run a new copy
I want an example to understand it
Please Somebody Help me i am trying to create new script but, i don't know how to create it.
I am Creating script like this :
; My script here [First Script]
Check the internet connection, if internet connected then
; My Script here [Second Script]
If internet not connected, wait for connect, after connected run my second script
If Control id/windows/title matched do nothing and end/exit autoit script
If Control id/windows/title not matched repeat my first and second script again until control id/windows/tittle not matched
match with :
>>>> Window <<<<
Title: PS :: Version - 126.96.36.199 - [PS Bill]
Position: -8, -8
Size: 1382, 744
>>>> Control <<<<
Advanced (Class): [NAME:BillPrint]
Position: 39, 310
Size: 1221, 306
ControlClick Coords: 745, 20
I get this error, Whenever I try to find a date. Does anyone have any idea why? I saw some post from 2015, However I would imagine this is fixed by now. @water
>"J:\Temporary Files\XXXXXXXXX\AutoIt\AutoIt\AutoIt\SciTe\..\autoit3.exe" /ErrorStdOut "C:\Users\XXXXXX\Desktop\Call Report Automation.au3" "J:\Temporary Files\XXXXXXXX\AutoIt\AutoIt\AutoIt\Include\Excel.au3" (656) : ==> The requested action with this object has failed.: $aResult[$iIndex] = $oMatch.Name.Name $aResult[$iIndex] = $oMatch^ ERROR >Exit code: 1 Time: 5.791 #include <Excel.au3> Global $sExcelFile1 = FileOpenDialog("Choose/Create Excel File", @ScriptDir, "(*.xlsm)") Global $sExcelFile2 = FileOpenDialog("Choose/Create Excel File", @ScriptDir, "Excel Sheet (*.xlsx;*.xls)|All (*.*)") If FileExists($sExcelFile2) Then Global $oExcel2 = _Excel_Open () $oExcel2 = _Excel_BookOpen($oExcel2,$sExcelFile2) EndIF If FileExists($sExcelFile1) Then Global $oExcel1 = _Excel_Open () $oExcel1 = _Excel_BookOpen($oExcel1,$sExcelFile1,Default,Default,"2007") EndIF $oRead = _Excel_RangeRead ($oExcel2,Default,"A2",3) _Excel_RangeWrite ($oExcel1,"Calls Handled",$oRead,"BY7") Sleep (1000) _Excel_RangeFind ($oExcel1,$oRead,"E4:FD92") MsgBox (0,"Test",$oRead) UPDATE:
If I take out this line it works. By works I mean I don't get the error. :/ However, I need it. I am just confused.
_Excel_RangeWrite ($oExcel1,"Calls Handled",$oRead,"BY7")
UPDATE 2: I also get this error when trying to use the helpfile examples. I have version 188.8.131.52
\AutoIt\AutoIt\AutoIt\Include\Excel.au3" (670) : ==> The requested action with this object has failed.: $oSheet = $oWorkbook.Sheets($iIndexSheets) $oSheet = $oWorkbook^ ERROR >Exit code: 1 Time: 0.8931
I am relatively new to the world of Microsoft Office and the Excel UDF.
I am trying to loop through every row in a spreadsheet and get the text/values from each column in the given row... so far I have looked into the Help file for the Excel UDF and the wiki page for Excel UDF but I have no idea about how this is done ... This is all I have in my script:
Global $oExcel = _Excel_Open(False, False, False, False, True) Global Const $sSpreadsheet = @ScriptDir & '\data.xlsx' Global $oSpreadsheet = _Excel_BookOpen($oExcel, $sSpreadsheet, True, False) ; ... I am placing my bet on the _Excel_Range functions... especially _Excel_RangeRead. I don't know how $vRange works so I would be glad if someone can point me in the right direction . What I would ideally like is to get all of the contents of the spreadsheet (it's just a normal text one) in a 2D array.
Thanks in Advance!