An exception occurred when accessing a Com object field. | |
| The cause of this exception was that: AutomationException: 0x800a018a - Property is write-only in 'APWebGrb'. | |
| The Error Occurred in
C:\Inetpub\wwwroot\pdf.cfm: line 23 | |
21 : 22 : //WEBGRABBER PROPERTIES 23 : WG.URL = ""; 24 : WG.TimeOut = strTimeout; 25 : WG.PrinterTimeout = strTimeout; | |
What
exactly does that mean?
I
converted the code form ASP to cfscript, so there might be something wrong
with the syntax, but I dont see it.
<!--- Create the activePDF Server & WebGrabber COM objects
--->
<cfobject type="com" name="WG" class="APWEBGRABBER.Object" action="">
<cfobject type="com" name="APS" class="APSERVER.Object" action="">
<cfobject type="com" name="WG" class="APWEBGRABBER.Object" action="">
<cfobject type="com" name="APS" class="APSERVER.Object" action="">
<cfscript>
//IP of the machine with Full version of WG and SVR
strIP = "168.153.43.6";
//IP of the machine with Full version of WG and SVR
strIP = "168.153.43.6";
//Timeout variable for all timeouts
strTimeout = 300;
strTimeout = 300;
//Location to place created PDF
//NOTE: must be a location the Server has access to place the file
strOutputPath = "c:\temp\";
//NOTE: must be a location the Server has access to place the file
strOutputPath = "c:\temp\";
//URL
to convert
strURL = "http://www.yahoo.com";
strURL = "http://www.yahoo.com";
//--------------------------Variables------------------------------
//WEBGRABBER PROPERTIES
WG.URL = "">WG.TimeOut = strTimeout;
WG.PrinterTimeout = strTimeout;
WG.URL = "">WG.TimeOut = strTimeout;
WG.PrinterTimeout = strTimeout;
//SERVER PROPERTIES USED IN
CONJUNCTION WITH WG
//LoadRemoteProfile tells WG where to send the Server Settings
APS.LoadRemoteProfile = strIP;
APS.OutputDirectory = strOutputPath;
APS.PDFTimeout = strTimeout;
//LoadRemoteProfile tells WG where to send the Server Settings
APS.LoadRemoteProfile = strIP;
APS.OutputDirectory = strOutputPath;
APS.PDFTimeout = strTimeout;
//Send the Settings to the
server
WG.Prt2DiskSettings = APS.ToString();
WG.Prt2DiskSettings = APS.ToString();
//Start the job and wait
r = WG.DoPrint(strIP, 64320);
r = WG.Wait(strIP, 64320, strTimeout, "");
r = WG.DoPrint(strIP, 64320);
r = WG.Wait(strIP, 64320, strTimeout, "");
//Check for Successful
conversion
If (r IS "019")
{
writeOutput("Success, output location: '" & strOutputPath & "'");
}
else
{
writeOutput("Failure: " & r);
}
If (r IS "019")
{
writeOutput("Success, output location: '" & strOutputPath & "'");
}
else
{
writeOutput("Failure: " & r);
}
//Cleanup the memory space used
r = WG.Cleanup(strIP, 64320);
//Set the objects to Nothing
WG = "";
APS = "";
WG = "";
APS = "";
</cfscript>
TIA
Lepraboy
---You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004
