Jump to content

Let's click some buttons


thuun
 Share

Recommended Posts

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

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 by thuun
Link to comment
Share on other sites

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 by thuun
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...