Jump to content

NolleWed

Active Members
  • Posts

    49
  • Joined

  • Last visited

Everything posted by NolleWed

  1. Hi together, I have a problem with WebDriver with Firefox Browser. My colleagues and I use the same AutoIt script (same exe). With my PC it works wonderfully, with my colleagues always comes an error message when the Webdriver starts. Firefox is installed completely the same on all PCs. Can you give me a hint what the problem is, where I have to look and how I can solve the problem? Error: 1689922481051 geckodriver INFO Listening on 127.0.0.1:4444 1689922482881 webdriver::server DEBUG -> POST /session {"capabilities": {"alwaysMatch": {"browserName": "firefox", "acceptInsecureCerts":true}}} 1689922482918 webdriver::server DEBUG <- 500 Internal Server Error {"value":{"error":"session not created","message":"Expected browser binary location, but unable to find binary in default location, no 'moz:firefoxOptions.binary' capability provided, and no binary flag set on the command line","stacktrace":""}} no error: 1689928065527 geckodriver INFO Listening on 127.0.0.1:4444 1689928067114 webdriver::server DEBUG -> POST /session {"capabilities": {"alwaysMatch": {"browserName": "firefox", "acceptInsecureCerts":true}}} 1689928067114 geckodriver::capabilities DEBUG Trying to read firefox version from ini files 1689928067117 geckodriver::capabilities DEBUG Found version 102.13 1689928067121 mozrunner::runner INFO Running command: "C:\\Program Files\\Mozilla Firefox\\firefox.exe" "--marionette" "-no-remote" "-profile" "C:\\Users\\USERNAME\\AppData\\Local\\Temp\\rust_mozprofilehGj55P" 1689928067271 geckodriver::marionette DEBUG Waiting 60s to connect to browser on 127.0.0.1 1689928067271 geckodriver::browser TRACE Failed to open C:\Users\USERNAME\AppData\Local\Temp\rust_mozprofilehGj55P\MarionetteActivePort 1689928067271 geckodriver::marionette TRACE Retrying in 100ms Read port: 53743 1689928068731 geckodriver::marionette DEBUG Connection to Marionette established on 127.0.0.1:53743. 1689928070993 webdriver::server DEBUG <- 200 OK {"value":{"sessionId":"2d776d5a-7962-462f-8703-d6f80e0ef81f","capabilities":{"acceptInsecureCerts":true,"browserName":"firefox","browserVersion":"102.13.0","moz:accessibilityChecks":false,"moz:buildID":"20230629172511","moz:geckodriverVersion":"0.31.0","moz:headless":false,"moz:processID":22052,"moz:profile":"C:\\Users\\USERNAME\\AppData\\Local\\Temp\\rust_mozprofilehGj55P","moz:shutdownTimeout":60000,"moz:useNonSpecCompliantPointerOrigin":false,"moz:webdriverClick":true,"moz:windowless":false,"pageLoadStrategy":"normal","platformName":"windows","platformVersion":"10.0","proxy":{},"setWindowRect":true,"strictFileInteractability":false,"timeouts":{"implicit":0,"pageLoad":300000,"script":30000},"unhandledPromptBehavior":"dismiss and notify"}}} 1689928071012 webdriver::server DEBUG -> POST /session/2d776d5a-7962-462f-8703-d6f80e0ef81f/window/maximize {} 1689928071014 webdriver::server DEBUG <- 200 OK {"value":{"x":-8,"y":-8,"width":1936,"height":1056}} Thanks
  2. no, Add-Ons are not allowed
  3. no, I try to ask them. But I have no hope. Thanks for your help so far.
  4. In the post September 29, 2019 from Simpel he/she asks "Which of the policies should be set to 2 to get the following work?" I can´t see any answer in the following post. These are my settings in the regestry:
  5. The Office Version for all Office products is "Microsoft 365 Apps for Enterprise", but the App on the PC is Outlook 2016. I search the path of the App and get this: C:\Program Files (x86)\Microsoft Office\root\Office16\OUTLOOK.EXE
  6. I check the version in outlook and found this So I think its 32 Bit Version. I can´t deactivate all Add-Ons, because one is set by System Administrator (it´s a PC at work, not my private one) "Programmatic Access Security" is valid I do not get the solution for the last point Do I have to take another UDF for Outlook365 instead of OutlookEX.au3? Which one (link)? or Do I have to change the policies in regedit that OutlookEX.au3 works? Which parameter I have to change?
  7. Can´t use the free tool, because I have no rights to install tools on my PC (at work) all buttons with type submit in the HTML code: <input type="submit" value="XXX"> work fine with this code: Local $sButton2 = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//input[@value='XXX']") _WD_ElementAction($sSession, $sButton2, 'click') _WD_LoadWait($sSession, 2000) Thanks
  8. Today I tried the solutions on this website: Known issues with Microsoft Office automation. - AutoIt Wiki (autoitscript.com) points: Windows Registry + In Outlook 2016 But I get the same error. I think it has some to do with the field "Recipient" (to, cc, bcc) and "SentOnBehalfOf". I think in Office365 (Outlook 2016 App) the script do not find this fields. Can this be the error? _OL_ErrorNotify(2) $oOutlook= _OL_Open() If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF", "Error when calling function _OL_Open(). @error = " & @error & ", @extended = " & @extended) ; wenn Carrier nicht in Mail-Liste, dann Mail ans PF zur Prüfung, wie bei Neli-Liste ; neue E-Mail wird erstellt if $CarrierEMail = "nicht gefunden" Then $oItem = _OL_ItemCreate($oOutlook, $olMailItem, "", "", "Subject=[AutoIT:ZU PRUEFEN] #abw# weiterversorgen #kurzfristiger Storno# " & $alleNummern & " , " & $relevanteNummer & " , " & $Kundennummer_Wert, "", "SentOnBehalfOfName=ABW-Clearing-D019@telefonica.com") If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF", "Error when calling function _OL_ItemCreate. @error = " & @error & ", @extended = " & @extended) $EMail = "ABW-Clearing-D019@telefonica.com" Else $oItem = _OL_ItemCreate($oOutlook, $olMailItem, "", "", "Subject=#abw# weiterversorgen #kurzfristiger Storno# " & $alleNummern & " , " & $relevanteNummer & " , " & $Kundennummer_Wert, "", "SentOnBehalfOfName=ABW-Clearing-D019@telefonica.com") If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF", "Error when calling function _OL_ItemCreate. @error = " & @error & ", @extended = " & @extended) $EMail = $CarrierEMail EndIf ConsoleWrite($EMail & @LF) $EMailCC = "ABW-Clearing-D019@telefonica.com" ; neue E-Mail wird angezeigt $oItem.display $oItem.BodyFormat = $olFormatHTML ; E-Mailtext wird wird gesucht $sBody = $oItem.HTMLBody ; die Mail wird befüllt $oItem.HTMLBody = $HTMLKDDaten & $sBody _OL_ItemRecipientAdd($oOutlook, $oItem, Default, $olTo, $EMail) ; Empfänger wird gesetzt If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF", "Error when calling function _OL_ItemRecipientAdd. @error = " & @error & ", @extended = " & @extended) _OL_ItemRecipientAdd($oOutlook, $oItem, Default, $olCC, $EMailCC) ; CC wird gesetzt If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF", "Error when calling function _OL_ItemRecipientAdd. @error = " & @error & ", @extended = " & @extended) $oItem.send ; Email wird versendet I wrote an email manually with "Recipient" (to) = myself and "SentOnBehalfOf" =ABW-Clearing-D019@telefonica.com and then search for the header and HTML code. I don´t know if this helps to find the problem: Received: from DBAPR06MB6886.eurprd06.prod.outlook.com (2603:10a6:10:1a3::6) by AM0PR06MB5172.eurprd06.prod.outlook.com with HTTPS; Fri, 23 Sep 2022 11:25:29 +0000 Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=telefonica.com; Received: from AS8PR06MB7398.eurprd06.prod.outlook.com (2603:10a6:20b:319::14) by DBAPR06MB6886.eurprd06.prod.outlook.com (2603:10a6:10:1a3::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5632.21; Fri, 23 Sep 2022 11:25:28 +0000 Received: from AS8PR06MB7398.eurprd06.prod.outlook.com ([fe80::c069:2320:d3b2:e50f]) by AS8PR06MB7398.eurprd06.prod.outlook.com ([fe80::c069:2320:d3b2:e50f%5]) with mapi id 15.20.5654.020; Fri, 23 Sep 2022 11:25:28 +0000 Content-Type: application/ms-tnef; name="winmail.dat" Content-Transfer-Encoding: binary From: ABW-Clearing-D019 <ABW-Clearing-D019@telefonica.com> To: Nxxx Wxxx <nxxx.wxxx@telefonica.com> Subject: #abw# weiterversorgen #kurzfristiger Storno# 1234 , VAID.Test , S-5555 Thread-Topic: #abw# weiterversorgen #kurzfristiger Storno# 1234 , VAID.Test , S-5555 Thread-Index: AdjPPwqnPlQirXWbS9azB0Spv0flww== Date: Fri, 23 Sep 2022 11:25:28 +0000 Message-ID: <AS8PR06MB73980F8FF9F81DA85932268790519@AS8PR06MB7398.eurprd06.prod.outlook.com> Accept-Language: en-US Content-Language: de-DE X-MS-Has-Attach: X-MS-Exchange-Organization-SCL: -1 X-MS-TNEF-Correlator: <AS8PR06MB73980F8FF9F81DA85932268790519@AS8PR06MB7398.eurprd06.prod.outlook.com> MIME-Version: 1.0 X-MS-Exchange-Organization-MessageDirectionality: Originating X-MS-Exchange-Organization-AuthSource: AS8PR06MB7398.eurprd06.prod.outlook.com X-MS-Exchange-Organization-AuthAs: Internal X-MS-Exchange-Organization-AuthMechanism: 04 X-MS-Exchange-Organization-Network-Message-Id: a80b068a-b122-4c87-04c5-08da9d565162 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8PR06MB7398:EE_|DBAPR06MB6886:EE_ Return-Path: ABW-Clearing-D019@telefonica.com X-MS-Exchange-Organization-ExpirationStartTime: 23 Sep 2022 11:25:28.6702 (UTC) X-MS-Exchange-Organization-ExpirationStartTimeReason: OriginalSubmit X-MS-Exchange-Organization-ExpirationInterval: 1:00:00:00.0000000 X-MS-Exchange-Organization-ExpirationIntervalReason: OriginalSubmit X-MS-Office365-Filtering-Correlation-Id: a80b068a-b122-4c87-04c5-08da9d565162 X-Microsoft-Antispam: BCL:0; X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:de;SCL:-1;SRV:;IPV:NLI;SFV:SKI;H:AS8PR06MB7398.eurprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:;DIR:INB; X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Sep 2022 11:25:28.4160 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 9744600e-3e04-492e-baa1-25ec245c6f10 X-MS-Exchange-CrossTenant-AuthSource: AS8PR06MB7398.eurprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-Network-Message-Id: a80b068a-b122-4c87-04c5-08da9d565162 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: gOSCLeUU8n8jAmJ+AEpuMPTZH2ylYc1RhpAU+GVVcPwxSj78sbibwCFC+JkMj3/J1ckeDUR1dNcnuCsBrswI69PTqbyDYuXxqFfOHbMy7C8F/s0AfKjTtUrvajVtxmAK X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBAPR06MB6886 X-MS-Exchange-Transport-EndToEndLatency: 00:00:00.9430412 X-MS-Exchange-Processed-By-BccFoldering: 15.20.5632.021 X-Microsoft-Antispam-Mailbox-Delivery: ucf:0;jmr:0;auth:0;dest:I;ENG:(910001)(944506478)(944626604)(920097)(425001)(930097); X-Microsoft-Antispam-Message-Info: Ap3vIf0dW0PWJ6T3F5ehnFjYjXWIOZenEmK8Rw8fJvndnmBXB4234jO+D0plZjXmZ+EfaOkTgJ3VtzaX2hwk5eN7xMSwkM2ihhIiOBIVUIxpWJOr9F2MjgfbXtH2JdcWDkRt8zyyWCdLzwPGLPgLx2g2alcHFVEJYPOnmfHMusolnfnpg0Bt6rtN1vQh0LSyKfrh37UWoi6W5GM8MHN/xULfnhvvI3/xuBGpUFWyK5aI2b0PpEvcjasFMcDsvcGgvnpmDfiaXfCuICB2ZEFCp00CjYirRofVvWhBOMpiPk3cnOafqPbasRNgbSLgwq4MbuImXduzdG0nE2Y8Bbs6aPP0h+4l1v8KXekjuAlWpX3JhhWePrRqZ2dBVWCDYOfW6nyLNzrOzGR9cZydmXe3hhukk2GFdNfGmt0sKeEkOkBXuWag5UQz7BeuXFtdhSVvoQnaHHyp+jmC91+XrhLQ0NFDGUEwV0TMFy6OQ1/pb33MFbxG3VAT7OkxwushSRZX8C7m7q/RUh0PUrNupERgkg== I'm getting really desperate 😌
  9. see Tuesday at 09:28 AM, here I posted all windows from _OL_ErrorNotify(2)
  10. 3nn - Error adding recipient to the item. @extended = error code returned by the Recipients.Add method, nn = number of the invalid recipient (zero based) And how can I solve the problem? For the other Outlook version it works and I don´t know whats the difference and what I have to change
  11. With this link I tried to find out the xpath, but I don´t know what to do: How to search by Xpath/Css in Chrome Developer Tools? | testerlive (wordpress.com) With F12 I open the console and find the element in HTML code like I always do it <input type="submit" value="AKM-TR Weitergeleitet"> Then I went to console and type in $x("//input") and get 96 results The one I need is this: 71: <input type="submit" value="Abbruch ausführen"> accept: "" accessKey: "" accessKeyLabel: "" align: "" alt: "" assignedSlot: null attributes: NamedNodeMap [ type="submit", value="Abbruch ausführen" ] autocomplete: "" autofocus: false baseURI: "https://prodtalos.de.pri.o2.com/talos/fcm/ppc/details.do?command=view&fcmId=158402685" checked: false childElementCount: 0 childNodes: NodeList [] children: HTMLCollection { length: 0 } classList: DOMTokenList [] className: "" clientHeight: 18 clientLeft: 2 clientTop: 2 clientWidth: 116 contentEditable: "inherit" dataset: DOMStringMap(0) defaultChecked: false defaultValue: "Abbruch ausführen" dir: "" disabled: false draggable: false files: null firstChild: null firstElementChild: null form: <form name="fcmPpcDetailsForm" method="post" action="/talos/fcm/ppc/details.do"> formAction: "https://prodtalos.de.pri.o2.com/talos/fcm/ppc/details.do?command=view&fcmId=158402685" formEnctype: "" formMethod: "" formNoValidate: false formTarget: "" height: 0 hidden: false id: "" indeterminate: false innerHTML: "" innerText: "" isConnected: true isContentEditable: false labels: NodeList [] lang: "" lastChild: null lastElementChild: null list: null localName: "input" max: "" maxLength: -1 min: "" minLength: -1 multiple: false name: "" namespaceURI: "http://www.w3.org/1999/xhtml" nextElementSibling: null nextSibling: #text " " nodeName: "INPUT" nodeType: 1 nodeValue: null nonce: "" offsetHeight: 22 offsetLeft: 336 offsetParent: <td colspan="4" align="center"> offsetTop: 0 offsetWidth: 120 onabort: null onanimationcancel: null onanimationend: null onanimationiteration: null onanimationstart: null onauxclick: null onbeforeinput: null onblur: null oncanplay: null oncanplaythrough: null onchange: null onclick: null onclose: null oncontextmenu: null oncopy: null oncuechange: null oncut: null ondblclick: null ondrag: null ondragend: null ondragenter: null ondragexit: null ondragleave: null ondragover: null ondragstart: null ondrop: null ondurationchange: null onemptied: null onended: null onerror: null onfocus: null onformdata: null onfullscreenchange: null onfullscreenerror: null ongotpointercapture: null oninput: null oninvalid: null onkeydown: null onkeypress: null onkeyup: null onload: null onloadeddata: null onloadedmetadata: null onloadend: null onloadstart: null onlostpointercapture: null onmousedown: null onmouseenter: null onmouseleave: null onmousemove: null onmouseout: null onmouseover: null onmouseup: null onmozfullscreenchange: null onmozfullscreenerror: null onpaste: null onpause: null onplay: null onplaying: null onpointercancel: null onpointerdown: null onpointerenter: null onpointerleave: null onpointermove: null onpointerout: null onpointerover: null onpointerup: null onprogress: null onratechange: null onreset: null onresize: null onscroll: null onseeked: null onseeking: null onselect: null onselectstart: null onstalled: null onsubmit: null onsuspend: null ontimeupdate: null ontoggle: null ontransitioncancel: null ontransitionend: null ontransitionrun: null ontransitionstart: null onvolumechange: null onwaiting: null onwebkitanimationend: null onwebkitanimationiteration: null onwebkitanimationstart: null onwebkittransitionend: null onwheel: null outerHTML: "<input type=\"submit\" value=\"Abbruch ausführen\">" ownerDocument: HTMLDocument https://prodtalos.de.pri.o2.com/talos/fcm/ppc/details.do?command=view&fcmId=158402685 parentElement: <td colspan="4" align="center"> parentNode: <td colspan="4" align="center"> part: DOMTokenList [] pattern: "" placeholder: "" prefix: null previousElementSibling: null previousSibling: #text " " readOnly: false required: false scrollHeight: 18 scrollLeft: 0 scrollLeftMax: 0 scrollTop: 0 scrollTopMax: 0 scrollWidth: 116 selectionDirection: null selectionEnd: null selectionStart: null shadowRoot: null size: 20 slot: "" spellcheck: false src: "" step: "" style: CSS2Properties(0) tabIndex: 0 tagName: "INPUT" textContent: "" textLength: 17 title: "" type: "submit" useMap: "" validationMessage: "" validity: ValidityState { valueMissing: false, typeMismatch: false, patternMismatch: false, … } value: "Abbruch ausführen" valueAsDate: null valueAsNumber: NaN webkitEntries: Array [] webkitdirectory: false width: 0 willValidate: true <prototype>: HTMLInputElementPrototype { stepUp: stepUp(), stepDown: stepDown(), checkValidity: checkValidity(), … } But now I don´t know how to put this in an xpath code 😌 Normaly I use //input[@name='xxx'] or //input[@src='xxx'] or //input[@id='xxx'] , but there is no name, scr or id Please help
  12. cant find the explanation for the error code 300 in the help (if you mean OutlookEX.CHM) Function Reference _OL_ItemRecipientAdd Adds one or multiple recipients or reply-recipients to an item and resolves them. _OL_ItemRecipientAdd($oOL, $vItem, $sStoreID, $iType, $vP1[, $vP2 = ""[, $vP3 = ""[, $vP4 = ""[, $vP5 = ""[, $vP6 = ""[, $vP7 = ""[, $vP8 = ""[, $vP9 = ""[, $vP10 = ""[, $bAllowUnresolved = True]]]]]]]]]]) Parameters $oOL Outlook object returned by a preceding call to _OL_Open() $vItem EntryID or object of the item $sStoreID StoreID where the item is stored. Use the keyword "Default" to use the users mailbox $iType Integer representing the type of recipient. For details see Remarks $vP1 Recipient to add to the item. Either a recipient object, a single recipient name or multiple recipient names separated by ; to be resolved or a zero based one-dimensional array with unlimited number of recipients (name or object) $vP2 [optional] recipient to add to the item. Either a recipient object or the recipient name to be resolved $vP3 [optional] Same as $vP2 $vP4 [optional] Same as $vP2 $vP5 [optional] Same as $vP2 $vP6 [optional] Same as $vP2 $vP7 [optional] Same as $vP2 $vP8 [optional] Same as $vP2 $vP9 [optional] Same as $vP2 $vP10 [optional] Same as $vP2 $bAllowUnresolved [optional] True doesn't return an error even when unresolvable SMTP addresses have been found (default = True) Return Value Success: Item object Failure: Returns 0 and sets @error: 1 - No item specified 2 - Item could not be found. EntryID might be wrong 5 - $iType is missing or not a number 3nn - Error adding recipient to the item. @extended = error code returned by the Recipients.Add method, nn = number of the invalid recipient (zero based) 4nn - Recipient name could not be resolved. @extended = error code returned by the Resolve method, nn = number of the invalid recipient (zero based) Remarks $vP2 to $vP10 will be ignored if $vP1 is an array of recipients Valid $iType parameters: MailItem recipient: one of the following OlMailRecipientType constants: olBCC, olCC, olOriginator, or olTo. Set $iType to $olReplyRecipient and the passed recipients will be set as Reply-Recipients MeetingItem recipient: one of the following OlMeetingRecipientType constants: olOptional, olOrganizer, olRequired, or olResource. Set $iType to $olReplyRecipient and the passed recipients will be set as Reply-Recipients TaskItem recipient: one of the following OlTaskRecipientType constants: olFinalStatus, or olUpdate but this is from OutlookEX.au3 ; #FUNCTION# ==================================================================================================================== ; Name ..........: _OL_ItemRecipientAdd ; Description ...: Adds one or multiple recipients or reply-recipients to an item and resolves them. ; Syntax.........: _OL_ItemRecipientAdd($oOL, $vItem, $sStoreID, $iType, $vP1[, $vP2 = ""[, $vP3 = ""[, $vP4 = ""[, $vP5 = ""[, $vP6 = ""[, $vP7 = ""[, $vP8 = ""[, $vP9 = ""[, $vP10 = ""[, $bAllowUnresolved = True]]]]]]]]]]) ; Parameters ....: $oOL - Outlook object returned by a preceding call to _OL_Open() ; $vItem - EntryID or object of the item ; $sStoreID - StoreID where the item is stored. Use the keyword "Default" to use the users mailbox ; $iType - Integer representing the type of recipient. For details see Remarks ; $vP1 - Recipient to add to the item. Either a recipient object, a single recipient name or multiple recipient names separated by ; to be resolved ; |or a zero based one-dimensional array with unlimited number of recipients (name or object) ; $vP2 - [optional] recipient to add to the item. Either a recipient object or the recipient name to be resolved ; $vP3 - [optional] Same as $vP2 ; $vP4 - [optional] Same as $vP2 ; $vP5 - [optional] Same as $vP2 ; $vP6 - [optional] Same as $vP2 ; $vP7 - [optional] Same as $vP2 ; $vP8 - [optional] Same as $vP2 ; $vP9 - [optional] Same as $vP2 ; $vP10 - [optional] Same as $vP2 ; $bAllowUnresolved - [optional] True doesn't return an error even when unresolvable SMTP addresses have been found (default = True) ; Return values .: Success - Item object ; Failure - Returns 0 and sets @error: ; |1 - No item specified ; |2 - Item could not be found. EntryID might be wrong ; |5 - $iType is missing or not a number ; |3nn - Error adding recipient to the item. @extended = error code returned by the Recipients.Add method, nn = number of the invalid recipient (zero based) ; |4nn - Recipient name could not be resolved. @extended = error code returned by the Resolve method, nn = number of the invalid recipient (zero based) ; Author ........: water ; Modified.......: ; Remarks .......: $vP2 to $vP10 will be ignored if $vP1 is an array of recipients ;+ ; Valid $iType parameters: ; MailItem recipient: one of the following OlMailRecipientType constants: olBCC, olCC, olOriginator, or olTo. ; &nbsp;&nbsp; Set $iType to $olReplyRecipient and the passed recipients will be set as Reply-Recipients ; MeetingItem recipient: one of the following OlMeetingRecipientType constants: olOptional, olOrganizer, olRequired, or olResource. ; &nbsp; Set $iType to $olReplyRecipient and the passed recipients will be set as Reply-Recipients ; TaskItem recipient: one of the following OlTaskRecipientType constants: olFinalStatus, or olUpdate ; Related .......: ; Link ..........: ; Example .......: Yes ; =============================================================================================================================== Func _OL_ItemRecipientAdd($oOL, $vItem, $sStoreID, $iType, $vP1, $vP2 = "", $vP3 = "", $vP4 = "", $vP5 = "", $vP6 = "", $vP7 = "", $vP8 = "", $vP9 = "", $vP10 = "", $bAllowUnresolved = True) If $bAllowUnresolved = Default Then $bAllowUnresolved = True Local $aRecipients[10], $oTempRecipient, $aTemp[1], $aRecipientsOut[0] If Not IsNumber($iType) Then Return SetError(5, 0, 0) If Not IsObj($vItem) Then If StringStripWS($vItem, BitOR($STR_STRIPLEADING, $STR_STRIPTRAILING)) = "" Then Return SetError(1, 0, 0) $vItem = $oOL.Session.GetItemFromID($vItem, $sStoreID) If @error Then Return SetError(2, @error, 0) EndIf ; Move members into an array If Not IsArray($vP1) Then $aRecipients[0] = $vP1 $aRecipients[1] = $vP2 $aRecipients[2] = $vP3 $aRecipients[3] = $vP4 $aRecipients[4] = $vP5 $aRecipients[5] = $vP6 $aRecipients[6] = $vP7 $aRecipients[7] = $vP8 $aRecipients[8] = $vP9 $aRecipients[9] = $vP10 Else $aRecipients = $vP1 EndIf ; If a recipient consists of multiple recipients separated by ";" then we will split it and append each single recipient to the array For $i = 0 To UBound($aRecipients, 1) - 1 ; Semicolon was found. Split the string into an array and add it at the end of the recipients array and set the current element to "" If $aRecipients[$i] <> "" Then If IsObj($aRecipients[$i]) Then ReDim $aTemp[1] $aTemp[0] = $aRecipients[$i] Else $aTemp = StringSplit($aRecipients[$i], ";", $STR_NOCOUNT) EndIf _ArrayConcatenate($aRecipientsOut, $aTemp) EndIf Next ; add recipients to the item #forceref $oTempRecipient ; To prevent the AU3Check warning : $oTempRecipient : declared, but Not used In Func. For $iIndex = 0 To UBound($aRecipientsOut) - 1 If Not IsObj($aRecipientsOut[$iIndex]) And (StringStripWS($aRecipientsOut[$iIndex], BitOR($STR_STRIPLEADING, $STR_STRIPTRAILING)) = "" Or $aRecipientsOut[$iIndex] = Default) Then ContinueLoop If $iType = $olReplyRecipient Then $iType = $olTo $oTempRecipient = $vItem.ReplyRecipients.Add($aRecipientsOut[$iIndex]) Else $oTempRecipient = $vItem.Recipients.Add($aRecipientsOut[$iIndex]) EndIf If @error Then Return SetError(300 + $iIndex, @error, 0) ; <<<<<<<<<<<<<<<<<----------------------------- $oTempRecipient.Type = $iType $oTempRecipient.Resolve If @error Or Not $oTempRecipient.Resolved Then If Not (StringInStr($aRecipientsOut[$iIndex], "@")) Or Not ($bAllowUnresolved) Then $oTempRecipient.Delete ; Remove unresolved/recipient in error Return SetError(400 + $iIndex, @error, 0) EndIf EndIf Next $vItem.Save() Return $vItem EndFunc ;==>_OL_ItemRecipientAdd I also try the scripts on the WIN 8 PC with the other office version and everthing works fine. testscript my script
  13. I get the same error with the testscript #include <OutlookEx.au3> ;~ _OL_ErrorNotify(2) ; Open the connection to Outlook Global $oOL = _OL_Open() If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF", "Error when calling function _OL_Open(). @error = " & @error & ", @extended = " & @extended) ; Create a mail item and set some properties Global $oItem = _OL_ItemCreate($oOL, $olMailItem, "", "", "Subject=TestMail", "BodyFormat=" & $olFormatHTML, "HTMLBody=Bodytext in <b>bold</b>.", "SentOnBehalfOfName=Doe Jane") If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF", "Error when calling function _OL_ItemCreate. @error = " & @error & ", @extended = " & @extended) ; Add a recipient and resolve it _OL_ItemRecipientAdd($oOL, $oItem, Default, $olTo, "Doe John") If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF", "Error when calling function _OL_ItemRecipientAdd. @error = " & @error & ", @extended = " & @extended) $oItem.Display ; Send the mail _OL_ItemSend($oOL, $oItem) If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF", "Error when calling function _OL_ItemSend. @error = " & @error & ", @extended = " & @extended) If @extended = -2147352567 Then _ MsgBox(16, "OutlookEX UDF - Example Script", "You don't have permission to send the mail on behalf of the specified person!") _OL_Close($oOL) If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF", "Error when calling function _OL_Close. @error = " & @error & ", @extended = " & @extended)
  14. with the above script I get this error
  15. You mean this way? $oOutlook= _OL_Open() If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF", "Error when calling function _OL_Open(). @error = " & @error & ", @extended = " & @extended) ; wenn Carrier nicht in Mail-Liste, dann Mail ans PF zur Prüfung, wie bei Neli-Liste ; neue E-Mail wird erstellt if $CarrierEMail = "nicht gefunden" Then $oItem = _OL_ItemCreate($oOutlook, $olMailItem, "", "", "Subject=[AutoIT:ZU PRUEFEN] #abw# weiterversorgen #kurzfristiger Storno# " & $alleNummern & " , " & $relevanteNummer & " , " & $Kundennummer_Wert, "", "SentOnBehalfOfName=ABW-Clearing-D019@telefonica.com") If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF", "Error when calling function _OL_ItemCreate. @error = " & @error & ", @extended = " & @extended) $EMail = "ABW-Clearing-D019@telefonica.com" Else $oItem = _OL_ItemCreate($oOutlook, $olMailItem, "", "", "Subject=#abw# weiterversorgen #kurzfristiger Storno# " & $alleNummern & " , " & $relevanteNummer & " , " & $Kundennummer_Wert, "", "SentOnBehalfOfName=ABW-Clearing-D019@telefonica.com") If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF", "Error when calling function _OL_ItemCreate. @error = " & @error & ", @extended = " & @extended) $EMail = $CarrierEMail EndIf ConsoleWrite($EMail & @LF) $EMailCC = "ABW-Clearing-D019@telefonica.com" ; neue E-Mail wird angezeigt $oItem.display $oItem.BodyFormat = $olFormatHTML ; E-Mailtext wird wird gesucht $sBody = $oItem.HTMLBody ; die Mail wird befüllt $oItem.HTMLBody = $HTMLKDDaten & $sBody _OL_ItemRecipientAdd($oOutlook, $oItem, Default, $olTo, $EMail) ; Empfänger wird gesetzt If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF", "Error when calling function _OL_ItemRecipientAdd. @error = " & @error & ", @extended = " & @extended) _OL_ItemRecipientAdd($oOutlook, $oItem, Default, $olCC, $EMailCC) ; CC wird gesetzt If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF", "Error when calling function _OL_ItemRecipientAdd. @error = " & @error & ", @extended = " & @extended) $oItem.send ; Email wird versendet
  16. in the Include folder I found more Outlook au3. files Does the OutlookEX.au3 and OutlookEX_GUI.au3 automatically include the others or do I need to enable more in my script? This is the beginning of my script: #include <OutlookEX.au3> #include <OutlookEX_GUI.au3>
  17. in this testscript #include <OutlookEx.au3> _OL_ErrorNotify(2) ; Open the connection to Outlook Global $oOL = _OL_Open() ; Create a mail item and set some properties Global $oItem = _OL_ItemCreate($oOL, $olMailItem, "*\Outlook-UDF-Test\TargetFolder\Mail", "", _ "Subject=TestMail", "BodyFormat=" & $olFormatHTML, "HTMLBody=Bodytext in <b>bold</b>.", "SentOnBehalfOfName=Doe Jane") ; Add a recipient and resolve it _OL_ItemRecipientAdd($oOL, $oItem, Default, $olTo, "Doe John") $oItem.Display ; Send the mail _OL_ItemSend($oOL, $oItem) If @extended = -2147352567 Then _ MsgBox(16, "OutlookEX UDF - Example Script", "You don't have permission to send the mail on behalf of the specified person!") _OL_Close($oOL) I get this Errors in this order, each time I click ok no mail was created
  18. Now I stop the script after the recipient will be added but nothing happens $oOutlook= _OL_Open() ; wenn Carrier nicht in Mail-Liste, dann Mail ans PF zur Prüfung, wie bei Neli-Liste ; neue E-Mail wird erstellt if $CarrierEMail = "nicht gefunden" Then $oItem = _OL_ItemCreate($oOutlook, $olMailItem, "", "", "Subject=[AutoIT:ZU PRUEFEN] #abw# weiterversorgen #kurzfristiger Storno# " & $alleNummern & " , " & $relevanteNummer & " , " & $Kundennummer_Wert, "", "SentOnBehalfOfName=ABW-Clearing-D019@telefonica.com") $EMail = "ABW-Clearing-D019@telefonica.com" Else $oItem = _OL_ItemCreate($oOutlook, $olMailItem, "", "", "Subject=#abw# weiterversorgen #kurzfristiger Storno# " & $alleNummern & " , " & $relevanteNummer & " , " & $Kundennummer_Wert, "", "SentOnBehalfOfName=ABW-Clearing-D019@telefonica.com") $EMail = $CarrierEMail EndIf ConsoleWrite($EMail & @LF) $EMailCC = "ABW-Clearing-D019@telefonica.com" ; neue E-Mail wird angezeigt $oItem.display $oItem.BodyFormat = $olFormatHTML ;~ E-Mailtext wird wird gesucht $sBody = $oItem.HTMLBody ; die Mail wird befüllt $oItem.HTMLBody = $HTMLKDDaten & $sBody _OL_ItemRecipientAdd($oOutlook, $oItem, Default, $olTo, $EMail) ; Empfänger wird gesetzt _OL_ItemRecipientAdd($oOutlook, $oItem, Default, $olCC, $EMailCC) ; CC wird gesetzt Exit $oItem.send ; Email wird versendet Then I put in _OL_ErrorNotify(2) and get the same Error
  19. But I replace in my real script $oOutlook = ObjGet("", "Outlook.Application") ; Outlook öffnen with $oOutlook= _OL_Open() and now the Body is filled I stop the script before the recipient will be added and it works until this point $oOutlook= _OL_Open() ;wenn Carrier nicht in Mail-Liste, dann Mail ans PF zur Prüfung, wie bei Neli-Liste ;neue E-Mail wird erstellt if $CarrierEMail = "nicht gefunden" Then $oItem = _OL_ItemCreate($oOutlook, $olMailItem, "", "", "Subject=[AutoIT:ZU PRUEFEN] #abw# weiterversorgen #kurzfristiger Storno# " & $alleNummern & " , " & $relevanteNummer & " , " & $Kundennummer_Wert, "", "SentOnBehalfOfName=ABW-Clearing-D019@telefonica.com") $EMail = "ABW-Clearing-D019@telefonica.com" Else $oItem = _OL_ItemCreate($oOutlook, $olMailItem, "", "", "Subject=#abw# weiterversorgen #kurzfristiger Storno# " & $alleNummern & " , " & $relevanteNummer & " , " & $Kundennummer_Wert, "", "SentOnBehalfOfName=ABW-Clearing-D019@telefonica.com") $EMail = $CarrierEMail EndIf ConsoleWrite($EMail & @LF) $EMailCC = "ABW-Clearing-D019@telefonica.com" ;neue E-Mail wird angezeigt $oItem.display $oItem.BodyFormat = $olFormatHTML ;E-Mailtext wird wird gesucht $sBody = $oItem.HTMLBody ;die Mail wird befüllt $oItem.HTMLBody = $HTMLKDDaten & $sBody Exit _OL_ItemRecipientAdd($oOutlook, $oItem, Default, $olTo, $EMail) ; Empfänger wird gesetzt _OL_ItemRecipientAdd($oOutlook, $oItem, Default, $olCC, $EMailCC) ; CC wird gesetzt $oItem.send ;Email wird versendet
  20. I can´t see the mail in the testscript and also not in Outlook itself. There is no John or Jane Doe in my company
  21. That link doesn´t help me. I still don´t know how to solve the problem. I don´t know how to do this: When I use this testscript the body is filled #include <OutlookEx.au3> $oOL = _OL_Open() _OL_Wrapper_SendMail($oOL, "John Doe", "", "", "Testmail", "<b>Test</b>", "", $olFormatHTML, $olImportanceHigh) _OL_Close($oOL) When I use this testscrpit I get an error message #include <OutlookEx.au3> ; Open the connection to Outlook Global $oOL = _OL_Open() ; Create a mail item and set some properties Global $oItem = _OL_ItemCreate($oOL, $olMailItem, "*\Outlook-UDF-Test\TargetFolder\Mail", "", _ "Subject=TestMail", "BodyFormat=" & $olFormatHTML, "HTMLBody=Bodytext in <b>bold</b>.", "SentOnBehalfOfName=Doe Jane") ; Add a recipient and resolve it _OL_ItemRecipientAdd($oOL, $oItem, Default, $olTo, "Doe John") ; Send the mail _OL_ItemSend($oOL, $oItem) If @extended = -2147352567 Then _ MsgBox(16, "OutlookEX UDF - Example Script", "You don't have permission to send the mail on behalf of the specified person!") _OL_Close($oOL)
  22. when I click ok, the body comes: then I have to kill the script because with each new click on ok a new mail is created
  23. this is the Displayname, for WIN8 it works
  24. but my other problem is not solved. What did I do if there is no ID I can search for? All other buttons have this HTML code, only the value is the difference and the form where the button lies: <input type="submit" value="XXX"> example for a button in form 4: <input type="submit" value="AKM-TR Weitergeleitet"> $FCM_FORMULAR_PPC_DETAILS2 = _IEFormGetObjByName($oIE, "fcmPpcDetailsForm",4) _IEFormSubmit ($FCM_FORMULAR_PPC_DETAILS2, "AKM-TR Weitergeleitet") _IELoadWait($oIE) How can I find this elements and click on it?
  25. with $_WD_OPTION_Advanced it works and also the click on the button for this HTML code works now <input type="submit" value="Änderungen übernehmen" id="saveButton"> Local $sButton2 = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//input[@id='saveButton']")
×
×
  • Create New...