Multi-user Tags and Comments

Features wanted...
admin
Site Admin
Posts: 60617
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Multi-user Tags and Comments

Post by admin »

jacky wrote:
Stefan wrote:Either i need an command to hide the executing of the script, so the user didn't see anything.
Or, - and this leads me to my next request which i want to do next- : execute report() command remote, i.e. without the need to go there first.
Like report("{}",, $TargetDir);
Yeah, a new param source for report() is an old wish of mine, and it makes sense, so I'm sure one day it'll find its way to the top of Don's to-do list... or just hijack his inspiration flow 8)
OK, I take a look at it now. I promised it long enough...

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

Re: Multi-user Tags and Comments

Post by admin »

Done! 8)

I wonder if I should overload the second parameter onlyselected rather than using a 5th parameter as I have done it in v9.30.0022?

onlyselected
0 = take all items in List
1 = take all selected items in List
else = itemlist

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

Re: Multi-user Tags and Comments

Post by Stefan »

admin wrote:Done! 8)

I wonder if I should overload the second parameter onlyselected rather than using a 5th parameter as I have done it in v9.30.0022?

onlyselected
0 = take all items in List
1 = take all selected items in List
else = itemlist
v9.30.0022 - 2010-07-28 20:12
+ SC report() enhanced. Added new optional argument "itemlist",
report([template], [onlyselected=0], [header], [footer], [itemlist])



Related to "5th parameter": i don't know. This 5th seams to be fine with me.



:D Cool! Nearly...

TEST:


This works fine:
text report("{Name}, {Size B} bytes, {Modified yyyy-mm-dd }, ver {FileVersion}", 1, , , "<xypath>\XYplorer.exe");


This what i would need doesn't:
$DIR = Inputfolder();
    text report("{Name},{comment}|<crlf>", 0, , , $DIR);


Is this planed to work on all files in an given folder?

.

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

Re: Multi-user Tags and Comments

Post by TheQwerty »

admin wrote:Done! 8)

I wonder if I should overload the second parameter onlyselected rather than using a 5th parameter as I have done it in v9.30.0022?

onlyselected
0 = take all items in List
1 = take all selected items in List
else = itemlist
Well, I do agree that they should be combined.
However, I'd rather you removed onlyselected and overloaded the itemlist position instead as I think that ordering makes more sense. That would break everyone's scripts though, so meh.

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

Re: Multi-user Tags and Comments

Post by Stefan »

Stefan wrote:TEST:

This what i would need doesn't:
$DIR = Inputfolder();
    text report("{Name},{comment}|<crlf>", 0, , , $DIR);


Is this planed to work on all files in an given folder?
This is what i want to do:

Code: Select all

"Read comment"
 $DIR = "<xydata>\Sessions\";
 
  run "cmd /c dir /B " . $DIR . "|cb";
  $Items = "<clipboard>";
 
  $Items = regexreplace($Items, "(.+)\r\n", "$DIR$1|");
 
  $List = report("{Name} - {comment}|", 0, , , $Items);
  
  inputselect(,$List,,2);
But without involving the clipboard:
$DIR = "<xydata>\Sessions\";
    $List = report("{Name},{comment}|", 0, , , $DIR);
    inputselect(,$List,,2);


(Thanks jacky for the hint with {comment})

.

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

Re: Multi-user Tags and Comments

Post by Stefan »

Just more ideas, maybe they are from interest:

I know report("{dir | | | }");

but maybe you can extend this onlyselected to

onlyselected
0 = take all items in List
1 = take all selected items in List
2 = take all items in List but files only
3 = take all items in List but folders only



AND/OR
include filetype only:

report("{Name} -{comment}|", 0, , , $DIR\*.exe);

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

Re: Multi-user Tags and Comments

Post by admin »

Stefan wrote:This what i would need doesn't:
$DIR = Inputfolder();
    text report("{Name},{comment}|<crlf>", 0, , , $DIR);


Is this planed to work on all files in an given folder?

.
No. But I plan to give you a command to return the items in a folder, maybe I call it "listfolder" or "folderlist":

Code: Select all

$itemlist = listfolder([path=<curpath>], [separator="|"], [filesorfolders=3], [pattern=*])
path: the path to browse
separator: used to separate the items in the return string
filesorfolders: 1 = files, 2 = folders, 3 = both
pattern: simple wildcard pattern, e.g. *.txt
Any comments or ideas on this?

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

Re: Multi-user Tags and Comments

Post by Stefan »

Fine too.
I have to write it down to see if it would work what i be after currently:

//$itemlist = listfolder([path=<curpath>], [separator="|"], [filesorfolders=3], [pattern=*])
$path = "C:\Temp"
$itemlist = listfolder( $path, , 1, *.exe);
$Tender = report("{Name},{comment}|", 0, , , $itemlist );
$Tender2 = replace($Tender, ".exe");
$Chosen = inputselect("Select one",$Tender2,,2);
$Chosen = quote($path\$Chosen.".exe");
run $Chosen;


Maybe:
filesorfolders: 1 = file name, 2 = files base name, 3 = folder name, 4 = both 1+3


