예제 #1
0
def lock(): 
    pyautogui.press('f6')
    pyautogui.write(lock_command)
    pyautogui.press('enter') 
예제 #2
0
            if time.time() > start + 10:
                #print("breaking out...")
                break
        else:
            #this only runs if I didn't break
            #print("fired!")
            continue

        #This state is only reachable if I break
        #I manually increase the count because the code that normally increases the count when the count is verified won't run when I'm in this state
        currentnumber += 1
        break

    #click in the textbox again to start writing
    pyautogui.click(410 if side else 967, 679)
    pyautogui.write(str(currentnumber))
    pyautogui.press("enter")
    #print(currentnumber)

    #remember the last number so I can check if Discord hasn't registered my message yet
    lastnumber = currentnumber

    #Now let's check if someone messed it up
    if getpixel(347, 520) == (103, 89, 207) or getpixel(774, 588) == (
            103, 88,
            207):  #coordinates and RGB values of the purple +1 countbot logo
        #Count bot is really wierd when restarting a count
        #The best way is to just spam "1" until it registers
        while ((pixel := getpixel(404 if side else 829, 627))
               not in accepted_pixels):
            pyautogui.write("1")
예제 #3
0
import pyautogui
import time
import csv

# clear known host
pyautogui.hotkey("winleft")
time.sleep(1)
pyautogui.write("terminal")
pyautogui.press("enter")
time.sleep(1)
pyautogui.write("echo > ~/.config/freerdp/known_hosts2")
pyautogui.press("enter")
pyautogui.hotkey("ctrl", "shift", "q")

with open("servers.txt") as csv_file:
    csv_reader = csv.reader(csv_file, delimiter=",")
    for row in csv_reader:
        address = row[0]
        password = row[1]

        # open remmina
        pyautogui.hotkey("winleft")
        time.sleep(1)
        time.sleep(1)
        pyautogui.write("remmina")
        time.sleep(1)
        pyautogui.press("enter")
        time.sleep(1)

        # login to RDP
        pyautogui.write(address)  # IP address
예제 #4
0
import re
import pyautogui

pyautogui.PAUSE = 1
pyautogui.doubleClick(x=618, y=48)
pyautogui.click(x=50,y=150)
pyautogui.PAUSE = 0
pyautogui.click(x=620, y=950)
pyautogui.PAUSE = 0.5

for line in open('bee_movie_script.txt'):
    line = re.sub('[^A-Za-z0-9 ]','',line)
    pyautogui.write("/tts " + line)
    pyautogui.press('enter')
    
def add_caption(driver, caption):
    time.sleep(1)
    text_area = driver.find_element_by_xpath('//textarea')
    text_area.click()
    pyautogui.write(caption)
import pyautogui as auto
import subprocess as sub
import time

sub.Popen(['C:\\Users\\Public\\Putty.exe'])
time.sleep(2)
auto.write('192.168.0.51')
time.sleep(0.5)
auto.press('enter')
time.sleep(0.7)
auto.write('pi')
auto.press('enter')
time.sleep(0.5)
auto.write('cd /home/pi/Desktop/RaspCode/RaspCode')
auto.press('enter')
auto.write('python Py.py')
auto.press('enter')
예제 #7
0
        'robocop': 5,
        'comments':
        'Protect the innocent. Serve the public trust. Uphold the law.'
    },
]

pyautogui.PAUSE = 0.5
print('Ensure that the browser window is active and the form is loaded!')

for person in formData:
    # give user chance to kill script
    print('5 SECOND PAUSE TO LET USER PRESS CTRL-C')
    time.sleep(5)

    print(f'Entering {person["name"]} info')
    pyautogui.write(['\t', '\t'])

    # fill out name field
    pyautogui.write(person['name'] + '\t')

    # fill out greatest fear field
    pyautogui.write(person['fear'] + '\t')

    # fill out wizards field
    if person['source'] == 'wand':
        pyautogui.write(['down', 'enter', '\t'], 0.5)
    elif person['source'] == 'amulet':
        pyautogui.write(['down', 'down', 'enter', '\t'], 0.5)
    elif person['source'] == 'crystal ball':
        pyautogui.write(['down', 'down', 'down', 'enter', '\t'], 0.5)
    elif person['source'] == 'money':
