Let me try to explain what your recorded code does.
.WaitForEvent rcEnterPos, "30", "0", 1, 1 Make the client wait a maximum of 30 seconds for the cursor to reach row 1, column 1 .TransmitTerminalKey rcIBMPf9Key Transmit the F9 button to the client .WaitForEvent rcKbdEnabled, "30", "0", 1, 1 Wait max 30 seconds, for the keyboard to be enabled to the user again. It locks the keyboard while it "thinks" .WaitForEvent rcEnterPos, "30", "0", 5, 13 Wait max 30 sec for cursor to enter pos 5, 13 .WaitForDisplayString "==>", "30", 5, 9 Wait max 30 secs for the string "==>" to appear at location 5,9 .TransmitANSI "1" Send the text "1" .TransmitTerminalKey rcIBMEnterKey Transmit the ENTER button .WaitForEvent rcKbdEnabled, "30", "0", 1, 1 Wait max 30 secs for the keyboard to be enabled .WaitForEvent rcEnterPos, "30", "0", 18, 33 Wait max 30 secs for the cursor to enter position 18,33 .WaitForDisplayString "ID:", "30", 18, 29 Wait max 30 secs for the string "ID:" to appear at location 18,29 .TransmitANSI "user id" Send text "user id" to the client .TransmitTerminalKey rcIBMTabKey Send TAB key to the client
A lot of these lines of code can be avoided. As you see in my functions, they have build in waiting.
So what you could cook the above down to is
Does that help you in any way?Code:SendTerminalKey rcIBMPf9Key 'Send F9 key ' You could insert a codeline here to check for the string "==>" if you'd like. I use loads of checks to check for the correct panels TransmitText "1", 5, 13 SendTerminalKey rcIBMEnterKey TransmitText "user id", 18, 33


LinkBack URL
About LinkBacks



Reply With Quote


Bookmarks