This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > PainShop Pro Scripting > July 2006 > I would like help to spell out a script
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 |
I would like help to spell out a script
|
|
| Cassel 2006-06-22, 9:50 pm |
| I downloaded a script that was done for PSP 8.10. I am now using PSP 9 and i wish i could undestand how it does what it does (it is placing a designated tube along a vector path). I would like to understand HOW it is done, step by step so i might try to adapt it to other needs and use. How would i go about this? paste the script in here? give the link of where i got that script?
Thanks
Cassel | |
| Fred Hiltz 2006-07-10, 7:46 pm |
| Cassel wrote:
> I downloaded a script that was done for PSP 8.10. I am now
> using PSP 9 and i wish i could undestand how it does what
> it does (it is placing a designated tube along a vector
> path). I would like to understand HOW it is done, step by
> step so i might try to adapt it to other needs and use. How
> would i go about this? paste the script in here? give the
> link of where i got that script?
I doubt anyone here wants to teach you the Python language, nor the
PSP programming interface. If you would like to understand the
script, a good starting point is Scripting for Script Authors at
http://www.jasc.com/support/kb/arti...9components.asp and the
scripting API appropriate to the version of PSP 9 that you are
running. The first document contains links to Python web sites where
you can get more tutorials about the language.
--
Fred Hiltz, fhiltz at yahoo dot com
| |
| Spandex Rutabaga 2006-07-10, 7:46 pm |
| Cassel wrote:
>
> I downloaded a script that was done for PSP 8.10. I am now using PSP 9
> and i wish i could undestand how it does what it does (it is placing a
> designated tube along a vector path). I would like to understand HOW it
> is done, step by step so i might try to adapt it to other needs and use.
> How would i go about this? paste the script in here? give the link of
> where i got that script?
You got the script from Gary Barton, didn't you? At this link
http://pixelnook.home.comcast.net/VectorTube.htm, right?
You are posting from a web copy of the Corel forums to which
you should instead subscribe directly by visiting this Corel
page http://tinyurl.com/2pt9o. Scroll to the bottom to find the
PSP groups.
You should open the script in Notepad to see what it does. It
is well commented. You should also download the scripting API
documentation from Corel and become familiar with Python, the
language used for scripts, by visiting the Python home on the
web at http://www.python.org.
> Thanks
> Cassel
>
> --
> Cassel
> ------------------------------------------------------------------------
> Posted via http://www.forum4designers.com
> ------------------------------------------------------------------------
> View this thread: http://www.forum4designers.com/message456115.html
| |
|
| Cassel wrote:
> I downloaded a script that was done for PSP 8.10. I am now
> using PSP 9 and i wish i could undestand how it does what
> it does (it is placing a designated tube along a vector
> path). I would like to understand HOW it is done, step by
> step so i might try to adapt it to other needs and use. How
> would i go about this? paste the script in here? give the
> link of where i got that script?
>
> Thanks
> Cassel
Just sort of a sidenote: The responses you've had are excellent
and near as I can tell, dead on. What I really wanted to say:
Don't let the apparent complexity of the explanations scare you
off.
Keeping the references and links already posted for you, go ahead
and dig into it.
If when you run a script, you turn on the Script Output window
you'll also discover a neat synopsis of things at they happen (or
don't, and receive an error message). It shows a good, high
level explanation of what happened or is happening. IMO a good
intro to the operations that are in the script.
First, of course, make a copy of the script so you don't mess
up the original. Then open the copy with Notepad or Wordpad,
Notepad preferred because it's easy to forget and goof up the
Save with Wordpad and not save it as text. They're "just" text
files.
Just look thru the file and you'll start to find some actions
you're already familiar with most likely. Some meanings, like
"App.do" will become apparent and the others you can glean from
the API reference, I'd imagine. There are also usually lots of
comments in a good script that explains what's about to happen or
what was done. All the braces and parens etc. will also become
meaningful once you've started to get a basis in the coding
methods. It's "just" ways of grouping things.
When you think you're beginning to become dangerous with
script, write a short, one or two line script, and execute it.
And you'll be on your way. Build on your strengths when you find
them.
Gotta get around to taking my own advice one of these days<g>. I
know a bit about scripting, but not with Python.
Luck!
Pop
| |
| Cassel 2006-07-10, 10:46 pm |
| quote: Originally posted by Spandex Rutabaga
Cassel wrote:
>
> I downloaded a script that was done for PSP 8.10. I am now using PSP 9
> and i wish i could undestand how it does what it does (it is placing a
> designated tube along a vector path). I would like to understand HOW it
> is done, step by step so i might try to adapt it to other needs and use.
> How would i go about this? paste the script in here? give the link of
> where i got that script?
You got the script from Gary Barton, didn't you? At this link
http://pixelnook.home.comcast.net/VectorTube.htm, right?
>>>>>Yes i am talking exactly about that script.
You are posting from a web copy of the Corel forums to which
you should instead subscribe directly by visiting this Corel
page http://tinyurl.com/2pt9o. Scroll to the bottom to find the
PSP groups.
You should open the script in Notepad to see what it does. It
is well commented. You should also download the scripting API
documentation from Corel and become familiar with Python, the
language used for scripts, by visiting the Python home on the
web at http://www.python.org.
I did print out the scrip in notepad, yet the comments i find are not anything similar to what i would `do` while working in PSP myself. For example, one line is commented "estimate the number of points needed", or "estimate the number of points needed to track the curve to the desired degree of flatness". I know how THOSE translate into "understandable commands" in my PSP.
Since i am not really into scripting, i was not expecting to have to learn the language itself. I only do digital scrapbooking and found this script, a bit by luck and wanted to understand how to obtain such a result WITHOUT the script.
So can someone just spell me out the needed steps to reproduce that script without the script? meaning, from scratch, with PSP9? Please?????
I was trying to answer throuhg newsgroup but somehow, my configuration is inadequate, but i still wanted to post. Sorry if it is the wrong direction.
Cassel
> Thanks
> Cassel
>
> --
> Cassel
> ------------------------------------------------------------------------
> Posted via http://www.forum4designers.com
> ------------------------------------------------------------------------
> View this thread: http://www.forum4designers.com/message456115.html
| |
| Spandex Rutabaga 2006-07-13, 7:34 pm |
| Cassel wrote:
Could you quote properly please so one can tell what I wrote
and what you wrote.
[color=darkred]
No they wouldn't be. If in PSP you recorded a sequence of commands
to make as script, then they would read like commands you can "do"
in PSP.
[color=darkred]
They don't. Gary is a programmer. He used his programming skill
in Python plus his knowledge of the PSP Scripting API plus his
familiarity with graphics to program quite new things you can't
do in PSP except using his scripts.
[color=darkred]
You can't. Some result, especially for recorded scripts, you can.
Some programmed scripts you can copy step by step by hand. It
will just be slower than running the script. However, scripts
can do a whole lot more. They can format your hard drive, they
can do complex mathematics, they can download from the web, they
can ask you for input and so on. Then they can take the result of
all these programming steps that have nothing to do with PSP and
connect them to tools that draw in PSP. In this way you can draw
things that PSP isn't natively capable of drawing. The script
author is, in essence, programming extensions to PSP as other
people might by writing plug-ins. This means you can't just go
and copy what they did. You'd have to have some separate way
(not using PSP) to do all the calculations they did and then
just take the answers and type them into some dialog in PSP (or,
worse, move a brush to the right place by watching the image
coordinates in the status bar.)
If you want to reverse engineer a script and you are a scripting
novice I advise you to pick something much simpler than Gary's
scripts, i.e. something a non-programmer might have recorded.
| |
| Cassel 2006-07-17, 5:12 pm |
| Thank you very much for your answer. At least i got a straight one. I guess scripting is still WAYYYYYYYY over my knowledge level.
Thanks to all who tried to help.
Cassel
quote: Originally posted by Spandex Rutabaga
Cassel wrote:
Could you quote properly please so one can tell what I wrote
and what you wrote.
[color=darkred]
No they wouldn't be. If in PSP you recorded a sequence of commands
to make as script, then they would read like commands you can "do"
in PSP.
[color=darkred]
They don't. Gary is a programmer. He used his programming skill
in Python plus his knowledge of the PSP Scripting API plus his
familiarity with graphics to program quite new things you can't
do in PSP except using his scripts.
[color=darkred]
You can't. Some result, especially for recorded scripts, you can.
Some programmed scripts you can copy step by step by hand. It
will just be slower than running the script. However, scripts
can do a whole lot more. They can format your hard drive, they
can do complex mathematics, they can download from the web, they
can ask you for input and so on. Then they can take the result of
all these programming steps that have nothing to do with PSP and
connect them to tools that draw in PSP. In this way you can draw
things that PSP isn't natively capable of drawing. The script
author is, in essence, programming extensions to PSP as other
people might by writing plug-ins. This means you can't just go
and copy what they did. You'd have to have some separate way
(not using PSP) to do all the calculations they did and then
just take the answers and type them into some dialog in PSP (or,
worse, move a brush to the right place by watching the image
coordinates in the status bar.)
If you want to reverse engineer a script and you are a scripting
novice I advise you to pick something much simpler than Gary's
scripts, i.e. something a non-programmer might have recorded.
|
|
|
| | Copyright 2003 - 2009 forum4designers.com Software forum Computer Hardware reviews |
|