Neue Testversion 21.40b5

Hier diskutieren die Betatester von PhotoLine untereinander und mit den Entwicklern
Benutzeravatar
russellcottrell
Mitglied
Beiträge: 251
Registriert: Sa 26 Jul 2014 10:13
Wohnort: California

Re: Neue Testversion 21.40b5

Beitrag von russellcottrell »

Do you want to create a document in picture mode with a give size?
If so, the following script does this:
That’s it, thank you.
It would be nice if the new image had the default color profile. As it is, there is none. I added an action to set one. A small issue, the ShowDialog option does not work with it; I had to check the show dialog box on the action, then save the entire action (it did not work just saving the step either).

Code: Alles auswählen

doc.DoOperation "Action", "Data", base64Str, "ShowDialog", True
PhilM
Mitglied
Beiträge: 171
Registriert: Do 28 Mai 2015 18:00
Wohnort: Belgium

Re: Neue Testversion 21.40b5

Beitrag von PhilM »

I have done some tuning in the sub of the script by Russell Cottrell :
ListAllLayers.vbs
So that the text file begins with the Document path.
And in such a way that the layers are enumerated in the same order as the Layers Panel

Code: Alles auswählen

Dim pl, doc
Dim txt, path, textFile, fso, f

Set pl = CreateObject("PhotoLine.Application")
Set doc = pl.ActiveDocument
pl.Visible = True

txt = ""

listLayers doc.RootLayer, 0

'path = Mid(doc.Path, 1, InStrRev(doc.Path, "\")) 'Code original
'textFile = path & "layers.txt"
path = Left(doc.Path, Len(doc.Path) - 4)	  'Mon code
textFile = path & "_layers.txt"
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile(textFile, 2, True)
f.Write txt
f.Close

MsgBox textFile & " created."



Sub listLayers(layer, n)

  Dim item, itemName, itemType, itemVisible

  itemName = layer.Name
  If itemName = "" Then itemName = "[Name]"

  itemType = layer.Type
  Select Case itemType
    Case 1
      itemType = "Image"
    Case 2
      itemType = "Vector"
    Case 4
      itemType = "Text"
    Case 8
      itemType = "Group"
    Case 16
      itemType = "Virtual Copy"
    Case 32
      itemType = "Placeholder"
  End Select

  itemVisible = "Visible"
  If Not layer.Visible Then itemVisible = "Hidden"

  For Each item In layer
    listLayers item, n+1
  Next

  If n = 0 Then
    txt = doc.Path & VbCrLf & VbCrLf & txt
    Else
    txt = String(n*5, " ") & itemName & ", " & itemType & ", " & itemVisible & VbCrLf & txt
  End If

'  txt = txt & String(n*5, " ") & itemName & ", " & itemType & ", " & itemVisible & VbCrLf
'  For Each item In layer
'    listLayers item, n+1
'  Next

End Sub
Thanks to Russell for the original script.

Regards

Philippe
Benutzeravatar
russellcottrell
Mitglied
Beiträge: 251
Registriert: Sa 26 Jul 2014 10:13
Wohnort: California

Re: Neue Testversion 21.40b5

Beitrag von russellcottrell »

Hello; I have found some odd behavior when adding or deleting script files. When copying certain files (caller.vbs is one), or deleting an existing copy, then restarting PhotoLine, none of the scripts load. It seems to be caused by the PhotoLine.xml file in the PhotoLineSettings folder. Deleting all the Entry tags inside the Automation tag forces them all to be rewritten, and then the scripts load again. It seems to be caused by the name of the script file itself; after copying caller.vbs, caller - Copy.vbs prevents the scripts from loading. Renaming it to something like foo - Copy.vbs allows them to load again.

I am now using Windows 10 on a laptop as I have been displaced by the Camp Fire in northern California. Unfortunately I am unable at the moment to go back and try this on the Windows 7 computer that I was previously using.
Martin Huber
Entwickler
Entwickler
Beiträge: 4176
Registriert: Di 19 Nov 2002 15:49

Re: Neue Testversion 21.40b5

Beitrag von Martin Huber »

russellcottrell hat geschrieben: So 11 Nov 2018 10:31 Hello; I have found some odd behavior when adding or deleting script files. When copying certain files (caller.vbs is one), or deleting an existing copy, then restarting PhotoLine, none of the scripts load.
The scripts are probably there, but at the wrong location (at least here on my computer). There is an additional "Scripts" submenu at the top of the "Filter" menu containing the scripts.

I will check that.

Martin
Paul
Mitglied
Beiträge: 235
Registriert: Fr 19 Dez 2008 11:36

Re: Neue Testversion 21.40b5

Beitrag von Paul »

Hi,
I'm experiencing frequent crashes with the Export-function in this beta. PL does save the PDF or JPG, but right after that PL quits. Not always, unfortunately. Usually after a few minutes of work. I haven't figured out if there are things I do just before the crashes.
MacOS 10.14.1

