Batch Process Error with Script

Corel Paint Shop Pro

Moderator: Kathy_9

Post Reply
djnewbold
Posts: 1
Joined: Wed Jan 29, 2014 12:49 pm
operating_system: Windows 8
System_Drive: C
32bit or 64bit: 64 Bit
Hard_Drive_Capacity: Bend

Batch Process Error with Script

Post by djnewbold »

I watched the tutorial on how to record a script to resize photos and batch process them. I does not work and I get the following error message:
Executing EnableOptimizedScriptUndo
Executing SelectDocument
Executing FileClose
------- Command Execution Failed -----------
Command Name: FileClose
Error Text: This script has attempted an operation that is not permitted in a restricted script. This script may be run by moving it to a trusted directory.
Traceback (most recent call last):
File "<string>", line 38, in Do
JascApp.Rexec Failure: Restricted script violation - this script must be trusted in order to run.

Script 'Script Recorded 50%' has completed with an error.
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 Process Error with Script

Post by LeviFiction »

So, two things.

1) Some scripts can only perform functions if they are placed into the "trusted" folder. This let's PSP know that it's okay for this script to be running more advanced commands. You only want to place scripts into the trusted folder that...well...you trust. Once a script is in the trusted folder it can create files, delete files, and perform all sorts of weird functions including making its own Dialog Boxes. But that's more advanced python scripting that we won't go into.

However, you don't need to worry about this. Because of the second point I'm about to mention.

2) If this is being used in the batch process dialog, then images are saved and closed all on their own. So there is no need for the "File Close" command.

When you record the script it records every action you do. From opening an image, switching between documents, choosing layers. But for a simple resize script, you should only need to record the Resize command resizing at 50%.

So try re-recording the script. But this time, have the image already open and selected. Hit the record button, then run the resize command at 50%. Once the command is done, then save the script before you do anything else. You want to wait to close your image until after the script has already been saved.

Now try running the batch process again.
https://levifiction.wordpress.com/
Post Reply