caldvn Posted December 14, 2004 Report Share Posted December 14, 2004 Trying to run a macro to determine a change in pixel, if change then to run commands, however if those commands are run I need a wait before the same commands are run again. So far I can only come up to this point (rough): Get pixel coords into N1 Get pixel coords into N2 Repeat Start //first batch get pixel coords into n6 If variable n1 <> variable n6 Variable set interger n99 with random number text type: ctrl f4 text type: ctrl 9 end if //second batch get pixel coords into n5 If variable n2 <> variable n5 Variable set interger n99 with random number text type: ctrl f3 text type: ctrl 9 end if repeat end I've planted variable set interget with random number in order to say that it did run. Now I'm trying to set it to say yeah it ran the commands, wait 8 seconds to run the first batch, and run second batch right away. Thanks in advance for any assistance. Quote Link to comment Share on other sites More sharing options...
joe Posted December 17, 2004 Report Share Posted December 17, 2004 Welcome to the forum! I think this is more like what you are trying to do: // Infinite loop. Repeat Until %N1% <> %N1% // Get the pixel colors. Get Pixel: Screen Coords: 100,100 into %N1% Variable Modify Integer: Copy %N1% to %N6% Get Pixel: Screen Coords: 200,200 into %N2% Variable Modify Integer: Copy %N2% to %N5% // Loop until the N1 pixel color changes. Repeat Until %N6% <> %N1% Get Pixel: Screen Coords: 100,100 into %N6% Repeat End // Type the first set of commands. Text Type: <CONTROL><F4> Text Type: <CONTROL>9 // Loop until the N2 pixel color changes. Repeat Until %N5% <> %N2% Get Pixel: Screen Coords: 100,100 into %N5% Repeat End // Type another set of commands. Text Type: <CONTROL><F3> Text Type: <CONTROL>9 // Delay for 8 seconds and then do the whole thing again. Delay 8 Seconds Repeat End <REM2:><REM2:Infinite loop.><REP3:08:000002:000002:0001:1:01:N1><REM2:><REM2:Get the pixel colors.><GETPX:1:S:000100:000100><NMVAR:07:01:0:0000006:0:0000000><GETPX:2:S:000200:000200><NMVAR:07:02:0:0000005:0:0000000><REM2:><REM2:Loop until the N1 pixel color changes.><REP3:08:000002:000002:0006:1:01:N1><GETPX:6:S:000100:000100><ENDREP><REM2:><REM2:Type the first set of commands.><TEXTTYPE:<CONTROL><F4>><TEXTTYPE:<CONTROL>9><REM2:><REM2:Loop until the N2 pixel color changes.><REP3:08:000002:000002:0005:1:01:N2><GETPX:5:S:000100:000100><ENDREP><REM2:><REM2:Type another set of commands.><TEXTTYPE:<CONTROL><F3>><TEXTTYPE:<CONTROL>9><REM2:><REM2:Delay for 8 seconds and then do the whole thing again.><DELAY:8><REM2:><ENDREP><REM2:> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.