Capture to File Script

Q – I want to capture and save data as HyperACCESS receives it. How can I do this automatically, as soon as HyperACCESS connects?

A – If you haven’t already done so, record a login script using the File menu item, Connect and Record. After saving and assigning the .txt file as Script to run upon connecting, open the file. You can do so in HyperACCESS by clicking the Automation menu, and selecting Edit Program. Add the following lines to your recorded script:

haSetCaptureFileName “C:\Program Files\HAWin32\My Files\CaptFile.txt”
haCaptureBegin 1, 0
haWaitForString “data:> ”
haCaptureControl 5

If you want data captured as soon as you are connected, insert these lines before your login. If you want to begin capturing after you are logged into the host system, insert the lines so they follow your login. For your specific connection, you will need to determine what characters to use as a ‘signal’ to determine when capturing should stop. If, in your situation, there are no consistent characters or prompts that could act as the ‘signal’, call the function haWaitForLull. This API watches for a specified length of time during which no data is received.

For an explanation of the parameters passed by the API functions listed above, please refer to the HyperACCESS API Manual, http://www.hilgraeve.com/manuals/

Hilgraeve