daily pastebin goal
4%
SHARE
TWEET

Untitled

a guest Aug 11th, 2018 6 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. msgbox % st_printarr(WinGetAll(), 15)
  2. msgbox % wingetall("proc", "notepad.exe", "PID")
  3. msgbox % wingetall("PID", wingetall("proc", "notepad.exe", "PID"), "Name")
  4.  
  5. WinGetAll(InType = "", in = "", outtype = "")
  6. {
  7. WinGet,wParam, List
  8. Window:={}
  9. loop %wParam%
  10.     {
  11.         WinGetpos, X%A_Index%, Y%A_Index%, Width%A_index%, Height%A_index%, % "ahk_id " wParam%A_Index% ;m
  12.         WinGetTitle, WinName%A_Index%, % "ahk_id " wParam%A_Index%                                          ;a
  13.         winget, State%A_index%, MinMax, % "ahk_id " wParam%A_Index%                                     ;d
  14.         winget, ID%A_index%,ID , % "ahk_id " wParam%A_Index%                                                ;e
  15.         winget, PID%A_index%,PID, % "ahk_id " wParam%A_Index%                                               ;
  16.         winget, Count%A_index%,Count, % WinName%A_Index%                                                    ;b
  17.         winget, Proc%A_index%, ProcessName, % "ahk_id " wParam%A_Index%                                 ;y
  18.         winget, cList%A_index%, ControlList, % "ahk_id " wParam%A_Index%                                    ;
  19.         winget, cListHWND%A_index%, ControlListHWND, % "ahk_id " wParam%A_Index%                            ;b
  20.         winget, trans%A_index%, transparent, % "ahk_id " wParam%A_Index%                                    ;u
  21.         winget, transc%A_index%, transcolor, % "ahk_id " wParam%A_Index%                                    ;g
  22.         winget, style%A_index%, style, % "ahk_id " wParam%A_Index%                                          ;z
  23.         Window[ A_index , "Name" ]      := WinName%A_index%                                                 ;0
  24.         Window[ A_index , "State" ]     := State%A_Index%                                                   ;0
  25.         Window[ A_index , "AHK_ID" ]    := wParam%A_Index%                                                  ;0
  26.         Window[ A_index , "ID" ]        := ID%A_Index%
  27.         Window[ A_index , "PID" ]       := PID%A_Index%
  28.         Window[ A_index , "Proc" ]      := Proc%A_Index%
  29.         Window[ A_index , "Count" ]     := Count%A_Index%
  30.         Window[ A_index , "cList" ]     := cList%A_Index%
  31.         Window[ A_index , "cListHWND" ] := cListHWND%A_Index%
  32.         Window[ A_index , "trans" ]     := trans%A_Index%
  33.         Window[ A_index , "transc" ]    := transc%A_Index%
  34.         Window[ A_index , "style" ]     := style%A_Index%
  35.         Window[ A_index , "X" ]         := X%A_Index%
  36.         Window[ A_index , "Y" ]         := Y%A_index%
  37.         Window[ A_index , "Width" ]     := Width%A_Index%
  38.         Window[ A_index , "Height" ]    := Height%A_Index%
  39.         Window[ A_index , "Area" ]      := Width%A_Index% * Height%A_Index%
  40.         if (intype) AND (in) AND (outtype)
  41.             if (Window[A_index, intype] = in)
  42.                 return % window[a_index, outtype]
  43.     }
  44.     if (intype) AND (in) AND (outtype)
  45.         return "Error, intype or in not found."
  46.     return % window                            
  47. }
  48.  
  49.  
  50. st_printArr(array, depth=5, indentLevel="")
  51. { ;made by tidbit
  52.    for k,v in Array
  53.    {
  54.       list.= indentLevel "[" k "]"
  55.       if (IsObject(v) && depth>1)
  56.          list.="`n" st_printArr(v, depth-1, indentLevel . "    ")
  57.       Else
  58.          list.=" => " v
  59.       list.="`n"
  60.    }
  61.    return rtrim(list)
  62. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top