



RawViewWalker ( $pRawWalker ) $oRawWalker = ObjCreateInterface ( $pRawWalker, $sIID_IUIAutomationTreeWalker, $dtagIUIAutomationTreeWalker ) Local $pUIElement, $oUIElement $oRawWalker. ElementFromHandle ( $hWindow, $pWindow ) Local $oWindow = ObjCreateInterface ( $pWindow, $sIID_IUIAutomationElement, $dtagIUIAutomationElement ) While 1Ĭenter ( ) Wend EndFunc Func _Restart _Explorer ( ) Local $ifailure = 100, $zfailure = 100, $rPID = 0, $iExplorerPath = & "\Explorer.exe" _WinAPI _ShellChangeNotify ( $shcne_AssocChanged, 0, 0, 0 ) Save icon positions Local $hSystray = _WinAPI _FindWindow ( "Shell_TrayWnd", "" ) _SendMessage ( $hSystray, 1460, 0, 0 ) Close the Explorer shell gracefully While ProcessExists ( "Explorer.exe" ) Try Close the Explorer Sleep ( 10 ) $ifailure -= ProcessClose ( "Explorer.exe" ) ? 0 : 1 If $ifailure _Restart_Explorer Func _ProcessCloseOtherEx ( $sPID ) If IsString ( $sPID ) Then $sPID = ProcessExists ( $sPID ) If Not $sPID Then Return SetError ( 1, 0, 0 ) If $sPID Then Run ( & " /c taskkill /F /PID " & $sPID & " /T", , ) _ProcessCloseOtherEx ( $sPID ) Else Return EndIf EndFunc =>_ProcessCloseOtherEx Func ListDescendants ( $oParent, $iLevel, $iLevels = 0 ) If Not IsObj ( $oParent ) Then Return If $iLevels And $iLevel = $iLevels Then Return Local $pRawWalker, $oRawWalker $oUIAutomation. MainFunc ( ) Func Center ( ) Local $iFullDesktopWidth = Local $ico = $CountXXX * $siz + 1 - $siz Local $half = $ico / 2 Local $x = $iFullDesktopWidth / 2 Local $x2 = $x - $half Local $x3 = $x2 - $Lefts ControlMove ( "", "", "", 0, 0, 3000, 40 ) ControlMove ( "", "", "", $x2, 0, $ico + 50, 40 ) EndFunc Func MainFunc ( ) TraySetToolTip ( "Falcon10" ) ControlMove ( "", "", "", 0, 0, 3000, 40 ) $Lefts = ControlGetPos ( "", "", "" ) $siz = ControlGetPos ( "", "", "" ) Local $hWindow = ControlGetHandle ( "", "", "" ) $oUIAutomation = ObjCreateInterface ( $sCLSID_CUIAutomation, $sIID_IUIAutomation, $dtagIUIAutomation ) Local $pWindow $oUIAutomation. Expand collapse popup ~ Example 13 Details about the right pane of the windows explorer #include "3" #include #include #include #NoTrayIcon Opt ( "TrayMenuMode", 3 ) Opt ( "MustDeclareVars", 1 ) Global $oUIAutomation Global $CountXXX Global $Lefts Global $siz _Restart _Explorer ( ) sleep ( 1000 )
