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

Beiträge von simi4

  • Kompilierte EXE mit 3.3.10.2 reagiert sehr langsam

    • simi4
    • 7. April 2014 um 16:50

    Danke für die Hilfe. Werde mal ausprobieren.

  • Webserver mit HTTPS Unterstützung

    • simi4
    • 7. April 2014 um 15:30

    Hallo,

    vlt. bin ich hier nicht ganz richtig mit meiner Frage, aber ich habe im Netz nichts gefunden, was mir helfen kann.

    Ich habe einen WebServer-Script in AutoIt über TCP aufgebaut. Es funktioniert soweit auch. Nun ist meine Aufgabe diesem WebServer SSL-fähig machen. In anderen Sprachen gibt es bereits Funktionen die dies out-of-the-box ermöglichen. Ich habe leider wenig Erfahrung mit SSL bis jetzt gemacht, daher ist meine Frage an die Community: Kann mir jemand ein Beispiel zu SSL mit TCP-Funktionen geben oder einfach eine Richtung zeigen?

    Anbei ein Code-Ausschnitt:

    Spoiler anzeigen
    [autoit]

    Func _HTTP_SendData($hSocket, $bData, $sMimeType, $sReply = "200 OK", $sReclam = "")
    $bData = StringToBinary($bData)
    $extraline = ""
    If $sReclam <> "" Then $extraline = 'WWW-Authenticate: Basic realm="' & $sReclam & '"' & @CRLF
    $sPacket = Binary("HTTP/1.1 " & $sReply & @CRLF & _
    "Server: " & $ServerName & @CRLF & _
    $extraline & _
    "Connection: close" & @CRLF & _
    "Content-Lenght: " & BinaryLen($bData) & @CRLF & _
    "Content-Type: " & $sMimeType & @CRLF & _
    @CRLF)
    TCPSend($hSocket, $sPacket) ; Send start of packet

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

    While BinaryLen($bData) ; Send data in chunks (most code by Larry)
    $a = TCPSend($hSocket, $bData) ; TCPSend returns the number of bytes sent
    $bData = BinaryMid($bData, $a + 1, BinaryLen($bData) - $a)
    WEnd
    $sPacket = Binary(@CRLF & @CRLF) ; Finish the packet
    TCPSend($hSocket, $sPacket)

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

    ; TCPCloseSocket($hSocket)
    EndFunc ;==>_HTTP_SendData

    [/autoit]
  • Kompilierte EXE mit 3.3.10.2 reagiert sehr langsam

    • simi4
    • 4. April 2014 um 09:13

    Umstieg war wegen einem Bug mit #RequireAdmin (http://www.autoitscript.com/trac/autoit/ticket/1498) notwendig.

  • Kompilierte EXE mit 3.3.10.2 reagiert sehr langsam

    • simi4
    • 3. April 2014 um 16:04

    Ja genau, ehm :):S
    Ganzes Script ist 6000 Zeilen lang ohne UDFs.
    KeepAlive mit ServerResponse funktioniert nun langsam. Zu diesem Erkenntnis bin ich schon gekommen. Mir wäre es lieber, wenn ich KeepAlive in ein Thread packen könnte :rolleyes:
    Deswegen muss ich KeepAlive in jede While-Schliefe von jedem Fenster reinpacken :wacko:
    Wenn jemand weiß, wie man es anders machen kann, wäre ich sehr froh...

  • Kompilierte EXE mit 3.3.10.2 reagiert sehr langsam

    • simi4
    • 3. April 2014 um 15:27

    KeepAlive():

    Spoiler anzeigen
    [autoit]


    Func KeepAlive()
    If TimerDiff($KeepAliveTimer) > 10000 Then
    Debug("Sending keep alive...")
    _Send($ip, "KeepAlive")
    _Recv_From_Server()
    $KeepAliveTimer = Null
    $KeepAliveTimer = TimerInit()
    EndIf
    EndFunc ;==>KeepAlive

    [/autoit]
  • Kiowa - ein kleiner HTTP-Server mit teilweiser PHP Unterstützung

    • simi4
    • 3. April 2014 um 15:25

    Ich habe in der While-Schleife aus zwei for-Schleifen eine gemacht und mit 3000 Verbindungen anschließend getestet. Läuft sehr schnell :)
    Zudem bei Fehlerseiten stand immer Port 80, auch wenn man was anderes verwendet hat.

    Spoiler anzeigen
    [autoit]


    Global $NTDLL = DllOpen("ntdll.dll") ;Open ntdll.dll, it WILL get used a lot

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

    While 1
    Do
    For $i = 1 To $users
    $accepted[$i] = TCPAccept($socket)
    If $accepted[$i] <> -1 Then $input = 1
    ;Next
    ;$input = 0
    ;For $i = 1 To $users
    If $accepted[$i] <> -1 Then
    $receivedData = TCPRecv($accepted[$i], 2048)
    WriteLog("Data: " & $receivedData)
    $auth = _StringBetween($receivedData, "Basic ", @CRLF)
    If @error Or $auth[0] = "Og" Then
    $auth = ""
    Else
    $auth[0] = $auth[0]
    $auth = _Base64Decode($auth[0])
    EndIf
    $url = _StringBetween($receivedData, "GET ", " HTTP")
    If Not @error Then
    $url = _UnicodeURLDecode($url[0])
    $urlorg = $url
    $url = StringReplace($url, "/", "")
    $url = $homedir & $url
    $urltodisplay = $url
    _PathSplit($url, $szDrive, $szDir, $szFName, $szExt)
    If $szExt = "" Then
    If StringRight($url, 1) <> "" Then $url = $url & ""
    $urltodisplay = $url
    For $o = 1 To $index[0]
    If FileExists($url & $index[$o]) Then
    $url = $url & $index[$o]
    EndIf
    Next
    If $url = $urltodisplay Then $url = $url & "" & $index[1]

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

    EndIf
    WriteLog(SocketToIP($accepted[$i]) & " fordert an:" & $urltodisplay)

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

    If FileExists($url) Then
    $autherror = 0
    $sections = IniReadSectionNames("auth.ini")
    If IsArray($sections) Then
    $array = _ArraySearch($sections, StringReplace($url, $homedir, ""))
    If $array <> -1 And $auth = "" Then
    WriteLog($url & " ist geschützt - Authentifizierung angefordert")
    $error = '<head><title>Error 401</title><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"></head><body><h1>401 Unauthorized</h1>Die Anfrage kann nicht ohne gültige Authentifizierung durchgeführt werden.<hr><span style="font-style: italic;">Server: ' & $ServerName & ', Port 80</span></body></html>'
    _HTTP_SendData($accepted[$i], $error, "text/html", "401 Authorization Required", IniRead("auth.ini", $sections[$array], "Relam", "Geschützter Bereich"))
    $autherror = 1
    ElseIf $auth <> "" And $array <> -1 Then
    $userpw = StringSplit($auth, ":")
    If IsArray($userpw) Then
    If $userpw[0] <> 2 Then
    _HTTP_SendData($accepted[$i], '<head><title>Error 401</title><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"></head><body><h1>401 Unauthorized</h1>Die Anfrage kann nicht ohne gültige Authentifizierung durchgeführt werden.<hr><span style="font-style: italic;">Server: ' & $ServerName & ', Port 80</span></body></html>', "text/html", "401 Authorization Required")
    WriteLog("Authentifizierung fehlgeschlagen")
    $autherror = 1
    EndIf

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

    EndIf
    If $userpw[1] <> IniRead("auth.ini", $sections[$array], "User", "") Or $userpw[2] <> IniRead("auth.ini", $sections[$array], "PW", "") Then
    _HTTP_SendData($accepted[$i], '<head><title>Error 401</title><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"></head><body><h1>401 Unauthorized</h1>Die Anfrage kann nicht ohne gültige Authentifizierung durchgeführt werden.<hr><span style="font-style: italic;">Server: ' & $ServerName & ', Port 80</span></body></html>', "text/html", "403 Forbidden")
    WriteLog("Authentifizierung fehlgeschlagen")
    $autherror = 1
    Else
    WriteLog("Authentifizierung gelungen")
    EndIf
    EndIf
    EndIf
    If $autherror = 0 Then
    $befehl = _StringBetween(FileRead($url), "[|-", "-|]")
    If IsArray($befehl) Then
    If $befehl[0] = "list" Then
    _PathSplit($url, $szDrive, $szDir, $szFName, $szExt)
    $MimeType = "text/html"
    list()
    WriteLog("Datei enthielt Befehl [|-list-|] - eine Dateiauflistung wurde gesendet.")
    ElseIf StringInStr($befehl[0], "help") <> 0 Then
    _HTTP_SendData($accepted[$i], FileRead("Kiowa Dokumentation.pdf"), "application/pdf")
    ElseIf StringInStr($befehl[0], "redirect") <> 0 Then
    $redirectto = _StringBetween($befehl[0], "~", "~")
    If IsArray($redirectto) Then $redirectto = $redirectto[0]

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

    $sPacket = "HTTP/1.1 307 Temporary Redirect" & @CRLF & _
    "Location: " & $redirectto & @CRLF & _
    "Content-Lenght: 3" & @CRLF & _
    "Content-Type: text/html" & @CRLF
    TCPSend($accepted[$i], $sPacket)
    WriteLog("Client wurde zu folgender Adresse umgeleitet: " & $redirectto)
    Else
    $datensting = PHP($url)
    _HTTP_SendData($accepted[$i], $datensting, MimeType($url))

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

    WriteLog("Datei wurden gesendet.")
    EndIf

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

    Else
    $datensting = PHP($url)
    _HTTP_SendData($accepted[$i], $datensting, MimeType($url))

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

    WriteLog("Datei wurden gesendet.")
    EndIf

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

    EndIf
    Else
    _PathSplit($url, $szDrive, $szDir, $szFName, $szExt)
    If DirGetSize($szDrive & $szDir) <> -1 And $szFName & $szExt = $index[1] Then
    list()
    WriteLog("Keine zu indexierende Datei im Verzeichnis gefunden, Dateiauflistung wurde gesendet.")
    Else
    If FileExists($homedir & $404) Then
    $binaerstring = PHP($homedir & $404)
    _PathSplit($homedir & "" & $404, $szDrive, $szDir, $szFName, $szExt)
    $MimeType = MimeType($homedir & "" & $404)
    _HTTP_SendData($accepted[$i], $binaerstring, $MimeType)
    Else
    _HTTP_SendData($accepted[$i], '<html><head><title>Error 404</title></head><body><h1>404 Not Found</h1>Die angeforderte Ressource wurde nicht gefunden.<hr><span style="font-style: italic;">Server: WebServer, Port ' & $port & '</span></body></html>', "text/html")
    EndIf
    WriteLog("Datei wurde nicht gefunden, 404 Error Dokument wurde gesendet.")
    EndIf
    EndIf
    Else
    If FileExists($homedir & "" & $400) Then
    $binaerstring = PHP($homedir & "" & $400)
    _HTTP_SendData($accepted[$i], $binaerstring, MimeType($homedir & "" & $400))
    Else
    _HTTP_SendData($accepted[$i], '<html><head><title>Error 400</title></head><body><h1>400 Bad Request</h1>Die Anfrage-Nachricht war fehlerhaft aufgebaut.<hr><span style="font-style: italic;">Server: WebServer, Port ' & $port & '</span></body></html>', "text/html")
    WriteLog("Die Anfrage von " & SocketToIP($accepted[$i]) & " konnte nicht verarbeitet werden - das 400 Error Dokument wurde gesendet.")
    EndIf
    EndIf
    EndIf
    TCPCloseSocket($accepted[$i])
    USleep(5000, $NTDLL)
    Next
    Until $input = 1
    WEnd

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

    Func USleep($iUsec, $hDLL = "ntdll.dll") ;A rewrite of the _HighPrecisionSleep function made by monoceres (Thanks!)
    Local $hStruct = DllStructCreate("int64")
    DllStructSetData($hStruct, 1, -1 * ($iUsec * 10))
    DllCall($hDLL, "dword", "ZwDelayExecution", "int", 0, "ptr", DllStructGetPtr($hStruct))
    EndFunc ;==>USleep

    [/autoit] [autoit][/autoit] [autoit][/autoit]
  • Kompilierte EXE mit 3.3.10.2 reagiert sehr langsam

    • simi4
    • 3. April 2014 um 15:10

    Hier:

    Spoiler anzeigen
    [autoit]


    Func Form6()
    $Form6 = GUICreate("Info", 300, 220)
    GUISetBkColor(0xffffff, $Form6)
    GUISetIcon(@ScriptDir & '\ZYXData\favicon.ico')
    GUICtrlCreatePic(@ScriptDir & "\ZYXData\logo.gif", 40, 10, 79, 32, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS))
    GUICtrlCreateLabel("ZYX", 40, 50, 300)
    GUICtrlSetFont(-1, 10, 400, 0, "Calibri")
    GUICtrlCreateLabel("Version " & FileGetVersion(@ScriptFullPath), 40, 80, 300)
    GUICtrlSetFont(-1, 10, 400, 0, "Calibri")
    GUICtrlCreateLabel("Support: support@ZYX.com", 40, 110, 300)
    GUICtrlSetFont(-1, 10, 400, 0, "Calibri")
    GUICtrlCreateLabel("Telefon: + 49 - (0)700 00000", 40, 140, 300)
    GUICtrlSetFont(-1, 10, 400, 0, "Calibri")
    GUICtrlCreateLabel(Chr(169) & " Copyright ZYX " & @YEAR, 40, 170, 300)
    GUICtrlSetFont(-1, 10, 400, 0, "Calibri")
    GUISetState()

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

    While 1
    KeepAlive()
    Local $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    GUIDelete($Form6)
    ExitLoop
    EndSwitch
    WEnd
    EndFunc ;==>Form6

    [/autoit]
  • Kompilierte EXE mit 3.3.10.2 reagiert sehr langsam

    • simi4
    • 3. April 2014 um 10:47

    Hallo,

    ich habe ein Projekt, welches ich schon mit der AutoIt Version 3.3.8.1 erfolgreich kompiliert habe. Nun bin ich auf die neue Version (3.3.10.2) umgestiegen und seit dem ist mein Programm sehr langsam geworden. Beispiel: man klickt auf ein Menüpunkt und das Fenster öffnet sich ca. nach 3-4 Sekunden (Im Fenster sind lediglich Info-Daten der Firma). Könnte das mit irgendwelchen AutoIt-Wrapper-Parametern zu tun haben?

    Anbei noch meine AutoIt-Wrapper-Parameter:

    Spoiler anzeigen
    [autoit]

    #NoTrayIcon
    #RequireAdmin
    #Region
    ;**** Directives created by AutoIt3Wrapper_GUI ****
    #AutoIt3Wrapper_Icon=favicon.ico
    #AutoIt3Wrapper_Outfile=MeineEXE.exe
    #AutoIt3Wrapper_Compression=4
    #AutoIt3Wrapper_UseUpx=y
    #AutoIt3Wrapper_Res_Description=ZYX
    #AutoIt3Wrapper_Res_Fileversion=1.XXX
    #AutoIt3Wrapper_Res_Fileversion_AutoIncrement=p
    #AutoIt3Wrapper_Res_ProductVersion=1.0
    #AutoIt3Wrapper_Res_LegalCopyright=XYZ
    #AutoIt3Wrapper_Res_Language=1031
    #AutoIt3Wrapper_Res_requestedExecutionLevel=asInvoker
    #AutoIt3Wrapper_Res_File_Add=Data\logo.gif,RT_RCDATA,logo
    #AutoIt3Wrapper_Res_File_Add=Data\logo1.gif,RT_RCDATA,logo1
    #AutoIt3Wrapper_Res_File_Add=Data\favicon.ico,RT_RCDATA,ico
    #AutoIt3Wrapper_Res_File_Add=Data\Rooms.txt,RT_RCDATA,rooms
    #AutoIt3Wrapper_Res_File_Add=Data\video.gif,RT_RCDATA,video
    #AutoIt3Wrapper_Res_File_Add=Data\all.css,RT_RCDATA,allcss
    #AutoIt3Wrapper_Res_File_Add=Data\book.gif,RT_RCDATA,book
    #AutoIt3Wrapper_Res_File_Add=XXX.exe,RT_RCDATA,XXX
    #AutoIt3Wrapper_Res_File_Add=XXX.exe,RT_RCDATA,XXX
    #AutoIt3Wrapper_Res_File_Add=Data\Tastenkuerzel.ini,RT_RCDATA,tasten
    #AutoIt3Wrapper_Run_Tidy=y#AutoIt3Wrapper_Run_Obfuscator=y
    #Obfuscator_Parameters=/cs=0 /cn=0 /cf=0 /cv=0 /sf=1 /sv=0
    #EndRegion
    ;**** Directives created by AutoIt3Wrapper_GUI ****

    [/autoit]
  • user32.dll bei XP, Vista, Win7

    • simi4
    • 9. Dezember 2009 um 15:20

    ok probiere daheim.
    mal eine frage

    [autoit]

    Local $aResult = DllCall("shell32.dll", "int", "SHGetFolderPathW", _
    "hwnd", 0, _
    "int", 0x001C, _ ; CSIDL_LOCAL_APPDATA
    "ptr", 0, _
    "dword", 0x0000, _ ; SHGFP_TYPE_CURRENT
    "ptr", DllStructGetPtr($path) _
    )

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

    Wo kann ich diese ganze Parameter kriegen(in Hex und übersetzt)?

  • user32.dll bei XP, Vista, Win7

    • simi4
    • 9. Dezember 2009 um 10:34

    Ich hab einige Sachen dort schon ausprobiert(auskommentiert)...
    Großer auskommentierter Block ist für XP-User und niedriger gedacht. Der macht eigentlich Probleme

    Spoiler anzeigen
    [autoit]

    #include <array.au3>
    #include <File.au3>
    #include <GDIPlus.au3>

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

    Global Const $SPIF_UPDATEINIFILE = 0x01
    Global Const $SPIF_SENDWININICHANGE = 0x02
    Global Const $SPI_SETSCREENSAVEACTIVE = 0x11
    Global Const $SPI_SETDESKWALLPAPER = 0x14
    Global Const $SPI_GETDESKWALLPAPER = 0x73
    ;Dim $speed0
    $pixdir=FileSelectFolder("Choose a folder with your pictures", "")

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

    $filelist=_FileListToArray($pixdir & "\", "*.jpg")
    ;_ArrayDisplay($filelist, "filelist")
    $pixend=$filelist[0]

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

    $string=_ArrayToString($filelist, ";",1)

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

    $OS=@OSVersion
    ;MsgBox(0,"OS", $OS)
    #cs
    if $OS='WIN_XP' OR $OS='WIN_2000' then ;WIN_2000 oder WIN_00?
    $speed0=InputBox("Speed", "Set speed in seconds", 30)
    ElseIf $speed0<10 or $speed0>86401 Then
    $speed0=InputBox("Speed", "Set speed in area between 10 and 86400 seconds", 30)
    ElseIf Not IsNumber($speed0) Then
    InputBox("Speed", "Please write only numbers!", 30)
    $speed=$speed0 * 1000
    for $i= 1 to $pixend
    $r=Random(1,$pixend,1)
    ;MsgBox(0,"r", $r)
    $jpg=$filelist[$r]
    ;MsgBox(0,"jpg",$jpg)
    Global $Bitmap = $pixdir & "\" & $jpg
    ;MsgBox(0,"bitmap", $Bitmap)

    _GDIPlus_Startup()
    $Bild = _GDIPlus_ImageLoadFromFile($Bitmap)
    _GDIPlus_ImageSaveToFile($Bild, @WindowsDir & "\Wallpaper.bmp")
    _GDIPlus_ImageDispose($Bild)
    _GDIPlus_Shutdown()

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

    $bild1=@WindowsDir & "\Wallpaper.bmp"
    MsgBox(0,"123",$bild1)
    RegWrite("HKEY_CURRENT_USER\Control Panel\Desktop", "TileWallpaper", "REG_SZ", "0")
    RegWrite("HKEY_CURRENT_USER\Control Panel\Desktop", "WallpaperStyle", "REG_SZ", "2")
    RegWrite("HKEY_CURRENT_USER\Control Panel\Desktop", "ConvertedWallpaper", "REG_SZ", $bild1)
    RegWrite("HKEY_CURRENT_USER\Control Panel\Desktop", "OriginalWallpaper", "REG_SZ", @UserProfileDir & "\Lokale Einstellungen\Anwendungsdaten\Microsoft\Wallpaper1.bmp")
    $test=@UserProfileDir & "\Lokale Einstellungen\Anwendungsdaten\Microsoft\Wallpaper1.bmp"
    ;FileCopy("E:\Windows\System32\user32.dll", "C:\windows\system32\user32neu.dll",1)
    ;$test2=DllOpen("user32.dll")
    ;$test1=dllcall("user32.dll","long","SystemParametersInfo")
    ;MsgBox(4096,"123",$test1)
    _SetDeskWallpaper($bild1)
    Sleep($speed)
    If $i=$pixend Then
    $i=1
    Endif
    Next
    EndIf
    #ce
    ;fuer vista und win7(win7 ist immer noch vista, bloss version 6.1)
    If $OS="WIN_VISTA" Then

    $speed0=InputBox("Speed", "Set speed in seconds", 30)
    If $speed0<10 or $speed0>86401 Then
    $speed0=InputBox("Speed", "Set speed in area between 10 and 86400 seconds", 30)
    If Not IsNumber($speed0) Then
    InputBox("Speed", "Please write only numbers!", 30)
    EndIf
    EndIf
    $speed=$speed0 * 1000
    for $i= 1 to $pixend
    $r=Random(1,$pixend,1)
    ;MsgBox(0,"r", $r)
    $jpg=$filelist[$r]
    ;MsgBox(0,"jpg",$jpg)
    Global $Bitmap = $pixdir & "\" & $jpg
    ;MsgBox(0,"bitmap", $Bitmap)
    RegWrite("HKEY_CURRENT_USER\Control Panel\Desktop", "TileWallpaper", "REG_SZ", "0")
    RegWrite("HKEY_CURRENT_USER\Control Panel\Desktop", "WallpaperStyle", "REG_SZ", "2")
    _SetDeskWallpaper($Bitmap)
    Sleep($speed)
    If $i=$pixend Then
    $i=1
    Endif
    Next
    ;fur winxp und 2000
    ElseIf $OS='WIN_XP' OR $OS='WIN_2000' then ;WIN_2000 oder WIN_00?
    $speed0=InputBox("Speed", "Set speed in seconds", 30)
    ElseIf $speed0<10 or $speed0>86401 Then
    $speed0=InputBox("Speed", "Set speed in area between 10 and 86400 seconds", 30)
    ElseIf Not IsNumber($speed0) Then
    InputBox("Speed", "Please write only numbers!", 30)
    $speed=$speed0 * 1000
    for $i= 1 to $pixend
    $r=Random(1,$pixend,1)
    ;MsgBox(0,"r", $r)
    $jpg=$filelist[$r]
    ;MsgBox(0,"jpg",$jpg)
    Global $Bitmap = $pixdir & "\" & $jpg
    ;MsgBox(0,"bitmap", $Bitmap)

    _GDIPlus_Startup()
    $Bild = _GDIPlus_ImageLoadFromFile($Bitmap)
    _GDIPlus_ImageSaveToFile($Bild, @WindowsDir & "\Wallpaper.bmp")
    _GDIPlus_ImageDispose($Bild)
    _GDIPlus_Shutdown()

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

    $bild1=@WindowsDir & "\Wallpaper.bmp"
    MsgBox(0,"123",$bild1)
    RegWrite("HKEY_CURRENT_USER\Control Panel\Desktop", "TileWallpaper", "REG_SZ", "0")
    RegWrite("HKEY_CURRENT_USER\Control Panel\Desktop", "WallpaperStyle", "REG_SZ", "2")
    RegWrite("HKEY_CURRENT_USER\Control Panel\Desktop", "ConvertedWallpaper", "REG_SZ", $bild1)
    RegWrite("HKEY_CURRENT_USER\Control Panel\Desktop", "OriginalWallpaper", "REG_SZ", @UserProfileDir & "\Lokale Einstellungen\Anwendungsdaten\Microsoft\Wallpaper1.bmp")
    $test=@UserProfileDir & "\Lokale Einstellungen\Anwendungsdaten\Microsoft\Wallpaper1.bmp"
    ;FileCopy("E:\Windows\System32\user32.dll", "C:\windows\system32\user32neu.dll",1)
    ;$test2=DllOpen("user32.dll")
    ;$test1=dllcall("user32.dll","long","SystemParametersInfo")
    ;MsgBox(4096,"123",$test1)
    _SetDeskWallpaper($bild1)
    Sleep($speed)
    If $i=$pixend Then
    $i=1
    Endif
    Next
    EndIf

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

    Func _SetDeskWallpaper($Bitmap)
    DllCall("user32.dll", "long", "SystemParametersInfo" _
    , "long", $SPI_SETDESKWALLPAPER _
    , "long", 0 _
    , "str", $Bitmap _
    , "long", BitOR($SPIF_UPDATEINIFILE, $SPIF_SENDWININICHANGE) _
    )
    EndFunc ;==>_SetDeskWallpaper

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

    #cs
    Else
    Do
    InputBox("Speed", "Please write numbers between 10 and 86400!", 30)
    until $speed0>10 or $speed0<86401

    Func _GetDeskWallpaper()
    Local $Filename = DllStructCreate("char[256]")
    DllCall("user32.dll", "long", "SystemParametersInfo" _
    , "long", $SPI_GETDESKWALLPAPER _
    , "long", 255 _
    , "ptr", DllStructGetPtr($Filename) _
    , "long", 0 _
    )

    Return DllStructGetData($Filename, 1)
    EndFunc ;==>_GetDeskWallpaper

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

    #ce

    [/autoit]
  • user32.dll bei XP, Vista, Win7

    • simi4
    • 4. Dezember 2009 um 19:20
    Zitat von Magnus

    Unter Windows 7 heißt der Einrag "Wallpaper".

    Jo ist mir bekannt. mein problem ist in xp und 2000

  • user32.dll bei XP, Vista, Win7

    • simi4
    • 4. Dezember 2009 um 14:52
    Zitat von xp_fan

    r Eintrag "OriginalWallpaper" oder der Eintrag "Wallpaper",

    wenn mir jemand dser 2000 oder XP besitzt das wirklich sagen konnte, wäre ich sehr dankbar! sonst muss ich bei mir XP und 2000 extra instalieren....

  • user32.dll bei XP, Vista, Win7

    • simi4
    • 4. Dezember 2009 um 14:51
    Zitat von Nilo

    eifach die aktuelle dll in das verzeichnis vom script?

    nö im system32-ordner..... im verzeichnis vom script bringt das wenig

  • user32.dll bei XP, Vista, Win7

    • simi4
    • 4. Dezember 2009 um 10:12

    HAllo Community!

    Bin neu hier bei Forum und noch Anfänger bei AutoIT. Ich habe ein Script zusammengebastelt, das Hintergrundsbilder auf dem Desktop wechselt. Sowas ähnliches wie bei Win7, bloß wollte, dass die jenige, die noch Win2000, WinXP oder Vista besitzen auch was davon habn. Das Problem dabei, dass es NUR bei Vista und Win7 dann funktioniert. Ursache habe ich gefunden: user32.dll bei XP besitzt keine nötige Funktionen. Erst ab Version 6.0 dieser Bibliothek wird Programm richtig ausgeführt, sonst erscheint bloß leeres Desktop. Kennt jemand eine Lösung außer user32.dll Ver5 auf Ver6 zu ersetzen?

    Anlagen:
    desktop.zip(keine Viren)

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

    Mfg, simi4

    Dateien

    desktop.zip 661,03 kB – 291 Downloads

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™