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. gmmg

Beiträge von gmmg

  • PaKo - Passwort-Koffer

    • gmmg
    • 23. Februar 2012 um 14:46

    hallo oscar,

    super arbeit!
    weißt welche funktion schön wäre, wenn man user oder pwd mit der maus auf das entsprechende eingabefeld ziehen könnte (drag & drop) :)
    das geht glaub ich im keepas!

    gruß gmmg ;)

  • Mac-Adresse von Ethernet-Adapter Lan-Verbindung

    • gmmg
    • 9. Februar 2012 um 12:11

    der code von aspirin junkie funktioniert ab vista!

    vielleicht nützt dir der link etwas...
    How to get mac addresses for physical net adapters on XP
    http://www.windows-api.com/microsoft/Win3…ters-on-xp.aspx


    gruß gmmg

  • AD Domänenpasswort von Standalone PC ändern ?

    • gmmg
    • 2. Februar 2012 um 15:02

    hier ein link mit beispiel

    http://znil.net/index.php?titl…assword_Changer
    oder
    http://znil.net/index.php?titl…4nenbenutzer%29

    gruß gmmg

  • AD Domänenpasswort von Standalone PC ändern ?

    • gmmg
    • 2. Februar 2012 um 10:37

    da möchte ich mal der administrator sein!
    was sagen eure it richtlinien dazu, wenn ein pc ins netz genommen wird, der nicht mitglied der domäne ist, daher der client sich auch keine sicherheitsupdates z.b. per policy zieht usw.

    lad dir die AD.udf und schau dir das besipiel von ad_open an!

  • Spalte aus einer CSV Datei ermitteln

    • gmmg
    • 12. Januar 2012 um 15:45

    wenn die log nicht zu groß ist, kannst du diese auch komplett in ein array einlesen!

    [autoit]


    $sFile = "c:\....\name.csv"
    If Not _FileReadToArray($sFile, $aArray) Then
    MsgBox(4096,"Error", " Error reading log to Array error:" & @error,1)
    Exit
    EndIf

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

    ;_ArrayDisplay($aArray)

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

    For $i = 1 To $aArray[0] -1

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

    $wert = StringSplit ($aArray[$i],";")
    ;MsgBox(0,"", $wert[6])
    Next

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

    gruß gmmg

  • Button in der GUI Titelleiste für Hardcopy (screenshot)

    • gmmg
    • 14. Dezember 2011 um 23:18

    danke für die info kizum!
    die größe des buttons ist an meine derzeitige auflösung angepasst, das müsste man dann noch anhand der auflösung bzw. titelleiste anpassen!

    gruß gmmg

  • Button in der GUI Titelleiste für Hardcopy (screenshot)

    • gmmg
    • 14. Dezember 2011 um 10:42

    Hallo Zusammen,

    habe zu dem oben stehenden Script eine Frage! Kann man irgendwie erreichen, dass das Fensterhandling noch flüssiger geht?

    Danke

    Gruß gmmg

  • Button in der GUI Titelleiste für Hardcopy (screenshot)

    • gmmg
    • 8. Dezember 2011 um 15:27

    überarbeitete version!

    -- screenshot vom allen monitoren!
    -- gui fenstern ohne titelleiste wird kein button mehr verpasst

    ob das alles so korrekt ist könnt ihr gern testen und bearbeiten :)

    Spoiler anzeigen
    [autoit]


    #include <GUIConstants.au3>
    #include <ButtonConstants.au3>
    #include <WindowsConstants.au3>
    #include <WinAPI.au3>
    #include <Constants.au3>
    #include <File.au3>
    #include <ScreenCapture.au3>
    #include <GUIConstantsEx.au3>
    #include <GuiButton.au3>

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

    ;#NoTrayIcon

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

    ;DllCall("UxTheme.dll","int","SetThemeAppProperties","dword",0)
    $GUI = GUICreate('',16,16,-1,-1,$WS_POPUP,$WS_EX_TOPMOST+$WS_EX_TOOLWINDOW)
    GUISetBkColor(_WinAPI_GetSysColor($COLOR_ACTIVEBORDER))
    $Button = GUICtrlCreateButton("2",1,2,14,14,$BS_CENTER)
    ;$Button = GUICtrlCreateButton("",1,2,30,14,$BS_CENTER +$BS_ICON)
    ;_GUICtrlButton_SetImage($Button, "shell32.dll", 181, True)
    GUICtrlSetFont($Button,12,400,0,"Wingdings")
    ;DllCall("UxTheme.dll","int","SetThemeAppProperties","dword",3)
    GUISetState(@SW_SHOWNOACTIVATE)

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

    ;Opt("TrayMenuMode",1)
    ;TrayTip("ScreenShot-Tool:", "zum Erstellen von Windows ScreenShots.", 5, 1)
    ;TraySetIcon("shell32.dll", 181)
    TraySetState()

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

    $hwnd = -1
    $w = 0
    CheckWin()
    AdlibRegister("CheckWin",10)

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

    While 1
    $msg = GUIGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
    AdlibUnRegister("CheckWin")
    Exit
    Case $msg = $Button
    ;MsgBox(0, '', "hi")

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

    Capture_Full() ; erstellt screenshot
    WinActivate($hwnd)

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

    Case $hwnd <> $GUI And WinExists($hwnd)
    $pos = WinGetPos($hwnd)
    WinMove($GUI,"",$pos[0]+$pos[2]-$w,$pos[1]+4)
    EndSelect
    WEnd

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

    Func CheckWin()
    Local $hwnd1 = WinGetHandle("")
    If $hwnd1 <> $GUI And $hwnd <> $hwnd1 Then
    Global $hwnd = $hwnd1
    $Style = _WinAPI_GetWindowLong($hwnd,$GWL_STYLE)
    ;ConsoleWrite($Style & @CRLF)
    $w = 5
    If BitAND($Style,$WS_MINIMIZEBOX) Then $w += 30
    If BitAND($Style,$WS_SYSMENU) Then $w += 35
    If BitAND($Style,$WS_MAXIMIZEBOX) Then $w += 30
    IF Not BitAND($Style,$WS_MINIMIZEBOX) Then $w += 30

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

    $windowtext = _WinAPI_GetWindowText($hWnd)
    ;ConsoleWrite($windowtext & @CRLF)

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

    IF WinActive ("") And $windowtext = "Program Manager" Or $windowtext = "" Then
    GUISetState(@SW_HIDE)
    Else
    GUISetState(@SW_SHOWNOACTIVATE)
    EndIf
    EndIf
    EndFunc

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

    ; function capture screenshot
    Func Capture_Full()

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

    Global $tag_DISPLAY_DEVICE = "dword cb;char DeviceName[32];char DeviceString[128];dword StateFlags;char DeviceID[128];char DeviceKey[128]"
    ;Global Const $DISPLAY_DEVICE_MIRRORING_DRIVER = 0x00000008
    ;Global Const $DISPLAY_DEVICE_PRIMARY_DEVICE = 0x00000004

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

    Global $tag_POINTL = "long x;long y"
    Global $tag_DEVMOD = "char dmDeviceName[32];ushort dmSpecVersion;ushort dmDriverVersion;short dmSize;" & _
    "ushort dmDriverExtra;dword dmFields;" & $tag_POINTL & ";dword dmDisplayOrientation;dword dmDisplayFixedOutput;" & _
    "short dmColor;short dmDuplex;short dmYResolution;short dmTTOption;short dmCollate;" & _
    "byte dmFormName[32];ushort LogPixels;dword dmBitsPerPel;int dmPelsWidth;dword dmPelsHeight;" & _
    "dword dmDisplayFlags;dword dmDisplayFrequency"
    ;Global Const $ENUM_CURRENT_SETTINGS = -1
    Global $ENUM_CURRENT_SETTINGS = -1

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

    Global $Left, $Top, $Right, $Bottom
    Global $i = 0

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

    While 1
    $struct = DllStructCreate($tag_DISPLAY_DEVICE)
    DllStructSetData($struct, "cb", DllStructGetSize($struct))

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

    $aRetrun = DllCall("user32.dll", "int", "EnumDisplayDevices", "ptr", 0, "dword", $i, "ptr", DllStructGetPtr($struct), "dword", 0)
    If Not $aRetrun[0] Then ExitLoop

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

    If Not BitAND(DllStructGetData($struct, "StateFlags"), $DISPLAY_DEVICE_MIRRORING_DRIVER) Then ; Avoid Virtual Displays
    ;~ ConsoleWrite(DllStructGetData($struct, "DeviceName") & @TAB & "Primary: " & (BitAND(DllStructGetData($struct, "StateFlags"), $DISPLAY_DEVICE_PRIMARY_DEVICE) > 0) & @CRLF)

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

    $dev = DllStructCreate($tag_DEVMOD)
    DllStructSetData($dev, "dmSize", DllStructGetSize($dev))
    $aRetrun = DllCall("user32.dll", "int", "EnumDisplaySettings", "str", DllStructGetData($struct, "DeviceName"), "dword", $ENUM_CURRENT_SETTINGS, "ptr", DllStructGetPtr($dev))

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

    If Not IsNumber($Left) Or $Left > DllStructGetData($dev, "x") Then $Left = DllStructGetData($dev, "x")
    If Not IsNumber($Top) Or $Top > DllStructGetData($dev, "y") Then $Top = DllStructGetData($dev, "y")
    If Not IsNumber($Right) Or $Right < DllStructGetData($dev, "x") + DllStructGetData($dev, "dmPelsWidth") Then $Right = DllStructGetData($dev, "x") + DllStructGetData($dev, "dmPelsWidth")
    If Not IsNumber($Bottom) Or $Bottom < DllStructGetData($dev, "y") + DllStructGetData($dev, "dmPelsHeight") Then $Bottom = DllStructGetData($dev, "y") + DllStructGetData($dev, "dmPelsHeight")
    EndIf
    $i += 1
    WEnd

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

    If $CmdLine[0] = 1 Then
    _ScreenCapture_Capture($CmdLine[1], $Left, $Top, $Right, $Bottom)
    Else
    _ScreenCapture_Capture(@MyDocumentsDir & "\Printscreen.jpg", $Left, $Top, $Right, $Bottom)
    EndIf
    EndFunc ;==>CaptureFull

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

    vielleicht kann mal einer drüber schauen ...

    gruß gmmg

  • Button in der GUI Titelleiste für Hardcopy (screenshot)

    • gmmg
    • 8. Dezember 2011 um 11:00

    Hallo Zusammen,

    ich habe mal ein altes Script ausgekrahmt, mit dem man über einen Button in der GUI Titelleiste machen kann! Ähnlich dem Programm Hardcopy!

    Hier sind noch paar schönheitsfehler drin!
    - wenn die button [min/max/close] nicht da sind, springt die hardcopy button außerhalb der gui!
    - der zusätzliche button braucht manchmal etwas, bis er an der richtigen stelle sitzt!
    nun die frage, wie kann man das am einfachsten lösen?

    Spoiler anzeigen
    [autoit]


    #include <GUIConstants.au3>
    #include <ButtonConstants.au3>
    #include <WindowsConstants.au3>
    #include <WinAPI.au3>
    #include <Constants.au3>
    #include <File.au3>
    #include <ScreenCapture.au3>
    #include <GUIConstantsEx.au3>
    #include <GuiButton.au3>

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

    ;#NoTrayIcon

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

    ;DllCall("UxTheme.dll","int","SetThemeAppProperties","dword",0)
    $GUI = GUICreate('',16,16,-1,-1,$WS_POPUP,$WS_EX_TOPMOST+$WS_EX_TOOLWINDOW)
    GUISetBkColor(_WinAPI_GetSysColor($COLOR_ACTIVEBORDER))
    $Button = GUICtrlCreateButton("2",1,2,14,14,$BS_CENTER)
    ;$Button = GUICtrlCreateButton("",1,2,30,14,$BS_CENTER +$BS_ICON)
    ;_GUICtrlButton_SetImage($Button, "shell32.dll", 181, True)
    GUICtrlSetFont($Button,12,400,0,"Wingdings")
    ;DllCall("UxTheme.dll","int","SetThemeAppProperties","dword",3)
    GUISetState(@SW_SHOWNOACTIVATE)

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

    ;Opt("TrayMenuMode",1)
    ;TrayTip("ScreenShot-Tool:", "zum Erstellen von Windows ScreenShots.", 5, 1)
    ;TraySetIcon("shell32.dll", 181)
    TraySetState()

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

    $hwnd = -1
    $w = 0
    CheckWin()
    AdlibRegister("CheckWin",10)

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

    While 1
    $msg = GUIGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
    AdlibUnRegister("CheckWin")
    Exit
    Case $msg = $Button
    ;MsgBox(0, '', "hi")

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

    Capture() ; erstellt screenshot

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

    WinActivate($hwnd)
    Case $hwnd <> $GUI And WinExists($hwnd)
    $pos = WinGetPos($hwnd)
    WinMove($GUI,"",$pos[0]+$pos[2]-$w,$pos[1]+4)
    EndSelect
    WEnd

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

    Func CheckWin()
    Local $hwnd1 = WinGetHandle("")
    If $hwnd1 <> $GUI And $hwnd <> $hwnd1 Then
    Global $hwnd = $hwnd1
    $Style = _WinAPI_GetWindowLong($hwnd,$GWL_STYLE)
    $w = 5
    If BitAND($Style,$WS_MINIMIZEBOX) Then $w += 30
    If BitAND($Style,$WS_SYSMENU) Then $w += 35
    If BitAND($Style,$WS_MAXIMIZEBOX) Then $w += 30
    EndIf
    EndFunc

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

    ; function capture screenshot
    Func Capture()
    ; Capture full screen
    If FileExists(@MyDocumentsDir & "\screenshot") Then
    ;MsgBox(4096, "C:\autoexec.bat File", "Exists")
    Else
    ;MsgBox(4096,"C:\autoexec.bat File", "Does NOT exists")
    DirCreate(@MyDocumentsDir & "\screenshot")
    EndIf
    ;FileDelete(@MyDocumentsDir & "\Printscreen*.*"
    _ScreenCapture_Capture(@MyDocumentsDir & "\screenshot\screenshot.jpg")
    ;MsgBox(0, "", "Screenshot erstellt!", 1)

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

    EndFunc ;==>Capture_start

    [/autoit]

    danke

    gruß gmmg

  • _Inetmail mit Anhang

    • gmmg
    • 21. Oktober 2011 um 09:14

    ok ...

    auf den folgenden links gibts was zu outlook express, aber ob das dir weiterhilft!
    http://www.codeguru.com/forum/showthread.php?t=233239
    http://www.freevbcode.com/ShowCode.asp?ID=5213

    gruß gmmg

  • Auf Internetseite einloggen

    • gmmg
    • 20. Oktober 2011 um 15:53

    @TOYY1

    ich selbst habe das noch nicht benötigt! bisher habe ich nur den login automatisiert.

    gruß gmmg

  • Auf Internetseite einloggen

    • gmmg
    • 20. Oktober 2011 um 14:03

    kein problem :)

    wir helfen doch gern

    gruß gmmg :P

  • Auf Internetseite einloggen

    • gmmg
    • 20. Oktober 2011 um 12:29

    leider komm ich nicht zum logout button, da ich mich nicht einloggen kann :)

    weißt du wie man firebug benutzt?
    du startest firebug mit F12, dann klickst du mit der maus auf den 2. button von links, um ein element zu untersuchen!
    im firebug fenster wird nun der entsprechende quellcode angezeigt!

    beispiel:
    das ist der quelltext vom logout button der autoit seite!

    [autoit]


    <li id="userMenuLogout">
    <a href="index.php?action=UserLogout&amp;t=c1155d436b854b0d2cf124141ba0625e1f7addae">
    <img alt="" src="wcf/icon/logoutS.png">
    <span>Abmelden</span>
    </a>
    </li>

    [/autoit]


    hier der autoit code!
    entweder du versuchst, wie unten zusehen, den button über die id anzusprechen oder du benutzt das bild.

    http://translation.autoit.de/onlinehilfe/li…_IEImgClick.htm

    [autoit]


    $logout = _IEGetObjById($oIE,'userMenuLogout)
    _IEAction($logout, "click")
    ;oder
    _IEImgClick ($oIE, "http://www.autoit.de/wcf/icon/logoutS.png")

    [/autoit]

    wie gesagt, die info musst du dann von deiner seite holen.

    gruß gmmg

  • Auf Internetseite einloggen

    • gmmg
    • 20. Oktober 2011 um 11:19

    ich würd das so machen!

    [autoit]


    #include <IE.au3>

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

    $user = "user"
    $pass = "passwort"

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

    $seite_state = "Login - Dlubal Software - Windows Internet Explorer"
    $oIE = _IECreate ("http://www.dlubal.de/Extra/LoginPage.aspx") ;livesystem

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

    WinSetState ($seite_state, "", @SW_MAXIMIZE )

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

    _IELoadWait($oIE)
    $oForm = _IEFormGetObjByName($oIE, "aspnetForm")
    $oUsername = _IEFormElementGetObjByName($oForm, "ctl00$centerColumn$tbLogin")
    _IEFormElementSetValue($oUsername, $user)
    $oPasswd = _IEFormElementGetObjByName($oForm, "ctl00$centerColumn$tbPassword")
    _IEFormElementSetValue($oPasswd, $pass)

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

    _IEImgClick ($oIE, "http://www.dlubal.de/Content/images/imagebuttonleft1.gif")
    _IELinkClickByText ($oIE, "Infopool")
    ;$oSubmit = _IEFormElementGetObjByName($oForm, "ctl00$centerColumn$imgButton")
    ;_IEAction ($oSubmit, "click")
    Sleep (1000)
    WinActivate($seite_state)
    ;_IEQuit ($oIE)

    [/autoit]

    zur info! ausgelesen hab ich die namen der form mit firefox und firebug

    gruß gmmg ;)

  • _Inetmail mit Anhang

    • gmmg
    • 20. Oktober 2011 um 10:16

    was willst du denn genau machen wäre die frage!

    wir auf arbeit haben es entweder mit der blat.exe oder über die autoit smtp funktion gelöst, mails mit attachments automatisiert zu versenden!

    hier ein älteres beispiel aus dem forum

    Spoiler anzeigen
    [autoit]


    #include <File.au3>
    #include <String.au3>

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

    ;#######################################################
    ; 1 tes mal als sms senden # Agent Performance Team BigService #
    ;#######################################################
    ;#########################
    ;pfad für anhang
    ;#########################

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

    $path1 = "\\server\Reporting1.pdf" ;"C:\Reporting\reporting2.pdf" ;attachments
    $mailto_01 = "user1@xxxxx.de;[email='user2@xxxx.de'][/email];user3@xxxx.de" ; mailempfänger
    MsgBox(0,"",$path1)
    ;#Include<file.au3>
    Global $oMyError = ObjEvent("AutoIt.Error", "MyErrFunc")
    ;##################################
    ; Include
    ;##################################
    ;#Include<file.au3>
    ;##################################
    ; Variables
    ;##################################
    $s_SmtpServer = "10.xx.xx.xx" ; address for the smtp-server to use - REQUIRED
    $s_FromName = "support@xxxxxx.de" ; name from who the email was sent
    $s_FromAddress = "support@xxxxxx.de" ; address from where the mail should come
    $s_ToAddress = $mailto_01 ; destination address of the email - REQUIRED
    $s_Subject = "report" ; subject from the email - can be anything you want it to be
    $as_Body = ""; the messagebody from the mail - can be left blank but then you get a blank mail
    $s_AttachFiles = $path1 ; the file you want to attach- leave blank if not needed
    $s_CcAddress = "" ; address for cc - leave blank if not needed
    $s_BccAddress = "support@xxxxx.de" ; address for bcc - leave blank if not needed
    $s_Username = "tool" ; username for the account used from where the mail gets sent - Optional (Needed for eg GMail)
    $s_Password = "xxxxxxxx" ; password for the account used from where the mail gets sent - Optional (Needed for eg GMail)
    $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] [autoit][/autoit] [autoit]

    ;##################################
    ; Script
    ;##################################
    Global $oMyRet[2]
    Global $oMyError = ObjEvent("AutoIt.Error", "MyErrFunc")
    $rc = _INetSmtpMailCom($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $as_Body, $s_AttachFiles, $s_CcAddress, $s_BccAddress, $s_Username, $s_Password, $IPPort, $ssl)
    If @error Then
    MsgBox(0, "Error sending message", "Error code:" & @error & " Description:" & $rc)
    EndIf
    ;

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

    Func _INetSmtpMailCom($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject = "", $as_Body = "", $s_AttachFiles = "", $s_CcAddress = "", $s_BccAddress = "", $s_Username = "", $s_Password = "",$IPPort=25, $ssl=0)
    $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, 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

    [/autoit]

    gruß gmmg

  • _Inetmail mit Anhang

    • gmmg
    • 17. Oktober 2011 um 14:03

    was ist mit der outlook udf?
    hier im forum oder auf http://www.autoitscript.com/forum/topic/126305-outlookex-udf/

    gmmg

  • AutoIT-Script hört nach beenden der RDP-Sitzung auf zu arbeiten?

    • gmmg
    • 4. Oktober 2011 um 15:03

    ein tool mit einer gui ist immer problematisch wenn es im hintergrund laufen soll!

    ist es nicht da allgemein besser, man schreibt sich ein command zeilen tool als backend und lässt das im hintergrund laufen!
    als frontend kann ja dann ein script mit gui genutzt werden.

    gruß gmmg ;)

  • Datenbank nutzen, aber wie?

    • gmmg
    • 3. Oktober 2011 um 09:33

    hallo,

    du musst dir da nur ne andere query mit den mysql befehlen zusammenbauen!
    hier mal ein beispiel für "Insert on duplicate key"

    Spoiler anzeigen
    [autoit]


    Local $sQuery = "INSERT INTO tab_vorgang (`Bu-Nr`,`UMSATZ isoliert EUR`,`DATUM`,`Aenderungsdatum`,`TourLST`,`RRKV Umsatz`," & _
    "`DAT`,`Ag-Nr`,`WVLKZ`,`WVL-DAT`,`ULA_DAT`) " & _
    "VALUES ('" & $s_Row_txt_t1[1] & "',"& _
    "'" & $s_Row_txt_t1[2] & "',"& _
    "'" & $s_Row_txt_t1[3] & "',"& _
    "'" & $s_Row_txt_t1[4] & "',"& _
    "'" & $s_Row_txt_t1[5] & "',"& _
    "'" & $s_Row_txt_t1[6] & "',"& _
    "'" & $s_Row_txt_t1[7] & "',"& _
    "'" & $s_Row_txt_t1[8] & "',"& _
    "'" & $s_Row_txt_t1[9] & "',"& _
    "'" & $s_Row_txt_t1[10] & "',"& _
    "'" & $s_Row_txt_t1[11] & "')"& _
    " ON DUPLICATE KEY UPDATE "& _
    "`UMSATZ isoliert EUR` = (" & "'" & $s_Row_txt_t1[2] & "'" & ") ," & _
    "`DATUM` = (" & "'" & $s_Row_txt_t1[3] & "'" & ")," & _
    "`Aenderungsdatum` = (" & "'" & $s_Row_txt_t1[4] & "'" & ")," & _
    "`TourLST` = (" & "'" & $s_Row_txt_t1[5] & "'" & ")," & _
    "`RRKV Umsatz` = (" & "'" & $s_Row_txt_t1[6] & "'" & ")," & _
    "`DAT` = (" & "'" & $s_Row_txt_t1[7] & "'" & ")," & _
    "`Ag-Nr` = (" & "'" & $s_Row_txt_t1[8] & "'" & ")," & _
    "`WVLKZ` = (" & "'" & $s_Row_txt_t1[9] & "'" & ")," & _
    "`WVL-DAT` = (" & "'" & $s_Row_txt_t1[10] & "'" & ")," & _
    "`ULA_DAT` = (" & "'" & $s_Row_txt_t1[11] & "'" & ")"

    [/autoit]

    gruß gmmg

  • Vom User festgelegtes Passwort in INI Datei speichern und beim Öffnen abfragen

    • gmmg
    • 30. September 2011 um 15:38

    also bei mir kommt, wenn die ini nicht da ist, die abfrage "Create Passwort"!
    hast du alle pfade geprüft?
    benutzt du scite als editor? da hast du doch die output option (taste F 8 ), in der dir die fehler angezeigt werden!

    vielleicht solltest du das ganze mal direkt ohne filesave dialog speicher!

    [autoit]


    ;Global $Save_Ort = FileSaveDialog( "Benutzerdaten speichern", $f_prog_dir , "Alle Dateien (*.*)", 0, "passwort.ini")
    ;FileClose( $Save_Ort )
    IniWrite($f_prog_dir & "\passwort.ini", "Passwort" ,"key01" , $Input1Read)
    GUISetState(@SW_hide)
    MsgBox(0,"","Passwort.ini wurde erstellt")
    check()

    [/autoit]

    gruß gmmg

  • Vom User festgelegtes Passwort in INI Datei speichern und beim Öffnen abfragen

    • gmmg
    • 30. September 2011 um 09:58

    hallo,

    da sind noch einige schönheitsfehler drin!
    wenn du den filesave dialog benutzt, musst du sicherstellen, das der feste pfad zur ini dann auch eingehalten wird.
    d.h. du musst den pfad zur inidatei zur gleichen zeit in die registry oder eine andere datei schreiben und dann beim starten des programms diesen auslesen, um die ini zu prüfen.

    [autoit]


    #RequireAdmin
    #include <File.au3>
    #include <String.au3>
    #include <ButtonConstants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
    #include <WindowsConstants.au3>

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

    $f_prog_dir = "d:\" ;ggf. mittels regread den Pfad ermitteln, es muss ja nicht überall so passen

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

    If FileExists($f_prog_dir & "\passwort.ini") then
    check()
    Else
    createpw()
    EndIf

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

    ;~ check() ;wird das noch benötigt?

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

    Exit

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

    ;~ #Funktionen--------------------------------------------------

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

    Func createpw()
    $Form1 = GUICreate("Create Passwort", 280, 83, 192, 124)
    $Input1 = GUICtrlCreateInput("", 8, 8, 257, 21)
    $Button1 = GUICtrlCreateButton("Speichern", 8, 48, 257, 25, $WS_GROUP)
    GUISetState(@SW_SHOW)
    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Button1
    $Input1Read = GUICtrlRead( $Input1 )
    If $Input1Read="" Then
    MsgBox(0,"Save Password","Kein Passwort eingetragen!")
    Else
    Global $Save_Ort = FileSaveDialog( "Benutzerdaten speichern", $f_prog_dir , "Alle Dateien (*.*)", 0, "passwort.ini")
    FileClose( $Save_Ort )
    IniWrite( $Save_Ort, "Passwort" ,"key01" , $Input1Read)
    GUISetState(@SW_hide)
    check()
    EndIf

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

    EndSwitch
    WEnd
    EndFunc

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

    Func check()
    $pass = InputBox ("Prüfe Password BETA 1", "Bitte trage hier dein Passwort ein!","","*",250,130)
    If IniRead ($f_prog_dir & "\passwort.ini","Passwort","key01","") = $pass Then
    SoundPlay($f_prog_dir & "start.mp3")
    MsgBox(0,"Save Password", "Sie haben sich erfolgreich als " & @UserName & " eingeloggt!")
    SoundPlay($f_prog_dir & "Media\standart.mp3")
    Else
    $msgbox=MsgBox (1,"Save Password BETA 1" , "Falsche Antwort!" & @CRLF & "Nochmal versuchen?")
    If $msgbox=2 Then
    Exit
    EndIf
    EndIf
    EndFunc

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

    achtung, ich habe die pfade für mich angepasst!

    gruß gmmg ;)

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™