vivadixie wrote:
For this to work Xplorer2 must already be open and I'm sure that the AHK code can be improved - perhaps to speed up the send of the path to xplorer.
Issue: Sometimes it seems to paste an extra quote at the end of the path for certain bookmarks. If this happens I recreate the bookmark and goes away. You could improve the script to check for and remove the quote.
This was I use as a reliable solution to open directories over command line:
Code:
; Explorer2 Opener - Command Line Script -- by Winkie
; -- Version: 1.0 -- Last update: 7 Oct 2007
#NoTrayIcon
#SingleInstance, Force
If 0 <> 1
ExitApp
StringReplace, 1, 1, ",, All
vVar = %1%
IfWinExist, ahk_class ATL:ExplorerFrame
{
WinActivate ahk_class ATL:ExplorerFrame
funcChangeFolder( vVar )
}
Else
{
Run, c:\program files\zabkat\xplorer2_lite\xplorer2.exe, , Max, vPid
WinWait, ahk_pid %vPid%
Sleep, 5000
WinActivate,ahk_pid %vPid%
funcChangeFolder( vVar )
}
ExitApp
Return
funcChangeFolder( pTarget )
{
ControlGetPos, vEdit1Pos,,,, Edit1, A
If vEdit1Pos <> ; It has an Edit1 Control.
{
ControlSetText, Edit1, %pTarget%, A
ControlFocus Edit1, A
ControlSend, Edit1, {Right}{Enter}, A
}
}