Jump to content

Recommended Posts

Hey so let me explain my problem.

I need to close a program using ProcessClose

There are mutliple windows with the same name so ProcessList wont work. I tried to do ProcessList(WinGetHandle("[ACTIVE]") but that didnt work.

I can not close the window using WinKill or WinClose because for what ever reason it resists being closed in this way. Maybe there is an alternative?.

Lastly and possibly most importantly the Run command wont work to get the PID because the process ID changes after the program has been run. Suggestions?

SOLVED using WinGetProcess("[ACTIVE]") I knew there must be a way to do it!

Edited by Reeling
Link to post
Share on other sites

Lets get some things straight.

You want to close a process or a window?

a process that is related to a window if that makes sense, sorry for being a bit unclear.

I want to close the window but the window becomes unresponsive so I am trying to close it with the process ID instead.

Edited by Reeling
Link to post
Share on other sites

if you know the processname (i.e. notepad.exe) then you can use processexists to retrieve the PID

edit: Thinking about it more...if you know the processname then you should just be able to do ProcessClose on that.

Edited by spudw2k
Link to post
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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...