amcasperforu Posted August 16, 2008 Share Posted August 16, 2008 Hi guys, I'm wondering if I can use autoit and have a script to automate the answers for my batch file? I have this batch file that minitors some of the events and I have to press key but of course it depends on when a particular service its checking is done... So I cant say the correct timing when its done here;s an example checking service1 .............................. ............................. ............................ <press Enter key for the next service to check> {This requires user intervention cant identify the timing when this one will appear} checking service2 ........................... .......................... .......................... .......................... ......................... <press Enter key for the next service to check> {This requires user intervention cant identify the timing when this one will appear} on so on.... Is there a way I can use a condition that check if the statement inside the command prompt says "press Enter key for the next service to check" ? Like if myvariable = "to this statement" then Send("{Enter}") ????? Please help. Thanks, Casper Link to comment Share on other sites More sharing options...
amcasperforu Posted August 18, 2008 Author Share Posted August 18, 2008 Hi guys,I'm wondering if I can use autoit and have a script to automate the answers for my batch file? I have this batch file that minitors some of the events and I have to press key but of course it depends on when a particular service its checking is done... So I cant say the correct timing when its done here;s an examplechecking service1.......................................................................................<press Enter key for the next service to check> {This requires user intervention cant identify the timing when this one will appear}checking service2..................................................................................................................................<press Enter key for the next service to check> {This requires user intervention cant identify the timing when this one will appear}on so on....Is there a way I can use a condition that check if the statement inside the command prompt says "press Enter key for the next service to check" ? Like if myvariable = "to this statement" then Send("{Enter}")?????Please help.Thanks,CasperPlease help... Link to comment Share on other sites More sharing options...
dbzfanatic Posted August 18, 2008 Share Posted August 18, 2008 Try using StdoutRead(). Run the batch file as a child process and since you made it check for <press Enter key for the next service to check> {This requires user intervention cant identify the timing when this one will appear} and when it's up send enter. Here's a bit of an example (not full) If StdoutRead($PID,True) = "<press Enter key for the next service to check> {This requires user intervention cant identify the timing when this one will appear}" Then Send("{ENTER}") EndIf and add that to your while loop. Hope this helps Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote] Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now