import win32con
import win32gui
import time
import math
notepad = win32gui.FindWindow("Notepad","无标题 - 记事本")
while True:

    SE = 0.0  # 弧度
    while SE - 3.1415926535 *2 < 0.0000001: #浮点数运算存在误差
        time.sleep(0.1)
        SE += 0.1
        newx = int(400+400*math.cos(SE)) # 圆心加半径
        newy = int(400+400*math.sin(SE))  # 圆心加半径
        win32gui.SetWindowPos(notepad,  # 操作记事本
                              win32con.HWND_TOPMOST,
                              newx,  # x位置
                              newy,  # y位置
                              300,  #
                              300,  #
                              win32con.SWP_SHOWWINDOW)

 

相关文章:

  • 2021-08-18
  • 2022-12-23
  • 2022-12-23
  • 2021-08-12
  • 2022-12-23
  • 2022-01-22
  • 2022-12-23
猜你喜欢
  • 2021-11-10
  • 2021-09-26
  • 2021-07-15
  • 2021-12-10
  • 2021-07-09
  • 2022-12-23
  • 2021-07-07
相关资源
相似解决方案