This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > PainShop Pro Scripting > May 2006 > PSPX Scripting Text... Aaargh!





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author PSPX Scripting Text... Aaargh!
Howard Dickson

2006-05-25, 7:00 pm

Folks,

I must admit, since the release of PSPX, I've still been using PSP9 for
all my personal graphic work and scripts development, with minor tweaks
to released scripts for the PSPX version.

Recently a few folk have been reporting strange behaviour in scripts
that have a text element in them, usually manifesting itself as
oversized text.

I tried some of my scripts with PSPX and mostly they worked OK...
however I have seen them acting strangely, with for no apparent reason,
the text displayed at a larger size. I know with PSPX they started using
Point size which means that a text pointsize value will be different in
size on any given image, depending on that image's resolution.


There is however a fairly major bug with recording text in a script (I
think) which I would like you to try for yourself.

Open a new blank image (white background, say 500 x 500 pixels 200
pixels/Inch resolution).

Select the Text tool and choose Arial font, 72 size and 'Pixels' units.

Click on the image and enter some text, say 'TEST'.
Fair enough... it displays at the size you would expect.

If you toggle the Text 'Units' on the menubar to 'Points', you'll see
that 72 Pixels relates to 26 Points.

Now put it back to 72 Pixels and we'll record a script...

Click the Record button
Using the Text tool click on your image so you insert the TEST text
again (at 72 size and Pixels units).
Save the script as 'Test' script.

Now bring the Test script up in the Scripts dropdown menu and click on
the 'Edit Selected Script' so you can look at what you've just recorded.

In the Text section of the script you'll see that the 'PointSize' value
has been recorded as 26. ie it has been recorded as the POINTS
equivalent of 72 Pixels.

Fair enough, when we run the script, it's going to insert the text using
Points units, and this Pointsize value... WRONG!!!

When you run the script, it writes the text using the 26 as a 'Pixels'
size value, so the text appears smaller!!!

So let me get this right... when you record text that you've sized in
pixels, it records it in the smaller equivalent Points value, but runs
the script with the smaller value as Pixels... COOL! Who thought of that
little beauty?

Could you please check this for me, to make sure I'm not imagining things.

No wonder some of my scripts are acting strangely. Just as well I
haven't been developing scripts with PSPX, I'd be at the funny farm by now.

If this is confirmed as a genuine bug, I'll let the Cawrell boys know.

Rgds,
Howard


--

---oooOOOooo---

Sheilsoft
ComputerSystems

www.sheilsoft.com

---oooOOOooo---
W.Madison

2006-05-25, 11:04 pm

Works just like you say here, Howard. Text comes up very small and in pixels
when the script is run, doesn't matter if it's floating or vector text. If I
record a script in either points or pixels, still comes up small every time.

Wendy


"Howard Dickson" <howard@REMOVEsheilsoft.com> wrote in message
news:447632f2$1_1@cnews...
> Folks,
>
> I must admit, since the release of PSPX, I've still been using PSP9 for
> all my personal graphic work and scripts development, with minor tweaks to
> released scripts for the PSPX version.
>
> Recently a few folk have been reporting strange behaviour in scripts that
> have a text element in them, usually manifesting itself as oversized text.
>
> I tried some of my scripts with PSPX and mostly they worked OK... however
> I have seen them acting strangely, with for no apparent reason, the text
> displayed at a larger size. I know with PSPX they started using Point size
> which means that a text pointsize value will be different in size on any
> given image, depending on that image's resolution.
>
>
> There is however a fairly major bug with recording text in a script (I
> think) which I would like you to try for yourself.
>
> Open a new blank image (white background, say 500 x 500 pixels 200
> pixels/Inch resolution).
>
> Select the Text tool and choose Arial font, 72 size and 'Pixels' units.
>
> Click on the image and enter some text, say 'TEST'.
> Fair enough... it displays at the size you would expect.
>
> If you toggle the Text 'Units' on the menubar to 'Points', you'll see that
> 72 Pixels relates to 26 Points.
>
> Now put it back to 72 Pixels and we'll record a script...
>
> Click the Record button
> Using the Text tool click on your image so you insert the TEST text again
> (at 72 size and Pixels units).
> Save the script as 'Test' script.
>
> Now bring the Test script up in the Scripts dropdown menu and click on the
> 'Edit Selected Script' so you can look at what you've just recorded.
>
> In the Text section of the script you'll see that the 'PointSize' value
> has been recorded as 26. ie it has been recorded as the POINTS equivalent
> of 72 Pixels.
>
> Fair enough, when we run the script, it's going to insert the text using
> Points units, and this Pointsize value... WRONG!!!
>
> When you run the script, it writes the text using the 26 as a 'Pixels'
> size value, so the text appears smaller!!!
>
> So let me get this right... when you record text that you've sized in
> pixels, it records it in the smaller equivalent Points value, but runs the
> script with the smaller value as Pixels... COOL! Who thought of that
> little beauty?
>
> Could you please check this for me, to make sure I'm not imagining things.
>
> No wonder some of my scripts are acting strangely. Just as well I haven't
> been developing scripts with PSPX, I'd be at the funny farm by now.
>
> If this is confirmed as a genuine bug, I'll let the Cawrell boys know.
>
> Rgds,
> Howard
>
>
> --
>
> ---oooOOOooo---
>
> Sheilsoft
> ComputerSystems
>
> www.sheilsoft.com
>
> ---oooOOOooo---



