One window func for them all!

Post your working scripts, libraries and tools
User avatar
Bugz000
Posts: 29
Joined: 30 Sep 2013, 10:01

One window func for them all!

11 Aug 2018, 07:49

https://pastebin.com/k8whGyFK

quick little function i put together due to someone having a bug where AHK_EXE was not working that can find any window attribute from any other attribute, for instance
if you want to get the PID from the window transparency? sure!
how about the name of the EXE from the window style? absolutely!
perhaps get the exe name from the PID, then the window name from the exe name? perfectly possible

leave all the parameters blank and it will return an array containing all the data it has from every window :)
see the 2d array lines below for a list of options you can choose from, enjoy!


Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

Image
garry
Posts: 1335
Joined: 22 Dec 2013, 12:50

Re: One window func for them all!

11 Aug 2018, 08:51

@Bugz000 , thank you
can't see the many lines in msgbox, maybe use fileappend ?

Code: [Select all] [Download] GeSHi © Codebox Plus

$!F5::
aa:= % st_printarr(WinGetAll(), 15)
fileappend,%aa%,test66.txt
;msgbox % st_printarr(WinGetAll(), 15)
msgbox % wingetall("proc", "notepad.exe", "PID")
msgbox % wingetall("PID", wingetall("proc", "notepad.exe", "PID"), "Name")
return
User avatar
Bugz000
Posts: 29
Joined: 30 Sep 2013, 10:01

Re: One window func for them all!

11 Aug 2018, 08:59

garry wrote:@Bugz000 , thank you
can't see the many lines in msgbox, maybe use fileappend ?

Code: [Select all] [Download] GeSHi © Codebox Plus

$!F5::
aa:= % st_printarr(WinGetAll(), 15)
fileappend,%aa%,test66.txt
;msgbox % st_printarr(WinGetAll(), 15)
msgbox % wingetall("proc", "notepad.exe", "PID")
msgbox % wingetall("PID", wingetall("proc", "notepad.exe", "PID"), "Name")
return


yes i am aware the msgbox is huge but i prefer not to release ahk scripts that dump files, by all means use fileappend on your own computer if you wish :)
Image
garry
Posts: 1335
Joined: 22 Dec 2013, 12:50

Re: One window func for them all!

11 Aug 2018, 09:43

thank you Bugz000 , maybe I make a small GUI with EDIT to see the result in edit

Return to “Scripts and Functions”

Who is online

Users browsing this forum: hoppfrosch and 8 guests