Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- loop {
- windows := WinGetList("Jellyfin Media Player")
- for window in windows {
- ; Activate the window to bring it to the foreground
- WinActivate("ahk_id " window)
- WinWaitActive("ahk_id " window)
- ; Ensure the window is active before clicking
- if WinActive("ahk_id " window) {
- ;Move the mouse to the desired position and click
- ;MouseMove(208, 347, , "R") ; R for relative to the active window's top-left corner
- ;Click() ; Performs a left click
- WinMove(, , 640, 480, "A")
- WinActivate("ahk_id " window)
- ;WinGetPos &X, &Y,,, "A"
- ;Color := PixelGetColor(X+476, Y+123+30, "alt slow")
- Color := PixelGetColor(476, 123, "alt slow")
- ;MsgBox "The active window is at " X "," Y
- ;MsgBox "The color at the current cursor position is " color
- ;if Color == "0x1C1C1C"{
- if Color == "0xD1D1D1"{
- MouseClick "Left", 476, 123
- }
- }
- }
- Sleep 60000
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement