This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > PainShop Pro Scripting > July 2006 > A Newbie Question -- Need Reference of Some Kind
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 |
A Newbie Question -- Need Reference of Some Kind
|
|
| v.davis2 2006-07-13, 7:34 pm |
| Hi all,
I am not new to Python, but am new to PSP X use of python. Please bear with
me.
I am looking for a reference of some kind that might, for example, give me a
way to know how many images are currently open. PSP X must know that
somehow, but I have not yet figured out where to look for it.
The application (for now) is just a simple script that closes and saves all
open images. I recorded a version to look at, but of course, it just
iterated through each open file. I would put that into a loop once I knew
how many were open OR had some way to know that I had reached the last one.
The more general question is how does one find these details about what PSP
X knows about its session?
Help please?
--Vic
| |
| Spandex Rutabaga 2006-07-13, 7:34 pm |
| "v.davis2" wrote:
>
> Hi all,
>
> I am not new to Python, but am new to PSP X use of python. Please bear with
> me.
> I am looking for a reference of some kind that might, for example, give me a
> way to know how many images are currently open.
http://tinyurl.com/q25ox
http://tinyurl.com/l82xq
http://tinyurl.com/qwnog
Found by going to the Corel web site, clicking the support link,
and typing "scripting api" into the search feature while specifying
PSP as a product.
> PSP X must know that
> somehow, but I have not yet figured out where to look for it.
>
> The application (for now) is just a simple script that closes and saves all
> open images. I recorded a version to look at, but of course, it just
> iterated through each open file.
You may have recorded the wrong thing. Did you record Window >
Close All?
> I would put that into a loop once I knew
> how many were open OR had some way to know that I had reached the last one.
JascUtils.RequireADoc( Environment ) == App.Constants.Boolean.false:
will be the case when there is no active document. It is probably
PspUtils now that Corel bought Jasc.
> The more general question is how does one find these details about what PSP
> X knows about its session?
One searches the Corel web site for documentation. They don't seem
to have updated it for PSP X. Suz Shook has some good scripting
stuff too http://users.adelphia.net/~suzshook/
| |
| SuzShook 2006-07-13, 7:34 pm |
| v.davis2 wrote:
> Hi all,
>
> I am not new to Python, but am new to PSP X use of python. Please
> bear with me.
> I am looking for a reference of some kind that might, for example,
> give me a way to know how many images are currently open. PSP X must
> know that somehow, but I have not yet figured out where to look for
> it.
> The application (for now) is just a simple script that closes and
> saves all open images. I recorded a version to look at, but of
> course, it just iterated through each open file. I would put that
> into a loop once I knew how many were open OR had some way to know
> that I had reached the last one.
> The more general question is how does one find these details about
> what PSP X knows about its session?
>
> Help please?
> --Vic
To get the number of open documents, Vic, use len(App.Documents).
App.Documents is a list of open documents, so extracting the length of that
list will give you the number of open documents. Suz
|
|
|
| | Copyright 2003 - 2009 forum4designers.com Software forum Computer Hardware reviews |
|