Sucessful Script Making in X4?

Corel Paint Shop Pro

Sucessful Script Making in X4?

Postby tattooedfreek77 on Tue May 01, 2012 12:06 am

This is just absolutely frustrating. No one from customer help will help me. So I am hoping someone here can. For some reason I can NOT write a script that will work in any other version accept for X4. As far as I can figure it comes down to one command that comes up that no other version of PSP recognizes. It happens when I go to the different layers to start the shading etc. Any help is appreciated. I have pasted the command that appears below. Thanks in advance! ANd I'm not even working with vector layers, they are ALL raster layers lol

# Vector Selection Update
App.Do( Environment, 'VectorSelectionUpdate', {
'Path': (0,2,[],False),
'Type': App.Constants.ObjectSelection.Select,
'GeneralSettings': {
'ExecutionMode': App.Constants.ExecutionMode.Silent,
'AutoActionMode': App.Constants.AutoActionMode.Default,
'Version': ((14,0,0),1)
}
})
tattooedfreek77
 
Posts: 1
Joined: Mon Apr 30, 2012 11:59 pm
operating_system: Windows 7 Home Premium
System_Drive: C
32bit or 64bit: 64 Bit

Re: Sucessful Script Making in X4?

Postby df on Tue May 01, 2012 1:27 am

I have both X4 and X3 installed on this computer. I recorded a script in both to see how things are acting differently.

In X4 I get what you do:
Code: Select all
    # Vector Selection Update
    App.Do( Environment, 'VectorSelectionUpdate', {
            'Path': (0,1,[],False),
            'Type': App.Constants.ObjectSelection.Select,
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Silent,
                'AutoActionMode': App.Constants.AutoActionMode.Default,
                'Version': ((14,0,0),1)
                }
            })


But in X3 I get:
Code: Select all
    # SelectLayer
    App.Do( Environment, 'SelectLayer', {
            'Path': (0,1,[],False),
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Silent,
                'AutoActionMode': App.Constants.AutoActionMode.Default,
                'Version': ((13,0,0),1)
                }
            })


All I did to get the code was
Create a new image (blank)
Create a new layer on image
Select bottom layer
Start recording, select top layer, save recording.
I didn't do anything in either remotely related to a vector of any sort, at least not that I know of.
Regards, Dan

"Smoke me a kipper, I'll be back for breakfast."
df
 
Posts: 902
Joined: Mon Feb 08, 2010 11:21 pm
Location: Washington State
operating_system: Windows 7 Home Premium
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: ECS MCP61M-M3 7.0
processor: 3.10 gigahertz AMD Phenom II X2 550
ram: 8gb
Video Card: MSI N8400GS-MD1GD3H LP
sound_card: onboard sound
Hard_Drive_Capacity: 4.5 Tb
Monitor/Display Make & Model: Acer X223W & Acer X203H

Re: Sucessful Script Making in X4?

Postby LeviFiction on Tue May 01, 2012 1:29 am

This came about when X4 gained the ability to select multiple raster layers. All previous versions could only select one raster layer at a time. So essentially they just used the vector selection abilities to select raster layers. This has made it difficult for scripters. But as df's example shows you just need to use the right command for older versions.

So to make up for this you have to exchange the "VectorSelectionUpdate" method. Just change that to say "SelectLayer" instead. Should be fine.
LeviFiction
Advisor
 
Posts: 2563
Joined: Thu Oct 02, 2008 1:07 pm
Location: USA
operating_system: Windows 8 Pro
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: ASUSTeK Computer Inc. K52F 1.0
processor: 2.53 gigahertz Intel Core i5 M 460
ram: 4GB
Video Card: Intel[R] HD Graphics
sound_card: Conexant SmartAudio HD
Hard_Drive_Capacity: 500GB


Return to Paint Shop Pro

Who is online

Users browsing this forum: df, Google [Bot], photodrawken and 3 guests