fixed end of list

#3
This commit is contained in:
schrom01 2022-07-27 18:08:24 +02:00
parent 2d4cc2823f
commit 4788255b0a
1 changed files with 11 additions and 4 deletions

15
Main.py
View File

@ -28,10 +28,12 @@ columnIndexes = []
def search_adresses(adress_list, filename_adresslist, driver):
def search_adresses(adress_list, filename_adresslist, driver, mainText):
global file_split_char
global stopThread
global columnIndexes
global outputtext
#Create Direcotrys to save screenshots and qrcodes if they don't exist yet.
if(not os.path.exists("screenshots")):
@ -168,9 +170,14 @@ def search_adresses(adress_list, filename_adresslist, driver):
if(stopThread == True):
break
print("closing Thread")
return
outputtext = outputtext + "Reached end of list.\nPress Exit to close the application." + "\n"
mainText.config(text=outputtext)
print("closing Thread")
return
def read_adresslist(filename_adresslist):
returnvalues = []
@ -275,10 +282,10 @@ def command():
exit = True
button1.grid_remove()
elif(step == 3):
thread_search_adresses = threading.Thread(target=search_adresses, args=(adresslist, filename_adresslist, driver))
thread_search_adresses = threading.Thread(target=search_adresses, args=(adresslist, filename_adresslist, driver, mainText))
thread_search_adresses.start()
print("Thread started")
outputtext = outputtext + "process running." + "\n"
outputtext = outputtext + "process has startet." + "\n"
mainText.config(text=outputtext)
button1.grid_remove()
exit = True