[Sticky] -- Scripting Resources

Moderator: Kathy_9

LeviFiction
Advisor
Posts: 6472
Joined: Thu Oct 02, 2008 1:07 pm
operating_system: Windows 10
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: Scripting Resources

Post by LeviFiction »

I'm sure you've read, the closest thing to encapsulation python has is to use a double Underscore in front of any methods or properties in the class. This doesn't prevent them from being accessed, only from being accessed directly and by accident. There are ways around this but, PSP will throw a fit claiming that there is no such method or property if you try and access it directly.

Well, I think this post does a decent job of explaining the issue: http://stupidpythonideas.blogspot.com/2 ... ation.html
rushabh92
Posts: 1
Joined: Mon Nov 11, 2019 5:52 pm
operating_system: Mac
System_Drive: C
32bit or 64bit: 64 Bit
Hard_Drive_Capacity: Rajkot

Re: [Sticky] -- Scripting Resources

Post by rushabh92 »

I have gathered some resourceful links on different topics.

For Learning Javascript go to https://scotch.io

For Learning PHP go to https://php.net

For Learning Laravel go to https://appdividend.com

For Learning Machine Learning go to https://machinelearningmastery.com
BloodyNose
Posts: 2
Joined: Sat Nov 23, 2019 1:06 am
operating_system: Windows 10
System_Drive: C

Re: [Sticky] -- Scripting Resources

Post by BloodyNose »

Howdy! I'm using PSP 2020 and have been searching around for newer scripting APIs and documentation. Are there any more recent resources? Thanks!
LeviFiction
Advisor
Posts: 6472
Joined: Thu Oct 02, 2008 1:07 pm
operating_system: Windows 10
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: [Sticky] -- Scripting Resources

Post by LeviFiction »

Andy2011
Posts: 112
Joined: Sun Sep 22, 2019 4:26 pm
operating_system: Windows 11
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: Gigabyte A520M S2H
processor: AMD Ryzen 5 PRO 4650G 6 Core CPU
ram: 16 GB
Video Card: Integrated Radeon Vega GPU
sound_card: on board
Hard_Drive_Capacity: 2500 GB
Monitor/Display Make & Model: BENQ GW2760HS + Benq T905 as second monitor
Corel programs: Aftershot Pro 3, Paint Shop Pro 2020
Location: UK

Re: [Sticky] -- Scripting Resources

Post by Andy2011 »

3) Learn the Basics of Python
Can I suggest that when talking about leaning Python, that the major version is mentioned. recent PSPs uses 2.7x whereas a lot of online resources on Python use 3.x? Whilst there is a lot of similarity between versions 2 and 3, there are pitfalls - e.g. print 'x' rather than print('x'). (I haven't checked the version in 2020 but I recall I had to use a Trusted script to access the version information in 2018.)
Knowledge is recognising that a tomato is a fruit: experience is not putting it in a fruit salad.
LeviFiction
Advisor
Posts: 6472
Joined: Thu Oct 02, 2008 1:07 pm
operating_system: Windows 10
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: [Sticky] -- Scripting Resources

Post by LeviFiction »

True PSP has gone through Python versions 2.2 up to 2.7 since it originally started using Python as its scripting engine. So it's always the 2.x version of Python we need to learn. And yes 2020 is still on 2.7.5.

I don't know if they're slow to it because of the whole backwards compatibility thing with older scripts, or if it's just because they custom compile their version of Python that they aren't keeping up. The whole custom compile thing is very annoying, it prevents us from using libraries like Numpy and Pillow for faster effects.
petame7457
Posts: 1
Joined: Wed Feb 26, 2020 6:54 pm
operating_system: Windows 10
System_Drive: F
motherboard: intel
processor: i5 7gen
ram: 12GB
Hard_Drive_Capacity: 2gb

Re: [Sticky] -- Scripting Resources

Post by petame7457 »

I have gathered some resourceful links on different topics.

For Learning Javascript go to http://icetutor.com/
Radim
Posts: 616
Joined: Mon Nov 01, 2010 5:54 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
ram: 4GB
Monitor/Display Make & Model: 27 inch

Re: [Sticky] -- Scripting Resources

Post by Radim »

Corel_PaintShop_Pro_Scripting_Guide.pdf
size: 658kB, year 2013

https://www.docdroid.net/IzDH0Zw/corel- ... -guide-pdf
Cassel
Posts: 1576
Joined: Fri Oct 29, 2010 6:49 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
ram: 16Gb
Corel programs: PSP 8 (JASC) to PSP 2022
Location: Canada

Re: [Sticky] -- Scripting Resources

Post by Cassel »

Radim wrote: Thu Jul 23, 2020 2:23 pm Corel_PaintShop_Pro_Scripting_Guide.pdf
size: 658kB, year 2013

https://www.docdroid.net/IzDH0Zw/corel- ... -guide-pdf
There is a more recent version:
https://help.corel.com/paintshop-pro/ma ... -guide.pdf
Cassel
https://creationcassel.com/store
Specializing in PSP specific products: scripts and tubes

https://scrapbookcampus.com
for beginner and seasoned scrappers and designers and other PSP users
ermichalski
Posts: 16
Joined: Mon Oct 24, 2011 2:46 pm
operating_system: Windows 7 Professional
System_Drive: C
32bit or 64bit: 64 Bit
ram: 16gb
Location: Ohio USA

Re: [Sticky] -- Scripting Resources

Post by ermichalski »

I can not find a scripting resource that explains how to get pixel attributes such as color. Any links?
LeviFiction
Advisor
Posts: 6472
Joined: Thu Oct 02, 2008 1:07 pm
operating_system: Windows 10
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: [Sticky] -- Scripting Resources

Post by LeviFiction »

To get a pixel's color you need to use the EyeDropper command and the GetMaterial commands.

EyeDropper API command page
GetMaterial API command page

There is no built-in method for getting pixel properties or working directly with the image data.
User avatar
sheng-si
Posts: 52
Joined: Fri Dec 28, 2012 12:14 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: Hp motherb
processor: amd
ram: 64 GB
Hard_Drive_Capacity: 1 tb
Monitor/Display Make & Model: acer
Corel programs: paintshop pro 2022
Location: Netherlands

Re: [Sticky] -- Scripting Resources

Post by sheng-si »

Somewhere in 2020 the provider ziggo, removed the webspace
members home nl

So that link in the first post does not work anymore:
Joske's Graphic Resources
Admin FB Paintshop Pro NLD for dutch users.
LeviFiction
Advisor
Posts: 6472
Joined: Thu Oct 02, 2008 1:07 pm
operating_system: Windows 10
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: [Sticky] -- Scripting Resources

Post by LeviFiction »

Thank you, the link has been updated to a wayback machine URL that points to an archived version of the site.