This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > PainShop Pro Scripting > September 2007 > selecting a layer by name
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 |
selecting a layer by name
|
|
|
| Hi Folks
I am of the opinion that the Python script language used by Paint Shop
Pro is better than any other high level languages. This is saying a lot
since I'm comparing it to a rich language like Delphi.
The problem with Paint Shop Pro scripting is the lack of information
regarding PSP build in functions. The pdf file from JASC barely scrapes
the surface and does not even list all of the commands. I managed to
extract the list attached but there is no further help.
Here is one question that I am having difficulty with.
How do you select a layer by name?
Regards
Bruce
| |
| SuzShook 2007-09-19, 6:18 pm |
| underprocessable | |
|
| SuzShook wrote:
> Hi, Bruce - you can extract the layer name using the ReturnLayerProperties
> command. Then, if you want to select a layer of a particular name, such as
> "MyLayer", you can start at the top of the layer stack and go down through
> the layers looking for the one you want - something like in the attached
> script.
>
> I found out how to do this by a lot of trial and error, Bruce - mostly
> trying out the commands, and printing the results to see what they produced.
> You can find a lot of scripting values I've "discovered" in my Scripting
> Values Table here:
>
> http://suzshook.topcities.com/8scri...ValuesTable.htm
>
> Suz
Thanks Suz, much appreciated.
Bruce
| |
| Fred Hiltz 2007-09-19, 6:18 pm |
| Bruce wrote:
> The problem with Paint Shop Pro scripting is the lack of
> information regarding PSP build in functions. The pdf file
> from JASC barely scrapes the surface...
Correct. In additions to Suz's good stuff, be sure to get the PSP
Command API, a large set of HTML pages that describe each command
in--mostly accurate--detail. You have not said what PSP version you
are scripting, so I can't point you to it, but you should find it in
the FTP folder where you got the Scripting for Script Authors PDF.
--
Fred Hiltz, fhiltz at yahoo dot com
| |
|
| Fred Hiltz wrote:
> Bruce wrote:
>
> Correct. In additions to Suz's good stuff, be sure to get the PSP
> Command API, a large set of HTML pages that describe each command
> in--mostly accurate--detail. You have not said what PSP version you
> are scripting, so I can't point you to it, but you should find it in
> the FTP folder where you got the Scripting for Script Authors PDF.
The Paint Shop Pro 9.01 Scripting API has lots of stuff but is a bit
confusing if you don't know the parameter format. Examples of each
command would have done the trick.
I did find something useful. In the Paint Shop Pro 9 Python Libraries
path "C:\Program Files\Jasc Software Inc\Paint Shop Pro 9\Python
Libraries", there are some PSP Python scripts that were written by JASC.
These give some useful tools but show what can be done.
I added one called myScriptTools.py (see attached)
Now you can call SelectLaterByName(Environment, SearchName) and re-use
it without writing extra coding in your script.
The only problem that I can see is that these Python files are only
loaded when PSP starts. So, you have to re-start PSP if you make changes.
Bruce
|
|
|
| | Copyright 2003 - 2009 forum4designers.com Software forum Computer Hardware reviews |
|