Various Script Wishes

Features wanted...
graham
Posts: 457
Joined: 24 Aug 2007 22:08
Location: Isle of Man

Post by graham »

Is it possible to add a small enhancement to the msg command to include msg on and off for information only purposes?

Use:

When long processes are in progress eg. find or backup it would be useful to display a msg (on) which requires no action it just informs and is removed by msg (off). Thus a script with a long process would have

msg "backup in progress - please wait....",on;
backupto $path, C:\program files\xyplorer\;

//and after completion

msg "",off;

or something similar?

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

Post by admin »

graham wrote:Is it possible to add a small enhancement to the msg command to include msg on and off for information only purposes?
Keeping a dialog up while the process is running is not possible. But I could put a message on the statusbar (new command ::status), and play a sound when done (new command ::ding or ::wav). :)

graham
Posts: 457
Joined: 24 Aug 2007 22:08
Location: Isle of Man

Post by graham »

yes, I like that - it is good for the user to see something is in progress - great, bte really appreciate the hard work doing the help files - very professional!

If you go this way then maybe forget the info msg popup that comes with certain commands eg #182 - very annoying as it requires acknowledgement and sound play!

jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

Post by jacky »

admin wrote:Keeping a dialog up while the process is running is not possible. But I could put a message on the statusbar (new command ::status), and play a sound when done (new command ::ding or ::wav). :)
Yeah, I like those ideas as well :)
Proud XYplorer Fanatic

graham
Posts: 457
Joined: 24 Aug 2007 22:08
Location: Isle of Man

Post by graham »

would that work with something like backup which already uses the statusbar for its progress?

If you coded

status "Backup xyz in progress - please wait...";
backupto $path, C:\program files\xyz\;
status "Backup completed";


then the initial status msg is instantly overwritten by the backupto one.
personally, I would prefer to just see the msg I have coded but others may prefer to see the one you already use!

Either way, it is good to be able to code status msgs.

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

Post by admin »

graham wrote:If you coded

status "Backup xyz in progress - please wait...";
backupto $path, C:\program files\xyz\;
status "Backup completed";
Good guess! :shock: :D

I did code exactly that! Try it...

PS: did not want to mention it before 7.0 is out, but okay, if my users have paranormal abilities... :wink:

jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

Post by jacky »

graham wrote:then the initial status msg is instantly overwritten by the backupto one.
personally, I would prefer to just see the msg I have coded but others may prefer to see the one you already use!
I'm sure the usual XY feedback is appreciated, though of course it could at times in script be better without. Maybe a command to disable status feedback from XY itself could be added ?
So one could chose whether or not its script will let XY send its usual feedback, or if not and the script must take care of it.
Proud XYplorer Fanatic

jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

Post by jacky »

It's been mentioned before (in this thread), that sometimes the use of a menu at mouse pointer position, might not be the best, especially when a menu calls another menu and so on, as it might go down and down and down...

With that said, I wouldn't want the menu to appear always on a corner or even in the middle of the screen. But I think that what might be a good solution would be that when a "first" script is called, XY would remember the current mouse position, and if a menu has to be popped up it will be from that position. So far, it doesn't change anything. But as long as the "script batch" is running (script file calling itself or another script file), that position is remembered and used for any other pop-up.

That way, every other menu will be popped up at the same position, so at least we can go through a few menus and so on and the menus stay about at the same position, instead of always going to the bottom-right corner.

I don't know if it would be (easily) doable, but if it is, I feel it might be a good solution. :?:
Proud XYplorer Fanatic

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

Post by TheQwerty »

I'd like to see either a function (GetTab(VariableName)) or a variable <activeTab> or <curTab> or similar which could be used to retrieve the current/active tab, to be later used by SelTab().

Currently with my settings if a script opens a new tab and then closes it, the right-most tab ends up active regardless of the active tab when the script starts.

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

Post by TheQwerty »

In the name of making things promptless...

RenameTab([Name]);

Renames the tab to Name.
If Name is omitted, the tab is un-named.

Twisten
Posts: 204
Joined: 27 Apr 2008 10:30

Post by Twisten »

a few ideas: :idea:
a script command to copy a variable to the clipboard
an edit clipboard dialog that works even if the content isn't filenames
the ablility to choose the menu icon for each UDC and Script

also: :!:
In the name of making things sane...
maybe jacky can come up with a suggestion to solve the whole quotes "
thing (maybe escape chars? some other way to mark parameter start/end and ignore all ",; etc inside?)
i've run into this especialy when handling strings with regex and it can make the script and especialy the pattern unreadable.

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

Post by admin »

a script command to copy a variable to the clipboard
-> copytext

quotes
-> use other characters in your expression, then replace them using replace
(never tried but should work)

Twisten
Posts: 204
Joined: 27 Apr 2008 10:30

Post by Twisten »

admin wrote:a script command to copy a variable to the clipboard
-> copytext
:shock: Holy C@#!, can't belive i missed that must have been pretty late when i
was searching for it since i actualy visited the wiki page for it, i'm sorry.
thank you very much :oops:
admin wrote:quotes
-> use other characters in your expression, then replace them using replace
(never tried but should work)
frankly its a bit of a headache trying to figure just how many " i need and counting them.
also using "" instead of " in a regex pattern means this pattern is xyplorer specific and less readable/reuseable.

if xyplorer knew that the whole thing is a parameter and not to mind special chars there wouldn't be a problem.

:idea: perhaps if inclosing a script command parameter in [] or {}
would tell xyplorer to ignore all special chars except <XY Variables> ?

:idea: or if calling a script command using variables like so:
command $1, $2 ,$3;
will be treated differently by xyplorer so it wouldn't need the parameters quoted even if for example the variable $2 contained some ,;" chars?

Twisten
Posts: 204
Joined: 27 Apr 2008 10:30

Post by Twisten »

Another wish/question, i noticed that while UDCs some script commands (e.g. openwith) have access to <items>
when trying to use it with other commands its just not parsed?

example:

Code: Select all

selfilter ,f,Name;
 focus l;
 set $cursel,<items>;
will result in $cursel containing the string "<items>" instead of the intended space seperated list of selected files.

is that intentional ? any reason while it shouldn't be changed to work ?
seems a shame not to have it.

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

Post by admin »

Twisten wrote:Another wish/question, i noticed that while UDCs some script commands (e.g. openwith) have access to <items>
when trying to use it with other commands its just not parsed?

example:

Code: Select all

selfilter ,f,Name;
 focus l;
 set $cursel,<items>;
will result in $cursel containing the string "<items>" instead of the intended space seperated list of selected files.

is that intentional ? any reason while it shouldn't be changed to work ?
seems a shame not to have it.
Scripting is a very young feature and still evolving. I'm currently collecting ideas for the next development phase.

Post Reply