the_lord_mephy Posted September 29, 2004 Share Posted September 29, 2004 (edited) Alrite, is there a way to return a string of the window thats currently active. Edited September 29, 2004 by the_lord_mephy My site for HTML Help :)[quote name='Valik' date='Oct 15 2004, 12:29 PM']Maybe nobody is an "elite uber-coder" like me because thinking is a capital offense in today's online-world?[right][snapback]36427[/snapback][/right][/quote] Link to comment Share on other sites More sharing options...
Guest BL@(K-R34P3R Posted September 29, 2004 Share Posted September 29, 2004 Like the window title? StringSplit Link to comment Share on other sites More sharing options...
the_lord_mephy Posted September 29, 2004 Author Share Posted September 29, 2004 No, u dont understand what im saying. I want it to return the Title of the window that is currently active. My site for HTML Help :)[quote name='Valik' date='Oct 15 2004, 12:29 PM']Maybe nobody is an "elite uber-coder" like me because thinking is a capital offense in today's online-world?[right][snapback]36427[/snapback][/right][/quote] Link to comment Share on other sites More sharing options...
Guest BL@(K-R34P3R Posted September 29, 2004 Share Posted September 29, 2004 I've never understood what this is for in the MsgBox command: MsgBox(ThisNumber, "",$a) Link to comment Share on other sites More sharing options...
this-is-me Posted September 29, 2004 Share Posted September 29, 2004 RTM!!! Um, It could be documented in the manual... Like somewhere under msgbox... DUUUUUUHHHHHHH! Who else would I be? Link to comment Share on other sites More sharing options...
the_lord_mephy Posted September 29, 2004 Author Share Posted September 29, 2004 I dont get why did doesnt work. It gets the code for the first window but it doesn't update itself HotKeySet( "{esc}", "quit" ) Func quit( ) Exit EndFunc SplashTextOn("WinClassNames", "Click on the window you wish to get ClassNames for.") While 1 $text = WinGetTitle("") $class = WinGetClassList($text) ControlSetText("WinClassNames", "Click on the window you wish to get ClassNames for.", "Static1", "Class Name for " & $text & ":"& @LF & $class) Wend My site for HTML Help :)[quote name='Valik' date='Oct 15 2004, 12:29 PM']Maybe nobody is an "elite uber-coder" like me because thinking is a capital offense in today's online-world?[right][snapback]36427[/snapback][/right][/quote] Link to comment Share on other sites More sharing options...
normeus Posted September 30, 2004 Share Posted September 30, 2004 I ran your code and all of it works fine but this : ControlSetText("WinClassNames", "Click on the window you wish to get ClassNames for.", "Static1", "Class Name for " & $text & ":"& @LF & $class) it looks like ControlseText just appends $class at the end of the previous $class and you dont see it any more here is my test code if you would like to play with it: ;$add a counter to see how many windows you changed to ; sleep(900) : I like to throw sleeps here and there ;$oldtext : just to see if $text changes ;also added an exit function with more data ; AutoItSetOption("WinTitleMatchMode", 2) HotKeySet( "{esc}", "endit" ) Func quit( ) Exit EndFunc SplashTextOn("WinClassNames", "Click on the window you wish to get ClassNames for.") sleep(900) $text = WinGetTitle("") $oldtext = $text While 1 while $oldtext = $text $text = WinGetTitle("") sleep(200) wend ; WinWaitActive($text) $class = WinGetClassList($text) $add=$add+1 ControlSetText("WinClassNames", "Click on the window you wish to get ClassNames for.", "Static1", "Class Name for " & $text & ":"& @LF & $class) $oldtext=$text MsgBox(4096,"",$class) Wend func endit() MsgBox(4096,"",$text & " " & $add) Exit EndFunc if you have an aswer to a question POST if you have a question to a question PRESS ON!!! or create a new topic http://www.autoitscript.com/autoit3/scite/...iTe4AutoIt3.exe Link to comment Share on other sites More sharing options...
normeus Posted September 30, 2004 Share Posted September 30, 2004 CHANGE OFFENDING LINE ON YOUR CODE TO THIS LINE: ControlSetText("WinClassNames", "", "Static1", "Class Name for " & $text & ":"& @LF & $class) ( get rid of "Click on the window you wish to get ClassNames for." ) on the ControlSeText function it's been kicks http://www.autoitscript.com/autoit3/scite/...iTe4AutoIt3.exe 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