Metadata-Version: 2.1
Name: criar-automacoes
Version: 0.1.7
Summary: 
Author: leomoraesguitar
Author-email: 123950901+leomoraesguitar@users.noreply.github.com
Requires-Python: >=3.11,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: keyboard (>=0.13.5,<0.14.0)
Requires-Dist: pyautogui (>=0.9.54,<0.10.0)
Requires-Dist: pysimplegui (>=4.60.5,<5.0.0)
Description-Content-Type: text/markdown

# 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()
