Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Choosing to learn Python-Fu or Script-Fu for a simple script
#2
Well still working on deciding which to delve deeper in to.

I figure a good first step is to get all the function calls working manually in the console window.

With Python, I am still struggling just to correctly pass the parameter identifying the image I want to copy from. If I try to define "Image" before calling select-rectangle, I can't get the Python console to load a file. It wants the full path and the file name, and also the "file name as entered by user", whatever that is - something different than the full path? All combinations I try just return a 'Syntax error' in the console.

Alternately, I can try to identify the active image as part of the call to select-rectangle, but I am having no luck setting that parameter correctly either. I know with Python-fu identifying the object is not a single integer as it is in Script-fu. But I can't get the syntax right in this call either.


Meanwhile, since all of the Procedures in Gimp were written for Script-fu first anyway, it appears, using Script should have some advantages - including a deeper bench of tutorials scattered around the 'net. For such a small operation of just moving a pointer around an image, I will be able to handle the essentially RPN math notation that Scheme wants to use. And I have discovered the Loop syntax to use in Scheme and thus in Script-fu, so incrementing the pointer location shouldn't be too hard, except....

I can't get the Script-fu Copy Selection & then Paste Selection into a new file. The options on copying a selection (I have that working correctly) copy to a new channel, or to a buffer, or to a layer, and then those are probably floating, and I probably have to anchor whichever it is, either before I Paste, or after, and I can't get the most seemingly easy-peasy Copy Selection & Paste Selection even working manually in the console yet either.
Reply


Messages In This Thread
RE: Choosing to learn Python-Fu or Script-Fu for a simple script - by BrianJ - 03-15-2019, 09:53 PM

Forum Jump: