Page 7 of 28

Re: Minor scripting related wishes (a generic thread)

Posted: 18 Nov 2010 21:16
by SkyFrontier
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?

Re: Minor scripting related wishes (a generic thread)

Posted: 18 Nov 2010 21:28
by Stefan
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:

Re: Minor scripting related wishes (a generic thread)

Posted: 18 Nov 2010 21:43
by SkyFrontier
...I was almost sure I was missing something. Now I am. :oops:
Thanks, Stefan!

Re: Minor scripting related wishes (a generic thread)

Posted: 15 Sep 2011 20:01
by TheQwerty
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! :(

Re: Minor scripting related wishes (a generic thread)

Posted: 19 Sep 2011 10:34
by admin
Made a note.

Optical? I'm not aware of a flag to test that.

Re: Minor scripting related wishes (a generic thread)

Posted: 19 Sep 2011 12:42
by TheQwerty
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.

Re: Minor scripting related wishes (a generic thread)

Posted: 19 Sep 2011 12:51
by admin
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".

Re: Minor scripting related wishes (a generic thread)

Posted: 19 Sep 2011 13:15
by TheQwerty
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

Re: Minor scripting related wishes (a generic thread)

Posted: 19 Sep 2011 13:44
by admin
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...

Re: Minor scripting related wishes (a generic thread)

Posted: 19 Sep 2011 13:54
by TheQwerty
admin wrote:Heritage. Who uses "Computers" for computing nowadays? Not the masses...
Right up there with the standard floppy disk icon for Save.

Re: Minor scripting related wishes (a generic thread)

Posted: 21 Sep 2011 15:23
by TheQwerty
Thanks Don!

Kind of wish you had used the text arguments for type, but in a couple minutes I'll be over that. :P

Re: Minor scripting related wishes (a generic thread)

Posted: 24 Sep 2011 00:06
by zer0
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 :(

Re: Minor scripting related wishes (a generic thread)

Posted: 24 Sep 2011 00:27
by nas8e9
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.

Re: Minor scripting related wishes (a generic thread)

Posted: 24 Sep 2011 01:11
by highend
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;


Re: Minor scripting related wishes (a generic thread)

Posted: 24 Sep 2011 13:32
by zer0
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.