import os, pyautogui from time import sleep print('Old Directory') # Just to show Current Working Directory(Were youre running... print(os.getcwd())#...the code) os.chdir('C:\Program Files\Sony\Imaging Edge') #change current working directory to #location specified in String. MAY NEED TO CHANGE depending on place app is saved print('New Directory')#confirm it worked print(os.getcwd()) sleep(1) os.system('start Remote')#os function for starting .exe files #start starts it. Remote is the app we want to start(Imaging Edge Remote) sleep(7) #wait for Remote to open #Commented out this section. Shouldn't be necessary #pyautogui.click(710,744)#exit the shell screen step 1 #sleep(1) #pyautogui.click(710,744)#exit the shell screen step 2 #sleep(7) pyautogui.doubleClick(328,257) #chooses camera sleep (10) pyautogui.moveTo(1134,225)#move to photo taking button sleep(1) pyautogui.mouseDown(button = 'left')#take picture, mouse held down sleep(1) pyautogui.mouseUp(button = 'left') #note: right now this program just takes one photo closes automatically... #...make sure camera is ready to appear in the Remote:choose camera window sleep(5) os.system('TASKKILL /F /IM Remote.exe') #kills the program
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)