External App with items from both panes revisited?

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
Kucera
Posts: 108
Joined: 31 Mar 2008 01:37
Location: Canada
Contact:

External App with items from both panes revisited?

Post by Kucera »

Trying to get items from both panes into Beyondcompare, found the script at
http://www.xyplorer.com/xyfc/viewtopic. ... 796#p40796
but it brings me a bunch of errors (that is after editing the path, too). Is there perhaps an update somewhere?

Second question: the Load script file shows me the scripts from \application data\xyplorer\scripts , which I suspect is a remnant of switching to the portable version. How can I make it point to C:\Program Files\XYplorer\Scripts\ ?

Regards Emil

Stefan
Posts: 1360
Joined: 18 Nov 2008 21:47
Location: Europe

Re: External App with items from both panes revisited?

Post by Stefan »

Kucera wrote:Trying to get items from both panes into Beyondcompare, found the script at
http://www.xyplorer.com/xyfc/viewtopic. ... 796#p40796
but it brings me a bunch of errors (that is after editing the path, too). Is there perhaps an update somewhere?
Which sub-script of that script brings you an error?
Which error is that? What did you see: " "?
How looks your edited path?
Best post your version of that script here so we all see what we talked about and take an look where the mistake may be.


Kucera wrote: Second question: the Load script file shows me the scripts from \application data\xyplorer\scripts , which I suspect is a remnant of switching to the portable version. How can I make it point to C:\Program Files\XYplorer\Scripts\ ?

Regards Emil
It seams your xydata is there under "AppData\xyplorer"?!
You should correct this if you don't want this (AppData is used for multi user and if you have no write access to ProgramFiles)
But i don't know how right from my mind. I will take an look, or you may find it by an forum search.... it's there several times... maybe in the wiki too?

As an work around you can just use this for the load command:
load "C:\Program Files\XYplorer\Scripts\scriptname";


_

Kucera
Posts: 108
Joined: 31 Mar 2008 01:37
Location: Canada
Contact:

Re: External App with items from both panes revisited?

Post by Kucera »

Which sub-script of that script brings you an error?
Which error is that? What did you see: " "?
How looks your edited path?
Best post your version of that script here so we all see what we talked about and take an look where the mistake may be.
Here's the script
BCompare.xys
(2.48 KiB) Downloaded 90 times
and a couple of the error windows:
one.png
one.png (10.69 KiB) Viewed 1116 times
two.png
two.png (10.38 KiB) Viewed 1116 times
seems it hiccups at the " mark?
At the end it gives your message about "Bcompare.exe not found, edit script and check path"

As for my second question, putting a permanent startup path in the config takes care of that.
Thanks and regards Emil

Stefan
Posts: 1360
Joined: 18 Nov 2008 21:47
Location: Europe

Re: External App with items from both panes revisited?

Post by Stefan »

OK, just looking at your script. Don't know if i can work it out right now.

First mistake i have seen already:

Syntax rules for XYplorer Script Files
1.) The first line of an script has to start at column 1.
2.) Only the first line of an script starts at column 1. All others starts at column 2 or more.
3.) If an script has an "Caption" (or an "Label" for multi-script scripts) then this label has to start at column 1, instead of the first script line, which starts at column 2 or more then.


I think this part is missing in the help at "Syntax rules for XYplorer Script Files"


So Emil should remove the spaces before the captions like

Code: Select all

    "... Current open Folders from L/R pane"
    "... Selected Files or Folders from L/R pane"
and so on.

- - -

Edit

Second mistake:
"<xypath>"
is resolved (in Emils case) to
"C:\Program Files\XYplorer"

So
"<xypath>c:\Beyond Compare 3\ ......."
is resolved (in Emils case) to
"C:\Program Files\XYplorerc:\Beyond Compare 3\ ......."

Solution:
delete this "<xypath>" -part to get:
"c:\Beyond Compare 3\ ......."

--

Additional explanation:

my used syntax like
"<xypath>\..\WinMerge\............."

means
1.) resolved "<xypath>" to (e.g.) "C:\Program Files\XYplorer"
2.) add an backslash \ >> "C:\Program Files\XYplorer\"
3.) "..\" means: go one level up from "C:\Program Files\XYplorer\" to "C:\Program Files\" (in this example)
4.) go into an sub-folder "WinMerge\"

If ones folder structure is not so that this relative path match, then the script fails.
Since my "WinMerge"-folder is on the same folder level as my "XYplorer"-folder this relative path works for me.
It's like
X:\one\Beyond Compare\
X:\one\PSPad\
X:\one\WinMerge\
X:\one\XYplorer\

Hope this helps for better understanding relative paths.

- - -

EDIT

Hint:
if you want to use "Edit this script : edit",
and if you didn't have an "Tools"-subfolder with "Notepad2" in your XYplorer folder,
then modify:
OpenWith "<xypath>\Tools\NotePad2\Notepad2.exe", ,$ScriptFile;
to something simple like:
OpenWith "Notepad", ,$ScriptFile;


- - -

EDIT
please find the overworked script as attachment. (Untested, but should work?)
BCompare2.xys
Clean up-ed script.
(2.48 KiB) Downloaded 109 times
HTH? :D

_

Kucera
Posts: 108
Joined: 31 Mar 2008 01:37
Location: Canada
Contact:

Re: External App with items from both panes revisited?

Post by Kucera »

please find the overworked script as attachment. (Untested, but should work?)
I am deeply obliged to you, Sir! :) The script you posted works as advertised. Now I am going to delve into your explanations, but first wanted to thank you and let you know.
Best regards Emil

Post Reply