GIMP Chat http://gimpchat.com/ |
|
How to do Sub-Procedures http://gimpchat.com/viewtopic.php?f=9&t=19340 |
Page 1 of 1 |
Author: | ThomasLahme [ Thu Apr 22, 2021 8:39 am ] |
Post subject: | How to do Sub-Procedures |
Dear Community, I need some help In the Post :: viewtopic.php?f=9&t=19333 I have done some Coding. And in General the Work was nearly Complete. But: Be warned, doing this: Code: Select all (define image 1) (define layer 2) Will define image and layer for ALL scripts and might break other scripts. From: Script Coder So this to do for all needed Variables is very COOL but only the half Work. So I tried to do not only Local Variables but Local Procedures too. The Problem is: I can't find any documentation how a Local Procedure will done or Is it possible to have Local Procedures So In hope of Help Thomas Lahme |
Author: | paynekj [ Thu Apr 22, 2021 9:07 am ] |
Post subject: | Re: How to do Sub-Procedures |
Here's a way of doing local functions: Code: Select all (define (script-fu_kp24_thing image drawable message colour option) |
Author: | ThomasLahme [ Thu Apr 22, 2021 9:52 am ] |
Post subject: | Re: How to do Sub-Procedures |
Ok, I have edit my Program, And my Local-Procedures are new not go direct Wrong But it seams that the above by "let" defined Variables are not accessible from the Local Procedures Can you please help me this Step to Runing-Code too. Thanks Thomas Lahme |
Author: | paynekj [ Thu Apr 22, 2021 10:58 am ] |
Post subject: | Re: How to do Sub-Procedures |
Code: Select all (define (script-fu_kp24_thing image drawable message colour option) |
Author: | ThomasLahme [ Thu Apr 22, 2021 11:23 am ] |
Post subject: | Re: How to do Sub-Procedures |
Excuse me ;-) I'm very new to Sheme - which is the Master-Language of Script-Fu And I have never done anything with this before. So please excuse my Beginner-Mistakes But one Question more to your last Example in the last Post. I have every time understand that a "Define" would create a global-Variable So when I right understand you, inside a define Statement ... ... a inner "Define" would create a Global-Variable in this Define ... Which is outer of the first Define a Local-Variable Can you please say me is this new Understanding correct In hope to learn the trick Thomas Lahme |
Author: | paynekj [ Thu Apr 22, 2021 11:47 am ] |
Post subject: | Re: How to do Sub-Procedures |
Defining a variable (or procedure) inside a define limits that definition to the scope of the parent. So in my example, my_variable only exists within script-fu_kp24_thing and cannot be accessed outside of it, but can be accessed by procedures also defined within script-fu_kp24_thing because they are in the same scope. Kevin |
Author: | ThomasLahme [ Thu Apr 22, 2021 12:06 pm ] |
Post subject: | Re: How to do Sub-Procedures |
Ok, I'm anything like a little bit sleepy so I think I will try it Tomorow By the Way you are in my temporary Experience: 1. The most helpful People I meet Today ![]() 2. The most helpful People to learn anything in Computer Science. ![]() So my respect for you ![]() A happy Thomas Lahme |
Author: | ofnuts [ Fri Apr 23, 2021 6:54 am ] |
Post subject: | Re: How to do Sub-Procedures |
ThomasLahme wrote: Excuse me ;-) I'm very new to Sheme - which is the Master-Language of Script-Fu You are of course aware that you can also write your scripts in Python? |
Author: | ThomasLahme [ Mon Apr 26, 2021 12:19 pm ] |
Post subject: | Re: How to do Sub-Procedures |
Yes I aware, but in the Days for Corona, I have given Courses in Programming And have made me my game to learn each necessary Programming-Language Which is there outside in the Web of Community's So I highly interested in Learning GIMP under Scheme. So here Is my little Script which do by chance its Work. And which most-fully don't Crash. I have Commented the Code in the best I can. But it must give a logical Mistake == Which I will fix when I found it == So please is there outside anybody who find the Mistke I will send you a Box of Sweets when you would call me the Mistake Attachment:
File comment: This is my last Result. When you have time to search the Mistake Then please find the Mistake When you find it tell me the Mistske I swear I will give you a Box of chocolates ![]() Downloaded 63 times Thomas Lahme |
Page 1 of 1 | All times are UTC - 5 hours [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |