Neue Testversion 20.40b12

Hier diskutieren die Betatester von PhotoLine untereinander und mit den Entwicklern
User avatar
Gerhard Huber
Entwickler
Entwickler
Posts: 4028
Joined: Mon 18 Nov 2002 15:30
Location: Bad Gögging

Neue Testversion 20.40b12

Post by Gerhard Huber »

Hallo,

es gibt wieder eine neue Testversion 20.40b12.

Windows:
http://www.pl32.com/beta/pl2040b12.zip


Mac OS:
http://www.pl32.com/beta/plx2040b12.zip



Neues:
- Scripting mit Dokumentation - als Anhang hier
- Es werden jetzt auch dll und exe Scripte unterstützt



diverse kleine Fehler beseitigt
scripting1.odt.zip
You do not have the required permissions to view the files attached to this post.
User avatar
photoken
Mitglied
Posts: 2162
Joined: Sat 28 Sep 2013 01:25

Scripting1 .ODT errors on opening

Post by photoken »

Thanks for the scripting documentation, but I got errors when attempting to view the documentation: Windows Explorer couldn't show a preview of the contents because "WordPad encountered errors.", opening the .ODT file in Word2010 generated a "Corrupt file...Continue?" error. After I answered "Yes" to continue despite "Corrupt Content" warnings, the file did open....
Ken
Yes, I think it can be eeeeeasily done....
Just take everything out on Highway 61.
bkh
Betatester
Posts: 3661
Joined: Thu 26 Nov 2009 22:59

Re: Scripting1 .ODT errors on opening

Post by bkh »

photoken wrote: Wed 19 Jul 2017 09:46 Thanks for the scripting documentation, but I got errors when attempting to view the documentation: Windows Explorer couldn't show a preview of the contents because "WordPad encountered errors.", opening the .ODT file in Word2010 generated a "Corrupt file...Continue?" error. After I answered "Yes" to continue despite "Corrupt Content" warnings, the file did open....
There seems to be no problem opening the documentation with LibreOffice and TextEdit (Mac), so maybe it's just a problem with Microsoft's importers.

Cheers

Burkhard.
User avatar
photoken
Mitglied
Posts: 2162
Joined: Sat 28 Sep 2013 01:25

Parameter name for TextVerticalAlignment?

Post by photoken »

Trying to set the text vertical alignment, but I don't know which string to use for the object:

Code: Select all

	PhotoLine.Dictionary textvertAlignment = new PhotoLine.Dictionary();
	textvertAlignment.Add("Alignment", PhotoLine.TextVerticalAlignment.TVACenter);
or maybe the problem is how I apply it:

Code: Select all

	targetlayer.SetAttribute(charrange, "Text", textvertAlignment);
Last edited by photoken on Wed 19 Jul 2017 10:26, edited 1 time in total.
Ken
Yes, I think it can be eeeeeasily done....
Just take everything out on Highway 61.
User avatar
photoken
Mitglied
Posts: 2162
Joined: Sat 28 Sep 2013 01:25

AddIn: No more background process!

Post by photoken »

Thanks for fixing the problem of PL continuing as an unwanted background process when closed if a text layer (created by an AddIn) has been modified. :mrgreen:
Ken
Yes, I think it can be eeeeeasily done....
Just take everything out on Highway 61.
Martin Huber
Entwickler
Entwickler
Posts: 3999
Joined: Tue 19 Nov 2002 15:49

Re: Parameter name for TextVerticalAlignment?

Post by Martin Huber »

photoken wrote: Wed 19 Jul 2017 10:20 Trying to set the text vertical alignment, but I don't know which string to use for the object:

Code: Select all

	PhotoLine.Dictionary textvertAlignment = new PhotoLine.Dictionary();
	textvertAlignment.Add("Alignment", PhotoLine.TextVerticalAlignment.TVACenter);

Vertical alignment isn't a text attribute, but an IPLText property, so

text.VerticalAlignment = PhotoLine.TextVerticalAlignment.TVACenter

should work.

Martin
User avatar
photoken
Mitglied
Posts: 2162
Joined: Sat 28 Sep 2013 01:25

Re: Parameter name for TextVerticalAlignment?

Post by photoken »

Martin Huber wrote: Wed 19 Jul 2017 10:32 text.VerticalAlignment = PhotoLine.TextVerticalAlignment.TVACenter
Aha!

I had to set that vertical alignment:

