bedazzled Posted February 23, 2005 Posted February 23, 2005 hello: Im trying to get the full path of a folder window... when the address bar is switched off, so there is no window text (hidden or otherwise) to grab... Im trying to get there using a user32.dll call : $string = "" $handle = wingethandle ("", "") $ret = dllcall ("user32.dll", "int", "GetWindowText", "hwnd", $handle, "str", $string, "int", "1024") msgbox (1, "error ", @ERROR & " handle " & $handle, 1) msgbox (1, "ret ", $ret & "" & $string, 1) but with out much success so far ... the guts of the dll function obtained from: 'http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/windows/windowreference/windowfunctions/getwindowtext.asp'
CyberSlug Posted February 24, 2005 Posted February 24, 2005 The following should work even if the address bar is hidden. But I'm assuming the address bar is configured to show the full path: $handle = wingethandle ("", "") ;whatever ControlGetText($handle, "", "ComboBoxEx321") Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
bedazzled Posted February 24, 2005 Author Posted February 24, 2005 Thanks Cyberslug ... unfortunately.... still no joy with the address bar off.. even adding the ControlEnable line ControlEnable ($handle, "", "ComboBoxEx321") $ret = ControlGetText($handle, "", "ComboBoxEx321") it does work with the address bar on .... but still no go with it off
CyberSlug Posted February 24, 2005 Posted February 24, 2005 Hmmm... I've played with ControlListView, but it only gives the names of files WITHOUT The full path. What exactly are you trying to accomplish? Are there any constraints on what the folder might contain, or is this for any arbitrary folder? Also, is this for Windows 2000/XP or 9x (or all)? I'm sure there is some solution.... Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
bedazzled Posted February 24, 2005 Author Posted February 24, 2005 I need to get hold of the full path of the folder window (any old folder will do .. doesnt matter whats in it) ... so i can use that path to automate a further bit of stuff ... I have thought about just scripting the address bar on and then off again, but it seems a bit clunky as i cant hide the menus as it happens ( ie if i hide the window ... the menus still show .... unless you know of a way to hide the menus too)... This tie in between a folder window and its full path is a bit tricky if the address bar is not on ... I thought about taking it directly from the user32.dll but havnt got that to work ... those are really the only 2 ways i can think of atm
CyberSlug Posted February 24, 2005 Posted February 24, 2005 See if this helps you.... It would probably be better just to change the registry key directly but I haven't figured out yet how to force all windows to refresh after the change it made.... ; Force windows to show full path in title bar If RegRead("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\CabinetState", "FullPath") = 0 Then Opt("WinWaitDelay", 10) ;speed things up a bit Run("cmd /c rundll32 shell32.dll,Options_RunDLL", "", @SW_HIDE) WinWait("Folder Options") WinSetState("Folder Options", "", @SW_MINIMIZE);works faster than @SW_HIDE ? ControlSend("Folder Options", "", "SysTabControl321", "^{Tab}") ControlFocus("Folder Options", "", "SysTreeView321") ControlSend("Folder Options", "", "SysTreeView321", "{Down 6}{SPACE}") ControlClick("Folder Options", "", "OK") EndIf Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
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