| View previous topic :: View next topic |
| Author |
Message |
Athan
Joined: 21 Oct 2005 Posts: 2
|
Posted: Fri Oct 21, 2005 2:08 pm Post subject: How to search for text on a terminal window (3270)? |
|
|
I've searched the forums and looked through the help file but can't seem to find exactly what I want.
What command or script should I look into for finding a text string in a terminal window? I'm trying to automate data entry from a file to my terminal window and I need my script to be able to search for a small phrase on some screens during the entry process.
For example, I have it input an account number and some other information then hit ENTER when the page updates I need it to check for a phrase which I use to decide if it should continue with the current account or move on to the next account in the array.
Thanks for any help! |
|
| Back to top |
|
 |
BoBo Guest
|
Posted: Fri Oct 21, 2005 3:13 pm Post subject: |
|
|
| Check out psexec from [ www.sysinternals.com ] to trigger a remote box directly. |
|
| Back to top |
|
 |
Athan
Joined: 21 Oct 2005 Posts: 2
|
Posted: Fri Oct 21, 2005 6:24 pm Post subject: |
|
|
Hmm either I didn't explain clearly enough or I'm missing the use of the script you pointed to.
PSEXEC appears to issue command line functions to remote terminals. I don't need to control a remote terminal. All I need is to be able to recognize when a predefined string has appeared on the terminal window at my location to call my attention to it.
I'm looking for a find command like ImageSearch or PixelSearch but I need to find a text string instead. |
|
| Back to top |
|
 |
Laszlo
Joined: 14 Feb 2005 Posts: 4016 Location: Pittsburgh
|
Posted: Fri Oct 21, 2005 6:48 pm Post subject: |
|
|
In Console windows replaying manual keystrokes works. Try | Code: | | !c::Send !{Space}ek{Down 3}{Right 26}+{Right 11}{Enter} | It assumes you know the position of the string on screen (where you navigate with the down and right arrow keys), which is copied to the ClipBoard. You could process the clipboard in your script. If you don't know the position, you can get the text from the whole window with | Code: | | !c::Send !{Space}ek+{PgDn}+{Right 80}{Enter} | (assuming an 80 char wide window). Then you can search for the string in the text in the clipboard. |
|
| Back to top |
|
 |
Nemroth
Joined: 07 Sep 2004 Posts: 262 Location: France
|
Posted: Fri Oct 21, 2005 8:21 pm Post subject: |
|
|
I made automation process under Attachmate Extra!, witch is a 3270 emulator under Window. The only way I found to see if a string is on screen is to copy all the screen and copy it to clipboard, and then to exam the clipboard's content.
So CTRL+A then CTRL+C and exam the clipboard content.
Lazlo solution is OK too, if the cursor can be put at the same place by pressing a key and then you make the cursor move with the arrow keys, and with Shift to select a part of the screen. |
|
| Back to top |
|
 |
BoBo Guest
|
Posted: Fri Oct 21, 2005 9:39 pm Post subject: |
|
|
AFAIK the word ImageSearch is a string displayed as part of an image - your screen content.
So from my point of view you've to keep a specific area of the screen ("the string") as a pattern to be used with AHK's ImageSearch command.
Nonsense ? |
|
| Back to top |
|
 |
Guest
|
Posted: Thu Dec 22, 2005 12:19 am Post subject: |
|
|
| If you are using attachmate, u should be using the internal script processor to develop your scripts instead of AHK. The internal script processor support DDE process and it can interpret any message showing up in the terminal window. |
|
| Back to top |
|
 |
|