Jump to content

[SOLVED] What is error 0? _OL_ItemFind


Recommended Posts

@water I am getting this error for the first time ever. I have run my code well over 60 times and I'm a bit confused as to why I am sometimes getting this error now. 

Here is the code and the error message that popped up:

$aItems = _OL_ItemFind($oOutlook, "*\Outlook-UDF-Test", $olMail, "[UnRead]=True", "", "", "EntryID,Subject", "", 1)
    If Not IsArray($aItems) Then Exit MsgBox(48, "", "@error = " & @error & ", @extended: " & @extended & " at line: " & @ScriptLineNumber)

@error = 0, @extended: 0 at line 317

I tried looking in the OutLookEX UDF and there is no explanation of error 0

This is what the UDF says about "_OL_ItemFind"

Success: One based two-dimensional array with the properties specified by $sReturnProperties
Failure: Returns "" and sets @error:
    1 - You have to specifiy $sSearchName AND $sSearchValue or none of them
    2 - $sWarningClick not found
    3 - Error accessing the specified folder. See @extended for errorcode returned by _OL_FolderAccess
    4 - Error accessing specified property. @extended is set to the COM error
    5 - Error filtering items. @extended is set to the COM error
    1nmm - Error checking the $sReturnProperties as returned by __OL_CheckProperties. n is either 0 (property does not exist) or 1 (Property has invalid case)     mm is the index of the property in error (one based)

As always any help or suggestions will be greatly appreciated. 

Edited by nooneclose
Error was fixed
Link to post
Share on other sites

That's a bug in the example script.
_OL_ItemFind returns an error but IsArray resets @error and @extended.

Replace line

If Not IsArray($aItems) Then Exit MsgBox(48, "", "@error = " & @error & ", @extended: " & @extended & " at line: " & @ScriptLineNumber)

with

