DD
Size: a a a
DD
8
DD
DD
8
DD
DD
БИ
КК
БИ
КК
import pyautogui as pag
import keyboard
import pyperclip
import openpyxl as opx
from time import sleep as sl
from datetime import datetime
Form, _ = uic.loadUiType("untitled.ui")
class Ui(QtWidgets.QDialog, Form):
def __init__(self):
super().__init__()
self.setupUi(self)
self.pushButton_2.clicked.connect(self.showDialog)
self.pushButton_3.clicked.connect(self.spam)
def showDialog(self, WORKBOOK_PATH):
mapToData, ok = QInputDialog.getText(self, 'Input Dialog',
'Вставте путь к базе :')
if ok:
self.label_4.setText(str(mapToData))
def setXY(self):
pos = pag.position()
self.label_6.setText(str(pos))
def spam(self, mapToData):
x1 = self.lineEdit_2.text()
x1 = int(x1)
x2 = self.lineEdit_4.text()
x2 = int(x2)
x3 = self.lineEdit_7.text()
x3 = int(x3)
y1 = self.lineEdit_3.text()
y1 = int(y1)
y2 = self.lineEdit_6.text()
y2 = int(y2)
y3 = self.lineEdit_5.text()
y3 = int(y3)
WORKBOOK_PATH = mapToData
workbook = opx.load_workbook(WORKBOOK_PATH)
first_sheet = workbook.worksheets[0]
for row in first_sheet.rows:
phone = row[1].value # Телефон
name = row[0].value # Название
sl(1)
speach = f"З{name}', добрый день " # Спич
pyperclip.copy(phone)
pag.click(x=x1, y=y1, interval=2) # Поиск по контакту , 1 значение
keyboard.press_and_release('ctrl+v') # Вставляем номер
sl(1)
pag.click(x=x2, y=y2, interval=2) # Входим в личку , 2 значение
sl(1)
pyperclip.copy(speach) # Копируем спич
keyboard.press_and_release('ctrl+v') # Вставляем спич
sl(1)
keyboard.press_and_release('enter')
sl(1)
pag.click(x=x3, y=y3, interval=2) # Выход с лички , 3 значение
app = QtWidgets.QApplication(sys.argv) # Новый экземпляр QApplication
w = Ui()
w.setFixedSize(490, 297)
w.show()
sys.exit(app.exec_())
КК
БИ
КК
КК
𝑀
@bot.message_handler(content_types=['text'])
def
send_text(message):
if message.text == 'Привет':
bot.send_message(message.chat.id, 'Привет, мой создатель')
elif message.text == 'Пока':
bot.send_message(message.chat.id, 'Прощай, создатель')
🐍