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

Beiträge von derBrot

  • Information ausgeben wenn neue Datei erstellt wird.

    • derBrot
    • 20. Juni 2013 um 14:05

    misterspeed Danke für die Antwort :)

    @m-obi Ich würde aber gerne das sich das script auf den kompletten PC bezieht.

    Hier mein versuch, hat aber jedoch nicht funktioniert :o

    [autoit]


    #include <WinAPI.au3>

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

    Opt("TrayAutoPause", 0)

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

    Global Const $SHCNE_RENAMEITEM = 0x0001
    Global Const $SHCNE_CREATE = 0x0002
    Global Const $SHCNE_DELETE = 0x0004
    Global Const $SHCNE_MKDIR = 0x0008
    Global Const $SHCNE_RMDIR = 0x0010
    Global Const $SHCNE_UPDATEDIR = 0x1000
    Global Const $SHCNE_UPDATEITEM = 0x2000
    Global Const $SHCNE_UPDATEIMAGE = 0x8000
    Global Const $SHCNE_RENAMEFOLDER = 0x20000
    Global Const $SHCNE_ALLEVENTS = 0x7FFFFFFF

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

    OnAutoItExitRegister("OnAutoItExit")

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

    $SHNOTIFY = _WinAPI_RegisterWindowMessage("shchangenotifymsg")

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

    $gui = GUICreate("")
    GUIRegisterMsg($SHNOTIFY, "MY_SHNOTIFY")

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

    ;~ If Not FileExists("C:\test") Then DirCreate("C:\test")
    ;~ If Not FileExists("C:\test2") Then DirCreate("C:\test2")
    $ppidl = DllCall("shell32.dll", "ptr", "ILCreateFromPathW", "wstr", "C:\")
    ConsoleWrite($ppidl[0] & @CRLF)
    $ppidl2 = DllCall("shell32.dll", "ptr", "ILCreateFromPathW", "wstr", "C:\")
    ConsoleWrite($ppidl2[0] & @CRLF)
    $shArray = DllStructCreate("double; double"); 16 bytes = two 8 byte shnotifystructs in an array
    ; == this could also be done as DllStructCreate("double[2]"), $pshArray = DllStructGetPtr($shArray)
    ; == then below would be
    ; == $shnotifystruct = DllStructCreate("ptr pidl; int fRecursive", $pshArray)
    ; == $shnotifystruct2 = DllStructCreate("ptr pidl; int fRecursive", $pshArray + 8) -> ptr to array plus 8 bytes
    ; == for many folders, either method could be achieved by use of loops
    $shnotifystruct = DllStructCreate("ptr pidl; int fRecursive", DllStructGetPtr($shArray, 1)); first struct, first element
    ConsoleWrite("error1: " & @error & @CRLF)
    DllStructSetData($shnotifystruct, "pidl", $ppidl[0])
    DllStructSetData($shnotifystruct, "fRecursive", 0)
    $shnotifystruct2 = DllStructCreate("ptr pidl; int fRecursive", DllStructGetPtr($shArray, 2)); second struct, second element
    ConsoleWrite("error2: " & @error & @CRLF)
    DllStructSetData($shnotifystruct2, "pidl", $ppidl2[0])
    DllStructSetData($shnotifystruct2, "fRecursive", 0)
    $register = DllCall("shell32.dll", "int", "SHChangeNotifyRegister", "hwnd", $gui, _
    "int", 0x0003, _
    "long", BitOR($SHCNE_CREATE, $SHCNE_DELETE, $SHCNE_MKDIR, $SHCNE_RMDIR), _
    "uint", $SHNOTIFY, _
    "int", 2, _; number of shnotifystructs in the array
    "ptr", DllStructGetPtr($shArray)); ptr to the array
    ; free each created PIDL
    DllCall("ole32.dll", "none", "CoTaskMemFree", "ptr", $ppidl[0])
    DllCall("ole32.dll", "none", "CoTaskMemFree", "ptr", $ppidl2[0])
    $shArray = 0
    $shnotifystruct = 0
    $shnotifystruct2 = 0
    ConsoleWrite("register: " & $register[0] & @CRLF)

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

    While 1
    Sleep(1000)
    WEnd

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

    Func OnAutoItExit()
    ; deregister the window
    $ret = DllCall("shell32.dll", "int", "SHChangeNotifyDeregister", "ulong", $register[0])
    ConsoleWrite("deregister: " & $ret[0] & @CRLF)
    EndFunc

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

    Func MY_SHNOTIFY($hWnd, $Msg, $wParam, $lParam)
    Local $path

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

    ConsoleWrite("notify: " & $lParam & @CRLF)
    $path = DllStructCreate("dword dwItem1; dword dwItem2", $wParam)
    $ret = DllCall("shell32.dll", "int", "SHGetPathFromIDListW", "ptr", DllStructGetData($path, "dwItem1"), "wstr", "")
    ConsoleWrite($ret[2] & @CRLF)
    EndFunc

    [/autoit]
  • Information ausgeben wenn neue Datei erstellt wird.

    • derBrot
    • 19. Juni 2013 um 18:28

    Hallo AutoIt Community,

    ich würde gerne wissen ob es möglich ist mit Autoit zu erkennen ob eine neue Datei auf einem Computer erstellt wurde.

    Beispiel:
    -> (User) läd eine Datei aus dem Internet runter.
    -> (Script) bemerkt die neue Datei und gibt den Pfad aus.


    Geht sowas mit AutoIt ?

    Grüße
    derBrot

  • Festplatte nach Dateitype durchsuchen

    • derBrot
    • 12. Mai 2013 um 16:48

    Hallo,
    Ich würde gerne alle .exe Dateien von einer Festplatte auflisten und wenn möglich in eine .txt Datei schreiben.
    Beim suchen sollen ebenfalls die Unterverzeichnisse nach .exe Dateien durchsucht werden.

    Gibt es dafür schon eine Funktion , UDF oder ähnliches ?

    Hochachtungsvoll
    derBrot

  • Script Stürzt ab.

    • derBrot
    • 26. April 2013 um 23:56
    Zitat

    Warum machst du eigentlich zwei GUI's, wenn die beiden fast gleich sind?

    'GUI-1' Der Benutzer bekommt Informationen und die Vorgehendsweise des Programmes genau beschrieben und kann dann entscheiden ob er das wirklich will.
    'GUI-2' Zeigt aktuelle Informationen und Statistiken an.

  • Script Stürzt ab.

    • derBrot
    • 26. April 2013 um 21:29

    Und hier ein Screen vom Absturzt:
    [Blockierte Grafik: http://www.workupload.com/image/Bsoo8Rd]

    Die Console sagt folgendes:

    Spoiler anzeigen


    >"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:\Users\Delux\Desktop\BadBlaster\SMP - Antivirus ( Ja neue Form )\DateiScannerNeu\TICleaner.au3" /UserParams
    +>21:27:14 Starting AutoIt3Wrapper v.2.1.0.33 Environment(Language:0407 Keyboard:00000407 OS:WIN_7/Service Pack 1 CPU:X64 OS:X64)
    >Running AU3Check (1.54.19.0) from:C:\Program Files (x86)\AutoIt3
    +>21:27:14 AU3Check ended.rc:0
    >Running:(3.3.6.1):C:\Program Files (x86)\AutoIt3\autoit3_x64.exe "C:\Users\Delux\Desktop\BadBlaster\SMP - Antivirus ( Ja neue Form )\DateiScannerNeu\TICleaner.au3"
    --> Press Ctrl+Alt+F5 to Restart or Ctrl+Break to Stop
    +>21:27:15 AutoIT3.exe ended.rc:0
    >Exit code: 0 Time: 3.363

    Auf folgenden Maschinen getestet:
    - PC Windows 7 x64 Service Pack 2
    - Laptop Windows 7 x32 Service Pack 2

  • Script Stürzt ab.

    • derBrot
    • 26. April 2013 um 19:46

    Das muss doch so oder nicht ? Bei dem Button möchte ich ja , das die Software beendet wird.
    Das Problem liegt in Button '$Button1' ~ Zeile 40 :o

  • Script Stürzt ab.

    • derBrot
    • 26. April 2013 um 17:15

    Hallo zusammen,
    ich habe ein Problem mit meinem Script.
    Immer wenn ich auf den 'Weiter' Butten drücke stürzt es ab (._.)
    Ich weiß einfach nicht warum, ich hoffe Ihr könnt mir helfen.

    Spoiler anzeigen
    [autoit]


    #include <ButtonConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
    #include <WinAPI.au3>
    #include <GDIPlus.au3>
    #include <File.au3>
    #include <Array.au3>
    #include <RecFileListToArray.au3>
    #NoTrayIcon
    #RequireAdmin
    #include-once

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

    FileInstall("header.JPG",@tempdir&"\header.JPG")
    FileInstall('ag.ico', @TempDir & '\ag.ico')

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

    Opt("GUIOnEventMode", 1)
    #Region ### START Koda GUI section ### Form=c:\users\delux\desktop\form1.kxf
    $Form1_1 = GUICreate("PC-Bereinigung.", 645, 442)
    GUISetBkColor(0xFFFFFF)
    GUISetOnEvent($GUI_EVENT_CLOSE,"_Exit")
    $Pic1 = GUICtrlCreatePic(@tempdir&"\header.JPG", 0, 0,645, 100)
    $idPB_AddTicket = GUICtrlCreatePic('', 8, 16, 64, 64)
    __SetIconAlpha($idPB_AddTicket, @TempDir & '\ag.ico', 0, 64, 64)
    $Label1 = GUICtrlCreateLabel("PC-Bereinigung", 80, 34, 237, 30)
    GUICtrlSetFont(-1, 12, 800, 0, "Tahoma")
    GUICtrlSetBkColor(-1, -2)
    GUICtrlSetColor(-1, 0xFFFFFF)
    $Label2 = GUICtrlCreateLabel("Verbessern Sie die Leistung ihres Computers.", 80, 56, 299, 22)
    GUICtrlSetFont(-1, 10, 400, 0, "Tahoma")
    GUICtrlSetBkColor(-1, -2)
    GUICtrlSetColor(-1, 0xFFFFFF)
    $Group1 = GUICtrlCreateGroup("", 8, 104, 631, 329)
    $Label3 = GUICtrlCreateLabel("Wichtiger Hinweis", 16, 120, 119, 20)
    GUICtrlSetFont(-1, 10, 800, 0, "Tahoma")
    $Label4 = GUICtrlCreateLabel("Durch die Bereinigung wird die Leistung Ihres Computers verbessert, indem Objekte entfernt werden, die", 16, 144, 605, 20)
    GUICtrlSetFont(-1, 10, 400, 0, "Tahoma")
    $Label10 = GUICtrlCreateLabel("nicht mehr gebraucht werden, z.B. temporäre Internetdateien und Cookies. Es werden keine aktuellen", 16, 160, 587, 20)
    GUICtrlSetFont(-1, 10, 400, 0, "Tahoma")
    $Button1 = GUICtrlCreateButton("Weiter", 501, 392, 131, 33)
    GUICtrlSetFont(-1, 10, 400, 0, "Tahoma")
    GUICtrlSetOnEvent(-1,"_CleanUpAll")
    $Button2 = GUICtrlCreateButton("Abbrechen", 15, 392, 131, 33)
    GUICtrlSetFont(-1, 10, 400, 0, "Tahoma")
    GUICtrlSetOnEvent(-1,"_Exit")
    $Label5 = GUICtrlCreateLabel("Dateien gelöscht.", 16, 176, 102, 20)
    GUICtrlSetFont(-1, 10, 400, 0, "Tahoma")
    $Label6 = GUICtrlCreateLabel("Folgende Browser werden bereinigt", 16, 208, 234, 20)
    GUICtrlSetFont(-1, 10, 800, 0, "Tahoma")
    $Label7 = GUICtrlCreateLabel("• Mozilla-Firefox", 16, 232, 97, 20)
    GUICtrlSetFont(-1, 10, 400, 0, "Tahoma")
    $Label8 = GUICtrlCreateLabel("• Internet-Explorer", 16, 256, 111, 20)
    GUICtrlSetFont(-1, 10, 400, 0, "Tahoma")
    $Label9 = GUICtrlCreateLabel("• Google-Chrome", 16, 280, 102, 20)
    GUICtrlSetFont(-1, 10, 400, 0, "Tahoma")
    $Label11 = GUICtrlCreateLabel("Klicken Sie auf 'Weiter' um den Vorgang zu starten.", 16, 368, 318, 20)
    GUICtrlSetFont(-1, 10, 400, 4, "Tahoma")
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    $2Form1_1 = GUICreate("PC-Bereinigung.", 645, 442)
    GUISetBkColor(0xFFFFFF)
    GUISetOnEvent($GUI_EVENT_CLOSE,"_Exit")
    $Pic21 = GUICtrlCreatePic(@TempDir & '\header.JPG', 0, 0,645, 100)
    $idPB_AddTicket2 = GUICtrlCreatePic('', 8, 16, 64, 64)
    __SetIconAlpha($idPB_AddTicket2, @TempDir & '\ag.ico', 0, 64, 64)
    $2Label1 = GUICtrlCreateLabel("PC-Bereinigung", 80, 34, 237, 30)
    GUICtrlSetFont(-1, 12, 800, 0, "Tahoma")
    GUICtrlSetBkColor(-1, -2)
    GUICtrlSetColor(-1, 0xFFFFFF)
    $2Label2 = GUICtrlCreateLabel("Verbessern Sie die Leistung ihres Computers.", 80, 56, 299, 22)
    GUICtrlSetFont(-1, 10, 400, 0, "Tahoma")
    GUICtrlSetBkColor(-1, -2)
    GUICtrlSetColor(-1, 0xFFFFFF)
    $2Group1 = GUICtrlCreateGroup("", 8, 104, 631, 329)
    $2Label3 = GUICtrlCreateLabel("Wichtiger Hinweis", 16, 120, 119, 20)
    GUICtrlSetFont(-1, 10, 800, 0, "Tahoma")
    $2Label4 = GUICtrlCreateLabel("Durch die Bereinigung wird die Leistung Ihres Computers verbessert, indem Objekte entfernt werden, die", 16, 144, 605, 20)
    GUICtrlSetFont(-1, 10, 400, 0, "Tahoma")
    $2Label10 = GUICtrlCreateLabel("nicht mehr gebraucht werden, z.B. temporäre Internetdateien und Cookies. Es werden keine aktuellen", 16, 160, 587, 20)
    GUICtrlSetFont(-1, 10, 400, 0, "Tahoma")
    $2Button1 = GUICtrlCreateButton("Weiter", 501, 392, 131, 33)
    GUICtrlSetFont(-1, 10, 400, 0, "Tahoma")
    GUICtrlSetState(-1,$GUI_DISABLE)
    GUICtrlSetOnEvent(-1,"_Exit")
    $2Button2 = GUICtrlCreateButton("Abbrechen", 15, 392, 131, 33)
    GUICtrlSetFont(-1, 10, 400, 0, "Tahoma")
    GUICtrlSetOnEvent(-1,"_Exit")
    $2Label5 = GUICtrlCreateLabel("Dateien gelöscht.", 16, 176, 102, 20)
    GUICtrlSetFont(-1, 10, 400, 0, "Tahoma")
    $2Label6 = GUICtrlCreateLabel("Status", 16, 208, 47, 20)
    GUICtrlSetFont(-1, 10, 800, 0, "Tahoma")
    $2Label9 = GUICtrlCreateLabel("Cookies und temporäre Internetdateien werden entfernt...", 16, 232, 336, 20)
    GUICtrlSetFont(-1, 10, 400, 0, "Tahoma")
    $2Label11 = GUICtrlCreateLabel("Klicken Sie auf 'Weiter' um den Vorgang abzuschließen.", 16, 368, 322, 20)
    GUICtrlSetFont(-1, 10, 400, 4, "Tahoma")
    $2Progress1 = GUICtrlCreateProgress(16, 248, 614, 29)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    GUISetState(@SW_HIDE)

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

    While 1
    Sleep(100)
    WEnd

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

    Func _Exit()
    Exit
    EndFunc

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

    Func _CleanUpAll()
    GUISetState(@SW_SHOW,$2Form1_1)
    GUISetState(@SW_HIDE,$Form1_1)
    GUICtrlSetData($2Progress1,5)
    clean_profiles()
    GUICtrlSetData($2Progress1,100)
    GUICtrlSetState($2Button1,$GUI_DISABLE)
    EndFunc

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

    func clean_profiles()

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

    $userdir = StringTrimRight( @userprofiledir , stringlen (@username) +1 ) ; $userdir = path of users directories. For example, C:\Users for Windows 7
    $listing = _FileListToArray($userdir, "*", 2) ;returns an array containing the name of all users directories

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

    $i = 1

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

    Do
    if stringinstr(FileGetAttrib($userdir & "\" & $listing[$i]), "H") <> 0 then ;if the folder has "hidden" as attribute (system user), we remove it from $listing array
    _arraydelete($listing, $i)
    $listing[0] = $listing[0] - 1

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

    Else
    $i = $i+1
    endif

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

    until $listing[0] == $i

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

    for $i = 1 to $listing[0] step 1 ; for all user directories, we clean the below folders:

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

    if @OSVersion == "WIN_7" then

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

    delfolder($userdir & "\" & $listing[$i] & "\AppData\Local\Microsoft\Windows\Temporary Internet Files")
    GUICtrlSetData($2Progress1,10)
    delfolder($userdir & "\" & $listing[$i] & "\AppData\Local\Temp")
    GUICtrlSetData($2Progress1,20)
    delfolder($userdir & "\" & $listing[$i] & "\AppData\LocalLow\Temp")
    GUICtrlSetData($2Progress1,30)
    delfolder($userdir & "\" & $listing[$i] & "\AppData\Local\Google\Chrome\User Data\Default\Cache")
    GUICtrlSetData($2Progress1,40)

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

    $firefox = _FileListToArray(@Homedrive & "\Users\" & $listing[$i] & "\AppData\Local\Mozilla\Firefox\Profiles", "*", 2)

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

    if IsArray($firefox) then ; if at least 1 firefox profile is found, we clean it/them

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

    for $k = 1 to $firefox[0] step 1

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

    delfolder($userdir & "\" & $listing[$i] & "\AppData\Local\Mozilla\Firefox\Profiles\" & $firefox[$k] & "\Cache")
    GUICtrlSetData($2Progress1,50)
    delfolder($userdir & "\" & $listing[$i] & "\AppData\Local\Mozilla\Firefox\Profiles\" & $firefox[$k] & "\OfflineCache")
    GUICtrlSetData($2Progress1,60)
    delfolder($userdir & "\" & $listing[$i] & "\AppData\Local\Mozilla\Firefox\Profiles\" & $firefox[$k] & "\startupCache")
    GUICtrlSetData($2Progress1,70)

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

    next

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

    endif

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

    elseif @OSVersion == "WIN_XP" Then

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

    delfolder($userdir & "\" & $listing[$i] & "\Local Settings\Temporary Internet Files")
    GUICtrlSetData($2Progress1,10)
    delfolder($userdir & "\" & $listing[$i] & "\Local Settings\Temp")
    GUICtrlSetData($2Progress1,20)
    delfolder($userdir & "\" & $listing[$i] & "\Local Settings\Application Data\Google\Chrome\User Data\Default\Cache")
    GUICtrlSetData($2Progress1,30)

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

    $firefox = _FileListToArray(@Homedrive & "\Users\" & $listing[$i] & "\AppData\Local\Mozilla\Firefox\Profiles", "*", 2)

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

    if IsArray($firefox) then ; if at least 1 firefox profile is found, we clean it/them

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

    for $k = 1 to $firefox[0] step 1

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

    delfolder($userdir & "\" & $listing[$i] & "\AppData\Local\Mozilla\Firefox\Profiles\" & $firefox[$k] & "\Cache")
    GUICtrlSetData($2Progress1,40)
    delfolder($userdir & "\" & $listing[$i] & "\AppData\Local\Mozilla\Firefox\Profiles\" & $firefox[$k] & "\OfflineCache")
    GUICtrlSetData($2Progress1,50)
    delfolder($userdir & "\" & $listing[$i] & "\AppData\Local\Mozilla\Firefox\Profiles\" & $firefox[$k] & "\startupCache")
    GUICtrlSetData($2Progress1,60)

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

    next

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

    endif

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

    endif

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

    next

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

    EndFunc

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

    func delfolder ($folder)

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

    $dirlisting = _RecFileListToArray($folder, "*", 14, 1) ;getting all folders/subfolders into an array

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

    if isArray($dirlisting) then ;if the folder contains subfolder, we delete everything inside each subfolders

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

    filedelete($folder & "\*.*")

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

    for $i = 1 to $dirlisting[0] step 1

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

    filedelete($folder & "\" & $dirlisting[$i] & "\*.*")
    Dirremove($folder & "\" & $dirlisting[$i], 1)
    next

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

    else ;if the folder doesn't contains subfolder, we simply delete what's inside it.

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

    filedelete($folder & "\*.*")

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

    endif

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

    endfunc

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

    Func __SetIconAlpha($hWnd, $sIcon, $iIndex, $iWidth, $iHeight)
    If Not IsHWnd($hWnd) Then
    $hWnd = GUICtrlGetHandle($hWnd)
    If $hWnd = 0 Then
    Return SetError(1, 0, 0)
    EndIf
    EndIf
    Local $hIcon = __WinAPI_ShellExtractIcons($sIcon, $iIndex, $iWidth, $iHeight)
    If $hIcon = 0 Then
    Return SetError(1, 0, 0)
    EndIf
    Local $hBitmap, $hObj, $hDC, $hMem, $hSv
    $hDC = _WinAPI_GetDC($hWnd)
    $hMem = _WinAPI_CreateCompatibleDC($hDC)
    $hBitmap = _WinAPI_CreateCompatibleBitmap($hDC, $iWidth, $iHeight)
    $hSv = _WinAPI_SelectObject($hMem, $hBitmap)
    _WinAPI_DrawIconEx($hMem, 0, 0, $hIcon, $iWidth, $iHeight, 0, 0, 2)
    _WinAPI_ReleaseDC($hWnd, $hDC)
    _WinAPI_SelectObject($hMem, $hSv)
    _WinAPI_DeleteDC($hMem)
    _WinAPI_DestroyIcon($hIcon)
    _WinAPI_DeleteObject(_SendMessage($hWnd, 0x0172, 0, 0))
    _SendMessage($hWnd, 0x0172, 0, $hBitmap)
    $hObj = _SendMessage($hWnd, 0x0173)
    If $hObj <> $hBitmap Then
    _WinAPI_DeleteObject($hBitmap)
    EndIf
    Return 1
    EndFunc ;==>__SetIconAlpha

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

    Func __WinAPI_ShellExtractIcons($sIcon, $iIndex, $iWidth, $iHeight)
    Local $ret = DllCall('shell32.dll', 'int', 'SHExtractIconsW', 'wstr', $sIcon, 'int', $iIndex, 'int', $iWidth, 'int', $iHeight, 'ptr*', 0, 'ptr*', 0, 'int', 1, 'int', 0)
    If (@error) Or ($ret[0] = 0) Or ($ret[5] = Ptr(0)) Then
    Return SetError(1, 0, 0)
    EndIf
    Return $ret[5]
    EndFunc ;==>__WinAPI_ShellExtractIcons

    [/autoit]

    Bilder,Icons und die Include stehen als Download bereit:
    Der Inhalt kann nicht angezeigt werden, da er nicht mehr verfügbar ist.

    Dateien

    Error Script.rar 31,04 kB – 357 Downloads
  • Heuristik auslesen und Vergleichen.

    • derBrot
    • 13. April 2013 um 11:23

    Hallo,
    in einem älteren Thread habe ich durch Zufall gesehen wie man einen Heuristik-Code Vergleicht.
    ( Hier zu sehen )

    Spoiler anzeigen
    [autoit]


    $open=fileopen($Datei,16)
    if StringInStr (fileread($open),$heuristik) <> "" then filedelete($Datei)
    fileclose($open)

    [/autoit]

    Nun wollte ich fragen wie bekomme ich den Heuristik-Code einer Datei ?

    P.S: Google spuckt auch nichts aus ;(

    Hochachtungsvoll
    derBrot

  • Themida stürtzt immer ab.

    • derBrot
    • 2. April 2013 um 14:50

    Hallo,
    gestern wollte ich Themida testen, doch leider stürzt es immer ab nach dem ich auf "Protect" drücke.
    Hat jemand eine Lösung ?


    Screen:
    [Blockierte Grafik: http://www.workupload.com/image/yOZneHa]

  • Problem bei Chat Server mit TCP.au3 UDF

    • derBrot
    • 29. März 2013 um 20:06

    Hallo Jonas Houben,
    ich habe mir mal dein Script angeschaut und getestet, Windows 7 Home Premium 64 Bit - System.
    Beim testen lief alles fehlerfrei, und einen Disconnet habe ich auch nicht bekommen.

    Schon mal versucht beide IP's so zu ändern ? Global $ip = "127.0.0.1"

  • Problem mit Google-Bot!!!

    • derBrot
    • 23. März 2013 um 12:34

    Hier noch ein Beispiel von mir ohne IE Oberfläche. :)

    Der Inhalt kann nicht angezeigt werden, da er nicht mehr verfügbar ist.

    Dateien

    Google.rar 14,91 kB – 284 Downloads
  • GUI Rand.

    • derBrot
    • 16. März 2013 um 23:57

    "ganz" zufrieden bin ich mit der lösung noch nicht, trotzdem habe ich es soweit schonmal eingefügt danke :)

    Bild vom derzeitigen aussehen:

    Spoiler anzeigen


    [Blockierte Grafik: http://www.workupload.com/image/HhkOFCN]

    [Blockierte Grafik: http://www.workupload.com/image/IjqwogA]

  • GUI Rand.

    • derBrot
    • 16. März 2013 um 21:05

    Guten Abend,
    in den letzten Tagen ist mir aufgefallen, dass Programme wie "AVAST!" oder z.b "Aeria Ignite" einen runde,transparanten Rand haben.
    Nun wäre meine Frage, ob es möglich ist diesen Rand auch in AutoIt Gui's einzufügen. Wann ja wie geht sowas GDIPlus ?

    Bilder vom Rand

    Spoiler anzeigen


    [Blockierte Grafik: http://www.workupload.com/image/VzdcNsp]

    [Blockierte Grafik: http://www.workupload.com/image/WYQ7ThC]

  • Aktuellen Pfad ermitteln.

    • derBrot
    • 14. März 2013 um 20:37

    Hey AspirinJunkie,
    Deine Lösung ist schon das wonach ich suche :rock: , aber ich habe trotzdem noch 2 Fragen.

    1.) Kann man bei diesem Script auch überprüfen ob man auf dem Desktop ist ? Denn das macht dein Script leider nicht :(

    2.) Wie sieht es aus mit 2 Explorer Fenstern ? Kann man beide Pfads anzeigen lassen ? :o

  • Aktuellen Pfad ermitteln.

    • derBrot
    • 14. März 2013 um 19:47

    Mit @WorkDir bekomme ich doch nur den Pfad heraus indem meine Ausgeführte Datei steckt oder nicht ? O.o

    P.S: Hier habe ich was gefunden ich weiß nicht ganz ob es hilft da ich Probleme bei der Übersetzung habe.
    http://www2.informatik.uni-halle.de/lehre/c/c_file.html

  • Aktuellen Pfad ermitteln.

    • derBrot
    • 14. März 2013 um 19:31

    ich würde gerne den aktiven Explorer-Pfad ermitteln.
    Also das Programm sollte jede Sekunde ermitteln in welchem Pfad ich mich aufhalte.
    Wenn ich z.B im "Downloads" Ordner bin sollte ein Label mit dem Pfad angezeigt werden.

    [autoit]


    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
    #Region ### START Koda GUI section ### Form=
    $hGUI = GUICreate("Pfad", 613, 78)
    $Pfad = GUICtrlCreateLabel("Kein Pfad", 8, 40, 596, 22)
    GUICtrlSetFont(-1, 9, 400, 0, "Corbel")
    $Label2 = GUICtrlCreateLabel("Aktueller Pfad:", 8, 16, 115, 26)
    GUICtrlSetFont(-1, 11, 400, 0, "Corbel")
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit

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

    EndSwitch
    WEnd

    [/autoit]
  • Ausführen einer Anwendung anhalten.

    • derBrot
    • 22. Februar 2013 um 17:00

    In der ProcessList sind doch nur prozesse die schon ausgeführt sind oder ?

  • Ausführen einer Anwendung anhalten.

    • derBrot
    • 22. Februar 2013 um 16:54
    Zitat

    Dazu müsste man wohl ein Event im Betriebssystem abfangen...

    Was genau müsste ich abfragen und wie ? :o

  • Ausführen einer Anwendung anhalten.

    • derBrot
    • 22. Februar 2013 um 16:06

    Hallo liebe Autoit Community,

    ich hoffe einer von euch kann mir weiterhelfen.
    Meine Frage ist ob es möglich währe Anwendungen ( .exe Dateien ) vor dem Ausführen zu überprüfen.
    Beispiel:
    Ich starte eine Datei. Genau dann soll das Script das Ausführen der Datei stoppen und den Pfad in eine Textdatei schreiben.
    Geht das überhaupt ? Und wenn ja kann mir jemand zeigen wie ? ;)

    Grüße
    derBrot

  • Spalte auslesen.

    • derBrot
    • 17. Februar 2013 um 21:25

    Vielen Dank $var :)

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™