AutoHotkey Community

It is currently May 27th, 2012, 5:17 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: October 21st, 2005, 2:08 pm 
Offline

Joined: October 21st, 2005, 1:42 pm
Posts: 2
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!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 21st, 2005, 3:13 pm 
Check out psexec from [ www.sysinternals.com ] to trigger a remote box directly.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: October 21st, 2005, 6:24 pm 
Offline

Joined: October 21st, 2005, 1:42 pm
Posts: 2
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 21st, 2005, 6:48 pm 
Offline

Joined: February 14th, 2005, 4:05 pm
Posts: 4710
Location: Boulder, CO
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 21st, 2005, 8:21 pm 
Offline

Joined: September 7th, 2004, 9:20 pm
Posts: 275
Location: France
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 21st, 2005, 9:39 pm 
Quote:
ImageSearch
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 ?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: December 22nd, 2005, 12:19 am 
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.


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: XstatyK, Yahoo [Bot] and 75 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group