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

Beiträge von alpines

  • Tetris - kleiner Zeitvertreib für Zwischendurch

    • alpines
    • 31. Juli 2015 um 21:21

    Hallo,

    da ich momentan Spiele für ein Arduino LED-Shield baue (9x14 Matrix) habe ich mal Tetris gescriptet und es so einfach wie möglich gehalten um den Code weitestgehend zu übernehmen.
    Es ist nichts besonderes und spielt sich wie andere Tetris Spiele. Der Code ist schaut grausam aus aber was soll man da machen :rolleyes:

    Steuerung: Pfeiltasten + Space (Drop)

    Tetris
    AutoIt
    #include <GdiPlus.au3>
    #include <Misc.au3>
    
    
    Opt("GUIOnEventMode", 1)
    $hGUI = GUICreate("Tetris", 288, 448, 192, 124)
    GUISetOnEvent(-3, "_Exit")
    
    
    GUISetState(@SW_SHOW)
    
    
    Local $hUser32 = DllOpen("user32.dll")
    _GDIPlus_Startup()
    
    
    $hGraphics = _GDIPlus_GraphicsCreateFromHWND($hGUI)
    _GDIPlus_GraphicsClear($hGraphics)
    
    
    Global $aField[9][14], $aBlock[4][2]
    
    
    Local $aPalette[7] = [_GDIPlus_BrushCreateSolid(0xFF00FF00), _GDIPlus_BrushCreateSolid(0xFFFF0000), _GDIPlus_BrushCreateSolid(0xFFFF4500), _
    					  _GDIPlus_BrushCreateSolid(0xFF0000FF), _GDIPlus_BrushCreateSolid(0xFFFFFF00), _GDIPlus_BrushCreateSolid(0xFF8888FF), _GDIPlus_BrushCreateSolid(0xFFFF00FF)]
    
    
    $aBlock = _GenerateRandomBlock()
    $iCurrColor = @extended
    $iTurn = 0
    
    
    $iScore = 0
    
    
    Local $bLeft, $bRight, $bTurn, $bDown, $bDrop
    
    
    AdlibRegister("_PushTheBlock", 850)
    
    
    While Sleep(30)
    	_GDIPlus_GraphicsClear($hGraphics)
    
    
    	For $x = 0 To 8
    		For $y = 0 To 13
    			If $aField[$x][$y] Then _GDIPlus_GraphicsFillRect($hGraphics, $x * 32, $y * 32, 32, 32, $aPalette[$aField[$x][$y] - 1])
    		Next
    	Next
    
    
    	For $i = 0 To 3
    		_GDIPlus_GraphicsFillRect($hGraphics, $aBlock[$i][0] * 32, $aBlock[$i][1] * 32, 32, 32, $aPalette[$iCurrColor - 1])
    	Next
    
    
    	If _IsPressed("25", $hUser32) and Not $bLeft and Not _Collides($aBlock, -1, 0) Then
    		For $i = 0 To 3
    			$aBlock[$i][0] -= 1
    		Next
    
    
    		$bLeft = True
    	ElseIf _IsPressed("27", $hUser32) and Not $bRight and Not _Collides($aBlock, 1, 0) Then
    		For $i = 0 To 3
    			$aBlock[$i][0] += 1
    		Next
    
    
    		$bRight = True
    	ElseIf _IsPressed("26", $hUser32) and Not $bTurn and $iCurrColor <> 5 Then
    		Switch $iCurrColor - 1
    			Case 0 ;S-Block
    				Switch $iTurn
    					Case 0
    						Local $tmpBlock[4][2] = [[$aBlock[0][0], $aBlock[0][1] - 2], [$aBlock[1][0] - 1, $aBlock[1][1] - 1], [$aBlock[2][0], $aBlock[2][1]], [$aBlock[3][0] - 1, $aBlock[3][1] + 1]]
    
    
    					Case 1
    						Local $tmpBlock[4][2] = [[$aBlock[0][0] + 2, $aBlock[0][1] + 1], [$aBlock[1][0] + 1, $aBlock[1][1]], [$aBlock[2][0], $aBlock[2][1] + 1], [$aBlock[3][0] - 1, $aBlock[3][1]]]
    
    
    					Case 2
    						Local $tmpBlock[4][2] = [[$aBlock[0][0] - 1, $aBlock[0][1] + 1], [$aBlock[1][0], $aBlock[1][1]], [$aBlock[2][0] - 1, $aBlock[2][1] - 1], [$aBlock[3][0], $aBlock[3][1] - 2]]
    
    
    					Case 3
    						Local $tmpBlock[4][2] = [[$aBlock[0][0] - 1, $aBlock[0][1]], [$aBlock[1][0], $aBlock[1][1] + 1], [$aBlock[2][0] + 1, $aBlock[2][1]], [$aBlock[3][0] + 2, $aBlock[3][1] + 1]]
    				EndSwitch
    
    
    			Case 1 ;RS-Block
    				Switch $iTurn
    					Case 0
    						Local $tmpBlock[4][2] = [[$aBlock[0][0] + 1, $aBlock[0][1] - 1], [$aBlock[1][0], $aBlock[1][1]], [$aBlock[2][0] - 1, $aBlock[2][1] - 1], [$aBlock[3][0] - 2, $aBlock[3][1]]]
    
    
    					Case 1
    						Local $tmpBlock[4][2] = [[$aBlock[0][0] + 1, $aBlock[0][1] + 2], [$aBlock[1][0], $aBlock[1][1] + 1], [$aBlock[2][0] + 1, $aBlock[2][1]], [$aBlock[3][0], $aBlock[3][1] - 1]]
    
    
    					Case 2
    						Local $tmpBlock[4][2] = [[$aBlock[0][0] - 2, $aBlock[0][1]], [$aBlock[1][0] - 1, $aBlock[1][1] - 1], [$aBlock[2][0], $aBlock[2][1]], [$aBlock[3][0] + 1, $aBlock[3][1] - 1]]
    
    
    					Case 3
    						Local $tmpBlock[4][2] = [[$aBlock[0][0], $aBlock[0][1] - 1], [$aBlock[1][0] + 1, $aBlock[1][1]], [$aBlock[2][0], $aBlock[2][1] + 1], [$aBlock[3][0] + 1, $aBlock[3][1] + 2]]
    				EndSwitch
    
    
    			Case 2 ;L-Block
    				Switch $iTurn
    					Case 0
    						Local $tmpBlock[4][2] = [[$aBlock[0][0] + 2, $aBlock[0][1] + 1], [$aBlock[1][0] + 1, $aBlock[1][1]], [$aBlock[2][0], $aBlock[2][1] - 1], [$aBlock[3][0] - 1, $aBlock[3][1]]]
    
    
    					Case 1
    						Local $tmpBlock[4][2] = [[$aBlock[0][0] - 1, $aBlock[0][1] + 1], [$aBlock[1][0], $aBlock[1][1]], [$aBlock[2][0] + 1, $aBlock[2][1] - 1], [$aBlock[3][0], $aBlock[3][1] - 2]]
    
    
    					Case 2
    						Local $tmpBlock[4][2] = [[$aBlock[0][0] - 1, $aBlock[0][1]], [$aBlock[1][0], $aBlock[1][1] + 1], [$aBlock[2][0] + 1, $aBlock[2][1] + 2], [$aBlock[3][0] + 2, $aBlock[3][1] + 1]]
    
    
    					Case 3
    						Local $tmpBlock[4][2] = [[$aBlock[0][0], $aBlock[0][1] - 2], [$aBlock[1][0] - 1, $aBlock[1][1] - 1], [$aBlock[2][0] - 2, $aBlock[2][1]], [$aBlock[3][0] - 1, $aBlock[3][1] + 1]]
    				EndSwitch
    
    
    			Case 3 ;RL-Block
    				Switch $iTurn
    					Case 0
    						Local $tmpBlock[4][2] = [[$aBlock[0][0], $aBlock[0][1] - 1], [$aBlock[1][0] - 1, $aBlock[1][1]], [$aBlock[2][0], $aBlock[2][1] + 1], [$aBlock[3][0] + 1, $aBlock[3][1] + 2]]
    
    
    					Case 1
    						Local $tmpBlock[4][2] = [[$aBlock[0][0] + 1, $aBlock[0][1] - 1], [$aBlock[1][0], $aBlock[1][1] - 2], [$aBlock[2][0] - 1, $aBlock[2][1] - 1], [$aBlock[3][0] - 2, $aBlock[3][1]]]
    
    
    					Case 2
    						Local $tmpBlock[4][2] = [[$aBlock[0][0] + 1, $aBlock[0][1] + 2], [$aBlock[1][0] + 2, $aBlock[1][1] + 1], [$aBlock[2][0] + 1, $aBlock[2][1]], [$aBlock[3][0], $aBlock[3][1] - 1]]
    
    
    					Case 3
    						Local $tmpBlock[4][2] = [[$aBlock[0][0] - 2, $aBlock[0][1]], [$aBlock[1][0] - 1, $aBlock[1][1] + 1], [$aBlock[2][0], $aBlock[2][1]], [$aBlock[3][0] + 1, $aBlock[3][1] - 1]]
    				EndSwitch
    
    
    			Case 5 ;I-Block
    				Switch $iTurn
    					Case 0
    						Local $tmpBlock[4][2] = [[$aBlock[0][0] + 1, $aBlock[0][1] - 1], [$aBlock[1][0], $aBlock[1][1]], [$aBlock[2][0] - 1, $aBlock[2][1] + 1], [$aBlock[3][0] - 2, $aBlock[3][1] + 2]]
    
    
    					Case 1
    						Local $tmpBlock[4][2] = [[$aBlock[0][0] + 2, $aBlock[0][1] + 1], [$aBlock[1][0] + 1, $aBlock[1][1]], [$aBlock[2][0], $aBlock[2][1] - 1], [$aBlock[3][0] - 1, $aBlock[3][1] - 2]]
    
    
    					Case 2
    						Local $tmpBlock[4][2] = [[$aBlock[0][0] - 2, $aBlock[0][1] + 2], [$aBlock[1][0] - 1, $aBlock[1][1] + 1], [$aBlock[2][0], $aBlock[2][1]], [$aBlock[3][0] + 1, $aBlock[3][1] - 1]]
    
    
    					Case 3
    						Local $tmpBlock[4][2] = [[$aBlock[0][0] - 1, $aBlock[0][1] - 2], [$aBlock[1][0], $aBlock[1][1] - 1], [$aBlock[2][0] + 1, $aBlock[2][1]], [$aBlock[3][0] + 2, $aBlock[3][1] + 1]]
    				EndSwitch
    
    
    			Case 6 ;T-Block
    				Switch $iTurn
    					Case 0
    						Local $tmpBlock[4][2] = [[$aBlock[0][0] + 1, $aBlock[0][1] - 1], [$aBlock[1][0], $aBlock[1][1]], [$aBlock[2][0] - 1, $aBlock[2][1] - 1], [$aBlock[3][0] - 1, $aBlock[3][1] + 1]]
    
    
    					Case 1
    						Local $tmpBlock[4][2] = [[$aBlock[0][0] + 1, $aBlock[0][1] + 1], [$aBlock[1][0], $aBlock[1][1]], [$aBlock[2][0] + 1, $aBlock[2][1] - 1], [$aBlock[3][0] - 1, $aBlock[3][1] - 1]]
    
    
    					Case 2
    						Local $tmpBlock[4][2] = [[$aBlock[0][0] - 1, $aBlock[0][1] + 1], [$aBlock[1][0], $aBlock[1][1]], [$aBlock[2][0] + 1, $aBlock[2][1] + 1], [$aBlock[3][0] + 1, $aBlock[3][1] -1]]
    
    
    					Case 3
    						Local $tmpBlock[4][2] = [[$aBlock[0][0] - 1, $aBlock[0][1] - 1], [$aBlock[1][0], $aBlock[1][1]], [$aBlock[2][0] - 1, $aBlock[2][1] + 1], [$aBlock[3][0] + 1, $aBlock[3][1] + 1]]
    				EndSwitch
    		EndSwitch
    
    
    		If Not _Collides($tmpBlock, 0, 0) Then
    			$aBlock = $tmpBlock
    			$iTurn = Mod($iTurn + 1, 4)
    		EndIf
    
    
    		$bTurn = True
    	ElseIf _IsPressed("28", $hUser32) and Not $bDown and Not _Collides($aBlock, 0, 1) Then
    		_PushTheBlock()
    
    
    		$bDown = True
    	ElseIf _IsPressed("20", $hUser32) and Not $bDrop Then
    		For $i = 0 To 14
    			If _Collides($aBlock, 0, $i) Then ExitLoop
    		Next
    
    
    		For $x = 0 To $i
    			_PushTheBlock()
    		Next
    
    
    		$bDrop = True
    	EndIf
    
    
    
    
    	If Not _IsPressed("25", $hUser32) Then $bLeft = False
    	If Not _IsPressed("26", $hUser32) Then $bTurn = False
    	If Not _IsPressed("27", $hUser32) Then $bRight = False
    	If Not _IsPressed("28", $hUser32) Then $bDown = False
    	If Not _IsPressed("20", $hUser32) Then $bDrop = False
    WEnd
    
    
    Func _Collides($aBlock, $iIncX, $iIncY)
    	For $i = 0 To 3
    		If $aBlock[$i][0] + $iIncX < 0 or $aBlock[$i][0] + $iIncX > 8 or $aBlock[$i][1] + $iIncY > 13 Then Return 1
    	Next
    
    
    	For $i = 0 To 3
    		If $aField[$aBlock[$i][0] + $iIncX][$aBlock[$i][1] + $iIncY] Then Return 1
    	Next
    EndFunc
    
    
    Func _PushTheBlock()
    	If Not _Collides($aBlock, 0, 1) Then
    		For $i = 0 To 3
    			$aBlock[$i][1] += 1
    		Next
    	Else
    		For $i = 0 To 3
    			$aField[$aBlock[$i][0]][$aBlock[$i][1]] = $iCurrColor
    		Next
    
    
    		$aBlock = _GenerateRandomBlock()
    		$iCurrColor = @extended
    		$iTurn = 0
    
    
    		If _Collides($aBlock, 0, 0) Then
    			MsgBox(48, "Game Over", "Looks like you messed up!" & @CRLF & "Score: " & $iScore)
    			Exit
    		EndIf
    	EndIf
    
    
    	$m = 1
    
    
    	Do
    		Dim $aNewField[9][0] ;Dim nutzen damit alle vorherigen Einträge gelöscht werden.
    
    
    		For $iRow = 0 To 13
    			$m = 1
    
    
    			For $iColumn = 0 To 8
    				$m *= $aField[$iColumn][$iRow]
    			Next
    
    
    			If $m Then
    				For $iRow_ = 0 To 13
    					If $iRow_ = $iRow Then ContinueLoop
    
    
    					ReDim $aNewField[9][UBound($aNewField, 2) + 1]
    
    
    					For $i = 0 To 8
    						$aNewField[$i][UBound($aNewField, 2) - 1] = $aField[$i][$iRow_]
    					Next
    				Next
    
    
    				ExitLoop
    			EndIf
    		Next
    
    
    		If UBound($aNewField, 2) Then
    			Dim $aField[9][14]
    
    
    			For $i = 14 - UBound($aNewField, 2) To 13
    				For $i_ = 0 To 8
    					$aField[$i_][$i] = $aNewField[$i_][$i - 14 + UBound($aNewField, 2)]
    				Next
    			Next
    
    
    			$iScore += 1
    			WinSetTitle($hGUI, "", "Tetris Score: " & $iScore)
    		EndIf
    	Until Not UBound($aNewField, 2)
    EndFunc
    
    
    Func _Exit()
    
    
    	_GDIPlus_Shutdown()
    	Exit
    EndFunc
    
    
    Func _GenerateRandomBlock()
    	Local $iRandom = Random(1, 7, 1)
    
    
    	Switch $iRandom
    		Case 1 ;S-Block
    			Local $aReturn[4][2] = [[3, 3], [4, 3], [4, 2], [5, 2]]
    
    
    		Case 2 ;RS-Block
    			Local $aReturn[4][2] = [[3, 2], [4, 2], [4, 3], [5, 3]]
    
    
    		Case 3 ;L-Block
    			Local $aReturn[4][2] = [[3, 1], [3, 2], [3, 3], [4, 3]]
    
    
    		Case 4 ;RL-Block
    			Local $aReturn[4][2] = [[3, 3], [4, 3], [4, 2], [4, 1]]
    
    
    		Case 5 ;O-Block
    			Local $aReturn[4][2] = [[3, 2], [3, 3], [4, 2], [4, 3]]
    
    
    		Case 6 ;I-Block
    			Local $aReturn[4][2] = [[3, 2], [4, 2], [5, 2], [6, 2]]
    
    
    		Case 7 ;T-Block
    			Local $aReturn[4][2] = [[3, 2], [4, 2], [4, 3], [5, 2]]
    
    
    	EndSwitch
    
    
    	SetExtended($iRandom)
    	Return $aReturn
    EndFunc
    Alles anzeigen

    Kritik und Feedback gerne erwünscht. Bitte hackt nicht zu sehr auf dem Source herum, ich weiß er ist schrecklich :D

    Dateien

    Tetris.au3 9,82 kB – 742 Downloads
  • For Schleife bleibt ohne Fehler hängen

    • alpines
    • 21. Juli 2015 um 21:31

    Bei mir hört das Script nach 30.000 Zeichen erst auf.

  • For Schleife bleibt ohne Fehler hängen

    • alpines
    • 21. Juli 2015 um 20:43

    Ein kleiner Blick in die Editbox genügt um zu sagen das dein Fehler darin liegt das die Editbox nicht mehr als (stdmäßig) 30.000 Zeichen anzeigen kann.
    Der angezeigte String ist exakt 30.000 Zeichen lang. Versuch mal mit GUICtrlSetLimit oder anderen Funktionen die Länge zu erhöhen.

    Alternativ könntest du auch eine _GUICtrlRichEdit_Create verwenden, die sollte glaube ich mehr erlauben (bin mir aber nicht sicher).

  • HTTP.au3 Reloaded

    • alpines
    • 21. Juli 2015 um 15:40

    Nein, WinHttp ist damit nicht kompatibel aber wesentlich umfangreicher. Ja, du kannst auch damit POSTen. Tutorials davon gibts viele also wirst du dich schnell damit bekannt machen.

  • HTTP.au3 Reloaded

    • alpines
    • 21. Juli 2015 um 14:36

    WinHttp eignet sich dafür wohl am besten. Einfach mit _WinHttpSimpleRequest und bei Header einfach den Header einfügen. z.B. "Cookie: abc=def"

  • Scite - Script Start / Stop

    • alpines
    • 21. Juli 2015 um 11:33

    Das wird nicht so ganz einfach möglich sein schätze ich mal. Entweder du nutzt die Built-In Funktionen (TrayMenu - Script Pause) oder du gehst da extern an die Sache ran.
    Starten ist ja ganz einfach, du kannst alle Funktionen in eine Hauptfunktion packen und sie per Button triggern allerdings wird das Stoppen ohne dem Script Pause nicht so einfach.

    Dafür bietet sich eigentlich (wenn du die Built-In Funktionen halt nicht nutzen willst) NtSuspendThread an. Die kannst du in einer externen Anwendung callen und dein AutoIt Thread freezen.
    Mit NtResumeThread kannst du den Thread wieder fortsetzen.

  • Mein realer Alptraum!

    • alpines
    • 20. Juli 2015 um 23:39

    Alleine der Gedanke was man damit alles anstellen könnte lässt es einem kalt den Rücken runterlaufen.
    Beide im Raid 0... Super Geschwindigkeit und viel Speicherplatz... Doch die Warteschlange war voll...

    Mein Beileid zu deinem Verlust :D

  • Neuer Laptop!? --- Hauptsache es läuft :D

    • alpines
    • 19. Juli 2015 um 02:15

    Woran das wohl liegt das 3+ Jahre alte Laptops mehr Zeit zum rendern benötigen :rolleyes:

  • AutoIt 3.3.14.0

    • alpines
    • 18. Juli 2015 um 22:16

    Umgestellt und zur 3.3.12.0 nichts bemerkt. Scripte funktionieren so wie sie sollen, ein paar Veränderungen wurden ja gemacht und die sind im Changelog einsehbar.

  • kopieren in win7 xp usw. Ich nix verstehen warum geht nicht?

    • alpines
    • 17. Juli 2015 um 13:26

    Hast du die entsprechenden Rechte die Dateien zu verschieben? Eventuell wird darauf zugegriffen.

  • Array variable has incorrect number of subscripts...

    • alpines
    • 9. Juli 2015 um 18:12

    @Kanashius du hast da auch Recht. Es ist besser mit UBound zu arbeiten um alles zu standardtisieren aber sag das mal den UDF-Entwicklern.
    _FileListToArray bietet keine andere Möglichkeit, man muss die Funktion selber umschreiben um eine vernünftige Ausgabe zu erzielen.

  • Array variable has incorrect number of subscripts...

    • alpines
    • 9. Juli 2015 um 13:49

    Bei der For-Schleife wo du das $h iterierst gehst du bis 5 obwohl der größte Index vom Array eine 4 ist.

  • MsgBox ohne skript Pause

    • alpines
    • 8. Juli 2015 um 17:19
    Zitat von autobert2

    Der OnEnventMode verhält sich während der MessageBox-Anzeige genauso wie der GuiGetMsg-Mode.
    Man könnte aber eine externe Exe mit Run starten, welche die Fehlermeldung ausgibt.

    Ich hab nicht davon gesprochen die HauptGUI im OnEventMode zu betreiben sondern eine kleine MsgBoxGUI zu erstellen die im OnEventMode läuft.

  • MsgBox ohne skript Pause

    • alpines
    • 8. Juli 2015 um 13:05

    Alternativ tut es auch eine kleine GUI die per OnEventMode läuft.

  • _IsPressed in Inputbox

    • alpines
    • 30. Juni 2015 um 15:01

    Wenn du einen HotKey setzt dann mach das bitte anständig. Sollte die Anwendung laufen und man will in einem Chat ein , tippen, dann wird das geblockt.

    Deshalb schau nach ob dein Fenster aktiv ist, ansonsten soll er , dennoch senden (aber HotKey nicht noch einmal auslösen).

  • _IsPressed in Inputbox

    • alpines
    • 29. Juni 2015 um 10:18

    Letztens gabs eine UDF dafür: Gefilterte Eingabe: InputFilter.au3 (1.1)

    Du könntest aber auch einfach bei jeder Eingabe (wird ja eine WM Nachricht geschickt) die , entfernen, oder wenn du den Inhalt des Feldes weiterverarbeitest einfach mit StringReplace das , entfernen.

  • TwitchNotify - verpasse nie wieder einen Stream

    • alpines
    • 26. Juni 2015 um 15:14

    Hallo,

    da ich in letzter Zeit oft auf Twitch unterwegs bin und Streams verpasse habe ich mir ein kleines Script geschrieben welches in einem bestimmten Intervall den Streamstatus von ausgewählten Channel anzeigt.
    Die Channel werden in die Text-Datei eingefügt (mit einem Zeilenumbruch als Separator) und anschließend muss nur das Programm gestartet werden.
    Die Oberfläche ist sehr simpel gehalten und erklärt sich eigentlich von selbst. Anzeigeeinstellungen (wie z.B. Sound oder Nachricht) können auch im TrayMenu vorgenommen werden!

    In der Ini können noch weitere Einstellungen vorgenommen werden.

    Das Script benachrichtigt am Anfang für alle Streams und danach nur noch für die die online gekommen sind. Also werdet ihr nicht nach jedem Intervall mit einer Nachricht genervt sondern nur wenn einer neu dazugekommen ist.

    Ini-Datei Aufbau

    Channelpath gibt den Pfad zur Datei an die die Liste an Streams beinhaltet die ihr abfragen möchtet.
    PlaySound ist ein boolscher Wert der angibt ob ein Sound (wenn ein Streamer online gegangen ist) abgespielt wird oder nicht.
    ShowMessage ist ein boolscher Wert der angibt ob eine Nachricht angezeigt werden soll (wenn ein Streamer online gegangen ist).
    TrayMessage ist ein boolscher Wert der auf 1 gestellt wird wenn ihr das erste mal auf Schließen in der Haupt-GUI drückt. Es wird eine Nachricht angezeigt das TwitchNotify sich ins Tray minimiert hat.
    WaitTime ist ein Integer Wert der das Intervall in Minuten angibt.
    MessageColor ist ein Farbwert der die Randfarbe der Nachricht angibt.
    AutoStart ist ein boolscher Wert der angibt ob TwitchNotify (nur in Version 2) mit Windows gestartet werden soll.

    Code
    [Settings]
    Channelpath=
    PlaySound=1
    ShowMessage=1
    TrayMessage=0
    WaitTime=1
    MessageColor=0xFF0000
    AutoStart=0
    TwitchNotify - Code
    AutoIt
    #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
    #AutoIt3Wrapper_Icon=notification.ico
    #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
    
    
    #include <Sound.au3>
    #include <WinHttp.au3>
    
    
    If ProcessList(@ScriptName)[0][0] > 1 Then
    	MsgBox(48, "Second instance", "An instance of TwitchNotify is already running.")
    	Exit
    EndIf
    
    
    Opt("GUIOnEventMode", 1)
    Opt("TrayOnEventMode", 1)
    Opt("TrayMenuMode", 1)
    
    
    ; -------------- Nachrichten GUI --------------------
    
    
    $hAlertGUI = GUICreate("Alert", 214, 110, @DesktopWidth - 214, @DesktopHeight - 150, 0x80000008)
    GUICtrlCreateLabel("", 0, 0, 214, 210)
    GUICtrlSetBkColor(-1, IniRead("Settings.ini", "Settings", "MessageColor", 0xFF0000))
    $hMessage = GUICtrlCreateEdit("", 2, 2, 210, 106, 6144)
    GUICtrlSetFont(-1, 10, 400, 0, "Segoe UI")
    
    
    GUICtrlCreateLabel("", 514, 110, 0, 0)
    GUICtrlSetState(-1, 256)
    
    
    GUISetState(@SW_HIDE, $hAlertGUI)
    
    
    ; ---------------------------------------------------
    
    
    ; -------------- Tray Items -------------------------
    
    
    Global $bPlaySound = IniRead("Settings.ini", "Settings", "PlaySound", 0)
    Global $bShowMessage = IniRead("Settings.ini", "Settings", "ShowMessage", 0)
    
    
    $hRecover = TrayCreateItem("TwitchNotify")
    TrayItemSetOnEvent(-1, "_RecoverFromTray")
    
    
    TrayCreateItem("")
    $hWhosLive = TrayCreateItem("Who's live?")
    TrayItemSetOnEvent(-1, "_WhosLive")
    
    
    $hSettingsMenu = TrayCreateMenu("Settings")
    $hTraySound = TrayCreateItem("Notify with sound", $hSettingsMenu)
    TrayItemSetOnEvent(-1, "_PlaySoundTray")
    
    
    $hTrayMessage = TrayCreateItem("Notify with message", $hSettingsMenu)
    TrayItemSetOnEvent(-1, "_ShowMessageTray")
    
    
    TrayItemSetState($hTraySound, IniRead("Settings.ini", "Settings", "PlaySound", 0) = 1 ? 1 : 4)
    TrayItemSetState($hTrayMessage, IniRead("Settings.ini", "Settings", "ShowMessage", 0) = 1 ? 1 : 4)
    
    
    TrayCreateItem("Exit Program")
    TrayItemSetOnEvent(-1, "_ExitProgram")
    
    
    ; ---------------------------------------------------
    
    
    ; --------------- Haupt GUI -------------------------
    
    
    $hMainGUI = GUICreate("TwitchNotify", 353, 242, 192, 124)
    GUISetOnEvent(-3, "_MinimizeToTray")
    
    
    GUICtrlCreateLabel("_____________________________________________________", 16, 32, 322, 17)
    GUICtrlCreateLabel("Channel settings", 16, 16, 119, 25)
    GUICtrlSetState(-1, 256)
    GUICtrlSetFont(-1, 12, 400, 0, "Segoe UI")
    
    
    GUICtrlCreateLabel("Channels file:", 24, 64, 67, 17)
    GUICtrlSetTip(-1, "Select the file which contains the channel names seperated from each other with a line break.")
    
    
    $hChannelPath = GUICtrlCreateInput(IniRead("Settings.ini", "Settings", "Channelpath", @ScriptDir & "\channels.txt"), 96, 61, 193, 21)
    GUICtrlCreateButton("...", 296, 60, 27, 23)
    GUICtrlSetOnEvent(-1, "_SelectPath")
    
    
    GUICtrlCreateLabel("check every", 24, 96, 63, 17)
    $hInterval = GUICtrlCreateInput(IniRead("Settings.ini", "Settings", "WaitTime", 5), 96, 93, 41, 21, 1)
    GUICtrlCreateUpdown(-1)
    GUICtrlSetOnEvent(-1, "_ChangeInterval")
    GUICtrlSetLimit(-1, 60, 1)
    GUICtrlCreateLabel("minutes for channel status", 144, 96, 127, 17)
    
    
    GUICtrlCreateLabel("_____________________________________________________", 16, 152, 322, 17)
    GUICtrlCreateLabel("Sound and message settings", 16, 136, 202, 25)
    GUICtrlSetFont(-1, 12, 400, 0, "Segoe UI")
    
    
    $hPlaySound = GUICtrlCreateCheckbox("play sound when channel goes live", 24, 176, 193, 17)
    GUICtrlSetState(-1, IniRead("Settings.ini", "Settings", "PlaySound", 0) = 1 ? 1 : 4)
    GUICtrlSetOnEvent(-1, "_PlaySound")
    
    
    $hShowMessage = GUICtrlCreateCheckbox("show message when channel goes live", 24, 200, 209, 17)
    GUICtrlSetState(-1, IniRead("Settings.ini", "Settings", "ShowMessage", 0) = 1 ? 1 : 4)
    GUICtrlSetOnEvent(-1, "_ShowMessage")
    
    
    GUISetState(@SW_SHOW, $hMainGUI)
    
    
    ; ---------------------------------------------------
    
    
    Global $aCalledAlready[0][2]
    
    
    ; ---------------- Abfrage-Routine ------------------
    
    
    While 1
    	Global $tmr = TimerInit()
    
    
    	Do
    		Sleep(100)
    	Until TimerDiff($tmr) >= Number(GUICtrlRead($hInterval)) * 60000
    
    
    	If FileExists(GUICtrlRead($hChannelPath)) Then
    		$hSession = _WinHttpOpen("TwitchNotify")
    		$hConnect = _WinHttpConnect($hSession, "api.twitch.tv", 443)
    		Local $sStreamList = ""
    
    
    		ReDim $aCalledAlready[UBound(StringRegExp(FileRead(GUICtrlRead($hChannelPath)), "\R", 3)) + 1 - Int(FileRead(GUICtrlRead($hChannelPath)) = "")][2]
    
    
    		For $i = 1 To UBound(StringRegExp(FileRead(GUICtrlRead($hChannelPath)), "\R", 3)) + 1 - Int(FileRead(GUICtrlRead($hChannelPath)) = "")
    			$sStreamerName = FileReadLine(GUICtrlRead($hChannelPath), $i)
    			$aCalledAlready[$i - 1][0] = $sStreamerName
    			If Not StringInStr(_WinHttpSimpleSSLRequest($hConnect, "GET", "kraken/streams/" & $sStreamerName), """stream"":null") Then
    				$sStreamList &= " " & $sStreamerName
    			Else
    				$aCalledAlready[$i - 1][1] = 0
    			EndIf
    		Next
    
    
    		_WinHttpCloseHandle($hConnect)
    		_WinHttpCloseHandle($hSession)
    
    
    		If $sStreamList <> "" Then
    			For $i = 0 To UBound($aCalledAlready) - 1
    				If StringInStr($sStreamList, $aCalledAlready[$i][0]) and $aCalledAlready[$i][1] = 0 Then
    					$aCalledAlready[$i][1] = 1
    				ElseIf StringInStr($sStreamList, $aCalledAlready[$i][0]) and $aCalledAlready[$i][1] = 1 Then
    					$sStreamList = StringReplace($sStreamList, " " & $aCalledAlready[$i][0], "")
    				ElseIf Not StringInStr($sStreamList, $aCalledAlready[$i][0]) and $aCalledAlready[$i][1] = 1 Then
    					$aCalledAlready[$i][1] = 0
    				EndIf
    			Next
    
    
    			If $sStreamList <> "" Then
    				If $bPlaySound Then
    					$hSound = _SoundOpen("sound.mp3")
    					_SoundPlay($hSound, 1)
    					_SoundClose($hSound)
    				EndIf
    
    
    				If $bShowMessage Then
    					GUICtrlSetData($hMessage, "The streamers" & $sStreamList & " are now live.")
    					GUISetState(@SW_SHOW, $hAlertGUI)
    					Sleep(5000)
    					GUISetState(@SW_HIDE, $hAlertGUI)
    				EndIf
    			EndIf
    		EndIf
    	EndIf
    WEnd
    
    
    ; ---------------------------------------------------
    
    
    Func _WhosLive()
    	TrayItemSetState($hWhosLive, 4)
    
    
    	$hSession = _WinHttpOpen("TwitchNotify")
    	$hConnect = _WinHttpConnect($hSession, "api.twitch.tv", 443)
    	Local $sStreamList = ""
    
    
    	ReDim $aCalledAlready[UBound(StringRegExp(FileRead(GUICtrlRead($hChannelPath)), "\R", 3)) + 1 - Int(FileRead(GUICtrlRead($hChannelPath)) = "")][2]
    
    
    	For $i = 1 To UBound(StringRegExp(FileRead(GUICtrlRead($hChannelPath)), "\R", 3)) + 1 - Int(FileRead(GUICtrlRead($hChannelPath)) = "")
    		$sStreamerName = FileReadLine(GUICtrlRead($hChannelPath), $i)
    		$aCalledAlready[$i - 1][0] = $sStreamerName
    		If Not StringInStr(_WinHttpSimpleSSLRequest($hConnect, "GET", "kraken/streams/" & $sStreamerName), """stream"":null") Then
    			$sStreamList &= " " & $sStreamerName
    		Else
    			$aCalledAlready[$i - 1][1] = 0
    		EndIf
    	Next
    
    
    	_WinHttpCloseHandle($hConnect)
    	_WinHttpCloseHandle($hSession)
    
    
    	If $sStreamList <> "" Then
    		For $i = 0 To UBound($aCalledAlready) - 1
    			If StringInStr($sStreamList, $aCalledAlready[$i][0]) Then $aCalledAlready[$i][1] = 1
    		Next
    
    
    		MsgBox(64, "Who's live?", "The streamers" & $sStreamList & " are live right now.")
    	Else
    		MsgBox(48, "Who's live?", "No one in your channel list is currently live.")
    	EndIf
    
    
    	$tmr = TimerInit()
    EndFunc
    
    
    Func _ChangeInterval()
    	IniWrite("Settings.ini", "Settings", "WaitTime", GUICtrlRead($hInterval))
    EndFunc
    
    
    Func _PlaySoundTray()
    	$bPlaySound = BitAND(TrayItemGetState($hTraySound), 1)
    	GUICtrlSetState($hPlaySound, $bPlaySound ? 1 : 4)
    	IniWrite("Settings.ini", "Settings", "PlaySound", $bPlaySound)
    EndFunc
    
    
    Func _ShowMessageTray()
    	$bShowMessage = BitAND(TrayItemGetState($hTrayMessage), 1)
    	GUICtrlSetState($hShowMessage, $bShowMessage ? 1 : 4)
    	IniWrite("Settings.ini", "Settings", "ShowMessage", $bShowMessage)
    EndFunc
    
    
    Func _PlaySound()
    	$bPlaySound = BitAND(GUICtrlRead($hPlaySound), 1)
    	TrayItemSetState($hTraySound, $bPlaySound ? 1 : 4)
    	IniWrite("Settings.ini", "Settings", "PlaySound", $bPlaySound)
    EndFunc
    
    
    Func _ShowMessage()
    	$bShowMessage = BitAND(GUICtrlRead($hShowMessage), 1)
    	TrayItemSetState($hTrayMessage, $bShowMessage ? 1 : 4)
    	IniWrite("Settings.ini", "Settings", "ShowMessage", $bShowMessage)
    EndFunc
    
    
    Func _SelectPath()
    	Local $sPath = FileOpenDialog("Select a file containing the channel names", @ScriptDir, "All Data (*.*)")
    
    
    	If $sPath <> "" Then
    		GUICtrlSetData($hChannelPath, $sPath)
    		IniWrite("Settings.ini", "Settings", "Channelpath", $sPath)
    	EndIf
    EndFunc
    
    
    Func _RecoverFromTray()
    	TrayItemSetState($hRecover, 4)
    	GUISetState(@SW_SHOW, $hMainGUI)
    EndFunc
    
    
    Func _MinimizeToTray()
    	GUISetState(@SW_HIDE, $hMainGUI)
    	If Not Number(IniRead("Settings.ini", "Settings", "TrayMessage", 0)) Then
    		IniWrite("Settings.ini", "Settings", "TrayMessage", 1)
    		TrayTip("Minimized to tray", "TwitchNotify minimized itself into the tray." & @CRLF & "You can exit by selecting the tray item.", 5)
    	EndIf
    EndFunc
    
    
    Func _ExitProgram()
    	IniWrite("Settings.ini", "Settings", "Channelpath", GUICtrlRead($hChannelPath))
    	IniWrite("Settings.ini", "Settings", "PlaySound", BitAND(GUICtrlRead($hPlaySound), 1))
    	IniWrite("Settings.ini", "Settings", "ShowMessage", BitAND(GUICtrlRead($hShowMessage), 1))
    	IniWrite("Settings.ini", "Settings", "WaitTime", GUICtrlRead($hInterval))
    	Exit
    EndFunc
    Alles anzeigen
    TwitchNotify2 - Code
    AutoIt
    #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
    #AutoIt3Wrapper_Icon=notification.ico
    #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
    #include <Sound.au3>
    #include <WinHttp.au3>
    
    
    If ProcessList(@ScriptName)[0][0] > 1 Then
    	MsgBox(48, "Second instance", "An instance of TwitchNotify is already running.")
    	Exit
    EndIf
    
    
    If IniRead(@ScriptDir & "\Settings.ini", "Settings", "AutoStart", 0) = 1 Then
    	If Not FileExists(@StartupDir & "\TwitchNotify.lnk") Then FileCreateShortcut("TwitchNotify.exe", @StartupDir & "\TwitchNotify.lnk", @ScriptDir, "", "Autostarts TwitchNotify with Windows.")
    ElseIf IniRead(@ScriptDir & "\Settings.ini", "Settings", "AutoStart", 0) = 0 and FileExists(@StartupDir & "\TwitchNotify.lnk") Then
    	FileDelete(@StartupDir & "\TwitchNotify.lnk")
    	Exit
    EndIf
    
    
    Opt("GUIOnEventMode", 1)
    Opt("TrayOnEventMode", 1)
    Opt("TrayMenuMode", 1)
    
    
    ; -------------- Nachrichten GUI --------------------
    
    
    $hAlertGUI = GUICreate("Alert", 214, 110, @DesktopWidth - 214, @DesktopHeight - 150, 0x80000008)
    GUICtrlCreateLabel("", 0, 0, 214, 210)
    GUICtrlSetBkColor(-1, IniRead(@ScriptDir & "\Settings.ini", "Settings", "MessageColor", 0xFF0000))
    $hMessage = GUICtrlCreateEdit("", 2, 2, 210, 106, 6144)
    GUICtrlSetFont(-1, 10, 400, 0, "Segoe UI")
    
    
    GUICtrlCreateLabel("", 514, 110, 0, 0)
    GUICtrlSetState(-1, 256)
    
    
    GUISetState(@SW_HIDE, $hAlertGUI)
    
    
    ; ---------------------------------------------------
    
    
    ; -------------- Tray Items -------------------------
    
    
    Global $bPlaySound = IniRead(@ScriptDir & "\Settings.ini", "Settings", "PlaySound", 0)
    Global $bShowMessage = IniRead(@ScriptDir & "\Settings.ini", "Settings", "ShowMessage", 0)
    
    
    $hRecover = TrayCreateItem("TwitchNotify")
    TrayItemSetOnEvent(-1, "_RecoverFromTray")
    
    
    TrayCreateItem("")
    $hWhosLive = TrayCreateItem("Who's live?")
    TrayItemSetOnEvent(-1, "_WhosLive")
    
    
    $hSettingsMenu = TrayCreateMenu("Settings")
    $hTraySound = TrayCreateItem("Notify with sound", $hSettingsMenu)
    TrayItemSetOnEvent(-1, "_PlaySoundTray")
    
    
    $hTrayMessage = TrayCreateItem("Notify with message", $hSettingsMenu)
    TrayItemSetOnEvent(-1, "_ShowMessageTray")
    
    
    TrayItemSetState($hTraySound, IniRead(@ScriptDir & "\Settings.ini", "Settings", "PlaySound", 0) = 1 ? 1 : 4)
    TrayItemSetState($hTrayMessage, IniRead(@ScriptDir & "\Settings.ini", "Settings", "ShowMessage", 0) = 1 ? 1 : 4)
    
    
    TrayCreateItem("Exit Program")
    TrayItemSetOnEvent(-1, "_ExitProgram")
    
    
    ; ---------------------------------------------------
    
    
    ; --------------- Haupt GUI -------------------------
    
    
    $hMainGUI = GUICreate("TwitchNotify", 353, 258, 192, 124)
    GUISetOnEvent(-3, "_MinimizeToTray")
    
    
    GUICtrlCreateLabel("_____________________________________________________", 16, 32, 322, 17)
    GUICtrlCreateLabel("Channel settings", 16, 16, 119, 25)
    GUICtrlSetState(-1, 256)
    GUICtrlSetFont(-1, 12, 400, 0, "Segoe UI")
    
    
    GUICtrlCreateLabel("Channels file:", 24, 64, 67, 17)
    GUICtrlSetTip(-1, "Select the file which contains the channel names seperated from each other with a line break.")
    
    
    $hChannelPath = GUICtrlCreateInput(IniRead(@ScriptDir & "\Settings.ini", "Settings", "Channelpath", @ScriptDir & "\channels.txt"), 96, 61, 193, 21)
    GUICtrlCreateButton("...", 296, 60, 27, 23)
    GUICtrlSetOnEvent(-1, "_SelectPath")
    
    
    GUICtrlCreateLabel("check every", 24, 96, 63, 17)
    $hInterval = GUICtrlCreateInput(IniRead(@ScriptDir & "\Settings.ini", "Settings", "WaitTime", 5), 96, 93, 41, 21, 1)
    GUICtrlCreateUpdown(-1)
    GUICtrlSetOnEvent(-1, "_ChangeInterval")
    GUICtrlSetLimit(-1, 60, 1)
    GUICtrlCreateLabel("minutes for channel status", 144, 96, 127, 17)
    
    
    GUICtrlCreateLabel("_____________________________________________________", 16, 152, 322, 17)
    GUICtrlCreateLabel("Sound and message settings", 16, 136, 202, 25)
    GUICtrlSetFont(-1, 12, 400, 0, "Segoe UI")
    
    
    $hPlaySound = GUICtrlCreateCheckbox("play sound when channel goes live", 24, 176, 193, 17)
    GUICtrlSetState(-1, IniRead(@ScriptDir & "\Settings.ini", "Settings", "PlaySound", 0) = 1 ? 1 : 4)
    GUICtrlSetOnEvent(-1, "_PlaySound")
    
    
    $hShowMessage = GUICtrlCreateCheckbox("show message when channel goes live", 24, 200, 209, 17)
    GUICtrlSetState(-1, IniRead(@ScriptDir & "\Settings.ini", "Settings", "ShowMessage", 0) = 1 ? 1 : 4)
    GUICtrlSetOnEvent(-1, "_ShowMessage")
    
    
    $hAutoStart = GUICtrlCreateCheckbox("start with windows (silent mode)", 24, 224, 209, 17)
    GUICtrlSetState(-1, IniRead(@ScriptDir & "\Settings.ini", "Settings", "AutoStart", 0) = 1 ? 1 : 4)
    GUICtrlSetOnEvent(-1, "_OnAutoStart")
    
    
    GUISetState(@SW_HIDE, $hMainGUI)
    
    
    ; ---------------------------------------------------
    
    
    Global $aCalledAlready[0][2]
    
    
    ; ---------------- Abfrage-Routine ------------------
    
    
    While 1
    	Global $tmr = TimerInit()
    
    
    	Do
    		Sleep(100)
    	Until TimerDiff($tmr) >= Number(GUICtrlRead($hInterval)) * 60000
    
    
    	If FileExists(GUICtrlRead($hChannelPath)) Then
    		$hSession = _WinHttpOpen("TwitchNotify")
    		$hConnect = _WinHttpConnect($hSession, "api.twitch.tv", 443)
    		Local $sStreamList = ""
    
    
    		ReDim $aCalledAlready[UBound(StringRegExp(FileRead(GUICtrlRead($hChannelPath)), "\R", 3)) + 1 - Int(FileRead(GUICtrlRead($hChannelPath)) = "")][2]
    
    
    		For $i = 1 To UBound(StringRegExp(FileRead(GUICtrlRead($hChannelPath)), "\R", 3)) + 1 - Int(FileRead(GUICtrlRead($hChannelPath)) = "")
    			$sStreamerName = FileReadLine(GUICtrlRead($hChannelPath), $i)
    			$aCalledAlready[$i - 1][0] = $sStreamerName
    			If Not StringInStr(_WinHttpSimpleSSLRequest($hConnect, "GET", "kraken/streams/" & $sStreamerName), """stream"":null") Then
    				$sStreamList &= " " & $sStreamerName
    			Else
    				$aCalledAlready[$i - 1][1] = 0
    			EndIf
    		Next
    
    
    		_WinHttpCloseHandle($hConnect)
    		_WinHttpCloseHandle($hSession)
    
    
    		If $sStreamList <> "" Then
    			For $i = 0 To UBound($aCalledAlready) - 1
    				If StringInStr($sStreamList, $aCalledAlready[$i][0]) and $aCalledAlready[$i][1] = 0 Then
    					$aCalledAlready[$i][1] = 1
    				ElseIf StringInStr($sStreamList, $aCalledAlready[$i][0]) and $aCalledAlready[$i][1] = 1 Then
    					$sStreamList = StringReplace($sStreamList, " " & $aCalledAlready[$i][0], "")
    				ElseIf Not StringInStr($sStreamList, $aCalledAlready[$i][0]) and $aCalledAlready[$i][1] = 1 Then
    					$aCalledAlready[$i][1] = 0
    				EndIf
    			Next
    
    
    			If $sStreamList <> "" Then
    				If $bPlaySound Then
    					$hSound = _SoundOpen("sound.mp3")
    					_SoundPlay($hSound, 1)
    					_SoundClose($hSound)
    				EndIf
    
    
    				If $bShowMessage Then
    					GUICtrlSetData($hMessage, "The streamers" & $sStreamList & " are now live.")
    					GUISetState(@SW_SHOW, $hAlertGUI)
    					Sleep(5000)
    					GUISetState(@SW_HIDE, $hAlertGUI)
    				EndIf
    			EndIf
    		EndIf
    	EndIf
    WEnd
    
    
    ; ---------------------------------------------------
    
    
    Func _WhosLive()
    	TrayItemSetState($hWhosLive, 4)
    
    
    	$hSession = _WinHttpOpen("TwitchNotify")
    	$hConnect = _WinHttpConnect($hSession, "api.twitch.tv", 443)
    	Local $sStreamList = ""
    
    
    	ReDim $aCalledAlready[UBound(StringRegExp(FileRead(GUICtrlRead($hChannelPath)), "\R", 3)) + 1 - Int(FileRead(GUICtrlRead($hChannelPath)) = "")][2]
    
    
    	For $i = 1 To UBound(StringRegExp(FileRead(GUICtrlRead($hChannelPath)), "\R", 3)) + 1 - Int(FileRead(GUICtrlRead($hChannelPath)) = "")
    		$sStreamerName = FileReadLine(GUICtrlRead($hChannelPath), $i)
    		$aCalledAlready[$i - 1][0] = $sStreamerName
    		If Not StringInStr(_WinHttpSimpleSSLRequest($hConnect, "GET", "kraken/streams/" & $sStreamerName), """stream"":null") Then
    			$sStreamList &= " " & $sStreamerName
    		Else
    			$aCalledAlready[$i - 1][1] = 0
    		EndIf
    	Next
    
    
    	_WinHttpCloseHandle($hConnect)
    	_WinHttpCloseHandle($hSession)
    
    
    	If $sStreamList <> "" Then
    		For $i = 0 To UBound($aCalledAlready) - 1
    			If StringInStr($sStreamList, $aCalledAlready[$i][0]) Then $aCalledAlready[$i][1] = 1
    		Next
    
    
    		MsgBox(64, "Who's live?", "The streamers" & $sStreamList & " are live right now.")
    	Else
    		MsgBox(48, "Who's live?", "No one in your channel list is currently live.")
    	EndIf
    
    
    	$tmr = TimerInit()
    EndFunc
    
    
    Func _OnAutoStart()
    	$bAutoStart = BitAND(GUICtrlRead($hAutoStart), 1)
    
    
    	If BitAND(GUICtrlRead($hAutoStart), 1) Then
    		FileCreateShortcut(@ScriptDir & "\TwitchNotify.exe", @StartupDir & "\TwitchNotify.lnk", @ScriptDir, "", "Autostarts TwitchNotify with Windows.")
    	Else
    		FileDelete(@StartupDir & "\TwitchNotify.lnk")
    	EndIf
    
    
    	IniWrite(@ScriptDir & "\Settings.ini", "Settings", "AutoStart", $bAutoStart)
    EndFunc
    
    
    Func _ChangeInterval()
    	IniWrite(@ScriptDir & "\Settings.ini", "Settings", "WaitTime", GUICtrlRead($hInterval))
    EndFunc
    
    
    Func _PlaySoundTray()
    	$bPlaySound = BitAND(TrayItemGetState($hTraySound), 1)
    	GUICtrlSetState($hPlaySound, $bPlaySound ? 1 : 4)
    	IniWrite(@ScriptDir & "\Settings.ini", "Settings", "PlaySound", $bPlaySound)
    EndFunc
    
    
    Func _ShowMessageTray()
    	$bShowMessage = BitAND(TrayItemGetState($hTrayMessage), 1)
    	GUICtrlSetState($hShowMessage, $bShowMessage ? 1 : 4)
    	IniWrite(@ScriptDir & "\Settings.ini", "Settings", "ShowMessage", $bShowMessage)
    EndFunc
    
    
    Func _PlaySound()
    	$bPlaySound = BitAND(GUICtrlRead($hPlaySound), 1)
    	TrayItemSetState($hTraySound, $bPlaySound ? 1 : 4)
    	IniWrite(@ScriptDir & "\Settings.ini", "Settings", "PlaySound", $bPlaySound)
    EndFunc
    
    
    Func _ShowMessage()
    	$bShowMessage = BitAND(GUICtrlRead($hShowMessage), 1)
    	TrayItemSetState($hTrayMessage, $bShowMessage ? 1 : 4)
    	IniWrite(@ScriptDir & "\Settings.ini", "Settings", "ShowMessage", $bShowMessage)
    EndFunc
    
    
    Func _SelectPath()
    	Local $sPath = FileOpenDialog("Select a file containing the channel names", @ScriptDir, "All Data (*.*)")
    
    
    	If $sPath <> "" Then
    		GUICtrlSetData($hChannelPath, $sPath)
    		IniWrite(@ScriptDir & "\Settings.ini", "Settings", "Channelpath", $sPath)
    	EndIf
    EndFunc
    
    
    Func _RecoverFromTray()
    	TrayItemSetState($hRecover, 4)
    	GUISetState(@SW_SHOW, $hMainGUI)
    EndFunc
    
    
    Func _MinimizeToTray()
    	GUISetState(@SW_HIDE, $hMainGUI)
    	If Not Number(IniRead(@ScriptDir & "\Settings.ini", "Settings", "TrayMessage", 0)) Then
    		IniWrite(@ScriptDir & "\Settings.ini", "Settings", "TrayMessage", 1)
    		TrayTip("Minimized to tray", "TwitchNotify minimized itself into the tray." & @CRLF & "You can exit by selecting the tray item.", 5)
    	EndIf
    EndFunc
    
    
    Func _ExitProgram()
    	IniWrite(@ScriptDir & "\Settings.ini", "Settings", "Channelpath", GUICtrlRead($hChannelPath))
    	IniWrite(@ScriptDir & "\Settings.ini", "Settings", "PlaySound", BitAND(GUICtrlRead($hPlaySound), 1))
    	IniWrite(@ScriptDir & "\Settings.ini", "Settings", "ShowMessage", BitAND(GUICtrlRead($hShowMessage), 1))
    	IniWrite(@ScriptDir & "\Settings.ini", "Settings", "WaitTime", GUICtrlRead($hInterval))
    	Exit
    EndFunc
    Alles anzeigen

    Feedback ist gerne gesehen.

    Dateien

    TwitchNotify2.rar 447,7 kB – 223 Downloads TwitchNotify.rar 508,46 kB – 243 Downloads
  • _ColorSetRGB

    • alpines
    • 25. Juni 2015 um 23:27

    Ist doch kein Problem. Du kannst doch alle Bytes einfach shiften, dann sind sie in der richtigen Reihenfolge.

  • Internet Explorer kann kein Hintergrundbild?

    • alpines
    • 19. Juni 2015 um 11:40

    Hoffentlich kommt dann eine Edge UDF raus die die Funktionalität der IE UDF abbilden kann.

  • Zeichen Zählen - Hommage an Andy und Autobert

    • alpines
    • 15. Juni 2015 um 16:38

    Die wohl schnellste Variante wäre wohl mit FASM und Inline-ASM-Code :D

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™