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

Beiträge von Greek

  • User-Agent für _INetGetSource ändern

    • Greek
    • 27. Dezember 2009 um 20:54

    In 3.3.0.0 konnte man ihn auch noch in der Inet.au3 ändern, aber jetzt die Funktion anscheinend anders aufgebaut. Sind nur noch ein paar Zeilen, das wesentliche findet in InetRead statt und das ist nicht mehr open source.

    Haste

    [autoit]

    HttpSetUserAgent

    [/autoit]


    mal ausprobiert?

    Ansonst kann ich dir nur noch eine WinHTTP Möglichkeit anbieten.

  • User-Agent für _INetGetSource ändern

    • Greek
    • 27. Dezember 2009 um 20:27

    Kenn nur den Befehl

    [autoit]

    HttpSetUserAgent

    [/autoit]


    Weist nicht ob der auch damit Funktioniert, steht für InetGet drin...

  • Transparente GUI

    • Greek
    • 27. Dezember 2009 um 17:59

    Hab ich bei meiner drin, kannst dir ja anschauen:

    Spoiler anzeigen
    [autoit]

    ;Author: Greek
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #Include <GDIPlus.au3>

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

    HotKeySet ("{ESC}","_CleanEnd")

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

    Global $GUIBreite=400
    Global $GUIHoehe=150

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

    $hGui=GUICreate("Uhr", $GUIBreite, $GUIHoehe, Default, Default, $WS_POPUP, BitOR($WS_EX_LAYERED,$WS_EX_TOOLWINDOW,$WS_EX_TOPMOST))
    GUISetBkColor(0x000000)
    GUICtrlCreateLabel("", 0, 0, $GUIBreite, $GUIHoehe, -1, $GUI_WS_EX_PARENTDRAG)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    _WinAPI_SetLayeredWindowAttributes($hGui, 0x000000, 0,0x01)
    _GuiRoundCorners($hGui,0,0,400,150)
    GUISetState()

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

    _GDIPlus_Startup()

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

    $hGraphic=_GDIPlus_GraphicsCreateFromHWND($hGui)
    $hBrush = _GDIPlus_BrushCreateSolid (0xFF00FF00)
    $hFormat = _GDIPlus_StringFormatCreate ()
    $hFamily = _GDIPlus_FontFamilyCreate ("Arial")
    $hFont = _GDIPlus_FontCreate ($hFamily, 40, 2)
    $tLayout = _GDIPlus_RectFCreate (85, 40, 300, 100)
    _GDIPlus_GraphicsDrawStringEx ($hGraphic, @HOUR&":"&@MIN&":"&@SEC, $hFont, $tLayout, $hFormat, $hBrush)

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

    AdlibRegister("_Update",1000)

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

    While 1
    Sleep ( 200 )
    WEnd

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

    Func _Update()
    _GDIPlus_GraphicsClear($hGraphic,0xFF000000)
    _GDIPlus_GraphicsDrawStringEx ($hGraphic, @HOUR&":"&@MIN&":"&@SEC, $hFont, $tLayout, $hFormat, $hBrush)
    EndFunc

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

    Func _CleanEnd()
    _GDIPlus_FontDispose ($hFont)
    _GDIPlus_FontFamilyDispose ($hFamily)
    _GDIPlus_StringFormatDispose ($hFormat)
    _GDIPlus_BrushDispose ($hBrush)
    _GDIPlus_GraphicsDispose ($hGraphic)
    _GDIPlus_Shutdown ()
    Exit
    EndFunc

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

    Func _GuiRoundCorners($hWnd, $x1, $y1, $x3, $y3)
    Local $pos, $ret, $ret2
    $pos = WinGetPos($hWnd)
    $ret = DllCall('gdi32.dll', 'long', 'CreateRoundRectRgn', 'long', $x1, 'long', $y1, 'long', $pos[2], 'long', $pos[3], 'long', $x3, 'long', $y3)
    If $ret[0] Then
    $ret2 = DllCall('user32.dll', 'long', 'SetWindowRgn', 'hwnd', $hWnd, 'long', $ret[0], 'int', 1)
    If $ret2[0] Then
    Return 1
    Else
    Return 0
    EndIf
    Else
    Return 0
    EndIf
    EndFunc

    [/autoit]

    Edit: Nochma nur mit Trans reingestellt:

    [autoit]

    _WinAPI_SetLayeredWindowAttributes($hGui, 0x000000, 0,0x01)

    [/autoit]


    In der Hilfe anschauen.

  • Abkürzungen in SciTE verwalten

    • Greek
    • 26. Dezember 2009 um 16:17

    Versteh es auch nicht, hab auch alles nach einem Fehler durchsucht, aber gibt einfach keine Erklärung warum bei mir immer ein ? hinten angehängt wird....

  • Abkürzungen in SciTE verwalten

    • Greek
    • 25. Dezember 2009 um 22:18
    Zitat von BugFix

    Auch mit der aktuellen Stable (3.3.2.0) läuft das bei mir problemlos.
    Was für ein Betriebssystem verwendest du?

    Xp Sp3

    Muss man das was beachten wenn man es eingibt? Hab es ja schonmal benutzt da hab ichs einfach nur reinkopiert und es ging, ich erhalte immer ? am ende:

    C
    #include <GUIConstantsEx.au3>?
    #include <WindowsConstants.au3>?
    
    
    $MainGUI = GUICreate("", 400, 400, -1, -1)?
    GUISetState()?
    
    
    While 1?
    	$msg = GUIGetMsg()?
    	Switch $msg?
    		Case $GUI_EVENT_CLOSE
    			Exit?
    	EndSwitch?
    WEnd?
    Alles anzeigen
  • Ordner als Laufwerk und Laufwerk umbenen

    • Greek
    • 25. Dezember 2009 um 20:21
    [autoit]

    DriveSetLabel

    [/autoit]

    und

    [autoit]

    _MapDirectory('M:', @WorkingDir)
    Sleep(10000)
    _UnMapDirectory('M:')

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

    Func _MapDirectory($Drive, $Path)
    ;funkey Dec, 24, 2009
    $cmd = 'subst ' & $Drive & ' "' & $Path & '"'
    Run(@ComSpec & " /c " & $cmd, "", @SW_HIDE)
    EndFunc ;==>_MapDirectory

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

    Func _UnMapDirectory($Drive)
    ;funkey Dec, 24, 2009
    $cmd = 'subst ' & $Drive & ' /D'
    Run(@ComSpec & " /c " & $cmd, "", @SW_HIDE)
    EndFunc ;==>_UnMapDirectory

    [/autoit]
  • GDI+ Image Rotator and Saver

    • Greek
    • 24. Dezember 2009 um 15:37
    Zitat von UEZ

    Meinst du dein Programm?

    Bei meinem Programm werden mache Bilder gestreckt angezeigt. Ich weiß nicht warum!

    Jetzt wo du es sagt, es sind genau die selben Bilder bei deinen sowohl meins als auch deins nicht geht, bzw. Fehler enthalten, sehr komisch.

  • GDIPlus Größe ändern?

    • Greek
    • 23. Dezember 2009 um 21:32

    Nachträglich ändern?

    Du musst es neumalen und die Koordinaten speichern, die dann immer mit GUIRegisterMsg paint event neu malen.

    Spoiler anzeigen
    [autoit]

    #include <GuiConstantsEx.au3>
    #include <GDIPlus.au3>

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

    $kordX=10
    $kordY=10
    $kordW=300
    $kordH=300

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

    $hGUI = GUICreate("GDI+", 320, 320)
    $hWnd = WinGetHandle("GDI+")
    GUISetState()

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

    GUIRegisterMsg(0x000F,"wm_paint")

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

    _GDIPlus_Startup()
    $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hWnd)
    $hPen = _GDIPlus_PenCreate(0xFFFF0000)
    $Radierer = _GDIPlus_PenCreate(0xFFE2E2E2)
    _GDIPlus_GraphicsDrawRect($hGraphic, 10, 10, 300, 300, $hPen)

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

    For $i=1 To 20 Step +1
    $kordX+=3
    $kordY+=3
    $kordW-=3*2
    $kordH-=3*2
    _GDIPlus_GraphicsDrawRect($hGraphic, $kordX-3, $kordY-3, $kordW+3*2, $kordH+3*2, $Radierer)
    _GDIPlus_GraphicsDrawRect($hGraphic, $kordX, $kordY, $kordW, $kordH, $hPen)
    Sleep( 50 )
    Next

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

    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE

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

    _GDIPlus_PenDispose($hPen)
    _GDIPlus_PenDispose($Radierer)
    _GDIPlus_GraphicsDispose($hGraphic)
    _GDIPlus_Shutdown()

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

    Func wm_paint()
    _GDIPlus_GraphicsDrawRect($hGraphic, $kordX, $kordY, $kordW, $kordH, $hPen)
    EndFunc

    [/autoit]
  • GDI+ Image Rotator and Saver

    • Greek
    • 23. Dezember 2009 um 20:06

    Cooles Script, hatte mich daran auch schonmal versucht:

    Spoiler anzeigen
    [autoit]

    #include <GDIPlus.au3>
    #include <ScreenCapture.au3>
    #include <WinAPI.au3>

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

    _Rotate90(@WindowsDir&"\Angler.bmp",@ScriptDir&"\new.bmp")

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

    Func _Rotate90($ZielImage,$ZielPfad)
    _GDIPlus_Startup()

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

    $hImage2 = _GDIPlus_BitmapCreateFromFile($ZielImage)
    $Width = _GDIPlus_ImageGetWidth($hImage2)
    $Height = _GDIPlus_ImageGetHeight($hImage2)
    $hBitmap1 = _ScreenCapture_Capture("",0,0,$height,$width)
    $hImage1 = _GDIPlus_BitmapCreateFromHBITMAP($hBitmap1)
    $hGraphic = _GDIPlus_ImageGetGraphicsContext($hImage1)

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

    $hMatrix = _GDIPlus_MatrixCreate()
    _GDIPlus_MatrixTranslate($hMatrix,$height*2,-$width)
    _GDIPlus_MatrixRotate($hMatrix, 90, "False")
    _GDIPlus_GraphicsSetTransform($hGraphic, $hMatrix)
    _GDIPlus_GraphicsDrawImage($hGraphic, $hImage2, $width, $height)

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

    $result = _GDIPlus_ImageSaveToFile($hImage1, $ZielPfad)

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

    _GDIPlus_MatrixDispose($hMatrix)
    _GDIPlus_ImageDispose($hImage1)
    _GDIPlus_ImageDispose($hImage2)
    _WinAPI_DeleteObject($hBitmap1)
    _GDIPlus_GraphicsDispose($hGraphic)
    _GDIPlus_Shutdown()
    Return $result
    EndFunc

    [/autoit]

    Aber leider geht das komischerweise nicht bei allen Bildern.

    Nützliches Script, danke ;)

  • Abkürzungen in SciTE verwalten

    • Greek
    • 21. Dezember 2009 um 12:44

    Bei mir geht es garnicht mehr richtig seit der neuen AutoIt Version, werden immer ? oder sonstige komische Zeichen ans Ende jeder Linie geschrieben

    #include <GUIConstantsEx.au3>粒
    #include <WindowsConstants.au3>

    $MainGUI = GUICreate("",400,300,-1,-1)�
    GUISetState()

    While 1
    $msg = GUIGetMsg()
    Switch $msg�
    Case $GUI_EVENT_CLOSE
    Exit
    EndSwitch⛤
    WEndࡠ


    Bei Case $GUI_EVENT_CLOSE stimmts. :huh:

  • Endlosschleife abbrechen ?

    • Greek
    • 29. November 2009 um 11:25

    Schleifen mit einem Button beenden funktioniert nie so richtig...

    Mit Timern kannst du es so machen:

    Spoiler anzeigen
    [autoit]

    #include <ButtonConstants.au3>
    #include <ComboConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>

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

    Global $go = True

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

    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("The Way to AfK", 283, 83, 192, 124, -1, BitOR($WS_EX_TOOLWINDOW, $WS_EX_TOPMOST, $WS_EX_WINDOWEDGE))
    $Label1 = GUICtrlCreateLabel("Client:", 8, 8, 40, 17)
    $Combo1 = GUICtrlCreateCombo("", 48, 8, 145, 25)
    $Label2 = GUICtrlCreateLabel("", 8, 48, 4, 4)
    $Radio1 = GUICtrlCreateRadio("Person 1", 208, 8, 73, 17)
    $Button1 = GUICtrlCreateButton("Start", 64, 48, 75, 25, $WS_GROUP)
    $Button2 = GUICtrlCreateButton("Beenden", 176, 48, 75, 25, $WS_GROUP)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Button1
    If GUICtrlRead($Radio1) = $Gui_CHECKED Then
    GUICtrlSetData($Button2,"Stop")
    $go=True
    $timer=TimerInit()
    While $go * sleep(10)
    If GUIGetMsg() = $Button2 Then
    $go=False
    GUICtrlSetData($Button2,"Beenden")
    EndIf
    If TimerDiff($timer) > 10000 Then
    ControlSend(GUICtrlRead($Combo1), "", "Edit1", "1")
    $timer=TimerInit()
    EndIf
    WEnd
    Else
    MsgBox(48, "", "Take a tick into the Radiobox!")
    EndIf
    Case $Button2
    ExitLoop
    EndSwitch
    WEnd

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

    msgbox(0,"","Hier gehts weiter")

    [/autoit]

    Oder AdlibEnable, aber das dann hängt das GUI, ist alles nicht so das perfekt, was besseres hab ich dazu noch nicht gefunden.

  • Doppelgeburtstag

    • Greek
    • 28. November 2009 um 13:29

    Alles gute euch beiden :)

  • GUI_ONTOP

    • Greek
    • 27. November 2009 um 17:07

    Cool danke,

    müsste man vieleicht mal in die Hilfe bei Remarks/Bemerkungen schreiben.

  • Lottozahlen vergleichen

    • Greek
    • 26. November 2009 um 21:23
    [autoit]

    $fileread = FileRead("lotto.txt")
    If StringRegExp($fileread,"10.*?12.*?18.*?24.*?43.*?44") Then
    MsgBox(0,"6 Richtige!", "Du hast 6 Richtige!!")
    Else
    MsgBox(0,"Falsch", "Vieleicht beim nächsten mal...")
    EndIf

    [/autoit]
  • CPU Auslastung

    • Greek
    • 26. November 2009 um 18:37

    Hier auch noch eine :

    Spoiler anzeigen
    [autoit]

    $objRefresher = ObjCreate("WbemScripting.SWbemRefresher")

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

    $objWMIService = ObjGet("winmgmts:\\localhost\root\CIMV2")

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

    $objRefreshableItem = $objRefresher.AddEnum($objWMIService , "Win32_PerfFormattedData_PerfOS_Processor")

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

    $objRefresher.Refresh

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

    If IsObj($objRefreshableItem) Then
    $i = 0
    For $objItem In $objRefreshableItem.ObjectSet
    $i += 1
    Next
    EndIf
    Global $aCPU[$i]

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

    While 1

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

    $objRefresher.Refresh
    If IsObj($objRefreshableItem) Then
    $i = 0
    For $objItem In $objRefreshableItem.ObjectSet
    $aCPU[$i] = $objItem.PercentProcessorTime
    $i += 1
    Next
    EndIf
    ConsoleWrite("============" & @CRLF)
    For $i = 0 To UBound($aCPU)-2
    ConsoleWrite("Core "&$i+1&": "&$aCPU[$i] & @CRLF)
    Next
    ConsoleWrite("Gesamt: "&$aCPU[UBound($aCPU)-1] & @CRLF)
    Sleep(500)
    WEnd

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

    Func OnAutoItExit()
    $objRefresher.DeleteAll
    EndFunc

    [/autoit]
  • Pong in GDI+

    • Greek
    • 17. November 2009 um 20:27
    Zitat von UEZ

    Greek: nice Code. Würde Doublebuffering nicht den ganzen Ablauf "flüssiger" machen? ;)

    Marthog: Kannst du mir erklären, warum AutoIt für Pong nicht geeignet ist :?:

    UEZ

    Ja, aber da das mein erstes GDI+ Projekt damals war, hatte ich das natürlich noch nicht mit drin ;) ,

    und alles umzuschreiben hatte ich bis jetzt noch keine Lust^^

    Ich werde am demnächst Operiert und muss 1 Woche im Krankenhaus liegen, hab mir extra ein Netbook dafür gekauft, denk mal in der Zeit werd ich das nochmal umschreiben.

  • Regular Expression

    • Greek
    • 17. November 2009 um 20:08

    Teste doch öfter, wenn man nur einmal testet sind die Werte meistens falsch,

    [autoit]

    Global $StandStringDiff = 0, $StringRegExpDiff = 0

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

    $string = '"Z:\BRAN\BRAN\Docfile\BRAN29-58\BRAN52\BRAN52d039r1.zip"-d "Z:\BRAN\BRAN\Docfile\BRAN29-58\BRAN52\"' & @CRLF & _
    '"A:\BRAN\BRAN\Docfile\BRAN29-58\BRAN52\BRAN52d039r1.zip" -d"Y:\BRAN\BRAN\Docfile\BRAN29-58\BRAN52\"' & @CRLF & _
    '"B:\BRAN\BRAN\Docfile\BRAN29-58\BRAN52\BRAN52d039r1.zip"-d"F\BRAN\BRAN\Docfile\BRAN29-58\BRAN52\"' & @CRLF & _
    '"C:\BRAN\BRAN\Docfile\BRAN29-58\BRAN52\BRAN52d039r1.zip" -d "G:\BRAN\BRAN\Docfile\BRAN29-58\BRAN52\"' & @CRLF & _
    '"D:\BRAN\BRAN\Docfile\BRAN29-58\BRAN52\BRAN52d039r1.zip" -d "T:\BRAN\BRAN\Docfile\BRAN29-58\BRAN52\"' & @CRLF & _
    '"E:\BRAN\BRAN\Docfile\BRAN29-58\BRAN52\BRAN52d039r1.zip"-d"G:\BRAN\BRAN\Docfile\BRAN29-58\BRAN52\"'

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

    For $j=1 To 100
    $iTimer = TimerInit()
    $a1 = StringSplit($string, @CRLF, 3)
    Local $aPath[UBound($a1)]
    For $i = 0 To UBound($a1) -1
    $aPath[$i] = stringmid($a1[$i],2,stringinstr($a1[$i],".zip")-2)& ".zip";StringStripWS(Stringtrimleft($aTmp[0],1), 1) & ".zip"
    Next
    $StandStringDiff += TimerDiff($iTimer)
    Next

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

    For $j=1 To 100
    $iTimer = TimerInit()
    Local $aOut = StringRegExp($string, '"(.+?)".+', 3)
    $StringRegExpDiff += TimerDiff($iTimer)
    Next

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

    MsgBox(0,"Speedtest", "StringRegExp Variante hat: "&$StringRegExpDiff/100&" Standart String Funktionen: "&$StandStringDiff/100)

    [/autoit]

    Wenn du es hier umdrehst bleiben die Werte trotzdem gleich.

    Gruss Greek

  • Tastatur und Maus während der Installation sperren ?

    • Greek
    • 16. November 2009 um 19:44

    jup :

    Spoiler anzeigen
    [autoit]

    _MiniGUI("Hinweis", "Bitte warten Sie bis die Programme installiert sind. Die Tastatur und Maus sind solange gesperrt!", 1000, 0x006000, 0xFFFFFF)

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

    Blockinput(1);Sperren Tastatur und Maus
    ;~ Angang der Installation
    ;~ MsgBox(0, "CAD-Installation", "Installation PlotFlow", 3)
    ;~ ShellExecuteWait("C:\install\PlotFlow.exe")
    ;~ MsgBox(0, "CAD-Installation", "Installation Sikla", 3)
    ;~ ShellExecuteWait("C:\install\Sikla.exe")
    ;~ Ende der Installation

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

    Sleep ( 3000 )

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

    Blockinput(0);Entsperren Tastatur und Maus

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

    Do
    WinSetTrans("MINI_GUI", "", $MINI_GUI_Transwert)
    Sleep(10)
    $MINI_GUI_Transwert = $MINI_GUI_Transwert - 1
    Until $MINI_GUI_Transwert = 0
    GUIDelete($MINI_GUI)

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

    MsgBox(0,"Status der CAD-Installation","Folgende Programme wurden erfolgreich installiert:"&@CRLF&"-------------------------------------------------------------"&@CRLF&"PlotFlow"&@CRLF&"Sikla")

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

    Func _MiniGUI($Titel, $Text, $Wait, $Color1, $Color2)
    Global $MINI_GUI_Transwert = 255
    $MINI_GUI_dif = 0

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

    ;~ $MINI_GUI = GUICreate("MINI_GUI", 250, 200, @DesktopWidth - 270, @DesktopHeight, 0x80000000, 0x00000080)
    $MINI_GUI = GUICreate("MINI_GUI", 250, 200, @DesktopWidth/2 - 0, @DesktopHeight/2, 0x80000000, 0x00000080); Hier anpassen

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

    GUISetState(@SW_SHOW, $MINI_GUI)
    GUISetBkColor($Color1, $MINI_GUI)

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

    $MINI_GUI_Titel = GUICtrlCreateLabel($Titel, 50, 20, 150)
    GUICtrlSetFont($MINI_GUI_Titel, 16)
    GUICtrlSetColor($MINI_GUI_Titel, $Color2)

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

    $MINI_GUI_Text = GUICtrlCreateLabel($Text, 50, 65)
    GUICtrlSetColor($MINI_GUI_Text, $Color2)

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

    $MINI_GUI_Line1 = GUICtrlCreateLabel ("", 0, 0, 250, 1)
    GUICtrlSetColor($MINI_GUI_Line1, $Color2)
    GUICtrlSetBkColor($MINI_GUI_Line1, $Color2)

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

    $MINI_GUI_Line2 = GUICtrlCreateLabel ("", 0, 0, 1, 200)
    GUICtrlSetColor($MINI_GUI_Line2, $Color2)
    GUICtrlSetBkColor($MINI_GUI_Line2, $Color2)

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

    $MINI_GUI_Line3 = GUICtrlCreateLabel ("", 249, 0, 1, 200)
    GUICtrlSetColor($MINI_GUI_Line3, $Color2)
    GUICtrlSetBkColor($MINI_GUI_Line3, $Color2)

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

    $MINI_GUI_LineMiddle = GUICtrlCreateLabel ("", 25, 50, 200, 3)
    GUICtrlSetColor($MINI_GUI_LineMiddle, $Color2)
    GUICtrlSetBkColor($MINI_GUI_LineMiddle, $Color2)

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

    ;~ WinMove ( "MINI_GUI", "", @DesktopWidth - 270, @DesktopHeight - 200, 250, 200, 5)
    WinMove ( "MINI_GUI", "", @DesktopWidth/2 - 0, @DesktopHeight/2 - 200, 250, 200, 5) ; Hier anpassen, (nochmal das selbe rein)

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

    $MINI_GUI_begin = TimerInit()

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

    Do
    $MINI_GUI_dif = TimerDiff($MINI_GUI_begin)
    $aMousePos1 = MouseGetPos()
    $aWinPos1 = WinGetPos(WinGetTitle($MINI_GUI))
    If $MINI_GUI_dif > $Wait/5 And $MINI_GUI_dif < $Wait/4 Then
    Do
    WinSetTrans("MINI_GUI", "", $MINI_GUI_Transwert)
    Sleep(10)
    $MINI_GUI_Transwert = $MINI_GUI_Transwert - 1
    Until $MINI_GUI_Transwert = 200
    EndIf
    If $aMousePos1[0] > $aWinPos1[0] AND $aMousePos1[0] < $aWinPos1[0] + 250 AND $aMousePos1[1] > $aWinPos1[1] AND $aMousePos1[1] < $aWinPos1[1] + 200 Then
    $MINI_GUI_begin = TimerInit()
    If $MINI_GUI_Transwert < 255 Then
    Do
    WinSetTrans("MINI_GUI", "", $MINI_GUI_Transwert)
    Sleep(10)
    $MINI_GUI_Transwert = $MINI_GUI_Transwert + 1
    Until $MINI_GUI_Transwert = 255
    EndIf
    EndIf
    Until $MINI_GUI_dif > $Wait

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

    EndFunc

    [/autoit]
  • Pong in GDI+

    • Greek
    • 16. November 2009 um 19:02

    Hiho,

    hab mal vor langer langer Zeit versucht Pong zu machen, hab gerade mal paar Bugs behoben damit ichs auchmal posten kann :)

    nur Multiplayer bis jetzt:

    Spoiler anzeigen
    [autoit]

    #include <GDIPlus.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #include <Misc.au3>

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

    HotKeySet("{ESC}", "_ende")

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

    _GDIPlus_Startup()

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

    ; Variablen

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

    Global $Difficult = 1.7

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

    Global $begin, $Firstball=True
    Global $Speed = 1.0, $SpeedBalken = 10
    Global $pointsleft = 0, $pointsright = 0
    Global $BewegungSenkrecht = Random(5, 7, 1), $BewegungWaagerecht = Random(5, 7, 1)
    Global $ballpos1 = @DesktopWidth / 2, $ballpos2 = @DesktopHeight / 2 - 50
    Global $Strichpos1 = @DesktopHeight / 2 - 70, $Strichpos2 = @DesktopHeight / 2 + 70
    Global $RStrichpos1 = @DesktopHeight / 2 - 70, $RStrichpos2 = @DesktopHeight / 2 + 70
    Global $Titel = "Pong", $Rahmenbreite = 10

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

    ; GUI
    Global $hGUI = GUICreate($Titel, @DesktopWidth, @DesktopHeight, 0, 0, $WS_POPUP, BitOR($WS_EX_TOPMOST, 0x0))
    Global $hwnd = WinGetHandle($Titel)
    GUISetBkColor(0x0)
    $Willkommen = GUICtrlCreateLabel("Willkommen bei Pong made by Greek", @DesktopWidth / 4, @DesktopHeight / 2 - 150, 600, 200)
    GUICtrlSetColor(-1, 0xFFFFFF)
    GUICtrlSetFont(-1, 40)
    Global $Spielstand = GUICtrlCreateLabel("0:0", @DesktopWidth / 2, @DesktopHeight / 15, 200, 100)
    GUICtrlSetColor(-1, 0xFFFFFF)
    GUICtrlSetFont(-1, 40)
    GUICtrlSetState(-1, $GUI_HIDE)
    $LevelL=GUICtrlCreateLabel ( "Los gehts!!", @DesktopWidth/2-100, @DesktopHeight/2-100, 300, 200 )
    GUICtrlSetColor(-1, 0xFFFFFF)
    GUICtrlSetFont(-1, 40)
    GUICtrlSetState(-1, $GUI_HIDE)

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

    Local $accel[4][2] = [["w"],["s"],["{UP}"],["{DOWN}"]]
    GUISetAccelerators($accel)

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

    GUISetState(@SW_SHOW)

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

    Do
    Sleep(10)
    Until _IsPressed("0D") Or _IsPressed("20")

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

    GUICtrlSetState($Willkommen, $GUI_HIDE)
    GUICtrlSetState($LevelL, $GUI_SHOW)
    Sleep ( 1500 )
    GUICtrlSetState($LevelL, $GUI_HIDE)
    GUICtrlSetState($Spielstand, $GUI_SHOW)

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

    Global $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hwnd)
    Global $hPenRahmen = _GDIPlus_PenCreate(0xFF0000FF, 15, 2)
    Global $hPen = _GDIPlus_PenCreate(0xFFFFFFFF, 15, 2)
    Global $hpen_Del = _GDIPlus_PenCreate(0xFF000000, 15, 2)
    _GDIPlus_GraphicsDrawLine($hGraphic, 100, $Strichpos1, 100, $Strichpos2, $hPen)
    _GDIPlus_GraphicsDrawLine($hGraphic, @DesktopWidth - 100, $Strichpos1, @DesktopWidth - 100, $Strichpos2, $hPen)
    _DrawRahmen()

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

    Sleep ( 500 )

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

    AdlibEnable('_Zyklus', 10)

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

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

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

    Func _ende()
    _GDIPlus_GraphicsDispose($hGraphic)
    _GDIPlus_PenDispose($hPen)
    _GDIPlus_PenDispose($hPenRahmen)
    _GDIPlus_PenDispose($hpen_Del)
    _GDIPlus_Shutdown()
    Exit
    EndFunc ;==>_ende

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

    Func Onautoitexit()
    _GDIPlus_GraphicsDispose($hGraphic)
    _GDIPlus_PenDispose($hPen)
    _GDIPlus_PenDispose($hPenRahmen)
    _GDIPlus_PenDispose($hpen_Del)
    _GDIPlus_Shutdown()
    Exit
    EndFunc ;==>Onautoitexit

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

    Func _DrawRahmen()
    _GDIPlus_GraphicsDrawLine($hGraphic, $Rahmenbreite / 2, 0, $Rahmenbreite / 2, @DesktopHeight, $hPenRahmen)
    _GDIPlus_GraphicsDrawLine($hGraphic, 0, $Rahmenbreite / 2, @DesktopWidth, $Rahmenbreite / 2, $hPenRahmen)
    _GDIPlus_GraphicsDrawLine($hGraphic, @DesktopWidth - $Rahmenbreite / 2, 0, @DesktopWidth - $Rahmenbreite / 2, @DesktopHeight, $hPenRahmen)
    _GDIPlus_GraphicsDrawLine($hGraphic, 0, @DesktopHeight - $Rahmenbreite / 2, @DesktopWidth, @DesktopHeight - $Rahmenbreite / 2, $hPenRahmen)
    $PenColor=_GDIPlus_PenGetColor ( $hPenRahmen )
    If $PenColor=0xFF0000FF Then
    _GDIPlus_PenSetColor( $hPenRahmen, 0xFFFF0000 )
    ElseIf $PenColor=0xFFFF0000 Then
    _GDIPlus_PenSetColor( $hPenRahmen, 0xFF00FF00 )
    ElseIf $PenColor=0xFF00FF00 Then
    _GDIPlus_PenSetColor ( $hPenRahmen, 0xFFFFFF00 )
    ElseIf $PenColor=0xFFFFFF00 Then
    _GDIPlus_PenSetColor ( $hPenRahmen, 0xFF0000FF )
    EndIf
    EndFunc ;==>_DrawRahmen
    Sleep( 500 )
    $begin=TimerInit()
    Func _Zyklus()
    If _IsPressed('57') Then
    _hoch()
    EndIf
    If _IsPressed('53') Then
    _runter()
    EndIf
    If _IsPressed('26') Then
    _hoch2()
    EndIf
    If _IsPressed('28') Then
    _runter2()
    EndIf
    _ball()
    _DetectCollision()
    _ScoreUpdate()
    EndFunc ;==>_Zyklus

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

    Func _hoch()
    If $Strichpos1 >= 25 Then
    _GDIPlus_GraphicsDrawLine($hGraphic, 100, $Strichpos2 - $SpeedBalken, 100, $Strichpos2, $hpen_Del)
    $Strichpos1 -= $SpeedBalken
    $Strichpos2 -= $SpeedBalken
    _GDIPlus_GraphicsDrawLine($hGraphic, 100, $Strichpos1, 100, $Strichpos2, $hPen)
    EndIf
    EndFunc ;==>_hoch

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

    Func _runter()
    If $Strichpos2 <= @DesktopHeight - 25 Then
    _GDIPlus_GraphicsDrawLine($hGraphic, 100, $Strichpos1, 100, $Strichpos1 + $SpeedBalken, $hpen_Del)
    $Strichpos1 += $SpeedBalken
    $Strichpos2 += $SpeedBalken
    _GDIPlus_GraphicsDrawLine($hGraphic, 100, $Strichpos1, 100, $Strichpos2, $hPen)
    EndIf
    EndFunc ;==>_runter

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

    Func _hoch2()
    If $RStrichpos1 >= 25 Then
    _GDIPlus_GraphicsDrawLine($hGraphic, @DesktopWidth - 100, $RStrichpos2 - $SpeedBalken, @DesktopWidth - 100, $RStrichpos2, $hpen_Del)
    $RStrichpos1 -= $SpeedBalken
    $RStrichpos2 -= $SpeedBalken
    _GDIPlus_GraphicsDrawLine($hGraphic, @DesktopWidth - 100, $RStrichpos1, @DesktopWidth - 100, $RStrichpos2, $hPen)
    EndIf
    EndFunc ;==>_hoch2

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

    Func _runter2()
    If $RStrichpos2 <= @DesktopHeight - 25 Then
    _GDIPlus_GraphicsDrawLine($hGraphic, @DesktopWidth - 100, $RStrichpos1, @DesktopWidth - 100, $RStrichpos1 + $SpeedBalken, $hpen_Del)
    $RStrichpos1 += $SpeedBalken
    $RStrichpos2 += $SpeedBalken
    _GDIPlus_GraphicsDrawLine($hGraphic, @DesktopWidth - 100, $RStrichpos1, @DesktopWidth - 100, $RStrichpos2, $hPen)
    EndIf
    EndFunc ;==>_runter2

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

    Func _ball()
    $ball = _GDIPlus_GraphicsDrawArc($hGraphic, $ballpos1, $ballpos2, 15, 15, 180, 360, $hpen_Del)
    If $Firstball Then $Speed=1.0
    $ballpos2 += $BewegungSenkrecht * $Speed
    $ballpos1 += $BewegungWaagerecht * $Speed
    $ball = _GDIPlus_GraphicsDrawArc($hGraphic, $ballpos1, $ballpos2, 15, 15, 180, 360, $hPen)
    $Firstball = False
    EndFunc ;==>_ball

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

    Func _DetectCollision()
    If $ballpos1 <= 120 Then
    If ($ballpos2 >= $Strichpos1) And ($ballpos2 <= $Strichpos2) Then ; kollision
    _RedrawLeftPlayer()
    _RedrawRightPlayer()
    $Speed=Random( 1, $Difficult )
    If $BewegungWaagerecht < 0 Then
    $BewegungWaagerecht = Random(5, 7, 1)
    _GDIPlus_GraphicsDrawLine($hGraphic, 100, $Strichpos1, 100, $Strichpos2, $hPen)
    EndIf
    ElseIf $ballpos1 < 100 Then
    setzeausgang(1)
    Sleep(1500)
    _DrawRahmen()
    $Firstball=True
    EndIf
    EndIf
    If $ballpos1 >= @DesktopWidth - 135 Then
    If ($ballpos2 >= $RStrichpos1) And ($ballpos2 <= $RStrichpos2) Then ; kollision
    _RedrawLeftPlayer()
    _RedrawRightPlayer()
    $Speed=Random( 1, $Difficult )
    If $BewegungWaagerecht > 0 Then
    $BewegungWaagerecht = Random(-7, -5, 1)
    _GDIPlus_GraphicsDrawLine($hGraphic, @DesktopWidth - 100, $RStrichpos1, @DesktopWidth - 100, $RStrichpos2, $hPen)
    EndIf
    ElseIf $ballpos1 > @DesktopWidth - 100 Then
    setzeausgang(0)
    Sleep(1500)
    _DrawRahmen()
    $Firstball=True
    EndIf
    EndIf

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

    If $ballpos1 >= @DesktopWidth - 40 And $BewegungWaagerecht > 0 Then
    $BewegungWaagerecht = Random(-7, -5, 1)
    _DrawRahmen()
    EndIf
    If $ballpos1 < 30 And $BewegungWaagerecht < 0 Then
    $BewegungWaagerecht = Random(5, 7, 1)
    _DrawRahmen()
    EndIf
    If $ballpos2 >= @DesktopHeight - 40 And $BewegungSenkrecht > 0 Then
    $BewegungSenkrecht = Random(-7, -5, 1)
    _DrawRahmen()
    EndIf
    If $ballpos2 < 30 And $BewegungSenkrecht < 0 Then
    $BewegungSenkrecht = Random(5, 7, 1)
    _DrawRahmen()
    EndIf

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

    EndFunc ;==>_DetectCollision

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

    Func setzeausgang($points)
    If ($points < 1) Or ($points > 0) Then SetError(1)
    Switch $points
    Case 0
    $pointsleft += 1
    GUICtrlSetData($Spielstand, $pointsleft & ':' & $pointsright)
    Case 1
    $pointsright += 1
    GUICtrlSetData($Spielstand, $pointsleft & ':' & $pointsright)
    EndSwitch

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

    ;Ball und Schläger übermalen
    _GDIPlus_GraphicsDrawArc($hGraphic, $ballpos1, $ballpos2, 15, 15, 180, 360, $hpen_Del)
    _GDIPlus_GraphicsDrawLine($hGraphic, @DesktopWidth - 100, 13, @DesktopWidth - 100, @DesktopHeight - 13, $hpen_Del)
    _GDIPlus_GraphicsDrawLine($hGraphic, 100, 13, 100, @DesktopHeight - 13, $hpen_Del)

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

    ;Ball läuft zufallsweise in eine der 4 Richtungen
    If Random(0, 1, 1) Then
    $BewegungSenkrecht = Random(1, 11, 1)
    Else
    $BewegungSenkrecht = Random(-11, -1, 1)
    EndIf
    If Random(0, 1, 1) Then
    $BewegungWaagerecht = Random(1, 11, 1)
    Else
    $BewegungWaagerecht = Random(-11, -1, 1)
    EndIf

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

    $ballpos1 = @DesktopWidth / 2
    $ballpos2 = @DesktopHeight / 2 - 50
    $Strichpos1 = @DesktopHeight / 2 - 70
    $Strichpos2 = @DesktopHeight / 2 + 70
    $RStrichpos1 = @DesktopHeight / 2 - 70
    $RStrichpos2 = @DesktopHeight / 2 + 70

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

    $ball = _GDIPlus_GraphicsDrawArc($hGraphic, $ballpos1, $ballpos2, 15, 15, 180, 360, $hPen)
    _GDIPlus_GraphicsDrawLine($hGraphic, 100, $Strichpos1, 100, $Strichpos2, $hPen)
    _GDIPlus_GraphicsDrawLine($hGraphic, @DesktopWidth - 100, $Strichpos1, @DesktopWidth - 100, $Strichpos2, $hPen)
    EndFunc ;==>setzeausgang

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

    Func _ScoreUpdate()
    $dif=TimerDiff( $begin )
    If $dif>=100 Then
    GUICtrlSetData($Spielstand, $pointsleft & ':' & $pointsright)
    $begin=TimerInit()
    EndIf
    EndFunc

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

    Func _RedrawRightPlayer()
    _GDIPlus_GraphicsDrawLine($hGraphic, 100, $Strichpos2 - $SpeedBalken, 100, $Strichpos2, $hpen_Del)
    _GDIPlus_GraphicsDrawLine($hGraphic, 100, $Strichpos1, 100, $Strichpos2, $hPen)
    EndFunc

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

    Func _RedrawLeftPlayer()
    _GDIPlus_GraphicsDrawLine($hGraphic, @DesktopWidth - 100, $RStrichpos2 - $SpeedBalken, @DesktopWidth - 100, $RStrichpos2, $hpen_Del)
    _GDIPlus_GraphicsDrawLine($hGraphic, @DesktopWidth - 100, $RStrichpos1, @DesktopWidth - 100, $RStrichpos2, $hPen)
    EndFunc

    [/autoit]

    - Leertaste starten
    - W und S den linken Spieler lenken
    - Pfeil hoch und Pfeil Runter rechten Spieler lenken
    - ESC beenden

    Diffcult ist auf 1.7 , ist schon recht schwer so ^^

    Hoffe es läuft einigermassen Bugfrei, war damals mein erstest Projekt mit GDI+.

    Gruss Greek

  • Tastatur und Maus während der Installation sperren ?

    • Greek
    • 16. November 2009 um 18:47

    Da musst du die UDF anpassen,

    hab dir die Zeilen makiert,

    Spoiler anzeigen
    [autoit]

    _MiniGUI("Hallo Welt", "Hallo Welt!", 10000, 0x000000, 0xFFFFFF)

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

    Func _MiniGUI($Titel, $Text, $Wait, $Color1, $Color2)
    $MINI_GUI_Transwert = 255
    $MINI_GUI_dif = 0

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

    $MINI_GUI = GUICreate("MINI_GUI", 250, 200, @DesktopWidth/2 - 270, @DesktopHeight/2, 0x80000000, 0x00000080); Hier anpassen
    GUISetState(@SW_SHOW, $MINI_GUI)
    GUISetBkColor($Color1, $MINI_GUI)

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

    $MINI_GUI_Titel = GUICtrlCreateLabel($Titel, 50, 20, 150)
    GUICtrlSetFont($MINI_GUI_Titel, 16)
    GUICtrlSetColor($MINI_GUI_Titel, $Color2)

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

    $MINI_GUI_Text = GUICtrlCreateLabel($Text, 50, 65)
    GUICtrlSetColor($MINI_GUI_Text, $Color2)

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

    $MINI_GUI_Line1 = GUICtrlCreateLabel ("", 0, 0, 250, 1)
    GUICtrlSetColor($MINI_GUI_Line1, $Color2)
    GUICtrlSetBkColor($MINI_GUI_Line1, $Color2)

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

    $MINI_GUI_Line2 = GUICtrlCreateLabel ("", 0, 0, 1, 200)
    GUICtrlSetColor($MINI_GUI_Line2, $Color2)
    GUICtrlSetBkColor($MINI_GUI_Line2, $Color2)

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

    $MINI_GUI_Line3 = GUICtrlCreateLabel ("", 249, 0, 1, 200)
    GUICtrlSetColor($MINI_GUI_Line3, $Color2)
    GUICtrlSetBkColor($MINI_GUI_Line3, $Color2)

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

    $MINI_GUI_LineMiddle = GUICtrlCreateLabel ("", 25, 50, 200, 3)
    GUICtrlSetColor($MINI_GUI_LineMiddle, $Color2)
    GUICtrlSetBkColor($MINI_GUI_LineMiddle, $Color2)

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

    WinMove ( "MINI_GUI", "", @DesktopWidth/2 - 270, @DesktopHeight/2 - 200, 250, 200, 5) ; Hier anpassen, (nochmal das selbe rein)

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

    $MINI_GUI_begin = TimerInit()

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

    Do
    $MINI_GUI_dif = TimerDiff($MINI_GUI_begin)
    $aMousePos1 = MouseGetPos()
    $aWinPos1 = WinGetPos(WinGetTitle($MINI_GUI))
    If $MINI_GUI_dif > $Wait/5 And $MINI_GUI_dif < $Wait/4 Then
    Do
    WinSetTrans("MINI_GUI", "", $MINI_GUI_Transwert)
    Sleep(10)
    $MINI_GUI_Transwert = $MINI_GUI_Transwert - 1
    Until $MINI_GUI_Transwert = 200
    EndIf
    If $aMousePos1[0] > $aWinPos1[0] AND $aMousePos1[0] < $aWinPos1[0] + 250 AND $aMousePos1[1] > $aWinPos1[1] AND $aMousePos1[1] < $aWinPos1[1] + 200 Then
    $MINI_GUI_begin = TimerInit()
    If $MINI_GUI_Transwert < 255 Then
    Do
    WinSetTrans("MINI_GUI", "", $MINI_GUI_Transwert)
    Sleep(10)
    $MINI_GUI_Transwert = $MINI_GUI_Transwert + 1
    Until $MINI_GUI_Transwert = 255
    EndIf
    EndIf
    Until $MINI_GUI_dif > $Wait

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

    Do
    WinSetTrans("MINI_GUI", "", $MINI_GUI_Transwert)
    Sleep(10)
    $MINI_GUI_Transwert = $MINI_GUI_Transwert - 1
    Until $MINI_GUI_Transwert = 0
    GUIDelete($MINI_GUI)
    EndFunc

    [/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™