Is it just me or is scripting nearly broken?
I've tried pointing X4 to a script that I recorded in X3. Absolutely no location that X3 points too makes X4 see a script I'm trying to use (don't know if it sees others, I'm just trying to get something done). So I took the time to record a new script in X4 with the same steps in x3. A few problems here.
1) the script recorded multiple instances of the same steps.
2) when I try to edit the script via the edit button, I don't get the old graphical interface I'm familiar with but the python text that I really don't care for. The reason why I want the graphical interface is that you can just turn off things and make others interactive, etc.. which would have fixed my problem with #1 but now I either have to write/delete python and hope I don't screw it up or record a new script.
This is happening to me on two computers. Both Win7. One laptop the other desktop. This really limits the program for me.
X4 scripting
Moderator: Kathy_9
-
df
- Posts: 1224
- Joined: Mon Feb 08, 2010 11:21 pm
- System_Drive: C
- 32bit or 64bit: 64 Bit
- motherboard: GIGABYTE Z690 AERO G DDR4
- processor: 13th Gen Intel Core i7-13700K
- ram: 64gb
- Video Card: RTX 3060 Ti 8gb GDRR6
- Hard_Drive_Capacity: 1 Tb
- Location: Washington State
- Contact:
X4 scripting
Regards, Dan
"Smoke me a kipper, I'll be back for breakfast."
"Smoke me a kipper, I'll be back for breakfast."
-
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: X4 scripting
I have personally never had a problem with scripting since the official release. It recognizes all of my X3 folders, it runs my X3 scripts just fine whether they are in the X3 folder or moved over to the X4 folder. And recording does exactly as I planned it to with no repeats.
There are instances where if I recorded the script in X4 it will open up in the python editor (notepad++ for me) but that doesn't always happen.
And so long as you keep the same spacing (PSP records scripts with an indentation of 4 spaces and don't use tabs) nothing should go wrong with our script. And I and others would be willing to help you if need be.
From there just report the problems, try a workspace reset, and see what comes of it.
There are instances where if I recorded the script in X4 it will open up in the python editor (notepad++ for me) but that doesn't always happen.
And so long as you keep the same spacing (PSP records scripts with an indentation of 4 spaces and don't use tabs) nothing should go wrong with our script. And I and others would be willing to help you if need be.
From there just report the problems, try a workspace reset, and see what comes of it.
https://levifiction.wordpress.com/
-
allicorn
- Posts: 135
- Joined: Sun Mar 16, 2008 12:39 am
- System_Drive: C
- 32bit or 64bit: 64 Bit
- processor: Phenom II X6 1055T 3.2Ghz
- ram: 4Gb
- Video Card: ATI5670 1Gb + ATI4290 512Mb
- sound_card: Realtek HD onboard
- Hard_Drive_Capacity: 2Tb
- Monitor/Display Make & Model: Belinea B2025S1W + LG M197WDP
- Location: Somerset, UK
- Contact:
Re: X4 scripting
X4 does indeed seem to put its scripts in a slightly different place than X2/3 used to.
Previously scripts were in:
C:\Users\<username>\Documents\My PSP Files\Scripts-Trusted (and Scripts-Restricted)
or
C:\Documents & Settings\<username>\My Documents\My PSP Files\Scripts-Trusted (and Scripts-Restricted)
Now for PSP X4 they're in:
C:\Users\<username>\Documents\Corel PaintShop Pro\14.0\Scripts-Trusted (and Scripts-Restricted)
or
C:\Documents & Settings\<username>\My Documents\Corel PaintShop Pro\14.0\Scripts-Trusted (and Scripts-Restricted)
You can hook all your old scripts right in with one quick change though. Click the script selector dropdown on the scripts toolbar. Click the "File Locations" icons (the lower of the 2 icons along side the list of scripts). You'll see configured there the various new paths where PSP stores scripts now. Click the add button, and point to your old PSP scripts locations (you'll have to do both Trusted and Restricted one at a time if you want to add both). After that, X4 will be automatically show your old scripts on the same dropdown list at the new stuff.
DF, I definitely do get the same thing you reported where sometimes Edit Script opens an editor on the Python code instead of the nice graphical script tweaking interface but it seems to depend on the script. I still get the convenient graphical interface consistently with most scripts. Not sure what the trigger is but clearly there must be something in a few scripts that can't be shown in that graphical interface.
Previously scripts were in:
C:\Users\<username>\Documents\My PSP Files\Scripts-Trusted (and Scripts-Restricted)
or
C:\Documents & Settings\<username>\My Documents\My PSP Files\Scripts-Trusted (and Scripts-Restricted)
Now for PSP X4 they're in:
C:\Users\<username>\Documents\Corel PaintShop Pro\14.0\Scripts-Trusted (and Scripts-Restricted)
or
C:\Documents & Settings\<username>\My Documents\Corel PaintShop Pro\14.0\Scripts-Trusted (and Scripts-Restricted)
You can hook all your old scripts right in with one quick change though. Click the script selector dropdown on the scripts toolbar. Click the "File Locations" icons (the lower of the 2 icons along side the list of scripts). You'll see configured there the various new paths where PSP stores scripts now. Click the add button, and point to your old PSP scripts locations (you'll have to do both Trusted and Restricted one at a time if you want to add both). After that, X4 will be automatically show your old scripts on the same dropdown list at the new stuff.
DF, I definitely do get the same thing you reported where sometimes Edit Script opens an editor on the Python code instead of the nice graphical script tweaking interface but it seems to depend on the script. I still get the convenient graphical interface consistently with most scripts. Not sure what the trigger is but clearly there must be something in a few scripts that can't be shown in that graphical interface.
-
df
- Posts: 1224
- Joined: Mon Feb 08, 2010 11:21 pm
- System_Drive: C
- 32bit or 64bit: 64 Bit
- motherboard: GIGABYTE Z690 AERO G DDR4
- processor: 13th Gen Intel Core i7-13700K
- ram: 64gb
- Video Card: RTX 3060 Ti 8gb GDRR6
- Hard_Drive_Capacity: 1 Tb
- Location: Washington State
- Contact:
Re: X4 scripting
I've reset the workspace but it didn't seem to affect the scripting. I did save my old workspace so no big deal there.
allicorn, usually if you edit or write a script in Python you can't go back to the graphical interface. Usually if you just record steps as you're doing them to an image/file you can access the editor via the familiar graphical interface. But for some reason even though I've done just that, record a number of steps as I do them to an image, the graphical interface is not there, just the python editor (notepad?). Also I've pointed X4 to every location that X3 is pointed too, but none of the scripts I've recorded show up.
Another thing I've noticed is that it duplicated a few of my steps. I didn't undo and redo any when recording, but for some reason it recorded doubles of certain things. Also, sometimes when trying to execute a script the view goes from 'fit to screen' to 100%, and sometimes the entire program loses focus all together as if I had minimized the program.
I assume that this doesn't have anything to do with it but I'm still using the trial version. I haven't decided if I'm buying X4 or not yet.
allicorn, usually if you edit or write a script in Python you can't go back to the graphical interface. Usually if you just record steps as you're doing them to an image/file you can access the editor via the familiar graphical interface. But for some reason even though I've done just that, record a number of steps as I do them to an image, the graphical interface is not there, just the python editor (notepad?). Also I've pointed X4 to every location that X3 is pointed too, but none of the scripts I've recorded show up.
Another thing I've noticed is that it duplicated a few of my steps. I didn't undo and redo any when recording, but for some reason it recorded doubles of certain things. Also, sometimes when trying to execute a script the view goes from 'fit to screen' to 100%, and sometimes the entire program loses focus all together as if I had minimized the program.
I assume that this doesn't have anything to do with it but I'm still using the trial version. I haven't decided if I'm buying X4 or not yet.
Regards, Dan
"Smoke me a kipper, I'll be back for breakfast."
"Smoke me a kipper, I'll be back for breakfast."
-
allicorn
- Posts: 135
- Joined: Sun Mar 16, 2008 12:39 am
- System_Drive: C
- 32bit or 64bit: 64 Bit
- processor: Phenom II X6 1055T 3.2Ghz
- ram: 4Gb
- Video Card: ATI5670 1Gb + ATI4290 512Mb
- sound_card: Realtek HD onboard
- Hard_Drive_Capacity: 2Tb
- Monitor/Display Make & Model: Belinea B2025S1W + LG M197WDP
- Location: Somerset, UK
- Contact:
Re: X4 scripting
Hi Dan,
Ah, you're right about what the normal trigger between GUI or text-editor is. Sorry I can't be more help but it's reliably going to the GUI here on new scripts I've recorded.
This is a shot of my Preferences -> File Locations dialog:

Looking at it, I only just noticed the little dropdown at the bottom which selects which folder newly recorded scripts go into. Cool.
Anyway, what happens if you clear that whole list out, make a new empty folder somewhere (outside C:\Program Files) and add that as the only script location? When you drop an existing script file in there the script selection dropdown on the scripts toolbar show anything?
Regards,
Alli
Ah, you're right about what the normal trigger between GUI or text-editor is. Sorry I can't be more help but it's reliably going to the GUI here on new scripts I've recorded.
This is a shot of my Preferences -> File Locations dialog:

Looking at it, I only just noticed the little dropdown at the bottom which selects which folder newly recorded scripts go into. Cool.
Anyway, what happens if you clear that whole list out, make a new empty folder somewhere (outside C:\Program Files) and add that as the only script location? When you drop an existing script file in there the script selection dropdown on the scripts toolbar show anything?
Regards,
Alli
-
mgroothuis
- Posts: 3
- Joined: Sat Oct 01, 2011 11:49 pm
- System_Drive: C
- 32bit or 64bit: 32 Bit
Re: X4 scripting
I am having problems with scripting in X4 as well. Predominantly with LayerArrange. When I record a script that contains LayerArrange it produces an error when later run. Looking at the code I can see 2 path statements, one indicating where the layer is supposed to be placed, followed by another one that says 'path': none - directly after 'moveAboveSibling': true
It is quite annoying as a lot of my scripts no longer work and I have to work out what it was that I was trying to do. In most cases I need to run the script in the version it was created to discover that (I use PSP for my artwork). And as far as my future wishlist is concerned: fix the problems associated with the current version FIRST before even contemplating new stuff. Having had problems with the last 3 version upgrades I am beginning to wonder if the development team actually knows the program as well as they are supposed to. There certainly has not been a solid testing of the upgrades otherwise a lot of the problems we have been and are experiencing would not have occurred; they would have been found during beta testing.
It is quite annoying as a lot of my scripts no longer work and I have to work out what it was that I was trying to do. In most cases I need to run the script in the version it was created to discover that (I use PSP for my artwork). And as far as my future wishlist is concerned: fix the problems associated with the current version FIRST before even contemplating new stuff. Having had problems with the last 3 version upgrades I am beginning to wonder if the development team actually knows the program as well as they are supposed to. There certainly has not been a solid testing of the upgrades otherwise a lot of the problems we have been and are experiencing would not have occurred; they would have been found during beta testing.
-
Ria
- Posts: 1
- Joined: Tue Feb 07, 2012 12:49 am
- System_Drive: C
- 32bit or 64bit: 64 Bit
- motherboard: Acer Aspire 7715Z V2.06
- processor: pentium Dual Core T4300
- ram: 4GB
- Hard_Drive_Capacity: 453GB
- Monitor/Display Make & Model: Acer Aspire 7715Z V2.06
Re: X4 scripting
Hi i'm a newbie here on the forum.
And i have the same problems with making scripts,my scripts made in previous versions runs with errors,X4 can't find the parameters from the previous versions.
This is the error text i'm getting.
I hope they can fix this.
And it also took a long time before the material property box show up.The same thing with the selection box.
Ria
And i have the same problems with making scripts,my scripts made in previous versions runs with errors,X4 can't find the parameters from the previous versions.
This is the error text i'm getting.
I hope they can fix this.
And it also took a long time before the material property box show up.The same thing with the selection box.
Ria
-
df
- Posts: 1224
- Joined: Mon Feb 08, 2010 11:21 pm
- System_Drive: C
- 32bit or 64bit: 64 Bit
- motherboard: GIGABYTE Z690 AERO G DDR4
- processor: 13th Gen Intel Core i7-13700K
- ram: 64gb
- Video Card: RTX 3060 Ti 8gb GDRR6
- Hard_Drive_Capacity: 1 Tb
- Location: Washington State
- Contact:
Re: X4 scripting
Ria, likely what is going on is the command that the script is calling up has been changed or renamed. It's as if you're giving driving instructions in a tennis match. The best course of action would be to rerecord the scripts using the tools that the program has now. You may even find that some tools have been replaced with better tools.Ria wrote:Hi i'm a newbie here on the forum.
And i have the same problems with making scripts,my scripts made in previous versions runs with errors,X4 can't find the parameters from the previous versions.
This is the error text i'm getting.![]()
I hope they can fix this.
And it also took a long time before the material property box show up.The same thing with the selection box.
Ria
I'd also advise to install the latest service pack. I'm sure there's also programming differences between the various versions and things that wouldn't be apparent if you didn't dig into the programming.
Regards, Dan
"Smoke me a kipper, I'll be back for breakfast."
"Smoke me a kipper, I'll be back for breakfast."
-
nightowlnette
- Posts: 1
- Joined: Thu Feb 09, 2012 9:37 pm
- System_Drive: C
- 32bit or 64bit: 64 Bit
- motherboard: Dell Inc. 0M017G A00
- processor: 2.33 gigahertz Intel Core2 Quad
- ram: 6144 MB
- Video Card: ATI Radeon HD 3650
- sound_card: Realtek High Definition Audio
- Hard_Drive_Capacity: 1140.17 GB
- Monitor/Display Make & Model: DELL S2209W
Re: X4 scripting
Ria and I know each other and make the same types of scripts and are both experiencing the same issues with scripting in X4.
My scripts made in previous versions are running fine, but when I record a new script in X4 and go to test it in any other version, it throws a "vector selection update" error. Here's the error:
# 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)
}
})
When recorded in, say, X3, the same function gives this command:
# 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)
}
})
I've tried replacing the Vector Selection Update with SelectLayer, but that makes it nuts (whereas previously with the move tool and pick, you could do that) and it throws up all kinds of errors, blacks out layers, double functions, etc.
Any suggestions, other than our obvious - keep recording in previous versions? LOL
My scripts made in previous versions are running fine, but when I record a new script in X4 and go to test it in any other version, it throws a "vector selection update" error. Here's the error:
# 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)
}
})
When recorded in, say, X3, the same function gives this command:
# 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)
}
})
I've tried replacing the Vector Selection Update with SelectLayer, but that makes it nuts (whereas previously with the move tool and pick, you could do that) and it throws up all kinds of errors, blacks out layers, double functions, etc.
Any suggestions, other than our obvious - keep recording in previous versions? LOL
