Post Reply 

Scripting Help

Apr 9, 2011, 03:43 (This post was last modified: Apr 9, 2011 04:27 by Dabil.)
Post: #1
Scripting Help
I recently accepted a role making "trophies" for an online gaming site that I belong to as a volunteer. The person that did the job before me wrote a script to automate this process. But the script was wrote for gimp 2.2 and doesn't work in the current version. I believe the update to gimp 2.6 broke the script because of the difference in script-fu from previous versions. I would like to repair the script to get the trophy generator script-fu working again but I am new to gimp and don't really understand the language.

Now I do have experience programming in C++ and Java so I have an idea what is going on even if I don't understand the syntax of Gimps language.

When I run the script I get (2) errors:

! Error while executing script-fu-pdc-standard-trophy:
Error: eval: unbound variable: string-upcase

This is the first error and the actual code in the script that I believe is causing it is:

(temp-search (string-append inPrefix (string-upcase inName)))

The problem as I am understanding it is that Gimp does not recognize the sting function "string-upcase" and so is complaining about a variable not being declared with the let function.

So how do I fix this? My understanding of the script is that we want the text in the variable "inName" to all be in Uppercase. What is the new syntax or function that I should use to accomplish this? If gimp now does not have an equivalent function, I can just remember to type that field as all caps when I enter it in the form.

Would the syntax for that then be:
(temp-search (string-append inPrefix (inName)))
Doing it this way gives me: Error: illegal function

so then I tried it this way:

(temp-search (string-append inPrefix inName))
This gives me: Error: Procedure exection of gimp-gimprc-query failed

Now the second error I get reads:

! Gimp Message
Plug-In 'Standard' left image undo in inconsistent state, closing open undo groups

I really have no idea what this message is all about. I am just assuming that it is caused because the first error crashed the script or did not complete something that needed to thus causing this message.

Any help would be greatly appreciated. Thanks!
Find all posts by this user
Quote this message in a reply
Apr 9, 2011, 08:25
Post: #2
RE: Scripting Help
GIMP's language is actually TinyScheme, so you may get the string-related question answered in forums dealing directly with it.

Yes, the last message will fix itself once you have fixed the rest.

Personally I use the Python-fu which I find much more palatable Smile

Now answering your questions on
https://Gimp-Forum.net
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  GIMP Scripting POed Lib 1 715 May 28, 2012 17:38
Last Post: ofnuts

Forum Jump:


GIMP ForumPortalArchiveContactTermsRSS