0 Members and 1 Guest are viewing this topic.
Open explorer windows can be discovered and programmed by using IShellWindows (CLSID_ShellWindows)...
Lee Mac and MickD,Thanks for the suggestions. I found something that may help, though it is a bit dated (refers to IE): https://learn.microsoft.com/en-us/windows/win32/shell/developing-with-windows-explorerQuoteOpen explorer windows can be discovered and programmed by using IShellWindows (CLSID_ShellWindows)...I think using WSH to access this I'll be able to do what I want.I'll post back what I find.
This has been bugging me for years as well! I may have found the solution today ( works on my computer Win 11, Version 10.0.22631 Build 22631) A simple mod from 'explore to 'open.Code - Auto/Visual Lisp: [Select](defun c:cd (/ _opendirectory) (defun _opendirectory (path / sa) (cond ((and (eq 'str (type path)) (findfile (vl-string-right-trim "\\" path)) (setq sa (vlax-create-object "Shell.Application")) ) ;; ;; RJP » 2024-02-14 ;; Using 'open vs 'explore will not open multiple windows with the same path (vlax-invoke sa 'open path) (vlax-release-object sa) ) ) (princ) ) (_opendirectory (getvar 'dwgprefix)))
QuoteThis has been bugging me for years as well! I may have found the solution today ( works on my computer Win 11, Version 10.0.22631 Build 22631) A simple mod from 'explore to 'open.Code - Auto/Visual Lisp: [Select](defun c:cd (/ _opendirectory) (defun _opendirectory (path / sa) (cond ((and (eq 'str (type path)) (findfile (vl-string-right-trim "\\" path)) (setq sa (vlax-create-object "Shell.Application")) ) ;; ;; RJP » 2024-02-14 ;; Using 'open vs 'explore will not open multiple windows with the same path (vlax-invoke sa 'open path) (vlax-release-object sa) ) ) (princ) ) (_opendirectory (getvar 'dwgprefix)))That is exactly the behavior I wanted! Thanks! Now I need to dig through some of my older code and switch to this.