Sign in to follow this  
Followers 0
adrian1386

not working as intended or missing something?

6 posts in this topic

#1 ·  Posted (edited)

$targetalive = PixelGetColor (74,176)

While $targetalive = 0x00E800

SendWithDelay(1100, '7456789')

WEnd

So its all gravy until the Hex color changes at the cordinates of the variable. To my understanding the loop should end once returned with a false expression right? However in the over all code the keys keep looping even after $target is no longer 0x00e800.

Edited by adrian1386

Share this post


Link to post
Share on other sites



So its all gravy until the Hex color changes at the cordinates of the variable. To my understanding the loop should end once returned with a false expression right? However in the over all code the keys keep looping even after $target is no longer 0x00e800.

While 1
     If PixelGetColor (74,176) = 0x00E800 then
          SendWithDelay(1100, '7456789')
     EndIf

WEnd

This should do it, I hope, lol.


INI TreeViewA bus station is where a bus stops, a train station is where a train stops. Onmy desk I have a work station...

Share this post


Link to post
Share on other sites

So its all gravy until the Hex color changes at the cordinates of the variable. To my understanding the loop should end once returned with a false expression right? However in the over all code the keys keep looping even after $target is no longer 0x00e800.

in your code you can not return false because you only get once -->>PixelGetColor (74,176)

Please add $targetalive inside loop , so that when $targetalive is changed it will exit

$targetalive = PixelGetColor (74,176)

While $targetalive = 0x00E800

$targetalive = PixelGetColor (74,176)
SendWithDelay(1100, '7456789')

WEnd

-----------------------------------------------------------BSECE, MCPAIM: juliusrmsYM: jivy_21@yahoo.comMSN: juliusLramos@hotmail.comMobile #: (Globe): +639167031989Web: http://www.trendmicro.com

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

That worked :P Thanks.

Edited by adrian1386

Share this post


Link to post
Share on other sites

That worked :P Thanks.

Which one? I never knew you could do lines like - While $targetalive = 0x00E800, lol I always thought they had to be a simple indefinite loop. I hate being a noob

INI TreeViewA bus station is where a bus stops, a train station is where a train stops. Onmy desk I have a work station...

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Both ways seemed to work.

As far as I'm concerened While can be just about anything... I could be wrong though, but thats what it appears to look like when reading the help file.

Edited by adrian1386

Share this post


Link to post
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
Sign in to follow this  
Followers 0