Jump to content

close atuoit application


zxcvbnm
 Share

Recommended Posts

I have an autoit application (.exe) resident on a pc (local), this application is called by a program. at the and of the program I need to close this autoit application.

So I hooked two autoit application, one at the beginnig and one at the and of the program.

I've no problem to launch autoit application at the beginning, but no positive responce about closing application

I try with

WinClose("Count Down")

cause the autoit application contains a timer and in this way I'am sure to kill it

Count Down is the name of the GUI of the first autoit application

It seems that local pc doesn't find it, if I exec ("Count Down") with double click it runs ok.

Any ideas?

Thanks

Link to comment
Share on other sites

I try with this code posted from AdnyS01

Local $hWnd, $title = $sCurrentTitle ; ($sCurrentTitle is defined elsewhere)  IF (WinActivate($title, "") <> 0) Then    $hWnd = WinGetHandle($title, "")    IF (IsHWnd($hWnd)) Then      IF (NOT WinClose($hWnd)) Then WinKill($hWnd)            IF (WinActivate($title, "") <> 0) Then        MsgBox(0, "ERROR", "Cannot kill window")      Else        MsgBox(0, "INFO", "Killed other window")      EndIF    Else      MsgBox(0, "ERROR", "Cannot get win handle")    EndIF  EndIF

It seems that we can recognise the first autoit application.

Link to comment
Share on other sites

I have one program (auoit indipendent), and two autoit application (first and second)

first is a timer, second must be close it

I can hook first at the beginning of the program, and it runs ok

I need to close timer and the and of the program so I need to exec second autoit app at the and of the program

but I can't close first autoit app with the second also using ProcessClose, I don't know why!

ProcessClose("timer.exe") runs ok if I use double click on .exe, but called by a programs it doesn't run ok.

Link to comment
Share on other sites

master program is a telephone client that open a pop up to manage phone calls

it exec without problems the launch of the timer at the beginning of the calls,

but at the end it has to close the timer.

I named ProcessClose("timer.exe") : close.exe

It seems that don't recognise the name of the process.

Link to comment
Share on other sites

timer.exe is perhaps running under another account which is inherited from the telephone application. A possible method to handle timer.exe to exit by itself is to have it look for a flag i.e. an existence of a certain filename or a registry value that when timer.exe sees it, then it will close itself.

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...