St4inL3ss Posted December 10, 2006 Share Posted December 10, 2006 there is a function WinFlash to make a taskbar window flash. But, is there a way to detect if something flashes in the taskbar? Link to comment Share on other sites More sharing options...
Uten Posted December 10, 2006 Share Posted December 10, 2006 I think you would have to monitor color changes with PixelGetColor. Another idea would be to hook the appropriate windows API but that would have to be done with a C dll or similar. No, take a lok at PixelGetColor and see if you can sort it out. Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
St4inL3ss Posted December 10, 2006 Author Share Posted December 10, 2006 i was hoping there was a simpler method for this, but thanks anyway Link to comment Share on other sites More sharing options...
Rizo Posted January 30, 2007 Share Posted January 30, 2007 i was hoping there was a simpler method for this, but thanks anyway yes, a simple method exists There is de "main code": Opt("WinTitleMatchMode", 2); 1=start, 2=subStr, 3=exact, 4=advanced HotKeySet("^!{F12}", "Done") ; Exit Script = Ctrl + Alt + F12 ; ; While 1 ; Find a pure blue pixel within 10 shades variations of pure blue, skipping over 10 pixels (for speed). $coord = PixelSearch( 0, @DesktopHeight-30, @DesktopWidth, @DesktopHeight, 0x0A246A, 10, 10 ) ; |__ See "PixelSearch" Function Reference ; |__ The Pixel-Search is over the TaskBar zone. The Screen resolution? no matters...[/i] ; If pixel change blue, click on window-flash coordinates If Not @error Then ;MsgBox(0, "X and Y are:", $coord[0] & "," & $coord[1]) MouseClick("left", $coord[0], $coord[1],1,0) EndIf ; Wait for the region to change, the region is checked every 100ms to reduce CPU load Sleep (100) WEnd ; ; ; Func Done() Exit 0 EndFuncFor test intention there is anoter two scripts, for "notepad" and "calc" windows flashing, that you must to executeExecute first the "main code", then run these two scripts, and you see... Flashing Notepad Opt("WinTitleMatchMode", 2) ;1=start, 2=subStr, 3=exact, 4=advanced If NOT WinExists("- Bloc de notas") Then Run("Notepad.exe", "", @SW_MINIMIZE) EndIf While NOT WinExists("- Bloc de notas") Wend ; flashes the window 4 times with a break in between each one of 1/2 second WinFlash('- Bloc de notas',"", 4, 500) Flashing Calculator Opt("WinTitleMatchMode", 2) ;1=start, 2=subStr, 3=exact, 4=advanced If NOT WinExists("Calculadora") Then RunWait("Calc.exe", "", @SW_MINIMIZE) WinSetState("Calculadora", "", @SW_MINIMIZE) EndIf ; flashes the window 4 times with a break in between each one of 1/2 second WinFlash("Calculadora","", 4, 500) That's all, folks! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now