Skip to main content

No project description provided

Project description

pacote para criação de automações

Para importar:

from criar_automacoes import Automatization, pyautogui, sg,Thread, kb, Gerar_Script_Automacao


Gerar_Script_Automacao()

Estrutura básica de uma automação:

from criar_automacoes import *

p = Automatization()
try:
    p.CareegarPontos('pontos')
except:
    #Esta parte eh apenas na criacao do codigo
    listadepontos = ['cruz', 'criar_novo_contato', 'campo_nome', 'telefone_cruz', 'celular', 'campo_telefone', 'ok']    
    for i in listadepontos:
        i = p.Criar_ponto(i)
        if i == None:
            break

    if i != None:
        p.SalvarPontos('pontos')

# Define o metodo Main
def Main():
    p.CareegarPontos('pontos')

    cruz = p.Coordenada('cruz')
    criar_novo_contato = p.Coordenada('criar_novo_contato')
    campo_nome = p.Coordenada('campo_nome')
    telefone_cruz = p.Coordenada('telefone_cruz')
    celular = p.Coordenada('celular')
    campo_telefone = p.Coordenada('campo_telefone')
    ok = p.Coordenada('ok')

    pyautogui.sleep(2)
    t = 1
    pyautogui.click(cruz, duration=t)
    pyautogui.sleep(0.5)
    pyautogui.click(criar_novo_contato, duration=t)
    pyautogui.sleep(0.5)
    pyautogui.click(campo_nome, duration=t)
    pyautogui.sleep(0.5)
    pyautogui.click(telefone_cruz, duration=t)
    pyautogui.sleep(0.5)
    pyautogui.click(celular, duration=t)
    pyautogui.sleep(0.5)
    pyautogui.click(campo_telefone, duration=t)
    pyautogui.sleep(0.5)
    pyautogui.click(ok, duration=t)

def Configurar():
    p.CareegarPontos('pontos')
    p.Configurar()

def Rodar():
    print(f'''
Pressione 'shift+space' para rodar a automacao
Pressione 'config' para configurar os pontos da tela
    '''
    )
    kb.add_word_listener('config', Configurar)
    kb.add_hotkey('shift+space', Main)
    kb.wait()
if __name__ == '__main__':
    Rodar()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

criar_automacoes-0.1.7.tar.gz (3.1 kB view hashes)

Uploaded Source

Built Distribution

criar_automacoes-0.1.7-py3-none-any.whl (3.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page