Ok,
I have been lightly using auto it for very basic junk. I can get this to work if just use all mouseclick x,y with some sleep commands. I just wanted to try to use pixelsearch to get it done a little more automatic. The script below will select that correct window, but that's about it. All the tooltips work like they should. Just it does not seem that the pixelsearch works at all. Not sure what I am doing wrong. If you could look it over and offer any advice would be great. The old mouseclick script I used for everything else I did is getting old. Thanks in advance!!
; Declare Variables
$media = 0
; ToolTip displaying function keys
Tooltip("HOME = On/Off find media, F10 = Exit", 0, 0)
; List of command keys
If Not WinActive("MediaMonkey", "") Then WinActivate("MediaMonkey", "")
While WinWaitActive("MediaMonkey", "")
HotKeySet("{HOME}", "Find media")
HotKeySet("{F10}", "exitNow")
WEnd
; Click loop
While True
If $media = 1 Then
$size = WinGetClientSize("MediaMonkey", "")
$coord = PixelSearch(0,0, $size[0], $size[1], 0xFECE56)
; If PixelSearch finds the pixel color at given coordinates, Then:
If Not @error Then
MouseClick("left", $coord[0], $coord[1], 1, 0)
EndIf
EndIf
Sleep(500)
WEnd
; Functions
; On/Off find media():
Func media()
If $media = 0 Then
$media = 1
Tooltip("Auto deleting on command (HOME to disable)", 0, 0)
Else
$media = 0
Tooltip("HOME = On/Off Start deleting, F10 = Exit", 0, 0)
EndIf
EndFunc
; Exit
Func exitNow()
Exit
EndFunc