Maybe:
getinfo, getkey, getlist, gettoken,


EDIT:
AHH, is this the change to get an recursive list? :lol:

listfolder([path=<curpath>], [separator="|"], [filesorfolders=3], [pattern=*], [recursive=0])

recursive reports with fullname (drv:\path\item[.ext])
$FoldersList = listfolder("<xypath>", "<crlf>", 3, ,1)

(if possible with sub-levels control please)
recursive=0 : no recursive
recursive= -1 : recursive
recursive=1 : one level recursive
recursive=2 : two level recursive
.
Last edited by Stefan on 29 Jul 2010 10:40, edited 1 time in total.

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

Re: Multi-user Tags and Comments

Post by jacky »

Great addition! :D Thanks, Don.
admin wrote:I plan to give you a command to return the items in a folder, maybe I call it "listfolder" or "folderlist":

Code: Select all

$itemlist = listfolder([path=<curpath>], [separator="|"], [filesorfolders=3], [pattern=*])
path: the path to browse
separator: used to separate the items in the return string
filesorfolders: 1 = files, 2 = folders, 3 = both
pattern: simple wildcard pattern, e.g. *.txt
Any comments or ideas on this?
Sounds like a very good idea. I wonder if pattern shouldn't come before filesorfolders, just cause I would imagine one would more often specify a pattern than restrict to only files or folders, but I may be wrong. (Also with that logic, separator should probably go last...)
So, about that pattern arg, would it really just allow simple use of wildchars, of be VF-compatible (thus including support of multiple patterns, negation, regexp...) ?
Proud XYplorer Fanatic

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

Re: Multi-user Tags and Comments

Post by Stefan »

Info, i updated my last post above with recursive idea.
http://www.xyplorer.com/xyfc/viewtopic. ... 958#p49958

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

Re: Multi-user Tags and Comments

Post by admin »

jacky wrote:Great addition! :D Thanks, Don.
admin wrote:I plan to give you a command to return the items in a folder, maybe I call it "listfolder" or "folderlist":

Code: Select all

$itemlist = listfolder([path=<curpath>], [separator="|"], [filesorfolders=3], [pattern=*])
path: the path to browse
separator: used to separate the items in the return string
filesorfolders: 1 = files, 2 = folders, 3 = both
pattern: simple wildcard pattern, e.g. *.txt
Any comments or ideas on this?
Sounds like a very good idea. I wonder if pattern shouldn't come before filesorfolders, just cause I would imagine one would more often specify a pattern than restrict to only files or folders, but I may be wrong. (Also with that logic, separator should probably go last...)
So, about that pattern arg, would it really just allow simple use of wildchars, of be VF-compatible (thus including support of multiple patterns, negation, regexp...) ?
I agree about the sequence of params.
A more complex pattern, well, yeah, why not... but later...

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

Re: Multi-user Tags and Comments

Post by Stefan »

Thank you Don.

Code: Select all

v9.30.0023 - 2010-07-29 12:14
    + Scripting got a new function.
      Name:   listfolder
      Action: Lists the contents of a folder (non-recursive).
      Syntax: listfolder([path=<curpath>], [pattern=*], [filesonly], [separator="|"])

This leads me to some questions:
1) Wasn't it possible to include an foldersonly switch?
2) Will recursive option come next?
3) Wouldn't an 'get' prefix better fit for this command: 'getlist' ?

Stefan wrote:Fine too.
I have to write it down to see if it would work what i be after currently:

//$itemlist = listfolder([path=<curpath>], [separator="|"], [filesorfolders=3], [pattern=*])
$path = "C:\Temp"
$itemlist = listfolder( $path, , 1, *.exe);
$Tender = report("{Name},{comment}|", 0, , , $itemlist );
$Tender2 = replace($Tender, ".exe");
$Chosen = inputselect("Select one",$Tender2,,2);
$Chosen = quote($path\$Chosen.".exe");
run $Chosen;


Maybe:
filesorfolders: 1 = file name, 2 = files base name, 3 = folder name, 4 = both 1+3


Maybe:
getinfo, getkey, getlist, gettoken,


EDIT:
AHH, is this the change to get an recursive list? :lol:

listfolder([path=<curpath>], [separator="|"], [filesorfolders=3], [pattern=*], [recursive=0])

recursive reports with fullname (drv:\path\item[.ext])
$FoldersList = listfolder("<xypath>", "<crlf>", 3, ,1)

(if possible with sub-levels control please)
recursive=0 : no recursive
recursive= -1 : recursive
recursive=1 : one level recursive
recursive=2 : two level recursive
.

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

Re: Multi-user Tags and Comments

Post by admin »

Let's save the complications for later... :wink:

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

Re: Multi-user Tags and Comments

Post by TheQwerty »

Stefan wrote:Wasn't it possible to include an foldersonly switch?
admin wrote:Let's save the complications for later... :wink:
Is now late enough? :P

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

Re: Multi-user Tags and Comments

Post by admin »

TheQwerty wrote:
Stefan wrote:Wasn't it possible to include an foldersonly switch?
admin wrote:Let's save the complications for later... :wink:
Is now late enough? :P
Yep. :)

Post Reply