Neue Testversion 20.40b12

Hier diskutieren die Betatester von PhotoLine untereinander und mit den Entwicklern
Benutzeravatar
Gerhard Huber
Entwickler
Entwickler
Beiträge: 4141
Registriert: Mo 18 Nov 2002 15:30
Wohnort: Bad Gögging

Neue Testversion 20.40b12

Beitrag von 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
Updated documentation
(78.84 KiB) 169-mal heruntergeladen
Benutzeravatar
photoken
Mitglied
Beiträge: 2162
Registriert: Sa 28 Sep 2013 01:25

Scripting1 .ODT errors on opening

Beitrag von 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
Beiträge: 3674
Registriert: Do 26 Nov 2009 22:59

Re: Scripting1 .ODT errors on opening

Beitrag von bkh »

photoken hat geschrieben: Mi 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.
Benutzeravatar
photoken
Mitglied
Beiträge: 2162
Registriert: Sa 28 Sep 2013 01:25

Parameter name for TextVerticalAlignment?

Beitrag von photoken »

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

Code: Alles auswählen

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

Code: Alles auswählen

	targetlayer.SetAttribute(charrange, "Text", textvertAlignment);
Zuletzt geändert von photoken am Mi 19 Jul 2017 10:26, insgesamt 1-mal geändert.
Ken
Yes, I think it can be eeeeeasily done....
Just take everything out on Highway 61.
Benutzeravatar
photoken
Mitglied
Beiträge: 2162
Registriert: Sa 28 Sep 2013 01:25

AddIn: No more background process!

Beitrag von 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
Beiträge: 4158
Registriert: Di 19 Nov 2002 15:49

Re: Parameter name for TextVerticalAlignment?

Beitrag von Martin Huber »

photoken hat geschrieben: Mi 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: Alles auswählen

	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
Benutzeravatar
photoken
Mitglied
Beiträge: 2162
Registriert: Sa 28 Sep 2013 01:25

Re: Parameter name for TextVerticalAlignment?

Beitrag von photoken »

Martin Huber hat geschrieben: Mi 19 Jul 2017 10:32 text.VerticalAlignment = PhotoLine.TextVerticalAlignment.TVACenter
Aha!

I had to set that vertical alignment:

Code: Alles auswählen

	// 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.
Benutzeravatar
photoken
Mitglied
Beiträge: 2162
Registriert: Sa 28 Sep 2013 01:25

Open as Placeholder works!

Beitrag von 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.
Benutzeravatar
photoken
Mitglied
Beiträge: 2162
Registriert: Sa 28 Sep 2013 01:25

Prob: Script sub-menu in reverse alphabetical order

Beitrag von 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
script order.png (82.42 KiB) 3755 mal betrachtet
Ken
Yes, I think it can be eeeeeasily done....
Just take everything out on Highway 61.
Benutzeravatar
photoken
Mitglied
Beiträge: 2162
Registriert: Sa 28 Sep 2013 01:25

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

Beitrag von 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?
Zuletzt geändert von photoken am Mi 09 Aug 2017 01:57, insgesamt 1-mal geändert.
Ken
Yes, I think it can be eeeeeasily done....
Just take everything out on Highway 61.
Benutzeravatar
Gerhard Huber
Entwickler
Entwickler
Beiträge: 4141
Registriert: Mo 18 Nov 2002 15:30
Wohnort: Bad Gögging

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

Beitrag von Gerhard Huber »

photoken hat geschrieben: Do 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 hat geschrieben: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 hat geschrieben: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).
Benutzeravatar
photoken
Mitglied
Beiträge: 2162
Registriert: Sa 28 Sep 2013 01:25

Req: "Automation" main menu item and external directories

Beitrag von 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
AddIn directory structure.png (18.05 KiB) 3750 mal betrachtet
whose names will be the same for each AddIn, so it's important to keep things organized.
Ken
Yes, I think it can be eeeeeasily done....
Just take everything out on Highway 61.
Benutzeravatar
photoken
Mitglied
Beiträge: 2162
Registriert: Sa 28 Sep 2013 01:25

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

Beitrag von photoken »

Gerhard Huber hat geschrieben: Do 20 Jul 2017 09:39
photoken hat geschrieben: Do 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 hat geschrieben: Do 20 Jul 2017 09:39
photoken hat geschrieben: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 hat geschrieben: Do 20 Jul 2017 09:39
photoken hat geschrieben: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 hat geschrieben: Do 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.
Benutzeravatar
Gerhard Huber
Entwickler
Entwickler
Beiträge: 4141
Registriert: Mo 18 Nov 2002 15:30
Wohnort: Bad Gögging

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

Beitrag von Gerhard Huber »

photoken hat geschrieben: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 hat geschrieben: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 hat geschrieben: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 hat geschrieben: 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.
Benutzeravatar
photoken
Mitglied
Beiträge: 2162
Registriert: Sa 28 Sep 2013 01:25

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

Beitrag von photoken »

Gerhard Huber hat geschrieben: Do 20 Jul 2017 10:18
photoken hat geschrieben: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 hat geschrieben: Do 20 Jul 2017 10:18
photoken hat geschrieben: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 hat geschrieben: Do 20 Jul 2017 10:18
photoken hat geschrieben: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
jpg layer for DLL.png (23.08 KiB) 3742 mal betrachtet
If I change the name of the file to simply "Jill.jpg", the ExportWeb does not crash, but nothing happens.
Gerhard Huber hat geschrieben: Do 20 Jul 2017 10:18
photoken hat geschrieben: 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?
Ken
Yes, I think it can be eeeeeasily done....
Just take everything out on Highway 61.
Antworten