![]() |
| The AccuTerm forum has moved. Go to community.rocketsoftware.com to register for the new Rocket forum. |
|
Post Reply
|
| Author | |
dynamic
Senior Member
Joined: June 28 2007 Status: Offline Points: 188 |
Post Options
Thanks(0)
Quote Reply
Topic: Accessing a daemonPosted: December 22 2008 at 7:09am |
|
I'm new at a lot of this stuff and would appreciate some help. Hopefully I can explain what I am trying to accomplish. I have a program running in the background that is listening on a localhost TCP port ( I assign the port number ) that I would like to access from Accuterm. I have tested this prgram with the DOS telnet client and it performs correctly. The command that I need to send it is in three parts. First the command followed by a CR, Then parameter 1, and parameter 2 each follwerd by a CR. If the parameters are correct, it will open a display window.
Note: I tried to telnet into this program with an Accuterm session. It connected, but I could not get it to see the commands I was sending it. There was no echo back and it always gave me an invalid command response. Thanks ahead of time for any help. Andy |
|
![]() |
|
PSchellenbach
Admin Group
Moderator Joined: December 15 2003 Location: United States Status: Offline Points: 2150 |
Post Options
Thanks(0)
Quote Reply
Posted: December 22 2008 at 9:28am |
|
Hi Andy -
AccuTerm's telnet client follows the telnet protocol, which is more complex than simply passing a string to the server and getting a response. By default, the telnet protocol works in "text mode", and does not do local echo - the server needs to echo its input back to the client. You might be able to get a simple socket listener to work by tweaking the advanced telnet options in AccuTerm. First, enable Binary mode, bypass option negotiation, disable the Echo option, and set Duplex to Half. Don't send or return any strings that contain CHR(255). Thanks, Pete |
|
![]() |
|
dynamic
Senior Member
Joined: June 28 2007 Status: Offline Points: 188 |
Post Options
Thanks(0)
Quote Reply
Posted: December 23 2008 at 1:15am |
|
Thanks Pete. That worked great. I can manually access the background program manually through a session. Do you have a way to access it through a program? I would like to create buttons that when clicked will perform tasks in that program. I know I need to open the port and send commands. I may or may not need to get a response. I'm really not sure where to start.
Andy |
|
![]() |
|
PSchellenbach
Admin Group
Moderator Joined: December 15 2003 Location: United States Status: Offline Points: 2150 |
Post Options
Thanks(0)
Quote Reply
Posted: December 23 2008 at 6:45am |
|
Hi Andy -
You can use scripting to manipulate the Session object that is connected to your background server. Are you connected to a host system from another session? If so, you can invoke a script using an escape sequence from the host, and the script can communicate with the background server using the 2nd session. Thanks, Pete |
|
![]() |
|
dynamic
Senior Member
Joined: June 28 2007 Status: Offline Points: 188 |
Post Options
Thanks(0)
Quote Reply
Posted: December 29 2008 at 1:32am |
|
Between this site and others as well as Accuterm help, I have written my first scripts. I check to see if there are two sessions open, if not, I open the hidden session. I then check for a connection to make sure the other program is running. If it isn't, I execute the command to start it up.
Brings up a last question: Can you have a script run when a session is closed? I would like to stop the background program when the Accuterm session is closed. It's not a huge deal, more of a curiosity. Thanks, Andy |
|
![]() |
|
homerlh
Beta Tester
Joined: November 11 2004 Location: United States Status: Offline Points: 288 |
Post Options
Thanks(0)
Quote Reply
Posted: June 05 2009 at 4:11am |
|
Hi Andy,
I have a client that wants AccuTerm to close when the user logs off. I had to modify the "OFF" and "EXIT" verbs of their flavor of pick to first execute an AccuTerm script then chain to the real "OFF" or "EXIT" verb. It worked great. Larry Hazel |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |