Apr-11-2019, 01:40 AM
Hi, it is possible in tkinter to code the searchbar for a search in all the computer for a given input? Can provide some code?
I know the code for specific file path (example "notepad.exe"), but this case is different.
I'm not asking how to create a searchbar, i know that. I'm asking how do we do a full search in windows for given name in the searchbox. Regards, Francisco
I know the code for specific file path (example "notepad.exe"), but this case is different.
I'm not asking how to create a searchbar, i know that. I'm asking how do we do a full search in windows for given name in the searchbox. Regards, Francisco
import tkinter import time from tkinter import ttk from tkinter import * import tkinter as tk import time import sys import os import subprocess import idlelib import urllib.request import ctypes import functools from tkinter import PhotoImage import webbrowser from tkinter import messagebox import pymsgbox ################################### master = Tk() master.configure(background='blue') master.minsize(1000,400) master.geometry("1000x400") ################################### def downloads(): for x in range(1, 110): progress_var.set(x) time.sleep(0.10) master.update() progress_var.set(0) if True: os.startfile("C:/Users/Nelson/Downloads/") def musicas(): for x in range(1, 110): progress_var.set(x) time.sleep(0.10) master.update() progress_var.set(0) if True: os.startfile("C:/Users/Nelson/Music/") def imagens(): for x in range(1, 110): progress_var.set(x) time.sleep(0.10) master.update() progress_var.set(0) if True: os.startfile("C:/Users/Nelson/Pictures/") def videos(): for x in range(1, 110): progress_var.set(x) time.sleep(0.10) master.update() progress_var.set(0) if True: os.startfile("C:/Users/Nelson/Videos/") def documentos(): for x in range(1, 110): progress_var.set(x) time.sleep(0.10) master.update() progress_var.set(0) if True: os.startfile("C:/Users/Nelson/Documents/") progress_var = tkinter.IntVar() pb = ttk.Progressbar(master, orient="horizontal", length=400, maximum=100, mode="determinate", var=progress_var) pb.grid(padx=100, pady=300) ######################################################################################### photo1=PhotoImage(file="downloads.png") b1 = Button(master,image=photo1, command=downloads, height=200, width=200, compound=LEFT) b1.place(x = 0, y = 0)# x = mexe na horizontal e y = mexe na vertical photo2=PhotoImage(file="musica.png") b2 = Button(master,image=photo2, command=musicas, height=200, width=200, compound=LEFT) b2.place(x = 200, y = 0)# x = mexe na horizontal e y = mexe na vertical photo3=PhotoImage(file="imagens.png") b3 = Button(master,image=photo3, command=imagens, height=200, width=200, compound=LEFT) b3.place(x = 400, y = 0)# x = mexe na horizontal e y = mexe na vertical photo4=PhotoImage(file="videos.png") b4 = Button(master,image=photo4, command=videos, height=200, width=200, compound=LEFT) b4.place(x = 600, y = 0)# x = mexe na horizontal e y = mexe na vertical photo5=PhotoImage(file="documentos.png") b5 = Button(master,image=photo5, command=documentos, height=200, width=200, compound=LEFT) b5.place(x = 800, y = 0)# x = mexe na horizontal e y = mexe na vertical #################################### master.resizable(False, False) master.mainloop() ###################################