Ich glaub sonst will hier bald jeder eine haben (nun ja, ich auch
)
Beiträge von Cartan12
-
-
CMD per run öffnen --> StdinWrite benutzen
-
Musste (normalerweise) beantragen...
-
1. z.B. ein Decompiler
2. gar keine -
Würd mal gerne wissen, wann wir das Projekt starten sollen...
-
Ja, musste letztens auch ein Script rausnehmen, weil der FTP Zugang drin war...
AutoIt und Sicherheit werden wohl leider nie auf einen Nenner kommen
-
Ich liebe ja solche Programme... Hat gemand mal versucht das zu deinstallieren?
Ich hatte mal Vistamizer drauf... Als mir das zu bunt wurde konnte ichs nicht mehr richtig deinstallieren und musste PC formatieren -.-
Ansonsten würd ich's mir draufmachen -
Hört sich nach einem guten Argument an. zuschlagen! *im wahrsten sinne des Wortes*
Du sagst es

-
Ich würd sagen, dein Script ist kein wirklicher Bot...
Wir weisen trotzdem darauf hin, denn wir haben schon schlechte erfahrung gemacht (du glaubst gar nicht, wie geschickt manche Bot-Coder die Fragen an uns stellen...)
Wenn du demnächst weitere Scripte, die nichts mit Bots zu tun haben postests, wird du bestimmt auch Lob bekommen.
Also bis dann
Cartan12 -
Habs mal überarbeitet:
Spoiler anzeigen
[autoit]#include <ButtonConstants.au3>
[/autoit] [autoit][/autoit] [autoit]
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <IE.au3>
#include <GuiEdit.au3>
#include <misc.au3>
#include <File.au3>
$Speicher = DirCreate( "C:\Lesezeichen")
$IE = _IECreateEmbedded()#Region ### START Koda GUI section ### Form=
[/autoit] [autoit][/autoit] [autoit]
;Form
$Form1 = GUICreate(">>>¤....Digga's....Webbrowser....¤<<<", 1215, 681, 202, 126)
$Farbe = GUISetBkColor(0x3399FF)
$Adresse = GUICtrlCreateInput("", 104, 32, 825, 32)
$Schrift1 = GUICtrlSetFont(-1, 16, 400, 0, "Arial")
$Label1 = GUICtrlCreateLabel("Adresse:", 8, 32, 95, 28)
$Schrift2 = GUICtrlSetFont(-1, 16, 800, 0, "Arial")
$Button1 = GUICtrlCreateButton("Go!!", 952, 32, 129, 33, $WS_GROUP)
$Browser_Feld = GUICtrlCreateObj($IE, 8, 72, 1193, 577)
$Browser = GUISetState(@SW_SHOW)
;Datei
$Menu_Datei = GUICtrlCreateMenu("Datei")
$Menu_Datei_Beenden = GUICtrlCreateMenuItem("Beenden", $Menu_Datei)
$Menu_Datei_Einstellung = GUICtrlCreateMenuItem("Einstellungen", $Menu_Datei)
;Bearbeiten
$Menu_Bearbeiten = GUICtrlCreateMenu("Bearbeiten")
$Menu_Bearbeiten_Ausschneiden = GUICtrlCreateMenuItem("Ausschneiden", $Menu_Bearbeiten)
$Menu_Bearbeiten_Kopieren = GUICtrlCreateMenuItem("Kopieren", $Menu_Bearbeiten)
$Menu_Bearbeiten_Einfugen = GUICtrlCreateMenuItem("Einfügen", $Menu_Bearbeiten)
$Menu_Bearbeiten_Loschen = GUICtrlCreateMenuItem("Löschen", $Menu_Bearbeiten)
$Menu_Bearbeiten_AllesMarkieren = GUICtrlCreateMenuItem("Alles Markieren", $Menu_Bearbeiten)
$Menu_Bearbeiten_Ruckgangig = GUICtrlCreateMenuItem("Rückgängig", $Menu_Bearbeiten)
;Lesezeichen
$Menu_Lesezeichen = GUICtrlCreateMenu( "Lesezeichen")
$Menu_Lesezeichen_Hinzufugen = GUICtrlCreateMenuItem( "Lesezeichen hinzufügen" ,$Menu_Lesezeichen)#EndRegion ### END Koda GUI section ###
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]_IENavigate($IE, "www.Google.de")
[/autoit] [autoit][/autoit] [autoit]
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Menu_Datei_Beenden
Exit
Case $Button1
$Html = GUICtrlRead($Adresse)
_IENavigate($IE, $Html)
Case $Menu_Bearbeiten_Ausschneiden
Send ("^x")
if @error Then
MsgBox (64, "ERROR", "Bitte Bereich Markieren der ausgeschnitten werden soll.")
EndIf
Case $Menu_Bearbeiten_Einfugen
Send ("^v")
Case $Menu_Bearbeiten_Kopieren
send ("^c")
if @error Then
MsgBox (64, "ERROR", "Bitte Bereich Markieren der Kopiert werden soll")
EndIf
Case $Menu_Bearbeiten_Loschen
Send ("{DELETE}")
if @error Then
MsgBox (64, "ERROR", "Bitte Bereich Markieren der Kopiert werden soll")
EndIf
Case $Menu_Bearbeiten_AllesMarkieren
_GUICtrlEdit_SetSel ($Adresse,0,-1)
Case $Menu_Lesezeichen_Hinzufugen
MsgBox(0 ,"Error" , "Noch in Bearbeitung")
Case $Menu_Datei_Einstellung
einstellungen()EndSwitch
[/autoit] [autoit][/autoit] [autoit]
WEndFunc einstellungen()
[/autoit]
;Einstellungen
$Form1 = GUICreate("Einstellungen", 416, 218, 462, 279)
$Farbe1 = GUISetBkColor(0x3399FF)
$Group1 = GUICtrlCreateGroup("Startseite", 8, 8, 401, 201)
$Schrift3 = GUICtrlSetFont(-1, 12, 800, 0, "Arial")
$Button1 = GUICtrlCreateButton("Aktuelle Seite", 16, 160, 185, 33, $WS_GROUP)
$Button2 = GUICtrlCreateButton("Standard", 216, 160, 185, 33, $WS_GROUP)
$Input1 = GUICtrlCreateInput("", 16, 120, 385, 23)
$Schrift4 = GUICtrlSetFont(-1, 9, 800, 0, "Arial")
$Group2 = GUICtrlCreateGroup("", -99, -99, 1, 1)
$Browser_Einstellungen = GUISetState(@SW_SHOW)
While 1
$Msg = GUIGetMsg()
Switch $Msg
Case $GUI_EVENT_CLOSE
$Browser_Einstellungen = GUIDelete($Form1)
EndSwitch
WEnd
EndFunc -
Ähm, meines Wissens nach kann man ein Bild einfach per FileRead auslesen und dann mit der passenden Endung per filewrite abspeichern...
-
Was bringen die Klammern?
-
Und das läuft flüssig???
Ich glaub bei meiner 90kbit/s Internetverbindung nicht... -
Das ist einer der Gründe, warum ich Skype lieber habe(auch wenn es sich so anhört, als müsse ich mir wieder was neues suchen ^^)
-
Oh sorry, dann machs so:
Spoiler anzeigen
[autoit]#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
[/autoit] [autoit][/autoit] [autoit]
#AutoIt3Wrapper_outfile=FSM-SMS-REMAINDER.exe
#AutoIt3Wrapper_UseUpx=n
#AutoIt3Wrapper_Change2CUI=y
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****#include <ButtonConstants.au3>
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
;~ #include <ubet.au3>#Region ### START Koda GUI section ### Form=\sms.kxf
[/autoit] [autoit][/autoit] [autoit]
Global $Form1 = GUICreate("SMS", 500, 350, 320, 250)
GUISetIcon("D:\004.ico")
Global $Senden = GUICtrlCreateButton("Senden", 400, 200, 75, 25, 0)
Global $Clear = GUICtrlCreateButton("Neue SMS", 400, 250, 75, 25, 0)
Global $End = GUICtrlCreateButton("Beenden", 400, 300, 75, 25, 0)
Global $hh = GUICtrlCreateInput("hh", 400, 24, 25, 25)
Global $ss = GUICtrlCreateInput("ss", 440, 24, 25, 25)
Global $TT = GUICtrlCreateInput("TT", 240, 25, 25, 25)
Global $MM = GUICtrlCreateInput("MM", 280, 25, 25, 25)
Global $JJJJ = GUICtrlCreateInput("JJJJ", 320, 25, 50, 25)
Global $an = GUICtrlCreateInput("An", 25, 25, 150, 25)
Global $von = GUICtrlCreateInput("Von", 25, 300, 150, 21)
Global $Text = GUICtrlCreateInput("SMS-Text", 25, 80, 350, 200)
Global $Sname = "XXXXX" ; Benutzername für SMS Dienst
Global $Spw = "XYXYXYXYXYXY" ; Passwort für SMS Dienst
Global $Opt = "c" ; Option ( c=ÜbrlangeSMS)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###While 1
[/autoit] [autoit][/autoit] [autoit]
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSECase $Senden ; senden
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
$SmtpServer = "smtp.xxx.de" ;IP des Smtp-Server
$FromAddress = "xxxxxxx@yyy.de" ;Absendemail
$ToAddress = "xxx@yyy.de" ;Dienstemail
$Subject = GUICtrlRead($hh)&";"&GUICtrlRead($ss)&";"&GUICtrlRead($TT)&";"&GUICtrlRead($MM)&";"&GUICtrlRead($JJJJ)&";"&GUICtrlRead($an)&";"&GUICtrlRead($von)&";"&GUICtrlRead($Sname)&";"&GUICtrlRead($Spw)&";"&GUICtrlRead($Opt) ;Betreffzeile
$Body = GUICtrlRead($Text) ;Textinhalt
$Importance = "Normal" ;Mailstatus / Low , Normal , High /
$Username = "xxxxxx@yyy.de" ;Username Smtp-Server
$Password = "XYXYXYX" ;Passwort Smtp-Server
$IPPort = 25 ; bleibt so
$ssl = 0 ; Ssl 0/1 = nein/ja
Senden()Case $Clear ; löschen
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
GUICtrlSetData($hh,"hh")
GUICtrlSetData($ss,"ss")
GUICtrlSetData($TT,"TT")
GUICtrlSetData($MM,"MM")
GUICtrlSetData($JJJJ,"JJJJ")
GUICtrlSetData($an,"An")
GUICtrlSetData($von,"Von")
GUICtrlSetData($Text,"SMS-Text")Case $End ; beenden
[/autoit] [autoit][/autoit] [autoit]
Quit()
ExitEndSwitch
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
WEndFunc Senden()
[/autoit] [autoit][/autoit] [autoit]
_INetSmtpMailCom($SmtpServer, $FromAddress, $ToAddress, $Subject, $Body, $Importance, $Username, $Password, $IPPort, $ssl)
EndFuncFunc Quit()
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
Exit
EndFunc#Include<file.au3>
[/autoit] [autoit][/autoit] [autoit]
Global $oMyError = ObjEvent("AutoIt.Error", "MyErrFunc")Global $oMyRet[2]
[/autoit] [autoit][/autoit] [autoit]Func _INetSmtpMailCom($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Username, $s_Password, $s_Subject = "", $as_Body = "", $s_AttachFiles = "", $s_CcAddress = "", $s_BccAddress = "", $IPPort=465, $ssl=1)
[/autoit]
$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])
If FileExists($S_Files2Attach[$x]) Then
$objEmail.AddAttachment ($S_Files2Attach[$x])
Else
$i_Error_desciption = $i_Error_desciption & @lf & 'File not found to attach: ' & $S_Files2Attach[$x]
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
$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
If $Ssl Then
$objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True
EndIf
;Update settings
$objEmail.Configuration.Fields.Update
; Sent the Message
$objEmail.Send
if @error then
SetError(2)
return $oMyRet[1]
EndIf
EndFunc ;==>_INetSmtpMailCom
;
;
; Com Error Handler
Func MyErrFunc()
$HexNumber = Hex($oMyError.number,
$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 -
Ich bin dabei!
-
Du kannst das Bild per _FileRead auslesen, dann verschlüssel und als String senden. Der Client müsste das dann wieder entschlüsseln, als bilddatei speichern und dann anzeigen...
Dauert ewig! -
Ganz einfach, du hast die Variablen nicht deklariert, wie der Fehler schon sagt...
Nun ja, ich sags mal so, du solltest dich nach diesem Script nochmal die Grundlegenden Sachen von AutoIt anschauen
Du musst die Variablem vor dem Aufrufen der Funktion deklarieren:Spoiler anzeigen
[autoit]
[/autoit] [autoit][/autoit] [autoit]
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_outfile=FSM-SMS-REMAINDER.exe
#AutoIt3Wrapper_UseUpx=n
#AutoIt3Wrapper_Change2CUI=y
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****#include <ButtonConstants.au3>
[/autoit] [autoit][/autoit] [autoit]
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
;~ #include <ubet.au3>
$SmtpServer = "smtp.xxx.de" ;IP des Smtp-Server
$FromAddress = "xxxxxxx@yyy.de" ;Absendemail
$ToAddress = "xxx@yyy.de" ;Dienstemail
$Subject = GUICtrlRead($hh)&";"&GUICtrlRead($ss)&";"&GUICtrlRead($TT)&";"&GUICtrlRead($MM)&";"&GUICtrlRead($JJJJ)&";"&GUICtrlRead($an)&";"&GUICtrlRead($von)&";"&GUICtrlRead($Sname)&";"&GUICtrlRead($Spw)&";"&GUICtrlRead($Opt) ;Betreffzeile
$Body = GUICtrlRead($Text) ;Textinhalt
$Importance = "Normal" ;Mailstatus / Low , Normal , High /
$Username = "xxxxxx@yyy.de" ;Username Smtp-Server
$Password = "XYXYXYX" ;Passwort Smtp-Server
$IPPort = 25 ; bleibt so
$ssl = 0 ; Ssl 0/1 = nein/ja#Region ### START Koda GUI section ### Form=\sms.kxf
[/autoit] [autoit][/autoit] [autoit]
Global $Form1 = GUICreate("SMS", 500, 350, 320, 250)
GUISetIcon("D:\004.ico")
Global $Senden = GUICtrlCreateButton("Senden", 400, 200, 75, 25, 0)
Global $Clear = GUICtrlCreateButton("Neue SMS", 400, 250, 75, 25, 0)
Global $End = GUICtrlCreateButton("Beenden", 400, 300, 75, 25, 0)
Global $hh = GUICtrlCreateInput("hh", 400, 24, 25, 25)
Global $ss = GUICtrlCreateInput("ss", 440, 24, 25, 25)
Global $TT = GUICtrlCreateInput("TT", 240, 25, 25, 25)
Global $MM = GUICtrlCreateInput("MM", 280, 25, 25, 25)
Global $JJJJ = GUICtrlCreateInput("JJJJ", 320, 25, 50, 25)
Global $an = GUICtrlCreateInput("An", 25, 25, 150, 25)
Global $von = GUICtrlCreateInput("Von", 25, 300, 150, 21)
Global $Text = GUICtrlCreateInput("SMS-Text", 25, 80, 350, 200)
Global $Sname = "XXXXX" ; Benutzername für SMS Dienst
Global $Spw = "XYXYXYXYXYXY" ; Passwort für SMS Dienst
Global $Opt = "c" ; Option ( c=ÜbrlangeSMS)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###While 1
[/autoit] [autoit][/autoit] [autoit]
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSECase $Senden ; senden
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
Senden()Case $Clear ; löschen
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
GUICtrlSetData($hh,"hh")
GUICtrlSetData($ss,"ss")
GUICtrlSetData($TT,"TT")
GUICtrlSetData($MM,"MM")
GUICtrlSetData($JJJJ,"JJJJ")
GUICtrlSetData($an,"An")
GUICtrlSetData($von,"Von")
GUICtrlSetData($Text,"SMS-Text")Case $End ; beenden
[/autoit] [autoit][/autoit] [autoit]
Quit()
ExitEndSwitch
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
WEndFunc Senden()
[/autoit] [autoit][/autoit] [autoit]
_INetSmtpMailCom($SmtpServer, $FromAddress, $ToAddress, $Subject, $Body, $Importance, $Username, $Password, $IPPort, $ssl)
EndFuncFunc Quit()
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
Exit
EndFunc#Include<file.au3>
[/autoit] [autoit][/autoit] [autoit]
Global $oMyError = ObjEvent("AutoIt.Error", "MyErrFunc")Global $oMyRet[2]
[/autoit] [autoit][/autoit] [autoit]Func _INetSmtpMailCom($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Username, $s_Password, $s_Subject = "", $as_Body = "", $s_AttachFiles = "", $s_CcAddress = "", $s_BccAddress = "", $IPPort=465, $ssl=1)
[/autoit]
$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])
If FileExists($S_Files2Attach[$x]) Then
$objEmail.AddAttachment ($S_Files2Attach[$x])
Else
$i_Error_desciption = $i_Error_desciption & @lf & 'File not found to attach: ' & $S_Files2Attach[$x]
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
$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
If $Ssl Then
$objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True
EndIf
;Update settings
$objEmail.Configuration.Fields.Update
; Sent the Message
$objEmail.Send
if @error then
SetError(2)
return $oMyRet[1]
EndIf
EndFunc ;==>_INetSmtpMailCom
;
;
; Com Error Handler
Func MyErrFunc()
$HexNumber = Hex($oMyError.number,
$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 -
Wie oft hatten wir das schon?
Na ja, das müsste funktionieren:Spoiler anzeigen
[autoit];
[/autoit] [autoit][/autoit] [autoit]
;##################################
; Include
;##################################
#Include<file.au3>
;################################## ; Variables
;##################################
$SmtpServer = "mail.server.com" ; address for the smtp-server to use - REQUIRED
$FromName = "John.Doe" ; name from who the email was sent
$FromAddress = "User@domain.com" ; address from where the mail should come
$ToAddress = "user@domain.com" ; destination address of the email - REQUIRED
$Subject = "Hello World!" ; subject from the email - can be anything you want it to be
$Body = "This script is great! See attachment!" ; the messagebody from the mail - can be left blank but then you get a blank mail
$AttachFiles = "" ; the file you want to attach- leave blank if not needed
$CcAddress = "" ; address for cc - leave blank if not needed
$BccAddress = "" ; 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
;~ $IPPort=465 ; GMAIL port used for sending the mail
;~ $ssl=1 ; GMAILenables/disables secure socket layer sending - put to 1 if using httpS;##################################
[/autoit]
; 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)
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)
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(62) : $S_Files2Attach = ' & $S_Files2Attach & @LF & '>Error code: ' & @error & @LF) ;### Debug Console
If FileExists($S_Files2Attach[$x]) Then
$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") = 0
$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
If $ssl Then
$objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True
EndIf
;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,
$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 -
Du kennst doch teamviewer. Damit siehst du alles, was der andere auch auf seinem Bildschirm sieht, und kannst ihn auch steuern. Dies benutzt man oft, um Probleme am Computer zu beheben, ohne den anderen besuchen zu müssen.