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. |
8th March 2007, 21:01 | #601 | Link | ||||
Registered User
Join Date: Oct 2002
Posts: 298
|
Quote:
Quote:
Code:
import cPickle import os # Load the persistent variables if os.path.isfile('vars.dat'): f = open('vars.dat', mode='r') vars = cPickle.load(f) f.close() else: vars = {} # Your macro goes here... # Access, add, or delete entries to the vars dictionary... # # Save the persistent options f = open('vars.dat', 'w') cPickle.dump(vars, f) f.close() Quote:
You may want to update your translation - starting from this version, you can translate 'Ctrl' to 'Strg' without messing up the keyboard shortcuts (I think 'Alt' and 'Shift' don't need translating on German keyboards, but you can translate those as well). Quote:
|
||||
9th March 2007, 01:38 | #602 | Link |
Registered User
Join Date: Nov 2005
Posts: 14
|
I don't know python, I happened to research about it. I've been programming for the past 7-8 years, mostly c, c++ and c# so I still understand what's going on without being familiar with python's syntax and all that.
I thought of using a temp file at first but it seemed like an awful lot of mess to create a file (and eventually delete it), possibly dealing with ntfs permission, file lock and all that. I know it's possible and easy to do, but I was looking for a 'cleaner' way of storing temporary variables in memory since it's usually where I'll want to store it anyway. The problem with a file is that it persists even when the application is closed. As a temporary solution, I wrote my variables in the clipboard so I don't have to manage files on disk. Anyways, thanks for your answer, if no change is made, I'll just either use clipboard like I do now or use cPickle. Not my favorite method but it'll work just as good since my purpose is to write macros to ease the creation of script, even at the expense of creating a few intermediary files that the user can clean out whenever it is needed. |
9th March 2007, 09:27 | #603 | Link |
Registered User
Join Date: Mar 2007
Posts: 3
|
I'm sorry, better correct the link i gave you for the italian translation with the one without the version number included in the namefile, so that the link remains the same also when a new version come out and I post the new translation.
Here you find the new link. Thanks and sorry for this little mistake |
9th March 2007, 19:09 | #604 | Link | ||
Registered User
Join Date: Oct 2002
Posts: 298
|
Quote:
Quote:
|
||
11th March 2007, 17:39 | #607 | Link | |
Registered User
Join Date: Dec 2006
Posts: 45
|
Quote:
Delete all of things about AvsP aplication and if you still have zipped file(or download again) extract again in any folder... It will be work %100... |
|
12th March 2007, 19:11 | #608 | Link |
Angel of Night
Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,559
|
I've been trying out the new syntax highlighting tools, now that the function definitions are all up-to-date, and I'm loving it! =D I was wondering if you think it'd make sense to highlight the function argument names, and maybe extend the comment background to the edge of the window. It's all pretty smooth, though.
Also, have you had any word about how well avsp runs on *nix systems? Just curious. Oh, and concerning Python and single-instance, it looks like the budget method is a workable one: http://mail.python.org/pipermail/pyt...er/057530.html http://mail.python.org/pipermail/pyt...er/057670.html But you still have to come up with some method to pass in data, without sockets or COM. In Win32 you can register an event handler to fire when a file or folder is updated, then you could read information out of that and activate yourself, but I have no idea if you could do that in python. |
12th March 2007, 20:00 | #609 | Link |
Registered User
Join Date: May 2005
Posts: 236
|
French translation updated
Well done, another long and good changelog, and syntax highlighting seems fixed this time! Only one small request: can the syntax highlights have priority on the "Highlight current line" option ? Meaning,when a background color has been defined in some syntaxe highlight, can it stay even when the line is selected (and therefore highlighted)? The new macro created lots of new inputs with the arguments in the functions definition, that's nice ; do you think it would be possible for it to distinguish between required and optional parameters, and add " for the arguments accordingly ? But maybe this information is not available from avisynth 2.5.7... I haven't had a chance yet to test the rest of the new features, but they sound very cool in the changelog and your explanations ! |
12th March 2007, 20:22 | #610 | Link | |
Registered User
Join Date: Aug 2004
Location: Denmark
Posts: 807
|
Quote:
foxyshadis: interprocess communication (sockets) is available for python just look at the python docs: http://docs.python.org/lib/ipc.html also by using ctypes it should be easy to create a mutex to check for only 1 instance of avsp
__________________
Get my avisynth filters @ http://www.avisynth.org/tsp/ |
|
12th March 2007, 21:59 | #611 | Link |
Angel of Night
Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,559
|
He said sockets add a meg to the install though. I was just trying to think of hackish ways of doing it to keep the size down.
Alain, in plugins, all named arguments are optional, required ones can't have names in avisynth. It's nice to manually enter the required names, though, and then you would need that. TO get the macro to do that for you, change: Code:
arglist=arglist+" "+namedargname Code:
arglist=arglist+' "'+namedargname+'"' Last edited by foxyshadis; 12th March 2007 at 22:04. |
13th March 2007, 00:20 | #612 | Link | ||
Registered User
Join Date: Aug 2004
Location: Denmark
Posts: 807
|
Quote:
Quote:
Code:
AVSValue __cdecl CreateExample(AVSValue args, void* user_data, IScriptEnvironment* env) { int i=args[1].AsInt(1) ;//default is supplied so even if it is not named it is optional return args[0].AsClip();//no default so required even if it is a named arg. } extern "C" __declspec(dllexport) const char* __stdcall AvisynthPluginInit2(IScriptEnvironment* env) { env->AddFunction("Example", "[required]ci", CreateExample, 0); }
__________________
Get my avisynth filters @ http://www.avisynth.org/tsp/ |
||
13th March 2007, 04:00 | #613 | Link | ||||||
Registered User
Join Date: Oct 2002
Posts: 298
|
Thanks for the translation update, I updated the links accordingly.
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
|
||||||
13th March 2007, 18:08 | #615 | Link | |
Angel of Night
Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,559
|
Quote:
Short of avisynth further extending the filter argument list, I guess there's no fullproof way to analyse it for optional/required, then. |
|
15th March 2007, 06:45 | #616 | Link | |
Registered User
Join Date: Aug 2006
Posts: 50
|
Quote:
Absolutely fantastic. I really appreciate the feature for updating the function defs based on 2.5.7. Your app works so well, on one of my computers, I was still using v1.2.1. I have a macro question if anyone has a few minutes. I have an avs script that starts off like this: Code:
c1=AVISource("K:\B\1.avi", audio=true, pixel_type="YUY2").Trim(4,143101).Crop(8,0,-8,-10,true) c2=AVISource("J:\B\2.avi", audio=true, pixel_type="YUY2").Trim(97,143195).Crop(8,0,-8,-10,true) c3=AVISource("J:\B\3.avi", audio=true, pixel_type="YUY2").Trim(97,143195).Crop(8,0,-8,-10,true) Code:
c2=c2.DeleteFrame(1234) Code:
c1=AVISource("K:\B\1.avi", audio=true, pixel_type="YUY2").Trim(4,143101).Crop(8,0,-8,-10,true) c2=AVISource("J:\B\2.avi", audio=true, pixel_type="YUY2").Trim(97,143196).Crop(8,0,-8,-10,true) c3=AVISource("J:\B\3.avi", audio=true, pixel_type="YUY2").Trim(97,143195).Crop(8,0,-8,-10,true) Ok thanks for all you've done. Have a great week! nibs |
|
15th March 2007, 18:28 | #617 | Link | |
Registered User
Join Date: Oct 2002
Posts: 298
|
Thanks for the translation update, I updated the links on the first post and website accordingly.
Quote:
Code:
x = 143195 c1=AVISource("K:\B\1.avi", audio=true, pixel_type="YUY2").Trim(4,143101).Crop(8,0,-8,-10,true) c2=AVISource("J:\B\2.avi", audio=true, pixel_type="YUY2").Trim(97,x).Crop(8,0,-8,-10,true) c3=AVISource("J:\B\3.avi", audio=true, pixel_type="YUY2").Trim(97,143195).Crop(8,0,-8,-10,true) Code:
avsp.InsertText(' + 1', pos=(0,-1)) Last edited by qwerpoi; 15th March 2007 at 18:34. |
|
17th March 2007, 12:43 | #619 | Link |
Registered User
Join Date: May 2005
Posts: 236
|
Features request:
- Possibility to have the main script window "always on top" (especially when having set the video as a separate window ; coiuld be useful as well when using an external player, but personnally it's the interaction between the script and video windows that I am interested in) - Option to limit the max width of the video (to say for instance for me 1550, as my screen resolution is 1600x1200) when using the auto zoom. That way I won't have to resize the video window for every different script I have, I would just expand to fullscreen the video window and always have the same video dimension for all my scripts.. Last edited by Alain2; 17th March 2007 at 13:48. |
Thread Tools | Search this Thread |
Display Modes | |
|
|