Uploaded Dino and Surf scripts.
commit
732836b0f8
|
@ -0,0 +1,20 @@
|
||||||
|
import time
|
||||||
|
import pyautogui
|
||||||
|
import webbrowser
|
||||||
|
|
||||||
|
# Open Chrome
|
||||||
|
chrome_path = "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe"
|
||||||
|
webbrowser.register('chrome', None, webbrowser.BackgroundBrowser(chrome_path))
|
||||||
|
webbrowser.get('chrome').open("http://google.com") # This opens Chrome to a default page
|
||||||
|
|
||||||
|
# Give it a few seconds to load
|
||||||
|
time.sleep(1)
|
||||||
|
|
||||||
|
# Focus on the address bar
|
||||||
|
pyautogui.hotkey('ctrl', 'l')
|
||||||
|
|
||||||
|
# Type the URL for the Dinosaur game
|
||||||
|
pyautogui.typewrite('chrome://dino', interval=0.02)
|
||||||
|
|
||||||
|
# Press Enter
|
||||||
|
pyautogui.press('enter')
|
|
@ -0,0 +1,16 @@
|
||||||
|
@echo off
|
||||||
|
|
||||||
|
::Check if python is installed
|
||||||
|
:check
|
||||||
|
python --version 3>NUL
|
||||||
|
if errorlevel 1 goto errorNoPython
|
||||||
|
|
||||||
|
::If python is installed then it runs the program
|
||||||
|
pip install pyautogui
|
||||||
|
exit
|
||||||
|
|
||||||
|
::Install python
|
||||||
|
:errorNoPython
|
||||||
|
python
|
||||||
|
timeout /t 60
|
||||||
|
goto check
|
|
@ -0,0 +1,20 @@
|
||||||
|
import time
|
||||||
|
import pyautogui
|
||||||
|
import webbrowser
|
||||||
|
|
||||||
|
# Open Edge
|
||||||
|
edge_path = "C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe"
|
||||||
|
webbrowser.register('edge', None, webbrowser.BackgroundBrowser(edge_path))
|
||||||
|
webbrowser.get('edge').open("http://bing.com") # This opens Edge to a default page
|
||||||
|
|
||||||
|
# Give it a few seconds to load
|
||||||
|
time.sleep(1)
|
||||||
|
|
||||||
|
# Focus on the address bar
|
||||||
|
pyautogui.hotkey('ctrl', 'l')
|
||||||
|
|
||||||
|
# Type the URL for the Surfing game
|
||||||
|
pyautogui.typewrite('edge://surf', interval=0.02)
|
||||||
|
|
||||||
|
# Press Enter
|
||||||
|
pyautogui.press('enter')
|
Loading…
Reference in New Issue