Scripting with Python / Analyzing Scripts
Visitors to VTC.com will be able to view all introductory videos for each training course.
Free Trial Members will gain access to first three chapters for each training course.
Full Access Members have full access to VTC.com’s entire library of video tutorials.
Learn More
Subtitles of the Movie
Welcome to this lesson on analyzing scripts. I've got a photo of footbridge over a little stream here where I live and on the very far end you can see some steps that lead up to then a civil war monument which faces another road and I'm standing basically in a park area over on this side. It's really, really rustic looking bridge and very neat. Now I'm going to use this to illustrate scripts and then we're going to look at what those scripts do. So I'm going to select File, Script, Run, now I'm going to select from one of the artistic scripts. Now where I am located is the Paint Shop Pro Installation Directory, Languages, EN for English and there the Restricted Folder, Artistic and just picking at something that sounds interesting like Sloppy Edges. I'm going to select that, press Open in order to run it. Now the purpose of this lesson is to expand creativity and imagination on our end. OK somebody else has already come up with something that may be interesting and we can use and add to our bag of tricks and if you run the scripts as an End User that's one thing and you can always benefit from that. But it is also a good idea to look under the hood and see how they do things, because I learned that way. So the first thing off is I'm paying attention to this from a what can I do to replicate this perspective. So the first thing they're doing is adding borders and we can actually change the parameters here if we like but I'm just going to accept the defaults, press OK and now we see we're going to add some more borders and this time white, their a little bit larger as well. Next looks like changing some brush strokes based on a selection down here press OK to continue the script, its going to think for a little bit. Alright looks like the script is finished; now I can zoom in and look at these edges and what has happened is you can tell there is some black with white and that's where the borders were increased and then the brush strokes were added around this border, not affecting the actual photo, here's where's the photo is, doesn't look like it affected the photo, it looks like the selection was made just to the width of this border and it brush stroked in some fuzziness and that's why the script was called what it was. Now if I want to go back and edit that you can see I'm in a different location entirely, so what I need to do is get back to where the script is and right now I am in the My PSP Files Location. So I'm going to go to my Desktop and access this shortcut which is why I have it here to make it a little faster. That's simply shortcuts to the Paint Shop Pro Installation Directory; I go into Languages, EN, Scripts Restricted in this case Artistic and now looking at Sloppy Edges, open that up. Now I can see this from the scripting perspective now that I've experienced it running. So what I'm accessing here is the Scripts Properties that its returned, now I can look at the Environment, selecting everything first, selecting what we couldn't really tell by watching was saving that selection as an Alpha Channel, then it selected none, then it added the borders and they were white. Here's the color and then added Ð sorry those were black, then it added more borders at this width and these were those dialog boxes and that's white and now what it is, it loaded that selection from the Alpha Channel, Inverted it and you can tell here the reason they selected this at the beginning was so that it would select just the photo and those dimensions and then it adds the borders, adds the borders, loads that selection so it selects the photo and inverts so that it selects the added border. And you've got to think sometimes deviously as a programmer to how to get around giving computers instructions because they're stupid; they only do what you tell them to. And so this person has ingeniously decided to save a selection to an Alpha Channel then make some border expansions and then bring that selection back and invert it and then apply brush strokes to that selection. Very, very ingenious and here are the parameters of the brush strokes. Then you've got your select none which brings you back out to the photo. So I find this process to be really, really helpful in teaching me some things that maybe I haven't thought of. I haven't thought of expanding the border this particular way and then applying it, the brush strokes filter or effect to those areas and so maybe I'll try that now. I can also if I like I can edit this script and change the parameters here the default parameters. If you want this coming up instead black or white, if you could change that to magenta or pink or whatever you want. OK, I think we can wrap this lesson up, that is how to analyze the existing scripts in Paint Shop Pro to learn to add those techniques to your bag of tricks and also it enables you to modify those scripts if you like.
Tutorial Information
| Course: | Corel Paint Shop Pro Photo X2 |
| Author: | Robert Correll |
| SKU: | 33932 |
| ISBN: | 1-935320-07-6 |
| Release Date: | 2008-10-25 |
| Duration: | 9.5 hrs / 93 lessons |
| Captions: | Available on CD and Online University |
| Compatibility: |
Vista/XP/2000, OS X, Linux QuickTime 7, Flash 8 |
VTC Sign up & Benefits
- Unlimited Access
- 98,729 Video Tutorials (23,265 free)
- Video Available as Flash or QuickTime
- Over 1026 Courses
- $30 for One Month Access
- Multi-User Discounts Available
United States 