Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
9th May 2020, 16:52 | #61 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Nah, Im continuing to use older avs+ header, minus the stdint header requirement which prevents VS2008 compiler use.
No problems. EDIT: Above for v2.6/2.6+ plugs, am still using 2.5 header for avs 25 plugs.
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 9th May 2020 at 17:02. |
2nd November 2022, 05:13 | #63 | Link | ||
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Code:
RT_WriteFileList(String,String,bool "append"=false) Non-clip function. This function, takes as the first string, a filename template with wildcards, this template can be eg "Fred.jpg" or "Fr?d.jp*g". where the '?' character matches any single character and the '*' wildcard matches zero or more characters. v1.03, Can take multiple pipe ('|') separated Wilcards in the extension ONLY, as in "D:\Pics\*.BMP|JP*G|PNG" The second string is the output filename which will be created and contain the files matching the input file template. The function will return the number of filenames written into the output file. Directories are ignored altogether and not written to the output file. A return of -1 indicates a problem opening/writing the output file. v1.06, Append, if true appends to existing file. NOTE, the return value does NOT include any already existing filenames if append is true (use RT_FileQueryLines to inquire total number of filenames when append = true). Do search on "RT_WriteFileList", one script using it here:- https://forum.doom9.org/showthread.p...73#post1916173 EDIT: Smaller script function here:- https://forum.doom9.org/showthread.p...35#post1914335 EDIT: nuther one:- https://forum.doom9.org/showthread.p...10#post1911810 EDIT: Yet a nuther 1:- https://forum.doom9.org/showthread.p...st#post1896023 I accidentally deleted some files, and recovered some 1000's of text files all with names like asaoidajljlasa.txt, is really tedious having to look though 10,000 text files so i made a script that showed any files containing a particular word on a video clip frame. Much easier just moving to next frame instead of loading another text file into a text editor. Quote:
You could also perhaps find use for this, Code:
RT_FSelOpen(string "title"="Open",string "dir"="",string "filt",string "fn="",bool "multi"=false,bool "debug"=false) Function to select EXISTING filename using GUI FileSelector. Title = Title bar text. Dir = Directory, "" = Current Filt = Lots, eg "All Files (*.*)|*.*" [Displayed text | wildcard] [| more pairs of Displayed text and wildcard, in pairs ONLY]. first one is default. fn = Initially presented filename (if any). multi = Multiply Select filenames. Allows selection of more than one filename at once. debug = Send error info to DebugView window. Returns int, 0, user CANCELLED. int, non zero is error (error sent to DebugView window). String, Filename selected, Chr(10) separated multiline string if MULTI==true (and multiple files selected). Example, to prompt for an AVI file and play it. avi=RT_FSelOpen("I MUST have an AVI",filt="Avi files|*.avi") Assert(avi.IsString,"RT_FSelOpen: Error="+String(avi)) AviSource(avi) From the source code before it was included into RT_Stats, here:- https://forum.doom9.org/showthread.p...07#post1638307 Code:
AVSValue __cdecl FSelOpen(AVSValue args, void* user_data, IScriptEnvironment* env) { char * myName="FSelOpen: "; const char * myFilter= "All files (*.*)|*.*|" "Avi Files (*.avi;*.XVid;*.DivX)|*.avi;*.XVid;*.DivX|" "Mpg files (*.vob;*.mpg;*.mpeg;*.m1v;*.m2v;*.mpv;*.tp;*.ts;*.trp;*.m2t;*.m2ts;*.pva;*.vro)|*.vob;*.mpg;*.mpeg;*.m1v;" "*.m2v;*.mpv;*.tp;*.ts;*.trp;*.m2t;*.m2ts;*.pva;*.vro|" "Other Vid (*.mkv;*.Wmv;*.mp4;*.flv;*.ram;*.rm)|*.mkv;*.Wmv;*.mp4;*.flv;*.ram;*.rm|" "Audio Files (*.mp3;*.mpa;*mp1;*.mp2;*.wav)|*.mp3;*.mpa;*mp1;*.mp2;*.wav|" "Avs files (*.avs;*.avsi)|*.avs;*.avsi|" "Text files (*.txt;*.log;*.asc)|*.txt;*.log;*.asc|" "Image files (*.bmp;*.jpg;*.jpe;*.jpeg;*.png;*.tga;*.tif;*.gif;*.tiff)|*.bmp;*.jpg;*.jpe;*.jpeg;*.png;*.tga;*.tif;*.gif;*.tiff|" "Bat files (*.bat)|*.bat|"; "Exe files (*.exe)|*.cmd"; Quote:
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 2nd November 2022 at 05:48. |
||
2nd November 2022, 11:15 | #64 | Link |
Registered User
Join Date: Aug 2016
Posts: 605
|
Wow ok, wasn't expecting that.
I suppose I should probably explain what I'm trying to do. Basically I want to iterate through all the files inside a dir (and its subdirs) and check if a filename matches the one I'm looking for. In the meantime I'm working around it by using an ahk script to generate my avs scripts programatically so I can get away with having hardcoded paths for now. It's still a little annoying though as it means if I ever moved the avs files (or the video files they point to) to another location then the whole thing breaks (but, I can just run the ahk scripts again so it's not the total end of the world but still would be nice to have completely self-contained, self-sufficient avs scripts with no external path dependencies). |
2nd November 2022, 16:46 | #65 | Link | |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Quote:
There is Exist("filename") :- http://avisynth.nl/index.php/Internal_functions#Exist which works also on folder name so long as it does NOT end in slash/backslash (although I've a feeling that Pinterf fixed that in current AVS+). You could also scan a RT_WriteFileList to see if matching file exists but Exist() quicker. Avisynthesizer_Mod has a Batch mode which creates avs script for each {possibly mulitple} GUI selected file, using a script template.
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 2nd November 2022 at 16:49. |
|
2nd November 2022, 21:10 | #66 | Link | |
Registered User
Join Date: Oct 2018
Location: Germany
Posts: 996
|
Quote:
So for me this works quite well. Hibrydcoding Code:
SourceFile = ScriptDir() + "Hammer.mkv" SourceFile = Exist(SourceFile) ? SourceFile : "E:\Ablage\Hammer.mkv" video=LWLibavVideoSource(SourceFile, cache=False) audio=LWLibavAudioSource(SourceFile, cache=False) audioDub(video, audio)
__________________
Live and let live |
|
Tags |
for-loop, if-then-else, while-loop |
Thread Tools | Search this Thread |
Display Modes | |
|
|