PSP X4 Batch Crop script failures
Moderator: Kathy_9
-
edwinn
- Posts: 154
- Joined: Mon May 23, 2011 2:05 pm
- System_Drive: C
- 32bit or 64bit: 64 Bit
- motherboard: Intel
- processor: Intel Core i7 - 8 core
- ram: 16 GB
- Video Card: Intel
- sound_card: Integrated
- Hard_Drive_Capacity: 500GB 4TB
- Monitor/Display Make & Model: Samsung 2494 - 1920x1080
- Corel programs: PSP X4
- Location: Loudoun County, Virginia USA
PSP X4 Batch Crop script failures
Hi, I've run many scripts in various PSP versions over the years but in X4, I've not been able to run a CROP batch and SAVE files as a PNG. The scripts progress up to the 2nd or 3rd file in the BATCH and then errors start. Had to kill PSP with Task Manager three times this afternoon, being stuck in an ERROR loop. One crop test batch ran for 8-10 files straight, but then when going back to finish ALL files in the folder, the errors started again.
What's wrong? Any issue with X4?
-Ed
What's wrong? Any issue with X4?
-Ed
Last edited by edwinn on Wed May 08, 2019 7:15 pm, edited 2 times in total.
-
edwinn
- Posts: 154
- Joined: Mon May 23, 2011 2:05 pm
- System_Drive: C
- 32bit or 64bit: 64 Bit
- motherboard: Intel
- processor: Intel Core i7 - 8 core
- ram: 16 GB
- Video Card: Intel
- sound_card: Integrated
- Hard_Drive_Capacity: 500GB 4TB
- Monitor/Display Make & Model: Samsung 2494 - 1920x1080
- Corel programs: PSP X4
- Location: Loudoun County, Virginia USA
Re: PSP X4 Batch Crop script failures
More details of the steps taken. 1) First did a Crop to set the area on the first BMP in folder. Then started recording a script, selected Crop, Last Applied, and to Save As a PNG. The script was saved in the Trusted folder. Running that script returned an error on the 3rd BMP in the batch list. 2) Then recorded a script to simply Crop, and used `Save Mode New´ in the Batch dialog. Same errors. 3) Recorded another script to Crop a BMP and Save it, writing over the original. I think this worked on a batch `test run´ of 8 BMPs, but then selecting the rest of the BMPs, it returned errors.
Recorded a total of 4 Crop scripts without success. Will do some X4 Crop searches in the forums today.
-Ed
Recorded a total of 4 Crop scripts without success. Will do some X4 Crop searches in the forums today.
-Ed
-
LeviFiction
- Advisor
- Posts: 6831
- Joined: Thu Oct 02, 2008 1:07 pm
- 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 X4 Batch Crop script failures
I don't think I have X4 installed on my computer at home, and I don't actively remember any crop issues with batch. But that was 7 versions ago so my memory is a bit hazy there.
Question: Are all of these images the same size? What are the sizes of the original image and what are the crop sizes and location?
I wonder if using a different method also results in the error or if it's just a result of using crop with batch. Can you post one of the scripts you recorded?
EDIT: Really quick, do you notice that the batch fails on specific images? Or have you managed to successfully batch images that previously failed in other tests?
Question: Are all of these images the same size? What are the sizes of the original image and what are the crop sizes and location?
I wonder if using a different method also results in the error or if it's just a result of using crop with batch. Can you post one of the scripts you recorded?
EDIT: Really quick, do you notice that the batch fails on specific images? Or have you managed to successfully batch images that previously failed in other tests?
https://levifiction.wordpress.com/
-
edwinn
- Posts: 154
- Joined: Mon May 23, 2011 2:05 pm
- System_Drive: C
- 32bit or 64bit: 64 Bit
- motherboard: Intel
- processor: Intel Core i7 - 8 core
- ram: 16 GB
- Video Card: Intel
- sound_card: Integrated
- Hard_Drive_Capacity: 500GB 4TB
- Monitor/Display Make & Model: Samsung 2494 - 1920x1080
- Corel programs: PSP X4
- Location: Loudoun County, Virginia USA
-
edwinn
- Posts: 154
- Joined: Mon May 23, 2011 2:05 pm
- System_Drive: C
- 32bit or 64bit: 64 Bit
- motherboard: Intel
- processor: Intel Core i7 - 8 core
- ram: 16 GB
- Video Card: Intel
- sound_card: Integrated
- Hard_Drive_Capacity: 500GB 4TB
- Monitor/Display Make & Model: Samsung 2494 - 1920x1080
- Corel programs: PSP X4
- Location: Loudoun County, Virginia USA
Re: PSP X4 Batch Crop script failures
Thanks for the reply, they are all the same size BMPs. I tried batch `New type´ saves to the same folder, and also a PNG sub-folder. The original file size is 1680x1050 pix, and the crop size is 1000x665 pix. I tried both a crop script, and a crop + `save as´ script. Also tried a save (overwrite) script. One batch ran ok to the end. It might be some issue with assuming the filename, because I noticed the initial output file (in the batch) kept getting over-written.LeviFiction wrote:I don't think I have X4 installed on my computer at home, and I don't actively remember any crop issues with batch.
Question: Are all of these images the same size? What are the sizes of the original image and what are the crop sizes and location?
I wonder if using a different method also results in the error or if it's just a result of using crop with batch. Can you post one of the scripts you recorded?
EDIT: Really quick, do you notice that the batch fails on specific images? Or have you managed to successfully batch images that previously failed in other tests?
Here is one Log file, where it quit on the 2nd file.
Executing script "C:\Users\------\Documents\Corel PaintShop Pro\14.0\Scripts-Trusted\crop_James_v01t.PspScript" against file "C:\Screen\sens\James\fsscr197.bmp".
Saving "C:\Screen\sens\James\fsscr197.bmp" as "C:\Screen\sens\James\PNG-1\fsscr197.png".
Executing script "C:\Users\------\Documents\Corel PaintShop Pro\14.0\Scripts-Trusted\crop_James_v01t.PspScript" against file "C:\Screen\sens\James\fsscr198.bmp".
Script "C:\Users\------\Documents\Corel PaintShop Pro\14.0\Scripts-Trusted\crop_James_v01t.PspScript" failed! Against file "C:\Screen\sens\James\fsscr198.bmp".
Agree a certain method needs to be used, because one batch DID complete without errors.
-Ed
-
edwinn
- Posts: 154
- Joined: Mon May 23, 2011 2:05 pm
- System_Drive: C
- 32bit or 64bit: 64 Bit
- motherboard: Intel
- processor: Intel Core i7 - 8 core
- ram: 16 GB
- Video Card: Intel
- sound_card: Integrated
- Hard_Drive_Capacity: 500GB 4TB
- Monitor/Display Make & Model: Samsung 2494 - 1920x1080
- Corel programs: PSP X4
- Location: Loudoun County, Virginia USA
Re: PSP X4 Batch Crop script failures
It appears the same FILENAME for `Save-as´ is hard-written into the script, see below. It needs to use the INPUT filename of each file.
# FileSaveAs
App.Do( Environment, 'FileSaveAs', {
'Encoding': {
'PNG': {
'Interlaced': False,
'OptimizedPalette': True,
'AlphaChannel': False
}
},
'FileName': u'C:\\Screen\\sens\\James\\fsscr239.png',
'FileFormat': App.Constants.FileFormat.PNG,
'FormatDesc': u'PNG Portable Network Graphics',
'WorkingMode': 0,
'GeneralSettings': {
'ExecutionMode': App.Constants.ExecutionMode.Default,
'AutoActionMode': App.Constants.AutoActionMode.AllAlways,
'Version': ((14,0,0),1)
},
'DefaultProperties': []
})
# FileSaveAs
App.Do( Environment, 'FileSaveAs', {
'Encoding': {
'PNG': {
'Interlaced': False,
'OptimizedPalette': True,
'AlphaChannel': False
}
},
'FileName': u'C:\\Screen\\sens\\James\\fsscr239.png',
'FileFormat': App.Constants.FileFormat.PNG,
'FormatDesc': u'PNG Portable Network Graphics',
'WorkingMode': 0,
'GeneralSettings': {
'ExecutionMode': App.Constants.ExecutionMode.Default,
'AutoActionMode': App.Constants.AutoActionMode.AllAlways,
'Version': ((14,0,0),1)
},
'DefaultProperties': []
})
-
edwinn
- Posts: 154
- Joined: Mon May 23, 2011 2:05 pm
- System_Drive: C
- 32bit or 64bit: 64 Bit
- motherboard: Intel
- processor: Intel Core i7 - 8 core
- ram: 16 GB
- Video Card: Intel
- sound_card: Integrated
- Hard_Drive_Capacity: 500GB 4TB
- Monitor/Display Make & Model: Samsung 2494 - 1920x1080
- Corel programs: PSP X4
- Location: Loudoun County, Virginia USA
Re: PSP X4 Batch Crop script failures
Should be able to post more scripts this weekend, and spend time debugging.
Seems the issue is `saving´ and filename usage.
Some X4 script cropping strategies for batch runs:
1) Crop image, do nothing else
2) Crop image, overwrite BMP
3) Crop image, Save-as PNG
4) Use crop-only script in batch,
5) Use batch w/o script to convert cropped BMPs to PNG.
Make sense? where are all the script experts?
-Ed
Seems the issue is `saving´ and filename usage.
Some X4 script cropping strategies for batch runs:
1) Crop image, do nothing else
2) Crop image, overwrite BMP
3) Crop image, Save-as PNG
4) Use crop-only script in batch,
5) Use batch w/o script to convert cropped BMPs to PNG.
Make sense? where are all the script experts?
-Ed
-
cosmicDread
- Posts: 42
- Joined: Fri Aug 26, 2016 7:10 am
- System_Drive: C
- 32bit or 64bit: 64 Bit
- motherboard: MSI MPG Z390 Gaming PRO
- processor: Intel Core i9-9900K
- ram: 32 GB
- Video Card: GeForce GTX 1080 Ti
- Hard_Drive_Capacity: 6 TB
- Monitor/Display Make & Model: Acer Predator X34
- Corel programs: PaintShop X5, X6, X8, X9, '18, '19, '20
- Location: Lake Havasu City, Arizona, USA
- Contact:
Re: PSP X4 Batch Crop script failures
Hi,
I've never actually done a batch process using PSP built-in batch processor, so I found it simpler to write a script.
I've appended the compressed script file at the end.
Please read the instructions at the beginning of the script as there are three variables that need to be manually set.
The script is placed in a trusted folder in order to run. However, I don't know if the script will run in X4, because I do not own any PSP versions between PSP 8 and X5.
Please let us know if the program succeeds or if you need any revisions.
Best Regards,
Charles
Edit: Made instructions clearer.
I've never actually done a batch process using PSP built-in batch processor, so I found it simpler to write a script.
I've appended the compressed script file at the end.
Please read the instructions at the beginning of the script as there are three variables that need to be manually set.
The script is placed in a trusted folder in order to run. However, I don't know if the script will run in X4, because I do not own any PSP versions between PSP 8 and X5.
Please let us know if the program succeeds or if you need any revisions.
Best Regards,
Charles
Edit: Made instructions clearer.
Last edited by cosmicDread on Fri May 10, 2019 4:49 pm, edited 1 time in total.
When the majority of the people on Earth are wanting the Galactic Federation to show themselves, then they will.
-
LeviFiction
- Advisor
- Posts: 6831
- Joined: Thu Oct 02, 2008 1:07 pm
- 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 X4 Batch Crop script failures
Sorry, Ed. I no longer have the internet at home and it's been a really busy week at work. Hopefully, cosmicDread's script works well for you.
Just out of curiosity though, why are you trying to save from the script instead of just using the save feature of the batch process? I'm probably misreading your post but you seemed to indicate that cropping via script works and then using the batch process save option works. So, just use what works.
Just out of curiosity though, why are you trying to save from the script instead of just using the save feature of the batch process? I'm probably misreading your post but you seemed to indicate that cropping via script works and then using the batch process save option works. So, just use what works.
https://levifiction.wordpress.com/
-
edwinn
- Posts: 154
- Joined: Mon May 23, 2011 2:05 pm
- System_Drive: C
- 32bit or 64bit: 64 Bit
- motherboard: Intel
- processor: Intel Core i7 - 8 core
- ram: 16 GB
- Video Card: Intel
- sound_card: Integrated
- Hard_Drive_Capacity: 500GB 4TB
- Monitor/Display Make & Model: Samsung 2494 - 1920x1080
- Corel programs: PSP X4
- Location: Loudoun County, Virginia USA
Re: PSP X4 Batch Crop script failures
Thanks, it might be a couple or three days till I can report back how it worked (probably by Sunday) but from an initial look at your script text, I can see what the general process is and have to study it. First step here is to open and compare the 6 or 7 previous crop scripts. Then will post the `block headings´ without detail code, so y'all cans see the thinking in various attempts to crop and save a folder of BMPs.cosmicDread wrote:I've never actually done a batch process using PSP built-in batch processor, so I found it simpler to write a script.
I've appended the compressed script file at the end.
Please let us know if the program succeeds or if you need any revisions.
Charles
I've been programming on and off for 40 years and can figure it out eventually.
-Ed
Last edited by edwinn on Fri May 10, 2019 6:44 pm, edited 1 time in total.
-
edwinn
- Posts: 154
- Joined: Mon May 23, 2011 2:05 pm
- System_Drive: C
- 32bit or 64bit: 64 Bit
- motherboard: Intel
- processor: Intel Core i7 - 8 core
- ram: 16 GB
- Video Card: Intel
- sound_card: Integrated
- Hard_Drive_Capacity: 500GB 4TB
- Monitor/Display Make & Model: Samsung 2494 - 1920x1080
- Corel programs: PSP X4
- Location: Loudoun County, Virginia USA
Re: PSP X4 Batch Crop script failures
I'll be able to tell you the process in each script attempt after opening them and reviewing. It's difficult to remember the changed in each subsequent script. Generally I first tried to `crop and Save-as´ in a script on a single file, then tried to invoke that script in a batch to process all BMPs in folder. Not too sure how to make a script iterate (loop to the end file) right now.LeviFiction wrote:Hopefully, cosmicDread's script works well for you.
Just out of curiosity though, why are you trying to save from the script instead of just using the save feature of the batch process?
There's bound to be some miscommunication at first in describing the issues. Not to worry about responding right away, it will get solved eventually.
-Ed
-
edwinn
- Posts: 154
- Joined: Mon May 23, 2011 2:05 pm
- System_Drive: C
- 32bit or 64bit: 64 Bit
- motherboard: Intel
- processor: Intel Core i7 - 8 core
- ram: 16 GB
- Video Card: Intel
- sound_card: Integrated
- Hard_Drive_Capacity: 500GB 4TB
- Monitor/Display Make & Model: Samsung 2494 - 1920x1080
- Corel programs: PSP X4
- Location: Loudoun County, Virginia USA
Re: PSP X4 Batch Crop script failures
With this and separate Internet troubles (think censorship) going on, I wasn't able to test or go over the scripts last weekend.
However decided to EXERCISE recording CROP scripts in X4 and manually applying them to BMPs. There were many inconsistencies in how the scripts WORK on a bunch of similar SCREEN CAPS.. not applied consistently and many BMPs need additional fixing.
Something is flaky. I need to learn the subtitles of recording crops in X4 and what procedure will work.
Is X4 scripting flawed? or have known bugs? It should NOT be this difficult.
-Ed
However decided to EXERCISE recording CROP scripts in X4 and manually applying them to BMPs. There were many inconsistencies in how the scripts WORK on a bunch of similar SCREEN CAPS.. not applied consistently and many BMPs need additional fixing.
Something is flaky. I need to learn the subtitles of recording crops in X4 and what procedure will work.
Is X4 scripting flawed? or have known bugs? It should NOT be this difficult.
-Ed
