-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathafastaBot.py
More file actions
60 lines (50 loc) · 1.33 KB
/
afastaBot.py
File metadata and controls
60 lines (50 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
import pyautogui as pg
from tkinter import *
import clipboard
import time
import pandas as pd
import pyodbc
import os.path
#matricula = [42234,95850,150473]
bola_verde = pg.locateOnScreen('./bola_verde.png')
#relação dos funcionarios.
matricula =[103543,97500]
for x in matricula:
time.sleep(1)
prog1 = pg.locateOnScreen('./lupa.png')
prog2 = pg.locateOnScreen('./lupa2.png')
if( prog1 is None):
click = prog2
else:
click = prog1
pg.click( (click.left)-15, (click.top)+5 )
pg.write( str(x) )
pg.click(click)
pg.click(interval = 0.2)
flag = False
cont = 0
while (True):
filial=pg.locateOnScreen('./filial.png')
print(filial)
if (filial is not None):
print('entrou')
flag = False
break
else:
print('Não Encontrado')
flag=True
break
if(flag):
continue
pg.click(bola_verde)
pg.press('f')
while(True):
ausencia= pg.locateOnScreen('./ausencia.png')
if (ausencia is not None):
break
pg.click(ausencia)
while(True):
manutencao= pg.locateOnScreen('./manutencao.png')
if (manutencao is not None):
break
pg.click(manutencao)