Fetch the repository succeeded.
import threading
import win32api
WM_APPCOMMAND = 0x319
APPCOMMAND_VOLUME_MAX = 0x0a
APPCOMMAND_VOLUME_MIN = 0x09
#音量最大
#win32api.SendMessage(-1, WM_APPCOMMAND, 0x30292, APPCOMMAND_VOLUME_MAX * 0x10000)
#音量最小
#win32api.SendMessage(-1, WM_APPCOMMAND, 0x30292, APPCOMMAND_VOLUME_MIN * 0x10000)
import time
import keyboard
from tkinter import *
from tkinter import scrolledtext
#import tkinter as tk
import win32gui as w
import sys
import os
from tkinter import *
"""
import start
#os.system("pause")
start.anzhuang("D:\startcs.gif")
try:
aaa=0
zt=1
mainc=Tk()
mainc.overrideredirect(True)
sw = mainc.winfo_screenwidth()
mainc.attributes('-topmost',1)
#得到屏幕宽度
sh = mainc.winfo_screenheight()
#得到屏幕高度
ww = 550
wh = 550
#窗口宽高为100
x = (sw-ww) / 2
y = (sh-wh) / 2
mainc.geometry("%dx%d+%d+%d" %(ww,wh,x,y))
photo = PhotoImage(file="D:\startcs.gif")#####################################hjyjkjyjfffffffffffffffffffffbhj
Label(mainc,compound='center',image= photo).pack(expand=True,fill=BOTH)
"1250**"
mainc["background"] = "red"
mainc.attributes("-transparentcolor", "red")
zt=1
def mainf():
global aaa
global zt
if zt==1:
aaa=aaa+0.007
mainc.attributes("-alpha",aaa)
mainc.after(10,mainf)
if aaa>=0.99:
#mainc.after(700,mmainf)
zt=0
if zt==0:
aaa=aaa-0.007
mainc.attributes("-alpha",aaa)
if aaa<=0.01:
#mainc.after(700,mmainf)
mainc.destroy()
#root.destroy()
else:
mainc.after(10,mainf)
mainc.after(10,mainf)
#root.attributes("-fullscreen",True)
mainc.mainloop()
except:
pass
"""
mlist=[]
anzhuanglujing=""
shiyongshuoming="""
欢迎使用简单整理
要隐藏的窗口中包含的项将会在快捷键按下后隐藏,再次按下后显示
系统会自动将您使用的项添加至此
白名单内的项不会因为快捷键按下而隐藏
系统不会修改此处内容
黑名单内的项会在快捷键按下后会隐藏,再次按下后会显示
系统不会修改此处内容
优先级:白名单>黑名单
白名单>要隐藏的窗口
黑名单、绿名单、红名单和白名单会自动保存
单击列表中的选项可以选中,可多选,选中后点击删除按钮可以删除
选中后Ctrl+C可以复制
点击添加后输入可以添加
绿名单内的项是在显示被隐藏的窗口时决定执行的cmd命令
红名单内的项是在显示要隐藏的窗口时决定执行的cmd命令
不推荐使用红名单和绿名单
系统不会修改此处内容
ctrl+shift+e强行停止
"""
a=1
def checkbutton():
global a
while 1:
if keyboard.is_pressed('Ctrl')and keyboard.is_pressed('Shift') and keyboard.is_pressed('d'):
if a==0:
a=1
xianshi()
###print("xian")
elif a==1:
a=0
yincang()
###print("yin")
while keyboard.is_pressed('Ctrl')and keyboard.is_pressed('Shift') and keyboard.is_pressed('d'):
time.sleep(0.001)
def listadd():
global mlist,a
time.sleep(1)
while 1:
time.sleep(0.05)
if a==0:
continue
elif [w.FindWindow(None,w.GetWindowText(w.GetForegroundWindow())),w.GetWindowText(w.GetForegroundWindow())]not in mlist:
mlist.append([w.FindWindow(None,w.GetWindowText(w.GetForegroundWindow())),w.GetWindowText(w.GetForegroundWindow())])
###print(mlist)
lb.insert(END,w.GetWindowText(w.GetForegroundWindow()))
def f5list():
while 1:
if keyboard.is_pressed('Ctrl')and keyboard.is_pressed('Shift') and keyboard.is_pressed('e'):
kiill()
else:
pass
#print("0")
threads = []
t1 = threading.Thread(target=checkbutton,args=())
threads.append(t1)
t2 = threading.Thread(target=listadd,args=())
threads.append(t2)
t3 = threading.Thread(target=f5list,args=())
threads.append(t3)
if __name__ == '__main__':
for t in threads:
t.setDaemon(True)
t.start()
top=Tk()
def yincang():
win32api.SendMessage(-1, WM_APPCOMMAND, 0x30292, APPCOMMAND_VOLUME_MIN * 0x10000)
for i in range(0,len(blacklist)):
if blacklist[i] not in whitelist:
w.ShowWindow(w.FindWindow(None,blacklist[i]),0)
for i in range(0,len(mlist)):
if mlist[i][1] not in whitelist:
w.ShowWindow(mlist[i][0],0)
for i in range(0,len(greenlist)):
try:
os.system(redlist[i])
except:
pass
def xianshi():
for i in range(0,len(mlist)):
w.ShowWindow(mlist[i][0],1)
for i in range(0,len(blacklist)):
if blacklist[i] not in whitelist:
w.ShowWindow(w.FindWindow(None,blacklist[i]),1)
for i in range(0,len(greenlist)):
try:
os.system(greenlist[i])
except:
pass
#top.state("zoomed")
def gxianshi():
for i in range(0,len(mlist)):
w.ShowWindow(mlist[i][0],1)
#for t in threads:
f=open(anzhuanglujing+"bailist.txt","w")
f.write(str(whitelist))
f.close()
f=open(anzhuanglujing+"heilist.txt","w")
f.write(str(blacklist))
f.close()
# t.stop()
top.destroy()
sys.exit(0)
#top.state("zoomed")
#top.overrideredirect(True)
top.attributes("-topmost",True)
top.attributes("-topmost",0)
top.title("简单整理")
#top["background"]="white"
Label(top,text="简单整理 快捷键:Ctrl+Shift+D",font=("",20)).pack(fill=BOTH)
top.protocol("WM_DELETE_WINDOW",gxianshi)
topone=Label(top)
topone.pack(fill=BOTH,expand=True)
"""
yinmdk=LabelFrame(top,text="要隐藏的窗口")
yinmdk.pack(side=LEFT, fill=BOTH,expand=True)
lb = Listbox(yinmdk,selectmode = MULTIPLE)
scr = Scrollbar(yinmdk)
lb.config(yscrollcommand=scr.set)
scr.config(command=lb.yview)
def f5():
lb.delete(0, END)
for i in range(0,len(mlist)):
lb.insert(0,mlist[i])
def shan():
global mlist
for ba in range(0,len(lb.curselection())):
i=ba
listys=list(lb.curselection())
###print("is",i)
listys=list(lb.curselection())
###print("删除第"+str(i)+"次:要删列表"+str(listys))
lb.delete(int(listys[0]))
###print("删除第"+str(i)+"次:主要列表"+str(mlist))
del mlist[int(listys[0])]#这里要重新读取列表中有什么,重新删除元素
def jia():
jiac=Toplevel()
jiac.title("请输入要隐藏的窗口标题")
jiac.geometry("350x50")
shur=Entry(jiac)
shur.pack(fill=BOTH,expand=True)
def tianjia():
shurr=shur.get()
[w.FindWindow(None,shurr),shurr]
if [w.FindWindow(None,shurr),shurr]not in mlist:
mlist.append([w.FindWindow(None,shurr),shurr])
###print(mlist)
lb.insert(END,shur.get())
#mlist.remove("请输入要隐藏的窗口名称")
jiac.destroy()
Button(jiac,text="输入完成",command=tianjia).pack(side=RIGHT,fill=BOTH)
Button(yinmdk,text="删除",command=shan).pack(fill=BOTH)
Button(yinmdk,text="添加",command=jia).pack(fill=BOTH)
lb.pack(side=LEFT, fill=BOTH,expand=True)
scr.pack(side=RIGHT, fill=Y)
####################################################################
#######################"\""以下是白名单部分"\""#######################
####################################################################
try:
f=open(anzhuanglujing+"bailist.txt","r")
whitelist=f.read()
whitelist=whitelist.split("[")
whitelist=whitelist[1].split("]")
whitelist=whitelist[0].split(",")
for i in range(0,len(whitelist)):
whitelist[i]=(whitelist[i].split("'"))[1]
f.close()
except:
f=open(anzhuanglujing+"bailist.txt","w")
f.write("['','']")
f.close()
whitelist=['','']
buyinmdk=LabelFrame(top,text="白名单",bg="white")
buyinmdk.pack(side=LEFT, fill=BOTH,expand=True)
bailbb = Listbox(buyinmdk,selectmode = MULTIPLE)
baiscr = Scrollbar(buyinmdk)
bailbb.config(yscrollcommand=baiscr.set)
baiscr.config(command=bailbb.yview)
def f5bai():
for i in range(0,len(whitelist)):
bailbb.insert(0,whitelist[i])
f5bai()
def baishan():
global whitelist
for ba in range(0,len(bailbb.curselection())):
i=ba
whitelistys=list(bailbb.curselection())
###print("is",i)
whitelistys=list(bailbb.curselection())
###print("删除第"+str(i)+"次:要删列表"+str(whitelistys))
bailbb.delete(int(whitelistys[0]))
###print("删除第"+str(i)+"次:主要列表"+str(whitelist))
del whitelist[int(whitelistys[0])]#这里要重新读取列表中有什么,重新删除元素
def baijia():
baijiac=Tk()
baijiac.title("请输入要加入白名单的窗口标题")
baijiac.geometry("350x50")
baishur=Entry(baijiac)
baishur.pack(fill=BOTH,expand=True)
def tianbaijia():
baishurr=baishur.get()
if baishurr not in whitelist:
whitelist.append((baishurr))
####print(whitelist)
bailbb.insert(END,(baishur.get()))
#whitelist.remove("请输入要隐藏的窗口名称")
baijiac.destroy()
c=Button(baijiac,text="输入完成",command=tianbaijia)
c.pack(side=RIGHT,fill=BOTH)
Button(buyinmdk,text="删除",command=baishan).pack(fill=BOTH)#,command=baishan
Button(buyinmdk,text="添加",command=baijia).pack(fill=BOTH)
bailbb.pack(side=LEFT, fill=BOTH,expand=True)
baiscr.pack(side=RIGHT, fill=Y)
####################################################################
#######################"\""以上是白名单部分"\""#######################
####################################################################
####################################################################
#######################"\""以下是黑名单部分"\""#######################
####################################################################
try:
f=open(anzhuanglujing+"heilist.txt","r")
blacklist=f.read()
blacklist=blacklist.split("[")
blacklist=blacklist[1].split("]")
blacklist=blacklist[0].split(",")
for i in range(0,len(blacklist)):
blacklist[i]=(blacklist[i].split("'"))[1]
f.close()
except:
f=open(anzhuanglujing+"heilist.txt","w")
f.write("['','']")
f.close()
blacklist=['请输入要加入黑名单的窗口标题','简单整理','请输入要加入白名单的窗口标题']
buyinmdk=LabelFrame(top,text="黑名单",bg="black",fg="white")
buyinmdk.pack(side=LEFT, fill=BOTH,expand=True)
heilbb = Listbox(buyinmdk,selectmode = MULTIPLE)
heiscr = Scrollbar(buyinmdk)
heilbb.config(yscrollcommand=heiscr.set)
heiscr.config(command=heilbb.yview)
def f5hei():
for i in range(0,len(blacklist)):
heilbb.insert(0,blacklist[i])
f5hei()
def heishan():
global blacklist
for ba in range(0,len(heilbb.curselection())):
i=ba
blacklistys=list(heilbb.curselection())
###print("is",i)
blacklistys=list(heilbb.curselection())
###print("删除第"+str(i)+"次:要删列表"+str(blacklistys))
heilbb.delete(int(blacklistys[0]))
###print("删除第"+str(i)+"次:主要列表"+str(blacklist))
del blacklist[int(blacklistys[0])]#这里要重新读取列表中有什么,重新删除元素
def heijia():
heijiac=Tk()
heijiac.title("请输入要加入黑名单的窗口标题")
heijiac.geometry("350x50")
heishur=Entry(heijiac)
heishur.pack(fill=BOTH,expand=True)
def tianheijia():
heishurr=heishur.get()
if heishurr not in blacklist:
blacklist.append((heishurr))
####print(blacklist)
heilbb.insert(END,(heishur.get()))
#blacklist.remove("请输入要隐藏的窗口名称")
heijiac.destroy()
c=Button(heijiac,text="输入完成",command=tianheijia)
c.pack(side=RIGHT,fill=BOTH)
Button(buyinmdk,text="删除",command=heishan).pack(fill=BOTH)#,command=heishan
Button(buyinmdk,text="添加",command=heijia).pack(fill=BOTH)
heilbb.pack(side=LEFT, fill=BOTH,expand=True)
heiscr.pack(side=RIGHT, fill=Y)
####################################################################
#######################"\""以上是黑名单部分"\""#######################
####################################################################
#Label(top).pack()
#Label(top).pack(fill=BOTH)"""
yinmdk=LabelFrame(topone,text="要隐藏的窗口")
yinmdk.pack(side=LEFT, fill=BOTH,expand=True)
lb = Listbox(yinmdk,selectmode = MULTIPLE)
scr = Scrollbar(yinmdk)
lb.config(yscrollcommand=scr.set)
scr.config(command=lb.yview)
def f5():
lb.delete(0, END)
for i in range(0,len(mlist)):
lb.insert(0,mlist[i])
def shan():
global mlist
for ba in range(0,len(lb.curselection())):
i=ba
listys=list(lb.curselection())
###print("is",i)
listys=list(lb.curselection())
###print("删除第"+str(i)+"次:要删列表"+str(listys))
lb.delete(int(listys[0]))
###print("删除第"+str(i)+"次:主要列表"+str(mlist))
del mlist[int(listys[0])]#这里要重新读取列表中有什么,重新删除元素
def jia():
jiac=Toplevel()
jiac.title("请输入要隐藏的窗口标题")
jiac.geometry("350x50")
shur=Entry(jiac)
shur.pack(fill=BOTH,expand=True)
def tianjia():
shurr=shur.get()
[w.FindWindow(None,shurr),shurr]
if [w.FindWindow(None,shurr),shurr]not in mlist:
mlist.append([w.FindWindow(None,shurr),shurr])
###print(mlist)
lb.insert(END,shur.get())
#mlist.remove("请输入要隐藏的窗口名称")
jiac.destroy()
Button(jiac,text="输入完成",command=tianjia).pack(side=RIGHT,fill=BOTH)
Button(yinmdk,text="删除",command=shan).pack(fill=BOTH)
Button(yinmdk,text="添加",command=jia).pack(fill=BOTH)
lb.pack(side=LEFT, fill=BOTH,expand=True)
scr.pack(side=RIGHT, fill=Y)
####################################################################
#######################"""以下是白名单部分"""#######################
####################################################################
try:
f=open(anzhuanglujing+"bailist.txt","r")
whitelist=f.read()
whitelist=whitelist.split("[")
whitelist=whitelist[1].split("]")
whitelist=whitelist[0].split(",")
for i in range(0,len(whitelist)):
whitelist[i]=(whitelist[i].split("'"))[1]
f.close()
except:
f=open(anzhuanglujing+"bailist.txt","w")
f.write("['','']")
f.close()
whitelist=['','']
buyinmdk=LabelFrame(topone,text="白名单",bg="white")
buyinmdk.pack(side=LEFT, fill=BOTH,expand=True)
bailbb = Listbox(buyinmdk,selectmode = MULTIPLE)
baiscr = Scrollbar(buyinmdk)
bailbb.config(yscrollcommand=baiscr.set)
baiscr.config(command=bailbb.yview)
def f5bai():
for i in range(0,len(whitelist)):
bailbb.insert(0,whitelist[i])
f5bai()
def baishan():
global whitelist
for ba in range(0,len(bailbb.curselection())):
i=ba
whitelistys=list(bailbb.curselection())
###print("is",i)
whitelistys=list(bailbb.curselection())
###print("删除第"+str(i)+"次:要删列表"+str(whitelistys))
bailbb.delete(int(whitelistys[0]))
###print("删除第"+str(i)+"次:主要列表"+str(whitelist))
del whitelist[int(whitelistys[0])]#这里要重新读取列表中有什么,重新删除元素
def baijia():
baijiac=Tk()
baijiac.title("请输入要加入白名单的窗口标题")
baijiac.geometry("350x50")
baishur=Entry(baijiac)
baishur.pack(fill=BOTH,expand=True)
def tianbaijia():
baishurr=baishur.get()
if baishurr not in whitelist:
whitelist.append((baishurr))
####print(whitelist)
bailbb.insert(END,(baishur.get()))
#whitelist.remove("请输入要隐藏的窗口名称")
baijiac.destroy()
c=Button(baijiac,text="输入完成",command=tianbaijia)
c.pack(side=RIGHT,fill=BOTH)
Button(buyinmdk,text="删除",command=baishan).pack(fill=BOTH)#,command=baishan
Button(buyinmdk,text="添加",command=baijia).pack(fill=BOTH)
bailbb.pack(side=LEFT, fill=BOTH,expand=True)
baiscr.pack(side=RIGHT, fill=Y)
####################################################################
#######################"""以上是白名单部分"""#######################
####################################################################
####################################################################
#######################"""以下是黑名单部分"""#######################
####################################################################
try:
f=open(anzhuanglujing+"heilist.txt","r")
blacklist=f.read()
blacklist=blacklist.split("[")
blacklist=blacklist[1].split("]")
blacklist=blacklist[0].split(",")
for i in range(0,len(blacklist)):
blacklist[i]=(blacklist[i].split("'"))[1]
f.close()
except:
f=open(anzhuanglujing+"heilist.txt","w")
f.write("['','']")
f.close()
blacklist=['请输入要加入黑名单的窗口标题','简单整理','请输入要加入白名单的窗口标题']
heiyinmdk=LabelFrame(topone,text="黑名单",bg="black",fg="white")
heiyinmdk.pack(side=LEFT, fill=BOTH,expand=True)
heilbb = Listbox(heiyinmdk,selectmode = MULTIPLE)
heiscr = Scrollbar(heiyinmdk)
heilbb.config(yscrollcommand=heiscr.set)
heiscr.config(command=heilbb.yview)
def f5hei():
for i in range(0,len(blacklist)):
heilbb.insert(0,blacklist[i])
f5hei()
def heishan():
global blacklist
for ba in range(0,len(heilbb.curselection())):
i=ba
blacklistys=list(heilbb.curselection())
###print("is",i)
blacklistys=list(heilbb.curselection())
###print("删除第"+str(i)+"次:要删列表"+str(blacklistys))
heilbb.delete(int(blacklistys[0]))
###print("删除第"+str(i)+"次:主要列表"+str(blacklist))
del blacklist[int(blacklistys[0])]#这里要重新读取列表中有什么,重新删除元素
def heijia():
heijiac=Tk()
heijiac.title("请输入要加入黑名单的窗口标题")
heijiac.geometry("350x50")
heishur=Entry(heijiac)
heishur.pack(fill=BOTH,expand=True)
def tianheijia():
heishurr=heishur.get()
if heishurr not in blacklist:
blacklist.append((heishurr))
####print(blacklist)
heilbb.insert(END,(heishur.get()))
#blacklist.remove("请输入要隐藏的窗口名称")
heijiac.destroy()
c=Button(heijiac,text="输入完成",command=tianheijia)
c.pack(side=RIGHT,fill=BOTH)
Button(heiyinmdk,text="删除",command=heishan).pack(fill=BOTH)#,command=heishan
Button(heiyinmdk,text="添加",command=heijia).pack(fill=BOTH)
heilbb.pack(side=LEFT, fill=BOTH,expand=True)
heiscr.pack(side=RIGHT, fill=Y)
####################################################################
#######################"""以上是黑名单部分"""#######################
####################################################################
####################################################################
#######################"""以下是绿名单部分"""#######################
####################################################################
try:
f=open(anzhuanglujing+"lvlist.txt","r")
greenlist=f.read()
greenlist=greenlist.split("[")
greenlist=greenlist[1].split("]")
greenlist=greenlist[0].split(",")
for i in range(0,len(greenlist)):
greenlist[i]=(greenlist[i].split("'"))[1]
f.close()
except:
f=open(anzhuanglujing+"lvlist.txt","w")
f.write("[]")
f.close()
greenlist=[]
lvyinmdk=LabelFrame(top,text="绿名单(显示触发)",bg="green",fg="white")
#lvyinmdk.pack(side=LEFT, fill=BOTH,expand=True)
lvlbb = Listbox(lvyinmdk,selectmode = MULTIPLE)
lvscr = Scrollbar(lvyinmdk)
lvlbb.config(yscrollcommand=lvscr.set)
lvscr.config(command=lvlbb.yview)
def f5lv():
for i in range(0,len(greenlist)):
lvlbb.insert(0,greenlist[i])
f5lv()
def lvshan():
global greenlist
for ba in range(0,len(lvlbb.curselection())):
i=ba
greenlistys=list(lvlbb.curselection())
###print("is",i)
greenlistys=list(lvlbb.curselection())
###print("删除第"+str(i)+"次:要删列表"+str(greenlistys))
lvlbb.delete(int(greenlistys[0]))
###print("删除第"+str(i)+"次:主要列表"+str(greenlist))
del greenlist[int(greenlistys[0])]#这里要重新读取列表中有什么,重新删除元素
def lvjia():
lvjiac=Tk()
lvjiac.title("请输入要加入绿名单的命令")
lvjiac.geometry("400x50")
lvshur=Entry(lvjiac)
lvshur.pack(fill=BOTH,expand=True)
def tianlvjia():
lvshurr=lvshur.get()
if lvshurr not in greenlist:
greenlist.append((lvshurr))
####print(greenlist)
lvlbb.insert(END,(lvshur.get()))
#greenlist.remove("请输入要隐藏的窗口名称")
lvjiac.destroy()
c=Button(lvjiac,text="输入完成",command=tianlvjia)
c.pack(side=RIGHT,fill=BOTH)
Button(lvyinmdk,text="删除",command=lvshan).pack(fill=BOTH)#,command=lvshan
Button(lvyinmdk,text="添加",command=lvjia).pack(fill=BOTH)
lvlbb.pack(side=LEFT, fill=BOTH,expand=True)
lvscr.pack(side=RIGHT, fill=Y)
####################################################################
#######################"""以上是绿名单部分"""#######################
####################################################################
####################################################################
#######################"""以下是红名单部分"""#######################
####################################################################
try:
f=open(anzhuanglujing+"honglist.txt","r")
redlist=f.read()
redlist=redlist.split("[")
redlist=redlist[1].split("]")
redlist=redlist[0].split(",")
for i in range(0,len(redlist)):
redlist[i]=(redlist[i].split("'"))[1]
f.close()
except:
f=open(anzhuanglujing+"honglist.txt","w")
f.write("[]")
f.close()
redlist=[]
hongyinmdk=LabelFrame(top,text="红名单(隐藏触发)",bg="red",fg="white")
#hongyinmdk.pack(side=LEFT, fill=BOTH,expand=True)
honglbb = Listbox(hongyinmdk,selectmode = MULTIPLE)
hongscr = Scrollbar(hongyinmdk)
honglbb.config(yscrollcommand=hongscr.set)
hongscr.config(command=honglbb.yview)
def f5hong():
for i in range(0,len(redlist)):
honglbb.insert(0,redlist[i])
f5hong()
def hongshan():
global redlist
#print()
for ba in range(0,len(honglbb.curselection())):
i=ba
redlistys=list(honglbb.curselection())
###print("is",i)
redlistys=list(honglbb.curselection())
###print("删除第"+str(i)+"次:要删列表"+str(redlistys))
honglbb.delete(int(redlistys[0]))
###print("删除第"+str(i)+"次:主要列表"+str(redlist))
del redlist[int(redlistys[0])]#这里要重新读取列表中有什么,重新删除元素
def hongjia():
hongjiac=Tk()
hongjiac.title("请输入要加入红名单的命令")
hongjiac.geometry("400x50")
hongshur=Entry(hongjiac)
hongshur.pack(fill=BOTH,expand=True)
def tianhongjia():
hongshurr=hongshur.get()
if hongshurr not in redlist:
redlist.append((hongshurr))
####print(redlist)
honglbb.insert(END,(hongshur.get()))
#redlist.remove("请输入要隐藏的窗口名称")
hongjiac.destroy()
c=Button(hongjiac,text="输入完成",command=tianhongjia)
c.pack(side=RIGHT,fill=BOTH)
Button(hongyinmdk,text="删除",command=hongshan).pack(fill=BOTH)#,command=hongshan
Button(hongyinmdk,text="添加",command=hongjia).pack(fill=BOTH)
honglbb.pack(side=LEFT, fill=BOTH,expand=True)
hongscr.pack(side=RIGHT, fill=Y)
####################################################################
#######################"""以上是红名单部分"""#######################
####################################################################
shy=LabelFrame(topone,text="使用说明")
shy.pack(side=LEFT, fill=BOTH,expand=True)
zk=scrolledtext.ScrolledText(shy, width=40)
zk.pack(fill=BOTH,expand=True)
zk.insert(END,shiyongshuoming)
#lvyinmdk.pack_forget()
#hongyinmdk.pack_forget()
yaobu=0
def qingchu():
f=open(anzhuanglujing+"bailist.txt","w")
f.write("")
f.close()
f=open(anzhuanglujing+"heilist.txt","w")
f.write("")
f.close()
f=open(anzhuanglujing+"lvlist.txt","w")
f.write("")
f.close()
f=open(anzhuanglujing+"honglist.txt","w")
f.write("")
f.close()
import tkinter.messagebox
tkinter.messagebox.showinfo(title='', message='清除完毕')
daqing=Button(top,text="删\n除\n一\n切\n数\n据\n\n慎\n用",fg="red",command=qingchu)
def yinxian():
global yaobu
if yaobu==1:
yaobu=0
lvyinmdk.pack_forget()
daqing.pack_forget()
hongyinmdk.pack_forget()
elif yaobu==0:
yaobu=1
hongyinmdk.pack(side=LEFT, fill=BOTH,expand=True)
lvyinmdk.pack(side=LEFT, fill=BOTH,expand=True)
daqing.pack(side=LEFT, fill=BOTH)
yinorxian=Button(shy,text="点击隐藏或显示红、绿名单",command=yinxian)
def kiill():
os._exit(0)
yinorxian.pack(fill=BOTH)
#zk.insert(END,yinorxian)
#top.geometry("741x523")
top.mainloop()
#t.stop()
Sign in for post a comment
Comment ( 0 )