Загрузка...

Automation - auto send 100 sms from excel file data with python scripting and Windows Phone Link

Python automation

I created this method because I needed to send 100 sms to 100 different people, don’t worry it was not spam — It was an invitation to party. After searching a lot on internet I decided to create a script to automate sending customised SMS. For this I used python script with it’s pyautogui and pyperclip libraries and a special feature in Microsoft Phone Link where we can send sms directly from pc. The mobile operators in India allow only 100 messages per day to prevent spam and fair use, hence I implemented a limit of 100 sms in one run of script.

The script requires following

An xlsx file containing mobile number in one column with column name “Mobile Number” and another column with custom message to be sent named “Message”. Keep in mind the spelling else script won’t run. Also keep the message words in limit to prevent extra charges. Put
MS Windows 11 with Python 3 installed along with pyautogui, pandas, pyperclip libraries installed.
Microsoft Phone link installed in PC as well as Android phone compatible with Link to Windows
Execution steps

Create a xlsx file with “Mobile Number” and “Message” column heading. Put mobile number and message carefully. Sample xlsx file named sampleMessages.xlsx is available on github. Save this file in a new folder with any name.
First copy above code in a file with name `autoSMSScript.py` or any other name and put this file in same folder as your excel file created above
Now open Microsoft Phone Link and connect your mobile from which you need sms to be sent. Go to Messages tab in phone link and keep it open
Now open Powershell, navigate to your folder where you have stored python file and xlsx file.
now run following command in command line

python3 autoSMSScript.py sampleMessages.xlsx

or

python autoSMSScript.py sampleMessages.xlsx

If the script runs successfully, console will show following message

`switch to your target page, Starting in 2 seconds.`

When you see this message, immediately switch to phone link software and keep message tab open. Then voila, script will automatically paste the mobile number in To column and Paste message in message box.
Now, at this point, I have commented out the send command so the above script will not send any message. This is done to ensure safety from user error. Once you understand and feel confident, uncomment this line in code # pyautogui.press(“enter”).

Видео Automation - auto send 100 sms from excel file data with python scripting and Windows Phone Link канала The Typing Lab
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять