XYCollector

Discuss and share scripts and script files...
Post Reply
bdeshi
Posts: 4249
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612 / Dhaka
Contact:

XYCollector

Post by bdeshi »

Collect items from several places and copy/cut/move/backup in batch.
main menu [when a collection exists]
main menu [when a collection exists]
2017-11-10_12-55-30.png (11.73 KiB) Viewed 4783 times
[/size]
* Items are removed from collection after cut or move.
Set $P_XYCOLLECTOR_ALWAYSFORGET = 1 to always remove.
* $P_XYCOLLECTOR_PAPER set the paperfolder for "View as Paper Folder".
* The collection (as permanent variable) is autosaved forcibly.
Comment out all `writepv` commands if this behavior is undesired.
--- ---

Inspired by serendipity's Collect & Paste: viewtopic.php?f=7&t=2878&p=58701#p58701
earlier versions: viewtopic.php?f=7&t=2878&p=112611#p112611
Attachments
XYCollector.xys
changes from last release:
+ cut to clipboard menuitem
- removed edit script menu item
~ "reflown" code and upgraded syntax
- fixed some bugs (1 expression typo)
(5.88 KiB) Downloaded 409 times
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

kotlmg
Posts: 298
Joined: 30 Jun 2010 17:14

Re: XYCollector

Post by kotlmg »

hello sir,
xycollector script is excellent. how many items it can collect and what is the limitation?
can you please modify this code to search playlist files like .m3u , .asx ,.dpl and .pls?
it should import the above playlist files any of the .m3u , .asx ,.dpl and .pls and display each file names.
and searched files can be 1. send to default player 2. copied to clipboard with full path 3. clear search results.

.ask file looks like
<Asx Version = "3.0" >
<Param Name = "Name" Value = "PlayList" />
<Entry>
<Title>"1 Nenokkadine Aww Tuzo Mor Kortha.mp4"</Title>
<Ref href = "D:\Devadas\1 Nenokkadine Aww Tuzo Mor Kortha.mp4"/>
</Entry>

<Entry>
<Title>"Aakalesthe Annam Pedatha Shankardada Zinda.mp4"</Title>
<Ref href = "D:\Devadas\Aakalesthe Annam Pedatha Shankardada Zinda.mp4"/>
</Entry>

.pls looks like
[playlist]
File1=D:\Devadas\1 Nenokkadine Aww Tuzo Mor Kortha.mp4
Title1=1 Nenokkadine Aww Tuzo Mor Kortha.mp4
Length1=224750
Played1=0
File2=D:\Devadas\Aakalesthe Annam Pedatha Shankardada Zinda.mp4
Title2=Aakalesthe Annam Pedatha Shankardada Zinda.mp4
Length2=0
Played2=0

.m3u file looks like
#EXTM3U
#EXTINF:0,1 Nenokkadine Aww Tuzo Mor Kortha.mp4
D:\Devadas\1 Nenokkadine Aww Tuzo Mor Kortha.mp4
#EXTINF:1,Aakalesthe Annam Pedatha Shankardada Zinda.mp4
D:\Devadas\Aakalesthe Annam Pedatha Shankardada Zinda.mp4
#EXTINF:2,Ajith And His Daughter Emotional Blockbuster Climax Scene - Nayanatara - Cinema Chupistha.mp4
D:\Devadas\Ajith And His Daughter Emotional Blockbuster Climax Scene - Nayanatara - Cinema Chupistha.mp4
#EXTINF:3,Allari Priyudu.mp4
D:\Devadas\Allari Priyudu.mp4

.dpl looks like
DAUMPLAYLIST
playname=D:\Devadas\Bharat Ane Nenu 2.mp4
playtime=99644
topindex=37
saveplaypos=0
1*file*D:\Devadas\1 Nenokkadine Aww Tuzo Mor Kortha.mp4
1*played*1
1*duration2*224769
2*file*D:\Devadas\Aakalesthe Annam Pedatha Shankardada Zinda.mp4
2*played*0
2*duration2*232455
3*file*D:\Devadas\Allari Priyudu.mp4
3*played*1
3*duration2*291125

with regards,
kotlmg

bdeshi
Posts: 4249
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612 / Dhaka
Contact:

Re: XYCollector

Post by bdeshi »

