Scripting: Adjustments, Operations, Curves, ...

Hier diskutieren die Betatester von PhotoLine untereinander und mit den Entwicklern
Martin Huber
Entwickler
Entwickler
Beiträge: 4300
Registriert: Di 19 Nov 2002 15:49

Scripting: Adjustments, Operations, Curves, ...

Beitrag von Martin Huber »

Here, scripting issues related to the beta versions are discussed.
pixel8tor
Mitglied
Beiträge: 72
Registriert: Di 24 Jul 2018 17:15

Re: Scripting: Adjustments, Operations, Curves, ...

Beitrag von pixel8tor »

There's something wrong with this beta(25.60b3) on my system(Win10Pro), none of the supplied scripts run properly. There are no error dialogs, but the expected operations don't happen?! For example, the AdjustmentWithGradient.vbs script. It's supposed to create an adjustment layer with a gradient and a curves adjustment. As you can see from the screen grabs, beta 3 doesn't create any adjustment layer. Also beta 3 shows no history steps; just "Start". But beta 2 shows an "Insert Layer(s)" step, and creates the expected layer.
pl25.60b2.jpg
pl25.60b3.jpg
Can anyone verify this is not just my system? And if AdjustmentWithGradient.vbs runs as expected on your system, do you have any suggestions as to what's wrong with my system and how to fix it? I tried running "Photoline.exe /register" to reinstall the COM interface (I'm not sure that even works anymore), with no change.

I've also noticed PL isn't closing like it used to. Maybe it has to do with the scripting engine, since that's what I'm testing out, anyway I notice it still hanging around in memory after "closing" it. Previous versions didn't do this.
Du hast keine ausreichende Berechtigung, um die Dateianhänge dieses Beitrags anzusehen.
pixel8tor
Mitglied
Beiträge: 72
Registriert: Di 24 Jul 2018 17:15

Alert method

Beitrag von pixel8tor »

Since 25.60b3 VBScripting is broken on my system, this was done with 25.60b2. This line of script produces the following Alert.

response = pl.alert("TITLE TEXT", "And this is some BODY TEXT showing the Alert method. The TITLE TEXT should replace the ""Photoline"" title and the button numbers are scrambled. Also changing button selection with the keyboard seems broken.", "button 1", "button 2", "button 3")
AlertMethod25.60b2.jpg
The manual says:
{Method}
Alert([title[, message[, firstButton[, secondButton[, thirdButton]]]]])
{Type}
String, String (optional), String (optional), String (optional), String (optional), String (optional)
{Description}
Query user for a value with an input dialog. You can optionally set the title and the message of the alert dialog. If not set or empty, the title is “PhotoLine” and the message is empty. Additionally, you can set the titles of up to three buttons. If the title of the first button is empty or not set, it will be “OK”. If the other buttons are empty or not set, they are hidden

"Query user for a value with an input dialog." is wrong, there is no input with the Alert method. Just button pressing.
Du hast keine ausreichende Berechtigung, um die Dateianhänge dieses Beitrags anzusehen.
Martin Huber
Entwickler
Entwickler
Beiträge: 4300
Registriert: Di 19 Nov 2002 15:49

Re: Scripting: Adjustments, Operations, Curves, ...

Beitrag von Martin Huber »

pixel8tor hat geschrieben: Do 25 Jun 2026 03:36 Can anyone verify this is not just my system?
Regarding scripting on Windows, something went wrong when creating 25.60B3. There is now updated version, so please redownload it.
pixel8tor hat geschrieben: Fr 26 Jun 2026 03:52 Since 25.60b3 VBScripting is broken on my system, this was done with 25.60b2. This line of script produces the following Alert.

response = pl.alert("TITLE TEXT", "And this is some BODY TEXT showing the Alert method. The TITLE TEXT should replace the ""Photoline"" title
No, it shouldn't. It is an PhotoLine alert, so "PhotoLine" is in the title bar.
pixel8tor hat geschrieben: Fr 26 Jun 2026 03:52and the button numbers are scrambled. Also changing button selection with the keyboard seems broken.", "button 1", "button 2", "button 3")
(...)
The manual says:
{Method}
Alert([title[, message[, firstButton[, secondButton[, thirdButton]]]]])
"firstButton" and so on is the logical order of the buttons, not the physical one. The first button is the default button (return), the second one usually the cancel button (Esc). There location depends on the OS.
pixel8tor hat geschrieben: Fr 26 Jun 2026 03:52(...)
{Description}
Query user for a value with an input dialog.
(...)
"Query user for a value with an input dialog." is wrong, there is no input with the Alert method. Just button pressing.
We will change that.
pixel8tor
Mitglied
Beiträge: 72
Registriert: Di 24 Jul 2018 17:15

Re: Alert method

Beitrag von pixel8tor »

Thanks for the quick fix to 25.60b3. VBScript is working again.

Yeah, deleting the part about "Query user for a value with an input dialog.", will be less confusing.

But I have to disagree with you about the Alert title though. In Windows the title *always* refers to the top bar (Title Bar) of a window. I have never seen "Title" refer to any other part of a window/dialog/popup than that top bar. So if you're saying that's not what it means, well I must say you are incorrect. And even the description of the Alert method seems to contradict you. Please read it closely.

{Description}
Query user for a value with an input dialog. You can optionally set the title and the message of the alert dialog. If not set or empty, the title is “PhotoLine” and the message is empty. Additionally, you can set the titles of up to three buttons. If the title of the first button is empty or not set, it will be “OK”. If the other buttons are empty or not set, they are hidden

So the logic, as stated in the description, is: IF title = "" then "Photoline" else title. Does that make sense?

So if "title" can't replace "Photoline" then that part of the description needs to be revised too. But please don't call it a title since it's not. Maybe call it a "header"? If you can point me to where you determined that text inside a dialog body is a "title" I'd be curious to read it.

Thanks again