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

Beiträge von funkey

  • Kochkurs: Spiel für meinen Stammtisch

    • funkey
    • 12. Februar 2009 um 22:37

    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! ;)

  • MsgBox

    • funkey
    • 12. Februar 2009 um 13:09
    [autoit]

    MsgBox(0,"", "Die ist ein Test."&@CRLF&"Dieser Text soll untereinadner stehen."&@CRLF&"Und nicht nebeneinander.")

    [/autoit]
  • _FileListToArray

    • funkey
    • 12. Februar 2009 um 12:55
    [autoit]

    #include <File.au3>
    Global $FileString

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

    $aFiles = _FileListToArray(@ScriptDir, "*.txt", 1)

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

    For $i = 1 To $aFiles[0]
    _FileReadToArray($aFiles[$i], $FileString)
    For $j = 1 To $FileString[0]
    $FileString[$j] = StringReplace($FileString[$j], "a", "b")
    Next
    _FileWriteFromArray($aFiles[$i], $FileString, 1)
    Next

    [/autoit]
  • Kochkurs: Spiel für meinen Stammtisch

    • funkey
    • 12. Februar 2009 um 12:47

    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ß

  • Laufwerk suchen dann kopieren

    • funkey
    • 12. Februar 2009 um 09:21

    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++\"
    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
    Next

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

    If $found = 1 Then
    MsgBox(64, "OK", "Dateien wurden erfolgreich übertragen")
    Else
    MsgBox(16, "Fehler", "Ordner wurde nicht gefunden!")
    EndIf

    [/autoit]
  • AutoIt-Skript von MS Access aus starten

    • funkey
    • 12. Februar 2009 um 08:28

    Gib beim FileOpen den Pfad der Datei an.

  • Embed IE mit ungültigen SSL (https) Zerifikat

    • funkey
    • 12. Februar 2009 um 08:01

    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)
    $sUsername = 'user'
    $sPassword = 'pwd'

    $url = "https:/......."
    Global $oIE = _IECreate($url, 0, 0)

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

    $Test = _IEBodyReadHTML($oIE)
    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)

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

    TrayTip("Traytip löschen","",0)
    _IEAction($oIE, "visible")

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

    Func _visible()
    _IEAction($oIE, "visible")
    EndFunc

    [/autoit]
  • Bin der Neue

    • funkey
    • 12. Februar 2009 um 07:55

    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.

  • Um mich kurz vorzustellen

    • funkey
    • 12. Februar 2009 um 07:49

    Herzlich willkommen!

    Zitat von Commander21

    Es ist die bis jetzt leichteste Programmiersprache die ich kenne und die Möglichkeiten sind unendlich.

    Ganz meine Meinung! :D

  • C++ (?) to Autoit

    • funkey
    • 11. Februar 2009 um 19:07

    Ich sag nur:

    [autoit]

    Opt("SendKeyDelay", 0)
    Opt("SendKeyDownDelay", 0)

    [/autoit]
  • Multiplayer-Game 'Kurven-Spiel'

    • funkey
    • 11. Februar 2009 um 13:11

    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

  • Hilfe bei _IECreateEmbedded - Abänderung

    • funkey
    • 11. Februar 2009 um 08:54
    Spoiler anzeigen
    [autoit]

    ; *******************************************************
    ; ORF1 TeleText v1.0 by tobi_girst
    ; *******************************************************

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

    #NoTrayIcon
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #include <IE.au3>

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

    _IEErrorHandlerRegister()

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

    $oIE = _IECreateEmbedded()
    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)

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

    GUISetState()

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

    _IENavigate($oIE, "http://teletext.orf.at/100/100_0001.htm")

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

    While 1
    $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
    WEnd

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

    GUIDelete()
    Exit

    [/autoit]

    mfg funkey

  • Runde Buttons

    • funkey
    • 10. Februar 2009 um 13:21

    Hab noch die Verwendung als Hoverbutton vereinfacht!

    Spoiler anzeigen
    [autoit]

    #include <File.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #include <Color.au3>

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

    Opt("GUIOnEventMode", 1)

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

    $titel = "Funkey's Style-Test"
    Global $Form1 = GUICreate($titel, 400, 600, -1, -1, $WS_POPUP)
    GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")
    GUISetBkColor(0xFFFFFF)

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

    _GuiRoundCorners($Form1, 0, 0, 50, 50)

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

    $Min_Label = GUICtrlCreateLabel("-", 305, 5, 20, 20, 0x1201, $WS_EX_CLIENTEDGE)
    GUICtrlSetFont(-1, 24, 0)
    GUICtrlSetCursor(-1, 0)
    GUICtrlSetBkColor(-1, 0xAAAAAA)
    GUICtrlSetTip(-1, 'Minimieren')
    GUICtrlSetOnEvent(-1, '_Minimize')

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

    $Close_Label = GUICtrlCreateLabel("×", 328, 5, 20, 20, 0x1201, $WS_EX_CLIENTEDGE)
    GUICtrlSetFont(-1, 14, 0)
    GUICtrlSetCursor(-1, 0)
    GUICtrlSetBkColor(-1, 0xAAAAAA)
    GUICtrlSetTip(-1, 'Schließen')
    GUICtrlSetOnEvent(-1, '_Exit')

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

    $Titel_Label = GUICtrlCreateLabel($titel, 0, 0, 400, 30, 0x4000201, $GUI_WS_EX_PARENTDRAG)
    GUICtrlSetFont(-1, 12, 1000)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    GUICtrlSetColor(-1, 0xffffff)

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

    _CreateColorTransition(50, 0, 300, 30, 0xFFFFFF, 0x000000, 1, 2)
    _CreateColorTransition(0, 0, 50, 600, 0x000000, 0xD4D0C8, 0, 2)
    _CreateColorTransition(350, 0, 50, 600, 0xD4D0C8, 0x000000, 0, 2)

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

    $Button1 = _GuiCreateRoundButton($Form1, 170, 100, 60, 150, '_Button', 0xFF5500, @CR & '|' & @CR, 20, 0, 2);, @DocumentsCommonDir & '\Eigene Bilder\Beispielbilder\Winter.jpg')
    $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')

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

    GUICtrlSetColor($Button2[1], 0x0)
    GUISetState(@SW_SHOW, $Form1)
    Global $HoverStatus[3]
    AdlibEnable('_Hover', 50)

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

    While 1
    Sleep(10000)
    WEnd

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

    Func _Button()
    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 ;==>_Button

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

    Func _Minimize()
    Sleep(100)
    GUISetState(@SW_MINIMIZE)
    EndFunc ;==>_Minimize

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

    Func _Hover()
    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 ;==>_Hover

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

    Func _GuiCreateRoundButton($hWndParent, $iPosx, $iPosy, $iWidth, $iHeight, $sFunc, $iColor = -1, $sText = "", $iTextSize = -1, $iAlignment = 1, $iWaveFaktor = -1, $sFileBg = "")
    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 ;==>_GuiCreateRoundButton

    [/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 ;==>_GuiRoundCorners

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

    Func _CreateColorTransition($iPosx, $iPosy, $iWidth, $iHeight, $nColorStart, $nColorEnd, $iAlignment = 0, $iWaveFaktor = 1)
    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 ;==>_CreateColorTransition

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

    Func _Exit()
    Sleep(100)
    Exit
    EndFunc ;==>_Exit

    [/autoit]
  • Tray Icon erscheint nicht

    • funkey
    • 10. Februar 2009 um 12:22

    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!

  • MSGBOX Formatieren

    • funkey
    • 10. Februar 2009 um 10:11

    Nichts zu danken!
    Nun mal nicht übertreiben :D , noch ist das Problem nicht gelöst, wenn du es damit nicht hinbekommst, dann melde dich noch einmal.

  • MSGBOX Formatieren

    • funkey
    • 10. Februar 2009 um 10:07

    MessageBox mit Benutzerdefinierten Schaltflächen

  • Programm nur 1mal ausführen

    • funkey
    • 10. Februar 2009 um 09:52

    Schau dir das mal an:

    [autoit]

    _Singleton

    [/autoit]
  • Dateipfad herauslesen und in eine .ini Datei schreiben

    • funkey
    • 10. Februar 2009 um 09:50

    So?

    [autoit]

    IniWrite('ini.ini', 'Pfade', 'Skriptpfad', @ScriptDir)

    [/autoit]
  • MSGBOX Formatieren

    • funkey
    • 10. Februar 2009 um 09:35

    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.

  • Runde Buttons

    • funkey
    • 9. Februar 2009 um 13:10

    Hab die Funktion für die 'runden Buttons' jetzt noch erweitert bzw. kombiniert mit Farbübergängen!

    Spoiler anzeigen
    [autoit]

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

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

    Opt("GUIOnEventMode", 1)

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

    $titel = "Funkey's Style-Test"
    Global $Form1 = GUICreate($titel, 400, 600, -1, -1, $WS_POPUP)
    GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")
    GUISetBkColor(0xFFFFFF)

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

    _GuiRoundCorners($Form1, 0, 0, 50, 50)

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

    $Min_Label = GUICtrlCreateLabel("-", 305, 5, 20, 20, 0x1201, $WS_EX_CLIENTEDGE)
    GUICtrlSetFont(-1, 24, 0)
    GUICtrlSetCursor(-1, 0)
    GUICtrlSetBkColor(-1, 0xAAAAAA)
    GUICtrlSetTip(-1, 'Minimieren')
    GUICtrlSetOnEvent(-1, '_Minimize')

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

    $Close_Label = GUICtrlCreateLabel("×", 328, 5, 20, 20, 0x1201, $WS_EX_CLIENTEDGE)
    GUICtrlSetFont(-1, 14, 0)
    GUICtrlSetCursor(-1, 0)
    GUICtrlSetBkColor(-1, 0xAAAAAA)
    GUICtrlSetTip(-1, 'Schließen')
    GUICtrlSetOnEvent(-1, '_Exit')

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

    $Titel_Label = GUICtrlCreateLabel($titel, 0, 0, 400, 30, 0x4000201, $GUI_WS_EX_PARENTDRAG)
    GUICtrlSetFont(-1, 12, 1000)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    GUICtrlSetColor(-1, 0xffffff)

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

    _CreateColorTransition(100, 0, 100, 30, 0xFFFFFF, 0x000000, 1)
    _CreateColorTransition(200, 0, 100, 30, 0x000000, 0xFFFFFF, 1)
    _CreateColorTransition(0, 0, 50, 600, 0x000000, 0xffffff, 1)
    _CreateColorTransition(350, 0, 50, 600, 0xFFFFFF, 0x000000, 1)

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

    $Button1 = _GuiCreateRoundButton($Form1, 170, 100, 60, 150, '_Button', 0x202020, '', -1, @DocumentsCommonDir & '\Eigene Bilder\Beispielbilder\Winter.jpg')
    $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')

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

    Global $aChildGuis[3][2] = [[$Button1[0], $Button1[1]],[$Button2[0], $Button2[1]],[$Button3[0], $Button3[1]]]
    Global $HoverFound[UBound($aChildGuis, 1)]

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

    GUISetState(@SW_SHOW, $Form1)

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

    While 1
    Sleep(10000)
    WEnd

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

    Func _Button()
    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 ;==>_Button

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

    Func _Minimize()
    Sleep(100)
    GUISetState(@SW_MINIMIZE)
    EndFunc ;==>_Minimize

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

    Func _GuiCreateRoundButton($hWndParent, $iPosx, $iPosy, $iWidth, $iHeight, $sFunc, $iColor = -1, $sText = "", $iTextSize = -1, $sFileBg1 = "", $sFileBg2 = "")
    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)
    EndIf

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

    If $sFileBg1 <> "" Then $Button[1] = GUICtrlCreatePic($sFileBg1, 0, 0, $iWidth, $iHeight, 0)
    $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 ;==>_GuiCreateRoundButton

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

    Func _GuiMakeRound($hWnd, $iWidth, $iHeight)
    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 ;==>_GuiMakeRound

    [/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 ;==>_GuiRoundCorners

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

    Func _CreateColorTransition($iPosx, $iPosy, $iWidth, $iHeight, $nColorStart, $nColorEnd, $iAlignment = 0)
    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)

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

    GUICtrlCreateGraphic($iPosx, $iPosy, $iWidth, $iHeight, 0)
    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 ;==>_CreateColorTransition

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

    Func _Exit()
    Sleep(100)
    Exit
    EndFunc ;==>_Exit

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