Minor scripting related wishes (a generic thread)

Features wanted...

Re: Minor scripting related wishes (a generic thread)

Postby SkyFrontier » 18 Nov 2010 21:16

Selfilter could distinguish between "file_", "file_01" and "file_02" (eXact match)?

Code: Select all
::Selfilter "file_";

Selects them all;

Code: Select all
::SelfilterX "file_";

Selects "file_" only.

Also, I'm not finding a way to append selections/different patterns to selfilter. Is it possible? How?
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for a collection of useful links!
Want colors? XYstylEZ - Visual Themes
-because the aim of computing is to free us to LIVE, not to compute...
SkyFrontier
 
Posts: 1697
Joined: 04 Jan 2010 14:27
Location: Pasárgada (eu vou!)

Re: Minor scripting related wishes (a generic thread)

Postby Stefan » 18 Nov 2010 21:28

SkyFrontier wrote:Selfilter could distinguish between "file_", "file_01" and "file_02" (eXact match)?

Also, I'm not finding a way to append selections/different patterns to selfilter.
Is it possible? How?
Well reading the help helps sometimes:
Code: Select all
Scripting Commands Reference
selfilter """readme""";
Selects item named "readme" and only that one item.
or
selfilter quote("file_"); :wink:
Stefan
 
Posts: 1344
Joined: 18 Nov 2008 21:47
Location: Germany, EU

Re: Minor scripting related wishes (a generic thread)

Postby SkyFrontier » 18 Nov 2010 21:43

...I was almost sure I was missing something. Now I am. :oops:
Thanks, Stefan!
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for a collection of useful links!
Want colors? XYstylEZ - Visual Themes
-because the aim of computing is to free us to LIVE, not to compute...
SkyFrontier
 
Posts: 1697
Joined: 04 Jan 2010 14:27
Location: Pasárgada (eu vou!)

Re: Minor scripting related wishes (a generic thread)

Postby TheQwerty » 15 Sep 2011 19:01

From my trials it seems the only easy way to get a list of available drives is to loop through and check each letter with exists(), which can be a slow at times. It doesn't seem possible to use ListFolder() to do this, and Report() could work but I'd have to open a tab/go to %computer%.

Given the new(-ish) drive toolbars, I'm thinking this has got to be easier now, so I suggest a new Info option for Get().

