Dear All
I have made an update to P4COM - COM Interface to Perforce C++ API on
Windows, to allow it to be used from VBScript.
Since VBScript can't access COM functions using String Arrays, I have added
similar calls which take Variant Arrays.
This will allow people to write things like triggers in VBScript.
See:
http://public.perforce.com/guest/robert_cowham/perforce/API/p4com/main/index
.html for more details.
An example script shown below.
Enjoy!
Robert
------------------
Test.vbs:
---------------
Option Explicit
Dim p4, arr, str, info, errs, warns
Set p4 = WScript.CreateObject("P4COM.p4")
p4.port = "1666"
p4.client = "bruno_ws"
p4.ExceptionLevel = 0
p4.connect
DisplayResult("info")
DisplayResult("describe 704")
p4.disconnect
p4.Tagged
p4.connect
DisplayResult("describe 704")
sub DisplayResult(cmd)
WScript.Echo("Cmd: " & cmd)
info = p4.run_variant(cmd)
WScript.Echo("Info: " & join(info, chr(13) & chr(10)))
warns = p4.Warnings_variant
if (UBound(warns) >= 0) then
WScript.Echo("Warnings: " & join(warns, chr(13) & chr(10)))
end if
errs = p4.Errors_variant
if (UBound(errs) >= 0) then
WScript.Echo("Errors: " & join(errs, chr(13) & chr(10)))
end if
end sub
_______________________________________________
perforce-user mailing list - perforce-user@xxxxxxxxxxxx
http://maillist.perforce.com/mailman/listinfo/perforce-user
|
Try Searching:
servers, voip, java, networking, microsoft ...
|
|
|
|