jaenster Posted February 11, 2006 Posted February 11, 2006 msgbox(0,"Found it",getfocus()) func getfocus() $var = WinList() For $i = 1 to $var[0][0] ; Only display visble windows that have a title If $var[$i][0] <> "" AND IsVisible($var[$i][1]) Then If WinActive($var[$i][0]) Then return $var[$i][0] endif ;MsgBox(0, "Details", "Title=" & $var[$i][0] & @LF & "Handle=" & $var[$i][1]) EndIf Next seterror(1) return -1 endfunc Func IsVisible($handle) If BitAnd( WinGetState($handle), 2 ) Then Return 1 Else Return 0 EndIf EndFunc I dont think that you need some details.. -jaenster
Developers Jos Posted February 11, 2006 Developers Posted February 11, 2006 why not just do: WinGetTitle("") SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
myspacee Posted April 22, 2008 Posted April 22, 2008 Sorry if i re take this old post, Func and WinGetTitle("") work very well. But i've a question. Is possible to return as applications identifier, .exe name ? i use Italian version of xp, a lot of exe have name that can generate 'confusion'. I read about class but also this item give me some limit for little tool that i want to build. (mouse gesture tool, based on .exe, so anyone can build his macro) Anyone can help me? Thank you m.
GtaSpider Posted April 22, 2008 Posted April 22, 2008 Hello Use WinGetProcess("") ;Returns PID of the active window. If u wanna exe name use _ProcessGetName() Your Spider www.AutoIt.de - Moderator of the German AutoIt Forum
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