"Drives", [separator="|"], [group="All"] (or swap the last two, I'm just going off SelectedItems*Names)
The optional "group" argument can be:
All
Available
Fixed
Removable
Network
Optical

Corresponding with the TB groups, except the last, and preferably first partial matched.

Pretty please, Don! :(
TheQwerty
 
Posts: 3168
Joined: 03 Aug 2007 21:30

Re: Minor scripting related wishes (a generic thread)

Postby admin » 19 Sep 2011 09:34

Made a note.

Optical? I'm not aware of a flag to test that.
admin
Site Admin
 
Posts: 33028
Joined: 22 May 2004 15:48
Location: Cologne

Re: Minor scripting related wishes (a generic thread)

Postby TheQwerty » 19 Sep 2011 11:42

admin wrote:Optical? I'm not aware of a flag to test that.
Just bringing the term "CD-ROM" into the present, since I doubt there are that many CD drives still around.
TheQwerty
 
Posts: 3168
Joined: 03 Aug 2007 21:30

Re: Minor scripting related wishes (a generic thread)

Postby admin » 19 Sep 2011 11:51

TheQwerty wrote:
admin wrote:Optical? I'm not aware of a flag to test that.
Just bringing the term "CD-ROM" into the present, since I doubt there are that many CD drives still around.

Ah, as a cover for CD, DVD, and Blu-ray drives. Ok. But even under Win7 my DVD drive is still labeled "CD drive".
admin
Site Admin
 
Posts: 33028
Joined: 22 May 2004 15:48
Location: Cologne

Re: Minor scripting related wishes (a generic thread)

Postby TheQwerty » 19 Sep 2011 12:15

admin wrote:Ah, as a cover for CD, DVD, and Blu-ray drives. Ok. But even under Win7 my DVD drive is still labeled "CD drive".
Well you can call it whatever you like, if Windows 7 is still calling them CD drives then so be it. (Though anyone have word from Windows 8?)

Personally, I feel it's silly to continue to call them CD-ROMs just because Microsoft weren't forward thinking when they created the drive type enum. :P
TheQwerty
 
Posts: 3168
Joined: 03 Aug 2007 21:30

Re: Minor scripting related wishes (a generic thread)

Postby admin » 19 Sep 2011 12:44

TheQwerty wrote:
admin wrote:Ah, as a cover for CD, DVD, and Blu-ray drives. Ok. But even under Win7 my DVD drive is still labeled "CD drive".
Well you can call it whatever you like, if Windows 7 is still calling them CD drives then so be it. (Though anyone have word from Windows 8?)

Personally, I feel it's silly to continue to call them CD-ROMs just because Microsoft weren't forward thinking when they created the drive type enum. :P

Heritage. Who uses "Computers" for computing nowadays? Not the masses...
admin
Site Admin
 
Posts: 33028
Joined: 22 May 2004 15:48
Location: Cologne

Re: Minor scripting related wishes (a generic thread)

Postby TheQwerty » 19 Sep 2011 12:54

admin wrote:Heritage. Who uses "Computers" for computing nowadays? Not the masses...
Right up there with the standard floppy disk icon for Save.
TheQwerty
 
Posts: 3168
Joined: 03 Aug 2007 21:30

Re: Minor scripting related wishes (a generic thread)

Postby TheQwerty » 21 Sep 2011 14:23

Thanks Don!

Kind of wish you had used the text arguments for type, but in a couple minutes I'll be over that. :P
TheQwerty
 
Posts: 3168
Joined: 03 Aug 2007 21:30

Re: Minor scripting related wishes (a generic thread)

Postby zer0 » 23 Sep 2011 23:06

I desperately need a way to determine frame width and height of video files. When I preview such a file, I can see that information in the area in the top right corner of the preview panel, but how do I retrieve it using scripting. There does not seem to be a set of arguments that I can use with property() to grab it :(
Reporting a bug? Have a wish? Got a question? Use search - View roadmap - FAQs: Forum + XY site
Windows 7 Professional/Enterprise 64-bit SP1
Always using the latest stable build
zer0
 
Posts: 2477
Joined: 19 Jan 2009 20:11

Re: Minor scripting related wishes (a generic thread)

Postby nas8e9 » 23 Sep 2011 23:27

zer0 wrote:I desperately need a way to determine frame width and height of video files. When I preview such a file, I can see that information in the area in the top right corner of the preview panel, but how do I retrieve it using scripting. There does not seem to be a set of arguments that I can use with property() to grab it :(

By way of a possible workaround, MediaInfo claims to be able to export its information to CSV among other formats. It has a command-line version, but I'm not sure how scriptable it is.
Last edited by nas8e9 on 24 Sep 2011 00:59, edited 2 times in total.
nas8e9
 
Posts: 1945
Joined: 21 Jun 2008 13:50

Re: Minor scripting related wishes (a generic thread)

Postby highend » 24 Sep 2011 00:11

I do this with the help of ffmpeg (in a greater context for my video convert script).

Let ffmpeg write it's data (simple ffmpeg -i <videofile> 2>yourlogfile.log)
and then use a simple foreach loop to extract the necessary data.

Code: Select all
 $FFmpegLog = readfile($FFmpegLogFile);
 foreach($Line, $FFmpegLog, "<crlf>"){
   $FindVideoResolution = regexreplace($Line, "(.+?)(\d+[x|X]\d+)(.+)", "$2");
   if($FindVideoResolution != $Line) { $SourceVideoResolution = $FindVideoResolution; }
 }
 $SourceVideoWidth = gettoken($SourceVideoResolution, 1, "x");
 $SourceVideoHeight = gettoken($SourceVideoResolution, 2, "x");
 text Resolution: $SourceVideoWidth x $SourceVideoHeight;

One of my scripts helped you out? Please donate via Paypal if you like: highend (at) web (dot) de
highend
 
Posts: 1895
Joined: 06 Feb 2011 00:33

Re: Minor scripting related wishes (a generic thread)

Postby zer0 » 24 Sep 2011 12:32

highend wrote:I do this with the help of ffmpeg (in a greater context for my video convert script).
Thank you for a potential workaround. I would rather Don makes it possible through scripting, which should be a trivial exercise.
Reporting a bug? Have a wish? Got a question? Use search - View roadmap - FAQs: Forum + XY site
Windows 7 Professional/Enterprise 64-bit SP1
Always using the latest stable build
zer0
 
Posts: 2477
Joined: 19 Jan 2009 20:11

PreviousNext

Return to Wishes



Who is online

Users browsing this forum: No registered users and 0 guests

cron