欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

使用python tkinter實現(xiàn)各種個樣的撩妹鼠標(biāo)拖尾效果

 更新時間:2021年09月07日 10:28:29   作者:大家一起學(xué)編程(python)  
這篇文章主要介紹了使用python tkinter實現(xiàn)各種個樣的撩妹鼠標(biāo)拖尾效果,本文通過實例代碼,給大家介紹的非常詳細(xì),對大家的學(xué)習(xí)或工作具有一定的參考借鑒價值,需要的朋友可以參考下

python-tkinter 實現(xiàn)各種個樣的撩妹鼠標(biāo)拖尾,效果圖展示:

系統(tǒng)的拖尾已經(jīng)無法滿足我們了,女朋友叫你把鼠標(biāo)拖尾換成她的照片,讓你時時刻刻都可以看見她,這個要求你答不答應(yīng)。

當(dāng)然,這個要求還是可以滿足一下的,我們來具體看一看吧。

要制作拖尾,首先,我們需要知道鼠標(biāo)的位置,那有沒有獲取鼠標(biāo)位置的方法呢?答案當(dāng)然是有的。因此,我們引用到pyautogui模塊

pip install pyautogui

一、系統(tǒng)拖尾

第一種是最簡單的一種,通過設(shè)置就可以輕松設(shè)置鼠標(biāo)拖尾,在這里就不詳解了。

二、文藝型拖尾

這個拖尾殺傷力不大,侮辱性極強,給自己增加工作buff。

代碼如下:

import tkinter,time
from tkinter import *
import pyautogui
​
tk = tkinter.Tk()
tk.overrideredirect(True)
tk["background"] = "white"
tk.wm_attributes('-transparentcolor', 'white')
w = tk.winfo_screenwidth()  # 獲取屏幕寬
h = tk.winfo_screenheight()  # 獲取屏幕高
​
cn = Canvas(tk, height=w, width=h, bg="white")
cn.pack()
def update_test(e):
    time.sleep(0.1)
    cn.delete(tkinter.ALL)
    tk.update()
    global a
    x,y=pyautogui.position()#獲取鼠標(biāo)位置
    tk.geometry("180x35+%s+%s" % (x+10, y+10))
    cn.create_text(85, 0, text='我的40米大刀')
tk.bind("<Configure>", update_test)
tk.mainloop()

三、實用型拖尾

這個拖尾,可以幫助你找到你容易忘記的東西,比如一些快捷鍵,一些工作的事,讓它隨鼠標(biāo)移動,隨時提醒你。

代碼如下:

import tkinter,time
from tkinter import *
import pyautogui
​
tk = tkinter.Tk()
tk.overrideredirect(True)
tk["background"] = "white"
tk.wm_attributes('-transparentcolor', 'white')
w = tk.winfo_screenwidth()  # 獲取屏幕寬
h = tk.winfo_screenheight()  # 獲取屏幕高
​
cn = Canvas(tk, height=w, width=h, bg="white")
cn.pack()
def update_test(e):
    time.sleep(0.1)
    cn.delete(tkinter.ALL)
    tk.update()
    global a
    x,y=pyautogui.position()
    tk.geometry("180x35+%s+%s" % (x+10, y+10))
    cn.create_text(85, 0, text='ctrl+c 復(fù)制 \n ctrl+v 粘貼', anchor='n')
tk.bind("<Configure>", update_test)
tk.mainloop()

四、愛心拖尾

這個拖尾對于單身人士來說傷害性極大,這滿滿的愛意,想要找一個人快點脫單。哈哈

import tkinter,time
from tkinter import *
from PIL import ImageTk, Image
import pyautogui
​
tk = tkinter.Tk()
tk.overrideredirect(True)
tk["background"] = "white"
tk.wm_attributes('-transparentcolor', 'white')
​
image1 = Image.open("愛心.jpg")  # 打開圖片
image = image1.resize((50,60))  # 設(shè)置圖片大小
photo = ImageTk.PhotoImage(image)  # 引入圖片
​
image2 = Image.open("愛心.jpg")
image3 = image2.resize((101, 121))  # 設(shè)置圖片大小
photo1 = ImageTk.PhotoImage(image3)  # 引入圖片
​
w = tk.winfo_screenwidth()  # 獲取屏幕寬
h = tk.winfo_screenheight()  # 獲取屏幕高
​
cn = Canvas(tk, height=w, width=h, bg="white")
cn.pack()
a=2
def update_test(e):
    time.sleep(0.1)
    cn.delete(tkinter.ALL)
    tk.update()
    global a
    x,y=pyautogui.position()
    tk.geometry("100x120+%s+%s" % (x+10, y+10))
    if a==2:
        cn.create_image(50, 50, image=photo1)
        cn.pack()
        a=1
    else:
        cn.create_image(50, 50, image=photo)
        cn.pack()
        a=2
