Jump to content

Simple script


Recommended Posts

can anyone tell me what's wrong with the code below. If the background($color) is white then it will write in notepad "color white" it will keep writing until the background is not white. It work fine if the background is white but when the background is not white, it won't stop writing in notepad. what i need is for it to stop imediately after the bacground is not white anymore and start wrting again if the background is white again. Assume the bacground is a slideshow where it show different color all the time.

And I think it doesn't do live update

thanks if anyone can help me this.

===========================

Dim $color ;declare variable

$color = PixelGetColor( 350 , 617 ) ;Store location's color

While 1 ; Do infinite loops

If $color = 0xFFFFFF Then ;assume your BG is white

WinWaitActive("Untitled - Notepad") ;In Notepad

send ("color white") ;Write color white

sleep (1000)

else

do nothing

EndIf

Wend

================

Edited by bennyvo
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...