PSP: how do effects and scripts interact?

Corel Paint Shop Pro

Moderator: Kathy_9

Post Reply
Ally Nara
Posts: 2
Joined: Mon Jul 10, 2017 8:48 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
processor: Intel Core i5 4210U
ram: 8 GB
Monitor/Display Make & Model: Asus X552 L
Corel programs: PSP X7

PSP: how do effects and scripts interact?

Post by Ally Nara »

Hi all

I've been trying to put the Dragan Effect in a script on a JPEG image. I am by no means an experienced PSP'er, but am familiar with the basics. I can make and edit scripts using the Script Editor dialog. Now here lies the problem. There is no problem with running the Script Editor as long as I haven't put the Black & White Effect from Effects -> Photo Effects in the script. As soon as I use this effect, I can no longer edit the script using the Script Editor. Since I know nothing of Phyton coding, the resulting text when I click on Edit is simply too much for me.

I would like to know if there is a way around this so that I can keep using the Script Editor. The reason I'd like to use this, is because I would like to add a pause between the scripts (although I still have to figure out how to do that) so I can make some adjustments outside of the script and then simply continue with the script until the end.

I have been searching on the www but with no useable results. I hope you guys can help me out!

TIA!
LeviFiction
Advisor
Posts: 6831
Joined: Thu Oct 02, 2008 1:07 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: Alienware M17xR4
processor: Intel Core i7-3630QM CPU - 2_40GH
ram: 6 GB
Video Card: NVIDIA GeForce GTX 660M
sound_card: Sound Blaster Recon3Di
Hard_Drive_Capacity: 500GB
Corel programs: PSP: 8-2023
Location: USA

Re: PSP: how do effects and scripts interact?

Post by LeviFiction »

Actual pausing of the script requires you learn to deal with programming. You don't have to fully understand the language, but you will be working with the text of the document. PSP does not have a built-in pause option and continuation for scripts. Unless you want to create separate scripts for each stage and run them one at a time. Gary's Pause script is linked in the scripting sub-forum along with lots of other scripting resources including places to learn Python if you wanted. It's really a very easy language, you just have to get used to reading it. And it's pretty fast once you get started.

Now, I have no such issues with black and white film breaking the ability to open the script editor. Usually, the script editor won't open if the script can't be automatically parsed by PSP. Usually with custom code, or scripts that leave out details and parameters, headings, or phrasing that doesn't match its expectations. I don't have X7 on my computer so I can't test if it was something that happened with X7 specifically. I know it doesn't happen with X9. The only thing I can tell you is, you need to know if your script is in compliance with PSP's formatting requirements before you can force PSP to use the script editor. Otherwise, it won't know where the commands begin and what options you have where.
https://levifiction.wordpress.com/
JoeB
Posts: 2778
Joined: Fri Mar 28, 2008 10:04 pm
operating_system: Windows 8.1
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: LENOVO 4524PE4 ThinkCentre M91p
processor: 3.10 gigahertz Intel Quad Core i5-2400
ram: 8 GB
Hard_Drive_Capacity: 4.6 TB
Corel programs: PSP 9, X7 to 2019, 32 & 64-bit
Location: Canada

Re: PSP: how do effects and scripts interact?

Post by JoeB »

Specifically, are you saying that you have created a script that runs fine, but if you include opening the Black & White effect from the Effects options then you can't open the script when clicking on the Script Editor button? I ask because I'm not quite sure exactly what is happening - i.e., the script editor doesn't open at all, or Black & White doesn't work for you within the script and you're not sure how to make it work by editing it.

Also, does the script actually run with B&W Effect in the script? If so, what is the editing you want to do with the script? Is that the part you want to edit, and in what way - i.e., what are you trying to achieve with the edit if you could edit it?
Regards,

JoeB
Using PSP 2019 64bit
Ally Nara
Posts: 2
Joined: Mon Jul 10, 2017 8:48 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
processor: Intel Core i5 4210U
ram: 8 GB
Monitor/Display Make & Model: Asus X552 L
Corel programs: PSP X7

Re: PSP: how do effects and scripts interact?

Post by Ally Nara »

JoeB wrote:Specifically, are you saying that you have created a script that runs fine, but if you include opening the Black & White effect from the Effects options then you can't open the script when clicking on the Script Editor button? I ask because I'm not quite sure exactly what is happening - i.e., the script editor doesn't open at all, or Black & White doesn't work for you within the script and you're not sure how to make it work by editing it.

Also, does the script actually run with B&W Effect in the script? If so, what is the editing you want to do with the script? Is that the part you want to edit, and in what way - i.e., what are you trying to achieve with the edit if you could edit it?
I am able to make a working script, including B&W Effect. But I would like to edit the script so that I can select which parts need to be silent and which parts need to be interactive. This way, I can adapt certain parts depending on the picture I use it for. Eventually, I would also like to pause the script, but LeviFiction told me it wasn't possible with the Script Editor Dialog.

When I use the B&W Effect, the Script Esitor doesn't open, but I get a .txt-file with the Python code. This happens only after I used the B&W effect, since I've tried it by saving the script every step I made and trying to use the Script Editor Dialog. It was only after I added the B&W Effect, that I was no longer able to edit using the Script Editor.
JoeB
Posts: 2778
Joined: Fri Mar 28, 2008 10:04 pm
operating_system: Windows 8.1
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: LENOVO 4524PE4 ThinkCentre M91p
processor: 3.10 gigahertz Intel Quad Core i5-2400
ram: 8 GB
Hard_Drive_Capacity: 4.6 TB
Corel programs: PSP 9, X7 to 2019, 32 & 64-bit
Location: Canada

Re: PSP: how do effects and scripts interact?

Post by JoeB »

Ally Nara wrote:I am able to make a working script, including B&W Effect. But I would like to edit the script so that I can select which parts need to be silent and which parts need to be interactive. This way, I can adapt certain parts depending on the picture I use it for.
Not sure why B&W effect won't open the Script Editor. However, it your script opens in a text editor you can easily edit the Python code for your needs. You'll find a line of code similar to this near the bottom of the different steps of the script:

ExecutionMode': App.Constants.ExecutionMode.Silent,

The last word (Silent in this case) will cause the script to act without allowing interaction. If it was Interactive, the script would open the called dialogue box to allow user interaction. If it was Default, the script would obey the Execution Mode toggle on the Script toolbar. You can simply type in whichever of those words you want to determine which process the script follows (e.g., replace Silent with Interactive if you want user input with the dialogue box for that part of the script). Then save the script. I would suggest you save it with a slightly different name (e.g., add a numeral to the end of the script name) so as not to overwrite your original script.
Ally Nara wrote: Eventually, I would also like to pause the script, but LeviFiction told me it wasn't possible with the Script Editor Dialog.


True, this can't be done with the Script Editor. However, as LeviFiction said, it can be done with Gary Barton's Pause Script. However, you again have to do it using a text editor to add Gary's script to the bottom of your script and to make a few small edits to the body of your script.
Regards,

JoeB
Using PSP 2019 64bit
Post Reply