Hi there,
I am using EHLLAPI to connect to a mainframe emulator. I can connect to the session and do some major commands (e.g. connect, disconnect, get cursor, set cursor, sendkey, copy ps to string, etc.). The emulator is Rumba version 5.2. What I can't get my Windows app to do is to chain a bunch of commands together. For example: I want to loop where I use Sendkey, then SetCursor, the Sendkey, SetCursor, Copy PS to String, etc.). I can't get the chain of commands to work, only the first two or so work and then nothing. Thanks in advance.
Loading
Dennis DurhamPosted Jun 5, 2011, 8:34 AM
Sam HobbsPosted Jun 3, 2011, 8:29 PM
Dennis DurhamPosted Jun 3, 2011, 8:57 AM
Sam HobbsPosted Oct 20, 2010, 5:19 PM
Sam HobbsPosted Oct 20, 2010, 4:57 PM
Hopefully that is all you need to do. The thing I don't know is if the amount of time to wait will be consistent; if you don't wait enough time, it won't work and if you use a wait period long enough to work for most or all situations, then you might be waiting longer than needed for most times. I don't know; that is for you to determine.
BrianPosted Oct 20, 2010, 11:38 AM
System.Threading.Thread.Sleep(500);
I put this at the top of my SendKey method. Resolved. Thanks.
Sam HobbsPosted Oct 19, 2010, 10:42 PM
I don't know what Wait function you are looking at. My guess is that you will need to process the Rumba window to determine when something has completed. There might not be a simple solution.
BrianPosted Oct 19, 2010, 10:23 PM
I used this example almost verbatim: http://www.codeproject.com/KB/cs/all_ehllapi.aspx
The only difference is the .dll that Rumba uses. In that sample code there are a few major functions. I am able to use them successfully. But here is what I want to do when I say "chain commands": When a user clicks on one of the buttons on my Windows form I want to call several commands in a row in that click event. For example, I want to do the following: Set the cursor, send in a string, set the cursor, send in another string, etc.
I figured out using some other sample code that the emulator is "busy" when I'm trying to perform functions back-to-back. I don't know if the Wait function is my answer or not. I am still looking into that.
I'm not going to be able to purchase third party software for this solution - the budget doesn't allow for it.
If anyone has seen this kind of thing and has any pointers then I'd be happy to hear them. Thanks.
Sam HobbsPosted Oct 19, 2010, 4:56 PM