forked from Silias-Public/Sonnendach
parent
2d4cc2823f
commit
4788255b0a
17
Main.py
17
Main.py
|
@ -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 file_split_char
|
||||||
global stopThread
|
global stopThread
|
||||||
global columnIndexes
|
global columnIndexes
|
||||||
|
global outputtext
|
||||||
|
|
||||||
|
|
||||||
#Create Direcotrys to save screenshots and qrcodes if they don't exist yet.
|
#Create Direcotrys to save screenshots and qrcodes if they don't exist yet.
|
||||||
if(not os.path.exists("screenshots")):
|
if(not os.path.exists("screenshots")):
|
||||||
|
@ -168,9 +170,14 @@ def search_adresses(adress_list, filename_adresslist, driver):
|
||||||
|
|
||||||
|
|
||||||
if(stopThread == True):
|
if(stopThread == True):
|
||||||
break
|
|
||||||
|
|
||||||
print("closing Thread")
|
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):
|
def read_adresslist(filename_adresslist):
|
||||||
returnvalues = []
|
returnvalues = []
|
||||||
|
@ -275,10 +282,10 @@ def command():
|
||||||
exit = True
|
exit = True
|
||||||
button1.grid_remove()
|
button1.grid_remove()
|
||||||
elif(step == 3):
|
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()
|
thread_search_adresses.start()
|
||||||
print("Thread started")
|
print("Thread started")
|
||||||
outputtext = outputtext + "process running." + "\n"
|
outputtext = outputtext + "process has startet." + "\n"
|
||||||
mainText.config(text=outputtext)
|
mainText.config(text=outputtext)
|
||||||
button1.grid_remove()
|
button1.grid_remove()
|
||||||
exit = True
|
exit = True
|
||||||
|
|
Loading…
Reference in New Issue