If @error <> 0 Then Exit MsgBox(48, "", "@error = " & @error & ", @extended: " & @extended & " at line: " & @ScriptLineNumber)

 

Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.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 (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

Thank you for getting back with me. I did as you said and now I am getting this error:

"@error = 4, @extended 2 at line 317"

so I am having this problem?

 4 - Error accessing specified property. @extended is set to the COM error

 Sometimes it runs the first time and sometimes five or six times before this error occurs. 

 how would I go about fixing it? 

Link to post
Share on other sites

You just want to retrieve EntryID and Subject?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.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 (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

When searching for emails you get more than just emails. You get receipts as well. They have a limited set of properties. So when you try to retrieve one of this (non existing) properties you get this error.
For the time being I suggest to just retrieve the EntryID by _OL_ItemFind and then call _OL_ItemGet for each returned item and retrieve the rest of the properties.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.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 (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

@water so something like this?

$aItems = _OL_ItemFind($oOutlook, "*\Outlook-UDF-Test", $olMail, "[UnRead]=True", "", "", "EntryID,Subject", "", 1)
    If @error <> 0 Then Exit MsgBox(48, "", "@error = " & @error & ", @extended: " & @extended & " at line: " & @ScriptLineNumber)

    ; TEST an idea from water the maker of the outlookEX udf
    Global $aOL_Properties = _OL_ItemGet($oOutlook, $aItems[1][0])
    If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF: _OL_ItemGet Example Script", "Error accessing properties. @error = " & @error)
    _ArrayDisplay($aOL_Properties, "OutlookEX UDF: All properties of a contact item (name, value, datatype)", "", 0, "|", "Name|Value|Type")

    ; Retrieve the item's object
    $oItem = $oOutlook.Session.GetItemFromID($aItems[1][0], Default)
    $oItem.GetInspector

    $eBody          = $oItem.Body                                       ; The Body of the E-mail
    $eSenderAddress = $oItem.SenderEmailAddress                         ; Customers E-mail address
    $eSentOn        = $oItem.SentOn                                     ; When was the E-mail sent?
    $eSubject       = $oItem.Subject                                    ; Subject of the E-mail

Is it a bad idea to loop through the emails using a function that does the _OL_ItemFind() every time? (that is what im doing) 

Link to post
Share on other sites

Something like this:

$aItems = _OL_ItemFind($oOutlook, "*\Outlook-UDF-Test", $olMail, "[UnRead]=True", "", "", "EntryID", "", 1)
If @error <> 0 Then Exit MsgBox(48, "", "@error = " & @error & ", @extended: " & @extended & " at line: " & @ScriptLineNumber)
ReDim $aItems[Ubound($aItems, 1)][Ubound($aItems, 2) + 4] ; Extend the array to store the properties we retrieve below
; TEST an idea from water the maker of the outlookEX udf
For $i = 1 to $aItems[0][0]
    $oItem = _OL_ItemGet($oOutlook, $aItems[$i][0], Default, -1)
    If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF: _OL_ItemGet Example Script", "Error retrieving item object. @error = " & @error)
    $aItems[$i][1] = $oItem.Body                                       ; The Body of the E-mail
    $aItems[$i][2] = $oItem.SenderEmailAddress                         ; Customers E-mail address
    $aItems[$i][3] = $oItem.SentOn                                     ; When was the E-mail sent?
    $aItems[$i][4] = $oItem.Subject                                    ; Subject of the E-mail
Next

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.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 (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

No? I meant to say that I literally call this function after each email. (Are you telling me how I should do it or asking me how I loop it? I would rather do it your way, you are smarter :D)

Here is the function that I call once before looping and then loop each time after the first email has been processed.  

 

Func LoopUnreadEmails()

    $aFolder = _OL_FolderAccess($oOutlook, "*\Outlook-UDF-Test", $olFolderInbox)
    If @error Then Exit MsgBox(48, "", "@error = " & @error & ", @extended: " & @extended & " at line: " & @ScriptLineNumber)

    $aItems = _OL_ItemFind($oOutlook, "*\Outlook-UDF-Test", $olMail, "[UnRead]=True", "", "", "EntryID,Subject", "", 1)
    If @error <> 0 Then Exit MsgBox(48, "", "@error = " & @error & ", @extended: " & @extended & " at line: " & @ScriptLineNumber)

    Global $aOL_Properties = _OL_ItemGet($oOutlook, $aItems[1][0])
    If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF: _OL_ItemGet Example Script", "Error accessing properties. @error = " & @error)
    ;_ArrayDisplay($aOL_Properties, "OutlookEX UDF: All properties of a contact item (name, value, datatype)", "", 0, "|", "Name|Value|Type")

    $oItem = $oOutlook.Session.GetItemFromID($aItems[1][0], Default)
    $oItem.GetInspector

    $eBody          = $oItem.Body                                       ; The Body of the E-mail
    $eSenderAddress = $oItem.SenderEmailAddress                         ; Customers E-mail address
    $eSentOn        = $oItem.SentOn                                     ; When was the E-mail sent?
    $eSubject       = $oItem.Subject                                    ; Subject of the E-mail

    Local $ebroEmail1 = $eSenderAddress
    Local $eBroEmail2 = StringReplace($ebroEmail1, @CR, "")
    Local $eBroEmail3 = StringReplace($eBroEmail2, @LF, "")
    Local $eBroEmail4 = StringReplace($eBroEmail3, @TAB, "")
    $eSenderAddress   = StringReplace($eBroEmail4, @CRLF, "")

    If $eSubject = "SKIPPED Maintenance Request from Eagle's Nest" Then
        ConsoleWrite("Subject had 'skipped'" & " at line: " & @ScriptLineNumber & @CRLF)
        ChangeEmailStatus()
        $count += 1
        Loop()
    ElseIf $eSubject <> "Maintenance Request from Eagle's Nest" Then
        ConsoleWrite("Subject did not include 'maintenance request from eagles nest'" & " at line: " & @ScriptLineNumber & @CRLF)
        ChangeEmailSubject()
    EndIf
    
EndFunc

 

 I got a new error: @error = 3, @extended: 4 at line 343

Line 343 is the: "$aItems = _OL_ItemFind($oOutlook, "*\Outlook-UDF-Test", $olMail, "[UnRead]=True", "", "", "EntryID,Subject", "", 1)"

Does outlookEX have known issues with WebDriver? I never got these errors until i upgraded my code to run with Webdriver?

 

Link to post
Share on other sites

The error might be caused by accessing the folder twice: By _OL_FolderAccess and by specifying the folder in _OL_ItemFind as text. I suggest:

$aFolder = _OL_FolderAccess($oOutlook, "*\Outlook-UDF-Test", $olFolderInbox)
If @error Then Exit MsgBox(48, "", "@error = " & @error & ", @extended: " & @extended & " at line: " & @ScriptLineNumber)

$aItems = _OL_ItemFind($oOutlook, $aFolder[1], $olMail, "[UnRead]=True", "", "", "EntryID,Subject", "", 1)
If @error <> 0 Then Exit MsgBox(48, "", "@error = " & @error & ", @extended: " & @extended & " at line: " & @ScriptLineNumber)

 

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.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 (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

Correct. Your original code

$aFolder = _OL_FolderAccess($oOutlook, "*\Outlook-UDF-Test", $olFolderInbox)
If @error Then Exit MsgBox(48, "", "@error = " & @error & ", @extended: " & @extended & " at line: " & @ScriptLineNumber)

$aItems = _OL_ItemFind($oOutlook, "*\Outlook-UDF-Test", $olMail, "[UnRead]=True", "", "", "EntryID,Subject", "", 1)
If @error <> 0 Then Exit MsgBox(48, "", "@error = " & @error & ", @extended: " & @extended & " at line: " & @ScriptLineNumber)

could be stripped down to

$aItems = _OL_ItemFind($oOutlook, "*\Outlook-UDF-Test", $olMail, "[UnRead]=True", "", "", "EntryID,Subject", "", 1)
If @error <> 0 Then Exit MsgBox(48, "", "@error = " & @error & ", @extended: " & @extended & " at line: " & @ScriptLineNumber)

 

Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.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 (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

@water I was able to capture that error again. Apparently it did not go away it is just that random. 

@error = 3, @extended: 4 at line 358 (same as line 2847)

This was the last thing on the OutPut before the code crashed.

We intercepted a COM Error !  Number: 0x 80020008
Description: Bad variable type.
At line: 1295

ElseIf StringRight($suite, 3) = 04 OR StringRight($suite, 3) = 06 Then

@AutoItVersion = 3.3.14.5
@AutoItX64 = 0
@Compiled = 0
@OSArch = X64
@OSVersion = WIN_10
Scriptline = 1295
Number = -2147352568
WinDescription = Bad variable type.
Description = 
Source = 
HelpFile = 
HelpContext = 
LastDllError = 0

 

@error = 3, @extended: 4 at line 2847

$aItems = _OL_ItemFind($oOutlook, "*\Outlook-UDF-Test", $olMail, "[UnRead]=True", "", "", "EntryID,Subject", "", 1)
If @error <> 0 Then Exit MsgBox(48, "", "@error = " & @error & ", @extended: " & @extended & " at line: " & @ScriptLineNumber)

 

This was the last thing that happened before the second crash. 

We intercepted a COM Error !  Number: 0x 80020008
Description: Bad variable type.
At line: 994

$oFolder = $oFolder.Folders($aFolders[$iIndex])

@AutoItVersion = 3.3.14.5
@AutoItX64 = 0
@Compiled = 0
@OSArch = X64
@OSVersion = WIN_10
Scriptline = 994
Number = -2147352568
WinDescription = Bad variable type.
Description = 
Source = 
HelpFile = 
HelpContext = 
LastDllError = 0

Edited by nooneclose
it happened again but in the stripped version
Link to post
Share on other sites

Shouldn't this

ElseIf StringRight($suite, 3) = 04 OR StringRight($suite, 3) = 06 Then

be

ElseIf StringRight($suite, 3) = "04" OR StringRight($suite, 3) = "06" Then

and BTW this line will never raise a COM exception.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.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 (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

Surprisingly enough I just have numbers in those strings and plain 04 works. it doesn't give an error or break if I don't use "04".

I am no longer having these issues.

I forgot what I changed to fix it. I have changed my code so much over the last 24 hours that all error checking just blended together. 

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 Zaoka
      HI,
      for couple of years I'm using  Jos script for sending reports, email with excel attachment. But from last week i'm getting this error when sending excel or word attachment
      message has lines too long for transport jpeg, pdf works with no problems, any sugestion ?
    • By diepfeile
      I'm using the following:
      Autoit 3.3.14.5
      newly installed Beta 3.3.15.5
      SQlite version 3380000 aka 3.38.0
      I put sqlite3.dll and sqlite3_x64.dll in C:\Windows\System32 since many scripts depend on them.


      I extended the output of _SQLite_Startup()
      with:
      ConsoleWrite("@AutoItX64 " & @AutoItX64 & @CRLF) ConsoleWrite("$sDll_Filename " & $sDll_Filename & @CRLF) ConsoleWrite("_SQLite_LibVersion=" & _SQLite_LibVersion() & @CRLF)

      Also using the script from https://www.autoitscript.com/autoit3/docs/libfunctions/_SQLite_Startup.htm for testing.

       
      >Running:(3.3.14.5):C:\Program Files (x86)\AutoIt3\autoit3.exe "R:\Download\aasdf.au3" @AutoItX64 0 $sDll_Filename sqlite3.dll _SQLite_LibVersion=0 >Running:(3.3.14.5):C:\Program Files (x86)\AutoIt3\autoit3_x64.exe "R:\Download\aasdf.au3" @AutoItX64 1 $sDll_Filename sqlite3_x64.dll _SQLite_LibVersion=3.38.0 >Running:(3.3.15.5):C:\Program Files (x86)\AutoIt3\Beta\autoit3.exe "R:\Download\aasdf.au3" @AutoItX64 0 $sDll_Filename sqlite3.dll _SQLite_LibVersion=0 >Running:(3.3.15.5):C:\Program Files (x86)\AutoIt3\Beta\autoit3_x64.exe "R:\Download\aasdf.au3" @AutoItX64 1 $sDll_Filename sqlite3_x64.dll _SQLite_LibVersion=3.38.0


      Why doesn't it work in 32bit, despite me having the 32bit sqlite.dll? Autoit urges running scripts in 32bit mode and Scite starts scripts just in 32bit mode without the flag?
      With #AutoIt3Wrapper_UseX64=Y it just works, both normal Autoit and beta!
      sqlite3.dll sqlite3_x64.dll
    • By Iraj
      Hello Team, Greetings!
      Is there any way to run any 3rd party application silently in background without the GUI getting in the front ?
      I was implementing angry-ip scanner with autoit & wanted the angry-ip application to run in background quietly as I am copying its output to other file on completion. is there any way to achieve my query?
      Below is code I tried: 
      $range = "192.168.0.1 192.168.0.255" ShellExecuteWait("C:\Windows\DDM\ipscan.exe","-f:range "&$iprange&" -q -o C:\temp\ScanResults.csv","","open",@SW_HIDE) Thanks!
    • By PeterVerbeek
      This topic give you access to an AutoIt functions library I maintain which is called PAL, Peter's AutoIt Library. The latest version 1.26 contains 214 functions divided into these topics:
      window, desktop and monitor GUI, mouse and color GUI controls including graphical buttons (jpg, png) logics and mathematics include constants string, xml string and file string dialogues and progress bars data lists: lists, stacks, shift registers and key maps (a.ka. dictionaries) miscellaneous: logging/debugging, process and system info Change log and files section  on the PAL website (SourceForge).
      A lot of these functions were created in the development of Peace, Peter's Equalizer APO Configuration Extension, which is a user interface for the system-wide audio driver called Equalizer APO.
    • By Hermes
      Hi, I am struggling in setting the value of a textarea based on the value of clipboard (that contains a long web page source codes). If I use _WD_SetElementValue, it freezes after some time, or appears to be pressing tab and goes out of focus. I can also use send keys but i need the script to run in the background.
      Here is the full script:
      #Include "Chrome.au3" #Include "wd_core.au3" #Include "wd_helper.au3" #Include "WinHttp.au3" #include <MsgBoxConstants.au3> #include <WinAPIFiles.au3> #include <Array.au3> #include <AutoItConstants.au3> #include <WinAPIFiles.au3> #include <GDIPlus.au3> #include <Excel.au3> Local $sDesiredCapabilities, $sSession SetupChrome() _WD_Startup() $sSession = _WD_CreateSession($sDesiredCapabilities) _WD_LoadWait($sSession) _WD_Navigate($sSession, "http://demo.borland.com/testsite/stadyn_largepagewithimages.html") _WD_LoadWait($sSession) Global $sSource = _WD_GetSource($sSession) Local $Paste = ClipPut($sSource) Local $sData = ClipGet() Local $aArray = 0, _ $iOffset = 1 While 1 $aArray = StringRegExp($sData, '(?s)<p>.*</p>', $STR_REGEXPARRAYMATCH, $iOffset) If @error Then ExitLoop $iOffset = @extended For $i = 0 To UBound($aArray) - 1 Local $Paste = ClipPut($aArray[$i]) Local $sRegExData = ClipGet() ;MsgBox(0, "", "$sRegExData = " & $sRegExData) Next WEnd _WD_Navigate($sSession, "https://www.w3schools.com/tags/tryit.asp?filename=tryhtml5_textarea_placeholder") _WD_WaitElement($sSession, $_WD_LOCATOR_ByCSSSelector, "iframe#iframeResult") Local $sElement1 = _WD_FindElement($sSession, $_WD_LOCATOR_ByCSSSelector, "iframe#iframeResult") _WD_FrameEnter($sSession, $sElement1) _WD_WaitElement($sSession, $_WD_LOCATOR_ByXPath, "//html/body/textarea") $textarea = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//html/body/textarea") _WD_ElementAction($sSession, $textarea, 'click') ;WD SetElementValue(SsSession, Stextarea, $sRegExData) <-- I can do this but the focus goes out, or the browser freezes _WD_FrameLeave($sSession) sleep(2000) Send("^v") _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 Can someone help me please, or re-direct me to the right path? TIA!
×
×
  • Create New...