First off I want to tell you how much this program has helped me.. but I have two questions first one..
I need the ability to remove the log file but the problem is is the file is in use the second time the macro is running.. let me explain.
(1stmacro starts)
Label>Start
.
.
Macro>c:\2ndmacro.scp
(2ndmacro starts)
Label>Start2
.
DeleteFile>c:\1stmacro.scp
copyfile>c:\1stmacrobackup.scp c:\1stmacro.scp
Macro>c:\1stmacro.scp
the problem lies in when I try to delete the file (OR log file) it is in use even tho it really is not..
2nd question
GetPixelColor>545,645,WHATCOLOR
If>WHATCOLOR=0,whatever,whatever2
GetPixelColor>546,645,WHATCOLOR
.
.
and that macro goes on forever basically looking at each pixel on the screen for a match. My questions is this if the pixel color is 0 at 545,645 and then it jumps to Label>whatever is there anyway to find out the 545,645 without me havcing to do anything? maybe putting them into a variable of sorts?
sorry if my questions are a little confusing.. Hope you get the idea.
Couple of Questions
Moderators: JRL, Dorian (MJT support)
What do you mean by "call the 546,645 again ..." I don't think I understand what you want to achieve.
As for variables. Yes you can put these values into variables:
Let>x=546
Let>y=645
GetPixelColor>x,y,whatcolor
If you want to loop thru all pixels on your screen use two nested loops. E.g. something like this for an 800x600 screen res:
Let>xmax=800
Let>ymax=600
Let>x=0
Repeat>x
Let>x=x+1
Let>y=0
Repeat>y
Let>y=y+1
GetPixelColor>x,y,color
If>color=whatever
bla bla bla
endif
Until>y,ymax
Until>x,xmax
Modify the If>color section to do whatever you want when it finds the color you're looking for. You may also want to jump out of the loops here. You may not. I don't know what you're trying to do. But maybe this helps?
As for variables. Yes you can put these values into variables:
Let>x=546
Let>y=645
GetPixelColor>x,y,whatcolor
If you want to loop thru all pixels on your screen use two nested loops. E.g. something like this for an 800x600 screen res:
Let>xmax=800
Let>ymax=600
Let>x=0
Repeat>x
Let>x=x+1
Let>y=0
Repeat>y
Let>y=y+1
GetPixelColor>x,y,color
If>color=whatever
bla bla bla
endif
Until>y,ymax
Until>x,xmax
Modify the If>color section to do whatever you want when it finds the color you're looking for. You may also want to jump out of the loops here. You may not. I don't know what you're trying to do. But maybe this helps?
MJT Net Support
[email protected]
[email protected]