Code: Select all

	// Set the vertical alignment of the text layer's content.
	targetlayer.VerticalAlignment = PhotoLine.TextVerticalAlignment.TVACenter;

as the last step in my CreateTextLayer method -- after the new text layer has been created (with all its paragraph, font, and colour attributes).
Ken
Yes, I think it can be eeeeeasily done....
Just take everything out on Highway 61.
User avatar
photoken
Mitglied
Posts: 2162
Joined: Sat 28 Sep 2013 01:25

Open as Placeholder works!

Post by photoken »

The problem with File...Open as Placeholder has been fixed.

Thanks! :)
Ken
Yes, I think it can be eeeeeasily done....
Just take everything out on Highway 61.
User avatar
photoken
Mitglied
Posts: 2162
Joined: Sat 28 Sep 2013 01:25

Prob: Script sub-menu in reverse alphabetical order

Post by photoken »

Win10 1607 x64
PL 20.40b12

The "Script" sub-menu displays the contents of the Automation directory sorted in a (almost) reverse alphabetical order:
script order.png
You do not have the required permissions to view the files attached to this post.
Ken
Yes, I think it can be eeeeeasily done....
Just take everything out on Highway 61.
User avatar
photoken
Mitglied
Posts: 2162
Joined: Sat 28 Sep 2013 01:25

Fixed: DLL and EXE do not run from Script sub-menu

Post by photoken »

Win10 1607 x64
PL 20.40b12 x64
  1. Choosing the "PhotoLineScriptC" item from the Script sub-menu does nothing. Running the PhotoLineScriptC.exe file from Windows Explorer launches the AddIn as expected.
  2. Choosing the "Export Web" item from the Script sub-menu crashes PL.
As a side note, what is the intended use of creating a DLL?
Last edited by photoken on Wed 09 Aug 2017 01:57, edited 1 time in total.
Ken
Yes, I think it can be eeeeeasily done....
Just take everything out on Highway 61.
User avatar
Gerhard Huber
Entwickler
Entwickler
Posts: 4028
Joined: Mon 18 Nov 2002 15:30
Location: Bad Gögging

Re: Prob: DLL and EXE do not run from Script sub-menu

Post by Gerhard Huber »

photoken wrote: Thu 20 Jul 2017 09:24 Choosing the "PhotoLineScriptC" item from the Script sub-menu does nothing. Running the PhotoLineScriptC.exe file from Windows Explorer launches the AddIn as expected.
exe scripts are not started at the moment. I will change this.
photoken wrote:Choosing the "Export Web" item from the Script sub-menu crashes PL.
I will check this. This will be a problem of the script. Did you test it with a flat image?
photoken wrote:As a side note, what is the intended use of creating a DLL?
exe and dll scripts are much faster then vbs or js scripts.
But the handling between an "extern" script (for example started from desktop scripts or exe scripts) is very slow (don't know why, it's Windows). The handling of vbs, js and dll scripts that are started from inside PhotoLine is fast.
So the best way to create scripts is to use dll scripts (if it is time critical).
User avatar
photoken
Mitglied
Posts: 2162
Joined: Sat 28 Sep 2013 01:25

Req: "Automation" main menu item and external directories

Post by photoken »

We've already come to the point where the amount of scripts and AddIns is becoming unwieldy.

I think it would be a good idea to have an "Automation" main menu item.

Since scripts and compiled AddIns will usually be quite different because AddIns will have a GUI for user input, I would like to see these as two categories under that "Automation" menu item. In fact, the File...Functions...Batch Converting menu item can logically be moved under that "Automation" menu item:
Automation...Batch Converting
Automation...AddIns
Automation...Scripts

In addition, it would make a lot of sense to provide a new page under the "Extended" item in the PL Options to allow specifying an external directory for scripts and another external directory for AddIns. These external directories should automatically have search in subfolders enabled. This is especially important for AddIns, because they will usually have supporting resource files and sub-directories
AddIn directory structure.png
whose names will be the same for each AddIn, so it's important to keep things organized.
You do not have the required permissions to view the files attached to this post.
Ken
Yes, I think it can be eeeeeasily done....
Just take everything out on Highway 61.
User avatar
photoken
Mitglied
Posts: 2162
Joined: Sat 28 Sep 2013 01:25

Re: Prob: DLL and EXE do not run from Script sub-menu

Post by photoken »

