|
| 1 | +from tkinter import * |
| 2 | +import pyautogui |
| 3 | + |
| 4 | +pyautogui.moveTo(500, 500, duration=2, tween=pyautogui.easeInOutQuad) |
| 5 | +pyautogui.moveTo(1000, 1000, duration=2, tween=pyautogui.easeInCirc) |
| 6 | +pyautogui.moveTo(50, 50, duration=2, tween=pyautogui.easeInBounce) |
| 7 | +pyautogui.moveTo(500, 500, duration=2, tween=pyautogui.easeOutElastic) |
| 8 | + |
| 9 | +"""""""""""""""""""""""""""""""""""""""""""""""""""""" |
| 10 | +# Ekran Çözünürlüğü |
| 11 | +screenWidth, screenHeight = pyautogui.size() |
| 12 | + |
| 13 | + |
| 14 | +print("Ekran çözünürlüğü : ", screenWidth, screenHeight) |
| 15 | + |
| 16 | +# Fare Pozisyonu |
| 17 | +currentMouseX, currentMouseY = pyautogui.position() |
| 18 | +print("Fare Pozisyonu : ", currentMouseX, currentMouseY) |
| 19 | + |
| 20 | +"""""""""""""""""""""""""""""""""""""""""""""""""""""" |
| 21 | + |
| 22 | +pyautogui.moveTo(799, 466, duration=2, tween=pyautogui.easeInOutQuad) |
| 23 | +pyautogui.click() |
| 24 | + |
| 25 | +for i in range(100): |
| 26 | + pyautogui.write("hello world", interval=0.001) |
| 27 | + pyautogui.press("enter") |
| 28 | + |
| 29 | +"""""""""""""""""""""""""""""""""""""""""""""""""""""" |
| 30 | + |
| 31 | +# distance = 300 |
| 32 | +# while distance > 0 : |
| 33 | +# pyautogui.drag(distance, 0, duration=0.5) |
| 34 | +# distance -= 5 |
| 35 | +# pyautogui.drag(0 ,distance, duration=0.5) |
| 36 | +# distance -= 5 |
| 37 | +# pyautogui.drag(distance, 0, duration=0.5) |
| 38 | +# distance -= 5 |
| 39 | +# pyautogui.drag(distance, 0, duration=0.5) |
| 40 | +# distance -= 5 |
| 41 | + |
| 42 | +"""""""""""""""""""""""""""""""""""""""""""""""""""""" |
| 43 | + |
| 44 | +window = Tk() |
| 45 | + |
| 46 | +window.title("merhaba") |
| 47 | +lbl = Label(window, text="Hi!") |
| 48 | +lb2 = Label(window, text="Hi!", font=("Arial Bold", 90)) |
| 49 | + |
| 50 | +lbl.grid(column=0, row=0) |
| 51 | +lb2.grid(column=1, row=0) |
| 52 | + |
| 53 | +window.geometry("500x400") |
| 54 | + |
| 55 | +button = Button(window, text="click") |
| 56 | +button.grid(column=1, row=1) |
| 57 | + |
| 58 | + |
| 59 | +window.mainloop() |
| 60 | + |
| 61 | + |
| 62 | +def clicked(): |
| 63 | + #lbl.configure(text="Clicked button") |
| 64 | + |
| 65 | + button2 = Button(window, text="colorful click", |
| 66 | + bg="orange", fg="red", width=20, height=20) |
| 67 | + button2.grid(column=1, row=1) |
0 commit comments