Rt - WeOnlyDo Discussion board

Rt (wodTelnetDLX)

by Dave Langley, Thursday, October 30, 2014, 14:41 (3438 days ago)

Hi

I have a really simple program that sets the prompt property to "<ESC><STX>". Text will follow which is terminated with chr(13). What I want to accomplish is extracting the text that follows the prompt.

So I might have "<ESC><STX>THIS IS A TEST"+charact(13) and wish to extract "THIS IS A TEST" from the string. How do I accomplish this? I tried using "textLine=object.ReceiveLine()" and the activex control crashes my application as if this method cannot be used to return a value.

====================================================
I am using WinDev and these are the lines of code I am using

//global declaractions
AX_Term>>Prompt="<ESC><STX>"

//initialise AX_Term
ActiveXEvent("OnPromptReceived",AX_Term,"PromptReceived")

//OnPromptReceived procedure
PROCEDURE OnPromptReceived()
sTest is string
sTest=AX_Term>>ReceiveLine()//----- crash occurs here
Trace(sTest)

===== here is the windev error, which may help ================
Error at line 3 of Local Procedure OnPromptReceived process.
'ReceiveLine' Automation method called.
Attempt to invoke <ReceiveLine> method or to read <ReceiveLine> property. Error returned by Automation/ActiveX object:
'Erreur 800A755B : None found.'
Attempt to invoke <ReceiveLine> method. Error returned by Automation/ActiveX object:
'Erreur 800A755B : None found.'
Attempt to read <ReceiveLine> property. Error returned by Automation/ActiveX object:
'Erreur 80020003, Le membre demandé n'existe pas'
Attempt to write <ReceiveLine> property. Error returned by Automation/ActiveX object:
'Erreur 80070057, Un ou plusieurs arguments sont invalides'


Complete thread:

 

  • Rt - Dave Langley, 2014-10-30, 14:41 [*]
    • Rt - Jasmine, 2014-10-30, 15:47
      • Rt - Dave Langley, 2014-10-30, 15:52