回复 15# kxing  
 
今天研究了一天   
获取文件夹是没问题的,在地址栏编辑也没事. 
就是有些,比如本地磁盘,我的文档...那些不能获取. 
 
HotKeySet('{ESC}', 'ex')
AdlibRegister('_GetRmCurrentOpenedAddress')
While 1
        Sleep(100)
WEnd
Func _GetRmCurrentOpenedAddress()
        Local $IE, $CabinetWClass = '[CLASS:CabinetWClass]'
        Local $Shell = ObjCreate("Shell.Application")
        Local $CabinetWClass, $error, $win, $LocationURL
        If WinGetState($CabinetWClass) = 15 Then
                For $IE In $Shell.Windows()
                        ConsoleWrite($IE.LocationURL & @CRLF)
                        If StringInStr($IE.LocationURL, 'file:///') Then
                                $LocationURL = StringRegExpReplace($IE.LocationURL, 'file:///([^\r\n]+)', '\1')
                                $win = StringReplace(StringReplace($LocationURL, '%20', ' '), '/', '\')
                                        If WinActive(StringRegExpReplace($win, '.+\\([^\r\n]+)', '\1')) Then
                                                ToolTip($win)
                                                ExitLoop
                                        EndIf
                        EndIf
                        Sleep(10)
                Next
        Else
                ToolTip('')
        EndIf
EndFunc   ;==>_GetRmCurrentOpenedAddress
Func ex()
        Exit
EndFunc   ;==>ex
  |