Systray aktualisieren

  • Ich habe über ein script VNC angestratet... wer VNC kennt, weiß dass das Icon immer im Systray hängenbleibt und erst wenn man drüberfährt verschwindet...

    gibt es irgendeine möglichkeit den systray zu aktualisieren wie zum beispiel den desktop oder so???

    greetz oli :irre:

  • ich habe bis jetzt noch gar nichts probiert, da ich keine ahnung hab wie ich das anstellen soll... jeder kennt doch den blöden vnc bug, das das icon erst dann verschwindet wenn man drüber fährt... is halt manchmal n bissl blöd, weil man denkt der viewer läuft noch da das icon noch da ist... wollte ich in dem sinne halt gleich beheben ;)

    nu denn vielleicht isses jtzt n bissl klarer...

    greetz
    oli

  • verstehe gerade nicht was du meinst... was für standardbefehle meinst du denn?

    hat vielleicht noch jemand anderes eine idee???

    danke aber trotzdem schonmal ;

    gruß oli

  • also @ th.meger...

    dieser befehl funzt ned :(

    [autoit]

    WinSetState("class=Shell_TrayWnd","", @SW_SHOW)

    [/autoit]

    sonst noch jemand ne idee???

    gruß oli

  • Da gibt es ein Tip zum Thema, nur das kode gucken, Autoit kann man auch verstehenLink zum Systray Aktualiezieren
    Ich habe nicht selbst getestet, aber es sieht gut aus vom Komentare :)

    Alles Gute

    3 Mal editiert, zuletzt von BasicOs (13. April 2007 um 03:40)

  • hab mitlerweile schon ne lösung gefunden!

    wens interressiert hier die funktion:

    [autoit]


    Func _RefreshSystemTray($nDelay = 1000)
    Local $oldMatchMode = Opt("WinTitleMatchMode", 4)
    Local $oldChildMode = Opt("WinSearchChildren", 1)
    Local $error = 0
    Do
    Local $hWnd = WinGetHandle("classname=TrayNotifyWnd")
    If @error Then
    $error = 1
    ExitLoop
    EndIf
    Local $hControl = ControlGetHandle($hWnd, "", "Button1")

    If $hControl <> "" And ControlCommand($hWnd, "", $hControl, "IsVisible") Then
    ControlClick($hWnd, "", $hControl)
    Sleep($nDelay)
    EndIf
    Local $posStart = MouseGetPos()
    Local $posWin = WinGetPos($hWnd)
    Local $y = $posWin[1]
    While $y < $posWin[3] + $posWin[1]
    Local $x = $posWin[0]
    While $x < $posWin[2] + $posWin[0]
    DllCall("user32.dll", "int", "SetCursorPos", "int", $x, "int", $y)
    If @error Then
    $error = 2
    ExitLoop 3;
    EndIf
    $x = $x + 8
    WEnd
    $y = $y + 8
    WEnd
    DllCall("user32.dll", "int", "SetCursorPos", "int", $posStart[0], "int", $posStart[1])
    If $hControl <> "" And ControlCommand($hWnd, "", $hControl, "IsVisible") Then
    ControlClick($hWnd, "", $hControl)
    EndIf
    Until 1
    Opt("WinTitleMatchMode", $oldMatchMode)
    Opt("WinSearchChildren", $oldChildMode)
    SetError($error)
    EndFunc

    [/autoit]

    also bei mir funktionierts einwandfrei!