Jump to content
Macro Express Forums

Using Pixel Color Change As A Delay


HeyJim
 Share

Recommended Posts

Could someone please tell me how to use pixel color change as a delay device?

I think what I need is to monitor a pixel color and not move forward in the macro until the pixel color changes.

 

I found the pixel locator option but can't figure out what command to use. All I can think of is some kind of IF THEN loop monitoring the pixel color but really not sure how to do it. I'm definitely not a programmer.

Thanks.

Link to comment
Share on other sites

Hello HeyJim!

 

This example assumes that you already know the pixel is white at screen cooridinates 100,100. It will loop forever with a 10ms delay until the pixel is no longer white. The reason for the delay is to allow your CPU to take up other tasks. Although technically the delay is not required because Macro Express handles CPU cycles internally.

Repeat Until %N1% <> 16777215

  Get Pixel: Screen Coords: 100,100 into %N1%

  Delay 10 Milliseconds

Repeat End

<REP3:08:000002:000002:0001:0:01:16777215><GETPX:1:S:000100:000100><IMSD:10><ENDREP>
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...