[geeks] Windows App to close dialog
Chad McAuley
chizad at gmail.com
Tue May 22 14:47:20 CDT 2007
On 5/22/07, brian.dunbar at liftport.com <brian.dunbar at liftport.com> wrote:
> Hi,
>
> I have need of a Windows application that can close dialog boxes and take
> scripted action - send an email or restart a service or application.
>
> The specific problem is that I've inherited a service on a Windows server
> that 'once in a while' throws a dialog box and exists - no error message
> logged.
>
> Which would not be a huge deal except that the application lives on a
> server that no one looks at.
>
> Five years ago I had the same situation, found a shareware application
> that would take scripted action on dialog (click 'ok') and then restart a
> service. I only needed it for a few months while the application was
> replaced. Of course I can't _find_ it now and it's gone from our archive
> of local application archive.
>
> Any ideas? Clues? I can't make this application go away - we're stuck
> with it for another year or three while the ERP systems it talks to are
> done away with.
>
> Brian
I haven't had a chance to play with it yet, but it looks like
AutoIt[0] should do what you want. Create a script that does the
following in an infinite loop:
Wait for the window you're looking for to open, click the OK button to
close it, then run 'net start $service_name' to restart the service.
[0]: http://www.autoitscript.com/autoit3/
More information about the geeks
mailing list