Occasionally I want to improve contrast and sharpness of *.jpgs in my PSP X2.
So I created a Script (in subfolder Scripts-trusted) with the following parameters
Brightness= -28
Contrast= 28
Sharpen
Ok, now I assume I set in Brightness/Contrast dialog (=independently from Script) the current values (just for example) to:
Brightess = 35
Contrast = 35
Afterwards I start running my Script. What happens?
The Brightness/Contrast Dialog pops up with the -28/28 values from my script prompting me for a OK confirmation.
After that my Script is performed. Much to my surprise the Script values are now PERMANENTLY set in Brightness/Contrast dialog as new values.
How can I (when running a script):
a) suppress the brightness/contrast dialog
b) Leave the current/old brightness/contrast dialog values untouched by my Script. They should stay at 35/35
Thank you
Peter
How to run my Script with untouching current parameters?
Moderator: Kathy_9
-
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: How to run my Script with untouching current parameters?
1) There are two main ways. On the Script Toolbar there is an toggle execution mode button. It lets you run the script in interactive mode to silent mode. When it's in interactive mode the dialogs pop up. When it's in silent mode it just uses the parameters given to it.
Of course this mode works on all scripts so if you want some scripts to be interactive you'll have to remember to set this button each time. So let's move onto the second method.
The second method is just as easy. With your script selected in the script toolbar click on the "Edit Script" button. This will pop up the script editor dialog. Next to each command in the script is a drop down box with "Default" "Interactive" and "Silent" as options. "Default" means that script will do whatever the program is set to do. In other words it listens to the execution mode toggle button. "Interactive" will always pop up the dialog even if the toggle button is set to silent. And "Silent" will always run silently even if the toggle button is set to interactive.
So you can just set that drop down to "Silent" and the command will never both you again.
2) This is harder, and I've never tried it. But the reason it doesn't stay 35 is because of the "Last Used" preset. When you run the dialog it pops up with the last used settings. Which, after you've run the script, is 28.
The way to fix this would be to make sure the last used values for the command are 35,35. I can think of one possible way but it's very klunky. And I don't even know if it'll work. I will need to review the scripting documentation. I'm sure there's a better method than what's going through my head.
Of course this mode works on all scripts so if you want some scripts to be interactive you'll have to remember to set this button each time. So let's move onto the second method.
The second method is just as easy. With your script selected in the script toolbar click on the "Edit Script" button. This will pop up the script editor dialog. Next to each command in the script is a drop down box with "Default" "Interactive" and "Silent" as options. "Default" means that script will do whatever the program is set to do. In other words it listens to the execution mode toggle button. "Interactive" will always pop up the dialog even if the toggle button is set to silent. And "Silent" will always run silently even if the toggle button is set to interactive.
So you can just set that drop down to "Silent" and the command will never both you again.
2) This is harder, and I've never tried it. But the reason it doesn't stay 35 is because of the "Last Used" preset. When you run the dialog it pops up with the last used settings. Which, after you've run the script, is 28.
The way to fix this would be to make sure the last used values for the command are 35,35. I can think of one possible way but it's very klunky. And I don't even know if it'll work. I will need to review the scripting documentation. I'm sure there's a better method than what's going through my head.
https://levifiction.wordpress.com/
-
pstein
- Posts: 110
- Joined: Wed Dec 28, 2011 7:09 pm
- System_Drive: C
- 32bit or 64bit: 64 Bit
- Corel programs: PSP X2
- Location: Germany/Canada
Re: How to run my Script with untouching current parameters?
Hello LeviFiction,LeviFiction wrote:2) This is harder, and I've never tried it. But the reason it doesn't stay 35 is because of the "Last Used" preset. When you run the dialog it pops up with the last used settings. Which, after you've run the script, is 28.
The way to fix this would be to make sure the last used values for the command are 35,35. I can think of one possible way but it's very klunky. And I don't even know if it'll work. I will need to review the scripting documentation. I'm sure there's a better method than what's going through my head.
have you investigated your 2nd solution meanwhile?
I would appreciate it very much
thank you
Peter
-
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: How to run my Script with untouching current parameters?
Sorry, got side tracked a long time ago and never got back to it.
Did you try setting the execution mode to Silent like I suggested? The second method should not be necessary if using Silent mode works.
The second method is to execute the Brightness/Contrast command a second time then use Undo. Like I said, klunky. If Silent mode doesn't work then setting this up in code is easy.
Did you try setting the execution mode to Silent like I suggested? The second method should not be necessary if using Silent mode works.
The second method is to execute the Brightness/Contrast command a second time then use Undo. Like I said, klunky. If Silent mode doesn't work then setting this up in code is easy.
https://levifiction.wordpress.com/
-
pstein
- Posts: 110
- Joined: Wed Dec 28, 2011 7:09 pm
- System_Drive: C
- 32bit or 64bit: 64 Bit
- Corel programs: PSP X2
- Location: Germany/Canada
Re: How to run my Script with untouching current parameters?
I prefer not to use silent mode.
Instead it should be a zero-assumption solution.
The second run with Undo could work. I will check that.
Instead it should be a zero-assumption solution.
The second run with Undo could work. I will check that.
-
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: How to run my Script with untouching current parameters?
Okay, well just so you know. In order to save a script with Undos you need you will need to uncheck the "Remove Undone commands" check box in the Save Script dialog.
Also, i've confirmed that running silently will not change the last used settings. So, for this to work. The dialog has to pop up, be accepted, pop up again, be accepted, and then undone.
Essentially requiring you to accept the change twice. I don't know how much time and effort this saves you.
Also, i've confirmed that running silently will not change the last used settings. So, for this to work. The dialog has to pop up, be accepted, pop up again, be accepted, and then undone.
Essentially requiring you to accept the change twice. I don't know how much time and effort this saves you.
https://levifiction.wordpress.com/
