OK, I take a look at it now. I promised it long enough...jacky wrote: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 flowStefan 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);
Multi-user Tags and Comments
-
- Site Admin
- Posts: 60617
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Multi-user Tags and Comments
FAQ | XY News RSS | XY Twitter
-
- Site Admin
- Posts: 60617
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Multi-user Tags and Comments
Done!
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
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
FAQ | XY News RSS | XY Twitter
Re: Multi-user Tags and Comments
v9.30.0022 - 2010-07-28 20:12admin wrote:Done!
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
+ 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.
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?
.
Re: Multi-user Tags and Comments
Well, I do agree that they should be combined.admin wrote:Done!
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
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.
Re: Multi-user Tags and Comments
This is what i want to do: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?
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);
$DIR = "<xydata>\Sessions\";
$List = report("{Name},{comment}|", 0, , , $DIR);
inputselect(,$List,,2);
(Thanks jacky for the hint with {comment})
.
Re: Multi-user Tags and Comments
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);
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);
-
- Site Admin
- Posts: 60617
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Multi-user Tags and Comments
No. But I plan to give you a command to return the items in a folder, maybe I call it "listfolder" or "folderlist":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?
.
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
FAQ | XY News RSS | XY Twitter
Re: Multi-user Tags and Comments
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?
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
.
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?
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.
Re: Multi-user Tags and Comments
Great addition! Thanks, Don.
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...) ?
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...)admin wrote:I plan to give you a command to return the items in a folder, maybe I call it "listfolder" or "folderlist":Any comments or ideas on this?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
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
Re: Multi-user Tags and Comments
Info, i updated my last post above with recursive idea.
http://www.xyplorer.com/xyfc/viewtopic. ... 958#p49958
http://www.xyplorer.com/xyfc/viewtopic. ... 958#p49958
-
- Site Admin
- Posts: 60617
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Multi-user Tags and Comments
I agree about the sequence of params.jacky wrote:Great addition! Thanks, Don.
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...)admin wrote:I plan to give you a command to return the items in a folder, maybe I call it "listfolder" or "folderlist":Any comments or ideas on this?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
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...) ?
A more complex pattern, well, yeah, why not... but later...
FAQ | XY News RSS | XY Twitter
Re: Multi-user Tags and Comments
Thank you Don.
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' ?
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?
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
.
-
- Site Admin
- Posts: 60617
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Multi-user Tags and Comments
Let's save the complications for later...
FAQ | XY News RSS | XY Twitter
Re: Multi-user Tags and Comments
Stefan wrote:Wasn't it possible to include an foldersonly switch?
Is now late enough?admin wrote:Let's save the complications for later...
-
- Site Admin
- Posts: 60617
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Multi-user Tags and Comments
Yep.TheQwerty wrote:Stefan wrote:Wasn't it possible to include an foldersonly switch?Is now late enough?admin wrote:Let's save the complications for later...
FAQ | XY News RSS | XY Twitter