Needs script for searching for a color
Moderators: JRL, Dorian (MJT support)
Needs script for searching for a color
Problem solved. Thanx alot for the help!
Last edited by Zeismic on Mon Oct 14, 2002 9:46 pm, edited 1 time in total.
Where's the colour ...
Hi, I've got it.
This script creates a result file (C:\MSched_WheresTheColour.txt) as well. That will give you the information if there's a "pattern" regarding the pixel position after a few runs. Feel free to shrink the script to "single liner"
Have fun.
BTW: I'm a German, so you've to excuse if anything is wrong with my writing ...
Ernest
This script creates a result file (C:\MSched_WheresTheColour.txt) as well. That will give you the information if there's a "pattern" regarding the pixel position after a few runs. Feel free to shrink the script to "single liner"

BTW: I'm a German, so you've to excuse if anything is wrong with my writing ...
Ernest
Code: Select all
//ScriptStart----------------------------------------------
CapsOff
Label>Setting
Let>XPos=48
Let>YPos=146
Let>FinalXPos=393
Let>FinalYPos=446
Let>MinToWait=55
Let>RightColour=6541311
Let>Result=No Colour
Label>GetPixelColour
If>XPos=%FinalXPos%,NextLine
If>YPos=FinalYPos,WaitALittle
GetPixelColor>%XPos%,%YPos%,Result
If>Result=%RightColour%,Success
Add>XPos,1
Goto>GetPixelColour
Label>NextLine
Let>XPos=48
Add>YPos,1
Goto>GetPixelColour
Label>WaitALittle
Let>SecToWait=%MinToWait%*60
Message>Waiting for %MinToWait% min. till next check will be started.%CRLF%Stay tuned ...
Wait>SecToWait
CloseWindow>Macro Scheduler Message*
Goto>Setting
Label>Success
TimeStamp>c:\MSched_WheresTheColour.txt, Pixelcolour: %RightColour% - found at screenposition: %XPos%:%YPos%
Wait>SecToWait
Message>%CRLF%Please keep your hands away from the mouse now!%CRLF%Will move to mouse position %XPos%:%YPos%%CRLF%in 3. seconds to Click !
Wait>3
CloseWindow>Macro Scheduler Message*
MouseMove>%XPos%,%YPos%
LClick
Goto>WaitALittle
//ScriptEnd-----------------------------------------------
Great Script, but...
Thanx alot! Great work you have done here, but I got a small problem with the script though...
When I try to run it I get this error:
Invalid Numeric or Date Format In "Add>XPos,1"
I tryed to figure out what could be wrong, but it all seems OK.
Do you know what could be wrong?
When I try to run it I get this error:
Invalid Numeric or Date Format In "Add>XPos,1"
I tryed to figure out what could be wrong, but it all seems OK.
Do you know what could be wrong?
Re: Great Script, but...
Zeismic wrote:Thanx alot! Great work you have done here, but I got a small problem with the script though...
When I try to run it I get this error:
Invalid Numeric or Date Format In "Add>XPos,1"
I tryed to figure out what could be wrong, but it all seems OK.
Do you know what could be wrong?
Code: Select all
test
blah blah blah.. whatever
))
U made an erro man !!
//ScriptStart----------------------------------------------
CapsOff
Label>Setting
Let>XPos=48
Let>YPos=146
Let>FinalXPos=393
Let>FinalYPos=446
Let>MinToWait=55
Let>RightColour=6541311
Let>Result=No Colour
Label>GetPixelColour
If>XPos=%FinalXPos%,NextLine
If>YPos=%FinalYPos%,WaitALittle
GetPixelColor>%XPos%,%YPos%,Result
If>Result=%RightColour%,Success
Add>XPos,1
Goto>GetPixelColour
Label>NextLine
Let>XPos=48
Add>YPos,1
Goto>GetPixelColour
Label>WaitALittle
Let>SecToWait=%MinToWait%*60
Message>Waiting for %MinToWait% min. till next check will be started.%CRLF%Stay tuned ...
Wait>SecToWait
CloseWindow>Macro Scheduler Message*
Goto>Setting
Label>Success
TimeStamp>c:\MSched_WheresTheColour.txt, Pixelcolour: %RightColour% - found at screenposition: %XPos%:%YPos%
Wait>SecToWait
Message>%CRLF%Please keep your hands away from the mouse now!%CRLF%Will move to mouse position %XPos%:%YPos%%CRLF%in 3. seconds to Click !
Wait>3
CloseWindow>Macro Scheduler Message*
MouseMove>%XPos%,%YPos%
LClick
Goto>WaitALittle
//ScriptEnd-----------------------------------------------

U made an erro man !!
//ScriptStart----------------------------------------------
CapsOff
Label>Setting
Let>XPos=48
Let>YPos=146
Let>FinalXPos=393
Let>FinalYPos=446
Let>MinToWait=55
Let>RightColour=6541311
Let>Result=No Colour
Label>GetPixelColour
If>XPos=%FinalXPos%,NextLine
If>YPos=%FinalYPos%,WaitALittle
GetPixelColor>%XPos%,%YPos%,Result
If>Result=%RightColour%,Success
Add>XPos,1
Goto>GetPixelColour
Label>NextLine
Let>XPos=48
Add>YPos,1
Goto>GetPixelColour
Label>WaitALittle
Let>SecToWait=%MinToWait%*60
Message>Waiting for %MinToWait% min. till next check will be started.%CRLF%Stay tuned ...
Wait>SecToWait
CloseWindow>Macro Scheduler Message*
Goto>Setting
Label>Success
TimeStamp>c:\MSched_WheresTheColour.txt, Pixelcolour: %RightColour% - found at screenposition: %XPos%:%YPos%
Wait>SecToWait
Message>%CRLF%Please keep your hands away from the mouse now!%CRLF%Will move to mouse position %XPos%:%YPos%%CRLF%in 3. seconds to Click !
Wait>3
CloseWindow>Macro Scheduler Message*
MouseMove>%XPos%,%YPos%
LClick
Goto>WaitALittle
//ScriptEnd-----------------------------------------------