JoeB

2006-05-25, 11:04 pm

"W.Madison" <wsmadison@DONTSPAM.charter.net> wrote in
news:447645b2$1_2@cnews:

> Works just like you say here, Howard. Text comes up very small

and in
> pixels when the script is run, doesn't matter if it's floating

or
> vector text. If I record a script in either points or pixels,

still
> comes up small every time.
>
> Wendy
>


So does this mean that PSPX has broken the script recording
function as well as whatever else doesn't work so well? Sheesh!

Regards,

JoeB





> "Howard Dickson" <howard@REMOVEsheilsoft.com> wrote in message
> news:447632f2$1_1@cnews...
PSP9[color=darkred]
minor[color=darkred]
scripts[color=darkred]
as[color=darkred]
OK...[color=darkred]
apparent[color=darkred]
they[color=darkred]
value will[color=darkred]
image's[color=darkred]
script[color=darkred]
200[color=darkred]
'Pixels'[color=darkred]
you'll see[color=darkred]
text[color=darkred]
click[color=darkred]
just[color=darkred]
'PointSize'[color=darkred]
POINTS[color=darkred]
text[color=darkred]
sized in[color=darkred]
but[color=darkred]
thought[color=darkred]
imagining[color=darkred]
well I[color=darkred]
farm[color=darkred]
boys[color=darkred]
>
>
>


Joske

2006-05-26, 7:27 pm

Howard Dickson wrote:

> Recently a few folk have been reporting strange behaviour in
> scripts that have a text element in them, usually manifesting
> itself as oversized text.


The same thing is happening to all our Calendar scripts :-(

It wasn't like that until 10.03.

Jos and I did some testing and we can repeat your test (the problems
must be related). I think Jos was planning to post something about
it.

Joske



Jos Croeze

2006-05-26, 7:27 pm

To Howard,

"Joske" <j.backer@home.nl> schreef in bericht news:4476e988$1_1@cnews...
> Howard Dickson wrote:
>
>
> The same thing is happening to all our Calendar scripts :-(


My mistake. Our scripts work fine since the code was created using PSP8.
I've checked this by creating the same Calendar using 8, 9 and X and they
show the same size.

The difference is PSP8 uses the command "App.Do( Environment, 'Text', {"
where PSP9 and PSPX record "App.Do( Environment, 'TextEx', {" with a whole
lot of other parameters putting Text on an image. Haven't figured out yet
what makes the difference, but Crawl makes it more confusing because PSP8
and PSP9 didn't have the pixelsize/pointsize distinction where the scripts
use the parameter pointsize to define the fontsize.

My guess at first impression is to use PSP8 recorded script-commands putting
text and use those in your scripts for PSP9 and PSPX.

Jos




Jos Croeze

2006-05-26, 7:27 pm


"Jos Croeze" <j.c.croeze@home.nl> schreef in bericht
news:447738b5_1@cnews...
> To Howard,
>
> "Joske" <j.backer@home.nl> schreef in bericht news:4476e988$1_1@cnews...
>
> My mistake. Our scripts work fine since the code was created using PSP8.
> I've checked this by creating the same Calendar using 8, 9 and X and they
> show the same size.
>
> The difference is PSP8 uses the command "App.Do( Environment, 'Text', {"
> where PSP9 and PSPX record "App.Do( Environment, 'TextEx', {" with a whole
> lot of other parameters putting Text on an image. Haven't figured out yet
> what makes the difference, but Crawl makes it more confusing because PSP8
> and PSP9 didn't have the pixelsize/pointsize distinction where the scripts
> use the parameter pointsize to define the fontsize.
>
> My guess at first impression is to use PSP8 recorded script-commands

putting
> text and use those in your scripts for PSP9 and PSPX.


In addition, when I choose 42 as fontsize in my Calendar-script, I now have
to choose Pixelsize 56 adding Text on the image for the charactersize.
That's 1/3 more of the original size. I checked this with fontsize 30 in my
script, which makes it Pixelsize 40 to use for adding text. PSP8 and PSP9
don't need this 'trick'.

Jos



Sponsored Links


Copyright 2003 - 2009 forum4designers.com  Software forum  Computer Hardware reviews