Gerhard Huber wrote: Thu 20 Jul 2017 09:39
photoken wrote: Thu 20 Jul 2017 09:24 Choosing the "PhotoLineScriptC" item from the Script sub-menu does nothing. Running the PhotoLineScriptC.exe file from Windows Explorer launches the AddIn as expected.
exe scripts are not started at the moment. I will change this.
If they are started from an Automation...AddIn sub-menu, will the AddIns run as a child process of the main PL program? In other words would closing PL then automatically close the AddIn (and its window)?
Gerhard Huber wrote: Thu 20 Jul 2017 09:39
photoken wrote:Choosing the "Export Web" item from the Script sub-menu crashes PL.
I will check this. This will be a problem of the script. Did you test it with a flat image?
Yes, it is a 600px by 900px JPG image.
Gerhard Huber wrote: Thu 20 Jul 2017 09:39
photoken wrote:As a side note, what is the intended use of creating a DLL?
exe and dll scripts are much faster then vbs or js scripts.
But the handling between an "extern" script (for example started from desktop scripts or exe scripts) is very slow (don't know why, it's Windows).
I'm not sure I understand what you mean. For example, I've added my HelloWorld.exe AddIn to the External Programs menu, and it seems fast....
Gerhard Huber wrote: Thu 20 Jul 2017 09:39 The handling of vbs, js and dll scripts that are started from inside PhotoLine is fast.
So the best way to create scripts is to use dll scripts (if it is time critical).
Since I don't know VBS (and thoroughly hate its syntax :evil: ), I am in heaven knowing that I can create interactive AddIns using C#, and also create "scripts" that do not need user input using C#. :D
Ken
Yes, I think it can be eeeeeasily done....
Just take everything out on Highway 61.
User avatar
Gerhard Huber
Entwickler
Entwickler
Posts: 4028
Joined: Mon 18 Nov 2002 15:30
Location: Bad Gögging

Re: Prob: DLL and EXE do not run from Script sub-menu

Post by Gerhard Huber »

photoken wrote:If they are started from an Automation...AddIn sub-menu, will the AddIns run as a child process of the main PL program?
yes
photoken wrote:In other words would closing PL then automatically close the AddIn (and its window)?
no, it will prevent PhotoLine from beeing closed until the script is stopped.
photoken wrote:Yes, it is a 600px by 900px JPG image.
don't get a problem here. Since ExportWeb works with the layer name, what is the layer name of your image (or the filename)?
photoken wrote: I'm not sure I understand what you mean. For example, I've added my HelloWorld.exe AddIn to the External Programs menu, and it seems fast....
only seems so, the script is fast, but the communication with PhotoLine is slow. If you don't communicate very much, that's no problem.
User avatar
photoken
Mitglied
Posts: 2162
Joined: Sat 28 Sep 2013 01:25

Re: Prob: DLL and EXE do not run from Script sub-menu

Post by photoken »

Gerhard Huber wrote: Thu 20 Jul 2017 10:18
photoken wrote:If they are started from an Automation...AddIn sub-menu, will the AddIns run as a child process of the main PL program?
yes
So, will that make it easy for the AddIn to access things such as the PL main editing window, or adjustment layer dialogs, etc.?
Gerhard Huber wrote: Thu 20 Jul 2017 10:18
photoken wrote:In other words would closing PL then automatically close the AddIn (and its window)?
no, it will prevent PhotoLine from beeing closed until the script is stopped.
Should not be a problem if the operative functions of the script (or AddIn) are enclosed in a try...catch...finally block where the "finally" includes the Dispose() method. However, it is probably worth thinking about the unintended consequences if a script blows up....
Gerhard Huber wrote: Thu 20 Jul 2017 10:18
photoken wrote:Yes, it is a 600px by 900px JPG image.
don't get a problem here. Since ExportWeb works with the layer name, what is the layer name of your image (or the filename)?
jpg layer for DLL.png
If I change the name of the file to simply "Jill.jpg", the ExportWeb does not crash, but nothing happens.
Gerhard Huber wrote: Thu 20 Jul 2017 10:18
photoken wrote: I'm not sure I understand what you mean. For example, I've added my HelloWorld.exe AddIn to the External Programs menu, and it seems fast....
only seems so, the script is fast, but the communication with PhotoLine is slow. If you don't communicate very much, that's no problem.
Would starting the AddIn executable from that Automation...AddIn submenu as a child process of PL speed up that communication?
You do not have the required permissions to view the files attached to this post.
Ken
Yes, I think it can be eeeeeasily done....
Just take everything out on Highway 61.