Jump to content

Help with code plz


Recommended Posts

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

It doesnt update the class names every time i click on a new window

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

just a guess:

Maybe AutoIT doesn't not refresh the "most recent window" list? It looks like AutoIT looks at startup whats the most recent (active) window and then always refers to that, when you call a function with title="".

Greetings,

ZeD

Link to comment
Share on other sites

This works for me though one of the other guys here can probly make it cleaner.

HotKeySet( "{esc}", "quit")
$TEXT = ""
While 1
   $CHECKNEW = WinGetTitle("")
   If $TEXT <> $CHECKNEW Then
      $TEXT = WinGetTitle("")
      $CLASS = WinGetClassList($TEXT)
      $SPLASH = SplashTextOn("WinClassNames", "Class names for " & $TEXT & ":" & @LF & $CLASS)
   EndIf
   Sleep(100);
Wend

Func quit()
   Exit
EndFunc
Edited by KnowledgeSponge
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...