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

Beiträge von BustedDice

  • _DownloadWithProgress

    • BustedDice
    • 26. September 2014 um 20:34

    Hab bei Zippyshare eine Datei hochgeladen und den Link eingefügt z.b http://www56.zippyshare.com/d/59742818%20Setup.exe (Link ist nur ein Beispiel) hier noch mein Script:

    Spoiler anzeigen
    [autoit]

    #include-once
    #include <GUIConstantsEx.au3>
    #include <GuiStatusBar.au3>
    #include <InetConstants.au3>
    #include <StaticConstants.au3>
    #include <WinAPIMisc.au3>
    #include <WindowsConstants.au3>
    #include <GDIPlus.au3>

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

    Func _DownloadWithProgress($sURL, $sDownloadDir = @ScriptDir, $sTitle = 'Downloader', $iLeft = -1, $iTop = -1, $hParent = 0)
    If $sURL = '' Then Return SetError(1, 0, 0)
    If Not FileExists($sDownloadDir) Then Return SetError(2, 0, 0)
    _GDIPlus_Startup()
    Global Const $aDPI = _GDIPlus_GraphicsGetDPIRatio()
    If StringRight($sDownloadDir, 1) <> '\' Then $sDownloadDir &= '\'
    HttpSetUserAgent('Downloader')
    Local $iOldEventMode = Opt('GUIOnEventMode', 0)
    If Not $hParent Then TraySetState(2) ; TrayIcon verstecken, wenn kein Parent angegeben wurde
    Local $iDownloadSize = 0, $aDownloadData, $iTimer = TimerInit(), $iError = 0, $iPercent = 0, $hDownload
    Local $iDownSpeedTimer = TimerInit(), $iDownSpeed = 0, $iRestTime = 0, $iOldTime = 0
    Local $hGui = GUICreate($sTitle, 400, 240, $iLeft, $iTop, -1, -1, $hParent)
    GUISetIcon('Icon.ico', $hGui)
    GUISetFont(10, 400, 0, 'Arial', $hGui, 5)
    GUISetBkColor(0x000000, $hGui) ;Schwarz Hintergrund
    GUICtrlCreateGroup('', 10, 5, 380, 165)
    GUICtrlCreateLabel(StringFormat('Datei: "%s"', StringRegExpReplace($sURL, '.+\/(.+)', '$1')), 25, 22, 350, 20)
    GUICtrlSetFont(-1, 12, 400, 0, 'Arial', 5)
    GUICtrlSetColor(-1, 0xFFFFFF) ;Rot Dateiname
    Local $idDownloadSize = GUICtrlCreateLabel('Dateigröße:', 25, 50, 350, 16)
    GUICtrlSetColor(-1, 0xFFFF00) ;Gelb Dateigröße
    Local $idDownloadSpeed = GUICtrlCreateLabel('Geschwindigkeit:', 25, 70, 350, 16)
    GUICtrlSetColor(-1, 0xFFFF00) ;Gelb Geschwindigkeit
    Local $idDownloadTime = GUICtrlCreateLabel('Downloadzeit:', 25, 90, 350, 16)
    GUICtrlSetColor(-1, 0xFFFF00) ;Gelb Downloadzeit
    Local $idRestTime = GUICtrlCreateLabel('Restzeit (geschätzt):', 25, 110, 350, 16)
    GUICtrlSetColor(-1, 0xFFFF00) ;Gelb Restzeit
    Local $iW = 360, $iH = 24, $iBGColor = 0x1E1E1E, $hHBmp_BG, $hB, $iSleep ;Prozessbar Hintergrund
    Local $idProgress = GUICtrlCreatePic("", 20, 138, $iW, $iH)
    Local $aColors[7][2] = [[0xFFEE5F5B, 0xFFF07673],[0xFFABCC04, 0xFFBBD636],[0xFF78CCEE, 0xFF93D6F1],[0xFFFFBB58, 0xFFFFC97A],[0xFFFF6677, 0xFFFF8795],[0xFF78CCEE, 0xFFFFC97A],[0xFF78CCEE, 0xFFE8E5D9]]
    $hHBmp_BG = _GDIPlus_StripProgressbar($iPercent, $iW, $iH, 0xFF000000 + $iBGColor, $aColors[1][0], $aColors[1][1], '')
    $hB = GUICtrlSendMsg($idProgress, 0x0172, $IMAGE_BITMAP, $hHBmp_BG)
    If $hB Then _WinAPI_DeleteObject($hB)
    _WinAPI_DeleteObject($hHBmp_BG)
    GUICtrlCreateGroup('', -99, -99, 1, 1)
    Local $idCancelButton = GUICtrlCreateButton('Download abbrechen', 120, 180, 140, 25)
    Local $hStatus = _GUICtrlStatusBar_Create($hGui)
    Local $hAttentionIcon = _WinAPI_LoadShell32Icon(77)
    Local $hOkIcon = _WinAPI_LoadShell32Icon(144)
    Local $hInfoIcon = _WinAPI_LoadShell32Icon(277)
    _GUICtrlStatusBar_SetIcon($hStatus, 0, $hInfoIcon)
    _GUICtrlStatusBar_SetText($hStatus, 'Dateigröße wird ermittelt! Bitte warten...')
    GUISetState(@SW_SHOW, $hGui)
    Local $iDriveSpaceFree = DriveSpaceFree($sDownloadDir) * 2 ^ 20 ; in Bytes umrechnen
    Local $iFileSize = InetGetSize($sURL) ; wird in Bytes ausgegeben
    If Not @error Then
    If $iDriveSpaceFree > $iFileSize Then
    _GUICtrlStatusBar_SetText($hStatus, 'Datei wird heruntergeladen...')
    $iDownSpeedTimer = TimerInit()
    GUICtrlSetData($idDownloadSize, StringFormat('Dateigröße: %s / %s', _WinAPI_StrFormatByteSize($iDownloadSize), _WinAPI_StrFormatByteSize($iFileSize)))
    GUICtrlSetData($idDownloadSpeed, StringFormat('Geschwindigkeit: %s/s', $iDownSpeed))
    $hDownload = InetGet($sURL, $sDownloadDir & StringRegExpReplace($sURL, '.+\/(.+)', '$1'), 1, 1)
    $iSleep = TimerInit()
    Do
    Switch GUIGetMsg()
    Case $idCancelButton
    $iError = 3
    ExitLoop
    Case $GUI_EVENT_CLOSE
    _WinAPI_DestroyIcon($hAttentionIcon)
    _WinAPI_DestroyIcon($hOkIcon)
    _WinAPI_DestroyIcon($hInfoIcon)
    InetClose($hDownload)
    HttpSetUserAgent('')
    Opt('GUIOnEventMode', $iOldEventMode)
    GUIDelete($hGui)
    Return SetError(3, 0, 0)
    EndSwitch
    $aDownloadData = InetGetInfo($hDownload)
    If $aDownloadData[$INET_DOWNLOADERROR] Then
    $iError = 4
    ExitLoop
    EndIf
    $iDownloadSize = $aDownloadData[$INET_DOWNLOADREAD]
    If TimerDiff($iTimer) > 250 Then
    $iDownSpeed = _WinAPI_StrFormatByteSize($iDownloadSize / TimerDiff($iDownSpeedTimer) * 1000)
    $iTimer = TimerInit()
    $iPercent = Int(100 / $iFileSize * $iDownloadSize)
    GUICtrlSetData($idDownloadSize, StringFormat('Dateigröße:\t\t%s / %s', _WinAPI_StrFormatByteSize($iDownloadSize), _WinAPI_StrFormatByteSize($iFileSize)))
    GUICtrlSetData($idDownloadSpeed, StringFormat('Geschwindigkeit:\t%s/s', $iDownSpeed))
    GUICtrlSetData($idDownloadTime, StringFormat('Downloadzeit:\t\t%s', _WinAPI_StrFromTimeInterval(TimerDiff($iDownSpeedTimer))))
    $iRestTime = ($iFileSize - $iDownloadSize) / ($iDownloadSize / TimerDiff($iDownSpeedTimer))
    If $iRestTime <> $iOldTime Then
    $iOldTime = $iRestTime
    GUICtrlSetData($idRestTime, StringFormat('Restzeit (geschätzt):\t%s', _WinAPI_StrFromTimeInterval($iRestTime)))
    EndIf
    EndIf
    If TimerDiff($iSleep) > 50 Then
    $hHBmp_BG = _GDIPlus_StripProgressbar($iPercent, $iW, $iH, 0xFF000000 + $iBGColor, $aColors[1][0], $aColors[1][1], $iPercent & '%')
    $hB = GUICtrlSendMsg($idProgress, 0x0172, $IMAGE_BITMAP, $hHBmp_BG)
    If $hB Then _WinAPI_DeleteObject($hB)
    _WinAPI_DeleteObject($hHBmp_BG)
    $iSleep = TimerInit()
    EndIf
    Until $aDownloadData[$INET_DOWNLOADCOMPLETE]
    If $iError Then
    $hHBmp_BG = _GDIPlus_StripProgressbar($iPercent, $iW, $iH, 0xFF000000 + $iBGColor, $aColors[0][0], $aColors[0][1], $iPercent & '%')
    $hB = GUICtrlSendMsg($idProgress, 0x0172, $IMAGE_BITMAP, $hHBmp_BG)
    If $hB Then _WinAPI_DeleteObject($hB)
    _WinAPI_DeleteObject($hHBmp_BG)
    _GUICtrlStatusBar_SetIcon($hStatus, 0, $hAttentionIcon)
    _GUICtrlStatusBar_SetText($hStatus, 'Download abgebrochen!')
    Else
    GUICtrlSetData($idDownloadSize, StringFormat('Dateigröße:\t\t%s / %s', _WinAPI_StrFormatByteSize($iDownloadSize), _WinAPI_StrFormatByteSize($iFileSize)))
    GUICtrlSetData($idDownloadSpeed, StringFormat('Geschwindigkeit:\t%s/s', $iDownSpeed))
    _GUICtrlStatusBar_SetIcon($hStatus, 0, $hOkIcon)
    _GUICtrlStatusBar_SetText($hStatus, 'Download abgeschlossen!')
    $hHBmp_BG = _GDIPlus_StripProgressbar(100, $iW, $iH, 0xFF000000 + $iBGColor, $aColors[1][0], $aColors[1][1], '100%')
    $hB = GUICtrlSendMsg($idProgress, 0x0172, $IMAGE_BITMAP, $hHBmp_BG)
    If $hB Then _WinAPI_DeleteObject($hB)
    _WinAPI_DeleteObject($hHBmp_BG)
    EndIf
    InetClose($hDownload)
    Else
    $iError = 5
    _GUICtrlStatusBar_SetIcon($hStatus, 0, $hAttentionIcon)
    _GUICtrlStatusBar_SetText($hStatus, 'Fehler! Nicht genug Platz auf dem Datenträger!')
    EndIf
    Else
    $iError = 6
    _GUICtrlStatusBar_SetIcon($hStatus, 0, $hAttentionIcon)
    _GUICtrlStatusBar_SetText($hStatus, 'Fehler! Dateigröße konnte nicht ermittelt werden!')
    EndIf
    GUICtrlSetData($idCancelButton, 'Fenster schließen')
    While True
    Switch GUIGetMsg()
    Case $idCancelButton, $GUI_EVENT_CLOSE
    _WinAPI_DestroyIcon($hAttentionIcon)
    _WinAPI_DestroyIcon($hOkIcon)
    _WinAPI_DestroyIcon($hInfoIcon)
    HttpSetUserAgent('')
    Opt('GUIOnEventMode', $iOldEventMode)
    GUIDelete($hGui)
    _GDIPlus_Shutdown()
    Return SetError($iError, 0, 0)
    EndSwitch
    WEnd
    EndFunc ;==>_DownloadWithProgress

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

    Func _GDIPlus_StripProgressbar($fPerc, $iW, $iH, $iBgColorGui = 0xFFF0F0F0, $iFgColor = 0xFFEE5F5B, $iBGColor = 0xFFF07673, $sText = "Loading...", $iTextColor = 0xFF0000, $iDir = -1, $iSpeed = 1, $sFont = "Arial", $bFlip = False, $bHBitmap = True)
    $fPerc = $fPerc < 0 ? 0 : $fPerc
    $fPerc = $fPerc > 100 ? 100 : $fPerc

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

    Local $hBitmap = _GDIPlus_BitmapCreateFromScan0($iW, $iH)
    Local Const $hCtxt = _GDIPlus_ImageGetGraphicsContext($hBitmap)
    _GDIPlus_GraphicsSetPixelOffsetMode($hCtxt, $GDIP_PIXELOFFSETMODE_HIGHQUALITY)
    _GDIPlus_GraphicsClear($hCtxt, $iBgColorGui)

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

    Local $iWidth = $iH * 2, $iLen = $iWidth / 2, $iY
    Local $hBmp = _GDIPlus_BitmapCreateFromScan0($iWidth, $iH)
    Local Const $hCtxt_Bmp = _GDIPlus_ImageGetGraphicsContext($hBmp)
    _GDIPlus_GraphicsSetPixelOffsetMode($hCtxt_Bmp, $GDIP_PIXELOFFSETMODE_HIGHQUALITY)
    Local $hPen = _GDIPlus_PenCreate($iFgColor), $iPenSize = Int($iH / 12)
    Local $hPen2 = _GDIPlus_PenCreate(0x50000000, $iPenSize)

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

    _GDIPlus_GraphicsClear($hCtxt_Bmp, $iBGColor)
    Local Static $iX = 0
    For $iY = 0 To $iH - 1
    Switch $iDir
    Case 1
    _GDIPlus_GraphicsDrawLine($hCtxt_Bmp, $iX + $iY, $iY, $iX + $iY + $iLen, $iY, $hPen)
    _GDIPlus_GraphicsDrawLine($hCtxt_Bmp, $iX + $iY - 2 * $iLen, $iY, $iX + $iY - 1 * $iLen, $iY, $hPen)
    Case Else
    _GDIPlus_GraphicsDrawLine($hCtxt_Bmp, -$iX + $iY, $iY, -$iX + $iY + $iLen, $iY, $hPen)
    _GDIPlus_GraphicsDrawLine($hCtxt_Bmp, -$iX + $iY + 2 * $iLen, $iY, -$iX + $iY + 3 * $iLen, $iY, $hPen)
    EndSwitch
    Next
    Local $tPoint1 = DllStructCreate("float;float")
    Local $tPoint2 = DllStructCreate("float;float")
    DllStructSetData($tPoint1, 1, $iW / 2) ;x1
    DllStructSetData($tPoint2, 1, $iW / 2) ;x2
    Local $hLineBrush

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

    If $bFlip Then
    _GDIPlus_GraphicsDrawLine($hCtxt_Bmp, 0, 0, $iWidth, 0, $hPen2)
    DllStructSetData($tPoint1, 2, $iH / 3) ;y1
    DllStructSetData($tPoint2, 2, $iH * 2 / 3) ;y2
    $hLineBrush = DllCall($__g_hGDIPDll, "uint", "GdipCreateLineBrush", "struct*", $tPoint1, "struct*", $tPoint2, "uint", 0x00FFFFFF, "uint", 0xB0FFFFFF, "int", 0, "int*", 0)
    $hLineBrush = $hLineBrush[6]
    _GDIPlus_GraphicsFillRect($hCtxt_Bmp, 0, $iH * 2 / 3 + 1, $iW, $iH / 3, $hLineBrush)
    Else
    _GDIPlus_GraphicsDrawLine($hCtxt_Bmp, 0, $iH - $iPenSize / 2, $iWidth, $iH - $iPenSize / 2, $hPen2)
    DllStructSetData($tPoint1, 2, 0) ;y1
    DllStructSetData($tPoint2, 2, $iH / 3) ;y2
    $hLineBrush = DllCall($__g_hGDIPDll, "uint", "GdipCreateLineBrush", "struct*", $tPoint1, "struct*", $tPoint2, "uint", 0xB0FFFFFF, "uint", 0x00FFFFFF, "int", 0, "int*", 0)
    $hLineBrush = $hLineBrush[6]
    _GDIPlus_GraphicsFillRect($hCtxt_Bmp, 0, 0, $iW, $iH / 3, $hLineBrush)
    EndIf
    $iX = Mod($iX + $iSpeed, $iWidth)

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

    Local $hTextureBrush = _GDIPlus_TextureCreate($hBmp)

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

    _GDIPlus_GraphicsFillRect($hCtxt, 0, 0, $fPerc / 100 * $iW, $iH, $hTextureBrush)
    If $bFlip Then _GDIPlus_ImageRotateFlip($hBitmap, 6)
    _GDIPlus_GraphicsSetTextRenderingHint($hCtxt, 4)

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

    Local $hBrush = _GDIPlus_BrushCreateSolid(0xE0000000 + $iTextColor)
    Local $hFormat = _GDIPlus_StringFormatCreate()
    Local $hFamily = _GDIPlus_FontFamilyCreate($sFont)
    Local $hFont = _GDIPlus_FontCreate($hFamily, $iH * 3 / 7)
    Local $tLayout = _GDIPlus_RectFCreate(0, 0, $iW, $iH)
    _GDIPlus_StringFormatSetAlign($hFormat, 1)
    _GDIPlus_StringFormatSetLineAlign($hFormat, 1)
    _GDIPlus_GraphicsDrawStringEx($hCtxt, $sText, $hFont, $tLayout, $hFormat, $hBrush)

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

    _GDIPlus_FontDispose($hFont)
    _GDIPlus_FontFamilyDispose($hFamily)
    _GDIPlus_StringFormatDispose($hFormat)
    _GDIPlus_BrushDispose($hBrush)
    _GDIPlus_PenDispose($hPen)
    _GDIPlus_PenDispose($hPen2)
    _GDIPlus_GraphicsDispose($hCtxt)
    _GDIPlus_GraphicsDispose($hCtxt_Bmp)
    _GDIPlus_BitmapDispose($hBmp)
    _GDIPlus_BrushDispose($hTextureBrush)
    _GDIPlus_BrushDispose($hLineBrush)
    If $bHBitmap Then
    Local $hHBITMAP = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBitmap)
    _GDIPlus_BitmapDispose($hBitmap)
    Return $hHBITMAP
    EndIf
    Return $hBitmap
    EndFunc ;==>_GDIPlus_StripProgressbar

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

    Func _GDIPlus_GraphicsGetDPIRatio($iDPIDef = 96)
    Local $hGfx = _GDIPlus_GraphicsCreateFromHWND(0)
    If @error Then Return SetError(1, @extended, 0)
    Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetDpiX", "handle", $hGfx, "float*", 0)
    If @error Then Return SetError(2, @extended, 0)
    Local $iDPI = $aResult[2]
    _GDIPlus_GraphicsDispose($hGfx)
    Local $aResults[2] = [$iDPIDef / $iDPI, $iDPI / $iDPIDef]
    Return $aResults
    EndFunc ;==>_GDIPlus_GraphicsGetDPIRatio

    [/autoit]
  • _DownloadWithProgress

    • BustedDice
    • 26. September 2014 um 19:24

    Hallo zusammen hab ein Problem bei mir stimmt die Prozent Anzeige nicht hat vielleicht jemand das selbe Problem und eine Lösung?
    [Blockierte Grafik: http://s7.directupload.net/images/140926/f78k9dxg.png]

  • _DownloadWithProgress

    • BustedDice
    • 23. September 2014 um 21:55

    Danke gefällt mir sehr gut!

  • Windows 8 GUI

    • BustedDice
    • 12. September 2014 um 23:17

    Danke das hilft mir echt weiter :)

  • Windows 8 GUI

    • BustedDice
    • 12. September 2014 um 18:57

    Versteh das nicht so ganz bin da echt noch Neuling ein Beispiel wäre gut.
    Könnte mit jemand zu diesen Gui einen Button hinzufügen der dann eine .exe startet :)

    Dateien

    Windows 8 GUI.zip 8,32 kB – 443 Downloads
  • Windows 8 GUI

    • BustedDice
    • 12. September 2014 um 14:34

    Okay aber wenn ich es so machte starte garnix mehr!

    Spoiler anzeigen

    #include <GUIConstants.au3>
    #include <Misc.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
    #include <WinApi.au3>
    #include <GDIPlus.au3>
    Global $MausPos,$CursorState=0


    GUISetIcon("Icon.ico")
    Opt("TrayMenuMode", 1)
    FileInstall("cover.jpg", @TempDir & "\Cover.jpg", 1)
    $BKGui = GUICreate("Android-Box 1.2", 687, 744, -1, -1, $WS_POPUP,$WS_EX_LAYERED)
    GUISetBkColor(0x232323)
    WinSetTrans($BKGui,"",200)
    $ar=WinGetPos($BKGui)
    $exit = GUICtrlCreateLabel("x", 640, 0, 40, 20, BitOR($ES_CENTER, $SS_CENTERIMAGE))
    GUICtrlSetBkColor(-1, 0xC84E50)
    GUICtrlSetColor(-1, 0xFFFFFF)
    GUICtrlSetFont(-1, 11, 722, 1, "Century Gothic")
    $Gui = GUICreate("Beispiel", $ar[2]-22,$ar[3]-32, $ar[0]+11, $ar[1]+24, $WS_POPUP, -1,$BKGui)
    GUISetBkColor(0x000000)
    WinSetTrans($Gui,"",200)
    Global $Button01 = GUICtrlCreateButton("01", 8, 278, 203, -1, $BS_FLAT)
    Global $Button02 = GUICtrlCreateButton("02", 8, 374, 203, -1, $BS_FLAT)
    Global $Button03 = GUICtrlCreateButton("03", 8, 342, 203, -1, $BS_FLAT)
    Global $Button04 = GUICtrlCreateButton("04", 8, 310, 203, -1, $BS_FLAT)
    Global $Button05 = GUICtrlCreateButton("05", 8, 580, 203, -1, $BS_FLAT)
    Global $Button06 = GUICtrlCreateButton("06", 8, 679, 203, -1, $BS_FLAT)
    Global $Button07 = GUICtrlCreateButton("07", 8, 646, 203, -1, $BS_FLAT)
    Global $Button08 = GUICtrlCreateButton("08", 8, 613, 203, -1, $BS_FLAT)
    Global $Button09 = GUICtrlCreateButton("09", 8, 430, 203, -1, $BS_FLAT)
    Global $Button10 = GUICtrlCreateButton("10", 8, 526, 203, -1, $BS_FLAT)
    Global $Button11 = GUICtrlCreateButton("11", 8, 494, 203, -1, $BS_FLAT)
    Global $Button12 = GUICtrlCreateButton("12", 8, 462, 203, -1, $BS_FLAT)
    Global $Button13 = GUICtrlCreateButton("13", 230, 278, 203, -1, $BS_FLAT)
    Global $Button14 = GUICtrlCreateButton("14", 230, 374, 203, -1, $BS_FLAT)
    Global $Button15 = GUICtrlCreateButton("15", 230, 342, 203, -1, $BS_FLAT)
    Global $Button16 = GUICtrlCreateButton("16", 230, 310, 203, -1, $BS_FLAT)
    Global $Button17 = GUICtrlCreateButton("17", 230, 494, 203, -1, $BS_FLAT)
    Global $Button18 = GUICtrlCreateButton("18", 230, 462, 203, -1, $BS_FLAT)
    Global $Button19 = GUICtrlCreateButton("19", 230, 430, 203, -1, $BS_FLAT)
    Global $Button20 = GUICtrlCreateButton("20", 230, 580, 203, -1, $BS_FLAT)
    Global $Button21 = GUICtrlCreateButton("21", 230, 526, 203, -1, $BS_FLAT)
    Global $Button22 = GUICtrlCreateButton("22", 230, 646, 203, -1, $BS_FLAT)
    Global $Button23 = GUICtrlCreateButton("23", 230, 613, 203, -1, $BS_FLAT)
    Global $Button24 = GUICtrlCreateButton("24", 230, 679, 203, -1, $BS_FLAT)
    Global $Button25 = GUICtrlCreateButton("25", 454, 278, 203, -1, $BS_FLAT)
    Global $Button26 = GUICtrlCreateButton("26", 454, 246, 203, -1, $BS_FLAT)
    Global $Button27 = GUICtrlCreateButton("27", 454, 214, 203, -1, $BS_FLAT)
    Global $Button28 = GUICtrlCreateButton("28", 454, 310, 203, -1, $BS_FLAT)
    Global $Button29 = GUICtrlCreateButton("29", 454, 398, 203, -1, $BS_FLAT)
    Global $Button30 = GUICtrlCreateButton("30", 454, 366, 203, -1, $BS_FLAT)
    Global $Button31 = GUICtrlCreateButton("31", 454, 548, 203, -1, $BS_FLAT)
    Global $Button32 = GUICtrlCreateButton("32", 454, 494, 203, -1, $BS_FLAT)
    Global $Button33 = GUICtrlCreateButton("33", 454, 462, 203, -1, $BS_FLAT)
    Global $Button34 = GUICtrlCreateButton("34", 454, 430, 203, -1, $BS_FLAT)
    Global $Button35 = GUICtrlCreateButton("35", 454, 580, 203, -1, $BS_FLAT)
    Global $Button36 = GUICtrlCreateButton("36", 454, 646, 203, -1, $BS_FLAT)
    Global $Button37 = GUICtrlCreateButton("37", 454, 613, 203, -1, $BS_FLAT)
    Global $Button38 = GUICtrlCreateButton("38", 454, 679, 203, -1, $BS_FLAT)
    Global $Button39 = GUICtrlCreateButton("39", 8, 214, 203, -1, $BS_FLAT)
    Global $Button40 = GUICtrlCreateButton("40", 230, 214, 203, -1, $BS_FLAT)
    Global $Label01 = GUICtrlCreateLabel("Label1", 233, 193, 196, 17, BitOR($SS_CENTER,$SS_CENTERIMAGE))
    GUICtrlSetColor(-1, 0xFFFF00)
    Global $Label02 = GUICtrlCreateLabel("Label2", 457, 193, 196, 17, BitOR($SS_CENTER,$SS_CENTERIMAGE))
    GUICtrlSetColor(-1, 0xFFFF00)
    Global $Label03 = GUICtrlCreateLabel("Label3", 11, 193, 196, 17, BitOR($SS_CENTER,$SS_CENTERIMAGE))
    GUICtrlSetColor(-1, 0xFFFF00)
    Global $Label04 = GUICtrlCreateLabel("Label4", 11, 257, 196, 17, BitOR($SS_CENTER,$SS_CENTERIMAGE))
    GUICtrlSetColor(-1, 0xFFFF00)
    Global $Label05 = GUICtrlCreateLabel("Label5", 233, 257, 198, 17, BitOR($SS_CENTER,$SS_CENTERIMAGE))
    GUICtrlSetColor(-1, 0xFFFF00)
    Global $Label06 = GUICtrlCreateLabel("Label6", 11, 412, 196, 17, BitOR($SS_CENTER,$SS_CENTERIMAGE))
    GUICtrlSetColor(-1, 0xFFFF00)
    Global $Label07 = GUICtrlCreateLabel("Label7", 233, 412, 196, 17, BitOR($SS_CENTER,$SS_CENTERIMAGE))
    GUICtrlSetColor(-1, 0xFFFF00)
    Global $Label08 = GUICtrlCreateLabel("Label8", 11, 560, 198, 17, BitOR($SS_CENTER,$SS_CENTERIMAGE))
    GUICtrlSetColor(-1, 0xFFFF00)
    Global $Label09 = GUICtrlCreateLabel("Label9", 233, 560, 196, 17, BitOR($SS_CENTER,$SS_CENTERIMAGE))
    GUICtrlSetColor(-1, 0xFFFF00)
    Global $Label10 = GUICtrlCreateLabel("Label10", 457, 345, 200, 17, BitOR($SS_CENTER,$SS_CENTERIMAGE))
    GUICtrlSetColor(-1, 0xFFFF00)
    Global $Label11 = GUICtrlCreateLabel("Label11", 457, 527, 196, 17, BitOR($SS_CENTER,$SS_CENTERIMAGE))
    GUICtrlSetColor(-1, 0xFFFF00)
    Global $Pic1 = GUICtrlCreatePic(@TempDir & "\Cover.jpg", 10, 12, 644, 166)


    ; Disable Win Theme in button...
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button01), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button02), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button03), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button04), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button05), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button06), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button07), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button08), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button09), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button10), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button11), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button12), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button13), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button14), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button15), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button16), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button17), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button18), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button19), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button20), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button21), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button22), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button23), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button24), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button25), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button26), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button27), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button28), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button29), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button30), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button31), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button32), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button33), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button34), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button35), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button36), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button37), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button38), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button39), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button40), "wstr", 0, "wstr", 0)


    GUISetState(@SW_SHOW) ; will display an empty dialog box
    GUIRegisterMsg($WM_LBUTTONUP, "MY_WM_COMMAND_UP")
    GUIRegisterMsg($WM_LBUTTONDOWN, "MY_WM_COMMAND_DOWN")
    GUISetState(@SW_SHOW,$BKGui)
    GUISetState(@SW_SHOW,$Gui)


    While 1
    $msg = GUIGetMsg()
    $pos = GUIGetCursorInfo($gui)
    If $msg = $GUI_EVENT_CLOSE Or $msg = $exit Then
    Exit

    Case $Button01
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button02
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button03
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button04
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button05
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button06
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button07
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button08
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button09
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button10
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button11
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button12
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button13
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button14
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button15
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button16
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button17
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button18
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button19
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button20
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button21
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button22
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button23
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button24
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button25
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button26
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button27
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button28
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button29
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button30
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button31
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button32
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button33
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button34
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button35
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button36
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button37
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button38
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button39
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button40
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    endif
    WEnd


    Func MY_WM_COMMAND_DOWN($hwnd,$msg,$wparam,$lparam)
    Switch $hwnd
    Case $BKGui
    if $msg>0 then
    AdlibRegister("move",10)
    $MausPos=MouseGetPos()
    endif
    EndSwitch
    EndFunc


    Func MY_WM_COMMAND_UP($hwnd,$msg,$wparam,$lparam)
    Switch $hwnd
    Case $BKGui
    if $msg>0 or $msg=$exit then
    AdlibUnRegister("move")
    endif
    EndSwitch
    EndFunc


    Func move()
    $MausPos2=MouseGetPos()
    if $MausPos[0]<>$MausPos2[0] or $MausPos[1]<>$MausPos2[1] then
    $ar=WinGetPos($BKGui)
    $x=$MausPos2[0]-$MausPos[0]
    $y=$MausPos2[1]-$MausPos[1]
    WinMove($BKGui,"",$ar[0]+$x,$ar[1]+$y)
    WinMove($Gui,"",$ar[0]+$x+11,$ar[1]+$y+24)
    $MausPos[0]=$MausPos2[0]
    $MausPos[1]=$MausPos2[1]
    endif
    EndFunc

  • Windows 8 GUI

    • BustedDice
    • 12. September 2014 um 14:21

    Okay also der fehler ist wenn ich auf einen Button klicke passiert nix

  • Windows 8 GUI

    • BustedDice
    • 11. September 2014 um 20:18

    Hallo zusammen brauch mal eure Hilfe bin sozusagen noch Noob :).
    Hab ein Windows 8 GUI mit Buttons erstellt und ich möchte per Buttonklick
    eine .exe im Temp Ordner starten aber irgendwie will das ganz nicht klappen.
    Hoffe ihr könnt mir weiterhelfen :)

    Hier mein Script:

    [autoit]


    #include <GUIConstants.au3>
    #include <Misc.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
    #include <WinApi.au3>
    #include <GDIPlus.au3>
    Global $MausPos,$CursorState=0

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

    GUISetIcon("Icon.ico")
    Opt("TrayMenuMode", 1)
    FileInstall("cover.jpg", @TempDir & "\Cover.jpg", 1)
    $BKGui = GUICreate("Android-Box 1.2", 687, 744, -1, -1, $WS_POPUP,$WS_EX_LAYERED)
    GUISetBkColor(0x232323)
    WinSetTrans($BKGui,"",200)
    $ar=WinGetPos($BKGui)
    $exit = GUICtrlCreateLabel("x", 640, 0, 40, 20, BitOR($ES_CENTER, $SS_CENTERIMAGE))
    GUICtrlSetBkColor(-1, 0xC84E50)
    GUICtrlSetColor(-1, 0xFFFFFF)
    GUICtrlSetFont(-1, 11, 722, 1, "Century Gothic")
    $Gui = GUICreate("Beispiel", $ar[2]-22,$ar[3]-32, $ar[0]+11, $ar[1]+24, $WS_POPUP, -1,$BKGui)
    GUISetBkColor(0x000000)
    WinSetTrans($Gui,"",200)
    Global $Button01 = GUICtrlCreateButton("01", 8, 278, 203, -1, $BS_FLAT)
    Global $Button02 = GUICtrlCreateButton("02", 8, 374, 203, -1, $BS_FLAT)
    Global $Button03 = GUICtrlCreateButton("03", 8, 342, 203, -1, $BS_FLAT)
    Global $Button04 = GUICtrlCreateButton("04", 8, 310, 203, -1, $BS_FLAT)
    Global $Button05 = GUICtrlCreateButton("05", 8, 580, 203, -1, $BS_FLAT)
    Global $Button06 = GUICtrlCreateButton("06", 8, 679, 203, -1, $BS_FLAT)
    Global $Button07 = GUICtrlCreateButton("07", 8, 646, 203, -1, $BS_FLAT)
    Global $Button08 = GUICtrlCreateButton("08", 8, 613, 203, -1, $BS_FLAT)
    Global $Button09 = GUICtrlCreateButton("09", 8, 430, 203, -1, $BS_FLAT)
    Global $Button10 = GUICtrlCreateButton("10", 8, 526, 203, -1, $BS_FLAT)
    Global $Button11 = GUICtrlCreateButton("11", 8, 494, 203, -1, $BS_FLAT)
    Global $Button12 = GUICtrlCreateButton("12", 8, 462, 203, -1, $BS_FLAT)
    Global $Button13 = GUICtrlCreateButton("13", 230, 278, 203, -1, $BS_FLAT)
    Global $Button14 = GUICtrlCreateButton("14", 230, 374, 203, -1, $BS_FLAT)
    Global $Button15 = GUICtrlCreateButton("15", 230, 342, 203, -1, $BS_FLAT)
    Global $Button16 = GUICtrlCreateButton("16", 230, 310, 203, -1, $BS_FLAT)
    Global $Button17 = GUICtrlCreateButton("17", 230, 494, 203, -1, $BS_FLAT)
    Global $Button18 = GUICtrlCreateButton("18", 230, 462, 203, -1, $BS_FLAT)
    Global $Button19 = GUICtrlCreateButton("19", 230, 430, 203, -1, $BS_FLAT)
    Global $Button20 = GUICtrlCreateButton("20", 230, 580, 203, -1, $BS_FLAT)
    Global $Button21 = GUICtrlCreateButton("21", 230, 526, 203, -1, $BS_FLAT)
    Global $Button22 = GUICtrlCreateButton("22", 230, 646, 203, -1, $BS_FLAT)
    Global $Button23 = GUICtrlCreateButton("23", 230, 613, 203, -1, $BS_FLAT)
    Global $Button24 = GUICtrlCreateButton("24", 230, 679, 203, -1, $BS_FLAT)
    Global $Button25 = GUICtrlCreateButton("25", 454, 278, 203, -1, $BS_FLAT)
    Global $Button26 = GUICtrlCreateButton("26", 454, 246, 203, -1, $BS_FLAT)
    Global $Button27 = GUICtrlCreateButton("27", 454, 214, 203, -1, $BS_FLAT)
    Global $Button28 = GUICtrlCreateButton("28", 454, 310, 203, -1, $BS_FLAT)
    Global $Button29 = GUICtrlCreateButton("29", 454, 398, 203, -1, $BS_FLAT)
    Global $Button30 = GUICtrlCreateButton("30", 454, 366, 203, -1, $BS_FLAT)
    Global $Button31 = GUICtrlCreateButton("31", 454, 548, 203, -1, $BS_FLAT)
    Global $Button32 = GUICtrlCreateButton("32", 454, 494, 203, -1, $BS_FLAT)
    Global $Button33 = GUICtrlCreateButton("33", 454, 462, 203, -1, $BS_FLAT)
    Global $Button34 = GUICtrlCreateButton("34", 454, 430, 203, -1, $BS_FLAT)
    Global $Button35 = GUICtrlCreateButton("35", 454, 580, 203, -1, $BS_FLAT)
    Global $Button36 = GUICtrlCreateButton("36", 454, 646, 203, -1, $BS_FLAT)
    Global $Button37 = GUICtrlCreateButton("37", 454, 613, 203, -1, $BS_FLAT)
    Global $Button38 = GUICtrlCreateButton("38", 454, 679, 203, -1, $BS_FLAT)
    Global $Button39 = GUICtrlCreateButton("39", 8, 214, 203, -1, $BS_FLAT)
    Global $Button40 = GUICtrlCreateButton("40", 230, 214, 203, -1, $BS_FLAT)
    Global $Label01 = GUICtrlCreateLabel("Label1", 233, 193, 196, 17, BitOR($SS_CENTER,$SS_CENTERIMAGE))
    GUICtrlSetColor(-1, 0xFFFF00)
    Global $Label02 = GUICtrlCreateLabel("Label2", 457, 193, 196, 17, BitOR($SS_CENTER,$SS_CENTERIMAGE))
    GUICtrlSetColor(-1, 0xFFFF00)
    Global $Label03 = GUICtrlCreateLabel("Label3", 11, 193, 196, 17, BitOR($SS_CENTER,$SS_CENTERIMAGE))
    GUICtrlSetColor(-1, 0xFFFF00)
    Global $Label04 = GUICtrlCreateLabel("Label4", 11, 257, 196, 17, BitOR($SS_CENTER,$SS_CENTERIMAGE))
    GUICtrlSetColor(-1, 0xFFFF00)
    Global $Label05 = GUICtrlCreateLabel("Label5", 233, 257, 198, 17, BitOR($SS_CENTER,$SS_CENTERIMAGE))
    GUICtrlSetColor(-1, 0xFFFF00)
    Global $Label06 = GUICtrlCreateLabel("Label6", 11, 412, 196, 17, BitOR($SS_CENTER,$SS_CENTERIMAGE))
    GUICtrlSetColor(-1, 0xFFFF00)
    Global $Label07 = GUICtrlCreateLabel("Label7", 233, 412, 196, 17, BitOR($SS_CENTER,$SS_CENTERIMAGE))
    GUICtrlSetColor(-1, 0xFFFF00)
    Global $Label08 = GUICtrlCreateLabel("Label8", 11, 560, 198, 17, BitOR($SS_CENTER,$SS_CENTERIMAGE))
    GUICtrlSetColor(-1, 0xFFFF00)
    Global $Label09 = GUICtrlCreateLabel("Label9", 233, 560, 196, 17, BitOR($SS_CENTER,$SS_CENTERIMAGE))
    GUICtrlSetColor(-1, 0xFFFF00)
    Global $Label10 = GUICtrlCreateLabel("Label10", 457, 345, 200, 17, BitOR($SS_CENTER,$SS_CENTERIMAGE))
    GUICtrlSetColor(-1, 0xFFFF00)
    Global $Label11 = GUICtrlCreateLabel("Label11", 457, 527, 196, 17, BitOR($SS_CENTER,$SS_CENTERIMAGE))
    GUICtrlSetColor(-1, 0xFFFF00)
    Global $Pic1 = GUICtrlCreatePic(@TempDir & "\Cover.jpg", 10, 12, 644, 166)

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

    ; Disable Win Theme in button...
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button01), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button02), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button03), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button04), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button05), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button06), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button07), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button08), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button09), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button10), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button11), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button12), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button13), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button14), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button15), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button16), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button17), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button18), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button19), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button20), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button21), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button22), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button23), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button24), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button25), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button26), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button27), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button28), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button29), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button30), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button31), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button32), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button33), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button34), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button35), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button36), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button37), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button38), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button39), "wstr", 0, "wstr", 0)
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Button40), "wstr", 0, "wstr", 0)

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

    GUISetState(@SW_SHOW) ; will display an empty dialog box
    GUIRegisterMsg($WM_LBUTTONUP, "MY_WM_COMMAND_UP")
    GUIRegisterMsg($WM_LBUTTONDOWN, "MY_WM_COMMAND_DOWN")
    GUISetState(@SW_SHOW,$BKGui)
    GUISetState(@SW_SHOW,$Gui)

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

    While 1
    $msg = GUIGetMsg()
    $pos = GUIGetCursorInfo($gui)
    If $msg = $GUI_EVENT_CLOSE Or $msg = $exit Then
    Exit
    endif
    WEnd

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

    Func MY_WM_COMMAND_DOWN($hwnd,$msg,$wparam,$lparam)
    Switch $hwnd
    Case $BKGui
    if $msg>0 then
    AdlibRegister("move",10)
    $MausPos=MouseGetPos()
    endif
    EndSwitch
    EndFunc

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

    Func MY_WM_COMMAND_UP($hwnd,$msg,$wparam,$lparam)
    Switch $hwnd
    Case $BKGui
    if $msg>0 or $msg=$exit then
    AdlibUnRegister("move")
    endif
    EndSwitch
    EndFunc

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

    Func move()
    $MausPos2=MouseGetPos()
    if $MausPos[0]<>$MausPos2[0] or $MausPos[1]<>$MausPos2[1] then
    $ar=WinGetPos($BKGui)
    $x=$MausPos2[0]-$MausPos[0]
    $y=$MausPos2[1]-$MausPos[1]
    WinMove($BKGui,"",$ar[0]+$x,$ar[1]+$y)
    WinMove($Gui,"",$ar[0]+$x+11,$ar[1]+$y+24)
    $MausPos[0]=$MausPos2[0]
    $MausPos[1]=$MausPos2[1]
    endif
    EndFunc

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

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

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

    Case $Button01
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button02
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button03
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button04
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button05
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button06
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button07
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button08
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button09
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button10
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button11
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button12
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button13
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button14
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button15
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button16
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button17
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button18
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button19
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button20
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button21
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button22
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button23
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button24
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button25
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button26
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button27
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button28
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button29
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button30
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button31
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button32
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button33
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button34
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button35
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button36
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button37
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button38
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button39
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    Case $Button40
    FileInstall("Beipiel.exe", @TempDir & "\Beispiel.exe", 1)
    Run(@TempDir & "\Beispiel.exe")
    EndSwitch
    WEnd

    [/autoit]


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™