Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Automate PCAnywhere
Message
From
08/09/2003 20:52:49
 
 
To
28/02/2002 17:00:08
General information
Forum:
Visual FoxPro
Category:
Third party products
Miscellaneous
Thread ID:
00578881
Message ID:
00827350
Views:
22
Hi Tracy
I am trying your approach but get an erro:
lcStoreAW=[ C:\Documents and Settings\All Users\Application Data\Symantec\pcAnywhere\Store]+TRANSFORM(tiBusLocID)+[_ToHQ.CHF"]

o = CREATEOBJECT("AWREM32.APPLICATION")
o.awConnect(lcStoreAW)
llResult = o.FileXferToHost( tcDestination,tcSource)
o = NULL
This get run on the remote and the receiving computer (host) has PCAW running in host mode

this line:
llResult = o.FileXferToHost( tcDestination,tcSource)

gives an ole error code 0x80029c4a error loading type library..


Can you help?


Peter



>Nadya, what happens when you run the code below (after changing it to valid files of course and a valid connection)?
>
>*PcAnywhere help file is pcaole.pdf
>LOCAL oPcApp, lcSource, lcDestination, lcCommand
>
>oPcApp = CREATEOBJECT("AWREM32.APPLICATION")
>
>oPcApp.awConnect("C:\Documents and Settings\All Users.WINNT\Application Data\Symantec\pcAnywhere\myconnection.chf")
>
>*Transfer From Host
>lcSource = "C:\testfile.txt"
>lcDestination = "C:\temp\testfile.txt"
>
>llResult = oPcApp.FileXferFromHost(lcSource, lcDestination)
>
>IF llResult
>	MESSAGEBOX("Transfer from host successful",0)
>ELSE
>	MESSAGEBOX("Transfer from host NOT successful",0)
>ENDIF
>
>*Transfer to Host
>lcSource = "C:\temp\testfile.txt"
>lcDestination = "C:\testfile.txt"
>
>llResult = oPcApp.FileXferToHost(lcDestination, lcSource)
>
>IF llResult
>	MESSAGEBOX("Transfer to host successful",0)
>ELSE
>	MESSAGEBOX("Transfer to host NOT successful",0)
>ENDIF
>
>*Execute Program on remote computer
>lcCommand = "C:\winnt\notepad.exe"
>llResult = oPcApp.ExecuteHostFile(lcCommand)
>
>IF llResult
>	MESSAGEBOX("Remote Program execution successful",0)
>ELSE
>	MESSAGEBOX("Remote Program execution NOT successful",0)
>ENDIF
>
>
>Tracy
>
>>Hi Tracy,
>>
>>It's not urgent for me, I've just got a Data Entry application, which is written by my colleague. I need to add all File Maintenance stuff (Archiving, Putting on disketts, etc.; I was thinking, it would be good to invoke PCAnywhere directly from this application). I'm currently just getting customized with this application...
>>
>>>I have version 8 too, not 9 so it should work. I believe I wrote it while we were using version 8, and if so, it should work as is for an example. Let me see if I can find it tonight. I'll pop on the UT if I can. If it's not with my general location of stuff and I have to 'dig' for it, then it'll be this weekend.
>>>take care,
>>>Tracy
>>>
>>>>Hi Tracy,
>>>>
>>>>If you can find this code and send it to me, it would be a great help. I've checked version on my machine, it's 8. It gave me an error on this command, which I found in another thread:
>>>>
>>>>
oPCA = createobject("AWREM32.application")
>>>>
>>>>"Class not found"
>>>>
>>>>Which PCAnywhere version you're running?
>>>>
>>>>Thanks again in advance.
>>>>
>>>>
>>>>
>>>>>Yes Nadya, You can invoke pcanwhere and run a script where you can define whatever you want including the upload and download directories. I had actually done that a couple of years ago with an older version for transferring of inventory levels before we starting using ftp. I had scripts for full automation as well as user prompts. I called it from VFP, but I do NOT remember how I did it now! (It figures! It was one of those 'do it once then forget about it' tasks I was assigned). Since we never had any problems, I never had to look at the code again. I'll see if I can find my code somewhere this weekend...
>>>>>Tracy
>>>>>
>>>>>>>> Do you have any technical reference to automate PCAnywhere?
>>>>>>>
>>>>>>>I'm not sure it supports automation, but it does have it's own scripting language, if that helps.
>>>>>>>
>>>>>>>Alex
>>>>>>
>>>>>>Alex,
>>>>>>
>>>>>>Is it possible to invoke it from VFP application with predefined folders on Host and Sender machines?
Peter Cortiel
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform