Batch processing, how do I...

Corel Paint Shop Pro

Moderator: Kathy_9

Post Reply
Bill Ames
Posts: 12
Joined: Tue Nov 26, 2019 3:21 pm
operating_system: Windows 7 Professional
System_Drive: C
32bit or 64bit: 64 Bit
processor: i7 4G
ram: 16G

Batch processing, how do I...

Post by Bill Ames »

I work with images that I want to apply a standard sequence of steps, always the same. Here are some related questions:

(1) Can I specify a button in the GUI that, if pressed, will apply the steps to the open image?

(2) If one above is possible, can I have the ability to save to a preset location with an incremental name (next available.)

(3) In the best of all worlds, I would have a right-click menu item in Explorer that would perform the steps in two above without having even to display the GUI.
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: Batch processing, how do I...

Post by LeviFiction »

1) Yes, with scripts.
2) The Batch processing command can do this but you would do it all at once not one by one, and with some basic Python knowledge it could be programmed into a script.
3) sorry the UI is necessary. You can create a shortcut that runs on any image dropped on it but it still opens PSP.
https://levifiction.wordpress.com/
Bill Ames
Posts: 12
Joined: Tue Nov 26, 2019 3:21 pm
operating_system: Windows 7 Professional
System_Drive: C
32bit or 64bit: 64 Bit
processor: i7 4G
ram: 16G

Re: Batch processing, how do I...

Post by Bill Ames »

One time I had a recorded sequence that did what I wanted it to but I wanted to change a setting and not have to redo the recording so I looked at the script. Opened it, changed a setting, saved it. It did not run. I am not a programmer but know enough to be dangerous. I wish I knew what step I left out. I have used batch processing but I would like to automate it as much as possible. I should look to see if I can record a file open sequence, probably not, too useful! xD
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: Batch processing, how do I...

Post by LeviFiction »

Most scripts can be edited using the simple script editor built into PSP.

http://help.corel.com/paintshop-pro/v22 ... ts.html%23

This feature has not changed in forever so it's just as correct in PSP 2020 as it was in PSP 9. The only reason to edit the program directly is when you need to change something the simple editor won't let you change, or you want to do something more advanced.

I cannot tell you why it refused to run after you edited it because I haven't seen it. Or the error it produced. Most of the time it's because you used tabs instead of spaces, or used an illegal value. If you want to be able to edit a script directly I recommend learning basic Python. Python uses whitespace to denote code blocks if you mix spaces and tabs it'll get confused and refuse to run properly. PSP uses 4 spaces for indentation, not tabs. Once you know enough to write a basic program with functions you can look at the PSP API to know what the possible values are.

If you record a script opening very specific files it will be recorded in the script that way. But you have to save it to the Scripts-Trusted folder. Any script that requires saving, opening, or accessing the hard drive at all, is a trusted script. It's also possible to pass in a custom list of files to the open command. I do it in my PasteFiles script. That script, if it receives a folder from the clipboard, will actually go through the folder and find all of the files. THen adds the files to a list and passes the list to the FileOpen command. Because PSP uses Python as its programming language, there is a lot we can do.
https://levifiction.wordpress.com/
Bill Ames
Posts: 12
Joined: Tue Nov 26, 2019 3:21 pm
operating_system: Windows 7 Professional
System_Drive: C
32bit or 64bit: 64 Bit
processor: i7 4G
ram: 16G

Re: Batch processing, how do I...

Post by Bill Ames »

I will investigate what you have provided. Years ago I would have been more inclined to really learn Python but now I want to use it to get specific results, learning it would be a distraction. I did learn to program in Wintask to write scripts to test the mass spectrometer I was helping develop. One of the contract programmers in India wrote python scripts (I ran) to test stuff I could not. I am also trying to do a Visual Novel in RenPy and that uses Python so I do learn a bit on that path. Thank you for your insight.
Bill Ames
Posts: 12
Joined: Tue Nov 26, 2019 3:21 pm
operating_system: Windows 7 Professional
System_Drive: C
32bit or 64bit: 64 Bit
processor: i7 4G
ram: 16G

Re: Batch processing, how do I...

Post by Bill Ames »

I found the script and opened it from the script + edit menu (no idea where the button is) and this is what I get. If I click on the Edit... button nothing happens. Insight please.


Image
Post Reply