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

  • ToolTip bei Statusbar

    • funkey
    • 10. November 2009 um 16:46
    Zitat von nefas83

    Kann es damit zusammen hängen das ich zuvor ein Top Menü erstelle?

    Teste es doch einfach!
    Mehr können wir auch nicht tun un du hast bereits ein vollständiges Skript um es zu probieren!
    Außerdem funktioniert das Beispiel zu _GUICtrlStatusBar_SetTipText bei dir doch oder?
    Teile uns dann mit wenn du definitiv etwas herausgefunden hast, was nicht funktioniert und dann poste das Problem mit lauffähigem Testskript um uns die Arbeit zu erleichtern.


    mfg funkey

  • brauche hilfe... IE zu FF

    • funkey
    • 10. November 2009 um 16:41

    Du kannst einfach die AutoLogin-Funktion von Stilgar verwenden ;)

    Web-Seiten-Auto-Login Funktion und Generator für Login-Funktionen(V3.4)

    Die generiert auch den passenden Login-Code für die Seite ;

  • DLL Open / Call zu langsam

    • funkey
    • 10. November 2009 um 16:38

    Ich denke nicht, dass man da was beschleunigen kann. :(
    Wenn aber doch, dann bräuchte ich auch die Lösung dafür :D

  • Eigenes Tab-Register (OwnTab-UDF)

    • funkey
    • 10. November 2009 um 13:46

    Hab mal wieder was gebastelt :D
    Diesesmal ist es ein eigenes Tab-Register.

    Man kann damit:
    * Einfach mehrere Tabs in einer Gui verwalten.
    * die Farben beliebig ändern.
    * Hover-Effekt aktivieren.
    * Tabs wechseln mittels Hover-Funktion.
    * Alarme setzen (Farben einzelner Tabs ändern) und blinken lassen.
    * uvm ;)

    Screenshots

    OwnTab-Galerie

    OwnTab_Example.au3
    [autoit]

    #include "OwnTab.au3"

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

    Local $hGui = GUICreate("Funkey's OwnTab-UDF Example", 500, 350)
    GUISetBkColor(0xbbbbbb)

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

    $OwnTab_Style = Random(0, 1, 1) ;random style (only 2 styles available!!)

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

    Local $aTabText[5] = ["Settings", "Register without icon", "Pic", "Status", "Tab in Tab"] ;Declare the regions for the OwnTab-control
    Local $aTabIcons[5][2] = [["shell32.dll", 130],[""],["shell32.dll", 139],["shell32.dll", 90], ["shell32.dll", 43]]
    Global $aCtrlTab = _OwnTab_Create($hGui, $aTabText, 10, 10, 480, 300, 30, 0xD5D5D5, 0xCFE0E7, 0xCFE0E7, $aTabIcons)

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

    Local $aTabTip[5] = ["Tip Item 1", "Tip Item 2", "Tip Item 3", "Alarm-Register"]
    _OwnTab_SetTip($aCtrlTab, $aTabTip) ;set the tooltips for the OwnTab-control

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

    #Region Tab1
    _OwnTab_Add($aCtrlTab) ;Start controls tab1
    Global $Edit1 = GUICtrlCreateEdit("Edit in Tab1", 20, 55, 300, 50, 0)
    Global $Button1 = GUICtrlCreateButton("Simulate an alarm", 20, 120, 300, 20)
    Global $Box1 = GUICtrlCreateCheckbox("Switch on hover - set time -->", 20, 180)
    GUICtrlSetBkColor(-1, 0xCFE0E7)
    Global $Input1 = GUICtrlCreateInput("1", 200, 180, 50, 20)
    GUICtrlCreateUpdown($Input1)
    GUICtrlSetLimit(-1, 15, 1)
    #EndRegion Tab1

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

    #Region Tab2
    _OwnTab_Add($aCtrlTab) ;Start controls tab2
    Global $Edit2 = GUICtrlCreateEdit("Edit in Tab2", 20, 150, 300, 50, 0)
    Global $Label2 = GUICtrlCreateLabel("Label in Tab2", 20, 220, 300, 20, 0x201)
    GUICtrlSetBkColor(-1, -2) ;$GUI_BKCOLOR_TRANSPARENT
    #EndRegion Tab2

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

    #Region Tab3
    _OwnTab_Add($aCtrlTab) ;Start controls tab3
    Global $Labe3 = GUICtrlCreateLabel("If you see this label, you can change the picture-path in scriptline " &@ScriptLineNumber + 1 & "!!", 40, 150, 400, 30, 0x201)
    Global $Edit3 = GUICtrlCreatePic(@DocumentsCommonDir & '\Eigene Bilder\Beispielbilder\Winter.jpg', 20, 55, 460, 280)
    #EndRegion Tab3

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

    #Region Tab4
    _OwnTab_Add($aCtrlTab) ;Start controls tab4
    Global $Button4 = GUICtrlCreateButton("Acknowledge the alarm", 20, 120, 300, 20)
    Global $Button5 = GUICtrlCreateButton("Enable tab 3", 20, 150, 300, 20)
    Global $Button6 = GUICtrlCreateButton("Disable tab 3", 20, 180, 300, 20)
    Global $Button7 = GUICtrlCreateButton("Hide tab 2", 20, 240, 300, 20)
    Global $Button8 = GUICtrlCreateButton("Show tab 2", 20, 210, 300, 20)
    #EndRegion Tab4

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

    #Region Tab5 and "Tab in Tab"
    _OwnTab_Add($aCtrlTab) ;Start controls tab5

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

    GUICtrlCreateLabel("Style Black", 30, 50, 200, 20, 0x201)
    $OwnTab_Style = 0
    Local $aTabText[2] = ["Tab1", "New Info"] ;Declare the regions for the OwnTab-control
    Local $aTabIcons[2][2] = [["shell32.dll", 20],["shell32.dll", 40]]
    Global $aCtrlTab2 = _OwnTab_Create($hGui, $aTabText, 30, 80, 200, 200, 30, 0xD5D5D5, 0x00ff00, 0x00ff00, $aTabIcons)
    _OwnTab_Add($aCtrlTab2) ;Start controls tab1
    Global $BtnSet = GUICtrlCreateButton("Simulate", 80, 150, 100, 20)
    _OwnTab_Add($aCtrlTab2) ;Start controls tab2
    Global $BtnReset = GUICtrlCreateButton("Acknowledge", 80, 170, 100, 20)
    _OwnTab_End($aCtrlTab2)

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

    GUICtrlCreateLabel("Style White", 270, 50, 200, 20, 0x201)
    $OwnTab_Style = 1
    Local $aTabText[2] = ["Tab1", "Tab2"] ;Declare the regions for the OwnTab-control
    Local $aTabIcons[2][2] = [["shell32.dll", 10],["shell32.dll", 60]]
    Global $aCtrlTab3 = _OwnTab_Create($hGui, $aTabText, 270, 80, 200, 200, 30, 0xD5D5D5, 0x00ff00, 0x00ff00, $aTabIcons)
    _OwnTab_Add($aCtrlTab3) ;Start controls tab1
    GUICtrlCreateLabel("Just testing...", 280, 150, 100, 20)
    GUICtrlSetBkColor(-1, -2)
    _OwnTab_Add($aCtrlTab3) ;Start controls tab2
    GUICtrlCreateLabel("Hello from tab2", 280, 150, 100, 20)
    GUICtrlSetBkColor(-1, -2)
    _OwnTab_End($aCtrlTab3)
    #EndRegion Tab5

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

    _OwnTab_End($aCtrlTab) ;new: end control-definition AND inizialize the OwnTab

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

    _OwnTab_Disable($aCtrlTab, 3) ;new: disable tabitems
    _OwnTab_SetFontCol($aCtrlTab, 0xFF) ;new: set font-color

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

    GUISetState()
    _OwnTab_Hover($aCtrlTab, 0xFFFF88) ;start hover-function if you want
    _OwnTab_AlarmInit()

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

    Local $msg

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

    While 1
    $msg = GUIGetMsg()
    For $a = 1 To UBound($aCtrlTab, 1) - 1
    If $msg = $aCtrlTab[$a][0] Then
    _OwnTab_Switch($aCtrlTab, $a)
    If $a = 5 Then
    _OwnTab_Switch($aCtrlTab2, $aCtrlTab2[0][0], 1)
    _OwnTab_Switch($aCtrlTab3, $aCtrlTab3[0][0], 1)
    EndIf
    EndIf
    Next
    For $a = 1 To UBound($aCtrlTab2, 1) - 1
    If $msg = $aCtrlTab2[$a][0] Then
    _OwnTab_Switch($aCtrlTab2, $a)
    EndIf
    Next
    For $a = 1 To UBound($aCtrlTab3, 1) - 1
    If $msg = $aCtrlTab3[$a][0] Then
    _OwnTab_Switch($aCtrlTab3, $a)
    EndIf
    Next
    Switch $msg
    Case $Button1
    _OwnTab_SetAlarm($aCtrlTab, 4, 0xFF0000)
    Case $Button4
    _OwnTab_ResetAlarm($aCtrlTab, 4)
    Case $BtnSet
    _OwnTab_SetAlarm($aCtrlTab2, 2, 0x5050FF)
    Case $BtnReset
    _OwnTab_ResetAlarm($aCtrlTab2, 2)
    Case $Button5
    _OwnTab_Enable($aCtrlTab, 3)
    Case $Button6
    _OwnTab_Disable($aCtrlTab, 3)
    Case $Button7
    _OwnTab_Hide($aCtrlTab, 2)
    Case $Button8
    _OwnTab_Show($aCtrlTab, 2)
    Case $Box1
    If GUICtrlRead($Box1) = 1 Then
    _OwnTab_Hover($aCtrlTab, 0xFFFF88, GUICtrlRead($Input1))
    Else
    _OwnTab_Hover($aCtrlTab, 0xFFFF88, 0)
    EndIf
    Case $Input1
    If GUICtrlRead($Box1) = 1 Then _OwnTab_Hover($aCtrlTab, 0xFFFF88, GUICtrlRead($Input1))
    Case -3
    Exit
    EndSwitch
    Sleep(10)
    WEnd

    [/autoit]
    OwnTab.au3
    [autoit]

    #include-once
    #include <GDIPlus.au3>
    #include <Array.au3>
    #include <Constants.au3>
    #include <WindowsConstants.au3>
    #Include <Timers.au3>

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

    #cs
    Copyrights to funkey from Autoit.de
    #ce

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

    Local $HoverArray[1], $ControlID, $Global_I = 0, $__ControlID, $HoverActive = 0, $Temp_Found = 0, $szTemp_Array[2]
    Local $OwnTabHoverCol[2], $OwnTabHoverHelp[1], $OwnTabHoverSwitch, $aOwnTabHoverCount, $OwnTabHoverCtrl
    Local $aOwnTabAlarm[1][3], $iOwnTabAlarm, $hOwnTabGui, $hTimerAlarm, $hTimerHover
    Local $OwnTab_Style = 0 ; only 0 or 1 !

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

    _GDIPlus_Startup()
    Opt("OnExitFunc", "_OwnTab_OnExit")

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

    Func _OwnTab_Create($hWnd, $aTabText, $xPos, $yPos, $iWidth, $iHeight, $iItemHeight = -1, $nColNoSel = -1, $nColSel = -1, $nColBg = -1, $aIcons = "")
    Local $aSize, $aSize2[UBound($aTabText)][2], $xLast = 0, $aCtrl[UBound($aTabText) + 1][11], $iOffset = 0
    If Not IsArray($aIcons) Then
    Local $Icons[UBound($aTabText)][2]
    Else
    Local $Icons = $aIcons
    EndIf
    If Not IsArray($aTabText) Then Return SetError(1, 0, "")
    For $i = 0 To UBound($aTabText) - 1
    If $aTabText[$i] = "" Then Return SetError(2, $i + 1, "")
    $aSize = _GetTextSize($aTabText[$i])
    $aSize[0] += Ceiling($aSize[0] / 10) ;make it 10% longer for bold text
    $aSize2[$i][0] = $aSize[0]
    $aSize2[$i][1] = $aSize[1]
    If $iItemHeight = -1 Then $iItemHeight = $aSize[1]
    If $Icons[$i][0] <> "" Then
    $iOffset = $iItemHeight
    $aTabText[$i] &= " "
    Else
    $iOffset = 0
    EndIf
    $aCtrl[$i + 1][7] = $Icons[$i][0] ;filename for icon
    $aCtrl[$i + 1][8] = $Icons[$i][1] ;index for icon
    $aCtrl[$i + 1][9] = $aSize[0] + 5 + $iOffset ;labelwidth
    $aCtrl[$i + 1][0] = GUICtrlCreateLabel($aTabText[$i], $xPos + $xLast + 5, $yPos + 2, $aCtrl[$i + 1][9], $iItemHeight, 0x411201 + ($Icons[$i][0] <> ""), $OwnTab_Style)
    _HoverAddCtrl($aCtrl[$i + 1][0])
    If $Icons[$i][0] <> "" Then
    $aCtrl[$i + 1][6] = GUICtrlCreateIcon("", 0, $xPos + $xLast + 8, $yPos + 5, $iItemHeight - 6, $iItemHeight - 6)
    Else
    $aCtrl[$i + 1][6] = GUICtrlCreateDummy()
    EndIf
    ;~ If $Icons[$i][0] <> "" Then _SetBkIcon($aCtrl[$i + 1][6], $nColNoSel, $aCtrl[$i + 1][7], $aCtrl[$i + 1][8], $iItemHeight - 6, $iItemHeight - 6)
    GUICtrlCreateLabel($aCtrl[$i + 1][7], -200, -200) ;For information
    GUICtrlCreateLabel($aCtrl[$i + 1][8], -200, -200) ;For information
    GUICtrlCreateLabel($iItemHeight - 6, -200, -200) ;For information
    $aCtrl[$i + 1][2] = $nColNoSel
    $aCtrl[$i + 1][3] = $nColSel
    $xLast += $aCtrl[$i + 1][9]
    Next
    GUICtrlCreateLabel("", $xPos, $yPos + $iItemHeight, $iWidth, $iHeight, 0x411000, $OwnTab_Style)
    GUICtrlSetState(-1, 128) ;$GUI_DISABLE
    GUICtrlSetBkColor(-1, $nColBg)
    $xLast = 0
    For $i = 0 To UBound($aTabText) - 1
    If $Icons[$i][0] <> "" Then
    $iOffset = $iItemHeight
    Else
    $iOffset = 0
    EndIf
    $aCtrl[$i + 1][1] = GUICtrlCreateLabel("", $xPos + $xLast + 6, $yPos + $iItemHeight - $OwnTab_Style, $aSize2[$i][0] + 3 + $iOffset, 2+2*$OwnTab_Style)
    GUICtrlSetBkColor(-1, $nColSel)
    $xLast += $aSize2[$i][0] + 5 + $iOffset
    Next
    $aCtrl[0][1] = $iItemHeight
    $aCtrl[0][2] = $nColNoSel
    $aCtrl[0][3] = $nColSel
    $aCtrl[0][9] = $yPos + 2
    $hOwnTabGui = $hWnd
    Return $aCtrl
    EndFunc ;==>_OwnTab_Create

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

    Func _OwnTab_Switch(ByRef $aOwnTab, $iIndex, $fForce = 0)
    _OwnTab_UnRegisterHover($aOwnTab, $iIndex)
    If _OwnTab_IsAlarmed($aOwnTab[$iIndex][0]) Then $aOwnTabAlarm[@extended][2] = $aOwnTabAlarm[@extended][1]
    $HoverActive = 0
    If $aOwnTab[0][0] = $iIndex And $fForce = 0 Then Return
    For $s = 1 To UBound($aOwnTab, 1) - 1
    If $iIndex <> $s Then
    GUICtrlSetState($aOwnTab[$s][1], 32) ;$GUI_HIDE
    GUICtrlSetFont($aOwnTab[$s][0], -1, 400)
    If Not _OwnTab_IsAlarmed($aOwnTab[$s][0]) Then
    GUICtrlSetBkColor($aOwnTab[$s][0], $aOwnTab[$s][2])
    If $aOwnTab[$s][7] <> "" Then _SetBkIcon($aOwnTab[$s][6], $aOwnTab[$s][2], $aOwnTab[$s][7], $aOwnTab[$s][8], GUICtrlRead($aOwnTab[$s][0] + 4), GUICtrlRead($aOwnTab[$s][0] + 4))
    EndIf
    If _ArraySearch($OwnTabHoverHelp, $aOwnTab[$s][0]) = -1 Then
    _OwnTab_RegisterHover($aOwnTab, $s)
    EndIf
    Else
    GUICtrlSetFont($aOwnTab[$iIndex][0], -1, 1000)
    If Not _OwnTab_IsAlarmed($aOwnTab[$s][0]) Then
    GUICtrlSetBkColor($aOwnTab[$iIndex][0], $aOwnTab[$iIndex][3])
    If $aOwnTab[$s][7] <> "" Then _SetBkIcon($aOwnTab[$iIndex][6], $aOwnTab[$iIndex][3], $aOwnTab[$s][7], $aOwnTab[$s][8], GUICtrlRead($aOwnTab[$s][0] + 4), GUICtrlRead($aOwnTab[$s][0] + 4))
    EndIf
    GUICtrlSetState($aOwnTab[$iIndex][1], 16) ;$GUI_SHOW
    EndIf
    Next
    If $aOwnTab[0][0] = "" Or $fForce Then
    For $t = $aOwnTab[0][4] To $aOwnTab[UBound($aOwnTab, 1) - 1][4]
    GUICtrlSetState($t, 32) ;$GUI_HIDE
    If $t > $aOwnTab[$iIndex - 1][4] And $t < $aOwnTab[$iIndex][4] Then GUICtrlSetState($t, 16) ;$GUI_SHOW
    Next
    Else
    For $t = $aOwnTab[$aOwnTab[0][0] - 1][4] To $aOwnTab[$aOwnTab[0][0]][4]
    GUICtrlSetState($t, 32) ;$GUI_HIDE
    Next
    For $t = $aOwnTab[$iIndex - 1][4] To $aOwnTab[$iIndex][4]
    GUICtrlSetState($t, 16) ;$GUI_SHOW
    Next
    EndIf
    $aOwnTab[0][0] = $iIndex
    EndFunc ;==>_OwnTab_Switch

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

    Func _OwnTab_SetTip(ByRef $aOwnTab, $ToolTips = "", $iIndex = "")
    If IsArray($ToolTips) Then
    For $i = 1 To UBound($aOwnTab, 1) - 1
    $aOwnTab[$i][5] = $ToolTips[$i - 1]
    GUICtrlSetTip($aOwnTab[$i][0], $ToolTips[$i - 1])
    Next
    Else
    If $iIndex = "" Then Return SetError(1)
    $aOwnTab[$iIndex][5] = $ToolTips
    GUICtrlSetTip($aOwnTab[$iIndex][0], $ToolTips)
    EndIf
    EndFunc ;==>_OwnTab_SetTip

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

    Func _OwnTab_AlarmInit($iTime = 555)
    If Not $hTimerAlarm Then
    $hTimerAlarm = _Timer_SetTimer($hOwnTabGui, $iTime, "_OwnTab_AlarmBlink")
    Else
    $hTimerAlarm = _Timer_SetTimer($hOwnTabGui, $iTime, "", $hTimerAlarm)
    EndIf
    EndFunc ;==>_OwnTab_AlarmInit

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

    Func _OwnTab_AlarmBlink($hWnd, $Msg, $iIDTimer, $dwTime)
    Local $AlarmColAct
    $iOwnTabAlarm = Not $iOwnTabAlarm
    For $i = 1 To UBound($aOwnTabAlarm, 1) - 1
    If $iOwnTabAlarm Then
    $AlarmColAct = $aOwnTabAlarm[$i][2]
    Else
    $AlarmColAct = $aOwnTabAlarm[$i][1]
    EndIf
    GUICtrlSetBkColor($aOwnTabAlarm[$i][0], $AlarmColAct)
    _SetBkIcon($aOwnTabAlarm[$i][0] + 1, $AlarmColAct, GUICtrlRead($aOwnTabAlarm[$i][0] + 2), GUICtrlRead($aOwnTabAlarm[$i][0] + 3), GUICtrlRead($aOwnTabAlarm[$i][0] + 4), GUICtrlRead($aOwnTabAlarm[$i][0] + 4))
    Next
    EndFunc ;==>_OwnTab_AlarmBlink

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

    Func _OwnTab_SetAlarm(ByRef $aOwnTab, $iIndex, $nAlarmSel = 0xFF0000)
    Local $hCtrl = $aOwnTab[$iIndex][0]
    Local $iSearch = _ArraySearch($aOwnTabAlarm, $hCtrl)
    If $iSearch <> -1 Then Return
    ReDim $aOwnTabAlarm[UBound($aOwnTabAlarm, 1) + 1][3]
    $aOwnTabAlarm[UBound($aOwnTabAlarm, 1) - 1][0] = $hCtrl
    $aOwnTabAlarm[UBound($aOwnTabAlarm, 1) - 1][1] = $nAlarmSel
    $aOwnTabAlarm[UBound($aOwnTabAlarm, 1) - 1][2] = $aOwnTab[$iIndex][2]
    ;~ GUICtrlSetBkColor($aOwnTab[$iIndex][1], $nAlarmSel)
    EndFunc ;==>_OwnTab_SetAlarm

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

    Func _OwnTab_ResetAlarm(ByRef $aOwnTab, $iIndex)
    Local $hCtrl = $aOwnTab[$iIndex][0]
    Local $iSearch = _ArraySearch($aOwnTabAlarm, $hCtrl)
    If $iSearch = -1 Then Return
    _ArrayDelete($aOwnTabAlarm, $iSearch)
    $aOwnTab[$iIndex][2] = $aOwnTab[0][2]
    $aOwnTab[$iIndex][3] = $aOwnTab[0][3]
    ;~ GUICtrlSetBkColor($aOwnTab[$iIndex][1], $aOwnTab[0][3])
    If $aOwnTab[0][0] <> $iIndex Then
    GUICtrlSetBkColor($aOwnTab[$iIndex][0], $aOwnTab[0][2])
    Else
    _SetBkIcon($aOwnTab[$iIndex][0] + 1, $aOwnTab[$iIndex][3], $aOwnTab[$iIndex][7], $aOwnTab[$iIndex][8], GUICtrlRead($aOwnTab[$iIndex][0] + 4), GUICtrlRead($aOwnTab[$iIndex][0] + 4))
    GUICtrlSetBkColor($aOwnTab[$iIndex][0], $aOwnTab[0][3])
    EndIf
    EndFunc ;==>_OwnTab_ResetAlarm

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

    Func _OwnTab_Add(ByRef $aOwnTab)
    Local $i = 0
    While 1
    If $aOwnTab[$i][4] = "" Then ExitLoop
    $i += 1
    WEnd
    $aOwnTab[$i][4] = GUICtrlCreateDummy()
    EndFunc ;==>_OwnTab_Add

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

    Func _OwnTab_End(ByRef $aOwnTab, $iIndex = 1)
    $aOwnTab[UBound($aOwnTab, 1) - 1][4] = GUICtrlCreateDummy()
    _OwnTab_Switch($aOwnTab, $iIndex)
    EndFunc ;==>_OwnTab_End

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

    Func _OwnTab_Hover($aOwnTab, $nColHover, $fSwitch = 0, $iTime = 50)
    $OwnTabHoverCol[0] = $nColHover
    $OwnTabHoverCol[1] = $aOwnTab[0][2]
    $OwnTabHoverSwitch = $fSwitch
    If Not $hTimerHover Then
    $hTimerHover = _Timer_SetTimer($hOwnTabGui, $iTime, "_ProcessHover")
    Else
    $hTimerHover = _Timer_SetTimer($hOwnTabGui, $iTime, "", $hTimerHover)
    EndIf
    EndFunc ;==>_OwnTab_Hover

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

    Func _OwnTab_RegisterHover($aOwnTab, $iIndex)
    If _ArraySearch($HoverArray, $aOwnTab[$iIndex][0]) = -1 Then _HoverAddCtrl($aOwnTab[$iIndex][0])
    EndFunc ;==>_OwnTab_RegisterHover

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

    Func _OwnTab_UnRegisterHover($aOwnTab, $iIndex)
    Local $iSearch = _ArraySearch($HoverArray, $aOwnTab[$iIndex][0])
    If $iSearch <> -1 Then _ArrayDelete($HoverArray, $iSearch)
    EndFunc ;==>_OwnTab_UnRegisterHover

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

    #Region Disable and Enable Tab-Register
    Func _OwnTab_Disable($aOwnTab, $iIndex)
    GUICtrlSetState($aOwnTab[$iIndex][0], 128)
    _OwnTab_UnRegisterHover($aOwnTab, $iIndex)
    Local $iSearch = _ArraySearch($OwnTabHoverHelp, $aOwnTab[$iIndex][0])
    If $iSearch = -1 Then _ArrayAdd($OwnTabHoverHelp, $aOwnTab[$iIndex][0])
    EndFunc ;==>_OwnTab_Disable

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

    Func _OwnTab_Enable($aOwnTab, $iIndex)
    GUICtrlSetState($aOwnTab[$iIndex][0], 64)
    _OwnTab_RegisterHover($aOwnTab, $iIndex)
    Local $iSearch = _ArraySearch($OwnTabHoverHelp, $aOwnTab[$iIndex][0])
    If $iSearch <> -1 Then _ArrayDelete($OwnTabHoverHelp, $iSearch)
    EndFunc ;==>_OwnTab_Enable
    #EndRegion Disable and Enable Tab-Register

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

    Func _OwnTab_Hide(ByRef $aOwnTab, $iIndex)
    If $iIndex = 0 Or $iIndex > UBound($aOwnTab, 1) - 1 Then Return SetError(1)
    If BitAND(GUICtrlGetState($aOwnTab[$iIndex][0]), 32) Then Return
    GUICtrlSetState($aOwnTab[$iIndex][0], 32) ;$GUI_HIDE
    GUICtrlSetState($aOwnTab[$iIndex][1], 32) ;$GUI_HIDE
    GUICtrlSetState($aOwnTab[$iIndex][6], 32) ;$GUI_HIDE

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

    Local $Offset = 3
    For $o = 0 To $iIndex - 1
    $Offset += $aOwnTab[$o][9] - 0
    Next

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

    For $o = $iIndex + 1 To UBound($aOwnTab, 1) - 1
    GUICtrlSetPos($aOwnTab[$o][0], $Offset, $aOwnTab[0][9])
    GUICtrlSetPos($aOwnTab[$o][1], $Offset + 1, $aOwnTab[0][9] + $aOwnTab[0][1] - 2 - $OwnTab_Style)
    GUICtrlSetPos($aOwnTab[$o][6], $Offset + 3, $aOwnTab[0][9] + 3)
    $Offset += $aOwnTab[$o][9]
    Next
    If $iIndex = $aOwnTab[0][0] Then
    If $iIndex = 1 Then
    _OwnTab_Switch($aOwnTab, 2)
    Else
    _OwnTab_Switch($aOwnTab, $iIndex - 1)
    EndIf
    EndIf
    EndFunc ;==>_OwnTab_Hide

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

    Func _OwnTab_Show(ByRef $aOwnTab, $iIndex, $iActivate = 0)
    If $iIndex = 0 Or $iIndex > UBound($aOwnTab, 1) + 1 Then Return SetError(1)
    If BitAND(GUICtrlGetState($aOwnTab[$iIndex][0]), 16) Then Return

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

    Local $Offset = 3
    For $o = 0 To UBound($aOwnTab, 1) - 2
    $Offset += $aOwnTab[$o][9] - 0
    Next

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

    For $o = UBound($aOwnTab, 1) - 1 To $iIndex + 1 Step -1
    GUICtrlSetPos($aOwnTab[$o][0], $Offset, $aOwnTab[0][9])
    GUICtrlSetPos($aOwnTab[$o][1], $Offset + 1, $aOwnTab[0][9] + $aOwnTab[0][1] - 2 - $OwnTab_Style)
    GUICtrlSetPos($aOwnTab[$o][6], $Offset + 3, $aOwnTab[0][9] + 3)
    $Offset -= $aOwnTab[$o - 1][9]
    Next

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

    GUICtrlSetState($aOwnTab[$iIndex][0], 16) ;$GUI_SHOW
    GUICtrlSetState($aOwnTab[$iIndex][6], 16) ;$GUI_SHOW

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

    If $iActivate Then
    _OwnTab_Switch($aOwnTab, $iIndex)
    EndIf
    EndFunc ;==>_OwnTab_Show

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

    Func _OwnTab_SetFontCol($aOwnTab, $nColor, $iIndex = "")
    If $iIndex = "" Then
    For $i = 1 To UBound($aOwnTab, 1) - 1
    GUICtrlSetColor($aOwnTab[$i][0], $nColor)
    Next
    Else
    If $iIndex < 1 Or $iIndex >= UBound($aOwnTab, 1) Then Return SetError(1)
    GUICtrlSetColor($aOwnTab[$iIndex][0], $nColor)
    EndIf
    EndFunc ;==>_OwnTab_SetFontCol

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

    Func _OwnTab_SetOnEvent($aOwnTab, $sFunc = "", $iIndex = "")
    If $sFunc = "" Then $sFunc = "_OwnTab_OnEvent"
    If $iIndex = "" Then
    For $f = 1 To UBound($aOwnTab, 1) -1
    GUICtrlSetOnEvent($aOwnTab[$f][0], $sFunc)
    Next
    Else
    If $iIndex < 1 Or $iIndex >= UBound($aOwnTab, 1) Then Return SetError(1)
    GUICtrlSetOnEvent($aOwnTab[$iIndex][0], $sFunc)
    EndIf
    EndFunc

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

    ;~ Func _OwnTab_OnEvent() ;for example
    ;~ For $a = 1 To UBound($aCtrlTab, 1) -1
    ;~ If @GUI_CtrlId = $aCtrlTab[$a][0] Then ExitLoop
    ;~ Next
    ;~ If $a < UBound($aCtrlTab, 1) Then _OwnTab_Switch($aCtrlTab, $a)
    ;~ EndFunc

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

    Func _OwnTab_OnExit()
    _GDIPlus_Shutdown()
    If $hTimerAlarm Then _Timer_KillTimer($hOwnTabGui, $hTimerAlarm)
    If $hTimerHover Then _Timer_KillTimer($hOwnTabGui, $hTimerHover)
    EndFunc ;==>_OwnTab_Exit

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

    Func _GetTextSize($nText, $sFont = 'Microsoft Sans Serif', $iFontSize = 8.5, $iFontAttributes = 0)
    ;Author: Bugfix
    ;Modified: funkey
    If $nText = '' Then Return
    Local $hGui = GUICreate("Textmeter by Bugfix")
    ;~ _GDIPlus_Startup()
    Local $hFormat = _GDIPlus_StringFormatCreate(0)
    Local $hFamily = _GDIPlus_FontFamilyCreate($sFont)
    Local $hFont = _GDIPlus_FontCreate($hFamily, $iFontSize, $iFontAttributes, 3)
    Local $tLayout = _GDIPlus_RectFCreate(15, 171, 0, 0)
    Local $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGui)
    Local $aInfo = _GDIPlus_GraphicsMeasureString($hGraphic, $nText, $hFont, $tLayout, $hFormat)
    Local $iWidth = Ceiling(DllStructGetData($aInfo[0], "Width"))
    Local $iHeight = Ceiling(DllStructGetData($aInfo[0], "Height"))
    _GDIPlus_StringFormatDispose($hFormat)
    _GDIPlus_FontDispose($hFont)
    _GDIPlus_FontFamilyDispose($hFamily)
    _GDIPlus_GraphicsDispose($hGraphic)
    ;~ _GDIPlus_Shutdown()
    GUIDelete($hGui)
    Local $aSize[2] = [$iWidth, $iHeight]
    Return $aSize
    EndFunc ;==>_GetTextSize

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

    Func _ProcessHover($hWnd, $Msg, $iIDTimer, $dwTime)
    If $OwnTabHoverSwitch > 1 And $OwnTabHoverCtrl <> "" Then
    If $aOwnTabHoverCount < $OwnTabHoverSwitch Then $aOwnTabHoverCount += 1
    If $aOwnTabHoverCount >= $OwnTabHoverSwitch Then
    ControlClick($hOwnTabGui, "", $OwnTabHoverCtrl)
    $aOwnTabHoverCount = 0
    $OwnTabHoverCtrl = ""
    EndIf
    EndIf
    $ControlID = _HoverCheck()
    If IsArray($ControlID) Then
    If $ControlID[0] = "AcquiredHover" Then
    $OwnTabHoverCtrl = $ControlID[1]
    $aOwnTabHoverCount = 0
    If $OwnTabHoverSwitch = "1" Then
    Return ControlClick($hOwnTabGui, "", $OwnTabHoverCtrl)
    Else
    _HoverFound($ControlID[1])
    EndIf
    Else
    If $ControlID[1] <> "" Then
    _HoverLost($ControlID[1])
    $OwnTabHoverCtrl = ""
    EndIf
    EndIf
    EndIf
    EndFunc ;==>_ProcessHover

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

    Func _HoverLost($ControlID)
    If _OwnTab_IsAlarmed($ControlID) Then Return
    GUICtrlSetBkColor($ControlID, $OwnTabHoverCol[1])
    If GUICtrlRead($ControlID + 2) <> "" Then _SetBkIcon($ControlID + 1, $OwnTabHoverCol[1], GUICtrlRead($ControlID + 2), GUICtrlRead($ControlID + 3), GUICtrlRead($ControlID + 4), GUICtrlRead($ControlID + 4))
    EndFunc ;==>_HoverLost

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

    Func _HoverFound($ControlID)
    If _OwnTab_IsAlarmed($ControlID) Then Return
    GUICtrlSetBkColor($ControlID, $OwnTabHoverCol[0])
    If GUICtrlRead($ControlID + 2) <> "" Then _SetBkIcon($ControlID + 1, $OwnTabHoverCol[0], GUICtrlRead($ControlID + 2), GUICtrlRead($ControlID + 3), GUICtrlRead($ControlID + 4), GUICtrlRead($ControlID + 4))
    EndFunc ;==>_HoverFound

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

    Func _OwnTab_IsAlarmed($hCtrl)
    Local $iSearch = _ArraySearch($aOwnTabAlarm, $hCtrl)
    If $iSearch = -1 Then Return 0
    Return SetExtended($iSearch, 1)
    EndFunc

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

    #Region _MouseHover.au3
    ;====================================================================================================================================
    ; UDF Name: _MouseHover.au3
    ;
    ; Author: marfdaman (Marvin)
    ;
    ; Contributions: RazerM (adding SetText parameter to _HoverFound and _HoverUndo).
    ;
    ; email: marfdaman at gmail dot com
    ;
    ; Use: Enable hover events for controls
    ;
    ; Note(s): If you want to use this i.c.w. an AdlibEnable in your current script, make your Adlib call "_HoverCheck()" as well.
    ; In this case, _HoverOn must NOT be called.
    ;====================================================================================================================================

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

    ;===============================================================================
    ; Description: _HoverAddCtrl
    ; Parameter(s): $___ControlID -> Control ID of control to be hoverchecked
    ;
    ; Requirement: Array.au3
    ; Return Value(s): None
    ;===============================================================================
    Func _HoverAddCtrl($___ControlID)
    _ArrayAdd($HoverArray, $___ControlID)
    EndFunc ;==>_HoverAddCtrl

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

    ;===============================================================================
    ; Description: Checks whether the mousecursor is hovering over any of the defined controls.
    ; Parameter(s): None
    ; Requirement: None
    ; Return Value(s): If a control has matched, an array will be returned, with $array[1] being either
    ; "AcquiredHover" or "LostHover". $array[2] will contain the control ID.
    ; It is recommended that you put this function in an AdlibEnable, since it's EXTREMELY
    ; resource friendly.
    ;===============================================================================
    Func _HoverCheck()
    $HoverData = GUIGetCursorInfo()
    If Not IsArray($HoverData) Then Return
    $Temp_Found = 0
    For $i = 1 To UBound($HoverArray) - 1
    If $HoverData[4] = $HoverArray[$i] Or $HoverData[4] = $HoverArray[$i] + 1 Then
    $Temp_Found = $i
    EndIf
    Next
    Select
    Case $Temp_Found = 0 And $HoverActive = 1 Or $Temp_Found <> 0 And $Temp_Found <> $Global_I And $HoverActive = 1
    $HoverActive = 0
    $Temp_Found = 0
    $szTemp_Array[0] = "LostHover"
    $szTemp_Array[1] = $HoverArray[$Global_I]
    Return $szTemp_Array
    Case $Temp_Found > 0 And $HoverActive = 0
    $Global_I = $Temp_Found
    $HoverActive = 1
    $Temp_Found = 0
    $szTemp_Array[0] = "AcquiredHover"
    $szTemp_Array[1] = $HoverArray[$Global_I]
    Return $szTemp_Array
    EndSelect
    EndFunc ;==>_HoverCheck
    #EndRegion _MouseHover.au3

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

    Func _SetBkIcon($ControlID, $iBackground, $sIcon, $iIndex, $iWidth, $iHeight)
    ;Yashied
    ;http://www.autoitscript.com/forum/index.ph…ndpost&p=662886
    Const $STM_SETIMAGE = 0x0172

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

    Local $tIcon, $tID, $hDC, $hBackDC, $hBackSv, $hBitmap, $hImage, $hIcon, $hBkIcon

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

    $tIcon = DllStructCreate('hwnd')
    $tID = DllStructCreate('hwnd')
    $hIcon = DllCall('user32.dll', 'int', 'PrivateExtractIcons', 'str', $sIcon, 'int', $iIndex, 'int', $iWidth, 'int', $iHeight, 'ptr', DllStructGetPtr($tIcon), 'ptr', DllStructGetPtr($tID), 'int', 1, 'int', 0)
    If (@error) Or ($hIcon[0] = 0) Then
    Return SetError(1, 0, 0)
    EndIf
    $hIcon = DllStructGetData($tIcon, 1)
    $tIcon = 0
    $tID = 0

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

    $hDC = _WinAPI_GetDC(0)
    $hBackDC = _WinAPI_CreateCompatibleDC($hDC)
    $hBitmap = _WinAPI_CreateSolidBitmap(0, $iBackground, $iWidth, $iHeight)
    $hBackSv = _WinAPI_SelectObject($hBackDC, $hBitmap)
    _WinAPI_DrawIconEx($hBackDC, 0, 0, $hIcon, 0, 0, 0, 0, $DI_NORMAL)

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

    ;~ _GDIPlus_Startup()

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

    $hImage = _GDIPlus_BitmapCreateFromHBITMAP($hBitmap)
    $hBkIcon = DllCall($ghGDIPDll, 'int', 'GdipCreateHICONFromBitmap', 'hWnd', $hImage, 'int*', 0)
    $hBkIcon = $hBkIcon[2]
    _GDIPlus_ImageDispose($hImage)

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

    GUICtrlSendMsg($ControlID, $STM_SETIMAGE, $IMAGE_ICON, _WinAPI_CopyIcon($hBkIcon))
    _WinAPI_RedrawWindow(GUICtrlGetHandle($ControlID))

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

    ;~ _GDIPlus_Shutdown()

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

    _WinAPI_SelectObject($hBackDC, $hBackSv)
    _WinAPI_DeleteDC($hBackDC)
    _WinAPI_ReleaseDC(0, $hDC)
    _WinAPI_DeleteObject($hBkIcon)
    _WinAPI_DeleteObject($hBitmap)
    _WinAPI_DeleteObject($hIcon)

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

    Return SetError(0, 0, 1)
    EndFunc ;==>_SetBkIcon

    [/autoit]

    Edit: Fehler mit Hover-Funktion ausgebessert
    Edit: Icon-Support ergänzt
    Edit: Screenshot hinzugefügt
    Edit: Blinken des alarmierten Registers hinzugefügt, verstecken und anzeigen von Registern
    Edit: Problem mit Icons gefixt
    Edit: Problem mit Switch on hover gefixt, 2. Style eingebunden, einige Verbesserungen
    Edit: bilder-Galerie hinzugefügt

    Dateien

    OwnTab.au3 19,5 kB – 1.141 Downloads OwnTab_Example.au3 5,27 kB – 956 Downloads
  • ToolTip bei Statusbar

    • funkey
    • 10. November 2009 um 12:29
    [autoit]

    _GUICtrlStatusBar_SetTipText

    [/autoit]


    :?::rolleyes:

  • Automatisches scrollen in Listview

    • funkey
    • 10. November 2009 um 12:18

    Wenn du Scite4autoit installiert hast, einfach ALT+I drücken, wenn du auf der #include-Zeile bist.
    Ansonsten im Installationsordner unter Includes.

  • Automatisches scrollen in Listview

    • funkey
    • 10. November 2009 um 12:01
    Spoiler anzeigen
    [autoit]

    #Include <GuiListView.au3>
    #include <GUIConstants.au3>
    #include <Array.au3>

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

    Dim $array[11][2]
    $array[0][0] = "a"
    $array[0][1] = "a2"
    $array[1][0] = "b"
    $array[1][1] = "b2"
    $array[2][0] = "c"
    $array[2][1] = "c2"
    $array[3][0] = "d"
    $array[3][1] = "d2"
    $array[4][0] = "e"
    $array[4][1] = "e2"
    $array[5][0] = "f"
    $array[5][1] = "f2"
    $array[6][0] = "g"
    $array[6][1] = "g2"
    $array[7][0] = "h"
    $array[7][1] = "h2"
    $array[8][0] = "i"
    $array[8][1] = "i2"
    $array[9][0] = "j"
    $array[9][1] = "j2"
    $array[10][0] = "k"
    $array[10][1] = "k2"

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

    $gui = GUICreate("gui", 450, 450)
    GUISetState(@SW_SHOW)
    $index = 0
    $listview = GUICtrlCreateListView("Spalte1|Spalte2", 20, 30, 200, 150)
    For $i = 0 To UBound($array) - 1
    GUICtrlCreateListViewItem($array[$i][0] & "|" & $array[$i][1], $listview)
    Next
    $button = GUICtrlCreateButton("next element", 75, 300, 90, 30)
    Do
    $msg = GUIGetMsg()
    Select
    Case $msg = $button
    $read = _GUICtrlListView_GetItemTextString($listview, $index)
    $index += 1
    _GUICtrlListView_SetItemSelected(GUICtrlGetHandle($listview), $index-1, False) ; Vorherigem Element Markierung entziehen
    _GUICtrlListView_SetItemSelected(GUICtrlGetHandle($listview), $index, True) ; Aktuelles Element markieren
    If $index >= _GUICtrlListView_GetItemCount($listview) Then $index = 0
    _GUICtrlListView_EnsureVisible(GUICtrlGetHandle($listview), $index)
    EndSelect
    Until $msg = $GUI_EVENT_CLOSE

    [/autoit]
  • Alle Dateinamen aus einem Ordner in Array

    • funkey
    • 8. November 2009 um 13:30
    [autoit]

    _FileListToArray

    [/autoit]
  • Maus over

    • funkey
    • 8. November 2009 um 13:11

    kleiner27 meinte wahrscheinlich eher das:

    [autoit]

    GUIGetCursorInfo

    [/autoit]

    ;)

  • Windowmover V 1.0

    • funkey
    • 3. November 2009 um 20:44

    Schnitzel: Ich hab auch mitgeholfen, das Skript zu kreieren ;)

    Ich finde es total sinnlos nur ein kompiliertes Skript hier rein zu stellen, da es nicht mal etwas so großartiges ist und außerdem in großen Teilen von unserer Gemeinschaft erstellt wurde. Ich werde die Exe-Datei sicher nicht ausführen.
    Sinn des Skripte-Forums ist es ja nach wie vor, dass wir voneinader lernen!

  • $cmdline parameter handle

    • funkey
    • 3. November 2009 um 10:53

    Netter Player bisher Daniel ;)
    Ich verstehe aber immer noch nicht ganz was du erreichen willst. Warum nimmst du nicht Drag 'n' Drop?

  • $cmdline parameter handle

    • funkey
    • 3. November 2009 um 09:58

    Du kannst z.B. über ControlSetText bei einem unsichtbaren Label des zweiten Programmes den Text ändern. Das zweite Programm prüft zyklisch ob sich der Text des Labels geändert hat und setzt dann dementsprechend die Variable.

  • [CDTray] Emm^^ irgend ein Fehler :D

    • funkey
    • 2. November 2009 um 23:08

    Funktioniert bei mir tadellos!
    Erstes Laufwerk auf, dann das zweite und dann beide wieder zu. Ohne irgendeinen Fehler.

    Was kommt denn für ein Fehler bei dir?

  • AutoCloseBrackets.lua für SciTE

    • funkey
    • 2. November 2009 um 23:05

    Auch von mir noch herzlichen Dank Greenhorn für diese tolle Erweiterung für Scite :thumbup::thumbup::thumbup::thumbup:
    Sollte wirklich ab sofort bei Scite4Autoit standardmäßig dabei sein!!

  • ScreenCapture Fehler

    • funkey
    • 2. November 2009 um 17:23

    Die Zeile deaktivieren ;)
    Die Variable wurde schon einmal definiert.

  • Hilfe bei Fenstermove gesucht

    • funkey
    • 2. November 2009 um 17:22

    So z.B.

    Spoiler anzeigen
    [autoit]

    #include <GUIConstants.au3>
    #include <WindowsConstants.au3>
    #include <StaticConstants.au3>

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

    Hotkeyset ("{UP}", "_WinMovehoch")
    Hotkeyset ("{DOWN}", "_WinMoverunter")
    Hotkeyset ("{LEFT}", "_WinMovelinks")
    Hotkeyset ("{RIGHT}", "_WinMoverechts")
    Hotkeyset ("{m}", "_WinMovemitte")
    Hotkeyset ("{ESC}", "_ende")

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

    Do
    $xpos = Random(5, 500, 1)
    Until Not Mod($xpos, 30)

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

    Do
    $ypos = Random(5, 500, 1)
    Until Not Mod($ypos, 30)

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

    $gui = GUICreate("Windowmover V 1.0", 230, 210, $xpos, $ypos, -1, 0x8)
    GUISetBkColor(0x0)
    $mitterot = GuiCtrlCreatePic("Bilddatein\mitterot.gif",93,90,45,30)
    $rhoch1 = GuiCtrlCreatePic("Bilddatein\rhoch1.gif",100,10,30,50)
    $rrunter1 = GuiCtrlCreatePic("Bilddatein\rrunter1.gif",100,150,30,50)
    $rlinks1 = GuiCtrlCreatePic("Bilddatein\rlinks1.gif",15,86,50,33)
    $rrechts1 = GuiCtrlCreatePic("Bilddatein\rrechts1.gif",160,86,50,33)
    $exit = GUICtrlCreateLabel("Exit",10,180,80,20)
    GUICtrlSetBkColor(-1, 0x000000)
    GUICtrlSetFont(-1, 12, 400, 1, "Arial")
    GUICtrlSetColor(-1, 0xFFFFFF)
    GUISetState(@SW_SHOW)

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

    Do
    $xpos = Random(5, 500, 1)
    Until Not Mod($xpos, 30)

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

    Do
    $ypos = Random(5, 500, 1)
    Until Not Mod($ypos, 30)

    $gui2 = GUICreate("Krieg mich!", 230, 210, $xpos, $ypos)
    GUISetState(@SW_SHOW)

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

    While 1
    Sleep(10)
    $msg = GUIGetMsg()

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

    Select
    Case $msg = $rhoch1
    _WinMovehoch()
    Case $msg = $rrunter1
    _WinMovehoch()
    Case $msg = $rlinks1
    _WinMovelinks()
    Case $msg = $rrechts1
    _WinMoverechts()
    Case $msg = $mitterot
    _WinMovemitte()
    Case $msg = $exit
    Exit
    EndSelect
    WEnd

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

    Func _Ende()
    Exit
    EndFunc

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

    Func _WinMovehoch()
    _DeSelectAll()
    GUICtrlSetImage($rhoch1, "Bilddatein\rhoch2.gif")
    $pos = WinGetPos("Windowmover V 1.0")
    WinMove("Windowmover V 1.0", "", $pos[0], $pos[1] -30)
    _Check()
    EndFunc

    Func _WinMoverunter()
    _DeSelectAll()
    GUICtrlSetImage($rrunter1, "Bilddatein\rrunter2.gif")
    $pos = WinGetPos("Windowmover V 1.0")
    WinMove("Windowmover V 1.0", "", $pos[0], $pos[1] + 30)
    _Check()
    EndFunc

    Func _WinMovelinks()
    _DeSelectAll()
    GUICtrlSetImage($rlinks1, "Bilddatein\rlinks2.gif")
    $pos = WinGetPos("Windowmover V 1.0")
    WinMove("Windowmover V 1.0", "", $pos[0] -30 , $pos[1])
    _Check()
    EndFunc

    Func _WinMoverechts()
    _DeSelectAll()
    GUICtrlSetImage($rrechts1, "Bilddatein\rrechts2.gif")
    $pos = WinGetPos("Windowmover V 1.0")
    WinMove("Windowmover V 1.0", "", $pos[0] +30 , $pos[1])
    _Check()
    EndFunc

    Func _WinMovemitte()
    _DeSelectAll()
    $pos = WinGetPos("Windowmover V 1.0")
    WinMove("Windowmover V 1.0", "", 370, 220)
    _Check()
    EndFunc

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

    Func _DeSelectAll()
    GUICtrlSetImage($rhoch1, "Bilddatein\rhoch1.gif")
    GUICtrlSetImage($rrunter1, "Bilddatein\rrunter1.gif")
    GUICtrlSetImage($rlinks1, "Bilddatein\rlinks1.gif")
    GUICtrlSetImage($rrechts1, "Bilddatein\rrechts1.gif")
    EndFunc

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

    Func _Check()
    $Pos1 = WinGetPos("Windowmover V 1.0")
    $Pos2 = WinGetPos("Krieg mich!")
    If $Pos1[0] = $Pos2[0] And $Pos1[1] = $Pos2[1] Then MsgBox(262144, "Hurra", "Geschafft")
    EndFunc

    [/autoit]
  • Netzwerk-Adapternamen aus DOS-Box auslesen? oder besser anders ?

    • funkey
    • 2. November 2009 um 11:38

    Dein ipconfig ist anscheinend neuer als meines, es hat leicht andere Ausgaben, aber vllt hilft dir auch das weiter.

    Spoiler anzeigen
    [autoit]

    #include <Constants.au3>

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

    Local $PID = Run(@ComSpec & ' /c ipconfig /all |find "Ethernet-Adapter"', "", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)
    Local $Name
    While 1
    $Name &= StdoutRead($PID)
    If @error Then ExitLoop
    WEnd

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

    Local $PID = Run(@ComSpec & ' /c ipconfig /all |find "Drahtlos-LAN-Adapter"', "", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)
    While 1
    $Name &= StdoutRead($PID)
    If @error Then ExitLoop
    WEnd

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

    Local $PID = Run(@ComSpec & ' /c ipconfig /all |find "IP-Adresse"', "", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)
    Local $IP
    While 1
    $IP &= StdoutRead($PID)
    If @error Then ExitLoop
    WEnd

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

    $Name = StringReplace($Name, @CRLF, "")
    $IP = StringReplace($IP, @CRLF, "")

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

    MsgBox(0, "STDOUT read:", $Name)
    MsgBox(0, "STDOUT read:", $IP)

    [/autoit]
  • >>> Dienstplanprogramm fertig für jeder man nutzbar <<<

    • funkey
    • 2. November 2009 um 10:37

    Das Programm gefällt mir sehr gut! Die Gui ist toll gelungen. :thumbup:
    Mir fehlen allerdings die österreichischen Feiertage (das Programm ist sonst nicht für jederman nutzbar :P)
    Ich würde außerdem zumindest die Monatsauswahl mittels einer Combobox realisieren.

  • Multiplayer-Game 'Kurven-Spiel'

    • funkey
    • 2. November 2009 um 09:37

    Simon, dein Problem ist mir unbekannt!? Welches Windows verwendest du? Welchen Theme? Bleibt deine Kurve einfach stehen und du fällst aus? Fahren die anderen Kurven alleine weiter? Kannst du mal auf einem anderen PC testen? Kannst du vllt einen Screenshot machen (HotKey p)? Startet sich dann keine neue Runde, wenn du ausgefallen bist?

  • Compile with options

    • funkey
    • 2. November 2009 um 08:59

    Scite4Autoit installieren ;)
    http://www.autoitscript.com/cgi-bin/getfil…iTE4AutoIt3.exe

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™