kotlmg wrote: 01 Mar 2020 10:35 hello sir,
xycollector script is excellent. how many items it can collect and what is the limitation?
can you please modify this code to search playlist files like .m3u , .asx ,.dpl and .pls?
it should import the above playlist files any of the .m3u , .asx ,.dpl and .pls and display each file names.
and searched files can be 1. send to default player 2. copied to clipboard with full path 3. clear search results.
I guess you want to extract media file names from inside the playlist files. I think that's out of scope for this little script, sorry.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

WirlyWirly
Posts: 195
Joined: 21 Oct 2020 23:33
Location: Through the Looking-Glass

Re: XYCollector

Post by WirlyWirly »

This is really neat! Very polished, so much that it feels like it's built-in! Thanks a bunch! :oops:

Is there a way to have all the checkboxes enabled by default, or a menu option to skip the dialog and just perform the action on the collection? That and have the menu pop-up at a specific control ('T' for tree, 'A' for address bar, etc).

I was trying to read the code myself and see how I could make these changes, but this syntax is still pretty new to me and I didn't have much luck.

P.S
Maybe one day I'll take a shot at making a similar script, but emulating vim's registers. Having the user activate the script, input a letter a-z, and then create a new register for those selected items. Same thing when pasting/moving, request the user to input which register they'd like to do it from. Like vim, A-Z to append the selected items to an already existing register. Maybe even performing actions against the files in a register. Sounds pretty neat.

eil
Posts: 1617
Joined: 13 Jan 2011 19:44

Re: XYCollector

Post by eil »

Don't wanna hijack this topic, but as this script was a foundation and inspiration, i think it's a proper place for my version/addition. Basically it's a button snippet with menu extended by couple functions.

Button icon changes if collector has smth in collection. L-Click = Menu; R-Click = Clipboard view.
Two lines were added to menu: Format collected items & Format selected paths.
2021-10-24_1646412.png
2021-10-24_1646412.png (2.78 KiB) Viewed 1959 times
2021-10-24_1647502.png
2021-10-24_1647502.png (9.97 KiB) Viewed 1959 times
Format collected items transforms list of collected items into format appropriate for upload via browser selection(when you're uploading smth with browser and use Windows Open dialog to select items for upload).

Example:
2021-10-25_200714.png
2021-10-25_200714.png (16.45 KiB) Viewed 1959 times
2021-10-25_200736.png
2021-10-25_200736.png (12.4 KiB) Viewed 1959 times
If Yes is pushed = text is copied to clipboard for paste in Open dialog, collection is cleared.
If Cancel is pushed = nothing happens, collection is still there for operations.

Format selected pathes main difference is that it works only with selected items, does not effect collection at all, and doesn't show any dialog with text. You just select some items, choose Format selected paths, and Clipboard gets list of text paths(like on screenshot example above) for same paste in Open dialog.

!!Caution, this is not a script, a snippet for button inside, forum just doesn't allow .txt files for some reason.
Attachments
XYCollector+ v3_button.xys
reuploaded, noticed couple mistakes left from clearing code.
(8.22 KiB) Downloaded 118 times
Win 7 SP1 x64 100% 1366x768

CLM2
Posts: 18
Joined: 24 Nov 2023 17:27

Re: XYCollector

Post by CLM2 »

I have a request.
Is it possible to bring a box or small window that stays on top somewhere on the screen when i click the XYCollector button, So i can simply drag and drop items on that box to collect them!

CLM2
Posts: 18
Joined: 24 Nov 2023 17:27

Re: XYCollector

Post by CLM2 »

eil wrote: 03 Nov 2021 11:46 Don't wanna hijack this topic, but as this script was a foundation and inspiration, i think it's a proper place for my version/addition. Basically it's a button snippet with menu extended by couple functions.

Button icon changes if collector has smth in collection. L-Click = Menu; R-Click = Clipboard view.
Two lines were added to menu: Format collected items & Format selected paths.
2021-10-24_1646412.png2021-10-24_1647502.png
...
Not working on the latest XY.

Edit:
Sorry it works, it's not a script, it's a snippet.

Quick how to:
*Download XYCollector+ v3_button.xys posted above
*In XYplorer's Address bar paste ::snippet; And hit Enter
*Open XYCollector+ v3_button.xys with an text editor, And copy everything
*Paste in XYplorer's snippet window
*Right on the tool bar and customize, You will fing the new button on the right side at the bottom.

Post Reply