Script editor not opening consistently.

Moderator: Kathy_9

Post Reply
bobclevenger
Posts: 20
Joined: Mon Dec 21, 2020 4:09 am
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: Shuttle SH370R6 V2
processor: Intel Core i9
ram: 128 GB
Video Card: Onboard
sound_card: Onboard
Hard_Drive_Capacity: 2TB
Monitor/Display Make & Model: HP 27yh
Corel programs: Paint Shop Pro 2021
Location: Reno, Nevada
Contact:

Script editor not opening consistently.

Post by bobclevenger »

Sometimes when opening the script editor (on the same script) it opens normally (with the script steps in order and check boxes to enable/disable steps) but other times it opens directly into the text editor. When it opens with the text editor this behaviour can persist many times... and then one time it will go back to "normal" opening.

Any ideas as to causes and/or cures are welcome and appreciated.
LeviFiction
Advisor
Posts: 5984
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, 9, X, XI, X2, X8,X9, 2018, 2019
Location: USA

Re: Script editor not opening consistently.

Post by LeviFiction »

Not really, no. Custom scripts that have been edited usually will always open in a text editor because it can't be properly edited by the script editor. So it's a parsing issue, though what specifically tips it off that it should open in a text editor or not I don't know. I've never had issues with a single script being inconsistent like this but I do a lot of custom edits so I haven't really paid attention either.
bobclevenger
Posts: 20
Joined: Mon Dec 21, 2020 4:09 am
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: Shuttle SH370R6 V2
processor: Intel Core i9
ram: 128 GB
Video Card: Onboard
sound_card: Onboard
Hard_Drive_Capacity: 2TB
Monitor/Display Make & Model: HP 27yh
Corel programs: Paint Shop Pro 2021
Location: Reno, Nevada
Contact:

Re: Script editor not opening consistently.

Post by bobclevenger »

Yes, this only happens on scripts that have been edited. But I prepare the edited part as a separate script that has only that part in it. That "mini-script" opens just fine. I copy and past it into a larger script and the large script opens fine -- for a while, and then it opens in the text editor. Sometimes after that it opens normally -- for a while. I am beginning to believe in gremlins.
bobclevenger
Posts: 20
Joined: Mon Dec 21, 2020 4:09 am
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: Shuttle SH370R6 V2
processor: Intel Core i9
ram: 128 GB
Video Card: Onboard
sound_card: Onboard
Hard_Drive_Capacity: 2TB
Monitor/Display Make & Model: HP 27yh
Corel programs: Paint Shop Pro 2021
Location: Reno, Nevada
Contact:

Re: Script editor not opening consistently.

Post by bobclevenger »

Well, edited scripts are reliably opening directly in the text editor -- mostly. :)

If I alter a static file name in the "File Save As:" script to a different file name (real or not) the script opens in the editor in a normal manner -- no problem -- but if I use the "+App.TargetDocument.Title," parameter in place of the static file name the script opens in the text editor. Even if I just add a comment line in this area of the script it opens in the text editor, but not if the comment is before or after this area. If I spoke Python I might understand this, but I do not. Feeling frustrated and a bit stupid. :?
LeviFiction
Advisor
Posts: 5984
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, 9, X, XI, X2, X8,X9, 2018, 2019
Location: USA

Re: Script editor not opening consistently.

Post by LeviFiction »

That's not Python specific, that's just the PSP parser. PSP formats its scripts in a specific way, for example all spacing is done with 4 spaces per indent (no tabs). Each block of text has a comment at the beginning but not anywhere in the middle of the parameter list, each parameter is on its own line, each command has at least the GeneralSettings parameter set if not any others, PSP will never record a script with certain commands or object member calls like App.TargetDocument or 'GetCommandInfo'. But it will use App.Constants.xxx etc. So there are clues it is supposed to use to make the determination. What's causing the inconsistency for you, I can't say. Maybe PSP just doesn't have a great parser.
bobclevenger
Posts: 20
Joined: Mon Dec 21, 2020 4:09 am
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: Shuttle SH370R6 V2
processor: Intel Core i9
ram: 128 GB
Video Card: Onboard
sound_card: Onboard
Hard_Drive_Capacity: 2TB
Monitor/Display Make & Model: HP 27yh
Corel programs: Paint Shop Pro 2021
Location: Reno, Nevada
Contact:

Re: Script editor not opening consistently.

Post by bobclevenger »

OK. I learned a little today. I guess I shall just have to wait for the next version of PSP and hope Corel changes this behaviour. Thanks for the insight.
Post Reply