AutoHotkey Community

It is currently May 26th, 2012, 9:39 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: September 18th, 2009, 1:47 pm 
Offline

Joined: December 18th, 2007, 1:47 pm
Posts: 11
Trying to make a small script that waits for a specified text string before sending the next command.

sleep(); is not going to be reliable for this application. I need to make sure the system is ready for the next command before moving on.

Connection is via the dos window telnet or PuTTy.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 18th, 2009, 10:41 pm 
Unfortuantely Telnet & Putty are not driven by the OS' cmd interpreter (that standard "DOS window"). Both are standard applications (fell free to correct me if I'm wrong).
You can have a try to enable an existing "create log file"-option and read its output in parallel.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: September 18th, 2009, 11:04 pm 
Offline
User avatar

Joined: March 19th, 2008, 12:43 am
Posts: 5480
Location: the tunnel(?=light)
You could take a screen shot of the telnet window when the text you want appears, save it as a .bmp image and use the ImageSearch command in a loop to check the telnet window until it matches the image then proceed.

_________________
Image
Try Quick Search for Autohotkey or see the tutorial for newbies.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 19th, 2009, 3:23 pm 
are you looking for an un-manned script to run on it's own or will somebody be running this script?

i have these type of script jobs (putty and netterm) which are interactive that i use msgbox to get around - but the users are there to click ok. As you said sleep will not work cause sometimes the system is very slow.

MsgBox, , Submit Job, Has the job been submitted? Click OK to continue...


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: September 21st, 2009, 7:19 pm 
Offline

Joined: December 18th, 2007, 1:47 pm
Posts: 11
Yeah, this will be an unmanned script.

I ended up using a very old terminal program (procomm) which supports scripting for the job..

As much as I love AHK, it's just trying to reinvent the wheel to use it for my application. :)


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: BrandonHotkey, Google [Bot], JSLover, patgenn123, rbrtryn, virpara and 61 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