Groups > Corel > Corel Paint Shop Pro Scripting > Re: Suz, a question




Suz, a question

Suz, a question
Sat, 23 Feb 2008 15:48:36 -070
As I posted a bit earlier in the v.9 group, I scripted the steps needed to 
create that squared outer selection border to make it a one-click 
operation, and it works fine but I'd like one further option if you can 
tell me what to do.

I added a step that allows me to get the materials palette and then 
automatically flood fill the selection border after I select the material 
from the swatch.  That's because most times I want to fill a selection 
border.

But there might be a time when I decide I don't want it filled (don't ask 
me why, but maybe it'll happen :-)  I can make the script cancel at the 
beginning when it prompts for the get number, and would like to know if 
there is a method that, when the material palette appears, if I hit Cancel 
instead of OK the script terminates at that stage without an error and 
without continuing to the fill stage.

Thanks!

Regards,

Post Reply
Re: Suz, a question
Sat, 23 Feb 2008 17:29:32 -070
"SuzShook" <suzshook@roadrunner.com> wrote in
news:47c0b19e$1_1@cnews:
> JoeB wrote:
>> As I posted a bit earlier in the v.9 group, I scripted the steps
>> needed to create that squared outer selection border to make it a
>> one-click operation, and it works fine but I'd like one further
>> option if you can tell me what to do.
>>
>> I added a step that allows me to get the materials palette and then
>> automatically flood fill the selection border after I select the
>> material from the swatch.  That's because most times I want to fill a
>> selection border.
>>
>> But there might be a time when I decide I don't want it filled (don't
>> ask me why, but maybe it'll happen :-)  I can make the script cancel
>> at the beginning when it prompts for the get number, and would like
>> to know if there is a method that, when the material palette appears,
>> if I hit Cancel instead of OK the script terminates at that stage
>> without an error and without continuing to the fill stage.
>>
>> Thanks!
>>
>> Regards,
>>
>> JoeB
> 
> If I remember correctly, JoeB, PSP 9 is the version in which the
> Cancel command in the Material Properties dialog is not honored by
> scripts.  As far as I know, there's no way to "force" the script
to
> recognize that the Cancel button has been used, unfortunately.  I seem
> to remember discussing this with Corel techies, but I don't think that
> was ever fixed before PSP X.  I don't know what your script steps are,
> but if the border you create is filled on its own layer, you can just
> delete the layer.  Or if the selection remains after the script
> terminates, then hitting the Delete key after termination will remove
> what's selected, even if a new layer is not used. Of course, that
> would also remove anything on that layer within the selection. 
> Another thought - you could float the selection before filling it, and
> then leave the selection intact so that even when the script 
> terminates, the selection can be removed without destroying anything
> on the original layer.  Lots of ways around the problem, and you don't
> get that annoying "Would you like to continue the script?"
message,
> either!  Suz 
Hi Suz,
First, I'm attaching the script in case you wish to look at the steps.
It isn't that I want to remove the selection, what I was hoping to do 
was retain the selection/selection border but without filling it by 
cancelling the fill.
Is it only the Material Properties dialogue that doesn't honor a Cancel 
request in PSP9?
And the reason I asked was this.  At the top of the script I can stop 
the script with the snippet that stops it if, in the GetNumber dialogue, 
the user hits Cancel.  I had thought that there would be a similar 
snippet that would work with various other dialogues that had OK and 
Cancel buttons, thinking it would just be a matter of editing the 
snippet to refer to the particular dialogue.
I gather that you're saying that this type of snipped doesn't work with 
other dialogues (quietly terminating the script at a particular point) 
but only works with the prompt dialoge at the top of this script?
Regards,
JoeB
Post Reply
Re: Suz, a question
Sat, 23 Feb 2008 18:53:13 -050
JoeB wrote:
> As I posted a bit earlier in the v.9 group, I scripted the steps
> needed to create that squared outer selection border to make it a
> one-click operation, and it works fine but I'd like one further
> option if you can tell me what to do.
>
> I added a step that allows me to get the materials palette and then
> automatically flood fill the selection border after I select the
> material from the swatch.  That's because most times I want to fill a
> selection border.
>
> But there might be a time when I decide I don't want it filled (don't
> ask me why, but maybe it'll happen :-)  I can make the script cancel
> at the beginning when it prompts for the get number, and would like
> to know if there is a method that, when the material palette appears,
> if I hit Cancel instead of OK the script terminates at that stage
> without an error and without continuing to the fill stage.
>
> Thanks!
>
> Regards,
>
> JoeB

If I remember correctly, JoeB, PSP 9 is the version in which the Cancel 
command in the Material Properties dialog is not honored by scripts.  As far 
as I know, there's no way to "force" the script to recognize that the
Cancel 
button has been used, unfortunately.  I seem to remember discussing this 
with Corel techies, but I don't think that was ever fixed before PSP X.  I 
don't know what your script steps are, but if the border you create is 
filled on its own layer, you can just delete the layer.  Or if the selection 
remains after the script terminates, then hitting the Delete key after 
termination will remove what's selected, even if a new layer is not used. 
Of course, that would also remove anything on that layer within the 
selection.  Another thought - you could float the selection before filling 
it, and then leave the selection intact so that even when the script 
terminates, the selection can be removed without destroying anything on the 
original layer.  Lots of ways around the problem, and you don't get that 
annoying "Would you like to continue the script?" message, either! 
Suz 

Post Reply
about | contact