Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Automate PCAnywhere
Message
De
01/03/2002 08:04:29
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Divers
Thread ID:
00578881
Message ID:
00626900
Vues:
19
Hi Nadya, I looked quickly last night, but could not find my code. I must have backed it up with all of my other old code I seldom reference. I'm not sure if I used OLE Automation though or if I called the remote exe with command lines to run the script from within VFP. I'll have to check this weekend. In the meantime, I did find these notes (version 8 or 9, not sure which) in my folder that may or may not help:
- pcANYWHERE Host objects do not support OLE when they are "Run as a
  service."  Disable this feature when launching Host objects embedded
  within other applications or run from the file manager.

- The OLE service must be installed and activated under Windows NT
  before installing pcANYWHERE32; otherwise, you might receive an
  "OLE Initialization failed" message when running pcANYWHERE32.

*You can use the following command line options from the DOS prompt to 
 start Gateways, Hosts, Remotes, or Online functions:

 <path to pcaw32>\AWHOST32.EXE <path to pcaw32>\data\<file>.bhf
 <path to pcaw32>\AWREM32.EXE  <path to pcaw32>\data\<file>.chf
 <path to pcaw32>\AWGATE32.EXE <path to pcaw32>\data\<file>.gwf
 <path to pcaw32>\AWONL32.EXE  <path to pcaw32>\data\<file>.osf

 You can now use a command line option to have a pcANYWHERE host call 
 a remote.  At the command prompt, type:

 AWHOST32.EXE <file>.BHF /c (for Windows 95)
 AWHOST32.EXE <file>.BHF /d /c (for Windows NT)

NOTE: This command will not work if the host is waiting on two devices


* Scripts may be executed from the command line by using the following
  syntax:

    <path to pcaw32>\AWREM32.EXE <path><scriptname>.scr


* Allow host to specify the remote's phone number from the command
  line when the host is calling the remote.  

Format:

<path to pcaw32>\AWHOST32.EXE <path to pcaw32>\data\<file>.bhf /cN
 
Where: 

 N - is the phone number you wish to dial (Ex. 1234567)
     The phone number can be at most 30 digits.

<file>.bhf - is a host file configured for modem or TAPI. 

Example:

AWHOST32.EXE c:\program files\pcanywhere\data\modem.bhf /c1234567 
Tracy

>>Nadya, what happens when you run the code below (after changing it to valid files of course and a valid connection)?
>
>I got Class definition "AWREM32.APPLICATION" is not found (Error 1733)
>on my machine.
>
>>
>>*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?
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform