...
If Not doc Is Nothing Then
docPath = doc.Path
If (Len(docPath) > 0) Then
Dim PathLen
PathLen = Len(docPath)
docPath = Left(doc.Path, PathLen-4) & "_rw.jpg" 'Remplace ".jpg" with "_rw.jpg"
MsgBox docPath , VBOKOnly , "New Path"
doc.Export(docPath)
End If
End If
Now, Export() does not save the copy, and it closes the PLD documents.
I attempted to replace with doc.SaveAs() : it does create a new untitled JPG document.
PhilM wrote: ↑Mon 09 Oct 2023 12:46
Now, Export() does not save the copy, and it closes the PLD documents.
Strange. I can only test on Windows 11, but it works fine here (also with PhotoLine 24).
It exports the file and doesn't close the document. It doesn't matter whether I execute the script with a simple image or a complex document.
I first started PhotoLine and then opened my document. After that I started the script from Notepad++ and directly from Explorer. Both ways worked fine.
I think it has to do with V24.00 and V24.40b4 both installed on my machine.
If I open a file in V24.40b4 and go from the "Filter/Scripts" menu, everything works as expected.
If I launch the script from the windows explorer, it opens an empty V24.00
I noticed in the Windows Parameters/Applications that only Photoline V24.40 Beta was listed.
So, I reinstalled V24.00.
Now, only V24.00 is listed. V24.40 is not there anymore ...
And my script now works as expected in V24.00 and fails in V24.40 ...
If I remember correctly, both versions used to be listed in Windows Applications ?
Only one PhotoLine version can be registered for scripting, usually the last one you installed.
If you have installed several PhotoLine versions and you want to use another version for scripting, you can activate it by executing this version from command line with