728x90
import pyautogui
import schedule
import time
# Set a classtime in a dictionary form.
classTime = dict({
1 : "09:05",
2 : "10:05",
3 : "11:05",
4 : "12:05",
5 : "14:05",
6 : "15:05",
7 : "16:05",
8 : "17:05",
})
# Screenshot automator ver 1.0
# Create a screenShot function to take a screenshot.
def screenShot(i):
myFileName = str(i) + "교시" + ".png"
myShot = pyautogui.screenshot()
myShot.save(r'./' + myFileName)
# Schedule the screenShot function at a certain time.
for i in range(1,9):
schedule.every().day.at(classTime[i]).do(screenShot,i)
# Run a scheduled function.
while True:
schedule.run_pending()
time.sleep(1)
728x90
'창고 3 > [Dev] My Codes' 카테고리의 다른 글
블록체인 합의 알고리즘 컨셉 Golang 데모 : Proof of Safe Number (0) | 2021.12.31 |
---|---|
블록체인 DID 컨셉 SSO(싱글 사인온) 파이썬 데모 코드 (0) | 2021.12.28 |
댓글