-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
temp_cleaner_gui_r4.8.py
2748 lines (2496 loc) · 150 KB
/
temp_cleaner_gui_r4.8.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
"""
The Project Temp_Cleaner GUI by Insertx2k Dev.
A simple alternative to all Temp cleaning software available for Windows available under the GNU General Public License v2.0 or later
License for the Project Temp_Cleaner GUI.
A simple program made to help you erase temporary files in your Windows-based PC.
Copyright (C) 2021 - Insertx2k Dev (Mr.X)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
See github.com/insertx2k/temp_cleaner_gui
For a much better github page, try visiting https://insertx2k.github.io/temp_cleaner_gui
The program Temp_Cleaner GUI was previously Temp_Cleaner and it was using a CUI instead of a GUI.
**THIS FILE (AS IT IS) BELONGS TO THE TEMP_CLEANER GUI PROJECT AND SHALL BE ONLY USED IN ACCORDING TO THE TERMS OF THE PRODUCT**
"""
# defining the global variable that holds the font_size of the scrolledtext.ScrolledText widget
# named 'showLicense'
font_size = 14
# print greetings text.
print()
print("Greetings from the Temp_Cleaner GUI Project.")
print("By Insertx2k Dev (Mr.X)")
print("Github : https://github.com/insertx2k/temp_cleaner_gui")
print("Twitter : https://twitter.com/insertplayztw")
print()
print("Powered by Minimal Accessibility Pack v1.0 by Insertx2k Dev (Mr.X)")
print()
# end of print greetings text.
# Imports
from tkinter import *
from tkinter import messagebox
from tkinter import ttk
import os
from PIL import Image, ImageTk
import configparser
from tkinter import filedialog
from tkinter import scrolledtext
import subprocess
from subprocess import PIPE
import awesometkinter as atk
import sys
import threading
import platform
from translations import *
# Defining the function that will get the current values of an configparser values.
GetConfig = configparser.ConfigParser()
GetConfig.read('Config.ini')
# This is program's Main Window Class.
class MainWindowLightMode(Tk):
def __init__(self):
global GetConfig, font_size
super().__init__() # initializing the self.
# Trying to change the theme.
try:
# Changing the self's theme.
self.style = ttk.Style()
# self.style.theme_use("native")
except Exception as excpt:
print(f"The following exception had occured while trying to apply the theme 'native' \n {excpt}")
try:
self.configure(cursor='@cursor.cur')
except Exception as exceptioncursor:
print(f"{exceptioncursor}")
messagebox.showerror("Unable to use custom Cursor", f"{exceptioncursor}")
pass
# self.configure(background='white')
try:
self.login = os.getlogin()
if str(GetConfig['ProgConfig']['languagesetting']) == 'en':
WindowNewTitle = f"{en.prog_title_1}{self.login}{en.prog_title_2}"
elif str(GetConfig['ProgConfig']['languagesetting']) == 'ar':
WindowNewTitle = f"{ar.prog_title_2}{self.login}{ar.prog_title_1}"
else:
WindowNewTitle = f"{en.prog_title_1}{self.login}{en.prog_title_2}"
self.title(WindowNewTitle)
except Exception as excpt129:
if str(GetConfig['ProgConfig']['languagesetting']) == 'en':
WindowNewTitle = en.prog_title_no_username
elif str(GetConfig['ProgConfig']['languagesetting']) == 'ar':
WindowNewTitle = ar.prog_title_no_username
else:
WindowNewTitle = en.prog_title_no_username
self.title(WindowNewTitle)
# configuring program's main window geometry (DO NOT MODIFY)
self.geometry('1225x600')
# attempting to change the iconbitmap attribute of the window.
try:
self.iconbitmap("icon0.ico")
except Exception as excpt12: # better high level exception handling.
messagebox.showerror("ERROR 1 in ICONBITMAP", f"Unable to load icon file for this window due to exception:\n{excpt12}")
pass
# basically preventing you from resizing it smaller than it's geometry.
self.minsize(1225,600)
if str(GetConfig['ProgConfig']['appearancemode']) == '1': # light mode
# making a full screen scrollable frame.
self.main_frame = Frame(self)
self.main_frame.pack(fill=BOTH, expand=1)
# Create a canvas.
self.main_canvas = Canvas(self.main_frame)
self.main_canvas.pack(side=LEFT, fill=BOTH, expand=1)
# Add a scrollbar to the canvas
self.main_scrollbar = atk.SimpleScrollbar(self.main_frame, orient=VERTICAL, command=self.main_canvas.yview, bg=atk.DEFAULT_COLOR, slider_color='grey', width=12)
self.main_scrollbar.pack(side=RIGHT, fill=Y)
# Configure the canvas.
self.main_canvas.configure(yscrollcommand=self.main_scrollbar.set)
self.main_canvas.bind('<Configure>', lambda e: self.main_canvas.configure(scrollregion = self.main_canvas.bbox("all")))
# Create another frame INSIDE the canvas.
self.show_frame = Frame(self.main_canvas)
# Add that New frame to a window in the canvas.
self.main_canvas.create_window((0,0), window=self.show_frame, anchor="nw")
self.banner = PhotoImage(file="banner.png")
self.banner_show = Label(self.show_frame, image=self.banner, width=1200, height=300)
self.banner_show.grid(column=0, row=1, sticky='w')
elif str(GetConfig['ProgConfig']['appearancemode']) == '2': # dark mode.
# making a full screen scrollable frame.
self.main_frame = Frame(self, background=atk.DEFAULT_COLOR)
self.main_frame.pack(fill=BOTH, expand=1)
# Create a canvas.
self.main_canvas = Canvas(self.main_frame, background=atk.DEFAULT_COLOR)
self.main_canvas.pack(side=LEFT, fill=BOTH, expand=1)
# Add a scrollbar to the canvas
self.main_scrollbar = atk.SimpleScrollbar(self.main_frame, orient=VERTICAL, command=self.main_canvas.yview, bg=atk.DEFAULT_COLOR, slider_color='grey', width=12)
self.main_scrollbar.pack(side=RIGHT, fill=Y)
# Configure the canvas.
self.main_canvas.configure(yscrollcommand=self.main_scrollbar.set)
self.main_canvas.bind('<Configure>', lambda e: self.main_canvas.configure(scrollregion = self.main_canvas.bbox("all")))
# Create another frame INSIDE the canvas.
self.show_frame = Frame(self.main_canvas, background=atk.DEFAULT_COLOR)
# Add that New frame to a window in the canvas.
self.main_canvas.create_window((0,0), window=self.show_frame, anchor="nw")
self.banner = PhotoImage(file="banner.png")
self.banner_show = Label(self.show_frame, image=self.banner, width=1200, height=300, background=atk.DEFAULT_COLOR)
self.banner_show.grid(column=0, row=1, sticky='w')
self.style.configure('TLabelframe.Label', background=atk.DEFAULT_COLOR, foreground='white')
self.style.configure('Label', background=atk.DEFAULT_COLOR)
self.style.configure('Label', foreground='white')
self.style.configure('TLabelframe', background=atk.DEFAULT_COLOR, foreground='white')
self.style.configure('TCheckbutton', background=atk.DEFAULT_COLOR, foreground='white')
self.style.configure('label', foreground='white')
# self.style.configure('Vertical.TScrollbar', background=atk.DEFAULT_COLOR, foreground=atk.DEFAULT_COLOR)
else:
messagebox.showerror("Unsupported appearance mode in Config file", f"Unsupported appearance mode in config file: {str(GetConfig['ProgConfig']['appearancemode'])}.\nThe program will continue with the Light mode instead.")
# making a full screen scrollable frame.
self.main_frame = Frame(self)
self.main_frame.pack(fill=BOTH, expand=1)
# Create a canvas.
self.main_canvas = Canvas(self.main_frame)
self.main_canvas.pack(side=LEFT, fill=BOTH, expand=1)
# Add a scrollbar to the canvas
self.main_scrollbar = atk.SimpleScrollbar(self.main_frame, orient=VERTICAL, command=self.main_canvas.yview, bg=atk.DEFAULT_COLOR, slider_color='grey', width=12)
self.main_scrollbar.pack(side=RIGHT, fill=Y)
# Configure the canvas.
self.main_canvas.configure(yscrollcommand=self.main_scrollbar.set)
self.main_canvas.bind('<Configure>', lambda e: self.main_canvas.configure(scrollregion = self.main_canvas.bbox("all")))
# Create another frame INSIDE the canvas.
self.show_frame = Frame(self.main_canvas)
# Add that New frame to a window in the canvas.
self.main_canvas.create_window((0,0), window=self.show_frame, anchor="nw")
self.banner = PhotoImage(file="banner.png")
self.banner_show = Label(self.show_frame, image=self.banner, width=1200, height=300)
self.banner_show.grid(column=0, row=1, sticky='w')
def execute_theprogram():
self.ShowNotificationDone = True
if str(GetConfig['ProgConfig']['languagesetting']) == 'en':
new_btn_text = en.executing_text
elif str(GetConfig['ProgConfig']['languagesetting']) == 'ar':
new_btn_text = ar.executing_text
else:
new_btn_text = en.executing_text
self.exec_btn.configure(text=new_btn_text)
self.exec_btn.configure(command=empty_function)
self.exec_btn.configure(state='disabled')
# show_output() # Calling the show output method so you can actually see what's happening inside.
self.output_show.configure(state='normal')
self.selection = self.var0.get()
if self.selection == '1':
self.process = subprocess.getoutput('rmdir /s /q "%systemdrive%\\$Recycle.bin"')
self.output_show.insert(END, f"\n {self.process}")
self.selection1 = self.var1.get()
if self.selection1 == '1':
self.process = subprocess.getoutput(' cd /d "%windir%"&erase /s /f /q prefetch')
self.output_show.insert(END, f"\n {self.process}")
self.selection2 = self.var2.get()
if self.selection2 == '1':
self.process = subprocess.getoutput(' cd /d %localappdata%&erase /s /f /q "D3DSCache"')
self.output_show.insert(END, f"\n {self.process}")
self.selection3 = self.var3.get()
if self.selection3 == '1':
self.process = subprocess.getoutput(' cd /d %windir%&erase /s /f /q "Temp"')
self.output_show.insert(END, f"\n {self.process}")
self.selection4 = self.var4.get()
if self.selection4 == '1':
self.process = subprocess.getoutput(' cd /d %localappdata%&erase /s /f /q "Temp"')
self.output_show.insert(END, f"\n {self.process}")
self.selection5 = self.var5.get()
if self.selection5 == '1':
self.process = subprocess.getoutput(' cd /d %localappdata%&cd Google&cd Chrome&cd "User Data"&cd "Default"&erase /s /f /q "GPUCache"&erase /s /f /q Cache&erase /s /f /q "Code Cache"')
self.output_show.insert(END, f"\n {self.process}")
self.selection6 = self.var6.get()
if self.selection6 == '1':
self.process = subprocess.getoutput(' cd /d %localappdata%&cd Google&cd Chrome&cd "User Data"&cd "Default"&del /s /q "Cookies"&del /s /q "Cookies-journal"')
self.output_show.insert(END, f"\n {self.process}")
self.selection9 = self.var7.get()
if self.selection9 == '1':
self.process = subprocess.getoutput(' cd /d "%systemdrive%\\Users\\Default\\AppData\\Local"&erase /s /f /q Temp')
self.output_show.insert(END, f"\n {self.process}")
self.selection10 = self.var8.get()
if self.selection10 == '1':
self.process = subprocess.getoutput(' cd /d "%localappdata%\\Microsoft\\Windows"&erase /s /f /q "INetCache"')
self.output_show.insert(END, f"\n {self.process}")
self.selection11 = self.var9.get()
if self.selection11 == '1':
self.process = subprocess.getoutput(' @echo off | clip')
self.output_show.insert(END, f"\n {self.process}")
self.selection12 = self.var10.get()
if self.selection12 == '1':
self.process = subprocess.getoutput(' cd /d %localappdata%&cd microsoft&cd windows&cd explorer&del /s /q *thumbcache*&cd /d %localappdata%\microsoft\windows\explorer&del /s /q *thumb*')
self.output_show.insert(END, f"\n {self.process}")
self.selection13 = self.var11.get()
if self.selection13 == '1':
self.process = subprocess.getoutput(' cd /d %userprofile%\\AppData\\Roaming&cd Microsoft&cd Windows&erase /s /f /q Recent')
self.output_show.insert(END, f"\n {self.process}")
self.selection14 = self.var12.get()
if self.selection14 == '1':
self.process = subprocess.getoutput(' cd /d "%userprofile%\\AppData\\Roaming\\discord"&erase /s /f /q "Cache"&erase /s /f /q "Code Cache"&erase /s /f /q "GPUCache"&erase /s /f /q "Local Storage"')
self.output_show.insert(END, f"\n {self.process}")
self.selection15 = self.var13.get()
if self.selection15 == '1':
self.process = subprocess.getoutput(' cd /d "%userprofile%\\AppData\\Roaming\\GIMP\\2.10"&erase /s /f /q "tmp"')
self.output_show.insert(END, f"\n {self.process}")
self.selection16 = self.var14.get()
if self.selection16 == '1':
self.process = subprocess.getoutput(' cd /d "%localappdata%\\Steam\\htmlcache"&erase /s /f /q "Cache"&erase /s /f /q "Code Cache"&erase /s /f /q "GPUCache"')
self.output_show.insert(END, f"\n {self.process}")
self.selection17 = self.var15.get()
if self.selection17 == '1':
self.process = subprocess.getoutput(' cd /d "%windir%\\SoftwareDistribution"&del /f /s /q "Download"')
self.output_show.insert(END, f"\n {self.process}")
if str(GetConfig['ProgConfig']['languagesetting']) == 'en':
btn0_txt = en.restart_winupdate_window_content_text
btn0_title = en.restart_winupdate_window_title_text
elif str(GetConfig['ProgConfig']['languagesetting']) == 'ar':
btn0_txt = ar.restart_winupdate_window_content_text
btn0_title = ar.restart_winupdate_window_title_text
else:
btn0_txt = en.restart_winupdate_window_content_text
btn0_title = en.restart_winupdate_window_title_text
self.reboot_uwp = messagebox.askquestion(btn0_title, btn0_txt)
if self.reboot_uwp == "yes":
self.self_2 = Tk()
if str(GetConfig['ProgConfig']['languagesetting']) == 'en':
title_txt = en.restart_winupdate_window_title_text
elif str(GetConfig['ProgConfig']['languagesetting']) == 'ar':
title_txt = ar.restart_winupdate_window_title_text
else:
title_txt = en.restart_winupdate_window_title_text
self.self_2.title(title_txt)
self.self_2.geometry('500x90')
self.self_2.resizable(False,False)
try:
self.self_2.iconbitmap("icon0.ico")
except Exception as excpt24:
messagebox.showerror("ERROR 1 in ICONBITMAP process", f"Unable to load the icon file for this window due to Exception:\n{excpt24}")
pass
if str(GetConfig['ProgConfig']['languagesetting']) == 'en':
lbl0_txt = en.restarting_winupdate_service_text
elif str(GetConfig['ProgConfig']['languagesetting']) == 'ar':
lbl0_txt = ar.restarting_winupdate_service_text
else:
lbl0_txt = en.restarting_winupdate_service_text
# Defining some labels used to show the user that something is happening inside.
self.lbl0x = Label(self.self_2, text=lbl0_txt, font=("Arial", 19))
self.lbl0x.place(x=25 ,y=20)
# Defining the actions used to restart the Windows update service.
self.process = subprocess.getoutput('net start wuauserv')
if str(GetConfig['ProgConfig']['languagesetting']) == 'en':
lbl1_txt = en.restart_winupdate_service_done_text
lbl2_txt_additionals = en.restart_winupdate_service_done_text
elif str(GetConfig['ProgConfig']['languagesetting']) == 'ar':
lbl1_txt = ar.restart_winupdate_service_done_text
lbl2_txt_additionals = ar.restart_winupdate_service_done_text
else:
lbl1_txt = en.restart_winupdate_service_done_text
lbl2_txt_additionals = en.restart_winupdate_service_done_text
# Defining the commands used to show the user that all pending operations has been successfully completed!
messagebox.showinfo(title_txt, lbl1_txt)
# Defining the mainloop destroy once the execution is done.
self.self_2.destroy()
self.self_2.mainloop()
messagebox.showinfo(title_txt, lbl2_txt_additionals)
else:
if str(GetConfig['ProgConfig']['languagesetting']) == 'en':
msgbox_rwup_title = en.restart_winupdate_window_title_text
msgbox_rwup_content = en.not_restarting_winupdate_service_warning_text
elif str(GetConfig['ProgConfig']['languagesetting']) == 'ar':
msgbox_rwup_title = ar.restart_winupdate_window_title_text
msgbox_rwup_content = ar.not_restarting_winupdate_service_warning_text
else:
msgbox_rwup_title = en.restart_winupdate_window_title_text
msgbox_rwup_content = en.not_restarting_winupdate_service_warning_text
messagebox.showinfo(msgbox_rwup_title, msgbox_rwup_content)
self.selection18 = self.var16.get()
if self.selection18 == '1':
self.process = subprocess.getoutput(' cd /d %localappdata%\\Microsoft\\Windows&erase /s /f /q "Caches"')
self.output_show.insert(END, f"\n {self.process}")
self.selection19 = self.var17.get()
if self.selection19 == '1':
self.process = subprocess.getoutput(' cd /d "%localappdata%\\Microsoft\\Windows"&erase /s /f /q "INetCookies"')
self.output_show.insert(END, f"\n {self.process}")
self.selection20 = self.var18.get()
if self.selection20 == '1':
self.process = subprocess.getoutput(' cd /d %localappdata%\\Microsoft\\Windows&erase /s /f /q "IECompatCache"&erase /s /f /q "IECompatUaCache"')
self.output_show.insert(END, f"\n {self.process}")
self.selection21 = self.var19.get()
if self.selection21 == '1':
self.process = subprocess.getoutput(' cd /d %localappdata%\\Microsoft\\Windows&erase /s /f /q "IEDownloadHistory"')
self.output_show.insert(END, f"\n {self.process}")
self.selection22 = self.var20.get()
if self.selection22 == '1':
self.process = subprocess.getoutput(' cd /d "%localappdata%\\Microsoft\\Windows"&erase /s /f /q "ActionCenterCache"')
self.output_show.insert(END, f"\n {self.process}")
self.selection23 = self.var21.get()
if self.selection23 == '1':
self.process = subprocess.getoutput(' cd /d %localappdata%\\Microsoft\\Windows&erase /s /f /q "AppCache"')
self.output_show.insert(END, f"\n {self.process}")
self.selection24 = self.var22.get()
if self.selection24 == '1':
if str(GetConfig['ProgConfig']['languagesetting']) == 'en':
msgbox_msstoreedge_title = en.clean_ms_store_based_edge_cache_window_title
msgbox_msstoreedge_content = en.clean_ms_store_based_edge_cache_dialog_one_content
msgbox_msstoreedge_content2 = en.clean_ms_store_based_edge_cache_dialog_two_content
done_txt = en.done_text
canceled_by_user_txt = en.operation_interrupted_by_user
elif str(GetConfig['ProgConfig']['languagesetting']) == 'ar':
msgbox_msstoreedge_title = ar.clean_ms_store_based_edge_cache_window_title
msgbox_msstoreedge_content = ar.clean_ms_store_based_edge_cache_dialog_one_content
msgbox_msstoreedge_content2 = ar.clean_ms_store_based_edge_cache_dialog_two_content
done_txt = ar.done_text
canceled_by_user_txt = ar.operation_interrupted_by_user
else:
msgbox_msstoreedge_title = en.clean_ms_store_based_edge_cache_window_title
msgbox_msstoreedge_content = en.clean_ms_store_based_edge_cache_dialog_one_content
msgbox_msstoreedge_content2 = en.clean_ms_store_based_edge_cache_dialog_two_content
done_txt = en.done_text
canceled_by_user_txt = en.operation_interrupted_by_user
self.conf1 = messagebox.askquestion(msgbox_msstoreedge_title, msgbox_msstoreedge_content)
if self.conf1 == "yes":
messagebox.showinfo(msgbox_msstoreedge_title, msgbox_msstoreedge_content2)
self.process = subprocess.getoutput(' explorer.exe "%localappdata%\\Packages\\"')
self.output_show.insert(END, f"\n {self.process}")
messagebox.showinfo(msgbox_msstoreedge_title, done_txt)
else:
messagebox.showinfo(msgbox_msstoreedge_title, canceled_by_user_txt)
self.selection25 = self.var23.get()
if self.selection25 == '1':
self.process = subprocess.getoutput(' cd /d "%localappdata%\\Microsoft\\Windows\\Explorer"&erase /s /f /q "ThumbCacheToDelete"')
self.output_show.insert(END, f"\n {self.process}")
self.selection26 = self.var24.get()
if self.selection26 == '1':
self.process = subprocess.getoutput(' cd /d "%localappdata%\\Microsoft\\Edge\\User Data\\Default"&erase /s /f /q "GPUCache"&erase /s /f /q "Cache"&erase /s /f /q "Code Cache"')
self.output_show.insert(END, f"\n {self.process}")
self.selection27 = self.var25.get()
if self.selection27 == '1':
self.process = subprocess.getoutput(' cd /d "%localappdata%\\Microsoft\\Edge\\User Data\\Default"&del /s /q "Cookies"&del /s /q "Cookies-journal"')
self.output_show.insert(END, f"\n {self.process}")
self.selection28 = self.var26.get()
if self.selection28 == '1':
self.process = subprocess.getoutput(' cd /d "%localappdata%\\Roblox"&erase /s /f /q "Downloads"')
self.output_show.insert(END, f"\n {self.process}")
self.selection29 = self.var27.get()
if self.selection29 == '1':
self.process = subprocess.getoutput(' cd /d "%appdata%\\Adobe\\Adobe Photoshop 2020\\Adobe Photoshop 2020 Settings\\web-cache-temp"&erase /s /f /q "GPUCache"&erase /s /f /q "Code Cache"&del /s /f /q "Visited Links"')
self.output_show.insert(END, f"\n {self.process}")
self.selection30 = self.var28.get()
if self.selection30 == '1':
self.process = subprocess.getoutput(' cd /d "%localappdata%\\VEGAS Pro\\17.0"&erase /s /f /q "File Explorer Thumbnails"&erase /s /f /q "Device Explorer Thumbnails"&del /s /f /q "*.autosave.veg.bak"&del /s /f /q "svfx_Ofx*.log"')
self.output_show.insert(END, f"\n {self.process}")
self.selection31 = self.var29.get()
if self.selection31 == '1':
self.process = subprocess.getoutput(' cd /d "%localappdata%\\McNeel\\Rhinoceros"&erase /s /f /q "temp"')
self.output_show.insert(END, f"\n {self.process}")
self.selection32 = self.var30.get()
if self.selection32 == '1':
self.process = subprocess.getoutput(' cd /d "%userprofile%\\AppData\\LocalLow\\Microsoft"&erase /s /f /q /A:S "CryptnetUrlCache"')
self.output_show.insert(END, f"\n {self.process}")
self.selection33 = self.var31.get()
if self.selection33 == '1':
self.process = subprocess.getoutput(' cd /d "%localappdata%\\pip"&erase /s /f /q "cache"')
self.output_show.insert(END, f"\n {self.process}")
self.selection34 = self.var32.get()
if self.selection34 == '1':
if str(GetConfig['ProgConfig']['languagesetting']) == 'en':
msgbox_eraserammap_title = en.erase_rammap_title
msgbox_eraserammap_content = en.erase_rammap_content
msgbox_confirm_defaultpath_txt = en.default_path_rammap
msgbox_confirm_defaultpath_title = en.default_path_msgbox_title
msgbox_commandsent_txt = en.commandsent_to_rammap_text
msgbox_operationcanceledbyuser_txt = en.operation_interrupted_by_user
elif str(GetConfig['ProgConfig']['languagesetting']) == 'ar':
msgbox_eraserammap_title = ar.erase_rammap_title
msgbox_eraserammap_content = ar.erase_rammap_content
msgbox_confirm_defaultpath_txt = ar.default_path_rammap
msgbox_confirm_defaultpath_title = ar.default_path_msgbox_title
msgbox_commandsent_txt = ar.commandsent_to_rammap_text
msgbox_operationcanceledbyuser_txt = ar.operation_interrupted_by_user
else:
msgbox_eraserammap_title = en.erase_rammap_title
msgbox_eraserammap_content = en.erase_rammap_content
msgbox_confirm_defaultpath_txt = en.default_path_rammap
msgbox_confirm_defaultpath_title = en.default_path_msgbox_title
msgbox_commandsent_txt = en.commandsent_to_rammap_text
msgbox_operationcanceledbyuser_txt = en.operation_interrupted_by_user
self.conf2 = messagebox.askquestion(msgbox_eraserammap_title, msgbox_eraserammap_content)
if self.conf2 == "yes":
self.RAMMAPpath_var = GetConfig['ProgConfig']['RAMMapPath']
if self.RAMMAPpath_var == '$DEFAULT':
messagebox.showinfo(msgbox_confirm_defaultpath_title, msgbox_confirm_defaultpath_txt)
self.process = subprocess.getoutput(r'"%systemdrive%\RAMMap\RAMMap.exe" -Ew')
self.output_show.insert(END, f"\n {self.process}")
messagebox.showinfo(msgbox_eraserammap_title, msgbox_commandsent_txt)
else:
self.process = subprocess.getoutput(rf'""{self.RAMMAPpath_var}"\RAMMap.exe" -Ew')
self.output_show.insert(END, f"\n {self.process}")
messagebox.showinfo(msgbox_eraserammap_title, msgbox_commandsent_txt)
else:
messagebox.showinfo(msgbox_eraserammap_title, msgbox_operationcanceledbyuser_txt)
self.selection35 = self.var33.get()
if self.selection35 == '1':
self.process = subprocess.getoutput(' cd /d "%localappdata%\\Google\\Chrome\\User Data\\Default"&del /s /q "Extension Cookies"&del /s /q "Extension Cookies-journal"')
self.output_show.insert(END, f"\n {self.process}")
self.selection36 = self.var34.get()
if self.selection36 == '1':
self.CDPCCPATH_var = GetConfig['ProgConfig']['CDPCCPATH']
if self.CDPCCPATH_var == '$DEFAULT':
if str(GetConfig['ProgConfig']['languagesetting']) == 'en':
you_didnt_specify_path_wacc_txt = en.default_path_winactivities_cache_text
notification_2 = en.default_path_msgbox_title
elif str(GetConfig['ProgConfig']['languagesetting']) == 'ar':
you_didnt_specify_path_wacc_txt = ar.default_path_winactivities_cache_text
notification_2 = ar.default_path_msgbox_title
else:
you_didnt_specify_path_wacc_txt = en.default_path_winactivities_cache_text
notification_2 = en.default_path_msgbox_title
messagebox.showinfo(notification_2, you_didnt_specify_path_wacc_txt)
self.process = subprocess.getoutput(' cd /d "%localappdata%\\ConnectedDevicesPlatform"&erase /s /f /q "ee2999716b7783e6"')
self.output_show.insert(END, f"\n {self.process}")
else:
self.process = subprocess.getoutput(rf' cd /d "%localappdata%\\ConnectedDevicesPlatform"&erase /s /f /q "{self.CDPCCPATH_var}"')
self.output_show.insert(END, f"\n {self.process}")
self.selection37 = self.var35.get()
if self.selection37 == '1':
if str(GetConfig['ProgConfig']['languagesetting']) == 'en':
clr_iconcache_dialogtxt = en.iconcache_dialog_text
clr_iconcache_dialogtitle = en.clear_icon_cache_dialog_text
clr_iconcache_databasefile_done = en.done_text
elif str(GetConfig['ProgConfig']['languagesetting']) == 'ar':
clr_iconcache_dialogtxt = ar.iconcache_dialog_text
clr_iconcache_dialogtitle = ar.clear_icon_cache_dialog_text
clr_iconcache_databasefile_done = ar.done_text
else:
clr_iconcache_dialogtxt = en.iconcache_dialog_text
clr_iconcache_dialogtitle = en.clear_icon_cache_dialog_text
clr_iconcache_databasefile_done = en.done_text
self.conf3 = messagebox.askquestion(clr_iconcache_dialogtitle, clr_iconcache_dialogtxt)
if self.conf3 == "yes":
self.process = subprocess.getoutput('%windir%\\explorer.exe "%localappdata%"')
self.output_show.insert(END, f"\n {self.process}")
messagebox.showinfo(clr_iconcache_dialogtitle, clr_iconcache_databasefile_done)
else:
pass
self.selection38 = self.var36.get()
if self.selection38 == '1':
self.process = subprocess.getoutput(' cd /d "%localappdata%"&erase /s /f /q "Microvirt"')
self.output_show.insert(END, f"\n {self.process}")
self.selection39 = self.var37.get()
if self.selection39 == '1':
self.ADWCLRPATH_var = GetConfig['ProgConfig']['ADWCLRPath']
if self.ADWCLRPATH_var == '$DEFAULT':
if str(GetConfig['ProgConfig']['languagesetting']) == 'en':
notification_3 = en.default_path_msgbox_title
custom_pathforadwclr_content = en.nocustom_path_foradwcleaner_text
elif str(GetConfig['ProgConfig']['languagesetting']) == 'ar':
notification_3 = ar.default_path_msgbox_title
custom_pathforadwclr_content = ar.nocustom_path_foradwcleaner_text
else:
notification_3 = en.default_path_msgbox_title
custom_pathforadwclr_content = en.nocustom_path_foradwcleaner_text
messagebox.showinfo(notification_3, custom_pathforadwclr_content)
self.process = subprocess.getoutput(' erase /s /f /q "%systemdrive%\\AdwCleaner\\Logs"')
self.output_show.insert(END, f"\n {self.process}")
else:
self.process = subprocess.getoutput(rf' erase /s /f /q "{self.ADWCLRPATH_var}\Logs"')
self.output_show.insert(END, f"\n {self.process}")
self.selection40 = self.var38.get()
if self.selection40 == '1':
self.process = subprocess.getoutput(' %systemdrive%&cd /d \\.\\&erase /s /f /q "PerfLogs"')
self.output_show.insert(END, f"\n {self.process}")
self.selection41 = self.var39.get()
if self.selection41 == '1':
self.process = subprocess.getoutput(' cd /d "%userprofile%"&rmdir /s /q ".cache"')
self.output_show.insert(END, f"\n {self.process}")
self.selection42 = self.var40.get()
if self.selection42 == '1':
self.process = subprocess.getoutput(' cd /d "%localappdata%"&erase /s /f /q "SquirrelTemp"')
self.output_show.insert(END, f"\n {self.process}")
self.selection43 = self.var41.get()
if self.selection43 == '1':
self.process = subprocess.getoutput(' cd /d "%userprofile%\\AppData\\LocalLow"&erase /s /f /q "Temp"')
self.output_show.insert(END, f"\n {self.process}")
self.selection44 = self.var42.get()
if self.selection44 == '1':
self.process = subprocess.getoutput(' cd /d "%localappdata%"&erase /s /f /q "ElevatedDiagnostics"')
self.output_show.insert(END, f"\n {self.process}")
self.selection45 = self.var43.get()
if self.selection45 == '1':
self.process = subprocess.getoutput(' cd /d "%localappdata%\\VMware"&erase /s /f /q "vmware-download*"')
self.output_show.insert(END, f"\n {self.process}")
self.selection46 = self.var44.get()
if self.selection46 == '1':
self.process = subprocess.getoutput(' cd /d "%userprofile%\\appdata\\roaming\\balena-etcher"&erase /s /f /q "blob_storage"&erase /s /f /q "Code Cache"&erase /s /f /q "GPUCache"&erase /s /f /q "Local Storage"&erase /s /f /q "Session Storage"')
self.output_show.insert(END, f"\n {self.process}")
self.selection47 = self.var45.get()
if self.selection47 == '1':
self.process = subprocess.getoutput(' cd /d "%appdata%"&cd /d "%userprofile%\\AppData\\Roaming"&erase /s /f /q "pyinstaller"')
self.output_show.insert(END, f"\n {self.process}")
self.selection48 = self.var46.get()
if self.selection48 == '1':
self.process = subprocess.getoutput(' cd /d "%localappdata%"&erase /s /f /q "Jedi"')
self.output_show.insert(END, f"\n {self.process}")
self.selection49 = self.var47.get()
if self.selection49 == '1':
self.process = subprocess.getoutput(' cd /d "%localappdata%"&del /s /q "recently-used.xbel"')
self.output_show.insert(END, f"\n {self.process}")
self.selection50 = self.var48.get()
if self.selection50 == '1':
self.process = subprocess.getoutput(' cd /d "%localappdata%"&del /s /q "llftool.*.agreement"')
self.output_show.insert(END, f"\n {self.process}")
self.selection51 = self.var49.get()
if self.selection51 == '1':
self.process = subprocess.getoutput(' cd /d "%localappdata%"&erase /s /f /q "IdentityNexusIntegration"')
self.output_show.insert(END, f"\n {self.process}")
self.selection52 = self.var50.get()
if self.selection52 == '1':
self.process = subprocess.getoutput(' cd /d "%localappdata%\\Axolot Games"&cd "Scrap Mechanic"&cd "Temp"&erase /s /f /q "WorkshopIcons"')
self.output_show.insert(END, f"\n {self.process}")
self.selection53 = self.var51.get()
if self.selection53 == '1':
self.process = subprocess.getoutput(' cd /d "%localappdata%\\Roblox"&erase /s /f /q "logs"')
self.output_show.insert(END, f"\n {self.process}")
self.selection54 = self.var52.get()
if self.selection54 == '1':
self.process = subprocess.getoutput(' cd /d "%userprofile%\\AppData\\Roaming\\Code"&erase /s /f /q "GPUCache"&erase /s /f /q "Code Cache"&erase /s /f /q "CachedData"&erase /s /f /q "Cache"')
self.output_show.insert(END, f"\n {self.process}")
self.selection55 = self.var53.get()
if self.selection55 == '1':
self.process = subprocess.getoutput(' cd /d "%userprofile%\\AppData\\Roaming\\Code"&del /s /q "Cookies"&del /s /q "Cookies-journal"')
self.output_show.insert(END, f"\n {self.process}")
self.selection56 = self.var54.get()
if self.selection56 == '1':
self.process = subprocess.getoutput(' cd /d "%userprofile%\\AppData\\Roaming\\Code"&erase /s /f /q "CachedExtensions"&erase /s /f /q "CachedExtensionVSIXs"')
self.output_show.insert(END, f"\n {self.process}")
self.selection57 = self.var55.get()
if self.selection57 == '1':
self.WINXPEPATH_var = GetConfig['ProgConfig']['WINXPEPATH']
if self.WINXPEPATH_var == '$NONE':
if str(GetConfig['ProgConfig']['languagesetting']) == 'en':
error_title = en.an_error_has_occured_text
error_content_nopathforwinxpe = en.no_path_winxpe_text
elif str(GetConfig['ProgConfig']['languagesetting']) == 'ar':
error_title = ar.an_error_has_occured_text
error_content_nopathforwinxpe = ar.no_path_winxpe_text
else:
error_title = en.an_error_has_occured_text
error_content_nopathforwinxpe = en.no_path_winxpe_text
messagebox.showinfo(error_title, error_content_nopathforwinxpe)
else:
self.process = subprocess.getoutput(rf' erase /s /f /q "{self.WINXPEPATH_var}\Temp"')
self.output_show.insert(END, f"\n {self.process}")
if str(GetConfig['ProgConfig']['languagesetting']) == 'en':
notify_title = en.note_text
notify_content = en.winxpe_after_clean_note_text
elif str(GetConfig['ProgConfig']['languagesetting']) == 'ar':
notify_title = ar.note_text
notify_content = ar.winxpe_after_clean_note_text
else:
notify_title = en.note_text
notify_content = en.winxpe_after_clean_note_text
messagebox.showinfo(notify_title, notify_content)
self.selection58 = self.var56.get()
if self.selection58 == '1':
self.process = subprocess.getoutput(' cd /d "%localappdata%"&erase /s /f /q "ServiceHub"')
self.output_show.insert(END, f"\n {self.process}")
self.selection59 = self.var57.get()
if self.selection59 == '1':
self.process = subprocess.getoutput(' erase /s /f /q "%localappdata%\\HiSuite\\log"')
self.output_show.insert(END, f"\n {self.process}")
self.selection60 = self.var58.get()
if self.selection60 == '1':
self.process = subprocess.getoutput(' erase /s /f /q "%userprofile%\\AppData\\Roaming\\.minecraft\\webcache"')
self.output_show.insert(END, f"\n {self.process}")
self.selection61 = self.var59.get()
if self.selection61 == '1':
self.process = subprocess.getoutput(' cd /d "%localappdata%\\Mozilla\\Firefox\\Profiles"&cd *.default-release&erase /s /f /q "cache2"&erase /s /f /q "jumpListCache"&cd /d "%userprofile%\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles"&cd *.default-release&erase /s /f /q "shader-cache"')
self.output_show.insert(END, f"\n {self.process}")
self.selection62 = self.var60.get()
if self.selection62 == '1':
self.process = subprocess.getoutput(' cd /d "%userprofile%\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles"&cd *.default-release&del /s /q "cookies.sqlite"')
self.output_show.insert(END, f"\n {self.process}")
self.selection63 = self.var61.get()
if self.selection63 == '1':
self.process = subprocess.getoutput(' cd /d "%localappdata%\\VEGAS"&erase /s /f /q "ErrorReport"')
self.output_show.insert(END, f"\n {self.process}")
self.selection64 = self.var62.get()
if self.selection64 == '1':
self.process = subprocess.getoutput(' cd /d "%userprofile%\\AppData\\LocalLow\\Sun\\Java\\Deployment"&erase /s /f /q "tmp"')
self.output_show.insert(END, f"\n {self.process}")
self.selection65 = self.var63.get()
if self.selection65 == '1':
self.process = subprocess.getoutput(' cd /d "%localappdata%\\HiSuite\\userdata"&erase /s /f /q "DropTemp"')
self.output_show.insert(END, f"\n {self.process}")
self.selection66 = self.var64.get()
self.output_show.insert(END, "\n\n\n All pending operations has been completed!\n\n\n\nYou may press the 'F6' button in your keyboard to clear console.\n\n\n")
self.output_show.configure(state='disabled')
if self.selection66 == '1':
self.destroy()
# Sleeping a bit for longer (or equal) to 5 seconds.
# time.sleep(1)
try:
# Ok, let's revert everything back to what it was before.
self.exec_btn.configure(text=self.begin_cleaning_btn_text)
self.exec_btn.configure(command=multiprocessing_execute_btn_function)
self.exec_btn.configure(state='normal')
except TclError as tkerr:
messagebox.showerror("An ERROR has occured", f"An ERROR has occured during the program's mainloop\nHere are some technical details if you want to reach us\n{tkerr}\nThe program can't continue and will close after you press OK")
raise SystemExit(15) # error code 15 is for an urgent mainloop exception.
return None
def multiprocessing_execute_btn_function():
threading.Thread(target=execute_theprogram).start()
pass
def empty_function():
"a function used to fix the issue when temp cleaner gui does not stop the executing button even when cleaning."
pass
def uncheck_all_options():
"""
A function to uncheck all available cleaning options in the Home Screen UI.
"""
try:
self.var0.set(0)
self.var1.set(0)
self.var2.set(0)
self.var3.set(0)
self.var4.set(0)
self.var5.set(0)
self.var6.set(0)
self.var7.set(0)
self.var8.set(0)
self.var9.set(0)
self.var10.set(0)
self.var11.set(0)
self.var12.set(0)
self.var13.set(0)
self.var14.set(0)
self.var15.set(0)
self.var16.set(0)
self.var17.set(0)
self.var18.set(0)
self.var19.set(0)
self.var20.set(0)
self.var21.set(0)
self.var22.set(0)
self.var23.set(0)
self.var24.set(0)
self.var25.set(0)
self.var26.set(0)
self.var27.set(0)
self.var28.set(0)
self.var29.set(0)
self.var30.set(0)
self.var31.set(0)
self.var32.set(0)
self.var33.set(0)
self.var34.set(0)
self.var35.set(0)
self.var36.set(0)
self.var37.set(0)
self.var38.set(0)
self.var39.set(0)
self.var40.set(0)
self.var41.set(0)
self.var42.set(0)
self.var43.set(0)
self.var44.set(0)
self.var45.set(0)
self.var46.set(0)
self.var47.set(0)
self.var48.set(0)
self.var49.set(0)
self.var50.set(0)
self.var51.set(0)
self.var52.set(0)
self.var53.set(0)
self.var54.set(0)
self.var55.set(0)
self.var56.set(0)
self.var57.set(0)
self.var58.set(0)
self.var59.set(0)
self.var60.set(0)
self.var61.set(0)
self.var62.set(0)
self.var63.set(0)
self.var64.set(0)
except Exception as unable_to_uncheck_all_exception:
print(f"Unable to execute the function uncheck_all_options() due to this exception\n{unable_to_uncheck_all_exception}")
return False
return True
def apply_cleaning_preset(user_choice):
if str(GetConfig['ProgConfig']['languagesetting']) == "en": # if program language is english
print(str(self.preset_chooser.get()))
if str(self.preset_chooser.get()) == en.preset_default :
try:
uncheck_all_options()
self.var0.set(1)
self.var2.set(1)
self.var9.set(1)
self.var3.set(1)
self.var4.set(1)
self.var8.set(1)
self.var23.set(1)
except Exception as exception_applying_preset:
print(exception_applying_preset)
pass
elif str(self.preset_chooser.get()) == en.preset_maximum_cleaning :
try:
uncheck_all_options()
self.var0.set(1)
self.var1.set(1)
self.var2.set(1)
self.var3.set(1)
self.var4.set(1)
self.var5.set(1)
self.var6.set(1)
self.var7.set(1)
self.var8.set(1)
self.var9.set(1)
self.var10.set(1)
self.var11.set(1)
self.var12.set(1)
self.var13.set(1)
self.var14.set(1)
self.var15.set(1)
self.var16.set(1)
self.var17.set(1)
self.var18.set(1)
self.var19.set(1)
self.var20.set(1)
self.var21.set(1)
self.var22.set(1)
self.var23.set(1)
self.var24.set(1)
self.var25.set(1)
self.var26.set(1)
self.var27.set(1)
self.var28.set(1)
self.var29.set(1)
self.var30.set(1)
self.var31.set(1)
self.var32.set(1)
self.var33.set(1)
self.var34.set(1)
self.var35.set(1)
self.var36.set(1)
self.var37.set(1)
self.var38.set(1)
self.var39.set(1)
self.var40.set(1)
self.var41.set(1)
self.var42.set(1)
self.var43.set(1)
self.var44.set(1)
self.var45.set(1)
self.var46.set(1)
self.var47.set(1)
self.var48.set(1)
self.var49.set(1)
self.var50.set(1)
self.var51.set(1)
self.var52.set(1)
self.var53.set(1)
self.var54.set(1)
self.var55.set(1)
self.var56.set(1)
self.var57.set(1)
self.var58.set(1)
self.var59.set(1)
self.var60.set(1)
self.var61.set(1)
self.var62.set(1)
self.var63.set(1)
except Exception as exception_applying_max_preset:
print(exception_applying_max_preset)
pass
elif str(self.preset_chooser.get()) == en.preset_recyclebin_cleaning :
try:
uncheck_all_options()
self.var0.set(1)
except Exception as exception_applying_recyclebin_cleaning_preset :
print(exception_applying_recyclebin_cleaning_preset)
pass
elif str(self.preset_chooser.get()) == en.preset_webbrowser_cleaning_with_cookies :
try:
uncheck_all_options()
self.var5.set(1)
self.var6.set(1)
self.var33.set(1)
self.var24.set(1)
self.var25.set(1)
self.var59.set(1)
self.var60.set(1)
self.var17.set(1)
self.var18.set(1)
self.var19.set(1)
self.var8.set(1)
except Exception as exception_applying_webbrowser_cookies_cleaning_preset:
print(exception_applying_webbrowser_cookies_cleaning_preset)
pass
elif str(self.preset_chooser.get()) == en.preset_webbrowser_cleaning :
try:
uncheck_all_options()
self.var8.set(1)
self.var5.set(1)
self.var24.set(1)
self.var59.set(1)
self.var18.set(1)
self.var19.set(1)
except Exception as exception_applying_webbrowser_cleaning_preset :
print(exception_applying_webbrowser_cleaning_preset)
pass
elif str(self.preset_chooser.get()) == en.fix_roblox_error_preset :
try:
uncheck_all_options()
self.var9.set(1)
self.var3.set(1)
self.var4.set(1)
self.var41.set(1)
self.var26.set(1)
except Exception as exception_applying_rblxfix_preset :
print(exception_applying_rblxfix_preset)
pass
else: # if none of these options are selected.
pass
elif str(GetConfig['ProgConfig']['languagesetting']) == "ar": # if program language is arabic.
print(str(self.preset_chooser.get()))
if str(self.preset_chooser.get()) == ar.preset_default :
try:
uncheck_all_options()
self.var0.set(1)
self.var2.set(1)
self.var9.set(1)
self.var3.set(1)
self.var4.set(1)
self.var8.set(1)
self.var23.set(1)
except Exception as exception_applying_preset:
print(exception_applying_preset)
pass
elif str(self.preset_chooser.get()) == ar.preset_maximum_cleaning :
try:
uncheck_all_options()
self.var0.set(1)
self.var1.set(1)
self.var2.set(1)
self.var3.set(1)
self.var4.set(1)
self.var5.set(1)
self.var6.set(1)
self.var7.set(1)
self.var8.set(1)
self.var9.set(1)
self.var10.set(1)
self.var11.set(1)
self.var12.set(1)
self.var13.set(1)
self.var14.set(1)
self.var15.set(1)
self.var16.set(1)
self.var17.set(1)
self.var18.set(1)
self.var19.set(1)
self.var20.set(1)
self.var21.set(1)
self.var22.set(1)
self.var23.set(1)
self.var24.set(1)
self.var25.set(1)
self.var26.set(1)
self.var27.set(1)
self.var28.set(1)
self.var29.set(1)
self.var30.set(1)
self.var31.set(1)
self.var32.set(1)
self.var33.set(1)
self.var34.set(1)
self.var35.set(1)
self.var36.set(1)
self.var37.set(1)
self.var38.set(1)
self.var39.set(1)
self.var40.set(1)
self.var41.set(1)
self.var42.set(1)
self.var43.set(1)
self.var44.set(1)
self.var45.set(1)
self.var46.set(1)
self.var47.set(1)
self.var48.set(1)
self.var49.set(1)
self.var50.set(1)
self.var51.set(1)
self.var52.set(1)
self.var53.set(1)
self.var54.set(1)
self.var55.set(1)
self.var56.set(1)
self.var57.set(1)
self.var58.set(1)
self.var59.set(1)
self.var60.set(1)
self.var61.set(1)
self.var62.set(1)
self.var63.set(1)
except Exception as exception_applying_max_preset:
print(exception_applying_max_preset)
pass
elif str(self.preset_chooser.get()) == ar.preset_recyclebin_cleaning :
try:
uncheck_all_options()
self.var0.set(1)
except Exception as exception_applying_recyclebin_cleaning_preset :
print(exception_applying_recyclebin_cleaning_preset)
pass
elif str(self.preset_chooser.get()) == ar.preset_webbrowser_cleaning_with_cookies :
try:
uncheck_all_options()
self.var5.set(1)
self.var6.set(1)
self.var33.set(1)
self.var24.set(1)
self.var25.set(1)
self.var59.set(1)
self.var60.set(1)
self.var17.set(1)
self.var18.set(1)