It is currently Fri Aug 28, 2026 1:46 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 37 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: Still Can't Stop Scripts From Running!
PostPosted: Mon Dec 02, 2013 6:17 pm  (#21) 
Wallace wrote:
RobA wrote:
The simplest way I've found to kill badly behaving scripts is to delete the layer they are working on. This usually causes them to fail, and then you can undo the layer delete (as long as the undo stack wasn't disabled by the stack author, that is...)

That's a good suggestion RobA, but wouldn't it be easier to just click on the 'cancel' button in the script's dialog box? Being able to click 'cancel in the script's dialog box' would just stop whatever the script is from running, nothing else need be done after this, script canceled end of story.
What's so difficult about this procedure that I'm not getting? :gaah

Disclaimer: I'm not an expert on the Operating System/Gimp Programs architecture/interaction. :hehe

Try thinking of it this way.
My guess is that when you initiate the script running by clicking on the menu item, the Gimp process initiates script-fu.exe to start in a new process and passes it the script name as an parameter. At completion, the Gimp process receives the status of success or error details if the script ends abnormally.
What you are requesting is that on every computer cycle, script-fu.exe stop what it is doing to see if the Cancel is currently being pressed/clicked, if not continue for another cycle, then check again.
This would slow things down so much - redundantly checking for the rare occasions that there actually was a key press/mouse-click.
Or the script-fu software would have to be written in a way to have multiple processes running. One process that controls everything, initiating the script-fu.exe process running and receiving it's completion state, and another to checking for user interactions. Determining whether or not to end the script-fu process.
My guess it has been written in a manner like my former explanation.

As I said this is a layman's explanation and will soon be corrected by an 'expert', but it might offer some insight into the mysterious inner workings of software while you wait.


Top
 Post subject: Re: Still Can't Stop Scripts From Running!
PostPosted: Mon Dec 02, 2013 6:56 pm  (#22) 
Offline
Administrator
User avatar

Joined: Aug 10, 2012
Posts: 14177
Location: Native to NYC living in Arizona, Gimp 2.8 - 3.0, Win 11 PC.
fluffybunny wrote:
Wallace wrote:
RobA wrote:
The simplest way I've found to kill badly behaving scripts is to delete the layer they are working on. This usually causes them to fail, and then you can undo the layer delete (as long as the undo stack wasn't disabled by the stack author, that is...)

That's a good suggestion RobA, but wouldn't it be easier to just click on the 'cancel' button in the script's dialog box? Being able to click 'cancel in the script's dialog box' would just stop whatever the script is from running, nothing else need be done after this, script canceled end of story.
What's so difficult about this procedure that I'm not getting? :gaah

Disclaimer: I'm not an expert on the Operating System/Gimp Programs architecture/interaction. :hehe

Try thinking of it this way.
My guess is that when you initiate the script running by clicking on the menu item, the Gimp process initiates script-fu.exe to start in a new process and passes it the script name as an parameter. At completion, the Gimp process receives the status of success or error details if the script ends abnormally.
What you are requesting is that on every computer cycle, script-fu.exe stop what it is doing to see if the Cancel is currently being pressed/clicked, if not continue for another cycle, then check again.
This would slow things down so much - redundantly checking for the rare occasions that there actually was a key press/mouse-click.
Or the script-fu software would have to be written in a way to have multiple processes running. One process that controls everything, initiating the script-fu.exe process running and receiving it's completion state, and another to checking for user interactions. Determining whether or not to end the script-fu process.
My guess it has been written in a manner like my former explanation.

As I said this is a layman's explanation and will soon be corrected by an 'expert', but it might offer some insight into the mysterious inner workings of software while you wait.


Why then does every scripted dialog box have a 'cancel' button on it? At some time this button must have been use to cancel a script from running, why would it be there then? Is it a decoration? Why not eliminate this option altogether, if it has no function?

_________________
Image
"A wise man learns more from a foolish question than a fool can learn from a wise answer"
Image


Top
 Post subject: Re: Still Can't Stop Scripts From Running!
