I know that the same type of queries are already present in this forum. But I need a specific idea/solution/discussion on this topic.
Whenever we are trying to automate an application which uses Terminal Emulation, the main challenge we face is proper synchronization.
I need to get the Text from an application called "SecureCRT" using "GetWindowTextEx" after and before pressing the "Down Arrow key". What is happening here is script captures the terminal text before actually the "pressing Down key" executes. Pressing a key executes later than the script goes to the next line.
Is there any way to way to do a synchronization here?
(There must be way where we can wait for the acknowledgment from the specific emulator, since the OS always do this kind of synchronization by setting the flags and trapping the signals. Is there any way to check the flag/port condition?)
Emulator Synchronization
Moderators: Dorian (MJT support), JRL
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Instead of trying to automate SecureCRT - which is an SSH client - I would recommend using an SSH ActiveX component like the wodSSH component to script the session directly, and that way have access to all the session text and send data to it directly.
wodSSH:
http://www.weonlydo.com/SSH/ssh-activex-component.asp
wodSSH:
http://www.weonlydo.com/SSH/ssh-activex-component.asp
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
-
- Pro Scripter
- Posts: 63
- Joined: Thu Dec 10, 2009 8:13 am
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Yes, using something like wodSSH you will be able to know when the terminal is ready for data to be sent. The best solution is to script it directly, not try to simulate a user using a terminal emulator.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?