Jump to content

Recommended Posts

I was running my script and everything was working fine and then it just stopped working. 

I got this error message:

!>12:51:55 AutoIt3.exe ended.rc:-1073741819
+>12:51:55 AutoIt3Wrapper Finished.
>Exit code: 3221225477    Time: 354.6

I looked that error up and this article (https://www.autoitscript.com/trac/autoit/ticket/2541) said it was fixed a long time ago. 

I am using version: SciTE Version 4.1.0, how am I getting this error? (first time I got it after running my code 50+ times)

it crashed while trying to loop through emails. 

Full output log:

>"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" /run /prod /ErrorStdOut /in "C:\" /UserParams    
+>12:46:01 Starting AutoIt3Wrapper v.18.708.1148.0 SciTE v.4.1.0.0   Keyboard:00000409  OS:WIN_10/  CPU:X64 OS:X64  Environment(Language:0409)  CodePage:0  utf8.auto.check:4
+>         SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE 
>Running AU3Check (3.3.14.5)  from:C:\Program Files (x86)\AutoIt3 
+>12:46:01 AU3Check ended.rc:0
>Running:(3.3.14.5): 
--> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop
Action 1: Create a connection to the outlook account at line: 192
Action 1: Finished at line: 205
Action 2: Scan for invaild E-mails at line: 215
Number of SKIPPED unread E-mails:  at line: 226
Current email has been changed from Unread to Read. at line: 238
Current email has been changed from Unread to Read. at line: 238
Number of SKIPPED E-mails: 0 at line: 246
Action 2: Finished at line: 248
Action 3: Store vaild E-mails at line: 258

Number of unread E-mails: 17 at line: 290
Action 3: Finished at line: 292


Current number of processed Emails is: 0 at line: 2735
Action 2: Scan for invaild E-mails at line: 215
Number of SKIPPED unread E-mails:  at line: 226
Number of SKIPPED E-mails: 0 at line: 246
Action 2: Finished at line: 248
Action 4: Loop through E-mails at line: 302
Action 4: Finished at line: 361
Action 5: Store E-mail's contents at line: 371
Action 5: Finished at line: 495
Action 6: Test to Skip based on location at line: 508
Action 6: Finished at line: 710
Action 7: Check if location needs to be a suite at line: 720
The 'Bathroom' is not mentioned in the Description. Suite not needed. at line: 2180
Action 7: Finished at line: 2186

Opening a new Chrome window. at line: 2747
Action 8: Open Web Browser at line: 2240

_WDStartup: "MicrosoftWebDriver.exe" --verbose 


Action 8: Finished at line: 2270
Action 9: Navigate to Work Order Tracking at line: 2281
Action 9: Finished at line: 2295
Action 10: Click on Create New Work Order at line: 2306
Action 10: Finished
Action 11: Send E-mail Data to it's proper field at line: 2324
Sub-Action 3: Split Long Description at line: 2522
Sub-Action 3: Finished at line: 2576


Work Order Number: 660308

Action 11: Finished at line: 2511

Change status was called at line: 2758
Sub-Action 2: Change E-mail to Read at line: 2223
Current email has been changed from Unread to Read. at line: 2226
Sub-Action 2: Finished at line: 2230
Action 16: Create New Work Order at line: 2705
Action 16: Finished at line: 2719


Current number of processed Emails is: 1 at line: 2735
Action 2: Scan for invaild E-mails at line: 215
Number of SKIPPED unread E-mails:  at line: 226
Number of SKIPPED E-mails: 0 at line: 246
Action 2: Finished at line: 248
Action 4: Loop through E-mails at line: 302
Action 4: Finished at line: 361
Action 5: Store E-mail's contents at line: 371
Action 5: Finished at line: 495
Action 6: Test to Skip based on location at line: 508
Action 6: Finished at line: 710
Action 7: Check if location needs to be a suite at line: 720
The 'Bathroom' is not mentioned in the Description. Suite not needed. at line: 2180
Action 7: Finished at line: 2186
Action 11: Send E-mail Data to it's proper field at line: 2324


Work Order Number: 660309

Action 11: Finished at line: 2511

Change status was called at line: 2758
Sub-Action 2: Change E-mail to Read at line: 2223
Current email has been changed from Unread to Read. at line: 2226
Sub-Action 2: Finished at line: 2230
Action 16: Create New Work Order at line: 2705
Action 16: Finished at line: 2719


Current number of processed Emails is: 2 at line: 2735
Action 2: Scan for invaild E-mails at line: 215
Number of SKIPPED unread E-mails:  at line: 226
Number of SKIPPED E-mails: 0 at line: 246
Action 2: Finished at line: 248
Action 4: Loop through E-mails at line: 302
Action 4: Finished at line: 361
Action 5: Store E-mail's contents at line: 371
Action 5: Finished at line: 495
Action 6: Test to Skip based on location at line: 508
Action 6: Finished at line: 710
Action 7: Check if location needs to be a suite at line: 720
The 'Bathroom' is not mentioned in the Description. Suite not needed. at line: 2180
Action 7: Finished at line: 2186
Action 11: Send E-mail Data to it's proper field at line: 2324
Sub-Action 3: Split Long Description at line: 2522
Sub-Action 3: Finished at line: 2576


Work Order Number: 660310

Action 11: Finished at line: 2511

Change status was called at line: 2758
Sub-Action 2: Change E-mail to Read at line: 2223
Current email has been changed from Unread to Read. at line: 2226
Sub-Action 2: Finished at line: 2230
Action 16: Create New Work Order at line: 2705
Action 16: Finished at line: 2719


Current number of processed Emails is: 3 at line: 2735
Action 2: Scan for invaild E-mails at line: 215
Number of SKIPPED unread E-mails:  at line: 226
Number of SKIPPED E-mails: 0 at line: 246
Action 2: Finished at line: 248
Action 4: Loop through E-mails at line: 302
Action 4: Finished at line: 361
Action 5: Store E-mail's contents at line: 371
Action 5: Finished at line: 495
Action 6: Test to Skip based on location at line: 508
Action 6: Finished at line: 710
Action 7: Check if location needs to be a suite at line: 720
The 'Bathroom' is not mentioned in the Description. Suite not needed. at line: 2180
Action 7: Finished at line: 2186
Action 11: Send E-mail Data to it's proper field at line: 2324


Work Order Number: 660311

Action 11: Finished at line: 2511

Change status was called at line: 2758
Sub-Action 2: Change E-mail to Read at line: 2223
Current email has been changed from Unread to Read. at line: 2226
Sub-Action 2: Finished at line: 2230
Action 16: Create New Work Order at line: 2705
Action 16: Finished at line: 2719


Current number of processed Emails is: 4 at line: 2735
Action 2: Scan for invaild E-mails at line: 215
Number of SKIPPED unread E-mails:  at line: 226
Number of SKIPPED E-mails: 0 at line: 246
Action 2: Finished at line: 248
Action 4: Loop through E-mails at line: 302
Action 4: Finished at line: 361
Action 5: Store E-mail's contents at line: 371
Action 5: Finished at line: 495
Action 6: Test to Skip based on location at line: 508
Action 6: Finished at line: 710
Action 7: Check if location needs to be a suite at line: 720
The 'Bathroom' is not mentioned in the Description. Suite not needed. at line: 2180
Action 7: Finished at line: 2186
Action 11: Send E-mail Data to it's proper field at line: 2324


Work Order Number: 660312

Action 11: Finished at line: 2511

Change status was called at line: 2758
Sub-Action 2: Change E-mail to Read at line: 2223
Current email has been changed from Unread to Read. at line: 2226
Sub-Action 2: Finished at line: 2230
Action 16: Create New Work Order at line: 2705
Action 16: Finished at line: 2719


Current number of processed Emails is: 5 at line: 2735
Action 2: Scan for invaild E-mails at line: 215
Number of SKIPPED unread E-mails:  at line: 226
Number of SKIPPED E-mails: 0 at line: 246
Action 2: Finished at line: 248
Action 4: Loop through E-mails at line: 302
Action 4: Finished at line: 361
Action 5: Store E-mail's contents at line: 371
Action 5: Finished at line: 495
Action 6: Test to Skip based on location at line: 508
Action 6: Finished at line: 710
Action 7: Check if location needs to be a suite at line: 720
The 'Bathroom' is not mentioned in the Description. Suite not needed. at line: 2180
Action 7: Finished at line: 2186
Action 11: Send E-mail Data to it's proper field at line: 2324


Work Order Number: 660313

Action 11: Finished at line: 2511

Change status was called at line: 2758
Sub-Action 2: Change E-mail to Read at line: 2223
Current email has been changed from Unread to Read. at line: 2226
Sub-Action 2: Finished at line: 2230
Action 16: Create New Work Order at line: 2705
Action 16: Finished at line: 2719


Current number of processed Emails is: 6 at line: 2735
Action 2: Scan for invaild E-mails at line: 215
Number of SKIPPED unread E-mails:  at line: 226
Number of SKIPPED E-mails: 0 at line: 246
Action 2: Finished at line: 248
Action 4: Loop through E-mails at line: 302
Action 4: Finished at line: 361
Action 5: Store E-mail's contents at line: 371
Action 5: Finished at line: 495
Action 6: Test to Skip based on location at line: 508
Proper Building format used. Send Location: YT6508
Action 6: Finished at line: 710
Action 7: Check if location needs to be a suite at line: 720
The 'Bathroom' is not mentioned in the Long Description. Suite not needed. at line: 1475
Action 7: Finished at line: 2186
Action 11: Send E-mail Data to it's proper field at line: 2324


Work Order Number: 660314

Action 11: Finished at line: 2511

Change status was called at line: 2758
Sub-Action 2: Change E-mail to Read at line: 2223
Current email has been changed from Unread to Read. at line: 2226
Sub-Action 2: Finished at line: 2230
Action 16: Create New Work Order at line: 2705
Action 16: Finished at line: 2719


Current number of processed Emails is: 7 at line: 2735
Action 2: Scan for invaild E-mails at line: 215
Number of SKIPPED unread E-mails:  at line: 226
Number of SKIPPED E-mails: 0 at line: 246
Action 2: Finished at line: 248
Action 4: Loop through E-mails at line: 302
Action 4: Finished at line: 361
Action 5: Store E-mail's contents at line: 371
Action 5: Finished at line: 495
Action 6: Test to Skip based on location at line: 508
Proper Building format used. Send Location: CN2116
Action 6: Finished at line: 710
Action 7: Check if location needs to be a suite at line: 720
The 'Bathroom' is not mentioned in the Long Description. Suite not needed. at line: 1475
Action 7: Finished at line: 2186
Action 11: Send E-mail Data to it's proper field at line: 2324
Sub-Action 3: Split Long Description at line: 2522
Sub-Action 3: Finished at line: 2576


Work Order Number: 660315

Action 11: Finished at line: 2511

Change status was called at line: 2758
Sub-Action 2: Change E-mail to Read at line: 2223
Current email has been changed from Unread to Read. at line: 2226
Sub-Action 2: Finished at line: 2230
Action 16: Create New Work Order at line: 2705
Action 16: Finished at line: 2719


Current number of processed Emails is: 8 at line: 2735
Action 2: Scan for invaild E-mails at line: 215
Number of SKIPPED unread E-mails:  at line: 226
Number of SKIPPED E-mails: 0 at line: 246
Action 2: Finished at line: 248
Action 4: Loop through E-mails at line: 302
Action 4: Finished at line: 361
Action 5: Store E-mail's contents at line: 371
Action 5: Finished at line: 495
Action 6: Test to Skip based on location at line: 508
Proper Building format used. Send Location: DT4905
Action 6: Finished at line: 710
Action 7: Check if location needs to be a suite at line: 720
Action 7: Finished at line: 2186
Action 11: Send E-mail Data to it's proper field at line: 2324


Work Order Number: 660316

Action 11: Finished at line: 2511

Change status was called at line: 2758
Sub-Action 2: Change E-mail to Read at line: 2223
Current email has been changed from Unread to Read. at line: 2226
Sub-Action 2: Finished at line: 2230
Action 16: Create New Work Order at line: 2705
Action 16: Finished at line: 2719


Current number of processed Emails is: 9 at line: 2735
Action 2: Scan for invaild E-mails at line: 215
Number of SKIPPED unread E-mails:  at line: 226
Number of SKIPPED E-mails: 0 at line: 246
Action 2: Finished at line: 248
Action 4: Loop through E-mails at line: 302
Action 4: Finished at line: 361
Action 5: Store E-mail's contents at line: 371
Action 5: Finished at line: 495
Action 6: Test to Skip based on location at line: 508
Proper Building format used. Send Location: YT6513
Action 6: Finished at line: 710
Action 7: Check if location needs to be a suite at line: 720
Young Tower has no suites!
Action 7: Finished at line: 2186
Action 11: Send E-mail Data to it's proper field at line: 2324
Sub-Action 3: Split Long Description at line: 2522
Sub-Action 3: Finished at line: 2576


Work Order Number: 660317

Action 11: Finished at line: 2511

Change status was called at line: 2758
Sub-Action 2: Change E-mail to Read at line: 2223
Current email has been changed from Unread to Read. at line: 2226
Sub-Action 2: Finished at line: 2230
Action 16: Create New Work Order at line: 2705
Action 16: Finished at line: 2719


Current number of processed Emails is: 10 at line: 2735
Action 2: Scan for invaild E-mails at line: 215
Number of SKIPPED unread E-mails:  at line: 226
Number of SKIPPED E-mails: 0 at line: 246
Action 2: Finished at line: 248
Action 4: Loop through E-mails at line: 302
Action 4: Finished at line: 361
Action 5: Store E-mail's contents at line: 371
Action 5: Finished at line: 495
Action 6: Test to Skip based on location at line: 508
Proper Building format used. Send Location: BT3310
Action 6: Finished at line: 710
Action 7: Check if location needs to be a suite at line: 720
The 'Bathroom' is not mentioned in the Long Description. Suite not needed. at line: 1475
Action 7: Finished at line: 2186
Action 11: Send E-mail Data to it's proper field at line: 2324
Sub-Action 3: Split Long Description at line: 2522
Sub-Action 3: Finished at line: 2576


Work Order Number: 660318

Action 11: Finished at line: 2511

Change status was called at line: 2758
Sub-Action 2: Change E-mail to Read at line: 2223
Current email has been changed from Unread to Read. at line: 2226
Sub-Action 2: Finished at line: 2230
Action 16: Create New Work Order at line: 2705
Action 16: Finished at line: 2719


Current number of processed Emails is: 11 at line: 2735
Action 2: Scan for invaild E-mails at line: 215
Number of SKIPPED unread E-mails:  at line: 226
Number of SKIPPED E-mails: 0 at line: 246
Action 2: Finished at line: 248
Action 4: Loop through E-mails at line: 302
Action 4: Finished at line: 361
Action 5: Store E-mail's contents at line: 371
Action 5: Finished at line: 495
Action 6: Test to Skip based on location at line: 508
Proper Building format used. Send Location: BT3411
Action 6: Finished at line: 710
Action 7: Check if location needs to be a suite at line: 720
The 'Bathroom' is not mentioned in the Description. Suite not needed. at line: 2180
Action 7: Finished at line: 2186
Action 11: Send E-mail Data to it's proper field at line: 2324
Sub-Action 3: Split Long Description at line: 2522
Sub-Action 3: Finished at line: 2576


Work Order Number: 660319

Action 11: Finished at line: 2511

Change status was called at line: 2758
Sub-Action 2: Change E-mail to Read at line: 2223
Current email has been changed from Unread to Read. at line: 2226
Sub-Action 2: Finished at line: 2230
Action 16: Create New Work Order at line: 2705
Action 16: Finished at line: 2719


Current number of processed Emails is: 12 at line: 2735
Action 2: Scan for invaild E-mails at line: 215
Number of SKIPPED unread E-mails:  at line: 226
Number of SKIPPED E-mails: 0 at line: 246
Action 2: Finished at line: 248
Action 4: Loop through E-mails at line: 302
Action 4: Finished at line: 361
Action 5: Store E-mail's contents at line: 371
Action 5: Finished at line: 495
Action 6: Test to Skip based on location at line: 508
Proper Building format used. Send Location: DT4519
Action 6: Finished at line: 710
Action 7: Check if location needs to be a suite at line: 720
The 'Bathroom' is not mentioned in the Description. Suite not needed. at line: 2180
Action 7: Finished at line: 2186
Action 11: Send E-mail Data to it's proper field at line: 2324
Sub-Action 3: Split Long Description at line: 2522
Sub-Action 3: Finished at line: 2576


Work Order Number: 660320

Action 11: Finished at line: 2511

Change status was called at line: 2758
Sub-Action 2: Change E-mail to Read at line: 2223
Current email has been changed from Unread to Read. at line: 2226
Sub-Action 2: Finished at line: 2230
Action 16: Create New Work Order at line: 2705
Action 16: Finished at line: 2719


Current number of processed Emails is: 13 at line: 2735
Action 2: Scan for invaild E-mails at line: 215
Number of SKIPPED unread E-mails:  at line: 226
Number of SKIPPED E-mails: 0 at line: 246
Action 2: Finished at line: 248
Action 4: Loop through E-mails at line: 302
!>12:51:55 AutoIt3.exe ended.rc:-1073741819
+>12:51:55 AutoIt3Wrapper Finished.
>Exit code: 3221225477    Time: 354.6

 

Edited by nooneclose
Problem solved
Link to post
Share on other sites

@JosI added this  to my code:

;*******************************************************************************
; COM ERROR HANDLER for LoopUnreadEmails
;*******************************************************************************
Local $oMyError = ObjEvent("AutoIt.Error", "ErrFunc")

; This is a custom error handler
Func ErrFunc($oError)
    ConsoleWrite(@CRLF & @CRLF & "We intercepted a COM Error ! " & _
                 " Number: 0x " & Hex($oError.number, 8) & @CRLF & _
                 "Description: " & $oError.windescription & _
                 "At line: " & $oError.scriptline & @CRLF & @CRLF)
EndFunc   ;==>ErrFunc

and one of the intercepted errors was:

"We intercepted a COM Error!  Number: 0x 80020009
Description: Exception occurred.
At line: 3060"

by code stops at line: 2943

Did I do something wrong? 

SIDE NOTE: all of the com errors were on lines that were commented out or were empty? Is that normal?  

Edited by nooneclose
Link to post
Share on other sites
  • Developers

Did you compile the script as that will/could change the line number of the line having the issue?
Au3stripper could help you there by using the merge-only option as that will generate a source file which should be quite similar.

Jos
 

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to post
Share on other sites

You're getting errors on lines that don't match because the #includes you have are added to the script where the line "#include ..." is. I would add a line "#AutoIt3Wrapper_Run_Au3Stripper=y", compile it, and finally open and run the stripped version. Then you'll see exactly which line the error/s occur on.

All my code provided is Public Domain... but it may not work. ;) Use it, change it, break it, whatever you want.

Spoiler

My Humble Contributions:
Personal Function Documentation - A personal HelpFile for your functions
Acro.au3 UDF - Automating Acrobat Pro
ToDo Finder - Find #ToDo: lines in your scripts

Link to post
Share on other sites

@seadoggie01 should I have that line per #include or just once? I did that and got this error message.

-### StripOnly/StripFunc Error: Found Call() statement using unsolvable Func, which will/could lead to removal of Funcs that are used by this Function.
>### current Func: __winhttpformupload
c:\program files (x86)\autoit3\include\winhttp.au3(2365,1): Warning for line:Call($aClbk[0], Floor($i * 100 / $aClbk[1])) 

-### StripOnly/StripFunc Error: Found ObjEvent() statement using unsolvable Func, which will/could lead to removal of Funcs that are used by this Function.
>### current Func: @@
C:\Users\a\Desktop\Bots\MyBotScripts\WD_WO_BOT.au3(99,1): Warning for line:Local $oMyError = ObjEvent("AutoIt.Error","MyErrFunc") 

-=============================================================================================================
-#### Au3Stripper Found   2 Error(s)!!!!    This means your script could have problems running properly.  ####
-=============================================================================================================
- 3.75 Iteration 1 Strip Functions result: Output  7349 lines, stripped 16000 Func lines and 17668 Commentlines
- 6.50 Iteration 2 Strip Variables result: Output  4821 lines and stripped 2528 lines
- 7.50 Iteration 3 Strip Variables result: Output  4766 lines and stripped 55 lines
- 8.50 Iteration 4 Strip Variables result: Output  4765 lines and stripped 1 lines
- 9.50 Iteration 5 Strip Variables result: Output  4765 lines and stripped 0 lines
+> Source    41633 lines 2023541 Characters.
+> Stripped  18584 Func/Var lines and  17668 comment lines, Total 1809307 Characters.
+> Saved     87% lines 89% Characters.
+> Au3Stripper v18.708.1148.0 finished created:C:\Users\a\Desktop\Bots\MyBotScripts\WD_WO_BOT_stripped.au3
!>08:14:16 ---------------------------------------------------------------
!>08:14:16 Au3Stripper ended with errors, using original scriptfile.rc:2
!>08:14:16 ---------------------------------------------------------------

