User Commands in Catalog

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
Ramesh
Posts: 12
Joined: 02 Sep 2013 08:39

User Commands in Catalog

Post by Ramesh »

I have created a new user command with the command ID #1400. This is a script for moving selected files to one or more folders which is displayed as a menu to the user (depending on the choice made by the user, the selected files gets moved to that folder).

I tried adding this user command to the catalog using command ID #1400 (which is the command ID for the script), by typing "::#1400" in the location field for the catalog item. Whenever I click the catalog item, I get an error message - "Nothing selected or what is selected cannot be moved" followed by a dialog box which states that the Command "moveto" failed or was cancelled.

The user command works perfectly when I execute it from "User" menu - Run Script.

Can you pls let me know if I can add user commands to Catalog and whether the process that I followed is correct or is it a bug in Xyplorer?

Enternal
Posts: 1175
Joined: 10 Jan 2012 18:26

Re: User Commands in Catalog

Post by Enternal »

Perhaps could you post the script code so that it can be tested? I had similar issues before but it was due to some scripting command I used.

Ramesh
Posts: 12
Joined: 02 Sep 2013 08:39

Re: User Commands in Catalog

Post by Ramesh »

This is the script that I have used in user Command

"MoveTo Best Practices"
MoveTo "C:\Backup\My Files\Quick Access\Best Practises\"

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

Re: User Commands in Catalog

Post by admin »

Your script need to focus the list first. Because when you click the catalog the focus is on the catalog.

Code: Select all

focus "L";
[moved the topic to questions]

Ramesh
Posts: 12
Joined: 02 Sep 2013 08:39

Re: User Commands in Catalog

Post by Ramesh »

Thanks. Can you please also add an example in your website for the benefit of other users.

Stef123

Re: User Commands in Catalog

Post by Stef123 »

Trying to reproduce:
User Commands > Move To: Where do I insert the <<focus "L";>> ?

highend
Posts: 14953
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: User Commands in Catalog

Post by highend »

He ist using Run Script, not Move To as the category in the user commands :)
One of my scripts helped you out? Please donate via Paypal

Stef123

Re: User Commands in Catalog

Post by Stef123 »

Thanks highend,
Scripting is still intimidating me. :? Reluctant to get into it. :whistle:
I can see the fun you all have with it. But I also noticed it often takes several passes to get it right. Not always do I have as much time at hand as these days.

When I am out again in the heat of business I need to feel in control, competent and able to fix small issues on the spot. Not a good time to debug when your attention is bound up elsewhere.

Catalog: I tried that user command to move a folder (because I noticed the catalog won't adapt the path if I move it in the list.
1) Will it do so if I get the move to work from the catalog?
2) Could someone please walk me through? What goes where, field-wise.

Post Reply