Log in

View Full Version : Gimport causes ScriptDir to return wrong directory when called from a function.


maxxon
15th March 2012, 20:28
Looks like this is caused because ScriptDir is being set to what file GImport is being called from (the file that the GImport call physically resides), not the active file where the function that is calling GImport is being called from (function can be called from another file). See attached zip file for an example. Replace gimport with import in the z.avs file to see how it should work.


|\/|x

Gavino
16th March 2012, 02:13
Yes, you're right.

When GScript was written, ScriptDir et al did not exist.
I need to update the GImport code to do the same as the standard v2.60 Import does to make the ScriptXXX functions work.
I'll put out a new version shortly in the GScript thread.

StainlessS
27th February 2013, 06:45
I'll put out a new version shortly in the GScript thread.

Any progress here ? :) (EDIT: and while you're at it, how bout an Until to match While)

Gavino
27th February 2013, 14:19
Any progress here ? :)
Sorry, I meant to do this a while ago and forgot all about it.
I don't have much free time at the moment, but I should be able to fit it in within the next couple of weeks.

(and while you're at it, how bout an Until to match While)
I can easily add this if you (and others) think it would be useful, but note that until (condition) can already be expressed as while (!condition), and there is some merit in keeping the new keywords to a minimum.

StainlessS
27th February 2013, 15:13
Thanks Gavino, sorry, Actually meant Do{}Until() and Do{}While(), post conditional, execute loop at least once.
(or just the Do{}While())

StainlessS
7th November 2013, 16:08
And a break statement to match Avisynth+ integrated GScript would be lovely :)
(EDIT: And maybe continue). Avisynth+ break (http://forum.doom9.org/showthread.php?p=1648026#post1648026)

(EDIT: Just attending to my annual badgering) :devil:

Gavino
8th November 2013, 00:44
Thanks, StainlessS, the voice of my conscience. :)

I'll get around to it but, after failing with my previous promise, no guarantees on timescales.
Where do you get the time to churn out all those plugins of yours??

StainlessS
8th November 2013, 01:55
I got one of them there gadgets that Hermione had, spin it around three times and you can take as many
cracks at something as you like, sort of parallel processing. Mind you, you can only get one from Diagon Alley,
a real dodgy place, full of strange people, but you would know all about that.

EDIT: Will remind you again next year. :)