OK, I did what you said and ran the stripped version and got these as the com errors:


We intercepted a COM Error !  Number: 0x 80020006
Description: Unknown name.
At line: 878
Local $oOL = ObjGet("", "Outlook.Application")


We intercepted a COM Error !  Number: 0x 80020009
Description: Exception occurred.
At line: 1048
Local $iItems = $oItems.Count

We intercepted a COM Error !  Number: 0x 80020009
Description: Exception occurred.
At line: 1114
$aProperties[$iCounter][1] = $oProperty.value

Edited by nooneclose
forgot some of the error message
Link to post
Share on other sites

That's weird. That first line shouldn't throw a COM error from what I understand. You have the full version of Office, right? Not a trial version? If you do, you've reached the end of my knowledge... I don't get why this would appear.

All my code provided is Public Domain... but it may not work. ;) Use it, change it, break it, whatever you want.

Spoiler

My Humble Contributions:
Personal Function Documentation - A personal HelpFile for your functions
Acro.au3 UDF - Automating Acrobat Pro
ToDo Finder - Find #ToDo: lines in your scripts

Link to post
Share on other sites

  Could you please extend your COM error handler a bit?

; This is a custom error handler
Func ErrFunc($oError)
    Local $bHexNumber = Hex($oError.number, 8)
    ConsoleWrite(@CRLF & @CRLF & "We intercepted a COM Error ! " & _
            " Number: 0x " & Hex($oError.number, 8) & @CRLF & _
            "Description: " & $oError.windescription & _
            "At line: " & $oError.scriptline & @CRLF & @CRLF & _
            "@AutoItVersion = " & @AutoItVersion & @CRLF & _
            "@AutoItX64 = " & @AutoItX64 & @CRLF & _
            "@Compiled = " & @Compiled & @CRLF & _
            "@OSArch = " & @OSArch & @CRLF & _
            "@OSVersion = " & @OSVersion & @CRLF & _
            "Scriptline = " & $oError.scriptline & @CRLF & _
            "NumberHex = " & $bHexNumber & @CRLF & _
            "Number = " & $oError.number & @CRLF & _
            "WinDescription = " & StringStripWS($oError.WinDescription, 2) & @CRLF & _
            "Description = " & StringStripWS($oError.Description, 2) & @CRLF & _
            "Source = " & $oError.Source & @CRLF & _
            "HelpFile = " & $oError.HelpFile & @CRLF & _
            "HelpContext = " & $oError.HelpContext & @CRLF & _
            "LastDllError = " & $oError.LastDllError & @CRLF)                 
                 
