PMC Help

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
andrey_jb15
Posts: 1
Joined: 19 Sep 2019, 15:18

PMC Help

Post by andrey_jb15 » 19 Sep 2019, 15:41

Hello

I'm sorry if I'm doing anything wrong, I'm new to the forum and to automation.

I'm using Pulover's Macro Creator. In my current project, which I use a lot, I have many tabs (+- 120). They all have small pieces of commands for the many different actions I need.

My problem is when I started using "GoTo". If i put in one tab to "GoSub" another, it goes and does then comes back and continues. However, I needed to include many picture searches and put "If" commands in the "Child" tab, and then I included if not found, GoTo the beginning again "beginning of the Child tab".

Problem: This last GoTo interrupted the "Mother" tab GoTO, and the command stop after "Child" tab finishes.

How can I make it go back to the Mother tab and continue?

OBS: Sorry for the massage boxes, they were supposed to be funny...


These are the lines I have:

Code: Select all

Mother:
Gosub, WhatsSelectWindow
Gosub, WhatsSearchName
Gosub, WhatsSelectTextField
Gosub, TXTWeMissedYou
Gosub, WhatsCopyFirstName
Gosub, WhatsSelectTextField
Send, {Escape}
Sleep, 10
Gosub, WhatsSubstituteXxxx


Child:
LabelWhaytsSearchName2:
CoordMode, Pixel, Window
ImageSearch, FoundX, FoundY, 0, 0, 1920, 1080, C:\Users\Andrey\OneDrive\Wizard\Fosters\Macros\Shots\Screen_20190919163841.png
CenterImgSrchCoords("C:\Users\Andrey\OneDrive\Wizard\Fosters\Macros\Shots\Screen_20190919163841.png", FoundX, FoundY)
If ErrorLevel = 0
	Click, %FoundX%, %FoundY% Left, 1
If ErrorLevel
{
    CoordMode, Pixel, Window
    ImageSearch, FoundX, FoundY, 0, 0, 1920, 1080, C:\Users\Andrey\OneDrive\Wizard\Fosters\Macros\Shots\Screen_20190919163924.png
    CenterImgSrchCoords("C:\Users\Andrey\OneDrive\Wizard\Fosters\Macros\Shots\Screen_20190919163924.png", FoundX, FoundY)
    If ErrorLevel = 0
    	Click, %FoundX%, %FoundY% Left, 1
    Sleep, 10
    Goto, LabelWhaytsSearchName2
}
Sleep, 300
Send, {Control Down}{v}{Control Up}
Sleep, 300
Send, {Enter}
Sleep, 10
LabelWhasSerchName:
CoordMode, Pixel, Window
ImageSearch, FoundX, FoundY, 0, 0, 1920, 1080, C:\Users\Andrey\OneDrive\Wizard\Fosters\Macros\Shots\Screen_20190919164555.png
CenterImgSrchCoords("C:\Users\Andrey\OneDrive\Wizard\Fosters\Macros\Shots\Screen_20190919164555.png", FoundX, FoundY)
If ErrorLevel = 0
	Click, %FoundX%, %FoundY%, 0
Sleep, 10
If ErrorLevel = 0
{
    MsgBox, 0, You fuking retard. Another error, 
    (LTrim
    ctr + space
    Error in search name whats
    )
}
Else
{
    CoordMode, Pixel, Window
    ImageSearch, FoundX, FoundY, 0, 0, 1920, 1080, C:\Users\Andrey\OneDrive\Wizard\Fosters\Macros\Shots\Screen_20190919163841.png
    CenterImgSrchCoords("C:\Users\Andrey\OneDrive\Wizard\Fosters\Macros\Shots\Screen_20190919163841.png", FoundX, FoundY)
    If ErrorLevel = 0
    	Click, %FoundX%, %FoundY% Left, 1
    If ErrorLevel
    {
        Goto, LabelWhasSerchName
    }
}
Send, {Control Down}{v}{Control Up}
Sleep, 10
[Mod edit: [code][/code] tags added.]

Return to “Ask for Help (v1)”