Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/19/2016 in all areas

  1. water

    AD - Active Directory UDF

    Version 1.6.3.0

    17,290 downloads

    Extensive library to control and manipulate Microsoft Active Directory. Threads: Development - General Help & Support - Example Scripts - Wiki Previous downloads: 30467 Known Bugs: (last changed: 2020-10-05) None Things to come: (last changed: 2020-07-21) None BTW: If you like this UDF please click the "I like this" button. This tells me where to next put my development effort
    1 point
  2. ; ;################################## ; Include ;################################## #Include<file.au3> ;################################## ; Variables ;################################## $SmtpServer = "MailServer" ; address for the smtp-server to use - REQUIRED $FromName = "Name" ; name from who the email was sent $FromAddress = "your@Email.Address.com" ; address from where the mail should come $ToAddress = "your@Email.Address.com" ; destination address of the email - REQUIRED $Subject = "Userinfo" ; subject from the email - can be anything you want it to be $Body = "" ; 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 = "CCadress1@test.com" ; address for cc - leave blank if not needed $BccAddress = "BCCadress1@test.com" ; address for bcc - leave blank if not needed $Importance = "Normal" ; 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 ;~ $SmtpServer = "smtp.gmail.com" ; GMAIL address for the smtp-server to use - REQUIRED ;~ $IPPort=465 ; GMAIL port used for sending the mail ;~ $ssl=1 ; GMAIL enables/disables secure socket layer sending - put to 1 if using https ;~ $SmtpServer = "smtp.office365.com" ; O365 address for the smtp-server to use - REQUIRED ;~ $IPPort=25 ; O365 port used for sending the mail ;~ $ssl=1 ; O365 enables/disables secure socket layer sending - put to 1 if using https ;~ SmtpServer = "smtp.mail.yahoo.com" ; Yahoo address for the smtp-server to use - REQUIRED ;~ $IPPort = 465 ; Yahoo port used for sending the mail ;~ $ssl = 1 ; Yahoo enables/disables secure socket layer sending - put to 1 if using https ;################################## ; Script ;################################## Global $oMyRet[2] Global $oMyError = ObjEvent("AutoIt.Error", "MyErrFunc") $rc = _INetSmtpMailCom($SmtpServer, $FromName, $FromAddress, $ToAddress, $Subject, $Body, $AttachFiles, $CcAddress, $BccAddress, $Importance, $Username, $Password, $IPPort, $ssl, $tls) If @error Then MsgBox(0, "Error sending message", "Error code:" & @error & " Description:" & $rc) EndIf ; ; The UDF Func _INetSmtpMailCom($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject = "", $as_Body = "", $s_AttachFiles = "", $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 If $s_AttachFiles <> "" Then Local $S_Files2Attach = StringSplit($s_AttachFiles, ";") For $x = 1 To $S_Files2Attach[0] $S_Files2Attach[$x] = _PathFull($S_Files2Attach[$x]) ;~ ConsoleWrite('@@ Debug : $S_Files2Attach[$x] = ' & $S_Files2Attach[$x] & @LF & '>Error code: ' & @error & @LF) ;### Debug Console If FileExists($S_Files2Attach[$x]) Then ConsoleWrite('+> File attachment added: ' & $S_Files2Attach[$x] & @LF) $objEmail.AddAttachment($S_Files2Attach[$x]) Else ConsoleWrite('!> File not found to attach: ' & $S_Files2Attach[$x] & @LF) SetError(1) Return 0 EndIf Next 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 If @error Then SetError(2) Return $oMyRet[1] EndIf $objEmail="" EndFunc ;==>_INetSmtpMailCom ; ; ; Com Error Handler Func MyErrFunc() $HexNumber = Hex($oMyError.number, 8) $oMyRet[0] = $HexNumber $oMyRet[1] = StringStripWS($oMyError.description, 3) ConsoleWrite("### COM Error ! Number: " & $HexNumber & " ScriptLine: " & $oMyError.scriptline & " Description:" & $oMyRet[1] & @LF) SetError(1); something to check for when this function returns Return EndFunc ;==>MyErrFunc Edit: Fixed Bcc ... Edit: Added support for different port and SLL which are used by GMail (Port 465) Edit: Added Importance support (10/2008) EDIT: Added $TLS option (07/2020 Some interesting Info from the thread:
    1 point
  3. http://www.sqlines.com/online try this
    1 point
  4. JLogan3o13

    FDE

    @orbs I managed a CheckPoint rollout some years ago, when they were Pointsec. I remember trying to train the HelpDesk staff on using the little challenge/response fobs when someone forgot their pre-boot auth password, what a nightmare
    1 point
  5. @FMS, Are you sure that the ID in your table is a string? ... where id = '1'; -- queries for id being the string '1' ... where id = 1; -- queries for id being the integer 1
    1 point
  6. #include <Array.au3> _ArrayDisplay($CmdLine) Ran with: Gives: Helpfile: https://www.autoitscript.com/autoit3/docs/intro/running.htm
    1 point
  7. According to th help file: "If you're passing strings with spaces, then you will need to escape these using "double quotes" in your commandline string."
    1 point
  8. mike2003, To do that I would use an Accelerator key - like this: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Local $hGui = GUICreate("My GUI", 500, 500, Default, Default, BitOR($WS_SYSMENU, $WS_CAPTION)) $cMinimiseDummy = GUICtrlCreateDummy() Local $aAccelKeys[1][2] = [["{ESC}", $cMinimiseDummy]] GUISetAccelerators($aAccelKeys) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $cMinimiseDummy WinSetState($hGui, "", @SW_MINIMIZE) EndSwitch WEnd spudw2k, I did know about @SW_HIDE removing the icon from the taskbar, but thanks for reminding others. M23
    1 point
  9. A I dont know if this is the most effective way, but i always do it like this: $imgColl = _IETagNameGetCollection($oIE,"img") For $img In $imgColl      if $img.src = "(The src found in the html)" then       _IEAction($img,"click")    EndIf  Next
    1 point
  10. Danp2

    _IEFormImageClick questions

    You should try using _IEImgClick instead of _IEFormImageClick.
    1 point
  11. The 1. adress when accessing something from memory is In the OP is a example linked for swf-files
    1 point
  12. Jos

    SQL server data

    I assume you have a proper backup of an SQL Server... so simply do a restore?
    1 point
  13. It works this way: #include <Word.au3> $oWord = _Word_Create() $oDoc = _Word_DocOpen($oWord, "C:\temp\test.docx") $oRow = $oDoc.Tables(1).Rows(1).Select $oWord.Selection.InsertRowsBelow(1)
    1 point
  14. @orbs, what kind of automation in IE download you are looking for (start/stop/resume)? Also, did you try my example in #9? If you really want to click and use the build in download manager in IE, you can easily use UI Automation to "open" / "save" / "saveas" / "cancel" etc, then you can open the download manager (ctrl+j) and get some limited information. Now if you are talking about COM access you can build your own IE Custom Download Manager, i found these example (never tested myself).
    1 point
  15. You can use the activeElement property. #include <IE.au3> Global $sActiveElement = "", $sActiveElementOld = "" _IEErrorHandlerRegister() $oIE_form = _IE_Example("form") While __IEIsObjType($oIE_form, "browserdom") $sActiveElement = $oIE_form.document.activeElement.tagName If $sActiveElement <> $sActiveElementOld Then $sActiveElementOld = $sActiveElement ConsoleWrite("Tag Name of focused element: " & $sActiveElement & @CR) EndIf Sleep(100) WEnd
    1 point
×
×
  • Create New...