EndFunc   ;==>ErrFunc

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2021-06-05 - Version 1.5.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (NEW 2021-06-14 - Version 1.6.5.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (NEW 2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to post
Share on other sites

Here is the new output:

 

We intercepted a COM Error !  Number: 0x 80020006
Description: Unknown name.
At line: 194 (This happened 1 time at the very begining)

@AutoItVersion = 3.3.14.5
@AutoItX64 = 0
@Compiled = 0
@OSArch = X64
@OSVersion = WIN_10
Scriptline = 194
Number = -2147352570
WinDescription = Unknown name.
Description = 
Source = 
HelpFile = 
HelpContext = 
LastDllError = 0

 

NOTE: These two happened every time the code looped so 58 times

We intercepted a COM Error !  Number: 0x 80020009
Description: Exception occurred.
At line: 2906

@AutoItVersion = 3.3.14.5
@AutoItX64 = 0
@Compiled = 0
@OSArch = X64
@OSVersion = WIN_10
Scriptline = 2906
Number = -2147352567
WinDescription = Exception occurred.
Description = The operation failed.
Source = Microsoft Outlook
HelpFile = 
HelpContext = 0
LastDllError = 0


We intercepted a COM Error !  Number: 0x 80020009
Description: Exception occurred.
At line: 3060

@AutoItVersion = 3.3.14.5
@AutoItX64 = 0
@Compiled = 0
@OSArch = X64
@OSVersion = WIN_10
Scriptline = 3060
Number = -2147352567
WinDescription = Exception occurred.
Description = The operation failed.
Source = Microsoft Outlook
HelpFile = 
HelpContext = 0
LastDllError = 0

Link to post
Share on other sites

What id in line 3060 ?

 

Signature beginning:
Please remember: "AutoIt".....  Wondering who uses AutoIt and what it can be used for ?
 Forum Rules *
Include Dependency Tree (Tool for analyzing script relations)
ADO.au3 UDF     POP3.au3 UDF     XML.au3 UDF  for other useful stuff click the following button

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST APIErrorLog.au3 UDF - A logging Library *

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * 

OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskSchedulerIE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) *

PDF Related:How to get reference to PDF object embeded in IE *

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

I also encourage you to check awesome @trancexx code:  * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuffOnHungApp handlerAvoid "AutoIt Error" message box in unknown errors  * HTML editor

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2021-09-28

Link to post
Share on other sites

Sorry, I forgot to run it with the stripped version last time. 

Here are the real results:

 

(This happened once at the beginning) 

We intercepted a COM Error !  Number: 0x 80020006
Description: Unknown name.
At line: 878
Local $oOL = ObjGet("", "Outlook.Application")

@AutoItVersion = 3.3.14.5
@AutoItX64 = 0
@Compiled = 0
@OSArch = X64
@OSVersion = WIN_10
Scriptline = 878
Number = -2147352570
WinDescription = Unknown name.
Description = 
Source = 
HelpFile = 
HelpContext = 
LastDllError = 0


(These two happen at least 60 times out of 65 runs)

We intercepted a COM Error !  Number: 0x 80020009
Description: Exception occurred.
At line: 1114
$aProperties[$iCounter][1] = $oProperty.value

@AutoItVersion = 3.3.14.5
@AutoItX64 = 0
@Compiled = 0
@OSArch = X64
@OSVersion = WIN_10
Scriptline = 1114
Number = -2147352567
WinDescription = Exception occurred.
Description = The operation failed.
Source = Microsoft Outlook
HelpFile = 
HelpContext = 0
LastDllError = 0


We intercepted a COM Error !  Number: 0x 80020009
Description: Exception occurred.
At line: 1048
Local $iItems = $oItems.Count

@AutoItVersion = 3.3.14.5
@AutoItX64 = 0
@Compiled = 0
@OSArch = X64
@OSVersion = WIN_10
Scriptline = 1048
Number = -2147352567
WinDescription = Exception occurred.
Description = The operation failed.
Source = Microsoft Outlook
HelpFile = 
HelpContext = 0
LastDllError = 0

Link to post
Share on other sites

Unknown name at the beginning is OK. AS _OL_Open tries to connect to a running instance. If none exists, then you get this error and Outlook gets started.

The operation failed for $oProperty.value means that the property does not exist or the value has not been st.

I can only imagine that for $oItems.Count "The operation fails" means that $oItems isn't an object.
 

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2021-06-05 - Version 1.5.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (NEW 2021-06-14 - Version 1.6.5.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (NEW 2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By DJ143
      I have a autoit exe file which is used in upload/browse file functionality.  This has been integrated with selenium framework and I am invoking the autoit exe using Java process and runtime. 
      Now the issue is when I run the scripts and invoke the autoit exe in local it works perfectly.  But when I use selenium grid or jenkins to run the scripts in another windows server it is not working.
      Can anyone please suggest any solution for this?
    • By Hermes
      Hello, the script below will read column A from an excel file - and if a value matches in the browser, it will click the corresponding link and click on a specific button to paste the data, then writes "Completed" in Column B. It will continue to read from the excel file and do the same thing for all the remaining rows.
      #Include "Chrome.au3" #Include "wd_core.au3" #Include "wd_helper.au3" #Include "WinHttp.au3" #include <MsgBoxConstants.au3> #include <File.au3> #include <IE.au3> #include <Array.au3> #include <INet.au3> #include <AutoItConstants.au3> #include <WinAPIFiles.au3> #include <GDIPlus.au3> #include <Excel.au3> #Include "WinHttp.au3" #Include "_HtmlTable2Array.au3" Local $sDesiredCapabilities, $sSession SetupChrome() _WD_Startup() $sSession = _WD_CreateSession($sDesiredCapabilities) _WD_LoadWait($sSession) _WD_Navigate($sSession, "table1.html") _WD_LoadWait($sSession) _WD_WaitElement($sSession, $_WD_LOCATOR_ByXPath, "//table[@class='main']") Local $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//table[@class='main']") ;ConsoleWrite ("mat-table " & $sElement & @CRLF) Local $aArray1 = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, ".//td[contains(@class,'data')]", $sElement, True) sleep(1000) For $i = 0 to UBound($aArray1) - 1 $aArray1[$i] = _WD_ElementAction($sSession, $aArray1[$i], 'text') Next ;_ArrayDisplay($aArray1) ;Email variables $SmtpServer = "" ; address for the smtp-server to use - REQUIRED $FromName = "Hermes" ; name from who the email was sent $FromAddress = "sender@gmail.com" ; address from where the mail should come $ToAddress = "recipient@gmail.com" ; destination address of the email - REQUIRED, use commas (,) to add more email addresses $Subject = "File not found" ; subject from the email - can be anything you want it to be $Body = "File not found!" ; the messagebody from the mail - can be left blank but then you get a blank mail $AttachFiles = "" ; the file(s) you want to attach seperated with a ; (Semicolon) - leave blank if not needed $CcAddress = "" ; address for cc - leave blank if not needed $BccAddress = "" ; address for bcc - leave blank if not needed $Importance = "High" ; Send message priority: "High", "Normal", "Low" $Username = "" ; username for the account used from where the mail gets sent - REQUIRED $Password = "" ; password for the account used from where the mail gets sent - REQUIRED $IPPort = 25 ; port used for sending the mail $ssl = 0 ; enables/disables secure socket layer sending - put to 1 if using httpS $tls = 0 ; enables/disables TLS when required Local $oAppl = _Excel_Open() Local $sWorkbook = "c:\test.xlsx" Local $oWorkbook = _Excel_BookOpen($oAppl, $sWorkbook) ;open excel and pass both parameters If FileExists($sWorkbook) Then ;Check if the file exist. Local $oAppl = _Excel_Open() Local $sWorkbook = "c:\test.xlsx" Local $oWorkbook = _Excel_BookOpen($oAppl, $sWorkbook) ;open excel and pass both parameters Local $aArray2 = _Excel_RangeRead($oWorkbook,Default,$oWorkbook.ActiveSheet.Usedrange.Columns("A:A")) Local $iIdx Local $Skipline = 0 ;0==> first line Do Local $temprf For $i = 0 To UBound($aArray2) - 1 $temprf &= $aArray2[$i] _WD_WaitElement($sSession, $_WD_LOCATOR_ByXPath, ".//a[contains(@class,'edit') and contains(text(),'Edit')]") Local $aElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, ".//a[contains(@class,'edit') and contains(text(),'Edit')]", $sElement, True) $iIdx = _ArraySearch($aArray1, $aArray2[$i]) If @error Then ContinueLoop _WD_ElementAction($sSession, $aElement[$iIdx], 'click') If $i < $Skipline Then ContinueLoop $oRange = $oWorkbook.ActiveSheet.Range("B" & $i + 1 & ":XFD" & $i + 1) _Excel_RangeCopyPaste($oWorkbook.Activesheet, $oRange) ;Paste Local $oTest4 = _WD_FindElement($sSession, $_WD_LOCATOR_ByCSSSelector, "pastebutton") _WD_ElementAction($sSession, $oTest4, 'click') Sleep(1000) ;Save Button Local $save3 = _WD_FindElement($sSession, $_WD_LOCATOR_ByCSSSelector, "button.button") _WD_ElementAction($sSession, $save3, 'click') _Excel_RangeWrite($oWorkbook, $oWorkbook.Activesheet, "Completed", "B" & $i+1) sleep(1000) Next Until (Not @error) _Excel_Close($oWorkbook) Else _INetSmtpMailCom($SmtpServer, $FromName, $FromAddress, $ToAddress, $Subject, $Body, $CcAddress, $BccAddress, $Importance, $Username, $Password, $IPPort, $ssl, $tls) Exit EndIf _WD_LoadWait($sSession) ;Attaching files to emails Func _INetSmtpMailCom($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject = "", $as_Body = "", $s_CcAddress = "", $s_BccAddress = "", $s_Importance="Normal", $s_Username = "", $s_Password = "", $IPPort = 25, $ssl = 0, $tls = 0) Local $objEmail = ObjCreate("CDO.Message") $objEmail.From = '"' & $s_FromName & '" <' & $s_FromAddress & '>' $objEmail.To = $s_ToAddress Local $i_Error = 0 Local $i_Error_desciption = "" If $s_CcAddress <> "" Then $objEmail.Cc = $s_CcAddress If $s_BccAddress <> "" Then $objEmail.Bcc = $s_BccAddress $objEmail.Subject = $s_Subject If StringInStr($as_Body, "<") And StringInStr($as_Body, ">") Then $objEmail.HTMLBody = $as_Body Else $objEmail.Textbody = $as_Body & @CRLF EndIf $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = $s_SmtpServer If Number($IPPort) = 0 then $IPPort = 25 $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = $IPPort ;Authenticated SMTP If $s_Username <> "" Then $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") = $s_Username $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") = $s_Password EndIf ; Set security params If $ssl Then $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True If $tls Then $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendtls") = True ;Update settings $objEmail.Configuration.Fields.Update ; Set Email Importance Switch $s_Importance Case "High" $objEmail.Fields.Item ("urn:schemas:mailheader:Importance") = "High" Case "Normal" $objEmail.Fields.Item ("urn:schemas:mailheader:Importance") = "Normal" Case "Low" $objEmail.Fields.Item ("urn:schemas:mailheader:Importance") = "Low" EndSwitch $objEmail.Fields.Update ; Sent the Message $objEmail.Send $objEmail="" EndFunc ;==>_INetSmtpMailCom Local $aDir = _FileListToArrayRec(@TempDir, "scoped_dir*;chrome_*", $FLTAR_FOLDERS, $FLTAR_NORECUR, $FLTAR_NOSORT, $FLTAR_FULLPATH) Sleep(2000) For $i = 1 To $aDir[0] DirRemove($aDir[$i], $DIR_REMOVE) Next _WD_LoadWait($sSession) _WD_Shutdown() Func SetupChrome() _WD_Option('Driver', 'chromedriver.exe') _WD_Option('Port', 9515) _WD_Option('DriverParams', '--log-path="' & @ScriptDir & '\chrome.log"') $sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"goog:chromeOptions": {"w3c": true, "args":["start-maximized","disable-infobars"]}}}}' EndFunc ;==>SetupChrome If the excel file doesn't exists in the folder, it will send an email to a specific recipient.
      What i am trying figure out now is if the excel crashes while the script/loop is running, I want to relaunch the excel file continue to the last row before the excel crashed. So if the value of column B is not marked as "completed", it should continue from that row
      Appreciate any help that I can get to achieve this.
      table1.html test.xlsx
    • By adityaparakh
      Hello ,
      I am trying to use Websockets in AutoIt.
      It is to fetch live stock market prices , API is provided and documentation available for python language.
      The link for the code snippet is :
      https://symphonyfintech.com/xts-market-data-front-end-api-v2/#tag/Introduction
      https://symphonyfintech.com/xts-market-data-front-end-api-v2/#tag/Instruments/paths/~1instruments~1subscription/post
       
      https://github.com/symphonyfintech/xts-pythonclient-api-sdk
       
      Second Link is to subscribe to a list of ExchangeInstruments.
      Now I would like to get live stock ltp (LastTradedPrice) for a few stocks whose "ExchangeInstrumentID" I know.
      I am able to use the WinHttp object to perform actions using simple codes like below :
      I have the secretKey and appkey and can generate the needed token. And get the unique ExchangeInstrumentID.

      Below code is just for example of how I am using WinHttp. Unrelated to socket part.
      Global $InteractiveAPItoken = IniRead(@ScriptDir & "\Config.ini", "token", "InteractiveAPItoken", "NA") $baseurl = "https://brokerlink.com/interactive/" $functionurl = "orders" $oHTTP = ObjCreate("winhttp.winhttprequest.5.1") $oHTTP.Open("POST", $baseurl & $functionurl, False) $oHTTP.SetRequestHeader("Content-Type", "application/json;charset=UTF-8") $oHTTP.SetRequestHeader("authorization", $InteractiveAPItoken) $pD = '{ "exchangeSegment": "NSEFO", "exchangeInstrumentID": ' & $exchangeInstrumentID & ', "productType": "' & $producttype & '", "orderType": "MARKET", "orderSide": "' & $orderside & '", "timeInForce": "DAY", "disclosedQuantity": 0, "orderQuantity": ' & $qty & ', "limitPrice": 0, "stopPrice": 0, "orderUniqueIdentifier": "' & $orderidentifier & '"}' $oHTTP.Send($pD) $oReceived = $oHTTP.ResponseText $oStatusCode = $oHTTP.Status
          
          
      But am struggling to understand and use socket.
      Would be of great help if you can have a look at the link mentioned above and help with the code sample for AutoIt.
      To connect and listen to a socket.
      Thanks a lot
       
    • By Hermes
      Hi, I have a site that has the following elements below: 
      <div>More element here</div> <div>More element here</div> <div>More element here</div> When I do this in Auto It:
      Local $oSelectDiv = _WD_FindElement($sSession, $_WD_LOCATOR_ByCSSSelector, "div") _WD_HighlightElement($sSession, $oSelectDiv, 1) I also tried to add [3], but it doesnt seems to work:
      Local $oSelectDiv = _WD_FindElement($sSession, $_WD_LOCATOR_ByCSSSelector, "div[3]") _WD_HighlightElement($sSession, $oSelectDiv, 1) It always highlight the first one, but I am trying to highlight the 3rd in the list. Is there anyway to select the 3rd div without having to add any class/id in the divs, and without using XPATH? The structure of the elements in that site were built that way.
    • By meety
      My au3 script program needs administrator privileges on win10 to be executed correctly, because it needs to be added to the boot---Script code:RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", @ScriptName, "REG_SZ", @ScriptFullPath)
      I need to let the program automatically get administrator privileges, so I use a function of #RequireAdmin. Although the program can be added to the boot, but does not execute after system boot up? why is that?
      What should I do?
      --------------------------------------------------------------------
      Update:
      I found that after using the #RequireAdmin function, the program cannot be executed after system boot up.
      An example is given below. after it is compiled, it will not be executed after system boot up in the following two ways.
      1. C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\
      2. RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", @ScriptName, "REG_SZ", @ScriptFullPath)
      why is that?
      example
      #include <MsgBoxConstants.au3>
      #RequireAdmin
      Func test()
          MsgBox(0, "", "this is test message")
      EndFunc   ;==>test
      test()
       
       
×
×
  • Create New...