tk.bind("<Configure>", update_test)
tk.mainloop()

五、奔跑的火柴人型拖尾

這個拖尾,可以將圖片替換為其他的動作,甚至你還可以直接來上一部動畫片都可以。

代碼如下:

import tkinter,time
from tkinter import *
from PIL import ImageTk, Image
import pyautogui
​
tk = tkinter.Tk()
tk.overrideredirect(True)
tk.wm_attributes('-transparentcolor', '#E0D9BC')
w = tk.winfo_screenwidth()  # 獲取屏幕寬
h = tk.winfo_screenheight()  # 獲取屏幕高
cn = Canvas(tk, height=h, width=w, bg="white")  # bg="pink"
list,list1,a,b=[],[],1,1
for i in range(1,8):
    image1 = Image.open("正向火柴人/123_" + str(i) + ".PNG")  # 打開圖片
    image = image1.resize((100, 100))  # 設(shè)置圖片大小
    photo = ImageTk.PhotoImage(image)  # 引入圖片
    list.append(photo)
    image1 = Image.open("反向火柴人/123_" + str(i) + ".PNG")  # 打開圖片
    image = image1.resize((100, 100))  # 設(shè)置圖片大小
    photo = ImageTk.PhotoImage(image)  # 引入圖片
    list1.append(photo)
def image(list):
    global a
    for i in range(1, 8):
        if a == 7:
            a = 1
            cn.create_image(50, 50, image=list[0])
            a += 1
        else:
            cn.create_image(50, 50, image=list[a])
            a += 1
        break
​
def update_test(e):
    time.sleep(0.1)
    tk.update()
    x,y=pyautogui.position()
    tk.geometry("100x100+%s+%s"%(x+10,y+10))
    global b
    if x<b:image(list)
    elif x==b:pass
    else:image(list1)
    b=x
    cn.pack()
tk.bind("<Configure>", update_test)
tk.mainloop()

六、胡桃搖錢拖尾

這款拖尾與奔跑的火柴人相似,但又不完全相似,主要是針對單一動畫制作。可以讓你女朋友為你擺一整套動作,然后移動鼠標(biāo)時,你就可以看見你女朋友調(diào)皮的樣子了。

代碼如下:

import tkinter,time
from tkinter import *
from PIL import ImageTk, Image
import pyautogui
​
tk = tkinter.Tk()
tk.overrideredirect(True)
tk.wm_attributes('-transparentcolor', '#F7FBFB')
w = tk.winfo_screenwidth()  # 獲取屏幕寬
h = tk.winfo_screenheight()  # 獲取屏幕高
cn = Canvas(tk, height=h, width=w, bg="#F7FBFB")
cn.pack()
list,a=[],1
for i in range(1,37):
    image1 = Image.open("胡桃搖錢/胡桃搖錢_" + str(i) + ".JPG")  # 打開圖片
    image = image1.resize((100, 100))  # 設(shè)置圖片大小
    photo = ImageTk.PhotoImage(image)  # 引入圖片
    list.append(photo)
​
def update_test(e):
    time.sleep(0.05)
    cn.delete(tkinter.ALL)
    tk.update()
    x,y=pyautogui.position()
    tk.geometry("100x100+%s+%s"%(x+10,y+10))
    global a
    cn.create_image(50, 50, image=list[a])
    a=a+1
    if a==36:a=1
tk.bind("<Configure>", update_test)
tk.mainloop()

七、女朋友或者老婆拖尾

這個就更強了,一定要給你老婆看一看,你要告訴她,你的拖尾都是她。直接占據(jù)了整個屏幕。

代碼如下:

import tkinter,time
from tkinter import *
from PIL import ImageTk, Image
import pyautogui
​
tk = tkinter.Tk()
tk.overrideredirect(True)
tk.wm_attributes('-transparentcolor', '#F7FBFB')
w = tk.winfo_screenwidth()  # 獲取屏幕寬
h = tk.winfo_screenheight()  # 獲取屏幕高
cn = Canvas(tk, height=h, width=w, bg="#F7FBFB")
cn.pack()
​
image1 = Image.open("老婆.png")  # 打開圖片
image = image1.resize((200, 300))  # 設(shè)置圖片大小
photo = ImageTk.PhotoImage(image)  # 引入圖片
​
def update_test(e):
    time.sleep(0.05)
    tk.update()
    x,y=pyautogui.position()
    tk.geometry("200x300+%s+%s"%(x+10,y+10))
    cn.create_image(100, 150, image=photo)