PostPosted: Mon Dec 02, 2013 7:02 pm  (#23) 
Wallace wrote:
Why then does every scripted dialog box have a 'cancel' button on it? At some time this button must have been use to cancel a script from running, why would it be there then? Is it a decoration? Why not eliminate this option altogether, if it has no function?[/font]

It is there to Cancel/Close the dialog box if you change your mind and don't want to run the script, not the stop the script once it is running of the script IMO. :) Don't shoot the messenger.


Top
 Post subject: Re: Still Can't Stop Scripts From Running!
PostPosted: Mon Dec 02, 2013 7:11 pm  (#24) 
Offline
Administrator
User avatar

Joined: Aug 10, 2012
Posts: 14177
Location: Native to NYC living in Arizona, Gimp 2.8 - 3.0, Win 11 PC.
fluffybunny wrote:
Wallace wrote:
Why then does every scripted dialog box have a 'cancel' button on it? At some time this button must have been use to cancel a script from running, why would it be there then? Is it a decoration? Why not eliminate this option altogether, if it has no function?[/font]

It is there to Cancel/Close the dialog box if you change your mind and don't want to run the script, not the stop the script once it is running of the script IMO. :) Don't shoot the messenger.

:gaah

_________________
Image
"A wise man learns more from a foolish question than a fool can learn from a wise answer"
Image


Top
 Post subject: Re: Still Can't Stop Scripts From Running!
PostPosted: Mon Dec 02, 2013 7:20 pm  (#25) 
:gaah I agree!
Yesterday I ran Rob A's Path Blend script not realising how long it would take to complete...
Boy did I regret that (even on my i7 2600K processor overclocked at 4.9ghz). :(

Only to Cntrl-Z after it completed because I didn't like the results!


Top
 Post subject: Re: Still Can't Stop Scripts From Running!
PostPosted: Mon Dec 02, 2013 7:25 pm  (#26) 
Offline
Administrator
User avatar

Joined: Aug 10, 2012
Posts: 14177
Location: Native to NYC living in Arizona, Gimp 2.8 - 3.0, Win 11 PC.
fluffybunny wrote:
:gaah I agree!
Yesterday I ran Rob A's Path Blend script not realising how long it would take to complete...
Boy did I regret that (even on my i7 2600K processor overclocked at 4.9ghz). :(

Only to Cntrl-Z after it completed because I didn't like the results!


See!!! It's stuff like that, that I'm talking about. :hoh
So I guess we all just have to set there until the script feels it's time to stop? :gaah
Not me... :hoh

_________________
Image
"A wise man learns more from a foolish question than a fool can learn from a wise answer"
Image


Top
 Post subject: Re: Still Can't Stop Scripts From Running!
PostPosted: Mon Dec 02, 2013 8:02 pm  (#27) 
Offline
Global Moderator
User avatar

Joined: May 16, 2010
Posts: 16168
Rob that is an excellent idea to interrupt the script. :)
Fluffybunny i think you are very close to understanding what is going on with the script-fu plugin function. :)
Wallace, i still believe most scripts should have the option to keep layers. This way if you don't like the results you can play with all the different functions added as layers until you possibly get something you do like without re running the filter again. I don't think this would slow the script down much. Plus you always have that option NOT to keep the layers. :)

_________________
Image


Top
 Post subject: Re: Still Can't Stop Scripts From Running!
PostPosted: Mon Dec 02, 2013 8:07 pm  (#28) 
Offline
Administrator
User avatar

Joined: Aug 10, 2012
Posts: 14177
Location: Native to NYC living in Arizona, Gimp 2.8 - 3.0, Win 11 PC.
Rod wrote:
Rob that is an excellent idea to interrupt the script. :)
Fluffybunny i think you are very close to understanding what is going on with the script-fu plugin function. :)
Wallace, i still believe most scripts should have the option to keep layers. This way if you don't like the results you can play with all the different functions added as layers until you possibly get something you do like without re running the filter again. I don't think this would slow the script down much. Plus you always have that option NOT to keep the layers. :)

I do agree with your layer option, but still can't stop script from running, without any side effects.

_________________
Image
"A wise man learns more from a foolish question than a fool can learn from a wise answer"
Image


Top
 Post subject: Re: Still Can't Stop Scripts From Running!
PostPosted: Mon Dec 02, 2013 8:14 pm  (#29) 
Wallace wrote:
fluffybunny wrote:
:gaah I agree!
Yesterday I ran Rob A's Path Blend script not realising how long it would take to complete...
Boy did I regret that (even on my i7 2600K processor overclocked at 4.9ghz). :(

Only to Cntrl-Z after it completed because I didn't like the results!


See!!! It's stuff like that, that I'm talking about. :hoh
So I guess we all just have to set there until the script feels it's time to stop? :gaah
Not me... :hoh

I feel your pain, remember mine was the first reply to this thread...
I try to see the positives... gives me a chance to stretch my legs and get a cup of tea.
Log in to GC and check for new posts etc...
Patience my friend. We have become a society of instant gratification... :lol


Top
 Post subject: Re: Still Can't Stop Scripts From Running!
PostPosted: Mon Dec 02, 2013 8:27 pm  (#30) 
Offline
Global Moderator
User avatar

Joined: May 16, 2010
Posts: 16168
Amen Fluffybunny! :bigthup
The youth today wants the auto and home within 10 days that it took me 10 years to achieve.The problem is the banks are allowing it and causing too many bankruptcy problems because of this.

Back on subject-
Wallace I don't think stopping scripts mid function is possible.Interrupting the running script by deleting a layer seems your only option. :)
Thanks again Rob.

_________________
Image


Top
 Post subject: Re: Still Can't Stop Scripts From Running!
PostPosted: Mon Dec 02, 2013 8:51 pm  (#31) 
Offline
Administrator
User avatar

Joined: Aug 10, 2012
Posts: 14177
Location: Native to NYC living in Arizona, Gimp 2.8 - 3.0, Win 11 PC.
Rod wrote:
Amen Fluffybunny! :bigthup
The youth today wants the auto and home within 10 days that it took me 10 years to achieve.The problem is the banks are allowing it and causing too many bankruptcy problems because of this.

Back on subject-
Wallace I don't think stopping scripts mid function is possible.Interrupting the running script by deleting a layer seems your only option. :)
Thanks again Rob.

There should be a way to stop things in mid flow.

_________________
Image
"A wise man learns more from a foolish question than a fool can learn from a wise answer"
Image


Top
 Post subject: Re: Still Can't Stop Scripts From Running!
PostPosted: Mon Dec 02, 2013 10:46 pm  (#32) 
Offline
Script Coder
User avatar

Joined: Jul 14, 2010
Posts: 697
Wallace wrote:
There should be a way to stop things in mid flow.


I agree. You could write up a feature request and post it at the bugtracker...

-Rob A>

_________________
Image
Fantasy Cartography and Mapping by RobA


Top
 Post subject: Re: Still Can't Stop Scripts From Running!
PostPosted: Tue Dec 03, 2013 2:02 pm  (#33) 
Offline
Global Moderator
User avatar

Joined: May 16, 2010
Posts: 16168
Good luck with it. :)

_________________
Image


Top
 Post subject: Re: Still Can't Stop Scripts From Running!
PostPosted: Tue Dec 03, 2013 2:48 pm  (#34) 
Offline
Administrator
User avatar

Joined: Aug 10, 2012
Posts: 14177
Location: Native to NYC living in Arizona, Gimp 2.8 - 3.0, Win 11 PC.
RobA wrote:
I agree. You could write up a feature request and post it at the bugtracker...

What's 'bugtracker?
Rod wrote:
Good luck with it. :)

Yeah... And I don't even know what bugtracker is. :hehe

_________________
Image
"A wise man learns more from a foolish question than a fool can learn from a wise answer"
Image


Top
 Post subject: Re: Still Can't Stop Scripts From Running!
PostPosted: Tue Dec 03, 2013 2:56 pm  (#35) 
Offline
GimpChat Member
User avatar

Joined: Apr 07, 2010
Posts: 14182
Ever heard of Google :teeth
bugtracker

_________________
Image


Top
 Post subject: Re: Still Can't Stop Scripts From Running!
PostPosted: Tue Dec 03, 2013 3:08 pm  (#36) 
Offline
Script Coder
User avatar

Joined: Jul 14, 2010
Posts: 697
Wallace wrote:
RobA wrote:
I agree. You could write up a feature request and post it at the bugtracker...

What's 'bugtracker?
Rod wrote:
Good luck with it. :)

Yeah... And I don't even know what bugtracker is. :hehe



I was referring to the Gimp Bugzilla site, which includes enhancement requests:

https://bugzilla.gnome.org/buglist.cgi? ... nhancement

....
and looks like it has been an outstanding request since 2003:
https://bugzilla.gnome.org/show_bug.cgi?id=109605


Quote:
Onno Kortmann [reporter] 2003-03-31 14:10:06 UTC
Maybe I'm too stupid to find out, but the gimp should really have an option
to cancel the execution of a running script-fu script. Especially for
development, this would be very nice.


with the last response in 2007:
Quote:
Kevin Cozens [GIMP developer] 2007-05-12 04:27:38 UTC
Future plans for Script-Fu call for scripts to be run as plug-ins in the same
way Python and Perl scripts are run. I don't know when this change will happen.


-Rob A>

_________________
Image
Fantasy Cartography and Mapping by RobA


Top
 Post subject: Re: Still Can't Stop Scripts From Running!
PostPosted: Tue Dec 03, 2013 5:14 pm  (#37) 
Offline
Administrator
User avatar

Joined: Aug 10, 2012
Posts: 14177
Location: Native to NYC living in Arizona, Gimp 2.8 - 3.0, Win 11 PC.
Thanks Rob A, I'll look into this. ;)

_________________
Image
"A wise man learns more from a foolish question than a fool can learn from a wise answer"
Image


Top
Post new topic Reply to topic  [ 37 posts ]  Go to page Previous  1, 2

All times are UTC - 5 hours [ DST ]



* Login  



Powered by phpBB3 © phpBB Group