예제 #8
0
def guns(): 
    pyautogui.press('f6')
    pyautogui.write(w_command)
    pyautogui.press('enter')
    pyautogui.press('enter')
예제 #9
0
def jetpack(): 
    pyautogui.press('f6')
    pyautogui.write(jp_command)
    pyautogui.press('enter')
예제 #10
0
def go(): 
    pyautogui.press('f6')
    pyautogui.write(go_command)  
예제 #11
0
def lcar(): 
    pyautogui.press('f6')
    pyautogui.write(lcar_command)
    pyautogui.press('enter')
    pyautogui.press('enter')
예제 #12
0
def teleport(): 
    pyautogui.press('f6')
    pyautogui.write(t_command)
    pyautogui.press('enter') 
예제 #13
0
def cars(): 
    pyautogui.press('f6')
    pyautogui.write(v_command)
    pyautogui.press('enter') 
예제 #14
0
def god(): 
    pyautogui.press('f6')
    pyautogui.write(god_command)
    pyautogui.press('enter') 
예제 #15
0
 def set_signal2_delay(self, delay: float):
     self.__click(self._s2_delay, 2)
     pag.write(str(delay))
예제 #16
0
def para(): 
    pyautogui.press('f6')
    pyautogui.write(para_command)
    pyautogui.press('enter')
예제 #17
0
 def set_signal2_amplitude(self, amplitude: float):
     self.__click(self._s2_amp, 2)
     pag.write(str(amplitude))
예제 #18
0
import pyautogui as pg
import time

time.sleep(10)

for i in range(1000):
    pg.write("You are under attack!")
    pg.press('enter')
예제 #19
0
import pyautogui as py
import pyperclip as pc
import time

time.sleep(1)

py.hotkey('win','r')
py.write('notepad')
time.sleep(1)
py.hotkey('enter')

# 컴퓨터.. 전기.. 기계... 용접.. 자동차... 화학...토목... 건축..
def copypa(text):
    pc.copy(text)
    py.hotkey('ctrl','v')

copypa('한글한글한글')
예제 #20
0
 def set_duration(self, duration: int):
     self.__click(self._dur_input, 2)
     pag.write(str(duration))
예제 #21
0
    "The script will try to automatically locate these buttons, however when prompted, you may need to follow the directions"
)
print("Please open google voice to the text screen.")
input("Press enter to continue.")

#locates 'send new message' button
try:
    sendnewmessage = py.locateCenterOnScreen('images/send_new_message.png')
except:
    terminalwindow.activate()
    input("Move your mouse to the 'send new message' button and press enter.")
    sendnewmessage = py.position()

py.click(sendnewmessage)
time.sleep(1)
py.write("360")  #needed to get the following button to appear
time.sleep(1)
py.press('enter')
time.sleep(.5)

#locates 'type a name or number' button
try:
    tomessage = py.locateCenterOnScreen("images/type_a_name.png")
except:
    terminalwindow.activate()
    input(
        "Move your mouse to where you enter the to number, then press enter.")
    tomessage = py.position()
py.click(tomessage)

#locates where you type the message
예제 #22
0
 def set_amplitude(self, amplitude: int):
     self.__click(self._amp_input, 2)
     pag.write(str(amplitude))
def open_img(path):
    time.sleep(2)
    pyautogui.write(path)
    time.sleep(1)
    pyautogui.press('enter')
예제 #24
0
 def set_frequency(self, frequency: int):
     self.__click(self._freq_input, 2)
     pag.write(str(frequency))
예제 #25
0
import pyautogui as p
from time import sleep

# Identified position of Google Chrome in Desktop
# sleep(2)
# print(p.position())

p.doubleClick(x=121, y=121)
sleep(4)
p.write('https://www.udemy.com/  ')
sleep(1)
window = p.getActiveWindow()
window.maximize()
sleep(3)
p.press('enter')
sleep(4)
window = p.getActiveWindow()
window.maximize()
sleep(5)
localSearch = p.locateOnScreen('Pesquisa.png', confidence=0.9)
# print(localSearch)
# valor das medidas pode mudar de acordo com a resolução do
#  monitor utilizado.

