is possible do this?

Advanced Macro Recorder/Editor.

Moderator: Pulover

Furbach
Posts: 1
Joined: 30 Jun 2020, 17:52

is possible do this?

Post by Furbach » 30 Jun 2020, 18:07

Hi, guys, i wanna know it there is funcion for do this.

I post a screen for explayin better the answer

I have make a simple macro for find the image in the red box, when the script found it i need to search some specific pixel on the right(near the yellow box area)

But how can i add some offset?

if i found the red box image at pixels 500x500, how can i add the offset for search if 20 pixel to the right there are a specific pixel color?
Attachments
scren forunm.png
scren forunm.png (490.86 KiB) Viewed 1395 times
bluefire
Posts: 35
Joined: 15 Dec 2018, 11:17
Location: Türkiye

Re: is possible do this?

Post by bluefire » 06 Nov 2020, 03:42

Code: Select all

[PMC Code v5.0.4]|F10||1|Screen,2,Fast,0,1,Input,-1,-1,1|1|Macro1
Groups=Start:1
1|Continue, Continue, FoundX, FoundY, 1|0, 0, 1920, 1080, D:\PuloversMacroCreator-Portable-5.04\MacroCreatorPortable\x64\MacroCreator\Screenshots\Screen_20201106113752.png|1|0|ImageSearch||Window|||
2|If Image/Pixel Found||1|0|If_Statement|||||
3|Left Click, Continue, FoundX, FoundY, 1|0, 0, 1920, 1080, D:\PuloversMacroCreator-Portable-5.04\MacroCreatorPortable\x64\MacroCreator\Screenshots\Screen_20201106113919.png|1|0|ImageSearch||Screen|||
4|Move|FoundX, FoundY, 0|1|10|Click|||||
5|[Else]|Else|1|0|If_Statement|||||
6|Return||1|0|Return|||||
7|[End If]|EndIf|1|0|If_Statement|||||
Information worth everything....
User avatar
Pulover
Posts: 612
Joined: 29 Sep 2013, 19:51
Location: Brazil
Contact:

Re: is possible do this?

Post by Pulover » 06 Nov 2020, 05:52

Furbach wrote:
30 Jun 2020, 18:07
But how can i add some offset?
You can use the output variables of ImageSearch inside the If Image Found statement and create variables for height and width from them using the variables window, e.g. FoundW := FoundX + 100, then use the variables in the coordinates of PixelSearch.
Rodolfo U. Batista
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)
Post Reply

Return to “Pulovers Macro Creator”