- Paul
Martin Huber
Entwickler
Entwickler
Beiträge: 4176
Registriert: Di 19 Nov 2002 15:49

Re: Neue Testversion 21.40b5

Beitrag von Martin Huber »

Paul hat geschrieben: Mo 19 Nov 2018 10:42I'm experiencing frequent crashes with the Export-function in this beta. PL does save the PDF or JPG, but right after that PL quits. Not always, unfortunately. Usually after a few minutes of work. I haven't figured out if there are things I do just before the crashes.
MacOS 10.14.1
You are on macOS, so you should have a crash log in ~/Library/Logs/DiagnosticReports. Can you send use one them?

Martin
Benutzeravatar
Martin Stricker
Mitglied
Beiträge: 874
Registriert: Di 14 Okt 2003 08:19
Wohnort: BW

Absturz bei Verzerren-Werkzeug

Beitrag von Martin Stricker »

Hallo,
mit dem Verzerren-Werkzeug lässt sich ein Crash provozieren.
1. Ebene anwählen
2. Verzerren-Werkzeug anwählen.
3. Einer der vier Eckpunkte aktivieren.
4. Rückschritttaste drücken unter MacOs oder Entfernen-Taste unter Windows 7
5. Photoline stürzt ab.
Benutzeravatar
russellcottrell
Mitglied
Beiträge: 251
Registriert: Sa 26 Jul 2014 10:13
Wohnort: California

Re: Neue Testversion 21.40b5

Beitrag von russellcottrell »

I have run into an issue with scripting. The scripts I have used on a Windows 7 and a Windows 10 computer do not all work on another Windows 7 computer. Specific lines I have identified are doc.Merge([aLayer, vLayer]); and doc.DoOperation("Action", "Data", hexStr); The first results in “Object doesn’t support this property or method”; the latter crashes PhotoLine. It is the same for .vbs and .js. I did a Windows update and disabled the antivirus to no avail.

Edited: never mind; I had installed 21.01 after installing 21.40b5, to a separate folder, but it apparently undid something; I reinstalled 21.40b5 and it works now.
Martin Huber
Entwickler
Entwickler
Beiträge: 4176
Registriert: Di 19 Nov 2002 15:49

Re: Absturz bei Verzerren-Werkzeug

Beitrag von Martin Huber »

Martin Stricker hat geschrieben: Mo 03 Dez 2018 22:24mit dem Verzerren-Werkzeug lässt sich ein Crash provozieren.
Das wird in der Beta 7 gehen.

Martin
Benutzeravatar
russellcottrell
Mitglied
Beiträge: 251
Registriert: Sa 26 Jul 2014 10:13
Wohnort: California

Re: Neue Testversion 21.40b5

Beitrag von russellcottrell »

I have found some unusual behavior with transparent dynamically-created images. Modifying the script above slightly to make the new document transparent:

Code: Alles auswählen

Dim pl
Dim doc
Dim image

Set pl = CreateObject("PhotoLine.Application")

pl.Visible = True
' Create a new, empty document
Set doc = CreateObject("PhotoLine.Document")
If (Not doc Is Nothing) Then
	' Turn on picture mode
	doc.DocumentMode = False
	' Create an image, RGB (1), size (800;600)
	Set image = CreateObject("PhotoLine.Image")
	'image.InitPicture 1, Array(800, 600)
	image.InitPicture 1+16384, Array(800, 600), Array(0, 0, 0, 0) ' <=== change the above to this
	' Insert the image in the document. The document will adjust its size
	' to the image size.
	doc.RootLayer.Insert image, -1
End If
Then if you create a filled vector layer using Vector Drawing, Circle, etc., right-click the vector layer and select Merge Down, the vector is moved and distorted. It does not happen if you select Flatten Image. The same thing happens if you dynamically create the vector and use doc.Merge([vLayer, aLayer]) as opposed to doc.Merge(). (Which is how I noticed this.)

If you manually create a new image with a transparent color, none of this happens. Is there something missing from the way the dynamic new document was created?
Martin Huber
Entwickler
Entwickler
Beiträge: 4176
Registriert: Di 19 Nov 2002 15:49

Re: Neue Testversion 21.40b5

Beitrag von Martin Huber »

russellcottrell hat geschrieben: Fr 07 Dez 2018 03:35If you manually create a new image with a transparent color, none of this happens. Is there something missing from the way the dynamic new document was created?
No, that is an error. I will fix it.

Martin
draskold
Mitglied
Beiträge: 1
Registriert: Do 27 Jul 2017 18:57
Wohnort: Ukraine

Re: Neue Testversion 21.40b5

Beitrag von draskold »

note:
it's the last beta version that starts (& works) w/o an error in windows xp embedded
Benutzeravatar
Gerhard Huber
Entwickler
Entwickler
Beiträge: 4144
Registriert: Mo 18 Nov 2002 15:30
Wohnort: Bad Gögging

Re: Neue Testversion 21.40b5

Beitrag von Gerhard Huber »

that's it, we will stopp the Windows XP support.