locateSearch = p.center(localSearch)
print(locateSearch)
p.click(locateSearch)
sleep(2)
p.write('RPA')
p.press('enter')
sleep(2)
예제 #26
0
 def set_deviation(self, deviation: int):
     self.__click(self._dev_input, 2)
     pag.write(str(deviation))
예제 #27
0
import pyautogui as pg
import time
time.sleep(10)
for i in range(10000):
    pg.write('call utha be')
    pg.press('Enter')
예제 #28
0
 def set_noise(self, noise: float):
     self.__click(self._noise_input, 2)
     pag.write(str(noise))
예제 #29
0
driver=webdriver.Chrome(executable_path=##########Enter chromedriver path)
driver.get('https://open.spotify.com/')
name=input('Enter File Name: ')
driver.find_element_by_xpath('//*[@id="main"]/div/div[2]/div[1]/header/div[4]/button[2]').click()

## Email and Pass
sleep(10)
driver.find_element_by_xpath('//*[@id="login-username"]').send_keys(######Enter Mail)
driver.find_element_by_xpath('//*[@id="login-password"]').send_keys(######Enter Pass       +Keys.ENTER)


## Creating the Playlist
sleep(10)
driver.find_element_by_xpath('//*[@id="main"]/div/div[2]/div[2]/nav/div[2]/div/div/div[1]/button').click()
sleep(1)
write(name)
driver.find_element_by_xpath('//*[@id="main"]/div/div[3]/div/div[2]/div[2]/button').click()


#### Search

driver.find_element_by_xpath('//*[@id="main"]/div/div[2]/div[2]/nav/ul/li[2]/a').click()
play=open(name +'.txt','r')
for line in play:
    sleep(0.5)
    driver.find_element_by_xpath('//*[@id="main"]/div/div[2]/div[1]/header/div[3]/div/div/input').send_keys(line)
    sleep(3)
    clic(x=808,y=741,button='right')
    sleep(0.5)
    clic(x=890,y=560)
    sleep(0.5)
def connect(meet_id, password, audio, video, name, fixdropdown, keytimeout,
            starttimeout, jointimeout, passtimeout, cronlauncher):
    """Connect to meeting with the options above"""

    #Only start zoom if not started by cronlauncher script
    if not cronlauncher:
        restart_zoom()

    time.sleep(starttimeout)

    x, y = locate.locate('btnJoin')
    pyautogui.click(x, y)
    time.sleep(jointimeout)

    #Enter meeting id
    x, y = locate.locate('txtId')
    pyautogui.click(x, y)
    time.sleep(keytimeout)
    pyautogui.write(meet_id)
    time.sleep(keytimeout)

    #This is for if the V is not there, users must manually tell it
    if not fixdropdown:
        pyautogui.press('tab', interval=0.5)
    pyautogui.press('tab', interval=0.5)

    if name:
        logging.info('Using custom name')
        pyautogui.press('backspace', 50)
        pyautogui.write(name)
    else:
        logging.info('Ignoring custom name')

    pyautogui.press('tab', interval=0.5)

    #Set audio enable
    if not audio:
        logging.info('Enabling audio')
        pyautogui.press('enter', interval=0.5)
    else:
        logging.info('Disabling audio')

    pyautogui.press('tab', interval=0.5)

    #Set video enable
    if not video:
        logging.info('Enabling video')
        pyautogui.press('enter', interval=0.5)
    else:
        logging.info('Disabling video')

    #Navigate to the next screen
    pyautogui.press('tab', interval=0.5)
    logging.info('Submitting')
    pyautogui.press('enter', interval=1)

    #Password
    if password:
        logging.info('Using password. Waiting...')
        time.sleep(passtimeout)

        #Check for error message
        result = locate.locate('errorid')

        #If there is an error message, remove it
        if result:
            x, y = locate.locate('btnLeave')
            pyautogui.click(x, y)
            time.sleep(keytimeout)

        result = locate.locate('txtPass')

        #If the error was actuall fake, and password thing is there, enter the password
        if result:
            x, y = result
            pyautogui.click(x, y)
            time.sleep(keytimeout)
            pyautogui.write(password)
            time.sleep(keytimeout)

            pyautogui.press('tab', interval=0.5)
            pyautogui.press('enter', interval=1)
        else:
            logging.error('Fatal error occured. Invalid meeting id.')
    else:
        logging.info('Ignoring password')