Advertisement
Guest User

Untitled

a guest
May 13th, 2024
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. loop {
  2. windows := WinGetList("Jellyfin Media Player")
  3. for window in windows {
  4. ; Activate the window to bring it to the foreground
  5. WinActivate("ahk_id " window)
  6. WinWaitActive("ahk_id " window)
  7.  
  8. ; Ensure the window is active before clicking
  9. if WinActive("ahk_id " window) {
  10. ;Move the mouse to the desired position and click
  11. ;MouseMove(208, 347, , "R") ; R for relative to the active window's top-left corner
  12. ;Click() ; Performs a left click
  13. WinMove(, , 640, 480, "A")
  14. WinActivate("ahk_id " window)
  15. ;WinGetPos &X, &Y,,, "A"
  16. ;Color := PixelGetColor(X+476, Y+123+30, "alt slow")
  17. Color := PixelGetColor(476, 123, "alt slow")
  18. ;MsgBox "The active window is at " X "," Y
  19. ;MsgBox "The color at the current cursor position is " color
  20. ;if Color == "0x1C1C1C"{
  21. if Color == "0xD1D1D1"{
  22.  
  23. MouseClick "Left", 476, 123
  24. }
  25. }
  26. }
  27. Sleep 60000
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement