From c1b6b298ddd31d86f250e143ccc05a040022d38d Mon Sep 17 00:00:00 2001 From: Destiny Date: Mon, 11 Sep 2023 01:03:36 +0530 Subject: [PATCH 1/6] Program will exit if the browser focus is lost. --- GUI_v0.1.0.py | 29 +++++++++++++++++++++++++++++ requirements.txt | 1 + 2 files changed, 30 insertions(+) diff --git a/GUI_v0.1.0.py b/GUI_v0.1.0.py index 56e405a..710df3d 100644 --- a/GUI_v0.1.0.py +++ b/GUI_v0.1.0.py @@ -1,9 +1,11 @@ import tkinter as tk +from tkinter import messagebox from tkinter import ttk import pyautogui as auto import time import random import os +import pygetwindow as gw # Create the main application window root = tk.Tk() @@ -37,6 +39,18 @@ def close_app(): root.destroy() +def show_alert(title, message): + messagebox.showinfo(title, message) + + +def check_focus(required_window_id): + active_window_list_2 = gw.getWindowsWithTitle(gw.getActiveWindow().title) + current_browser = active_window_list_2[0]._hWnd + if required_window_id != current_browser: + show_alert("Error", "Browser focus lost. Exit(0)") + exit(0) + + # Default delay values browser_open_delay = 5 inspect_element_delay = 5 @@ -96,6 +110,10 @@ def execute_search(total_searches, browser_open_delay, inspect_element_delay, se # Pause the script execution for the specified browser open delay time.sleep(browser_open_delay) + # Getting the ID of the active window. + active_window_list = gw.getWindowsWithTitle(gw.getActiveWindow().title) + required_window_id = active_window_list[0]._hWnd + # Define a list of prefixes to be used in generating questions prefix = [ "What is", "Define", "Explain", "Meaning of", @@ -122,14 +140,21 @@ def execute_search(total_searches, browser_open_delay, inspect_element_delay, se "Recurrent Neural Network", "Random Forest", "Gradient Descent" ] + # To check whether the browser has lost focus or not. + check_focus(required_window_id) + # Opens Inspect Elements auto.hotkey('ctrl', 'shift', 'i') time.sleep(inspect_element_delay) + # To check whether the browser has lost focus or not. + check_focus(required_window_id) # This is the bring back focus to the browser from inspect elements auto.hotkey('alt') # Loop to automate a series of actions for i in range(0, total_searches): + # To check whether the browser has lost focus or not. + check_focus(required_window_id) if i == total_searches // 2: # Toggles device mode auto.hotkey('ctrl', 'shift', 'i') @@ -148,6 +173,9 @@ def execute_search(total_searches, browser_open_delay, inspect_element_delay, se auto.press("enter") # Press the "enter" key time.sleep(search_delay) # Pause for the specified search delay + # To check whether the browser has lost focus or not. + check_focus(required_window_id) + # To go to the Rewards site. auto.hotkey('ctrl', 'l') auto.typewrite("https://rewards.bing.com/") @@ -159,5 +187,6 @@ def execute_search(total_searches, browser_open_delay, inspect_element_delay, se # Re-enable Start Button start_button['state'] = 'enabled' + # Run the Tkinter main loop root.mainloop() diff --git a/requirements.txt b/requirements.txt index 1f21f99..5b82d20 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,2 @@ pyautogui +PyGetWindow From 737d0bde5ab72bd8ad1646652bd14bd34554f058 Mon Sep 17 00:00:00 2001 From: Destiny Date: Mon, 11 Sep 2023 01:11:55 +0530 Subject: [PATCH 2/6] Udated the name to GUI_v0.2.0 --- GUI_v0.1.0.py => GUI_v0.2.0.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename GUI_v0.1.0.py => GUI_v0.2.0.py (100%) diff --git a/GUI_v0.1.0.py b/GUI_v0.2.0.py similarity index 100% rename from GUI_v0.1.0.py rename to GUI_v0.2.0.py From b54c7ebe846ec99fef52aaec59fd9469e4ab6800 Mon Sep 17 00:00:00 2001 From: Destiny Date: Mon, 11 Sep 2023 15:06:00 +0530 Subject: [PATCH 3/6] Updated the README. Additionally, I created a 'Resources' folder and placed an image in it, which is now being used in the readme.md --- README.md | 32 +++++---------------------- Resources/Image/Delay_ScreenShot.png | Bin 0 -> 3399 bytes 2 files changed, 5 insertions(+), 27 deletions(-) create mode 100644 Resources/Image/Delay_ScreenShot.png diff --git a/README.md b/README.md index f28fb63..a959453 100644 --- a/README.md +++ b/README.md @@ -2,16 +2,18 @@ A program to automate web searches for quick Microsoft Rewards completion. (Both PC and Mobile) # Note -If your pc takes time to respond or the network is slow you can always change the wait time accordingly.
+Before starting, make sure the delays correspond to the time it takes to perform specific actions on your PC.

