Posts: 473
Threads: 33
Joined: Aug 2007
Is there any reasoning behind why my macros that have if findcolor, have stopped working?
I'm using Windows Vista, so I understand recognizing colors are more difficult, but they worked before, but now no longer work.
Taking on Quick Macros one day at a time
Posts: 12,071
Threads: 140
Joined: Dec 2002
Macro
Acc a=acc("Notification Area" "TOOLBAR" win("" "Shell_TrayWnd") "ToolbarWindow32" "" 0x1001)
if(!a.FindColor(ColorFromRGB(0 0 255) 0 0x3)) ret
out "found"
This works on my Vista PC.
Posts: 473
Threads: 33
Joined: Aug 2007
Macro
Trigger
@11
Acc a=acc("Away" "PUSHBUTTON" win("" "Shell_TrayWnd") "ToolbarWindow32" "" 0x1001)
int w1=win("Away" "__oxFrame.class__")
int w2=win("AIM" "__oxFrame.class__")
int c=0x4677AD
spe 100
rep
,if(a.FindColor(c))
,,0.5
,,res w1
,,0.5
,,res w2
,,act w2
,,wait 5 WA w2
,,0.5
,,'At
,,0.5
,,act win("Text Message with" "__oxFrame.class__")
,,'SyouVhaveVbeenVmessaged.Y
,,end
When I get instant messaged then the window "Away" starts flashing orange, so I have it setup so if I get messaged while I'm not at my computer, that when the window starts flashing orange it does everything I have it setup to do. Am I doing something wrong?
Taking on Quick Macros one day at a time
Posts: 12,071
Threads: 140
Joined: Dec 2002
Vista taskbar is partially transparent and colors are blended with the background which is different every time.
Posts: 473
Threads: 33
Joined: Aug 2007
Yeah I noticed, but what I did was, I got the taskbar to flash the orange color and then I grabbed the color, with the same background I use now. It worked for about a month and now it suddenly stopped working.
Taking on Quick Macros one day at a time
Posts: 12,071
Threads: 140
Joined: Dec 2002
Try to capture color again, in button's bottom part.
Posts: 473
Threads: 33
Joined: Aug 2007
That's what I did before, I just retried it, and still same result.
Taking on Quick Macros one day at a time
Posts: 12,071
Threads: 140
Joined: Dec 2002
Macro
int h=win("Notepad")
FlashWindow(h 1)
1
Acc a=acc("Untitled - Notepad" "PUSHBUTTON" win("" "Shell_TrayWnd") "ToolbarWindow32" "" 0x1001)
int c=0x1179c3
if(!a.FindColor(c)) ret
out "found"
This works here. But it stops working when I open another window and the button is moved to the left. Because desktop color in that place is different.
Don't know other ways how to detect flashing windows.
Posts: 473
Threads: 33
Joined: Aug 2007
I think I might have fixed it, I just changed the transparency to none, so there is only 1 color in the taskbar.
Taking on Quick Macros one day at a time
Posts: 473
Threads: 33
Joined: Aug 2007
Confirmed, works now.
Thanks for the help.
Taking on Quick Macros one day at a time
Posts: 20
Threads: 9
Joined: May 2007
Is there any command for recognizing color of the point of window (or the AccObject) in the case when window is minimized? Tried pixel with flag "2" and FindColor but they both take color from the topmost window.
Posts: 12,071
Threads: 140
Joined: Dec 2002