Hello!
I've created a script to resize my graphics to a specific size I use all the time. However it always opens up the resize box and requires me to click "ok". Is there a way I can make the script resize without the box opening up?
Thanks!
Nancy
Resize script question
Moderator: Kathy_9
-
nanrector
- Posts: 65
- Joined: Wed Aug 08, 2012 12:58 pm
- System_Drive: C
- 32bit or 64bit: 64 Bit
- processor: Intel Core i7-8700 CPU 3.2GHz 6 Core
- ram: 32 GB
- Video Card: NVIDIA GeForce GTX 1070
- Hard_Drive_Capacity: 10 TB
- Corel programs: PSP 2019 Ultimate
- Location: Arizona
- Contact:
Resize script question
Nancy Ü
PSP X4
PSP X4
- hartpaul
- Advisor
- Posts: 2893
- Joined: Tue Mar 20, 2012 3:38 pm
- System_Drive: C
- 32bit or 64bit: 64 Bit
- motherboard: ASUSTeK P7P55D STRIX B240F GAMING
- processor: IntelCore i7 7700 3.60 Ghz
- ram: 8 Gb
- Video Card: Nvidia GeForce GTX 1050
- sound_card: Nvidia High Definition Audio
- Hard_Drive_Capacity: 1000 Gb
- Monitor/Display Make & Model: AOC
- Corel programs: PSP8,X2 to X9,2018,2019,2020
- Location: Australia
Re: Resize script question
Just beside Edit Script on the Script Toolbar is Toggle Execution Mode this will switch to silent mode.
Systems available Win7, Win 8.1,Win 10 Version 1607 Build 14393.2007 & version 20H2 Build 19042.867
-
nanrector
- Posts: 65
- Joined: Wed Aug 08, 2012 12:58 pm
- System_Drive: C
- 32bit or 64bit: 64 Bit
- processor: Intel Core i7-8700 CPU 3.2GHz 6 Core
- ram: 32 GB
- Video Card: NVIDIA GeForce GTX 1070
- Hard_Drive_Capacity: 10 TB
- Corel programs: PSP 2019 Ultimate
- Location: Arizona
- Contact:
Re: Resize script question
I found that! However its distorting my images now. I assume that is because its using whatever the height was when I saved the script. However I use this on various size images. Is there a way to have it do the width and then adjust the length automatically rather than using a set size?
Nancy Ü
PSP X4
PSP X4
-
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: Resize script question
So, the reason it works when the dialog pops-up vs when it doesn't is the dialog does al of the calculating. The command itself just follows orders. In order to get the command to resize any image and maintain the aspect ratio you have to actually program the script.
If the only thing your script is doing is resizing then you can use this script. It's horribly made and does not show best practices. Anyway, to use it just place it into the "Scripts-Restricted" folder. Then edit the script in notepad.
Inside the script you'll see two variables
Change only the side that you want to use. So in your case you'll change the width to whatever you want it resized to. The script will recalculate the aspect ratio and produce the appropriate alternate size. It was designed to be used in batches but can also be used individually. It's also designed to always run silently.
-------------
To answer your first question about dialogs popping up in scripts there is another handy trick.
If you click the "Edit Script" button on the script toolbar it will normally pop up the "Quick Script Editor" which shows author information and a list of the commands in the script.
From this dialog you can turn off commands by clicking the eyeball. And you can determine how they run: Interactively - dialog will always pop up, default - matches the interactivity toggle button on the script toolbar, or silent - always runs silently.
So if there are commands in your script that you never want to run interactively you can use this dialog to set them to silent.
If the only thing your script is doing is resizing then you can use this script. It's horribly made and does not show best practices. Anyway, to use it just place it into the "Scripts-Restricted" folder. Then edit the script in notepad.
Inside the script you'll see two variables
Code: Select all
NewWidth = -1
NewHeight = -1
-------------
To answer your first question about dialogs popping up in scripts there is another handy trick.
If you click the "Edit Script" button on the script toolbar it will normally pop up the "Quick Script Editor" which shows author information and a list of the commands in the script.
From this dialog you can turn off commands by clicking the eyeball. And you can determine how they run: Interactively - dialog will always pop up, default - matches the interactivity toggle button on the script toolbar, or silent - always runs silently.
So if there are commands in your script that you never want to run interactively you can use this dialog to set them to silent.
- Attachments
-
- BatchResize.zip
- (853 Bytes) Downloaded 294 times
https://levifiction.wordpress.com/
-
nanrector
- Posts: 65
- Joined: Wed Aug 08, 2012 12:58 pm
- System_Drive: C
- 32bit or 64bit: 64 Bit
- processor: Intel Core i7-8700 CPU 3.2GHz 6 Core
- ram: 32 GB
- Video Card: NVIDIA GeForce GTX 1070
- Hard_Drive_Capacity: 10 TB
- Corel programs: PSP 2019 Ultimate
- Location: Arizona
- Contact:
Re: Resize script question
I just recreated it and it works perfect. Then after a few uses of the script it started distorting the image again. Not sure what's causing that.
Thanks for the other info too! I'm all about shaving time off things I have to do over and over again.
Thanks so much for your help!
Nancy
Thanks for the other info too! I'm all about shaving time off things I have to do over and over again.
Thanks so much for your help!
Nancy
Last edited by nanrector on Thu Jun 04, 2015 6:01 pm, edited 1 time in total.
Nancy Ü
PSP X4
PSP X4
-
nanrector
- Posts: 65
- Joined: Wed Aug 08, 2012 12:58 pm
- System_Drive: C
- 32bit or 64bit: 64 Bit
- processor: Intel Core i7-8700 CPU 3.2GHz 6 Core
- ram: 32 GB
- Video Card: NVIDIA GeForce GTX 1070
- Hard_Drive_Capacity: 10 TB
- Corel programs: PSP 2019 Ultimate
- Location: Arizona
- Contact:
Re: Resize script question
You wouldn't happen to know how to customize the Color Efex Pro plugin would you? I posted a question on that a while back and no one answered. It has some things that slow me down too. Ü
Nancy Ü
PSP X4
PSP X4
