Page 1 of 1

Command line

Posted: 02 Apr 2012 12:56
by mustbe
having another look at xyplorer after i saw that very great bitsdujour deal, which i sadly missed :(

anyway, i was wondering if it's possible to open xyplorer in dual panes by passing two path parameters in the command line.

something like:

xyplorer.exe left="path1" right="path2"

with path1 and path2 not being hard coded (the values would be coming from another software, paths are changing)

p.s. do you have future plans of offering the same discount again? im not saying that xyplorer is not worth it's current price (coz it's not), it's just that i'm currently flat broke
:oops:

thank you

Re: Command line

Posted: 02 Apr 2012 13:11
by highend
anyway, i was wondering if it's possible to open xyplorer in dual panes by passing two path parameters in the command line.
It depends of what your source application can "output".

From the helpfile:
Configuration - Command Line Switches:

XYplorer.exe /script="::msg 'Hi!';"

If your app can call an external app with a customized string like this:
/script="::focus('P2'); goto('<second path>'); focus('P1'); goto('<first path>');"

it would work.

Otherwise you'd need a simple wrapper (e.g. compiled autoit script),
that takes both arguments (paths) from the source app and builds this custom string
to invoke XYplorer with it.

At least I don't know any direct way to achieve this.

Edit:

@Don: I hope it's okay to use the XYplorer icon for the compiled file? Otherwise drop me a note and I'll remove it.

Code: Select all

#NoTrayIcon
#Region
#AutoIt3Wrapper_Icon=StartXYplorer.ico
#AutoIt3Wrapper_Outfile=StartXYplorer.exe
#AutoIt3Wrapper_UseUpx=n
#AutoIt3Wrapper_UseX64=n
#AutoIt3Wrapper_Res_requestedExecutionLevel=asInvoker
#AutoIt3Wrapper_Res_Comment=CheckProcess for XYplorer
#AutoIt3Wrapper_Res_LegalCopyright=Highend 2012
#AutoIt3Wrapper_Res_Fileversion=1.0.0.0
#EndRegion

; #SETTINGS# ====================================================================================================================
Global $configFile = "StartXYplorer.ini"
Global $configFilePath = @ScriptDir & "\" & $configFile

; #MAIN PART# ===================================================================================================================
$result = FileExists($configFilePath)
If $result = 0 Then
	MsgBox(4096, @ScriptName, $configFile & " not found, aborted!")
	Exit
EndIf

$appFilePath = IniRead($configFilePath, "General", "ApplicationPath", "NotFound")
If $appFilePath = "NotFound" Then
	MsgBox(4096, @ScriptName, "Key: ApplicationPath is missing in " & $configFile & " , aborted!")
	Exit
EndIf

; Check command line parameters
If $CmdLine[0] = 2 Then
	$pathFirst = $CmdLine[1]
	$pathSecond = $CmdLine[2]
Else
	MsgBox(4096, @ScriptName, "You must supply two paths as arguments, aborted!")
	Exit
EndIf

; Call XYplorer with both paths
ShellExecute ('"' & $appFilePath & '"', "/script=" & '"' & "::focus('P2'); goto('" & $pathSecond & "'); focus('P1'); goto('" & $pathFirst & "');" & '"' & " /flg=2")
That should work (tried it at least with a portable installation).

Attached: .exe & .ini as a .zip file.

You have to copy the StartXYplorer.exe and StartXYplorer.ini into the same location and afterwards you have to edit the StartXYplorer.ini file.

Adapt the path

Code: Select all

ApplicationPath=D:\Tools\XYplorer\XYplorer.exe
to your XYplorer installation.

Then you can call XYplorer from an external application with:

Code: Select all

<your path to StartXYplorer.exe>\StartXYplorer.exe "<path for left side>" "<path for right side>"
StartXYplorer.zip
(319.02 KiB) Downloaded 204 times

Re: Command line

Posted: 05 Apr 2012 06:56
by mustbe
Wow, that's amazing. I'll give it a try later on (computer's currently offline, backup/restore time). Thank you.

I actually would like to try to use xyplorer together with Total Commander.

I was thinking of opening the current left path and the current right path of Total Commander in xyplorer by passing those paths through the command line, would make the transition smoother.

Thanks once again, much appreciated.

Re: Command line

Posted: 05 Apr 2012 07:39
by j_c_hallgren
mustbe wrote:p.s. do you have future plans of offering the same discount again? im not saying that xyplorer is not worth it's current price (coz it's not), it's just that i'm currently flat broke
:oops:
Not sure what Don's plans are but I know he's done BDJ offer twice thus far...once a year is possible frequency...he has announced it here on forum so keep watching!