I created a script to fill in some information (Copyright) in the Image Information dialogue box. I would like this script to open this dialog box with this information filled in and then keep this dialog box open. However, I cannot figure out how to do this since I need to close the dialog box to do anything with the recording script (ie stop the recording etc.) Any tips on how to achieve this?
Thank you.
Paint Shop Pro 2022
Windows 10
Script question
Moderator: Kathy_9
-
- Posts: 17
- Joined: Sun Jul 08, 2012 4:57 pm
- System_Drive: C
- 32bit or 64bit: 64 Bit
-
- Advisor
- Posts: 6775
- 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: Script question
When running the script by default it uses the execution mode you have set on the script toolbar. Interactive or silent. When it's interactive the dialog box will show up and wait for you to hit the OK button. When it's silent, it'll run the command silently never displaying the dialog box.
You can, however, edit the script to force individual commands to always execute interactively regardless of the execution mode on the toolbar.
This first option for editing the script makes it pretty fast and easy. This first method also only works with a recorded scripts.
Click the "Edit Script" button on the script toolbar.
You'll get a dialog like this -
In this dialog you'll see copyright information for the script, and you'll see a list of all of the commands in the script. Here you can edit the commands and you can change their execution mode. You can see they're all set to "Default". Click next to the command you always want to run interactively and select "Interactive" then save. You now have a script that will always run the Image Information command interactively.
Second method
We start out the same way, click the "Edit Script" button. If Notepad opens up, then the script contains something that the script editor can't handle and so it's using the backup of the python editor.
Each command will appear as a series of parameters and the values for those parameters. Such as "ExecutionMode".
Change the word "Default" to "Interactive" and save. The command you changed this on will now execute interactively if it can.
Exmaple
You can, however, edit the script to force individual commands to always execute interactively regardless of the execution mode on the toolbar.
This first option for editing the script makes it pretty fast and easy. This first method also only works with a recorded scripts.
Click the "Edit Script" button on the script toolbar.
You'll get a dialog like this -
In this dialog you'll see copyright information for the script, and you'll see a list of all of the commands in the script. Here you can edit the commands and you can change their execution mode. You can see they're all set to "Default". Click next to the command you always want to run interactively and select "Interactive" then save. You now have a script that will always run the Image Information command interactively.
Second method
We start out the same way, click the "Edit Script" button. If Notepad opens up, then the script contains something that the script editor can't handle and so it's using the backup of the python editor.
Each command will appear as a series of parameters and the values for those parameters. Such as "ExecutionMode".
Code: Select all
'ExecutionMode': App.Constants.ExecutionMode.Default
Change the word "Default" to "Interactive" and save. The command you changed this on will now execute interactively if it can.
Exmaple
Code: Select all
'ExecutionMode': App.Constants.ExecutionMode.Interactive
You do not have the required permissions to view the files attached to this post.
-
- Posts: 17
- Joined: Sun Jul 08, 2012 4:57 pm
- System_Drive: C
- 32bit or 64bit: 64 Bit
Re: Script question
I was able to edit the script but it still does not open the dialog box.
I exited and restarted the program to see if that would help but it did not.
Thank you for troubleshooting!
I exited and restarted the program to see if that would help but it did not.
Thank you for troubleshooting!
You do not have the required permissions to view the files attached to this post.
-
- Advisor
- Posts: 6775
- 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: Script question
Weird, you say PSP 2022 in your original post but the snapshot you show there shows version 18 (PSP X8). Either way it should work just fine. Let me do a video recording of what I see and how I expect everything to look and work. I am doing this with 2023 but it should still be fine either way, 2023, 2022, X8. All of them should work the same.
Here's the link to the video showing what I expect and how I got there.
https://drive.google.com/file/d/1o0K1iZ ... sp=sharing
Here's the link to the video showing what I expect and how I got there.
https://drive.google.com/file/d/1o0K1iZ ... sp=sharing