Groups > Corel > Corel Paint Shop Pro Scripting > Re: How script the Flood Fill Tool?




How script the Flood Fill Tool?

How script the Flood Fill Tool?
Sat, 16 Feb 2008 18:16:10 -050
I want to write a script to fill a selection. One of the problem is that 
I don't see in PSPX a command to fill a selection. I have to use the 
Flood Fill tool to move it to the selection and click.
In Photoshop Elements there simple Edit>Fill Selection command which 
does it in one click whenever there is a selection active.
I don't see such command in PSPX so just recording the steps does not 
work because the Flood Tool does not automatically recognize/find the 
active selected area.
Any tips for scripting newbie?
Thanks
Post Reply
Re: How script the Flood Fill Tool?
Sat, 16 Feb 2008 18:26:28 -050
Nathan, check out the script I posted for you in the PSP X newsgroup.  This 
task is not intuitively easy, as the selection can be anywhere in the image, 
and in order to fill it, you need to have the script "click" at a
point 
within the selection.  Hence, Gary Barton's FindSelectionPoint function is 
used to "infallibly" select a point within the selection. This is not
a good 
script to get started with, as it requires more than recording - it requires 
using a function and it thus requires editing scripts.  Suz.

Nathan Gutman wrote:
> I want to write a script to fill a selection. One of the problem is
> that I don't see in PSPX a command to fill a selection. I have to use
> the Flood Fill tool to move it to the selection and click.
> In Photoshop Elements there simple Edit>Fill Selection command which
> does it in one click whenever there is a selection active.
> I don't see such command in PSPX so just recording the steps does not
> work because the Flood Tool does not automatically recognize/find the
> active selected area.
> Any tips for scripting newbie?
> Thanks
> Nathan 

Post Reply
about | contact