Celtic88 Posted April 16, 2013 Share Posted April 16, 2013 I create a program similar to "teamviewer" I want a way get full path of active window only windows dir thank your for help ! http://youtu.be/YAViwdeN8uM Link to comment Share on other sites More sharing options...
AZJIO Posted April 16, 2013 Share Posted April 16, 2013 (edited) http://autoit-script.ru/index.php/topic,5789.msg42085.html#msg42085 expandcollapse popup#include <Array.au3> $aWinList = WinList("[REGEXPCLASS:(Explore|Cabinet)WClass]") ReDim $aWinList[$aWinList[0][0]+1][3] For $i = 1 To UBound($aWinList) - 1 $aWinList[$i][2]=_GetWindowsExplorerPath($aWinList[$i][1]) Next _ArrayDisplay($aWinList, "aWinList") ; http://www.autoitscript.com/forum/topic/89833-windows-explorer-current-folder/page__view__findpost__p__875837 Func _GetWindowsExplorerPath($hWnd) If Not IsHWnd($hWnd) Then Return SetError(1) Local $aWinList = WinList("[REGEXPCLASS:(Explore|Cabinet)WClass]") While 1 For $i = 1 To UBound($aWinList) - 1 If $hWnd = $aWinList[$i][1] Then ExitLoop 2 Next Return SetError(2) WEnd Local $oShellApp = ObjCreate("Shell.Application") If Not IsObj($oShellApp) Then Return SetError(3) Local $oShellApp_Windows = $oShellApp.Windows() If Not IsObj($oShellApp_Windows) Then Return SetError(4) For $oShellApp_Inst In $oShellApp_Windows If $oShellApp_Inst.hwnd = $hWnd Then ExitLoop Next Local $iShellApp_Inst_SelectedItems_Count = $oShellApp_Inst.document.SelectedItems.Count Local $sShellApp_Inst_LocationURL = $oShellApp_Inst.LocationURL Local $aRet = DllCall('shlwapi.dll', 'long', 'PathCreateFromUrlW', 'wstr', $sShellApp_Inst_LocationURL, 'wstr', '', 'dword*', 65534, 'dword', 0) If Not @error And $aRet[0] = 0 Then $sShellApp_Inst_LocationURL = $aRet[2] $oShellApp = 0 $oShellApp_Windows = 0 $oShellApp_Inst = 0 Return $sShellApp_Inst_LocationURL EndFunc ;==>_GetWindowsExplorerPath Edited April 16, 2013 by AZJIO My other projects or all Link to comment Share on other sites More sharing options...
FireFox Posted April 16, 2013 Share Posted April 16, 2013 Not really efficient if you have to click on refresh everytime Link to comment Share on other sites More sharing options...
Celtic88 Posted April 16, 2013 Author Share Posted April 16, 2013 (edited) Not really efficient if you have to click on refresh everytime Because it is multi-functional http://youtu.be/cRw6ODFW4q0?t=2m Edited April 16, 2013 by JustBegun Link to comment Share on other sites More sharing options...
FireFox Posted April 16, 2013 Share Posted April 16, 2013 (edited) Well, it's not related. Edit: If you need an efficient auto refresh, I thought about checking area changes on the screen thanks to the PixelCheckSum function (or from the FastFind library). This is only a primary idea, there is some advanced code to do. Edited April 16, 2013 by FireFox Link to comment Share on other sites More sharing options...
Celtic88 Posted April 17, 2013 Author Share Posted April 17, 2013 RE thank you AZJIOfunction add ^^ http://www.youtube.com/watch?v=nHVvc4M5KVw Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now