Talk About Network

Google





Graphics > GIMP (GNU Image Manipulation Program) > Re: script-fu l...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 2 Topic 3007 of 3173
Post > Topic >>

Re: script-fu loops

by staci.bennett@[EMAIL PROTECTED] Jun 26, 2008 at 08:36 AM

On Jun 25, 12:31=A0pm, staci.benn...@[EMAIL PROTECTED]
 wrote:
> I'm trying to write a script that contains a loop, but am having
> difficulties with the looping construct. =A0When running the script, I
> get the following error: "Error: eval: unbound variable: while"
>
> Things I've tried so far:
> - I've created a new script with just a loop to try to isolate the
> issue.
> - I have downloaded and installed the newest GIMP (2.4.6), running on
> Windows XP.
> - web search: I did find a reference on the web (http://www.ve3syb.ca/
> wiki/doku.php?id=3Dsoftware:sf:updating-scripts) that 'while' loops
> should now be 'do' loops, since the incor****ation of TinyScheme.
> However, I get the same error when trying to use a do loop. =A0However,
> scripts I've downloaded use while, so perhaps this is an obsolete
> comment?
> - I downloaded the latest version of the FX Foundry scripts, to see if
> they run. =A0Many of these have while loops in them. =A0I've tried to
run
> several, and get various errors -- but none of them related to the
> while loop. =A0Is it possible something is not installed or configured
> correctly on my system?
>
> Test script follows:
>
> (define (script-fu-test-while)
> ( =A0 =A0 =A0 let* (
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (i 0)
> =A0 =A0 =A0 =A0 )
> =A0 =A0 =A0 =A0 (while (< i 10)
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (set! i (+ i 1))
> =A0 =A0 =A0 =A0 )
> ))
>
> Any suggestions are greatly appreciated!
> Staci

I found the problem, and will post the resolution here for anyone else
having this issue.

Turns out many (most?) scripts I downloaded failed, also with an error
of : "Error: eval: unbound variable: ___", where ____ would be various
things, such as caar, cadr, and other macro type things.

Upon more research, I discovered that these functions are defined in
init.scm, which is part of TinyScheme.  Apparently GIMP has renamed
this file to be script-fu.init.  This file is located (for windows),
in the \\share\gimp\2.0\scripts directory.  By adding this directory
to the GIMP preferences for where to look for scripts (file-
>preferences->folders->scripts), the init file is apparently loaded
and things such as caar, cadr, and while can be used!!
 




 2 Posts in Topic:
script-fu loops
staci.bennett@[EMAIL PROT  2008-06-25 11:31:52 
Re: script-fu loops
staci.bennett@[EMAIL PROT  2008-06-26 08:36:43 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
localhost-V2008-12-19 Wed Jan 7 22:41:49 PST 2009.