thuun 0 Posted October 24, 2007 This seems a very simple task, somehow the best answer is not finding me. I would like to generate this proposed autoit script when as an app is run, so it should be short.it starts like this, a prog. is run ..if not (ProcessExists("prog.exe")) then run("prog.exe -genhash -envids")the prog and switches don't matter.When the prog process is a done, a ui button called 'done', needs to be clicked.button 1 'cancle', is active during processing, button 2, 'done', becomes active on completion of processing.I'm wondering if a loop should be used or a wait command will work will some formatting variations.Thx in advance, -t Share this post Link to post Share on other sites
Thatsgreat2345 0 Posted October 24, 2007 (edited) Yes a loop will be needed, check out these commands in the help file. ControlCommand, and ControlClick. Edited October 24, 2007 by Thatsgreat2345 Share this post Link to post Share on other sites
thuun 0 Posted October 24, 2007 (edited) I've actually may have just figured out a cmdline script that solves the issue. I checked the docs and some examples, but I'm still looking for just the right command or commands to click a button on a hung proccess using autoit. I'll check some more though. Edited October 24, 2007 by thuun Share this post Link to post Share on other sites
Thatsgreat2345 0 Posted October 24, 2007 Good job on coming up with a solution on your own Share this post Link to post Share on other sites
thuun 0 Posted October 29, 2007 (edited) I finally came up w/the following which will wait for and click a button, pulling into active focus if need be. Do If ControlFocus("TitleBar - Here", "","Button1") = 1 Then ControlClick("TitleBar - Here", "","Button1") Else Sleep(500) Endif Until ProcessExists($PID) = 0 'ControlFocus' was the command I needed. Edited October 29, 2007 by thuun Share this post Link to post Share on other sites