tk.bind("<Configure>", update_test)
tk.mainloop()

如果鼠標(biāo)拖尾有段位,你屬于哪個段位

到此這篇關(guān)于使用python tkinter實現(xiàn)各種個樣的撩妹鼠標(biāo)拖尾效果的文章就介紹到這了,更多相關(guān)python tkinter鼠標(biāo)拖尾內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!

相關(guān)文章

  • Python logging設(shè)置和logger解析

    Python logging設(shè)置和logger解析

    這篇文章主要介紹了Python logging設(shè)置和logger解析,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友可以參考下
    2019-08-08
  • 如何使用pycharm連接Databricks的步驟詳解

    如何使用pycharm連接Databricks的步驟詳解

    這篇文章主要介紹了如何使用pycharm連接Databricks,本文分步驟給大家介紹的非常詳細(xì),對大家的學(xué)習(xí)或工作具有一定的參考借鑒價值,需要的朋友可以參考下
    2020-09-09
  • python實現(xiàn)支付寶轉(zhuǎn)賬接口

    python實現(xiàn)支付寶轉(zhuǎn)賬接口

    這篇文章主要為大家詳細(xì)介紹了python實現(xiàn)支付寶轉(zhuǎn)賬接口,具有一定的參考價值,感興趣的小伙伴們可以參考一下
    2019-05-05
  • Pandas實現(xiàn)在線文件和剪貼板數(shù)據(jù)讀取詳解

    Pandas實現(xiàn)在線文件和剪貼板數(shù)據(jù)讀取詳解

    這篇文章主要為大家介紹的是Pandas兩種少用的讀取文件方式:讀取在線文件的數(shù)據(jù)和讀取剪貼板的數(shù)據(jù),感興趣的小伙伴可以跟隨小編一起學(xué)習(xí)一下
    2022-06-06
  • python實現(xiàn)文件分片上傳的接口自動化

    python實現(xiàn)文件分片上傳的接口自動化

    這篇文章主要為大家詳細(xì)介紹了python實現(xiàn)文件分片上傳的接口自動化,文中示例代碼介紹的非常詳細(xì),具有一定的參考價值,感興趣的小伙伴們可以參考一下
    2020-11-11
  • Flask項目中實現(xiàn)短信驗證碼和郵箱驗證碼功能

    Flask項目中實現(xiàn)短信驗證碼和郵箱驗證碼功能

    這篇文章主要介紹了Flask項目中實現(xiàn)短信驗證碼和郵箱驗證碼功能,需本文通過截圖實例代碼的形式給大家介紹的非常詳細(xì),需要的朋友可以參考下
    2019-12-12
  • jupyter notebook更換皮膚主題的實現(xiàn)

    jupyter notebook更換皮膚主題的實現(xiàn)

    這篇文章主要介紹了jupyter notebook更換皮膚主題的實現(xiàn),文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧
    2021-01-01
  • Python?Pandas?中的數(shù)據(jù)結(jié)構(gòu)詳解

    Python?Pandas?中的數(shù)據(jù)結(jié)構(gòu)詳解

    這篇文章主要介紹了Python?Pandas?中的數(shù)據(jù)結(jié)構(gòu)詳解,Pandas有三種數(shù)據(jù)結(jié)構(gòu)Series、DataFrame和Panel,文章圍繞主題展開更多相關(guān)內(nèi)容需要的小伙伴可以參考一下
    2022-06-06
  • PyQT5實現(xiàn)選項卡窗口、堆棧窗口、停靠窗口、子窗口

    PyQT5實現(xiàn)選項卡窗口、堆棧窗口、??看翱?、子窗口

    這篇文章主要介紹了PyQT5實現(xiàn)選項卡窗口、堆棧窗口、??看翱凇⒆哟翱?,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧
    2021-04-04
  • 解決win10 vscode 無法激活python 虛擬環(huán)境的問題

    解決win10 vscode 無法激活python 虛擬環(huán)境的問題

    這篇文章主要介紹了win10 vscode 無法激活python 虛擬環(huán)境的解決辦法,本文給大家介紹的非常詳細(xì),對大家的學(xué)習(xí)或工作具有一定的參考借鑒價值,需要的朋友可以參考下
    2021-10-10

最新評論