how to send auto message on skype using python on one click
Guys, as requested by my subscribers, I tried to share some basic Python code for sending a Skype auto-message with a single click. Before running the Python script, you have to install Python and some basic libraries. Hope you know the basics of Python programming.
#!/usr/bin/env python
# coding: utf-8
import pandas as pd
import getpass
import tkinter as tk
from skpy import Skype, SkypeChats
# Create a tkinter GUI window
window = tk.Tk()
window.title("Skype Message Sender")
window.geometry("400x400")
# Define a function to send the message
def send_message():
excel_path = excel_file_path.get()
# Read Excel file using pandas
df = pd.read_excel(excel_path, sheet_name="Grid")
# Load the data from the Excel file into a pandas DataFrame
# Filter the sheet and extract all the skype id's where we want to send the message
my_list = df.loc[df['Send Message'] == "Yes", 'Chat ID'].tolist()
message = message_box.get("1.0", "end-1c")
userid = skype_id_box.get()
password = password_box.get()
# Skype Login
slogin = Skype(userid, password)
# Send message to Skype individual chat
for i in my_list:
contact = slogin.chats[i]
contact.sendMsg(message)
status_text.set("Message sent successfully!")
# # Add GUI elements to the window
excel_file_label = tk.Label(text="Excel file path:")
excel_file_label.pack()
excel_file_path = tk.Entry(width=30)
excel_file_path.pack()
skype_id_label = tk.Label(text="Skype ID:")
skype_id_label.pack()
skype_id_box = tk.Entry(width=30)
skype_id_box.pack()
password_label = tk.Label(text="Password:")
password_label.pack()
password_box = tk.Entry(width=30, show="*")
password_box.pack()
message_label = tk.Label(text="Message:")
message_label.pack()
message_box = tk.Text(height=10, width=30)
message_box.pack()
send_button = tk.Button(text="Send message", command=send_message)
send_button.pack()
status_text = tk.StringVar()
status_label = tk.Label(textvariable=status_text)
status_label.pack()
# Start the GUI event loop
window.mainloop()
- Excel file path
- Skype ID
- Skype Password
- Message
Comments
Post a Comment