kann mir jemand mit der Übersetzung des folgenden VBS Programms nach Lazarus helfen?
Das Programm setzt ein DocumentURI, einen ExitLevel und einen OutputFilePath.
Danach wird Execute aufgerufen und anschließend der ErrorCode untersucht.
An sich alles nichts Weltbewegendes.
Ich hab nur keine Ahnung wie ich VisualBasics CreateObject() nach Freepascal übersetzen soll und welchen Typ obj haben soll.
Kann mir da jemand helfen?
Code: Alles auswählen
'
' XSL Formatter COM Interface sample program
'
' The following indicates the standard sample for formatting XSL-FO
' document and outputting to PDF.
'
' Copyright 2004 Antenna House, Inc.
'
Dim obj
Set obj = CreateObject("XfoComCtl.XfoObj")
obj.DocumentURI = "c:\temp\sample.fo"
obj.ExitLevel = 4
obj.OutputFilePath = "c:\temp\sample1.pdf"
obj.Execute
If obj.ErrorCode <> 0 Then
MsgBox "Formatting Error ----" & Chr(13) & "level = " & obj.ErrorLevel & Chr(13) &_
"code = " & obj.ErrorCode & Chr(13) & "message = " & obj.ErrorMessage
Else
MsgBox "Formatting finished: " & obj.OutputFilePath & " created"
End If
Set obj = Nothing