FaridAgl Posted August 29, 2011 Share Posted August 29, 2011 Guys i need some help here. For example i have 20 Notepad running, Minimized, Maximized, Active and Inactive. Each of them have different text inside. I want check all of them and close only each of them that have a string that i will declare. Another thing is a little more Complex: I want to check the string of a Control in a for example 20 same window and close each of them that the string of that control is my declared string and don't touch each of them? special tnx for any help. http://faridaghili.ir Link to comment Share on other sites More sharing options...
funkey Posted August 29, 2011 Share Posted August 29, 2011 Use WinList, ControlGetText, compare the texts and use WinClose. Programming today is a race between software engineers striving tobuild bigger and better idiot-proof programs, and the Universetrying to produce bigger and better idiots.So far, the Universe is winning. Link to comment Share on other sites More sharing options...
FaridAgl Posted August 29, 2011 Author Share Posted August 29, 2011 yes i think it's working, if i had any problem i will post here. tnx so much. http://faridaghili.ir Link to comment Share on other sites More sharing options...
FaridAgl Posted August 30, 2011 Author Share Posted August 30, 2011 sry if i bumped my topic. it's what i finaly write but it seems have some problem. i run a program 12 times and each of them have different title, i can't explain it good but plz take a look on it and improve my codes. $InputBoxUsername = InputBox("GoDLiKe.eXp", "Enter the Username you want to close:", "", " 15", 275, 125) $Windows = WinList() For $i = 1 to $Windows[0][0] If $Windows[$i][0] <> "" Then $Username = ControlGetText($Windows[$i][0],"UID:","[CLASS:Static; INSTANCE:1]") If $Username = $InputBoxUsername Then If $Username NOT = "" Then ProcessClose(WinGetProcess($Windows[$i][0])) EndIf EndIf EndIf Next http://faridaghili.ir 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