Mit knapp 2100 Punkten bist du um einiges besser als ich! Ich schaffe immer nur höchstens 2000 (bin einfach zu langsam
).
Allerdings liegt der Rekord bei 2241.95 Punkten. Da muss man richtig schnell sein um vor allem Geduld beweisen! ![]()
Beiträge von funkey
-
-
[autoit]
MsgBox(0,"", "Die ist ein Test."&@CRLF&"Dieser Text soll untereinadner stehen."&@CRLF&"Und nicht nebeneinander.")
[/autoit] -
[autoit]
#include <File.au3>
[/autoit][autoit][/autoit][autoit]
Global $FileString$aFiles = _FileListToArray(@ScriptDir, "*.txt", 1)
[/autoit][autoit][/autoit][autoit]For $i = 1 To $aFiles[0]
[/autoit]
_FileReadToArray($aFiles[$i], $FileString)
For $j = 1 To $FileString[0]
$FileString[$j] = StringReplace($FileString[$j], "a", "b")
Next
_FileWriteFromArray($aFiles[$i], $FileString, 1)
Next -
Einige werden es schon kennen, da es bis jetzt in meiner Signatur ist(war). Das erste Spiel, dass ich mit Autoit geschrieben habe. Ab jetzt ist es OpenSource.
Ich weiß, dass man da noch vieles verbessern könnte, aber ich werde da wohl nicht mehr viel verändern, da es mich zur Zeit überhaupt nicht reizt.Viel Spaß
-
Ich hätte es so gemacht, kA ob es dir gefällt. Du kannst dir noch Fehlerabfragen einbauen.
Spoiler anzeigen
[autoit]Global $Quellpfad = "c:\Dev-C++\"
[/autoit] [autoit][/autoit] [autoit]
Global $Zielpfad[3] = [':\Test-Drive1\', ':\Test-Drive2\', ':\Test-Drive3\']
Global $found = 0
For $i = 67 To 90 ;von D bis Z
For $j = 0 To 2 ;Zielpfad 1 bis 3
If FileExists(Chr($i)&$Zielpfad[$j]) Then
DirCopy($Quellpfad, Chr($i)&$Zielpfad[$j], 1)
$found = 1
ExitLoop
EndIf
If $found = 1 Then ExitLoop
Next
NextIf $found = 1 Then
[/autoit]
MsgBox(64, "OK", "Dateien wurden erfolgreich übertragen")
Else
MsgBox(16, "Fehler", "Ordner wurde nicht gefunden!")
EndIf -
Gib beim FileOpen den Pfad der Datei an.
-
Habe es mit dem Webmail-Zugang zu unserer Firma so gemacht:
Spoiler anzeigen
[autoit]#include <IE.au3>
[/autoit] [autoit][/autoit] [autoit]HotKeySet("!v", "_visible")
[/autoit] [autoit][/autoit] [autoit]TrayTip("Webmail", "Bitte warten bis die Seite geladen ist", 5, 1)
[/autoit] [autoit][/autoit] [autoit]
$sUsername = 'user'
$sPassword = 'pwd'
$url = "https:/......."
Global $oIE = _IECreate($url, 0, 0)$Test = _IEBodyReadHTML($oIE)
[/autoit] [autoit][/autoit] [autoit]
If StringInStr($Test, 'Es besteht ein Problem mit dem Sicherheitszertifikat der Website') Then
$oOverride = _IEGetObjByName($oIE, 'overridelink')
_IEAction($oOverride, 'click')
EndIf
_IELoadWait($oIE)
$oform = _IEFormGetObjByName($oIE, "loginForm")
$oname = _IEFormElementGetObjByName($oform , "User.id")
$opasswd = _IEFormElementGetObjByName($oform , "User.password")
$setname = _IEFormElementSetValue($oname, $sUsername)
$setpasswd = _IEFormElementSetValue($opasswd, $sPassword)
_IEFormSubmit($oform)TrayTip("Traytip löschen","",0)
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
_IEAction($oIE, "visible")Func _visible()
[/autoit]
_IEAction($oIE, "visible")
EndFunc -
Willkommen hier bei uns alten und jungen Säcken auf Autoit.de!

Es gibt (fast) kein Problem, dass wir gemeinsam nicht lösen könnten!
QBasic habe ich auch mal versucht, aber das ist schon lange her und da fehlten mir die Grundlagen und auch das Internet um voranzukommen. -
Herzlich willkommen!
Zitat von Commander21Es ist die bis jetzt leichteste Programmiersprache die ich kenne und die Möglichkeiten sind unendlich.
Ganz meine Meinung!

-
Ich sag nur:
[autoit]Opt("SendKeyDelay", 0)
[/autoit]
Opt("SendKeyDownDelay", 0) -
Das klingt ja gut, wenn das Siel auch auf Windows-Clonen läuft
Danke für's Testen eukalyptus!Endlich gibt's die offizielle Version 1.4!
Ein paar Neuerungen sind ja schon aus den Betas bekannt:- ScreenCapture mit Hotkey p
- Pause mit Taste Pause
- Rundenanzeige im Singleplayer-Modus
- Not-Minimierung mit Taste o im Wartemodus (bevor die Runde beginnt)
- PC-Gegner verbessert (zur Version 1.3)
- Aero-Abschaltung für Vista implementiert (danke MOZ, Raupi, GtaSpider)
- Ansätze eines Highscore-Modus (gefällt mir nicht wirklich)Download siehe Post#1
-
Spoiler anzeigen
[autoit]; *******************************************************
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
; ORF1 TeleText v1.0 by tobi_girst
; *******************************************************#NoTrayIcon
[/autoit] [autoit][/autoit] [autoit]
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <IE.au3>_IEErrorHandlerRegister()
[/autoit] [autoit][/autoit] [autoit]$oIE = _IECreateEmbedded()
[/autoit] [autoit][/autoit] [autoit]
GUICreate("ORF1 Teletext", 505, 480)
GUICtrlCreateLabel("ORF Teletext by Tobias Girstmair", 340, 455)
$Input = GUICtrlCreateInput("100", 120, 450, 50)
GUICtrlSetLimit(-1, 3)
GUICtrlCreateUpdown($Input)
GUICtrlSetLimit(-1, 899, 100)
$Gui_Button_Navigate = GUICtrlCreateButton("GO!", 180, 450, 30, 20)
$GUIActiveX = GUICtrlCreateObj($oIE, -40, -10, 595, 450)
$GUI_Button_Home = GUICtrlCreateButton("Seite 100", 10, 450, 100, 20)GUISetState()
[/autoit] [autoit][/autoit] [autoit]_IENavigate($oIE, "http://teletext.orf.at/100/100_0001.htm")
[/autoit] [autoit][/autoit] [autoit]While 1
[/autoit] [autoit][/autoit] [autoit]
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
ExitLoop
Case $msg = $GUI_Button_Home
_IENavigate($oIE, "http://teletext.orf.at/100/100_0001.htm")
Case $msg = $Gui_Button_Navigate
If StringLen(GUICtrlRead($Input)) = 3 And GUICtrlRead($Input) >= 100 And GUICtrlRead($Input) < 900 Then
_IENavigate($oIE, "http://teletext.orf.at/" & StringLeft(GUICtrlRead($Input), 1) & "00/" & GUICtrlRead($Input) & "_0001.htm")
EndIf
EndSelect
WEndGUIDelete()
[/autoit]
Exitmfg funkey
-
Hab noch die Verwendung als Hoverbutton vereinfacht!
Spoiler anzeigen
[autoit]#include <File.au3>
[/autoit] [autoit][/autoit] [autoit]
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <Color.au3>Opt("GUIOnEventMode", 1)
[/autoit] [autoit][/autoit] [autoit]$titel = "Funkey's Style-Test"
[/autoit] [autoit][/autoit] [autoit]
Global $Form1 = GUICreate($titel, 400, 600, -1, -1, $WS_POPUP)
GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")
GUISetBkColor(0xFFFFFF)_GuiRoundCorners($Form1, 0, 0, 50, 50)
[/autoit] [autoit][/autoit] [autoit]$Min_Label = GUICtrlCreateLabel("-", 305, 5, 20, 20, 0x1201, $WS_EX_CLIENTEDGE)
[/autoit] [autoit][/autoit] [autoit]
GUICtrlSetFont(-1, 24, 0)
GUICtrlSetCursor(-1, 0)
GUICtrlSetBkColor(-1, 0xAAAAAA)
GUICtrlSetTip(-1, 'Minimieren')
GUICtrlSetOnEvent(-1, '_Minimize')$Close_Label = GUICtrlCreateLabel("×", 328, 5, 20, 20, 0x1201, $WS_EX_CLIENTEDGE)
[/autoit] [autoit][/autoit] [autoit]
GUICtrlSetFont(-1, 14, 0)
GUICtrlSetCursor(-1, 0)
GUICtrlSetBkColor(-1, 0xAAAAAA)
GUICtrlSetTip(-1, 'Schließen')
GUICtrlSetOnEvent(-1, '_Exit')$Titel_Label = GUICtrlCreateLabel($titel, 0, 0, 400, 30, 0x4000201, $GUI_WS_EX_PARENTDRAG)
[/autoit] [autoit][/autoit] [autoit]
GUICtrlSetFont(-1, 12, 1000)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
GUICtrlSetColor(-1, 0xffffff)_CreateColorTransition(50, 0, 300, 30, 0xFFFFFF, 0x000000, 1, 2)
[/autoit] [autoit][/autoit] [autoit]
_CreateColorTransition(0, 0, 50, 600, 0x000000, 0xD4D0C8, 0, 2)
_CreateColorTransition(350, 0, 50, 600, 0xD4D0C8, 0x000000, 0, 2)$Button1 = _GuiCreateRoundButton($Form1, 170, 100, 60, 150, '_Button', 0xFF5500, @CR & '|' & @CR, 20, 0, 2);, @DocumentsCommonDir & '\Eigene Bilder\Beispielbilder\Winter.jpg')
[/autoit] [autoit][/autoit] [autoit]
$Button2 = _GuiCreateRoundButton($Form1, 120, 300, 160, 50, '_Button', 0x567890, '', 15, 0, 10)
$Button3 = _GuiCreateRoundButton($Form1, 150, 400, 100, 100, '_Button', 0xFFFFFF, 'Button 3', 15, 1, -1, @DocumentsCommonDir & '\Eigene Bilder\Beispielbilder\Sonnenuntergang.jpg')GUICtrlSetColor($Button2[1], 0x0)
[/autoit] [autoit][/autoit] [autoit]
GUISetState(@SW_SHOW, $Form1)
Global $HoverStatus[3]
AdlibEnable('_Hover', 50)While 1
[/autoit] [autoit][/autoit] [autoit]
Sleep(10000)
WEndFunc _Button()
[/autoit] [autoit][/autoit] [autoit]
Switch @GUI_CtrlId
Case $Button1[1]
MsgBox(0, "Runder Button", "Button 1 wurde gedrückt")
Case $Button2[1]
MsgBox(0, "Runder Button", "Button 2 wurde gedrückt")
Case $Button3[1]
MsgBox(0, "Runder Button", "Button 3 wurde gedrückt")
EndSwitch
EndFunc ;==>_ButtonFunc _Minimize()
[/autoit] [autoit][/autoit] [autoit]
Sleep(100)
GUISetState(@SW_MINIMIZE)
EndFunc ;==>_MinimizeFunc _Hover()
[/autoit] [autoit][/autoit] [autoit]
Local $HoverInfo
If MouseGetCursor() = 0 Then
$HoverInfo = GUIGetCursorInfo()
If Not IsArray($HoverInfo) Then Return
Switch $HoverInfo[4]
Case $Button1[1]
If $HoverStatus[0] = 0 Then GUICtrlSetFont($Button1[1], 30, 1000)
$HoverStatus[0] = 1
Case $Button2[1]
If $HoverStatus[1] = 0 Then
GUICtrlSetFont($Button2[1], 20, 1000)
GUICtrlSetData($Button2[1], 'Testbutton')
EndIf
$HoverStatus[1] = 1
Case $Button3[1]
If $HoverStatus[2] = 0 Then GUICtrlSetImage($Button3[2], @DocumentsCommonDir & '\Eigene Bilder\Beispielbilder\Winter.jpg')
$HoverStatus[2] = 1
EndSwitch
Else
If $HoverStatus[0] = 1 Then GUICtrlSetFont($Button1[1], 20, 1000)
$HoverStatus[0] = 0
If $HoverStatus[1] = 1 Then
GUICtrlSetFont($Button2[1], 15, 1000)
GUICtrlSetData($Button2[1], '')
EndIf
$HoverStatus[1] = 0
If $HoverStatus[2] = 1 Then GUICtrlSetImage($Button3[2], @DocumentsCommonDir & '\Eigene Bilder\Beispielbilder\Sonnenuntergang.jpg')
$HoverStatus[2] = 0
EndIf
EndFunc ;==>_HoverFunc _GuiCreateRoundButton($hWndParent, $iPosx, $iPosy, $iWidth, $iHeight, $sFunc, $iColor = -1, $sText = "", $iTextSize = -1, $iAlignment = 1, $iWaveFaktor = -1, $sFileBg = "")
[/autoit] [autoit][/autoit] [autoit]
Local $ret, $ret2, $Button[3]
If $iColor = -1 Then $iColor = 0x000000
If $iTextSize = -1 Then $iTextSize = 10
If $iWaveFaktor = -1 Or (Mod($iWaveFaktor, 2) = 1 And $iWaveFaktor <> 1) Or $iWaveFaktor > 12 Then $iWaveFaktor = 2
$Button[0] = GUICreate("", $iWidth, $iHeight, $iPosx, $iPosy, $WS_CHILD, -1, $hWndParent)
GUISetCursor(0, 1)
If $sFileBg <> "" Then
$Button[2] = GUICtrlCreatePic($sFileBg, 0, 0, $iWidth, $iHeight, 0)
Else
$Button[2] = _CreateColorTransition(0, 0, $iWidth, $iHeight, $iColor, 0xFFFFFF, $iAlignment, $iWaveFaktor)
EndIf
$Button[1] = GUICtrlCreateLabel($sText, 0, 0, $iWidth, $iHeight, 0x00000301, 0x00000008)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
GUICtrlSetColor(-1, $iColor)
GUICtrlSetFont(-1, $iTextSize, 1000)
GUICtrlSetOnEvent(-1, $sFunc)
$ret = DllCall('gdi32.dll', 'long', 'CreateRoundRectRgn', 'long', 0, 'long', 0, 'long', $iWidth, 'long', $iHeight, 'long', $iHeight, 'long', $iWidth)
If $ret[0] Then
$ret2 = DllCall('user32.dll', 'long', 'SetWindowRgn', 'hwnd', $Button[0], 'long', $ret[0], 'int', 1)
If $ret2[0] Then
Else
SetError(1)
EndIf
Else
SetError(2)
EndIf
GUISetState()
Return $Button
EndFunc ;==>_GuiCreateRoundButtonFunc _GuiRoundCorners($hWnd, $x1, $y1, $x3, $y3)
[/autoit] [autoit][/autoit] [autoit]
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 ;==>_GuiRoundCornersFunc _CreateColorTransition($iPosx, $iPosy, $iWidth, $iHeight, $nColorStart, $nColorEnd, $iAlignment = 0, $iWaveFaktor = 1)
[/autoit] [autoit][/autoit] [autoit]
Local $startRot, $startGruen, $startBlau, $endRot, $endGruen, $endBlau, $Color
Local $ColorOffsetRot, $ColorOffsetGruen, $ColorOffsetBlau, $Grafik
$startRot = _ColorGetRed($nColorStart)
$startGruen = _ColorGetGreen($nColorStart)
$startBlau = _ColorGetBlue($nColorStart)
$endRot = _ColorGetRed($nColorEnd)
$endGruen = _ColorGetGreen($nColorEnd)
$endBlau = _ColorGetBlue($nColorEnd)
$Grafik = GUICtrlCreateGraphic($iPosx, $iPosy, $iWidth, $iHeight, 0)
GUICtrlSetState(-1, $GUI_DISABLE)
$iHeight += $iWaveFaktor - Mod($iHeight, $iWaveFaktor)
Switch $iAlignment
Case 0
$ColorOffsetRot = ($endRot - $startRot) / ($iHeight / $iWaveFaktor)
$ColorOffsetGruen = ($endGruen - $startGruen) / ($iHeight / $iWaveFaktor)
$ColorOffsetBlau = ($endBlau - $startBlau) / ($iHeight / $iWaveFaktor)
Switch Mod($iWaveFaktor, 2)
Case 0
For $w = 1 To $iWaveFaktor - 1 Step 2
For $i = ($w - 1) * ($iHeight / $iWaveFaktor) To ($w) * ($iHeight / $iWaveFaktor) - 1
$Color = '0x' & Hex($startRot + $ColorOffsetRot * ($i + 1 - (($w - 1) * $iHeight / $iWaveFaktor)), 2) & _
Hex($startGruen + $ColorOffsetGruen * ($i + 1 - (($w - 1) * $iHeight / $iWaveFaktor)), 2) & _
Hex($startBlau + $ColorOffsetBlau * ($i + 1 - (($w - 1) * $iHeight / $iWaveFaktor)), 2)
GUICtrlSetGraphic(-1, $GUI_GR_COLOR, $Color)
GUICtrlSetGraphic(-1, $GUI_GR_MOVE, 0, $i)
GUICtrlSetGraphic(-1, $GUI_GR_LINE, $iWidth, $i)
Next
For $i = $w * ($iHeight / $iWaveFaktor) To ($w + 1) * ($iHeight / $iWaveFaktor) - 1
$Color = '0x' & Hex($endRot - $ColorOffsetRot * ($i - ($w * $iHeight / $iWaveFaktor) + 1), 2) & _
Hex($endGruen - $ColorOffsetGruen * ($i - ($w * $iHeight / $iWaveFaktor) + 1), 2) & _
Hex($endBlau - $ColorOffsetBlau * ($i - ($w * $iHeight / $iWaveFaktor) + 1), 2)
GUICtrlSetGraphic(-1, $GUI_GR_COLOR, $Color)
GUICtrlSetGraphic(-1, $GUI_GR_MOVE, 0, $i)
GUICtrlSetGraphic(-1, $GUI_GR_LINE, $iWidth, $i)
Next
Next
Case 1
For $i = 0 To $iHeight - 1
$Color = '0x' & Hex($startRot + $ColorOffsetRot * ($i + 1), 2) & _
Hex($startGruen + $ColorOffsetGruen * ($i + 1), 2) & _
Hex($startBlau + $ColorOffsetBlau * ($i + 1), 2)
GUICtrlSetGraphic(-1, $GUI_GR_COLOR, $Color)
GUICtrlSetGraphic(-1, $GUI_GR_MOVE, 0, $i)
GUICtrlSetGraphic(-1, $GUI_GR_LINE, $iWidth, $i)
Next
EndSwitch
Case Else
$ColorOffsetRot = ($endRot - $startRot) / ($iWidth / $iWaveFaktor)
$ColorOffsetGruen = ($endGruen - $startGruen) / ($iWidth / $iWaveFaktor)
$ColorOffsetBlau = ($endBlau - $startBlau) / ($iWidth / $iWaveFaktor)
Switch Mod($iWaveFaktor, 2)
Case 0
For $w = 1 To $iWaveFaktor - 1 Step 2
For $i = ($w - 1) * ($iWidth / $iWaveFaktor) To ($w) * ($iWidth / $iWaveFaktor) - 1
$Color = '0x' & Hex($startRot + $ColorOffsetRot * ($i + 1 - (($w - 1) * $iWidth / $iWaveFaktor)), 2) & _
Hex($startGruen + $ColorOffsetGruen * ($i + 1 - (($w - 1) * $iWidth / $iWaveFaktor)), 2) & _
Hex($startBlau + $ColorOffsetBlau * ($i + 1 - (($w - 1) * $iWidth / $iWaveFaktor)), 2)
GUICtrlSetGraphic(-1, $GUI_GR_COLOR, $Color)
GUICtrlSetGraphic(-1, $GUI_GR_MOVE, $i, 0)
GUICtrlSetGraphic(-1, $GUI_GR_LINE, $i, $iHeight)
Next
For $i = $w * ($iWidth / $iWaveFaktor) To ($w + 1) * ($iWidth / $iWaveFaktor) - 1
$Color = '0x' & Hex($endRot - $ColorOffsetRot * ($i - ($w * $iWidth / $iWaveFaktor) + 1), 2) & _
Hex($endGruen - $ColorOffsetGruen * ($i - ($w * $iWidth / $iWaveFaktor) + 1), 2) & _
Hex($endBlau - $ColorOffsetBlau * ($i - ($w * $iWidth / $iWaveFaktor) + 1), 2)
GUICtrlSetGraphic(-1, $GUI_GR_COLOR, $Color)
GUICtrlSetGraphic(-1, $GUI_GR_MOVE, $i, 0)
GUICtrlSetGraphic(-1, $GUI_GR_LINE, $i, $iHeight)
Next
Next
Case 1
For $i = 0 To $iHeight - 1
$Color = '0x' & Hex($startRot + $ColorOffsetRot * ($i + 1), 2) & _
Hex($startGruen + $ColorOffsetGruen * ($i + 1), 2) & _
Hex($startBlau + $ColorOffsetBlau * ($i + 1), 2)
GUICtrlSetGraphic(-1, $GUI_GR_COLOR, $Color)
GUICtrlSetGraphic(-1, $GUI_GR_MOVE, 0, $i)
GUICtrlSetGraphic(-1, $GUI_GR_LINE, $iWidth, $i)
Next
EndSwitch
EndSwitch
Return $Grafik
EndFunc ;==>_CreateColorTransitionFunc _Exit()
[/autoit]
Sleep(100)
Exit
EndFunc ;==>_Exit -
Wenn man bei TraySetIcon eine Dll angibt, dann muss man auch eine Nummer für das Icon in der Dll angeben, denn eine Dll kann hunderte von Icons enthalten!
-
Nichts zu danken!
Nun mal nicht übertreiben
, noch ist das Problem nicht gelöst, wenn du es damit nicht hinbekommst, dann melde dich noch einmal. -
-
Schau dir das mal an:
[autoit]_Singleton
[/autoit] -
So?
[autoit]IniWrite('ini.ini', 'Pfade', 'Skriptpfad', @ScriptDir)
[/autoit] -
Nicht direkt. Aber Prog@ndi hat hier irgendwo eine selbst programmierte Version einer MsgBox. Diese kann man sicher so verändern wie man sie braucht.
-
Hab die Funktion für die 'runden Buttons' jetzt noch erweitert bzw. kombiniert mit Farbübergängen!
Spoiler anzeigen
[autoit]#include <GUIConstantsEx.au3>
[/autoit] [autoit][/autoit] [autoit]
#include <WindowsConstants.au3>
#include <Color.au3>Opt("GUIOnEventMode", 1)
[/autoit] [autoit][/autoit] [autoit]$titel = "Funkey's Style-Test"
[/autoit] [autoit][/autoit] [autoit]
Global $Form1 = GUICreate($titel, 400, 600, -1, -1, $WS_POPUP)
GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")
GUISetBkColor(0xFFFFFF)_GuiRoundCorners($Form1, 0, 0, 50, 50)
[/autoit] [autoit][/autoit] [autoit]$Min_Label = GUICtrlCreateLabel("-", 305, 5, 20, 20, 0x1201, $WS_EX_CLIENTEDGE)
[/autoit] [autoit][/autoit] [autoit]
GUICtrlSetFont(-1, 24, 0)
GUICtrlSetCursor(-1, 0)
GUICtrlSetBkColor(-1, 0xAAAAAA)
GUICtrlSetTip(-1, 'Minimieren')
GUICtrlSetOnEvent(-1, '_Minimize')$Close_Label = GUICtrlCreateLabel("×", 328, 5, 20, 20, 0x1201, $WS_EX_CLIENTEDGE)
[/autoit] [autoit][/autoit] [autoit]
GUICtrlSetFont(-1, 14, 0)
GUICtrlSetCursor(-1, 0)
GUICtrlSetBkColor(-1, 0xAAAAAA)
GUICtrlSetTip(-1, 'Schließen')
GUICtrlSetOnEvent(-1, '_Exit')$Titel_Label = GUICtrlCreateLabel($titel, 0, 0, 400, 30, 0x4000201, $GUI_WS_EX_PARENTDRAG)
[/autoit] [autoit][/autoit] [autoit]
GUICtrlSetFont(-1, 12, 1000)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
GUICtrlSetColor(-1, 0xffffff)_CreateColorTransition(100, 0, 100, 30, 0xFFFFFF, 0x000000, 1)
[/autoit] [autoit][/autoit] [autoit]
_CreateColorTransition(200, 0, 100, 30, 0x000000, 0xFFFFFF, 1)
_CreateColorTransition(0, 0, 50, 600, 0x000000, 0xffffff, 1)
_CreateColorTransition(350, 0, 50, 600, 0xFFFFFF, 0x000000, 1)$Button1 = _GuiCreateRoundButton($Form1, 170, 100, 60, 150, '_Button', 0x202020, '', -1, @DocumentsCommonDir & '\Eigene Bilder\Beispielbilder\Winter.jpg')
[/autoit] [autoit][/autoit] [autoit]
$Button2 = _GuiCreateRoundButton($Form1, 120, 300, 160, 50, '_Button', 0x000000, 'Testbutton', 15)
$Button3 = _GuiCreateRoundButton($Form1, 150, 400, 100, 100, '_Button', 0xFF0FFFF, 'Button', 15, @DocumentsCommonDir & '\Eigene Bilder\Beispielbilder\Sonnenuntergang.jpg')Global $aChildGuis[3][2] = [[$Button1[0], $Button1[1]],[$Button2[0], $Button2[1]],[$Button3[0], $Button3[1]]]
[/autoit] [autoit][/autoit] [autoit]
Global $HoverFound[UBound($aChildGuis, 1)]GUISetState(@SW_SHOW, $Form1)
[/autoit] [autoit][/autoit] [autoit]While 1
[/autoit] [autoit][/autoit] [autoit]
Sleep(10000)
WEndFunc _Button()
[/autoit] [autoit][/autoit] [autoit]
Switch @GUI_CtrlId
Case $Button1[1]
MsgBox(0, "Runder Button", "Button 1 wurde gedrückt")
Case $Button2[1]
MsgBox(0, "Runder Button", "Button 2 wurde gedrückt")
Case $Button3[1]
MsgBox(0, "Runder Button", "Button 3 wurde gedrückt")
EndSwitch
EndFunc ;==>_ButtonFunc _Minimize()
[/autoit] [autoit][/autoit] [autoit]
Sleep(100)
GUISetState(@SW_MINIMIZE)
EndFunc ;==>_MinimizeFunc _GuiCreateRoundButton($hWndParent, $iPosx, $iPosy, $iWidth, $iHeight, $sFunc, $iColor = -1, $sText = "", $iTextSize = -1, $sFileBg1 = "", $sFileBg2 = "")
[/autoit] [autoit][/autoit] [autoit]
Local $ret, $ret2, $Button[2]
If $iColor = -1 Then $iColor = 0x000000
If $iTextSize = -1 Then $iTextSize = 10
$Button[0] = GUICreate("", $iWidth, $iHeight, $iPosx, $iPosy, $WS_CHILD, -1, $hWndParent)
;~ GUISetOnEvent($GUI_EVENT_PRIMARYUP, $sFunc, $Button[0])
GUISetCursor(0, 1)
If $sFileBg1 = "" Then
_CreateColorTransition(0, 0, $iWidth / 2, $iHeight, $iColor, 0xFFFFFF, 1)
_CreateColorTransition($iWidth / 2, 0, $iWidth / 2, $iHeight, 0xFFFFFF, $iColor, 1)
EndIfIf $sFileBg1 <> "" Then $Button[1] = GUICtrlCreatePic($sFileBg1, 0, 0, $iWidth, $iHeight, 0)
[/autoit] [autoit][/autoit] [autoit]
$Button[1] = GUICtrlCreateLabel($sText, 0, 0, $iWidth, $iHeight, 0x0201);, 0x00000008)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
GUICtrlSetColor(-1, $iColor)
GUICtrlSetFont(-1, $iTextSize, 1000)
GUICtrlSetOnEvent(-1, $sFunc)
_GuiMakeRound($Button[0], $iWidth, $iHeight)
GUISetState()
Return $Button
EndFunc ;==>_GuiCreateRoundButtonFunc _GuiMakeRound($hWnd, $iWidth, $iHeight)
[/autoit] [autoit][/autoit] [autoit]
Local $ret, $ret2
$ret = DllCall('gdi32.dll', 'long', 'CreateRoundRectRgn', 'long', 0, 'long', 0, 'long', $iWidth, 'long', $iHeight, 'long', $iHeight, 'long', $iWidth)
If $ret[0] Then
$ret2 = DllCall('user32.dll', 'long', 'SetWindowRgn', 'hwnd', $hWnd, 'long', $ret[0], 'int', 1)
If $ret2[0] Then
Else
Return SetError(1, 0, 0)
EndIf
Else
Return SetError(2, 0, 0)
EndIf
EndFunc ;==>_GuiMakeRoundFunc _GuiRoundCorners($hWnd, $x1, $y1, $x3, $y3)
[/autoit] [autoit][/autoit] [autoit]
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 ;==>_GuiRoundCornersFunc _CreateColorTransition($iPosx, $iPosy, $iWidth, $iHeight, $nColorStart, $nColorEnd, $iAlignment = 0)
[/autoit] [autoit][/autoit] [autoit]
Local $startRot, $startGruen, $startBlau, $endRot, $endGruen, $endBlau, $Color
Local $ColorOffsetRot, $ColorOffsetGruen, $ColorOffsetBlau
$startRot = _ColorGetRed($nColorStart)
$startGruen = _ColorGetGreen($nColorStart)
$startBlau = _ColorGetBlue($nColorStart)
$endRot = _ColorGetRed($nColorEnd)
$endGruen = _ColorGetGreen($nColorEnd)
$endBlau = _ColorGetBlue($nColorEnd)GUICtrlCreateGraphic($iPosx, $iPosy, $iWidth, $iHeight, 0)
[/autoit] [autoit][/autoit] [autoit]
GUICtrlSetState(-1, $GUI_DISABLE)
Switch $iAlignment
Case 0
$ColorOffsetRot = ($endRot - $startRot) / $iHeight
$ColorOffsetGruen = ($endGruen - $startGruen) / $iHeight
$ColorOffsetBlau = ($endBlau - $startBlau) / $iHeight
For $i = 0 To $iHeight - 1
$Color = '0x' & Hex($startRot + $ColorOffsetRot * ($i + 1), 2) & Hex($startGruen + $ColorOffsetGruen * ($i + 1), 2) & Hex($startBlau + $ColorOffsetBlau * ($i + 1), 2)
GUICtrlSetGraphic(-1, $GUI_GR_COLOR, $Color)
GUICtrlSetGraphic(-1, $GUI_GR_MOVE, 0, $i)
GUICtrlSetGraphic(-1, $GUI_GR_LINE, $iWidth, $i)
Next
Case Else
$ColorOffsetRot = ($endRot - $startRot) / $iWidth
$ColorOffsetGruen = ($endGruen - $startGruen) / $iWidth
$ColorOffsetBlau = ($endBlau - $startBlau) / $iWidth
For $i = 0 To $iWidth - 1
$Color = '0x' & Hex($startRot + $ColorOffsetRot * ($i + 1), 2) & Hex($startGruen + $ColorOffsetGruen * ($i + 1), 2) & Hex($startBlau + $ColorOffsetBlau * ($i + 1), 2)
GUICtrlSetGraphic(-1, $GUI_GR_COLOR, $Color)
GUICtrlSetGraphic(-1, $GUI_GR_MOVE, $i, 0)
GUICtrlSetGraphic(-1, $GUI_GR_LINE, $i, $iHeight)
Next
EndSwitch
EndFunc ;==>_CreateColorTransitionFunc _Exit()
[/autoit]
Sleep(100)
Exit
EndFunc ;==>_Exit