canga wrote:Maybe give me an idea.
Code: Select all
[PMC Code v5.0.5]|||1|Window,2,Fast,0,1,Input,-1,-1,1|1|Macro1
Groups=
01|[Goto]|BloccaRefresh|1|0|Goto|||||
2|[LoopStart]|LoopStart|0|0|Loop|||||
3|WinActivate||1|333|WinActivate|e||||
4|Play Sound, Continue, FoundX, FoundY, 0|853, 745, 916, 794, *5 C:\a automate\x64\MacroCreator\Screenshots\Screen_20180423084434.png|1|0|ImageSearch|UntilFound|Window|||
5|If Image/Pixel Found||1|0|If_Statement|||||
6|Play Sound, Continue, FoundX, FoundY, 0|148, 745, 687, 804, *100 C:\a automate\x64\MacroCreator\Screenshots\Screen_20180423085130.png|1|0|ImageSearch||Window|Repart Until Disabled||
7|If Image/Pixel Found||1|0|If_Statement|||||
8|[MsgBox]|Both images were found.|1|0|MsgBox|0||||
9|[Goto]|Macro2|1|0|Goto|||||
10|[Else]|Else|1|0|If_Statement|||||
11|[MsgBox]|The first visual was found but the second visual was not found.|1|0|MsgBox|0||||
12|[End If]|EndIf|1|0|If_Statement|||||
13|[End If]|EndIf|1|0|If_Statement|||||
14|[LoopEnd]|LoopEnd|1|0|Loop|||||
[PMC Code v5.0.5]|||1|Window,2,Fast,0,1,Input,-1,-1,1|1|Macro2
Groups=Start:1
1|[MsgBox]|Both images were found.|1|0|MsgBox|0||||
I do not know if it's all right for me, I'll explain.
The macro that I need is:
1) Search image 1
- if image 1 found go to "search image 2"
- if not found, wait to find it
2) Search image 2
- if found, go to MACRO 2
- if not found "search image 3"
3) Search image 3
- if found, go to MACRO 2
- if not found "search image 2)
In practice, after finding image 1, I would like to run a loop to search for image 2 or image 3, as soon as it finds image 2 or image 3 launches the macro.
I do not know if I could explain.
Do I have to create 3 macros or 1 single macro I can do everything?
Thanks for helping me[/quote]
This should work.
[PMC Code v5.0.5]|||1|Window,2,Fast,0,1,Input,-1,-1,1|1|Macro1
Groups=
01|[Goto]|BloccaRefresh|1|0|Goto|||||
2|[LoopStart]|LoopStart|0|0|Loop|||||
3|WinActivate||1|333|WinActivate|e||||
4|Play Sound, Continue, FoundX, FoundY, 0|853, 745, 916, 794, *5 C:\a automate\x64\MacroCreator\Screenshots\Screen_20180423084434.png|1|0|ImageSearch|UntilFound|Window|Call again and again until you find it. Other steps will never pass unless Picture 1 is found.||
5|[Label]|again|1|0|Label|||If picture 2 is found and picture 3 is not found, it returns here.||
6|Play Sound, Continue, FoundX, FoundY, 0|148, 745, 687, 804, *100 C:\a automate\x64\MacroCreator\Screenshots\Screen_20180423085130.png|1|0|ImageSearch||Window|Repart Until Disabled||
7|If Image/Pixel Found||1|0|If_Statement|||||
8|[Goto]|Macro2|1|0|Goto|||If picture 2 is found||
9|[Else]|Else|1|0|If_Statement|||||
10|Play Sound, Continue, FoundX, FoundY, 0|148, 745, 687, 804, *100 C:\a automate\x64\MacroCreator\Screenshots\Screen_20180423085130.png|1|0|ImageSearch||Window|Repart Until Disabled||
11|If Image/Pixel Found||1|0|If_Statement|||||
12|[Goto]|Macro2|1|0|Goto|||If picture 3 is found||
13|[Else]|Else|1|0|If_Statement|||||
14|[Goto]|again|1|0|Goto|||If picture 3 is not found, picture 2 returns to n.||
15|[End If]|EndIf|1|0|If_Statement|||||
016|[MsgBox]|The first visual was found but the second visual was not found.|1|0|MsgBox|0||||
17|[End If]|EndIf|1|0|If_Statement|||||
18|[LoopEnd]|LoopEnd|1|0|Loop|||||
[PMC Code v5.0.5]|F8||1|Window,2,Fast,0,1,Input,-1,-1,1|1|Macro2
Groups=Start:1
1|[MsgBox]|Both images were found.|1|0|MsgBox|0||||