Sign in to follow this  
Followers 0
the_lord_mephy

WinSelected or something like that

8 posts in this topic

#1 ·  Posted (edited)

Alrite, is there a way to return a string of the window thats currently active.

Edited 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]

Share this post


Link to post
Share on other sites



Like the window title? StringSplit

Share this post


Link to post
Share on other sites

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]

Share this post


Link to post
Share on other sites

I've never understood what this is for in the MsgBox command:

MsgBox(ThisNumber, "",$a)

Share this post


Link to post
Share on other sites

RTM!!! Um, It could be documented in the manual... Like somewhere under msgbox... DUUUUUUHHHHHHH! :)


Who else would I be?

Share this post


Link to post
Share on other sites

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]

Share this post


Link to post
Share on other sites

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 :)

Share this post


Link to post
Share on other sites

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

Share this post


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
Sign in to follow this  
Followers 0