Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Editing max and min .scm
#3
Thumbs Up 
(04-14-2023, 02:30 PM)PixLab Wrote:
(04-14-2023, 01:57 PM)Krikor Wrote: SF-ADJUSTMENT "Horizontal" '(2 1 500 1 10 0 1)
SF-ADJUSTMENT "Vertical" '(2 1 500 1 10 0 1)

I did found this

Code:
SF-ADJUSTMENT "label" '(value, lower, upper, step_inc, page_inc, digits, type)

here > https://www.gimpusers.com/forums/gimp-us...and-others



Thus I would try SF-ADJUSTMENT "Horizontal" '(2 0 2000 1 10 0 1) and if it's not working... yes I'm stupid enough to try things by my own, and there is a lot of things like "if (blabla = 0)" which will bother me in the code if my try doesn't work, thus I'll come back here for help if my try does not work > but you should know that I don't know anything about script Wink

Hope it helps

Intuitively that's exactly what I suppose!
But I had the same doubt about the last three (3) digits (10 0 1 ), so I preferred to ask for help!

More confident now I will test the changes then.

PixLab, thank you very much for your quick and efficient help!


PS: 

After changing the code as below, the script accepts the values 0 (zero) and 2000 as input.

However, it generates an error and does not produce tab separation.
________________________________________________________

SF-ADJUSTMENT "Horizontal" '(2 0 2000 1 10 0 1)

SF-ADJUSTMENT "Vertical" '(2 0 2000 1 10 0 1)

________________________________________________________

  Grid Warning
Error while executing script-fu-grid-guides:

Error: /: division by zero 


  GIMP Warning
Plug-in 'Grid' left image undo in inconsistent state, closing open undo groups.

Even though it was impossible to enter zero (0) as the minimum value, being able to increase the maximum value was already a huge improvement in the script for my use!

I manage to work around the situation as follows:
For a 5000W x 1000H (px) image, where I want a guide every 1000 px:

Mode - Spacing of Guides (px):
Horizontal = 1000
Vertical = 1000 **

** Note: The interesting thing here is that no vertical guide is generated!

Number of Divisions Mode:
Horizontal = 5
Vertical = 1
                               .....
Samj PortableGimp 2.10.28 - Win-10 /64.
Reply


Messages In This Thread
Editing max and min .scm - by Krikor - 04-14-2023, 01:57 PM
RE: Editing max and min .scm - by PixLab - 04-14-2023, 02:30 PM
RE: Editing max and min .scm - by Krikor - 04-14-2023, 03:08 PM
RE: Editing max and min .scm - by programmer_ceds - 04-14-2023, 04:07 PM
RE: Editing max and min .scm - by Ofnuts - 04-14-2023, 04:41 PM
RE: Editing max and min .scm - by PixLab - 04-15-2023, 04:41 AM

Forum Jump: