Shyke Posted January 14, 2006 Share Posted January 14, 2006 Alright for a game one of the people asked if I could make a program that could close off all 3rd party chat methods so the game would be more challenging. I noticed that if using Proccessclose that the proccess name is changed if the *.exe of the program is changed. How can I work around this... so I really close the wanted program? Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 14, 2006 Moderators Share Posted January 14, 2006 Just so I understand this question: 1. You want to use ProcessClose 2. People can change the .exe name 3. Even if the .exe name is changed to something unique that you have NO idea what it is or could be, you want to know it is the same program as originally installed. 4. If it is the same program you want to close the process. Sound about right? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Shyke Posted January 14, 2006 Author Share Posted January 14, 2006 (edited) Oh! Under it all you are hinting that I use registry to read where the *.exe would be then try to find the name of the *.exe or did I just figure that out? But yeah that is basically what I want. Edited January 14, 2006 by Shyke Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 14, 2006 Moderators Share Posted January 14, 2006 Oh! Under it all you are hinting that I use registry to read where the *.exe would be then try to find the name of the *.exe or did I just figure that out?But yeah that is basically what I want.It would have to be the registry or a known window name or handle... Because if there's not a unique identifier (like if there was a semaphore set by it and you knew that), I can't imagine you being able to find it. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Shyke Posted January 14, 2006 Author Share Posted January 14, 2006 You could use like Mirc and stuff... yeah. There is a set name that is unchangeable for all of them but how can you do a processclose when you only have a windows name or can you use a winkill and just drop it right there? Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 14, 2006 Moderators Share Posted January 14, 2006 (edited) You could get the handle of the window, then run it against the handles of the process list and see what the exe name is. Or you could just do something like what was being done earlier in another thread... I'll see if I can whip up an example: Edited January 14, 2006 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Bof Posted January 14, 2006 Share Posted January 14, 2006 you could also read the title of the windows Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 14, 2006 Moderators Share Posted January 14, 2006 (edited) I wrote out the really bad ass UDF to do it... then as I was writing it... I realized I do things so complicated sometimes!! Opt('WinTitleMatchMode', 4) $WindowPartTitle = WinGetTitle('Mirc') $Process = WinGetProcess($WindowPartTitle) ProcessClose($Process) Edited January 14, 2006 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Shyke Posted January 14, 2006 Author Share Posted January 14, 2006 (edited) Thanks, it should work for all my problems! EDIT: Yep, it suits the job perfectly... now I just gotta make it useable with a database from the internet... Edited January 14, 2006 by Shyke 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