User command with a dialog to enter parameters?

Discussion & Support for xplorer² professional

Moderators: fgagnon, nikos, Site Mods

Valery_Kondakoff
Member
Member
Posts: 34
Joined: 2004 Mar 05, 10:36

User command with a dialog to enter parameters?

Post by Valery_Kondakoff »

Hi!

Is it possible in Xplorer2 to create a User Command which will invoke a dialog asking user to enter some additional parameters before executing the program?

This feature is available in many File Managers (TC, FAR and others) but I still can't find it in Xplorer2... Am I missing something?
User avatar
fgagnon
Site Admin
Site Admin
Posts: 3737
Joined: 2003 Sep 08, 19:56
Location: Springfield

Post by fgagnon »

Not as such ...
but with the Script Wizard (Ctrl+B) you can preview your command script template before executing it.

Did you have a specific task in mind?
Valery_Kondakoff
Member
Member
Posts: 34
Joined: 2004 Mar 05, 10:36

Post by Valery_Kondakoff »

Yes, I just wanted to create a User Command 'Wget Activation':
wget.exe <here_are_presetted_options> <?Here is a request to enter an additional options>
This should allow me to copy the URL of the file I want to download to the System clipboard, launch the 'Wget Activation' command and paste the URL in the dialog window...

I'm pretty sure this is a very useful feature for an advanced file manager. If you like I can provide more details: how it is implemented in the other FMs...

BTW, can I ask an additional question? If there are some plans to have an option in Xplorer2 to 'put' the Console and Scrap windows into the Tabs  instead of 'standalone' windows?

Thank you!
User avatar
fgagnon
Site Admin
Site Admin
Posts: 3737
Joined: 2003 Sep 08, 19:56
Location: Springfield

Post by fgagnon »

I see wget is the gnu-spawn for ftp's get on windows, with capability of mirrorring whole sites; but not being a fan of mass internet file sharing, I claim no expertise in that area.
(I download apps & targetted research files one-at-a-time.)

However, what you describe sounds like a command script that can be put in a .bat (or .cmd) file with all the options you want and then run from commandline.
... probably not what you want for wget-ing in stream-of-consciousness mode while browsing sites.  :(

Maybe some of our file-sharing-aware users can describe how they approach the task with xplorer² ??  

re: plans -- I cannot say whether that is on nikos' list of ideas to consider. He's away this week: you may want to ask again later.
User avatar
nikos
Site Admin
Site Admin
Posts: 16401
Joined: 2002 Feb 07, 15:57
Location: UK

Post by nikos »

if it is a fixed command situation, then you don't really need a user command. You can use $-tokens though to create arguments automatically out of the files selected
chp
Bronze Member
Bronze Member
Posts: 70
Joined: 2004 Jan 27, 07:56

Post by chp »

It would be possible if new $-tokens for clipboard (bookmarks and history) to see the light (there was a discussion).

Console / Scrap > Tabs. Would be nice.. with Ctr+Tab to switch between Tabs (Shift+Tab to command line) :)
Valery_Kondakoff
Member
Member
Posts: 34
Joined: 2004 Mar 05, 10:36

Post by Valery_Kondakoff »

Nikos implemented the special token '$?' for entering additional parameters in the newest beta (1.1.0.91).

The new feature works exactly as I expected, except one thing: there are two buttons on 'Command argument' input dialog - 'OK' and 'Cancel'. In the current implementation the 'Cancel' button (and ESC key) are working exactly as 'OK' button (ENTER key): thus the string is transferred to command line when user press 'ENTER' and when he press 'ESC'. This should be fixed, just because something may go wrong when entering arguments and user may wants to interrupt the entire process.

Just an example: I'm creating a command with '$?' token. Here are three scenarios:

1) When executing, I'm entering a string in 'Command argument' input field and pressing 'Enter' (this is 'OK' button). The string is transferred to command line as an argument.
2) When executing, I'm pressing 'ESC' ('Cancel' button) instead of entering some text in 'Command line' input field. The entire command should be interrupted.
3) And if I just don't want to enter additional parameters I should press 'ENTER' without entering something in 'Command argument' input field.
CU
VK
User avatar
nikos
Site Admin
Site Admin
Posts: 16401
Joined: 2002 Feb 07, 15:57
Location: UK

Post by nikos »

that's kind of hard now
cancel is interpreted as "empty string" and the command continues
Valery_Kondakoff
Member
Member
Posts: 34
Joined: 2004 Mar 05, 10:36

Post by Valery_Kondakoff »

Nikos, I'm not saying, that this should be fixed immediately, but please, add this to your todo list:

- ENTER: put the argument to command line
- ENTER (on empty input field): empty string as an argument
- ESC: interrupt the command

This is a special token: it depends on user input and we should give a user a chance to change his mind: this is what differ the user from a computer. :)

Thanks! (BTW, this is why I suggested to discuss this feature before implementation in my message with 'long list of requests'!)
CU
VK