thuun Posted October 24, 2007 Share 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 Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted October 24, 2007 Share 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 Link to comment Share on other sites More sharing options...
thuun Posted October 24, 2007 Author Share 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 Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted October 24, 2007 Share Posted October 24, 2007 Good job on coming up with a solution on your own Link to comment Share on other sites More sharing options...
thuun Posted October 29, 2007 Author Share 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 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