Advertisement
Guest User

Untitled

a guest
Aug 2nd, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SetTitleMatchMode, 2
  2. CoordMode, pixel, screen
  3. Coordmode, mouse, screen
  4. DetectHiddenWindows, On
  5.  
  6. ; Hover over one of the windows
  7. ;SoundBeep, 750
  8. ToolTip, place mouse over the window you want to identify. press middle 'a', 0, 0
  9.  
  10. ; press the middle mouse button to identify that window
  11. keywait, a, D
  12. keywait, a
  13. ;SoundBeep, 750
  14. ;SoundBeep, 750
  15. mousegetpos, w1mx, w1my, w1id
  16.  
  17. ToolTip
  18.  
  19. ; then get the window title from the id
  20. wingettitle, w1title, ahk_id %w1id%
  21. msgbox,0x1020, , This window's id and title are`nId:`t%w1id%`ntitle:`t%w1title%
  22.  
  23.  
  24. F2::
  25. Loop
  26. {
  27.     ControlSend,, ahk_id %w1id%
  28.     /*
  29.     PixelGetColor, Color, 900, 200
  30.     if Color=0x999999
  31.     {
  32.         ControlSend,,{F11},ahk_id %w1id%
  33.         break
  34.     }
  35.     */
  36. }
  37. Return
  38.  
  39. F10::Reload
  40.  
  41. F12:: ExitApp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement