can not stop macro

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
who me?
Newbie
Posts: 2
Joined: Fri Jan 18, 2008 10:27 pm

can not stop macro

Post by who me? » Fri Jan 18, 2008 10:59 pm

Hello all, i am pretty much new in all this scripting thing...
I have been trying to make script, and i think it works, just i dont know to stop it :)

Code: Select all

Let>k=0
Repeat>k
SetFocus>http://*something* - IE
MouseMove>242,302
LClick
wait>1
WaitPixelColor>10394018,75,97,0 /*s*/
PlayWav>C:\WINDOWS\Media\ding.wav
WaitPixelColor>16053492,387,559,0 /*load*/
PlayWav>C:\WINDOWS\Media\ding.wav
GetPixelColor>339,519,build6
If>build6=4400389
Macro>C:\*something* \My Documents\Macro Scheduler\6.scp
else
endif
GetPixelColor>339,494,build5
if>build5=4400389
Macro>C:\*something* \My Documents\Macro Scheduler\5.scp
else
endif
GetPixelColor>339,471,build4
if>build4=4400389
Macro>C:*something* \My Documents\Macro Scheduler\4.scp
else
endif
GetPixelColor>339,448,build3
if>build3=4400389
Macro>C:\*something* \My Documents\Macro Scheduler\3.scp
else
endif
GetPixelColor>339,425,build2
if>build2=4400389
Macro>C:\*something* \My Documents\Macro Scheduler\2.scp
else
endif
GetPixelColor>339,401,build1
if>build1=4400389
Macro>C:\*something* \My Documents\Macro Scheduler\1.scp
else
MouseMove>270,430
Wait>1
LClick /*co*/
Press up
press enter
wait>4
  Let>k=k+1
Until>k=5

endif



I need to check pixel color and if there is that pixel color then to run some other macro, if there is no that pixel color to try next and etc... at the end if the last one is not found too i need to do few commands ( press down*2 and enter ) and to run macro again from the begin, but this time just once, and not to start it from the begin again if any pixel is not found!

Also when pixel is found, it runs new macro, but then comes back to main one and continue, which should not be like that!

I also tried like this

Code: Select all

SetFocus>http://*something* - IE
label>start
MouseMove>242,302
LClick
wait>1
WaitPixelColor>10394018,75,97,0 /*s*/
PlayWav>C:\WINDOWS\Media\ding.wav
WaitPixelColor>16053492,387,559,0 /*load*/
PlayWav>C:\WINDOWS\Media\ding.wav
GetPixelColor>339,519,build6
If>build6=4400389
Macro>C:\*something* \My Documents\Macro Scheduler\6.scp
else
endif
GetPixelColor>339,494,build5
if>build5=4400389
Macro>C:\*something* \My Documents\Macro Scheduler\5.scp
else
endif
GetPixelColor>339,471,build4
if>build4=4400389
Macro>C:*something* \My Documents\Macro Scheduler\4.scp
else
endif
GetPixelColor>339,448,build3
if>build3=4400389
Macro>C:\*something* \My Documents\Macro Scheduler\3.scp
else
endif
GetPixelColor>339,425,build2
if>build2=4400389
Macro>C:\*something* \My Documents\Macro Scheduler\2.scp
else
endif
GetPixelColor>339,401,build1
if>build1=4400389
Macro>C:\*something* \My Documents\Macro Scheduler\1.scp
else
MouseMove>270,430
Wait>1
LClick /*co*/
Press up
press enter
wait>4
Goto>start

endif 
This one also doesnt work, it have same effect as first one!

any help please?

if i didnt explained good what i need please say, as i am not very good with english!

Thanks!

who me?
Newbie
Posts: 2
Joined: Fri Jan 18, 2008 10:27 pm

found solution

Post by who me? » Fri Jan 18, 2008 11:14 pm

Ok i have tried with label end and goto>end but it still not works, in a moment i thought it works!

Code: Select all

SetFocus>http://*something* - IE
label>start
MouseMove>242,302
LClick
wait>1
WaitPixelColor>10394018,75,97,0 /*s*/
PlayWav>C:\WINDOWS\Media\ding.wav
WaitPixelColor>16053492,387,559,0 /*load*/
PlayWav>C:\WINDOWS\Media\ding.wav
GetPixelColor>339,519,build6
If>build6=4400389
Macro>C:\*something* \My Documents\Macro Scheduler\6.scp
Goto>end
else
endif
GetPixelColor>339,494,build5
if>build5=4400389
Macro>C:\*something* \My Documents\Macro Scheduler\5.scp
Goto>end
else
endif
GetPixelColor>339,471,build4
if>build4=4400389
Macro>C:*something* \My Documents\Macro Scheduler\4.scp
Goto>end
else
endif
GetPixelColor>339,448,build3
if>build3=4400389
Macro>C:\*something* \My Documents\Macro Scheduler\3.scp
Goto>end
else
endif
GetPixelColor>339,425,build2
if>build2=4400389
Macro>C:\*something* \My Documents\Macro Scheduler\2.scp
Goto>end
else
endif
GetPixelColor>339,401,build1
if>build1=4400389
Macro>C:\*something* \My Documents\Macro Scheduler\1.scp
Goto>end
else
MouseMove>270,430
Wait>1
LClick /*co*/
Press up
press enter
wait>4
Goto>start
endif 
Label>end

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts