Use of UDC's

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
jcmn
Posts: 179
Joined: 18 Sep 2007 11:34
Location: portugal

Use of UDC's

Post by jcmn »

I have the following command line for an aplication and I want to create a UDC for it:

"C:\Program Files\StatNeth\Blaise 4.7 Enterprise\Bin\dep.exe" file1 /Ffile2

How to implement a UDC so that I can select in the list view the two files (file1 and file2) in the proper order?

admin
Site Admin
Posts: 65185
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Use of UDC's

Post by admin »

jcmn wrote:I have the following command line for an aplication and I want to create a UDC for it:

"C:\Program Files\StatNeth\Blaise 4.7 Enterprise\Bin\dep.exe" file1 /Ffile2

How to implement a UDC so that I can select in the list view the two files (file1 and file2) in the proper order?
Ah, interesting task. It's not possible yet.

Explain shortly what you need in general terms. Is it that you always pass 2 files to be compared or so?

jcmn
Posts: 179
Joined: 18 Sep 2007 11:34
Location: portugal

Post by jcmn »

What I need is to select the file1 and file2 in the folder list (they are in the same folder) in a manner that XYPlorer can distinguish them.

file1 is a configuration file and file2 is a data file. They have different extensions (file1 has BMI extension and file2 has BDB extension).

For example can I use

"C:\Program Files\StatNeth\Blaise 4.7 Enterprise\Bin\dep.exe" <items>.bmi /F<items>.bdb

or is it

"C:\Program Files\StatNeth\Blaise 4.7 Enterprise\Bin\dep.exe" <base>.bmi /F<base>.bdb

admin
Site Admin
Posts: 65185
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Post by admin »

jcmn wrote:What I need is to select the file1 and file2 in the folder list (they are in the same folder) in a manner that XYPlorer can distinguish them.

file1 is a configuration file and file2 is a data file. They have different extensions (file1 has BMI extension and file2 has BDB extension).

For example can I use

"C:\Program Files\StatNeth\Blaise 4.7 Enterprise\Bin\dep.exe" <items>.bmi /F<items>.bdb

or is it

"C:\Program Files\StatNeth\Blaise 4.7 Enterprise\Bin\dep.exe" <base>.bmi /F<base>.bdb
Currently you cannot do it with XY. But I'll add it. I probably add 2 or 3 new variables of the form <item1>, <item2>, <item3>. Item 1 is always the focused one, and item 2 is the next one (in the current list order), etc.

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Post by TheQwerty »

admin wrote:Currently you cannot do it with XY. But I'll add it. I probably add 2 or 3 new variables of the form <item1>, <item2>, <item3>. Item 1 is always the focused one, and item 2 is the next one (in the current list order), etc.
I had wanted to request something similar but couldn't think of a good way to do this. That sounds like it will work fine but might be a tad confusing to new users.


Slightly off topic, could we get a variable <path> (or similar) which contains the current working path regardless of selection? (Or does one already exist?)

admin
Site Admin
Posts: 65185
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Post by admin »

TheQwerty wrote:
admin wrote:Currently you cannot do it with XY. But I'll add it. I probably add 2 or 3 new variables of the form <item1>, <item2>, <item3>. Item 1 is always the focused one, and item 2 is the next one (in the current list order), etc.
I had wanted to request something similar but couldn't think of a good way to do this. That sounds like it will work fine but might be a tad confusing to new users.


Slightly off topic, could we get a variable <path> (or similar) which contains the current working path regardless of selection? (Or does one already exist?)
<curpath>

If you have a less confusing way... :)

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Post by TheQwerty »

admin wrote:<curpath>
Awesome! Are these all documented somewhere?
admin wrote:If you have a less confusing way... :)
Unfortunately, not really. That will work perfectly for the advanced users, and I'm not sure you need to worry about new users (UDC is an advanced feature after all).


One thought I originally had was to include a way for the user to create a UDC that when run would display a dialog listing the selected files and giving the user the ability to change the order.

A more universal idea was to extend the Clipboard functionality so it was more of a collection utility. Include the ability to ap-/pre-pend selected files to the clipboard as well as remove them. Additionally the user can use the Files on Clipboard LM. (This is something I'd like to see eventually regardless of use in UDCs.)


In either case use some set of numbered variables like <item1> ... <itemX> in the manner you were already thinking. For the latter, there could even be a <ClippedItems> that is just like <items> but uses the clipboard instead of selection.


In the end, I just felt that it was all coming down to being a lot more complicated for you to code with not a lot of gain for the users.

What you suggest is probably the best compromise between the two.

admin
Site Admin
Posts: 65185
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Post by admin »

TheQwerty wrote:
admin wrote:<curpath>
Awesome! Are these all documented somewhere?
Click the "Tips..." button in UDC dialog...
TheQwerty wrote:
admin wrote:If you have a less confusing way... :)
Unfortunately, not really. That will work perfectly for the advanced users, and I'm not sure you need to worry about new users (UDC is an advanced feature after all).

One thought I originally had was to include a way for the user to create a UDC that when run would display a dialog listing the selected files and giving the user the ability to change the order.

A more universal idea was to extend the Clipboard functionality so it was more of a collection utility. Include the ability to ap-/pre-pend selected files to the clipboard as well as remove them. Additionally the user can use the Files on Clipboard LM. (This is something I'd like to see eventually regardless of use in UDCs.)


In either case use some set of numbered variables like <item1> ... <itemX> in the manner you were already thinking. For the latter, there could even be a <ClippedItems> that is just like <items> but uses the clipboard instead of selection.


In the end, I just felt that it was all coming down to being a lot more complicated for you to code with not a lot of gain for the users.

What you suggest is probably the best compromise between the two.
<ClippedItems> is an idea, although I'm a bit hesitating: the clipboard is a shared and hidden object. Who knows what's on there? I personally would be very careful depending on the command.

BTW: What I will add soon are variables that open a prompt, like <getfile> or <getnewname>. Interactive UDCs - the next logical step.

bergfex
Posts: 188
Joined: 07 Sep 2007 19:06

Post by bergfex »

admin wrote:What I will add soon are variables that open a prompt, like <getfile> or <getnewname>. Interactive UDCs - the next logical step.
Wow, it gets better and better... :P

Post Reply