Emulator Synchronization

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
Niroj@Work
Pro Scripter
Posts: 63
Joined: Thu Dec 10, 2009 8:13 am

Emulator Synchronization

Post by Niroj@Work » Mon Jun 28, 2010 2:38 pm

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?)

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Mon Jun 28, 2010 3:11 pm

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
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Niroj@Work
Pro Scripter
Posts: 63
Joined: Thu Dec 10, 2009 8:13 am

Post by Niroj@Work » Tue Jun 29, 2010 4:28 am

OK.. But I need to know whether we can do a synchronization for such kind of terminal or not? Can we check whether the buffer is ready for key stroke or not? Can we sense the acknowledgment of the terminal that the previous action executed or not?

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Tue Jun 29, 2010 8:32 am

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?

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts