-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathZOOM Checker.au3
1677 lines (1650 loc) · 66.7 KB
/
ZOOM Checker.au3
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
#cs ----------------------------------------------------------------------------
AutoIt Version: 3.3.14.2
Author: Timboli
Script Function: Extract game titles from a saved ZOOM Platform web page
Template AutoIt script.
#ce ----------------------------------------------------------------------------
; Functions
; MainGUI(), DetailGUI(), DropBoxGUI(), SettingsGUI()
; DisplayTitles($drop = ""), ExtractTitles($drop = ""), FixTheTitle(), LoadTheList(), SetStateOfControls($state)
#include <Constants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <ButtonConstants.au3>
#include <ColorConstants.au3>
#include <EditConstants.au3>
#include <ListViewConstants.au3>
#include <StaticConstants.au3>
#include <GuiListView.au3>
#include <Misc.au3>
#include <File.au3>
#include <Date.au3>
#include <Array.au3>
_Singleton("zoom-platform-checker-timboli")
Global $Button_apply, $Button_check, $Button_detail, $Button_fav, $Button_fold, $Button_info, $Button_log, $Button_own, $Button_quit
Global $Button_save, $Button_shop, $Button_web, $Combo_own, $Group_games, $Label_status, $ListView_games, $Radio_box, $Radio_gui
Global $a, $ans, $array, $blurb, $blurbs, $case, $checked, $CheckerGUI, $clip, $date, $detail, $drop, $e, $entries, $entry
Global $exists, $favorite, $found, $game, $gamelist, $games, $gamesfile, $high, $i, $idx, $images, $imgfle, $inifle, $last
Global $left, $line, $logfle, $low, $method, $new, $numb, $nums, $oldlist, $owned, $part, $path, $ping, $price, $prior, $r
Global $read, $remfile, $removals, $remove, $s, $savefile, $savpth, $sect, $start, $state, $style, $target, $templist, $title
Global $top, $tot, $update, $usepth, $version, $webpage, $window, $wintit, $zoomfold, $zoomlist
$blurbs = @ScriptDir & "\Blurbs.ini"
$gamelist = @ScriptDir & "\Games.txt"
$gamesfile = @ScriptDir & "\Games.ini"
$images = @ScriptDir & "\Images"
$inifle = @ScriptDir & "\Settings.ini"
$logfle = @ScriptDir & "\Record.log"
$oldlist = @ScriptDir & "\Oldgames.txt"
$remfile = @ScriptDir & "\Removals.ini"
$savefile = @ScriptDir & "\Saved.html"
$templist = @ScriptDir & "\List.txt"
$zoomlist = @ScriptDir & "\Games.csv"
$update = "(updated August 2022)"
$version = "v1.9"
If Not FileExists($images) Then DirCreate($images)
$games = ""
If $CmdLine[0] = "" Then
$method = IniRead($inifle, "Program", "method", "")
If $method = "" Then
;$method = "dropbox"
$method = "gui"
IniWrite($inifle, "Program", "method", $method)
EndIf
$window = ""
If $method = "dropbox" Then
$ans = MsgBox(262177, "Program Method Query", _
"This program can be used in two different ways." & @LF & @LF & _
"OK = Dropbox (original method)." & @LF & _
"CANCEL = Window (new method)." & @LF & @LF & _
"NOTE - Window has fully automated checking." & @LF & @LF & _
"(Defaults after 9 seconds to Dropbox)", 9)
If $ans = 2 Then
$window = "gui"
EndIf
EndIf
If $method = "dropbox" And $window = "" Then
Global $DropboxGUI
;
$target = @LF & "Drag && Drop" & @LF & "The Saved" & @LF & "ZOOM Platform" & @LF & "Web Page" & @LF & "File HERE"
DropBox()
ElseIf $method = "gui" Or $window = "gui" Then
Global $CheckerGUI
;
MainGUI()
EndIf
Else
$path = $CmdLine[1]
If FileExists($path) Then
$webpage = $path
ExtractTitles()
DisplayTitles()
EndIf
EndIf
Exit
Func MainGUI()
Local $Button_remove, $Group_method, $Group_status, $Input_dates, $Input_game
;
Local $added, $colnum, $count, $dates, $download, $height, $icoI, $icoT, $icoW, $icoX, $imgurl, $ind, $lowid
Local $released, $revamp, $shell, $store, $stores, $updated, $URL, $user32, $width
;
$width = 870
$height = 410
$left = IniRead($inifle, "GUI Window", "left", @DesktopWidth - $width - 25)
$top = IniRead($inifle, "GUI Window", "top", @DesktopHeight - $height - 60)
$style = $WS_OVERLAPPED + $WS_CAPTION + $WS_SYSMENU + $WS_MINIMIZEBOX + $WS_VISIBLE ; + $WS_POPUP
$CheckerGUI = GuiCreate("ZOOM Checker " & $version, $width - 5, $height, $left, $top, $style, $WS_EX_TOPMOST) ; + $WS_SIZEBOX
GUISetBkColor(0x00B95C, $CheckerGUI)
; CONTROLS 0xBBFFBB
$Group_games = GuiCtrlCreateGroup("Games", 10, 10, $width - 25, 322)
;GUICtrlSetColor($Group_games, $COLOR_WHITE)
$ListView_games = GUICtrlCreateListView("No.|Game|Start|Low|High|Prior|Price|State", 20, 30, $width - 45, 260, $LVS_SHOWSELALWAYS + $LVS_SINGLESEL + $LVS_REPORT, _
$LVS_EX_FULLROWSELECT + $LVS_EX_GRIDLINES) ; + $LVS_NOCOLUMNHEADER + $LVS_EX_CHECKBOXES
GUICtrlSetBkColor($ListView_games, 0xF0D0F0)
GUICtrlSetState($ListView_games, $GUI_HIDE)
;GUICtrlSetResizing($ListView_games, $GUI_DOCKLEFT + $GUI_DOCKTOP + $GUI_DOCKHEIGHT + $GUI_DOCKRIGHT)
$Input_game = GUICtrlCreateInput("", 20, 300, $width - 360, 20)
;GUICtrlSetResizing($Input_game, $GUI_DOCKLEFT + $GUI_DOCKAUTO)
GUICtrlSetTip($Input_game, "Selected game title!")
$Input_dates = GUICtrlCreateInput("", $width - 335, 300, 140, 20, $ES_CENTER)
;GUICtrlSetResizing($Input_dates, $GUI_DOCKLEFT + $GUI_DOCKAUTO)
GUICtrlSetTip($Input_dates, "Dates for selected game title!")
;
$Button_fav = GuiCtrlCreateButton("FAV", $width - 190, 299, 45, 22)
GUICtrlSetFont($Button_fav, 7, 600, 0, "Small Fonts")
;GUICtrlSetResizing($Button_fav, $GUI_DOCKRIGHT + $GUI_DOCKALL + $GUI_DOCKSIZE)
GUICtrlSetTip($Button_fav, "Set selected game as a favorite!")
;
$Combo_own = GUICtrlCreateCombo("", $width - 140, 299, 70, 21)
;GUICtrlSetResizing($Combo_own, $GUI_DOCKRIGHT + $GUI_DOCKALL + $GUI_DOCKSIZE)
GUICtrlSetTip($Combo_own, "Store owned at!")
$Button_own = GuiCtrlCreateButton("OWN", $width - 70, 298, 45, 23)
GUICtrlSetFont($Button_own, 7, 600, 0, "Small Fonts")
;GUICtrlSetResizing($Button_own, $GUI_DOCKRIGHT + $GUI_DOCKALL + $GUI_DOCKSIZE)
GUICtrlSetTip($Button_own, "Set selected game as owned!")
;
$Group_method = GuiCtrlCreateGroup("Program Method", 10, $height - 65, 150, 55)
;GUICtrlSetResizing($Group_method, $GUI_DOCKLEFT + $GUI_DOCKALL + $GUI_DOCKSIZE)
$Radio_gui = GUICtrlCreateRadio("Window", 20, $height - 44, 60, 20)
;GUICtrlSetBkColor($Radio_gui, $COLOR_WHITE)
;GUICtrlSetResizing($Radio_gui, $GUI_DOCKLEFT + $GUI_DOCKALL + $GUI_DOCKSIZE)
GUICtrlSetTip($Radio_gui, "Show this window when program runs!")
$Radio_box = GUICtrlCreateRadio("Dropbox", 90, $height - 44, 60, 20)
;GUICtrlSetResizing($Radio_box, $GUI_DOCKLEFT + $GUI_DOCKALL + $GUI_DOCKSIZE)
GUICtrlSetTip($Radio_box, "Show the dropbox when program runs!")
;
$Group_status = GuiCtrlCreateGroup("Status", 170, $height - 65, 190, 55)
;GUICtrlSetResizing($Group_status, $GUI_DOCKLEFT + $GUI_DOCKALL + $GUI_DOCKSIZE)
$Label_status = GuiCtrlCreateLabel("", 180, $height - 45, 170, 20, $SS_CENTER + $SS_CENTERIMAGE + $SS_SUNKEN)
;GUICtrlSetResizing($Label_status, $GUI_DOCKLEFT + $GUI_DOCKALL + $GUI_DOCKSIZE)
GUICtrlSetBkColor($Label_status, $COLOR_WHITE)
GUICtrlSetTip($Label_status, "Process Status!")
;
$Button_remove = GuiCtrlCreateButton("REMOVE", $width - 495, $height - 65, 75, 26)
GUICtrlSetFont($Button_remove, 8, 600)
;GUICtrlSetResizing($Button_remove, $GUI_DOCKRIGHT + $GUI_DOCKALL + $GUI_DOCKSIZE)
GUICtrlSetTip($Button_remove, "Set the selected game for removal!")
;
$Button_apply = GuiCtrlCreateButton("APPLY", $width - 495, $height - 33, 75, 24)
GUICtrlSetFont($Button_apply, 8, 600)
;GUICtrlSetResizing($Button_save, $GUI_DOCKRIGHT + $GUI_DOCKALL + $GUI_DOCKSIZE)
GUICtrlSetTip($Button_apply, "APPLY the removals!")
;
$Button_detail = GuiCtrlCreateButton("DETAIL", $width - 410, $height - 65, 65, 26)
GUICtrlSetFont($Button_detail, 8, 600)
;GUICtrlSetResizing($Button_detail, $GUI_DOCKRIGHT + $GUI_DOCKALL + $GUI_DOCKSIZE)
GUICtrlSetTip($Button_detail, "Detail for selected game!")
;
$Button_save = GuiCtrlCreateButton("SAVE", $width - 410, $height - 33, 65, 24)
GUICtrlSetFont($Button_save, 8, 600)
;GUICtrlSetResizing($Button_save, $GUI_DOCKRIGHT + $GUI_DOCKALL + $GUI_DOCKSIZE)
GUICtrlSetTip($Button_save, "SAVE detail for selected game!")
;
$Button_check = GuiCtrlCreateButton("CHECK", $width - 335, $height - 65, 80, 26)
GUICtrlSetFont($Button_check, 9, 600)
;GUICtrlSetResizing($Button_check, $GUI_DOCKRIGHT + $GUI_DOCKALL + $GUI_DOCKSIZE)
GUICtrlSetTip($Button_check, "Check for current games & prices!")
;
$Button_fold = GuiCtrlCreateButton("D", $width - 335, $height - 33, 24, 24, $BS_ICON)
GUICtrlSetTip($Button_fold, "Open the program folder!")
;
$Button_shop = GuiCtrlCreateButton("SHOP", $width - 302, $height - 33, 47, 24)
GUICtrlSetFont($Button_shop, 6, 600, 0, "Small Fonts")
GUICtrlSetTip($Button_shop, "Go to the ZOOM Platform store!")
;
$Button_web = GuiCtrlCreateButton("WEB", $width - 245, $height - 65, 50, 55, $BS_ICON)
;GUICtrlSetResizing($Button_web, $GUI_DOCKRIGHT + $GUI_DOCKALL + $GUI_DOCKSIZE)
GUICtrlSetTip($Button_web, "Go to the web page for selected game!")
;
$Button_log = GuiCtrlCreateButton("LOG", $width - 185, $height - 65, 50, 55, $BS_ICON)
;GUICtrlSetResizing($Button_log, $GUI_DOCKRIGHT + $GUI_DOCKALL + $GUI_DOCKSIZE)
GUICtrlSetTip($Button_log, "View the log record!")
;
$Button_info = GuiCtrlCreateButton("Info", $width - 125, $height - 65, 50, 55, $BS_ICON)
;GUICtrlSetResizing($Button_info, $GUI_DOCKRIGHT + $GUI_DOCKALL + $GUI_DOCKSIZE)
GUICtrlSetTip($Button_info, "Program Information!")
;
$Button_quit = GuiCtrlCreateButton("EXIT", $width - 65, $height - 65, 50, 55, $BS_ICON)
;GUICtrlSetResizing($Button_quit, $GUI_DOCKRIGHT + $GUI_DOCKALL + $GUI_DOCKSIZE)
GUICtrlSetTip($Button_quit, "Exit / Close / Quit the program!")
;
$lowid = $Button_quit + 1
;
; OS SETTINGS
$user32 = @SystemDir & "\user32.dll"
$shell = @SystemDir & "\shell32.dll"
$icoD = -4
$icoI = -5
$icoT = -71
;$icoR = -239
$icoW = -14
$icoX = -4
;
; SETTINGS
GUICtrlSetImage($Button_web, $shell, $icoW, 1)
GUICtrlSetImage($Button_log, $shell, $icoT, 1)
GUICtrlSetImage($Button_fold, $shell, $icoD, 0)
GUICtrlSetImage($Button_info, $user32, $icoI, 1)
GUICtrlSetImage($Button_quit, $user32, $icoX, 1)
;
$stores = IniRead($inifle, "Game Stores", "names", "")
If $stores = "" Then
$stores = "||BigFish|Epic|GOG|Humble|IndieGala|Itch|Microsoft|Multiple|Steam|ZOOM|"
IniWrite($inifle, "Game Stores", "names", $stores)
EndIf
GUICtrlSetData($Combo_own, $stores, "")
;
GUICtrlSetState($Button_remove, $GUI_DISABLE)
;
If $method = "gui" Then
GUICtrlSetState($Radio_gui, $GUI_CHECKED)
ElseIf $method = "dropbox" Then
GUICtrlSetState($Radio_box, $GUI_CHECKED)
EndIf
;
SetStateOfControls($GUI_DISABLE)
$removals = "|"
LoadTheList()
SetStateOfControls($GUI_ENABLE)
;
GUICtrlSetState($ListView_games, $GUI_SHOW)
GUISetState(@SW_SHOW)
While True
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE Or $msg = $Button_quit
; Exit / Close / Quit the program
$winpos = WinGetPos($CheckerGUI, "")
$left = $winpos[0]
If $left < 0 Then
$left = 2
ElseIf $left > @DesktopWidth - $winpos[2] Then
$left = @DesktopWidth - $winpos[2]
EndIf
IniWrite($inifle, "GUI Window", "left", $left)
$top = $winpos[1]
If $top < 0 Then
$top = 2
ElseIf $top > @DesktopHeight - $winpos[3] Then
$top = @DesktopHeight - $winpos[3]
EndIf
IniWrite($inifle, "GUI Window", "top", $top)
;
GUIDelete($CheckerGUI)
ExitLoop
Case $msg = $Button_web
; Go to the web page for selected game
$ind = _GUICtrlListView_GetSelectedIndices($ListView_games, True)
If IsArray($ind) Then
If $ind[0] > 0 Then
$ind = $ind[1]
If $ind > -1 Then
$game = _GUICtrlListView_GetItemText($ListView_games, $ind, 1)
FixTheTitle()
$ping = Ping("zoom-platform.com", 5000)
If $ping > 0 Then
ShellExecute("https://zoom-platform.com/product/" & $title)
Else
MsgBox(262192, "Web Error", "No connection detected!", 0, $GOGcliGUI)
EndIf
EndIf
Else
MsgBox(262192, "Selection Error", "Please select a game title!", 0, $CheckerGUI)
EndIf
Else
MsgBox(262192, "Selection Error", "Please select a game title!", 0, $CheckerGUI)
EndIf
Case $msg = $Button_shop
; Go to the ZOOM Platform store
ShellExecute("https://zoom-platform.com/")
Case $msg = $Button_save
; SAVE detail for selected game
$ind = _GUICtrlListView_GetSelectedIndices($ListView_games, True)
If IsArray($ind) Then
If $ind[0] > 0 Then
$ind = $ind[1]
If $ind > -1 Then
$game = _GUICtrlListView_GetItemText($ListView_games, $ind, 1)
FixTheTitle()
GUICtrlSetData($Label_status, "Please Wait - Retrieving Data")
;GUISetState($CheckerGUI, @SW_DISABLE)
GUICtrlSetState($Button_remove, $GUI_DISABLE)
GUICtrlSetData($Input_game, "")
GUICtrlSetData($Input_dates, "")
GUICtrlSetData($Combo_own, $stores, "")
SetStateOfControls($GUI_DISABLE)
$ping = Ping("zoom-platform.com", 5000)
If $ping > 0 Then
_FileWriteLog($logfle, "Retrieving Data - " & $game)
_FileCreate($savefile)
$URL = "https://zoom-platform.com/product/" & $title
$download = InetGet($URL, $savefile, 0, 0)
InetClose($download)
_FileWriteLog($logfle, "Retrieving Finished.")
If FileExists($savefile) Then
$read = FileRead($savefile)
If $read <> "" Then
$blurb = StringSplit($read, '<meta name="description" content="', 1)
If $blurb[0] = 2 Then
$blurb = $blurb[2]
$blurb = StringSplit($blurb, '">', 1)
$blurb = $blurb[1]
$blurb = StringReplace($blurb, "'", "'")
$blurb = StringReplace($blurb, '–', '-')
$blurb = StringReplace($blurb, '“', '"')
$blurb = StringReplace($blurb, 'â€', '"')
If $blurb <> "" Then
_FileWriteLog($logfle, "Summary Downloaded - " & $game)
IniWrite($blurbs, $game, "blurb", $blurb)
EndIf
EndIf
$imgurl = StringSplit($read, '<meta property="og:image" content="', 1)
If $imgurl[0] = 2 Then
$imgurl = $imgurl[2]
$imgurl = StringSplit($imgurl, '">', 1)
$imgurl = $imgurl[1]
If StringLeft($imgurl, 4) = "http" Then
$imgfle = $images & "\" & $title & ".jpg"
$download = InetGet($imgurl, $imgfle, 0, 0)
InetClose($download)
If FileExists($imgfle) Then
_FileWriteLog($logfle, "Image Downloaded - " & $game)
IniWrite($blurbs, $game, "image", $imgfle)
EndIf
EndIf
EndIf
EndIf
EndIf
Else
MsgBox(262192, "Web Error", "No connection detected!", 0, $GOGcliGUI)
EndIf
SetStateOfControls($GUI_ENABLE)
GUICtrlSetData($Label_status, "Retrieve Finished")
;MsgBox(262192, "Feature Error", "Not yet complete!", 0, $CheckerGUI)
EndIf
Else
MsgBox(262192, "Selection Error", "Please select a game title!", 0, $CheckerGUI)
EndIf
Else
MsgBox(262192, "Selection Error", "Please select a game title!", 0, $CheckerGUI)
EndIf
Case $msg = $Button_remove
; Set the selected game for removal
$ind = _GUICtrlListView_GetSelectedIndices($ListView_games, True)
If IsArray($ind) Then
If $ind[0] > 0 Then
$ind = $ind[1]
If $ind > -1 Then
$game = _GUICtrlListView_GetItemText($ListView_games, $ind, 1)
;$idx = $lowid + $ind
If $remove = 1 Then
$remove = ""
IniDelete($gamesfile, $game, "remove")
$removals = StringReplace($removals, "|" & $game & "|", "|")
;If $last <> $checked Then
GUICtrlSetBkColor($idx, $COLOR_OLIVE)
;EndIf
GUICtrlSetData($Button_remove, "REMOVE")
Else
$remove = 1
IniWrite($gamesfile, $game, "remove", $remove)
$removals = $removals & $game & "|"
GUICtrlSetBkColor($idx, $COLOR_BLACK)
GUICtrlSetData($Button_remove, "UNSET")
EndIf
EndIf
EndIf
EndIf
Case $msg = $Button_own
; Set selected game as owned
If $ind > -1 And $game <> "" Then
;$idx = $lowid + $ind
$owned = _GUICtrlListView_GetItemText($ListView_games, $ind, 7)
If $owned <> "OWN" Then
$owned = "OWN"
GUICtrlSetBkColor($idx, $COLOR_SKYBLUE)
$store = GUICtrlRead($Combo_own)
If $store = "" Then
$store = "ZOOM"
GUICtrlSetData($Combo_own, $store)
EndIf
If StringInStr($stores, "|" & $store & "|") < 1 Then
$stores = $stores & $store & "|"
GUICtrlSetData($Combo_own, "", "")
GUICtrlSetData($Combo_own, $stores, $store)
IniWrite($inifle, "Game Stores", "names", $stores)
EndIf
IniWrite($gamesfile, $game, "owned", $owned)
IniWrite($gamesfile, $game, "store", $store)
Else
$owned = ""
If IsInt($idx / 2) = 1 Then
GUICtrlSetBkColor($idx, 0xC0F0C0)
Else
GUICtrlSetBkColor($idx, 0xF0D0F0)
EndIf
$store = ""
IniDelete($gamesfile, $game, "owned")
IniDelete($gamesfile, $game, "store")
GUICtrlSetData($Combo_own, $stores, $store)
EndIf
_GUICtrlListView_SetItemText($ListView_games, $ind, $owned, 7)
EndIf
Case $msg = $Button_log
; View the log record
If FileExists($logfle) Then ShellExecute($logfle)
Case $msg = $Button_info
; Program Information
$ans = MsgBox(262209 + 256, "Program Information", _
"This program downloads (checks for) a list of all games available" & @LF & _
"at the ZOOM Platform store. It also keeps a record of important" & @LF & _
"changes to a game (removal, rename, price)." & @LF & @LF & _
"Columns can be sorted by clicking on the header." & @LF & @LF & _
"Redundant entries can be removed (row color is Olive)." & @LF & _
"A game entry marked for removal has a row color of Black." & @LF & _
"REMOVE button marks a game for removal or (UNSET) restores." & @LF & _
"APPLY button removes all listings marked for removal." & @LF & _
"Removed games populate a file called 'Removals.ini'." & @LF & @LF & _
"New additions to the list have a row color of Fuchsia, and should" & @LF & _
"be shown at the end of the unsorted list. Game listings by default" & @LF & _
"are not necessarily sorted alphanumeric, until the 'Game' column" & @LF & _
"for title is clicked." & @LF & @LF & _
"Games can be marked as owned (OWN) or a favorite (FAV), with" & @LF & _
"the store or stores (Multiple) specified. Any unlisted store name" & @LF & _
"can be set, but best to keep them short (so abbreviate if needed)." & @LF & _
"Row color is Skyblue (owned) or Yellow (favorite)." & @LF & @LF & _
"Price changes are also indicated by a row color if different to the" & @LF & _
"'Prior' value - Lime (less) or Red (more)." & @LF & @LF & _
"The SAVE button uses a web connection to download the web" & @LF & _
"page for the selected game, extracting & saving the summary." & @LF & _
"It also downloads the image file. DETAIL button shows both." & @LF & @LF & _
"A log record is kept for some processes." & @LF & @LF & _
"BIG THANKS to Adam @ ZOOM Platform for the 'CHECK' link." & @LF & @LF & _
"© April 2021 by Timboli (aka TheSaint) (updated October 2021)." & @LF & @LF & _
"OK = View the list of removed games.", 0, $CheckerGUI)
If $ans = 1 Then
ShellExecute($remfile)
EndIf
Case $msg = $Button_fold
; Open the program folder
ShellExecute(@ScriptDir)
Case $msg = $Button_fav
; Set selected game as a favorite
$ind = _GUICtrlListView_GetSelectedIndices($ListView_games, True)
If IsArray($ind) Then
If $ind[0] > 0 Then
$ind = $ind[1]
If $ind > -1 Then
$game = _GUICtrlListView_GetItemText($ListView_games, $ind, 1)
$favorite = _GUICtrlListView_GetItemText($ListView_games, $ind, 7)
If $favorite <> "FAV" Then
$favorite = "FAV"
IniWrite($gamesfile, $game, "favorite", $favorite)
GUICtrlSetBkColor($idx, $COLOR_YELLOW)
Else
$favorite = ""
IniDelete($gamesfile, $game, "favorite")
If IsInt($idx / 2) = 1 Then
GUICtrlSetBkColor($idx, 0xC0F0C0)
Else
GUICtrlSetBkColor($idx, 0xF0D0F0)
EndIf
EndIf
_GUICtrlListView_SetItemText($ListView_games, $ind, $favorite, 7)
EndIf
Else
MsgBox(262192, "Selection Error", "Please select a game title!", 0, $CheckerGUI)
EndIf
Else
MsgBox(262192, "Selection Error", "Please select a game title!", 0, $CheckerGUI)
EndIf
Case $msg = $Button_detail
; Detail for selected game
$ind = _GUICtrlListView_GetSelectedIndices($ListView_games, True)
If IsArray($ind) Then
If $ind[0] > 0 Then
$ind = $ind[1]
If $ind > -1 Then
$game = _GUICtrlListView_GetItemText($ListView_games, $ind, 1)
$start = _GUICtrlListView_GetItemText($ListView_games, $ind, 2)
$low = _GUICtrlListView_GetItemText($ListView_games, $ind, 3)
$high = _GUICtrlListView_GetItemText($ListView_games, $ind, 4)
$prior = _GUICtrlListView_GetItemText($ListView_games, $ind, 5)
$price = _GUICtrlListView_GetItemText($ListView_games, $ind, 6)
$dates = IniRead($gamesfile, $game, "date", "")
$added = StringSplit($dates, " ", 1)
If $added[0] = 2 Then
$checked = $added[2]
Else
$checked = $added[1]
EndIf
$added = $added[1]
$store = IniRead($gamesfile, $game, "store", "")
$released = IniRead($gamesfile, $game, "released", "")
$updated = IniRead($gamesfile, $game, "updated", "")
$detail = "Title = " & $game
$detail = $detail & @LF & "Added = " & $added
$detail = $detail & @LF & "Last Checked = " & $checked
$detail = $detail & @LF & "Released = " & $released
$detail = $detail & @LF & "Last Updated = " & $updated
$detail = $detail & @LF & "Starting Price = " & $start
$detail = $detail & @LF & "Lowest Price = " & $low
$detail = $detail & @LF & "Highest Price = " & $high
$detail = $detail & @LF & "Previous Price = " & $prior
$detail = $detail & @LF & "Current Price = " & $price
If $store <> "" Then
$detail = $detail & @LF & "Game Owned At Store = " & $store
EndIf
$blurb = IniRead($blurbs, $game, "blurb", "")
$imgfle = IniRead($blurbs, $game, "image", "")
If $imgfle <> "" And FileExists($imgfle) Then
$detail = StringReplace($detail, @LF, @CRLF)
DetailGUI()
Else
$detail = $detail & @LF & "Summary = " & $blurb
MsgBox(262208 + 256, "Game Details", $detail, 0, $CheckerGUI)
EndIf
EndIf
Else
MsgBox(262192, "Selection Error", "Please select a game title!", 0, $CheckerGUI)
EndIf
Else
MsgBox(262192, "Selection Error", "Please select a game title!", 0, $CheckerGUI)
EndIf
Case $msg = $Button_check
; Check for current games & prices
GUICtrlSetData($Label_status, "Please Wait - Retrieving List")
;GUISetState($CheckerGUI, @SW_DISABLE)
GUICtrlSetState($Button_remove, $GUI_DISABLE)
GUICtrlSetData($Input_game, "")
GUICtrlSetData($Input_dates, "")
GUICtrlSetData($Combo_own, $stores, "")
SetStateOfControls($GUI_DISABLE)
$ping = Ping("zoom-platform.com", 5000)
If $ping > 0 Then
_FileWriteLog($logfle, "Checking Started.")
$date = _NowDate()
IniWrite($inifle, "Last Checked", "date", $date)
$URL = "https://zoom-platform.com/gamedata.csv"
$download = InetGet($URL, $zoomlist, 0, 0)
InetClose($download)
$read = FileRead($gamesfile)
If StringInStr($read, "released=") > 0 Then
$revamp = ""
Else
$revamp = 1
EndIf
$found = 0
GUICtrlSetData($Label_status, "Please Wait - Parsing List")
_FileReadToArray($zoomlist, $array)
For $a = 2 To $array[0]
$line = $array[$a]
; NOTE - Discovered 3 additions on 2nd April 2022 (Slug,Developers,Publishers).
;Name,Slug,Developers,Publishers,"Release Date","Last Update","Current Price"
$part = StringSplit($line, ',', 1)
$count = $part[0]
; NOTE - The following combines Developers & Publishers (due to unwanted commas), as this program does not use those items, so who cares.
If $count = 7 Then
$line = $part[3] & '+' & $part[4]
$line = $part[1] & ',' & $part[2] & ',' & $line & ',' & $part[5] & ',' & $part[6] & ',' & $part[7]
ElseIf $count = 8 Then
$line = $part[3] & '+' & $part[4] & '+' & $part[5]
$line = $part[1] & ',' & $part[2] & ',' & $line & ',' & $part[6] & ',' & $part[7] & ',' & $part[8]
ElseIf $count = 9 Then
$line = $part[3] & '+' & $part[4] & '+' & $part[5] & '+' & $part[6]
$line = $part[1] & ',' & $part[2] & ',' & $line & ',' & $part[7] & ',' & $part[8] & ',' & $part[9]
ElseIf $count = 10 Then
$line = $part[3] & '+' & $part[4] & '+' & $part[5] & '+' & $part[6] & '+' & $part[7]
$line = $part[1] & ',' & $part[2] & ',' & $line & ',' & $part[8] & ',' & $part[9] & ',' & $part[10]
ElseIf $count = 11 Then
$line = $part[3] & '+' & $part[4] & '+' & $part[5] & '+' & $part[6] & '+' & $part[7] & '+' & $part[8]
$line = $part[1] & ',' & $part[2] & ',' & $line & ',' & $part[9] & ',' & $part[10] & ',' & $part[11]
ElseIf $count = 12 Then
$line = $part[3] & '+' & $part[4] & '+' & $part[5] & '+' & $part[6] & '+' & $part[7] & '+' & $part[8] & '+' & $part[9]
$line = $part[1] & ',' & $part[2] & ',' & $line & ',' & $part[10] & ',' & $part[11] & ',' & $part[12]
ElseIf $count = 13 Then
$line = $part[3] & '+' & $part[4] & '+' & $part[5] & '+' & $part[6] & '+' & $part[7] & '+' & $part[8] & '+' & $part[9] & '+' & $part[10]
$line = $part[1] & ',' & $part[2] & ',' & $line & ',' & $part[11] & ',' & $part[12] & ',' & $part[13]
ElseIf $count = 14 Then
$line = $part[3] & '+' & $part[4] & '+' & $part[5] & '+' & $part[6] & '+' & $part[7] & '+' & $part[8] & '+' & $part[9] & '+' & $part[10] & '+' & $part[11]
$line = $part[1] & ',' & $part[2] & ',' & $line & ',' & $part[12] & ',' & $part[13] & ',' & $part[14]
EndIf
$line = StringReplace($line, '","', '|')
$line = StringReplace($line, '",', '|')
$line = StringReplace($line, ',"', '|')
$line = StringReplace($line, ',', '|')
$line = StringReplace($line, '|', '","')
$part = StringSplit($line, '","', 1)
;$part = StringSplit($line, ',"', 1)
$count = $part[0]
;If $line[0] = 4 Then
If $count = 6 Then
; NAME
$game = $part[1]
$game = StringReplace($game, '"', '')
$game = StringStripWS($game, 7)
If $game <> "" Then
; RELEASE DATE
;$released = $part[2]
$released = $part[5]
$released = StringReplace($released, '"', '')
;$part = $part[3]
;$part = StringSplit($part, '",', 1)
; LAST UPDATE
;$updated = $part[1]
;$updated = $part[3]
$updated = $part[5]
$updated = StringReplace($updated, '"', '')
; CURRENT PRICE
;$price = $part[2]
;$price = $part[4]
$price = $part[6]
$price = StringReplace($price, '"', '')
If $price = 0 Then $price = "0.00"
If $read = "" Then
; ADD game to list. List created for first time.
IniWrite($gamesfile, $game, "date", $date)
IniWrite($gamesfile, $game, "released", $released)
IniWrite($gamesfile, $game, "updated", $updated)
;$price = "$" & $price
IniWrite($gamesfile, $game, "price", $price)
$start = $price
IniWrite($gamesfile, $game, "start", $start)
$low = $price
IniWrite($gamesfile, $game, "low", $low)
$high = $price
IniWrite($gamesfile, $game, "high", $high)
$prior = $price
IniWrite($gamesfile, $game, "prior", $prior)
Else
; Check if game already exists on list.
If StringInStr($read, "[" & $game & "]") > 0 Then
; UPDATE game on list
$exists = IniRead($gamesfile, $game, "date", "")
$exists = StringSplit($exists, " ", 1)
$exists = $exists[1]
IniWrite($gamesfile, $game, "date", $exists & " (" & $date & ")")
If $revamp = 1 Then IniWrite($gamesfile, $game, "released", $released)
IniWrite($gamesfile, $game, "updated", $updated)
If $revamp = 1 Then
; ADD new values for the game
;$price = "$" & $price
IniWrite($gamesfile, $game, "price", $price)
$start = $price
IniWrite($gamesfile, $game, "start", $start)
$low = $price
IniWrite($gamesfile, $game, "low", $low)
$high = $price
IniWrite($gamesfile, $game, "high", $high)
$prior = $price
IniWrite($gamesfile, $game, "prior", $prior)
Else
; Check to update some values for the game.
$last = IniRead($gamesfile, $game, "price", "")
If $last <> $price Then
IniWrite($gamesfile, $game, "price", $price)
$low = IniRead($gamesfile, $game, "low", "")
$high = IniRead($gamesfile, $game, "high", "")
If $price < $low Then
$low = $price
IniWrite($gamesfile, $game, "low", $low)
ElseIf $price > $high Then
$high = $price
IniWrite($gamesfile, $game, "high", $high)
EndIf
$prior = $last
IniWrite($gamesfile, $game, "prior", $prior)
EndIf
If IniRead($gamesfile, $game, "start", "") = "" Then
$start = $last
IniWrite($gamesfile, $game, "start", $start)
If IniRead($gamesfile, $game, "low", "") = "" Then
$low = $last
IniWrite($gamesfile, $game, "low", $low)
EndIf
If IniRead($gamesfile, $game, "prior", "") = "" Then
$prior = $last
IniWrite($gamesfile, $game, "prior", $prior)
EndIf
EndIf
EndIf
Else
; ADD game to list
IniWrite($gamesfile, $game, "date", $date)
IniWrite($gamesfile, $game, "released", $released)
IniWrite($gamesfile, $game, "updated", $updated)
;$price = "$" & $price
IniWrite($gamesfile, $game, "price", $price)
$start = $price
IniWrite($gamesfile, $game, "start", $start)
$low = $price
IniWrite($gamesfile, $game, "low", $low)
$high = $price
IniWrite($gamesfile, $game, "high", $high)
$prior = $price
IniWrite($gamesfile, $game, "prior", $prior)
EndIf
EndIf
$found = $found + 1
EndIf
Else
MsgBox(262192, "Split Issue", $count & " splits found." & @LF & $line & @LF & "(game entry skipped)", 0, $CheckerGUI)
EndIf
Next
_FileWriteLog($logfle, "Checking Finished.")
_FileWriteLog($logfle, "Games Found = " & $found)
GUICtrlSetData($Label_status, "Retrieved List")
_GUICtrlListView_BeginUpdate($ListView_games)
_GUICtrlListView_DeleteAllItems($ListView_games)
_GUICtrlListView_EndUpdate($ListView_games)
;GUISetState($CheckerGUI, @SW_ENABLE)
LoadTheList()
IniWrite($inifle, "Games Found", "total", $found)
MsgBox(262208 + 256, "Check Result", $found & " games were discovered.", 0, $CheckerGUI)
Else
MsgBox(262192, "Web Error", "No connection detected!", 0, $GOGcliGUI)
EndIf
SetStateOfControls($GUI_ENABLE)
Case $msg = $Button_apply
; APPLY the removals
If $removals = "|" Then
MsgBox(262192, "Removals Error", "No entries are marked for removal!", 0, $CheckerGUI)
Else
$ans = MsgBox(262193, "Removals Query", _
"Remove all games marked for removal?" & @LF & @LF & _
"OK = Continue with removals." & @LF & _
"CANCEL = Abort any removals." & @LF & @LF & _
"NOTE - This will be permanent, but a copy" & @LF & _
"is kept in the 'Removals.ini' file." & @LF & @LF & _
"ADVICE - It is recommended to sort by game" & @LF & _
"title before removing a game. Those games" & @LF & _
"eligible for removal, either no longer exist at" & @LF & _
"the store or have been renamed. Duplicate," & @LF & _
"but not quite identical names can be listed," & @LF & _
"and you may only wish to remove one type" & @LF & _
"of redundant entry. Some titles may not be" & @LF & _
"identical enough to be sorted together, as" & @LF & _
"can be the case when a period is involved" & @LF & _
"(i.e. AIM and A.I.M.).", 0, $CheckerGUI)
If $ans = 1 Then
GUICtrlSetData($Label_status, "Removing Marked Entries")
GUICtrlSetData($Button_remove, "REMOVE")
GUICtrlSetState($Button_remove, $GUI_DISABLE)
GUICtrlSetData($Input_game, "")
GUICtrlSetData($Input_dates, "")
GUICtrlSetData($Combo_own, $stores, "")
SetStateOfControls($GUI_DISABLE)
_GUICtrlListView_BeginUpdate($ListView_games)
_GUICtrlListView_DeleteAllItems($ListView_games)
_GUICtrlListView_EndUpdate($ListView_games)
$removed = 0
$sect = StringSplit($removals, "|", 1)
For $s = 2 To $sect[0] - 1
$game = $sect[$s]
If $game <> "" Then
$entry = IniReadSection($gamesfile, $game)
If @error = 0 Then
IniWriteSection($remfile, $game, $entry)
IniDelete($remfile, $game, "remove")
If IniRead($remfile, $game, "date", "") <> "" Then
IniDelete($gamesfile, $game)
_FileWriteLog($logfle, "Game Removed = " & $game)
$removals = StringReplace($removals, "|" & $game & "|", "|")
$removed = $removed + 1
Else
_FileWriteLog($logfle, "Removal Error = " & $game)
EndIf
Else
_FileWriteLog($logfle, "Removal Error = " & $game)
EndIf
EndIf
Next
LoadTheList()
SetStateOfControls($GUI_ENABLE)
MsgBox(262208 + 256, "Removals Result", "Game entries removed = " & $removed, 0, $CheckerGUI)
EndIf
EndIf
Case $msg = $ListView_games Or $msg > $Button_quit
; Games To Check
If $msg = $ListView_games Then
$colnum = GUICtrlGetState($ListView_games)
If StringInStr("01234567", $colnum) > 0 Then
GUICtrlSetData($Label_status, "Please Wait - Sorting")
;GUISetState($CheckerGUI, @SW_LOCK + @SW_DISABLE)
SetStateOfControls($GUI_DISABLE)
_GUICtrlListView_BeginUpdate($ListView_games)
_GUICtrlListView_SimpleSort($ListView_games, False, $colnum)
_GUICtrlListView_EndUpdate($ListView_games)
;GUISetState($CheckerGUI, @SW_ENABLE + @SW_UNLOCK)
SetStateOfControls($GUI_ENABLE)
GUICtrlSetData($Label_status, "List Sorted")
EndIf
Else
$ind = _GUICtrlListView_GetSelectedIndices($ListView_games, True)
If IsArray($ind) Then
If $ind[0] > 0 Then
$ind = $ind[1]
If $ind > -1 Then
$game = _GUICtrlListView_GetItemText($ListView_games, $ind, 1)
GUICtrlSetData($Input_game, $game)
$dates = IniRead($gamesfile, $game, "date", "")
GUICtrlSetData($Input_dates, $dates)
$store = IniRead($gamesfile, $game, "store", "")
If $store = "" Then
GUICtrlSetData($Combo_own, $stores, $store)
Else
;GUICtrlSetData($Combo_own, "", "")
;GUICtrlSetData($Combo_own, $stores, $store)
GUICtrlSetData($Combo_own, $store)
EndIf
$remove = IniRead($gamesfile, $game, "remove", "")
$last = IniRead($inifle, "Last Checked", "date", "")
$checked = StringSplit($dates, " ", 1)
If $checked[0] = 2 Then
$checked = $checked[2]
$checked = StringReplace($checked, "(", "")
$checked = StringReplace($checked, ")", "")
$checked = StringStripWS($checked, 7)
Else
$checked = $checked[1]
EndIf
;If StringInStr($dates, " ") < 1 Then
; If $last = $dates Then
If $last = $checked Then
GUICtrlSetState($Button_remove, $GUI_DISABLE)
GUICtrlSetData($Button_remove, "REMOVE")
Else
GUICtrlSetState($Button_remove, $GUI_ENABLE)
If $remove = 1 Then
GUICtrlSetData($Button_remove, "UNSET")
Else
GUICtrlSetData($Button_remove, "REMOVE")
EndIf
EndIf
;Else
; GUICtrlSetState($Button_remove, $GUI_DISABLE)
;EndIf
Else
$game = ""
GUICtrlSetData($Input_game, $game)
$dates = ""
GUICtrlSetData($Input_dates, $dates)
$store = ""
GUICtrlSetData($Combo_own, $stores, $store)
$checked = ""
$remove = ""
GUICtrlSetData($Button_remove, "REMOVE")
EndIf
EndIf
EndIf
;MsgBox(262192, "Selected", $msg, 0, $CheckerGUI)
$idx = $msg
EndIf
Case $msg = $Radio_gui
; Show this window when program runs
$method = "gui"
IniWrite($inifle, "Program", "method", $method)
Case $msg = $Radio_box
; Show the dropbox when program runs
$method = "dropbox"
IniWrite($inifle, "Program", "method", $method)
MsgBox(262192, "Advice & Warning", "To go back to using the older 'Dropbox' method," & @LF & _
"you now need to close and restart this program." & @LF & @LF & _
"WARNING - This program update is still in the" & @LF & _
"development stage, so it is not recommended" & @LF & _
"to swap between methods right now.", 0, $CheckerGUI)
Case Else
EndSelect
WEnd
EndFunc ;=> MainGUI
Func DetailGUI()
Local $Button_blurb, $Button_image, $Edit_blurb, $Edit_detail, $Group_blurb, $Group_detail, $Group_image, $Pic_image
Local $DetailsGUI, $imgfile, $pos, $pth, $res, $savfold, $sumfile
;
$DetailsGUI = GUICreate("Game Details", 520, 500, Default, Default, $WS_CAPTION + $WS_POPUP + $WS_CLIPSIBLINGS + $WS_SYSMENU, $WS_EX_TOPMOST)
;
; CONTROLS
$Group_image = GUICtrlCreateGroup("Game Image", 10, 10, 220, 335)
$Pic_image = GUICtrlCreatePic($imgfle, 20, 30, 200, 300)
;
$Group_detail = GUICtrlCreateGroup("Other Details", 240, 10, 270, 225)
$Edit_detail = GUICtrlCreateEdit($detail, 250, 30, 250, 190, $ES_WANTRETURN)
;
$Button_image = GUICtrlCreateButton("SAVE IMAGE FILE TO SELECTED LOCATION", 240, 245, 270, 45)
GUICtrlSetFont($Button_image, 7, 600, 0, "Small Fonts")
GUICtrlSetTip($Button_image, "Save the game image to a selected location!")
;
$Button_blurb = GUICtrlCreateButton("SAVE SUMMARY TO SELECTED LOCATION", 240, 300, 270, 45)
GUICtrlSetFont($Button_blurb, 7, 600, 0, "Small Fonts")
GUICtrlSetTip($Button_blurb, "Save the game summary to a selected location!")
;
$Group_blurb = GUICtrlCreateGroup("Summary", 10, 355, 500, 135)
$Edit_blurb = GUICtrlCreateEdit($blurb, 20, 375, 480, 100, $ES_WANTRETURN + $WS_VSCROLL + $ES_AUTOVSCROLL)
;
; SETTINGS
GUICtrlSetState($Pic_image, $GUI_FOCUS)
;
FixTheTitle()
$imgfile = IniRead($inifle, "Save Image", "path", $title & ".jpg")
$sumfile = IniRead($inifle, "Save Summary", "path", "Summary.txt")
GUISetState(@SW_SHOW)
While True
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
; Exit or Close the window
GUIDelete($DetailsGUI)
ExitLoop
Case $msg = $Button_image
; Save the game image to a selected location
If FileExists($imgfle) Then
If $savfold = "" Or Not FileExists($savfold) Then
$savfold = "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}"
EndIf
$pth = FileSaveDialog("Browse to save the image file.", $savfold, "Image files (*.jpg)", 18, $imgfile, $DetailsGUI)
If Not @error And StringMid($pth, 2, 2) = ":\" Then
$imgfile = $pth
IniWrite($inifle, "Save Image", "path", $imgfile)
$res = FileCopy($imgfle, $imgfile, 1)
If $res = 0 Then
MsgBox(262192, "Save Error", "Copy failed, perhaps due to permissions!", 0, $DetailsGUI)
Else
_FileWriteLog($logfle, "Image Saved - " & $game)
EndIf
EndIf
Else
MsgBox(262192, "Save Error", "The image file is not set or doesn't exist!", 0, $DetailsGUI)
EndIf
GUICtrlSetState($Pic_image, $GUI_FOCUS)
Case $msg = $Button_blurb
; Save the game summary to a selected location
If $blurb <> "" Then
If $savfold = "" Or Not FileExists($savfold) Then
$savfold = "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}"
EndIf
$pth = FileSaveDialog("Browse to save a summary file.", $savfold, "Text files (*.txt)", 18, $sumfile, $DetailsGUI)
If Not @error And StringMid($pth, 2, 2) = ":\" Then
$sumfile = $pth
_FileCreate($sumfile)
IniWrite($inifle, "Save Summary", "path", $sumfile)
FileWrite($sumfile, $game & @CRLF & $blurb & @CRLF)
_FileWriteLog($logfle, "Summary Saved - " & $game)
EndIf
Else
MsgBox(262192, "Save Error", "No summary to save!", 0, $DetailsGUI)
EndIf
GUICtrlSetState($Pic_image, $GUI_FOCUS)
Case Else
EndSelect
WEnd
EndFunc ;=> DetailGUI
Func DropBox()
Local $Button_display, $Button_go, $Combo_list, $Item_one, $Label_drop, $Label_status, $Menu_go
Local $atts, $list, $lists, $listfle, $onetab, $srcfle, $winpos
;
$left = IniRead($inifle, "Program Window", "left", -1)
$top = IniRead($inifle, "Program Window", "top", -1)
$style = $WS_CAPTION + $WS_POPUP + $WS_CLIPSIBLINGS + $WS_SYSMENU
$DropboxGUI = GUICreate("ZOOM Checker " & $version, 225, 160, $left, $top, $style, $WS_EX_TOPMOST + $WS_EX_ACCEPTFILES)
;
; CONTROLS
$Label_drop = GUICtrlCreateLabel($target, 1, 1, 223, 107, $SS_CENTER)
GUICtrlSetFont($Label_drop, 9, 600)
GUICtrlSetState($Label_drop, $GUI_DROPACCEPTED)
GUICtrlSetTip($Label_drop, "Drag & Drop saved ZOOM Platform web page file here!")
;
$Label_status = GUICtrlCreateLabel("Click GO to go to the Games web page", 1, 108, 223, 18, $SS_CENTER + $SS_CENTERIMAGE)
GUICtrlSetFont($Label_status, 7, 600, 0, "Small Fonts")
GUICtrlSetBkColor($Label_status, $COLOR_LIME)
GUICtrlSetColor($Label_status, $COLOR_BLACK)
;
$Button_display = GUICtrlCreateButton("DISPLAY", 2, 132, 70, 23)
GUICtrlSetFont($Button_display, 7, 600, 0, "Small Fonts")
GUICtrlSetTip($Button_display, "Display the list of titles!")