+![Resources/Image/Delay_ScreenShot.png](Resources/Image/Delay_ScreenShot.png)

+ ⚠️ Don't use the PC while the program is running.
-⚠️ You might have a difficult time stopping the program mid-way. Don't worry about it. It'll soon stop
+⚠️ You can stop the program by changing the active window.
⚠️ This code is provided for educational purposes only.
It serves as a demonstration of automating repetitive tasks using Python and tkinter.
Please use this code responsibly and in accordance with applicable laws and guidelines.
The author and contributors are not responsible for any misuse of this code.
Feel free to modify and distribute it while adhering to the license terms.

- +You can see the releases from here: https://github.com/StDensity/Microsoft-Rewards-Automation/releases # Thank you <3 @@ -19,28 +21,4 @@ Any improvements or bugs, let me know.
If you are new and don't know how to use it. let me know.

Good Day :) -# GUI_v1.6 -In this version you don't have to worry about making the screen full screen or not.
-Your Edge browser should be located at the following path: "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe".
-This path is the default for most PCs, so it should not be a problem. If it is not located there, you can edit the code accordingly.
- - - -# Version 1.0 -# Important -⚠️ To ensure that this works, the browser window should be open in full screen. If it isn't in full screen, please maximize it.
-⚠️ Your Edge browser should be located at the following path: "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe".
-This path is the default for most PCs, so it should not be a problem. If it is not located there, you can edit the code accordingly.
- -# How it works -It opens browser(if it isn't full screen make it before the code runs). Moves the mouse pointer to a coordinate of the search bar. -It is HARD CODED so if the screen size isn't the same then there will be an issue.
-Then it searches randomly based on the limited data provided. It will be better if you create your own data for search. (Use chatGPT)
-After 35 searches it will switch to mobile mode and does the search again.
-Finally it opens the rewards page. - -1. Use the GUI for easiest method. -2. Use auto_search_full_auto_toggle.py for non GUI method. It switches between PC and Mobile automatically. -3. auto_search_full_manual_toggle.py for non GUI manual PC and Mobile switch. - diff --git a/Resources/Image/Delay_ScreenShot.png b/Resources/Image/Delay_ScreenShot.png new file mode 100644 index 0000000000000000000000000000000000000000..3fbc5ec7209452ff6ad6747717afb8eb173895d3 GIT binary patch literal 3399 zcmcJSXH-+!7Jx61VXzR2lt@Pu6)6EU6cG@lNf9Yh6o{ZfN&-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}vbdHYGtGGhNXpt0%8!Aaxs!A*$Ccav~ zCE5L%t}1U6ZyAB9Y4x-@$y%#y%U%hI)zqaNv$a@BfPR2%1e;r)bF2f7+A z=sZ*x$qu5xP+kmUb@{YUGRWba%j6*pCmvR_-M9WaR}}L!(7B^}1uv-yRx~>XLGo+Y z5j`=<$KwKQj_EAhct@@;;ofL^wpS~>)vep?PnqfHLagfH?iWkv%*h3Hwj_)r!yn|^ zDP~Dy=GDCGsoL>hFJqIB#RdEZPUWj6O-t3I4;DDh3c1;}@3Vb_29}Bbl3=G zf;;_JLT->gG*=#ml>0|P-$iH3hVpHvq}hL-Qu+?d8k_n$cGui(X>$KckuMZgLy?y# zk7QI2(?W)K4=3|q!gR7b5FS0$Q-W|eA7(an_jvyw8}NV8rpNS}fk}n)G1^+}A0)uc M$m-lH19;qD0DfXGzyJUM literal 0 HcmV?d00001 From cde30d36786389cc4587ea51dc349f7e779b36ac Mon Sep 17 00:00:00 2001 From: Destiny Date: Mon, 11 Sep 2023 18:01:02 +0530 Subject: [PATCH 4/6] Added an option to close browser on search completion, slight changes to GUI --- GUI_v0.2.0.py | 36 +++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/GUI_v0.2.0.py b/GUI_v0.2.0.py index 710df3d..838100b 100644 --- a/GUI_v0.2.0.py +++ b/GUI_v0.2.0.py @@ -30,6 +30,9 @@ def start_search(): # Disable the Start button to prevent multiple clicks start_button['state'] = 'disabled' + # Disable Browser Close Check box + browser_close_checkbox.config(state="disabled") + # Call the execute_search function execute_search(total_searches, browser_open_delay, inspect_element_delay, search_delay) @@ -37,7 +40,11 @@ def start_search(): # Function to close the application def close_app(): root.destroy() + exit(0) +def close_browser(): + # ctrl + shift + w closes the active browser window + auto.hotkey('ctrl', 'shift', 'w') def show_alert(title, message): messagebox.showinfo(title, message) @@ -85,14 +92,19 @@ def check_focus(required_window_id): # Create and configure the Start button start_button = ttk.Button(frame, text="Start Search", command=start_search) -start_button.grid(row=4, columnspan=2, pady=20) +start_button.grid(row=4, columnspan=2, pady=10) # Create and configure the Close button close_button = ttk.Button(frame, text="Close", command=close_app) close_button.grid(row=5, columnspan=2, pady=10) +# Browser close check box. +browser_close_var = tk.IntVar() +browser_close_checkbox = ttk.Checkbutton(frame, text="Close browser on completion", variable=browser_close_var) +browser_close_checkbox.grid(row=6, columnspan=2, padx=10) + note_label = ttk.Label(frame, text="Note: The total number of searches will be halved for both PC and mobile searches.") -note_label.grid(row=6, columnspan=2, pady=10) +note_label.grid(row=7, columnspan=2, pady=10) # Function to execute the search @@ -133,8 +145,8 @@ def execute_search(total_searches, browser_open_delay, inspect_element_delay, se "K-means", "FNN", "Transfer Learning", "AutoML", "Hyperparameter Optimization", "Reinforcement Learning", "Deep Learning", "Regression Analysis", "Clustering", - "Dimensionality Reduction", "Backpropagation", "Overfitting", - "Underfitting", "Cross-Validation", "Natural Language Generation", + "Dimensionality Reduction", "Backpropagation", "Over fitting", + "Under fitting", "Cross-Validation", "Natural Language Generation", "Supervised Learning", "Unsupervised Learning", "Neural Network Architecture", "Bias-Variance Tradeoff", "Feature Engineering", "Convolutional Neural Network", "Recurrent Neural Network", "Random Forest", "Gradient Descent" @@ -175,14 +187,16 @@ def execute_search(total_searches, browser_open_delay, inspect_element_delay, se # To check whether the browser has lost focus or not. check_focus(required_window_id) + if browser_close_var: + close_browser() + else: + # To go to the Rewards site. + auto.hotkey('ctrl', 'l') + auto.typewrite("https://rewards.bing.com/") + auto.press("enter") - # To go to the Rewards site. - auto.hotkey('ctrl', 'l') - auto.typewrite("https://rewards.bing.com/") - auto.press("enter") - - # Closes Inspect Elements - auto.hotkey('ctrl', 'shift', 'i') + # Closes Inspect Elements + auto.hotkey('ctrl', 'shift', 'i') # Re-enable Start Button start_button['state'] = 'enabled' From 3fa08237503fa0eab5e9757009e9deb1171f4229 Mon Sep 17 00:00:00 2001 From: Destiny Date: Mon, 11 Sep 2023 18:26:59 +0530 Subject: [PATCH 5/6] Removed ./Other from git --- Other/auto_search_full_auto_toggle.py | 107 -------------------------- Other/auto_search_manual_toggle.py | 73 ------------------ 2 files changed, 180 deletions(-) delete mode 100644 Other/auto_search_full_auto_toggle.py delete mode 100644 Other/auto_search_manual_toggle.py diff --git a/Other/auto_search_full_auto_toggle.py b/Other/auto_search_full_auto_toggle.py deleted file mode 100644 index b55ec65..0000000 --- a/Other/auto_search_full_auto_toggle.py +++ /dev/null @@ -1,107 +0,0 @@ -# For mobile rewards, run the code again, and before it starts searching, -# press Ctrl+Shift+I (to open inspect element), and then press Ctrl+Shift+M (to toggle the device mode) - - -# Import the necessary libraries -import pyautogui as auto # Import the pyautogui library for automating GUI interactions -import time # Import the time library for adding delays -import random # Import the random library for generating random choices -import os # Import the os library for interacting with the operating system - -# Delay Variables -# If your pc is slow, or browser takes too much time then change these variables accordingly. -browser_open_delay = 2 -inspect_element_delay = 1 -search_delay = 1 - -# Define the path to the Microsoft Edge -# Put the path in a file called path.txt in the same directory. -# path_file = open('path.txt', 'r') -# browser_path = path_file.read() - -path = "C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe" - -# Open Microsoft Edge Canary using the specified shortcut -os.startfile(path) - -# Pause the script execution for 2 seconds to allow the browser to open -time.sleep(browser_open_delay) - -# Define a list of prefixes to be used in generating questions -prefix = [ - "What is", "Define", "Explain", "Meaning of", - "WOverview of RNN" - "hat are", "Characteristics of", "Importance of", "Advantages of", - "Disadvantages of", "Types of", "Function of", "History of", "Principles of", - "Components of", "Role of", "Purpose of", "Benefits of", "Concept of", - "Process of", "Techniques of", "Applications of", "Definition of", "Theory of", - "Overview of", "Challenges of", "Significance of", "Structure of", "Scope of", - "Framework of", "Objectives of", "Methods of", "Features of", "Classification of" -] - -# Define a list of words related to AI and machine learning -words = [ - "AI", "ANN", "CNN", "RNN", "NLP", "GAN", "SVM", "PCA", - "IoT", "AIOps", "RL", "ELMo", "BERT", "LSTM", "GRU", - "K-means", "FNN", "Transfer Learning", "AutoML", - "Hyperparameter Optimization", "Reinforcement Learning", - "Deep Learning", "Regression Analysis", "Clustering", - "Dimensionality Reduction", "Backpropagation", "Overfitting", - "Underfitting", "Cross-Validation", "Natural Language Generation", - "Supervised Learning", "Unsupervised Learning", "Neural Network Architecture", - "Bias-Variance Tradeoff", "Feature Engineering", "Convolutional Neural Network", - "Recurrent Neural Network", "Random Forest", "Gradient Descent" -] - -# Opens Inspect Elements -auto.hotkey('ctrl', 'shift', 'i') -time.sleep(inspect_element_delay) - -# Loop to automate a series of actions -for i in range(0, 70): - if i == 35: - # We are opening and closing inspect element so that the inspect element tab will get focus. - auto.hotkey('ctrl', 'shift', 'i') - time.sleep(inspect_element_delay) - auto.hotkey('ctrl', 'shift', 'i') - time.sleep(inspect_element_delay) - # Toggles device mode - auto.hotkey('ctrl', 'shift', 'M') - time.sleep(inspect_element_delay) - # Click at the search bar. If it isn't then update the x and y. - auto.click(962, 51, clicks=1, button='left') - - # Generate a random question by choosing a random prefix and word - auto.typewrite(random.choice(prefix) + " " + random.choice(words)) - auto.press("enter") # Press the "enter" key - time.sleep(search_delay) # Pause for 1 second - -# To go to the Rewards site. -auto.click(962, 51, clicks=1, button='left') -auto.typewrite("https://rewards.bing.com/") -auto.press("enter") - -# Closes Inspect Elements -auto.hotkey('ctrl', 'shift', 'i') -######################### - - -# You don't have to run this part. -# I've included it here just in case you want to obtain the mouse position, -# allowing you to adjust the click coordinates if needed. -# While running the code below, please ensure that the code above is commented out. - - - -# import pyautogui -# for i in range(0,10): -# time.sleep(1) -# # Get the current mouse pointer location as a tuple -# pos = pyautogui.position() -# -# # Unpack the X and Y coordinates from the tuple -# x, y = pos -# -# # Print the coordinates -# print(f"Mouse pointer location - X: {x}, Y: {y}") - diff --git a/Other/auto_search_manual_toggle.py b/Other/auto_search_manual_toggle.py deleted file mode 100644 index 0f32887..0000000 --- a/Other/auto_search_manual_toggle.py +++ /dev/null @@ -1,73 +0,0 @@ -# Just run the code and the program will open the browser and starts searching. -# Don't Forget to update the path of the browser. - -# For mobile rewards, run the code again, and before it starts searching, -# press Ctrl+Shift+I (to open inspect element), and then press Ctrl+Shift+M (to toggle the device mode) - -# Import the necessary libraries -import pyautogui as auto # Import the pyautogui library for automating GUI interactions -import time # Import the time library for adding delays -import random # Import the random library for generating random choices -import os # Import the os library for interacting with the operating system - -# Define the path to the Microsoft Edge -# Put the path in a file called path.txt in the same directory. -# path_file = open('path.txt', 'r') -# browser_path = path_file.read() - -path = "C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe" - -# Open Microsoft Edge Canary using the specified shortcut -os.startfile(path) - -# Pause the script execution for 2 seconds to allow the browser to open -time.sleep(2) - -# Define a list of prefixes to be used in generating questions -prefix = ["What is", "Define", "Explain", "Meaning of"] - -# Define a list of words related to AI and machine learning -words = ["AI", "ANN", "CNN", "RNN", "NLP", "GAN", "SVM", "PCA", - "IoT", "AIOps", "RL", "ELMo", "BERT", "LSTM", "GRU", - "K-means", "FNN", "Transfer Learning", "AutoML", - "Hyperparameter Optimization", "Reinforcement Learning", - "Deep Learning", "Regression Analysis", "Clustering", - "Dimensionality Reduction", "Backpropagation", "Overfitting", - "Underfitting", "Cross-Validation", "Natural Language Generation", - "Supervised Learning", "Unsupervised Learning", "Neural Network Architecture", - "Bias-Variance Tradeoff", "Feature Engineering", "Convolutional Neural Network", - "Recurrent Neural Network", "Random Forest", "Gradient Descent"] - -# Loop to automate a series of actions -for i in range(0, 35): - # Click at the serach bar. If it isn't then update the x and y. - auto.click(962, 51, clicks=1, button='left') - - # Generate a random question by choosing a random prefix and word - auto.typewrite(random.choice(prefix) + random.choice(words)) - auto.press("enter") # Press the "enter" key - time.sleep(1) # Pause for 1 seconds - - -######################### - - -# You don't have to run this part. -# I've included it here just in case you want to obtain the mouse position, -# allowing you to adjust the click coordinates if needed. -# While running the code below, please ensure that the code above is commented out. - - - -# import pyautogui -# for i in range(0,10): -# time.sleep(1) -# # Get the current mouse pointer location as a tuple -# pos = pyautogui.position() -# -# # Unpack the X and Y coordinates from the tuple -# x, y = pos -# -# # Print the coordinates -# print(f"Mouse pointer location - X: {x}, Y: {y}") - From c7bf98003bb40c386c8741345564c81f51ce4591 Mon Sep 17 00:00:00 2001 From: Destiny Date: Mon, 11 Sep 2023 18:44:14 +0530 Subject: [PATCH 6/6] Enabled the browser close checkbox after program completes --- GUI_v0.2.0.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/GUI_v0.2.0.py b/GUI_v0.2.0.py index 838100b..0ee4a9f 100644 --- a/GUI_v0.2.0.py +++ b/GUI_v0.2.0.py @@ -201,6 +201,9 @@ def execute_search(total_searches, browser_open_delay, inspect_element_delay, se # Re-enable Start Button start_button['state'] = 'enabled' + # Disable Browser Close Check box + browser_close_checkbox.config(state="enabled") + # Run the Tkinter main loop root.mainloop()