1. Dashboard
  2. Mitglieder
    1. Letzte Aktivitäten
    2. Benutzer online
    3. Team
    4. Mitgliedersuche
  3. Forenregeln
  4. Forum
    1. Unerledigte Themen
  • Anmelden
  • Registrieren
  • Suche
Alles
  • Alles
  • Artikel
  • Seiten
  • Forum
  • Erweiterte Suche
  1. AutoIt.de - Das deutschsprachige Forum.
  2. Mitglieder
  3. n00b-it

Beiträge von n00b-it

  • Auswahl Email mit Anhang Ja oder Nein

    • n00b-it
    • 15. August 2011 um 09:07

    Vielen Dank,

    es hat so funktioniert.

  • Auswahl Email mit Anhang Ja oder Nein

    • n00b-it
    • 14. August 2011 um 16:22

    Hallo alle zusammen,

    ich hab dieses Skript:

    Spoiler anzeigen
    [autoit]

    Global $oMyRet[2] Global $oMyError = ObjEvent("AutoIt.Error", "MyErrFunc") ;#include <_pop3.au3> #include <_INetSmtpMailCom.au3> ;################################## ; Variables ;################################## $SmtpServer = "smtp.web.de" ; address for the smtp-server to use - REQUIRED $FromName = "" ; name from who the email was sent $FromAddress = "myName@web.de" ; address from where the mail should come $ToAddress = "taAdress@gmx.de" ; destination address of the email - REQUIRED $Subject = "Userinfo" ; subject from the email - can be anything you want it to be $Body = "Test" ; 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 = "myName@web.de" ; username for the account used from where the mail gets sent - REQUIRED $Password = "PassWort" ; password for the account used from where the mail gets sent - REQUIRED $IPPort = 587 ; port used for sending the mail normaly 25 $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 ;################################## ; Script ;################################## ;_pop3Connect("pop3.live.com", $Username, $Password) $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

    [/autoit]


    von AutoBert aus diesem Thread: KLICK

    Jetzt ist meine Frage wie ich das somachen kann das man auswählen kann ob man AttachFiles hat oder nicht.
    Ich hab eine GUI, wo eine Checkbox ist, wo man wählen kann ob man eine Datei anhängen möchte. Immer wenn ich dann die Checkbox unaktivert lasse, kommt ein Fehler das die Variable die ich dem OpenFileDialog zugewiesen habe, nicht deklariert ist.
    Hier mal die Funktion dazu:

    Spoiler anzeigen
    [autoit]

    If (GUICtrlRead($Screenshot)) = $GUI_CHECKED Then
    $message = "Bitte wählen Sie den Screeshot."
    $var = FileOpenDialog($message, "C:\", "Bilder (*.jpg;*.bmp)", 1 + 4 )
    If @error Then
    MsgBox(0, "Fehler!", "Es ist ein Fehler aufgetreten. Bitte versuchen Sie es erneut.")
    $var = ""
    Exit
    Else
    $var = StringReplace($var, "|", @CRLF)
    EndIf
    Else
    MsgBox(64, "Nicht aktiviert", "Test")
    EndIf
    ;##################################
    ; Variables
    ;##################################
    $Antwort = GUICtrlRead($Auswahl_System)
    $Name_Abteilung = GUICtrlRead($Abteilung)
    $SmtpServer = "smtp.web.de" ; address for the smtp-server to use - REQUIRED
    $FromName = @UserName ; name from who the email was sent
    $FromAddress = "xxx" ; address from where the mail should come
    $ToAddress = "xxx" ; destination address of the email - REQUIRED
    $Subject = "Supportmeldung: " & @ComputerName ; subject from the email - can be anything you want it to be
    $Body = "Datum: " & @MDAY & "." & @MON & "." & @YEAR & @CRLF & "Uhrzeit: " & @HOUR & ":" & @MIN & @CRLF & "Benutzername: " & @UserName & @CRLF & "Computername: "& @ComputerName & @CRLF & "IP Addresse: " & @IPAddress1 & @CRLF & "System: "& $Antwort & @CRLF & "Fehlerbeschreibung: " & GUICtrlRead($Fehlerbescheibung)
    ; the messagebody from the mail - can be left blank but then you get a blank mail
    $AttachFiles = $var ; 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 = "xxx" ; username for the account used from where the mail gets sent - REQUIRED
    $Password = "xxx" ; password for the account used from where the mail gets sent - REQUIRED
    $IPPort = 587 ; port used for sending the mail normaly 25
    $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
    ;##################################
    ; Script
    ;##################################
    $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)
    Else
    MsgBox(64, "Erfolgreich", "Die Supportmitteilung wurde erfolgreich an die Fachinformatik übermittelt. Bitte haben Sie gedult, wir setzten und sofort mit Ihnen in Verbindung.")
    EndIf

    [/autoit]

    Ich hoffe ihr wisst was ich meine und könnt mir helfen.

    Lg und danke

  • Alle IP-Adresse rausfinden

    • n00b-it
    • 9. August 2011 um 16:24

    Ich habs rausgefunden, warum es nicht ging.
    Es fehlte nur ein include.

  • Alle IP-Adresse rausfinden

    • n00b-it
    • 9. August 2011 um 12:40

    Das mit dem Befehl habe ich jetzt hinbekommen, nur bei diesem StdoutRead und bei StderrRead komme ich nicht weiter.
    Das ist mein Code bis jetzt. Ich weiß echt nicht weiter.

    Spoiler anzeigen
    [autoit]

    Func Finde_IPs()
    Local $Cmd = Run(@ComSpec & " /c " & 'net view /all', "", @SW_MINIMIZE, $STDERR_CHILD, $STDIN_CHILD & $STDOUT_CHILD)
    Local $Cmd_IP
    While 1
    $Cmd_IP = StdoutRead($Cmd)
    If @error Then
    ExitLoop
    MsgBox(64, "Es ist ein Fehler aufgetreten.", $Cmd_IP)
    EndIf
    IniWrite("test.ini", "Name", "IP", $Cmd_IP)
    WEnd
    While 1
    $Cmd_IP = StderrRead($Cmd)
    If @error Then
    ExitLoop
    MsgBox(64, "Es ist ein Fehler aufgetreten.", $Cmd_IP)
    EndIf
    WEnd
    EndFunc

    [/autoit]
  • Alle IP-Adresse rausfinden

    • n00b-it
    • 9. August 2011 um 12:10

    Ich bekomme bei den zwei Befehlen StdoutRead() und bei StderrRead() immer einen Fehler angezeigt.

    [autoit]

    C:\Users\praktikant\Desktop\AutoIT\Netzwerk-Scanner\scanner.au3(52,49) : WARNING: $STDOUT_CHILD: possibly used before declaration.
    Run("cmd /c net view","",@SW_HIDE,$STDOUT_CHILD+
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
    C:\Users\praktikant\Desktop\AutoIT\Netzwerk-Scanner\scanner.au3(52,63) : WARNING: $STDERR_CHILD: possibly used before declaration.
    Run("cmd /c net view","",@SW_HIDE,$STDOUT_CHILD+$STDERR_CHILD)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
    C:\Users\praktikant\Desktop\AutoIT\Netzwerk-Scanner\scanner.au3(53,12) : ERROR: StdoutRead() [built-in] called with wrong number of args.
    StdoutRead()
    ~~~~~~~~~~~^
    C:\Users\praktikant\Desktop\AutoIT\Netzwerk-Scanner\scanner.au3(54,12) : ERROR: StderrRead() [built-in] called with wrong number of args.
    StderrRead()
    ~~~~~~~~~~~^
    C:\Users\praktikant\Desktop\AutoIT\Netzwerk-Scanner\scanner.au3(55,13) : ERROR: TCPNameToIP() [built-in] called with wrong number of args.
    TCPNameToIP()

    [/autoit]
  • Alle IP-Adresse rausfinden

    • n00b-it
    • 9. August 2011 um 11:23

    Ok mache ich.
    Danke

  • Alle IP-Adresse rausfinden

    • n00b-it
    • 9. August 2011 um 10:47

    Guten Morgen.

    Ist es mit AutoIT möglich alle IP-Adressen eines Netzwerks anzuzeigen?
    Und wenn ja, wie mache ich das am besten?

    LG und danke

  • Prüfen ob ein bestimmtes Programm installiert ist

    • n00b-it
    • 8. August 2011 um 17:58

    Ich hab jetzt mal bei einem 32-Bit Windows System nachgeguckt und da ist in der Registry bei Uninstal kein Eintrag für Adobe Reader.
    Gibt es noch eine andere Möglichkeit herauszufinden was installiert ist?
    Kann AutoIT auch auf Programme und Funktionen in der Systemsteuerung zugreifen?

  • Prüfen ob ein bestimmtes Programm installiert ist

    • n00b-it
    • 8. August 2011 um 17:31

    Ok, danke für den Tipp.

    Nur habe ich jetzt das Problem, das zum Beispiel der Adobe Reader nicht darin angezeigtwird obwohl er installiert ist.

  • Prüfen ob ein bestimmtes Programm installiert ist

    • n00b-it
    • 8. August 2011 um 17:24

    Das hatte ich mir auch schon überlegt.
    Ich habs jetzt so gemacht das er im Standartinstallatiospfad sucht, aber was mache ich wenn das jemand vorher in ein anderes Verzeichniss installiert hat?

    Sorry für die Fragen, kenne mich in AutoIT noch nicht so gut aus.

  • Prüfen ob ein bestimmtes Programm installiert ist

    • n00b-it
    • 8. August 2011 um 16:56

    Weil ich für so Standart Programme ein Tool erstellen wollte, welche die Programme automatisch installiert.
    Ich hätte nur vorher gerne eine Abfrage ob das Programm schon auf dem Rechner vorhanden ist.

  • Prüfen ob ein bestimmtes Programm installiert ist

    • n00b-it
    • 8. August 2011 um 16:44

    Hallo alle zusammen.

    Wie kann ich mit AutoIT überprüfen ob ein bestimmtes Programm schon auf dem Rechner installiert ist?

    LG und danke

  • CMD Befehl Ping

    • n00b-it
    • 2. August 2011 um 17:08

    Hallo.

    In der cmd gibt es ja bei dem Befehl Ping den Parameter -a, um die IP-Adresse in Hostnamen aufzulösen.
    Was mich interesieren würde, ob es diese Möglichkeit auch im AutoIT gibt.
    Ich hoffe ihr wisst was ich meine.

    LG und danke

  • For-Schleife und Progressbar

    • n00b-it
    • 1. Juli 2011 um 10:41

    Hallo.

    Spoiler anzeigen
    [autoit]

    #include
    #include

    [/autoit] [autoit][/autoit] [autoit]

    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Status", 345, 89, 193, 125)
    $Progress1 = GUICtrlCreateProgress(8, 64, 326, 17)
    GUICtrlSetLimit(-1, 4590, 0)
    $Label1 = GUICtrlCreateLabel("Bitte Warten - Die IP-Adressen werde überprüft", 8, 40, 327, 20)
    GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
    $Button1 = GUICtrlCreateButton("Starten!", 8, 8, 331, 25, 0)
    GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Button1
    ; Benötigte Textdateien erstellen
    If Not _FileCreate("erfolgreich.txt") Then
    EndIf
    If Not _FileCreate("fehlgeschlagen.txt") Then
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    $erfolgreich = FileOpen("erfolgreich.txt", 2)
    $fehlgeschlagen = FileOpen("fehlgeschlagen.txt", 2)
    For $bereich = 1 To 18
    For $adresse = 1 To 255
    If Ping("xx.xxx."&$bereich&"."&$adresse,2) Then
    FileWriteLine($erfolgreich, "Online: xx.xxx."&$bereich&"."&$adresse&@CRLF)
    Else
    FileWriteLine($fehlgeschlagen, "Offline: xx.xxx."&$bereich&"."&$adresse&@CRLF)
    EndIf
    GUICtrlSetData($Progress1, 1)
    Next
    Next
    MsgBox(0, "Erfolgreich!", "Es wurden alle IPs erfolgreich überprüft!")
    ExitLoop
    EndSwitch
    WEnd

    [/autoit]

    Das ist mein Skript, mit welchem ich alle IP-Adressen in unserer Firma anpingen lasse.
    NAch der 2. For-Schleife soll sich die Progressbar um 1 erhöhen, wie mache ich das?
    Im Moment erhöht sich der Wert nur einmal.

    LG und Danke

Spenden

Jeder Euro hilft uns, Euch zu helfen.

Download

AutoIt Tutorial
AutoIt Buch
Onlinehilfe
AutoIt Entwickler
  1. Datenschutzerklärung
  2. Impressum
  3. Shoutbox-Archiv
Community-Software: WoltLab Suite™