View Full Version : Please read and help if possible.
worldrave
December 18th, 2002, 10:58 PM
Couldn't think of good enough Subject for this.
I use VirtualDub as a TVR and using Girder. Here's the problem, whenever VDub is loaded (each time) the filename reset's to default (ie- CAPTURE1.avi), so if i decide to rec. something, then close, then want to record again, it won't since that file exists already. So i'm trying to figure a way to plugin my own filename (which is easy part i can already do) by using some kinda girder variable (here's where i need the help) as the filename to give. I don't care if it's a random filename everytime. I later have to rename them anyway to the tv show name anyway. Or does anyone else have an easier way that workes for them i could use instead?
Please help someone. Thanx again for any responses.
Mark F
December 19th, 2002, 03:03 AM
A function for generating a random, unique, temporary filename is built into the LUA IO Lib. From the LUA:Reference manual 4.0 (http://www.lua.org/manual/manual.html#6.4) -
tmpname ()
Returns a string with a file name that can safely be used for a temporary file. The file must be explicitly opened before its use and removed when no longer needed.
Is this OK?
worldrave
December 19th, 2002, 08:39 AM
that lua or whatever stuff is a tad beyond me, but it looks like it would i guess. I was hoping it was a little more simple to do then programming some language. I'm a newbie to this lua stuff. What would be example of this in a girder event? As a sample like when a prompt pops up (when selecting File,open ie-) to have it input the random filename or even (Capture*.avi)? Thanx for the quick response too BTW.
Mark F
December 19th, 2002, 11:24 AM
Sorry about that. I didn't know how much you already knew. :(
I know people freak out when I say LUA the first time but it isn't as hard as you'd like to think. :)
How do you plan to enter the filename? I will assume via keyboard commands but, if not, tell me and we'll start again.
I've attached a zip file that contains a multigroup that TRIES to send a temporary filename via keystrokes. You will need to target the two keyboard commands to the file/open dialog.
If you'd like to go a different way (like capture*.avi) we could do that by replacing the first command in the multigroup. :)
worldrave
December 19th, 2002, 02:25 PM
Ok then. Cool.
1.) Event to open up VirtualDub prorgam when pushing On button assign'd
2.) Send a command for Start Capture (opens up different section of VDub window)
3.) Start a multigroup when Record button pressed that will(easy part)-
a.) Choose filename under Set Filename option (here's the help needed)
b.) Then regular command to Start capture.(easy part.)
4.) Then another command sent to Stop capture (easy part again) and close program.
Under the program for filename it has something similar to most programs that have a filename choice dialog for input.
Also It will auto add a # in sequence each time you capture using F6 function (capture) but each time you close the program. It starts back at capture0 (or whatever first part of the filename given then number). This is where i want to use girder to give it the filename under manual filename option. Since Girder is ALWAYS running on my system. I hope i gave enough info to be helpfull with. If not. lemme know and thank you again for your help with me on this.
Mark F
December 19th, 2002, 03:41 PM
Try substituting the multigroup attached above for step 3a. As I said, you will need to target the keyboard commands but lets see if it will work.
If it works we can hone it to be EXACTLY what you want. OK? ;)
worldrave
December 19th, 2002, 08:08 PM
Thanx so much for the help. I really appreciate it. I'll give a try now that i'm home from work. I e-mailed earlier while at work. I'll let ya know if it works. L8er for now. Thanks again.
Update!! Didn't work. Hmmm.... Here's an idea. If there's already a filename with that name of file, in the Window Header it says [File exists] next to the filename. Would that be helpfull to use for something??
Like maybe if there was someway girder could check if this exists in the header, then a next command would send a "]" to the program window of VirtualDub which add's a number in the filename.
Example- Capture1, "]" , Capture2, with each "]" key press.
Hopefully.
Powered by vBulletin® Version 4.1.8 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.