├── GOG Comparison └── GOG Comparison.au3 ├── GOGRepo GUI.au3 ├── GOGRepo.bat ├── GOGRepoGUI_12.png ├── GOGRepoGUI_13.png ├── GOGRepoGUI_14.png ├── GOGRepoGUI_down_2.png ├── GOGRepoGUI_downs.png ├── GOGRepoGUI_menu.png ├── GOGRepoGUI_menu_2.png ├── GOGRepoGUI_progress.png ├── GOGRepoGUI_queue_6.png ├── GOGRepoGUI_setup_4.png ├── GOGRepoGUI_update_10.png ├── GOGRepoGUI_update_3.png ├── GOGRepoGUI_update_4.png ├── GOGRepoGUI_update_5.png ├── GOGRepoGUI_update_6.png ├── GOGRepoGUI_update_7.png ├── GOGRepoGUI_update_8.png ├── GOGRepoGUI_update_9.png ├── GOGRepoGUI_verify_2.png ├── GRG.ico ├── Instructions.txt ├── Latest_Incomplete ├── GOGRepo GUI.au3 ├── GOGRepo GUI.exe ├── GOGRepoGUI_checker_1.png ├── GOGRepoGUI_checker_3.png ├── GOGRepoGUI_checker_4.png ├── GOGRepoGUI_menu_3.png ├── GOGRepoGUI_rcmenu.png ├── GOGRepoGUI_selector.png └── History.txt ├── Older_Screenshots ├── GOGRepoGUI.png ├── GOGRepoGUI_10.png ├── GOGRepoGUI_11.png ├── GOGRepoGUI_2.png ├── GOGRepoGUI_3.png ├── GOGRepoGUI_4.png ├── GOGRepoGUI_5.png ├── GOGRepoGUI_6.png ├── GOGRepoGUI_7.png ├── GOGRepoGUI_8.png ├── GOGRepoGUI_9.png ├── GOGRepoGUI_down.png ├── GOGRepoGUI_menu.png ├── GOGRepoGUI_queue.png ├── GOGRepoGUI_queue_2.png ├── GOGRepoGUI_queue_3.png ├── GOGRepoGUI_queue_4.png ├── GOGRepoGUI_queue_5.png ├── GOGRepoGUI_setup.png ├── GOGRepoGUI_setup_2.png ├── GOGRepoGUI_setup_3.png ├── GOGRepoGUI_update.png ├── GOGRepoGUI_update_2.png └── GOGRepoGUI_verify.png ├── Older_Versions ├── 2020-06-23 │ └── GOGRepo GUI.au3 ├── 2020-06-24 │ └── GOGRepo GUI.au3 ├── 2020-06-26 │ └── GOGRepo GUI.au3 ├── 2020-06-27 │ └── GOGRepo GUI.au3 ├── 2020-06-30 │ └── GOGRepo GUI.au3 ├── 2020-07-01 │ └── GOGRepo GUI.au3 ├── 2020-07-02 │ └── GOGRepo GUI.au3 ├── 2020-07-03 │ └── GOGRepo GUI.au3 ├── 2020-07-04 │ └── GOGRepo GUI.au3 ├── 2020-07-05 │ └── GOGRepo GUI.au3 ├── 2020-07-06 │ └── GOGRepo GUI.au3 ├── 2020-07-07 │ └── GOGRepo GUI.au3 ├── 2020-07-08 │ └── GOGRepo GUI.au3 ├── 2020-07-09 │ └── GOGRepo GUI.au3 ├── 2020-07-10 │ └── GOGRepo GUI.au3 ├── 2020-07-11 │ └── GOGRepo GUI.au3 ├── 2020-07-15 │ └── GOGRepo GUI.au3 ├── 2020-07-21 │ ├── GOGRepo GUI.au3 │ ├── Reporun.au3 │ └── Unrelated │ │ ├── Because I can.txt │ │ └── Private_Communication │ │ └── In response.png ├── 2020-07-26 │ └── GOGRepo GUI.au3 ├── 2020-07-30 │ └── GOGRepo GUI.au3 ├── 2020-07-31 │ ├── GOGRepo GUI.au3 │ └── Reporun.au3 ├── 2020-08-02 │ ├── GOGRepo GUI.au3 │ └── Reporun.au3 ├── 2020-08-03 │ └── GOGRepo GUI.au3 ├── 2020-08-04 │ └── GOGRepo GUI.au3 ├── 2020-08-05 │ ├── GOGRepo GUI.au3 │ └── GOGRepo GUI.exe ├── 2020-08-08 │ ├── GOGRepo GUI.au3 │ └── GOGRepo GUI.exe └── GetgogWL.png ├── README.md ├── Reporun.au3 ├── Simple_GUI ├── ExtProp.au3 ├── GOGRepo Simple GUI.au3 ├── GOGRepo_results.png ├── GOGRepo_simple.png ├── GOGRepo_simple_2.png ├── GOGRepo_simple_3.png ├── GOGRepo_simple_4.png ├── GOGRepo_simple_5.png ├── GOGRepo_simple_setup.png ├── GRS.ico ├── History.txt ├── v1.0 │ ├── GOGRepo Simple GUI.au3 │ └── GOGRepo Simple GUI.exe ├── v1.0_update │ ├── GOGRepo Simple GUI.au3 │ └── GOGRepo Simple GUI.exe ├── v1.1 │ ├── GOGRepo Simple GUI.au3 │ └── GOGRepo Simple GUI.exe ├── v1.2 │ ├── GOGRepo Simple GUI.au3 │ └── GOGRepo Simple GUI.exe ├── v1.3 │ ├── GOGRepo Simple GUI.au3 │ └── GOGRepo Simple GUI.exe ├── v1.4 │ ├── GOGRepo Simple GUI.au3 │ ├── GOGRepo Simple GUI.exe │ └── History.txt └── v1.6 │ ├── GOGRepo Simple GUI.au3 │ ├── GOGRepo Simple GUI.exe │ ├── History.txt │ ├── ReadMe.txt │ └── gogrepo.zip ├── Splash.jpg └── YT-DL Dropper ├── GetSBS List.zip ├── YT-DL Dropper v7.6.zip ├── YT-DL Dropper v7.7_AUS.zip └── YT-DL Dropper v7.8.zip /GOG Comparison/GOG Comparison.au3: -------------------------------------------------------------------------------- 1 | #cs ---------------------------------------------------------------------------- 2 | 3 | AutoIt Version: 3.3.14.2 4 | Author: myName 5 | 6 | Script Function: 7 | Template AutoIt script. 8 | 9 | #ce ---------------------------------------------------------------------------- 10 | 11 | #include 12 | #include 13 | 14 | Local $a, $array, $b, $chunk, $cnt, $downchunk, $extrachunk, $f, $file, $file_1, $file_2 15 | Local $filelist, $last, $line, $lines, $res, $skipped 16 | 17 | ;$file_1 = @ScriptDir & "\60_parsecs.txt" 18 | ;$file_2 = @ScriptDir & "\60_parsecs_new.txt" 19 | ;$file_1 = @ScriptDir & "\aer.txt" 20 | ;$file_2 = @ScriptDir & "\aer_new.txt" 21 | $filelist = _FileListToArray(@ScriptDir, "*_new.txt", 1, True) 22 | If @error = 0 Then 23 | For $f = 1 To $filelist[0] 24 | $file_2 = $filelist[$f] 25 | $file_1 = StringReplace($file_2, "_new.txt", ".txt") 26 | $downchunk = "" 27 | $extrachunk = "" 28 | $skipped = "" 29 | $res = _FileReadToArray($file_1, $array) 30 | If $res = 1 Then 31 | SplashTextOn("", "Comparing Files!", 200, 100, Default, Default, 33) 32 | For $a = 1 To $array[0] 33 | $line = $array[$a] 34 | $start = StringLeft($line, 5) 35 | If StringInStr($line, "'forum_url':") > 0 Then $skipped = 1 36 | ;If $downchunk = "" Or $extrachunk = "" Or ($downchunk <> "" And $start <> " ") Or ($extrachunk <> "" And $start <> " ") Then 37 | If $downchunk = "" Or ($extrachunk = "" And $downchunk = "") Or ($start <> " " And ($downchunk <> "" Or $extrachunk <> "")) Or $skipped = 1 Then 38 | If StringInStr($line, "'downloads':") > 0 Then 39 | $downchunk = $line 40 | ElseIf StringInStr($line, "'extras':") > 0 Then 41 | $extrachunk = $line 42 | Else 43 | $res = _ReplaceStringInFile($file_2, $line, "", 0, 0) 44 | If $res = 0 Then 45 | If StringInStr($line, "'title':") > 0 Then 46 | $last = StringReplace($line, "'}", "'},") 47 | $res = _ReplaceStringInFile($file_2, $last, "", 0, 0) 48 | If $res = 0 Then 49 | $last = StringReplace($line, "'},", "'}") 50 | $res = _ReplaceStringInFile($file_2, $last, "", 0, 0) 51 | EndIf 52 | EndIf 53 | EndIf 54 | EndIf 55 | ElseIf $downchunk <> "" And $extrachunk = "" Then 56 | $downchunk = $downchunk & @LF & $line 57 | ElseIf $extrachunk <> "" Then 58 | $extrachunk = $extrachunk & @LF & $line 59 | EndIf 60 | Next 61 | If $downchunk <> "" Then 62 | ;MsgBox(262144, "Downloads", $downchunk) 63 | $res = _ReplaceStringInFile($file_2, $downchunk, "", 0, 0) 64 | If $res = 0 Then 65 | $chunk = StringSplit($downchunk, "{'", 1) 66 | For $a = 2 To $chunk[0] 67 | $lines = "{'" & $chunk[$a] 68 | $res = _ReplaceStringInFile($file_2, $lines, "", 0, 0) 69 | If $res = 0 Then 70 | $lines = StringStripWS($lines, 3) 71 | $lines = StringReplace($lines, "'},", "'}],") 72 | $res = _ReplaceStringInFile($file_2, $lines, "", 0, 0) 73 | If $res = 0 Then 74 | $lines = StringReplace($lines, "'}],", "'},") 75 | $res = _ReplaceStringInFile($file_2, $lines, "", 0, 0) 76 | If $res = 0 Then 77 | $lines = StringReplace($lines, "},", "}],") 78 | $res = _ReplaceStringInFile($file_2, $lines, "", 0, 0) 79 | If $res = 0 Then 80 | $lines = StringReplace($lines, "}],", "},") 81 | _ReplaceStringInFile($file_2, $lines, "", 0, 0) 82 | EndIf 83 | EndIf 84 | EndIf 85 | EndIf 86 | Next 87 | EndIf 88 | EndIf 89 | If $extrachunk <> "" Then 90 | ;MsgBox(262144, "Extras", $extrachunk) 91 | $res = _ReplaceStringInFile($file_2, $extrachunk, "", 0, 0) 92 | If $res = 0 Then 93 | $chunk = StringSplit($extrachunk, "{'", 1) 94 | For $a = 2 To $chunk[0] 95 | $lines = "{'" & $chunk[$a] 96 | $res = _ReplaceStringInFile($file_2, $lines, "", 0, 0) 97 | If $res = 0 Then 98 | $lines = StringStripWS($lines, 3) 99 | $lines = StringReplace($lines, "'},", "'}],") 100 | $res = _ReplaceStringInFile($file_2, $lines, "", 0, 0) 101 | If $res = 0 Then 102 | $lines = StringReplace($lines, "'}],", "'},") 103 | $res = _ReplaceStringInFile($file_2, $lines, "", 0, 0) 104 | If $res = 0 Then 105 | $lines = StringReplace($lines, "},", "}],") 106 | $res = _ReplaceStringInFile($file_2, $lines, "", 0, 0) 107 | If $res = 0 Then 108 | $lines = StringReplace($lines, "}],", "},") 109 | _ReplaceStringInFile($file_2, $lines, "", 0, 0) 110 | EndIf 111 | EndIf 112 | EndIf 113 | EndIf 114 | Next 115 | EndIf 116 | EndIf 117 | $cnt = _FileCountLines($file_2) 118 | If $cnt > 0 Then 119 | $res = _FileReadToArray($file_2, $array) 120 | If $res = 1 Then 121 | For $a = 1 To $array[0] 122 | $line = $array[$a] 123 | If StringInStr($line, "'rating':") > 0 Or StringInStr($line, "'forum_url':") > 0 _ 124 | Or StringInStr($line, "'has_updates': False") > 0 Then 125 | $res = _ReplaceStringInFile($file_2, $line, "", 0, 0) 126 | EndIf 127 | Next 128 | $res = _FileReadToArray($file_2, $array) 129 | If $res = 1 Then 130 | $lines = "" 131 | For $a = 1 To $array[0] 132 | $line = $array[$a] 133 | If $line <> "" Then 134 | If $lines = "" Then 135 | $lines = $line 136 | Else 137 | $lines = $lines & @LF & $line 138 | EndIf 139 | EndIf 140 | Next 141 | $file = FileOpen($file_2, 2) 142 | FileWrite($file, $lines) 143 | FileClose($file) 144 | $cnt = _FileCountLines($file_2) 145 | If $cnt < 1 Then 146 | FileDelete($file_1) 147 | FileDelete($file_2) 148 | ElseIf $cnt = 1 Then 149 | _ReplaceStringInFile($file_2, " 'downloads': [", "", 0, 0) 150 | _ReplaceStringInFile($file_2, "{'", "", 0, 1) 151 | $cnt = _FileCountLines($file_2) 152 | If $cnt < 1 Then 153 | FileDelete($file_1) 154 | FileDelete($file_2) 155 | EndIf 156 | EndIf 157 | EndIf 158 | EndIf 159 | Else 160 | FileDelete($file_1) 161 | FileDelete($file_2) 162 | EndIf 163 | SplashOff() 164 | EndIf 165 | Next 166 | EndIf 167 | 168 | Exit 169 | -------------------------------------------------------------------------------- /GOGRepo.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | goto INSTALL 4 | 5 | :INSTALL 6 | rem Installs required HTML5 library and optional text improvement. 7 | pip install html5lib html2text 8 | goto END 9 | 10 | :LOGIN 11 | rem Creates a cookie file. 12 | gogrepo.py login email password 13 | goto END 14 | 15 | :UPDATEALL 16 | rem Creates a manifest of all files for Windows and Linux. 17 | gogrepo.py update -os windows linux -lang en 18 | goto END 19 | 20 | :UPDATEWIN 21 | rem Creates a manifest of all files for Windows only. 22 | gogrepo.py update -os windows -lang en 23 | goto END 24 | 25 | :UPDATELIN 26 | rem Creates a manifest of all files for Linux only. 27 | gogrepo.py update -os linux -lang en 28 | goto END 29 | 30 | :UPDATEONE 31 | rem Creates or Updates the manifest of all files for Windows and Linux for one game (aer) only. 32 | gogrepo.py update -os windows linux -lang en -id aer 33 | goto END 34 | 35 | :DOWNALL 36 | rem Downloads all games listed in the manifest to a parent folder called GAMES. 37 | gogrepo.py download GAMES 38 | rem Verifies with checksums (if they exist) all downloads in the GAMES folder. 39 | gogrepo.py verify "D:/Projects/GOGRepo GUI/GAMES/" 40 | goto END 41 | 42 | :DOWNONE 43 | rem Download one game (aer) listed in the manifest to a parent folder called GAMES. 44 | gogrepo.py download -id aer GAMES 45 | rem Verifies with checksums (if they exist) that one (aer) game download. 46 | gogrepo.py verify -id aer "D:/Projects/GOGRepo GUI/GAMES/" 47 | goto END 48 | 49 | :VERIFYONE 50 | rem Verifies with checksums (if they exist) the one (aer) game download. 51 | gogrepo.py verify -id aer "D:/Projects/GOGRepo GUI/GAMES/" 52 | goto END 53 | 54 | :HELP 55 | gogrepo.py -h 56 | goto END 57 | 58 | :END 59 | pause 60 | cls 61 | exit 62 | -------------------------------------------------------------------------------- /GOGRepoGUI_12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/GOGRepoGUI_12.png -------------------------------------------------------------------------------- /GOGRepoGUI_13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/GOGRepoGUI_13.png -------------------------------------------------------------------------------- /GOGRepoGUI_14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/GOGRepoGUI_14.png -------------------------------------------------------------------------------- /GOGRepoGUI_down_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/GOGRepoGUI_down_2.png -------------------------------------------------------------------------------- /GOGRepoGUI_downs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/GOGRepoGUI_downs.png -------------------------------------------------------------------------------- /GOGRepoGUI_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/GOGRepoGUI_menu.png -------------------------------------------------------------------------------- /GOGRepoGUI_menu_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/GOGRepoGUI_menu_2.png -------------------------------------------------------------------------------- /GOGRepoGUI_progress.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/GOGRepoGUI_progress.png -------------------------------------------------------------------------------- /GOGRepoGUI_queue_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/GOGRepoGUI_queue_6.png -------------------------------------------------------------------------------- /GOGRepoGUI_setup_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/GOGRepoGUI_setup_4.png -------------------------------------------------------------------------------- /GOGRepoGUI_update_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/GOGRepoGUI_update_10.png -------------------------------------------------------------------------------- /GOGRepoGUI_update_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/GOGRepoGUI_update_3.png -------------------------------------------------------------------------------- /GOGRepoGUI_update_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/GOGRepoGUI_update_4.png -------------------------------------------------------------------------------- /GOGRepoGUI_update_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/GOGRepoGUI_update_5.png -------------------------------------------------------------------------------- /GOGRepoGUI_update_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/GOGRepoGUI_update_6.png -------------------------------------------------------------------------------- /GOGRepoGUI_update_7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/GOGRepoGUI_update_7.png -------------------------------------------------------------------------------- /GOGRepoGUI_update_8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/GOGRepoGUI_update_8.png -------------------------------------------------------------------------------- /GOGRepoGUI_update_9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/GOGRepoGUI_update_9.png -------------------------------------------------------------------------------- /GOGRepoGUI_verify_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/GOGRepoGUI_verify_2.png -------------------------------------------------------------------------------- /GRG.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/GRG.ico -------------------------------------------------------------------------------- /Instructions.txt: -------------------------------------------------------------------------------- 1 | First time users need to do the following. 2 | 3 | 1. Download and install Python. 4 | 2. Download 'gogrepo.py' and place in the same folder as 'GOGRepo GUI' or vice-a-versa. 5 | 3. Run the 'GOGRepo GUI' program. 6 | 4. Click the SETUP button. 7 | 5. Click the INSTALL html5lib & html2text button. Wait for it to finish. 8 | 6. Click the CREATE COOKIE button. Wait for it to finish. 9 | 7. Close the SETUP window. 10 | 8. Click the UPDATE button ... recommended you do it with the ALL checkbox selected. 11 | IMPORTANT - Make sure to choose the OS you are interested in (use that field). 12 | WARNING - UPDATE can potentially take hours to finish, depending on the size of your library at GOG. This needs to be done at least once, and I recommend that you select all the OS you are likely to want to use, so as you avoid lengthy updates later. All games are returned anyway, but have missing detail for OS not selected. 13 | 9. Select a game on the list, and click DOWN ONE ... or if you want your whole library of games, enable the ALL checkbox at right of the DOWN ONE button. Also select if you want the game cover image. Extras are automatically downloaded at this stage. 14 | WARNING - This likewise, may take a long time depending on the size of your game files and or library. 15 | 16 | ADVICE - The program remains unusable while Steps 8 or 9 are running. You can minimize the window only. 17 | 18 | It is my intent to add queuing of download files, and skip existing etc when UPDATING. Also need to cater for no extras, implement a shutdown feature, etc. These things are not available yet. 19 | -------------------------------------------------------------------------------- /Latest_Incomplete/GOGRepo GUI.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/Latest_Incomplete/GOGRepo GUI.exe -------------------------------------------------------------------------------- /Latest_Incomplete/GOGRepoGUI_checker_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/Latest_Incomplete/GOGRepoGUI_checker_1.png -------------------------------------------------------------------------------- /Latest_Incomplete/GOGRepoGUI_checker_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/Latest_Incomplete/GOGRepoGUI_checker_3.png -------------------------------------------------------------------------------- /Latest_Incomplete/GOGRepoGUI_checker_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/Latest_Incomplete/GOGRepoGUI_checker_4.png -------------------------------------------------------------------------------- /Latest_Incomplete/GOGRepoGUI_menu_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/Latest_Incomplete/GOGRepoGUI_menu_3.png -------------------------------------------------------------------------------- /Latest_Incomplete/GOGRepoGUI_rcmenu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/Latest_Incomplete/GOGRepoGUI_rcmenu.png -------------------------------------------------------------------------------- /Latest_Incomplete/GOGRepoGUI_selector.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/Latest_Incomplete/GOGRepoGUI_selector.png -------------------------------------------------------------------------------- /Latest_Incomplete/History.txt: -------------------------------------------------------------------------------- 1 | 2 | (v1.1) Added another right-click menu option to Games list - CHECKER for Game files. That option and three others are now disabled in some usage scenarios. Added a new window - Game Files Checker, which is used to check manifest file entries against actual files, to determine if any game updates have been missed. Splash image has 3 | been corrected. Improved the Update In Stages process (manifest backup, error reporting, web connection, restoration, etc). BUGFIX for incomplete STOP insert code. Other bugfixes. Improvement to viewing Game Details offline. Added a right-click option as another way to view Game Details. BUGFIX for program crash when setting a Specific game destination folder. BUGFIX for incorrect line ending insertions into gogrepo.py. 4 | -------------------------------------------------------------------------------- /Older_Screenshots/GOGRepoGUI.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/Older_Screenshots/GOGRepoGUI.png -------------------------------------------------------------------------------- /Older_Screenshots/GOGRepoGUI_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/Older_Screenshots/GOGRepoGUI_10.png -------------------------------------------------------------------------------- /Older_Screenshots/GOGRepoGUI_11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/Older_Screenshots/GOGRepoGUI_11.png -------------------------------------------------------------------------------- /Older_Screenshots/GOGRepoGUI_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/Older_Screenshots/GOGRepoGUI_2.png -------------------------------------------------------------------------------- /Older_Screenshots/GOGRepoGUI_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/Older_Screenshots/GOGRepoGUI_3.png -------------------------------------------------------------------------------- /Older_Screenshots/GOGRepoGUI_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/Older_Screenshots/GOGRepoGUI_4.png -------------------------------------------------------------------------------- /Older_Screenshots/GOGRepoGUI_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/Older_Screenshots/GOGRepoGUI_5.png -------------------------------------------------------------------------------- /Older_Screenshots/GOGRepoGUI_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/Older_Screenshots/GOGRepoGUI_6.png -------------------------------------------------------------------------------- /Older_Screenshots/GOGRepoGUI_7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/Older_Screenshots/GOGRepoGUI_7.png -------------------------------------------------------------------------------- /Older_Screenshots/GOGRepoGUI_8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/Older_Screenshots/GOGRepoGUI_8.png -------------------------------------------------------------------------------- /Older_Screenshots/GOGRepoGUI_9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/Older_Screenshots/GOGRepoGUI_9.png -------------------------------------------------------------------------------- /Older_Screenshots/GOGRepoGUI_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/Older_Screenshots/GOGRepoGUI_down.png -------------------------------------------------------------------------------- /Older_Screenshots/GOGRepoGUI_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/Older_Screenshots/GOGRepoGUI_menu.png -------------------------------------------------------------------------------- /Older_Screenshots/GOGRepoGUI_queue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/Older_Screenshots/GOGRepoGUI_queue.png -------------------------------------------------------------------------------- /Older_Screenshots/GOGRepoGUI_queue_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/Older_Screenshots/GOGRepoGUI_queue_2.png -------------------------------------------------------------------------------- /Older_Screenshots/GOGRepoGUI_queue_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/Older_Screenshots/GOGRepoGUI_queue_3.png -------------------------------------------------------------------------------- /Older_Screenshots/GOGRepoGUI_queue_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/Older_Screenshots/GOGRepoGUI_queue_4.png -------------------------------------------------------------------------------- /Older_Screenshots/GOGRepoGUI_queue_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/Older_Screenshots/GOGRepoGUI_queue_5.png -------------------------------------------------------------------------------- /Older_Screenshots/GOGRepoGUI_setup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/Older_Screenshots/GOGRepoGUI_setup.png -------------------------------------------------------------------------------- /Older_Screenshots/GOGRepoGUI_setup_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/Older_Screenshots/GOGRepoGUI_setup_2.png -------------------------------------------------------------------------------- /Older_Screenshots/GOGRepoGUI_setup_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/Older_Screenshots/GOGRepoGUI_setup_3.png -------------------------------------------------------------------------------- /Older_Screenshots/GOGRepoGUI_update.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/Older_Screenshots/GOGRepoGUI_update.png -------------------------------------------------------------------------------- /Older_Screenshots/GOGRepoGUI_update_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/Older_Screenshots/GOGRepoGUI_update_2.png -------------------------------------------------------------------------------- /Older_Screenshots/GOGRepoGUI_verify.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/Older_Screenshots/GOGRepoGUI_verify.png -------------------------------------------------------------------------------- /Older_Versions/2020-06-23/GOGRepo GUI.au3: -------------------------------------------------------------------------------- 1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2 | ;; ;; 3 | ;; AutoIt Version: 3.3.14.2 ;; 4 | ;; ;; 5 | ;; Template AutoIt script. ;; 6 | ;; ;; 7 | ;; AUTHOR: Timboli ;; 8 | ;; ;; 9 | ;; SCRIPT FUNCTION: A limited GUI frontend for gogrepo.py ;; 10 | ;; ;; 11 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 12 | 13 | ; FUNCTIONS 14 | ; MainGUI(), QueueGUI(), SetupGUI() 15 | ; EnableDisableControls($state), FillTheGamesList(), GetWindowPosition(), ParseTheManifest() 16 | 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | 33 | _Singleton("gog-repo-gui-timboli") 34 | 35 | Global $Button_dest, $Button_down, $Button_exit, $Button_fold, $Button_info, $Button_log, $Button_more 36 | Global $Button_pic, $Button_queue, $Button_setup, $Button_update, $Checkbox_all, $Checkbox_alpha, $Checkbox_cover 37 | Global $Checkbox_every, $Checkbox_extra, $Checkbox_game, $Checkbox_linux, $Checkbox_show, $Checkbox_test, $Checkbox_verify 38 | Global $Checkbox_win, $Combo_OS, $Group_games, $Input_dest, $Input_extra, $Input_langs, $Input_name, $Input_title 39 | Global $Input_OS, $List_games, $Pic_cover 40 | ; 41 | Global $a, $ans, $array, $bigpic, $blackjpg, $c, $check, $chunk, $chunks, $cookies, $date, $downlist, $extras, $file 42 | Global $game, $games, $gamesfle, $gogrepo, $GOGRepoGUI, $height, $icoD, $icoF, $icoI, $icoT, $icoX, $image, $imgfle 43 | Global $infofle, $inifle, $lang, $left, $line, $lines, $logfle, $manifest, $name, $open, $OS, $read, $res, $segment 44 | Global $shell, $split, $state, $style, $text, $textdump, $title, $titlist, $top, $user, $version, $width, $winpos 45 | Global $xpos, $ypos 46 | 47 | $bigpic = @ScriptDir & "\Big.jpg" 48 | $blackjpg = @ScriptDir & "\Black.jpg" 49 | $cookies = @ScriptDir & "\gog-cookies.dat" 50 | $downlist = @ScriptDir & "\Downloads.ini" 51 | $gamesfle = @ScriptDir & "\Games.ini" 52 | $gogrepo = @ScriptDir & "\gogrepo.py" 53 | $imgfle = @ScriptDir & "\Image.jpg" 54 | $infofle = @ScriptDir & "\Game Info.html" 55 | $inifle = @ScriptDir & "\Settings.ini" 56 | $logfle = @ScriptDir & "\Record.log" 57 | $manifest = @ScriptDir & "\gog-manifest.dat" 58 | $titlist = @ScriptDir & "\Titles.txt" 59 | $version = "v1.0" 60 | 61 | If Not FileExists($titlist) Then _FileCreate($titlist) 62 | 63 | If FileExists($titlist) Then 64 | $lines = _FileCountLines($titlist) 65 | If $lines = 0 Then 66 | ParseTheManifest() 67 | EndIf 68 | MainGUI() 69 | Else 70 | ; 71 | EndIf 72 | 73 | Exit 74 | 75 | Func MainGUI() 76 | Local $Group_cover, $Group_dest, $Group_down, $Group_update, $Label_cover, $Label_extra, $Label_OS, $Label_title 77 | ; 78 | Local $all, $alpha, $cover, $dll, $every, $extras, $gamefold, $gamepic, $gamesfold 79 | Local $let, $mpos, $OSes, $OSget, $pid, $pth, $show, $val, $validate, $verify 80 | ; 81 | $width = 590 82 | $height = 405 83 | $left = IniRead($inifle, "Program Window", "left", @DesktopWidth - $width - 25) 84 | $top = IniRead($inifle, "Program Window", "top", @DesktopHeight - $height - 30) 85 | $style = $WS_OVERLAPPED + $WS_CAPTION + $WS_SYSMENU + $WS_VISIBLE + $WS_CLIPSIBLINGS + $WS_MINIMIZEBOX 86 | $GOGRepoGUI = GuiCreate("GOGRepo GUI", $width, $height, $left, $top, $style, $WS_EX_TOPMOST) 87 | GUISetBkColor($COLOR_SKYBLUE, $GOGRepoGUI) 88 | ; CONTROLS 89 | $Group_games = GuiCtrlCreateGroup("Games", 10, 10, 370, 323) 90 | $List_games = GuiCtrlCreateList("", 20, 30, 350, 220) 91 | GUICtrlSetTip($List_games, "List of games!") 92 | $Input_name = GUICtrlCreateInput("", 20, 250, 350, 20) 93 | GUICtrlSetTip($Input_name, "Game Name!") 94 | $Label_title = GuiCtrlCreateLabel("Title", 20, 275, 40, 20, $SS_CENTER + $SS_CENTERIMAGE + $SS_SUNKEN + $SS_NOTIFY) 95 | GUICtrlSetBkColor($Label_title, $COLOR_BLUE) 96 | GUICtrlSetColor($Label_title, $COLOR_WHITE) 97 | GUICtrlSetFont($Label_title, 7, 600, 0, "Small Fonts") 98 | GUICtrlSetTip($Label_title, "Click to convert text in input field!") 99 | $Input_title = GUICtrlCreateInput("", 60, 275, 310, 20) ;, $ES_READONLY 100 | GUICtrlSetTip($Input_title, "Game Title!") 101 | $Label_OS = GuiCtrlCreateLabel("OS", 20, 300, 30, 20, $SS_CENTER + $SS_CENTERIMAGE + $SS_SUNKEN) 102 | GUICtrlSetBkColor($Label_OS, $COLOR_BLACK) 103 | GUICtrlSetColor($Label_OS, $COLOR_WHITE) 104 | GUICtrlSetFont($Label_OS, 7, 600, 0, "Small Fonts") 105 | $Input_OS = GUICtrlCreateInput("", 50, 300, 130, 20, $ES_READONLY) 106 | GUICtrlSetTip($Input_OS, "OS files available!") 107 | $Label_extra = GuiCtrlCreateLabel("Extras", 190, 300, 50, 20, $SS_CENTER + $SS_CENTERIMAGE + $SS_SUNKEN) 108 | GUICtrlSetBkColor($Label_extra, $COLOR_MAROON) 109 | GUICtrlSetColor($Label_extra, $COLOR_WHITE) 110 | GUICtrlSetFont($Label_extra, 7, 600, 0, "Small Fonts") 111 | $Input_extra = GUICtrlCreateInput("", 240, 300, 70, 20, $ES_READONLY) 112 | GUICtrlSetTip($Input_extra, "Extra files available!") 113 | $Button_more = GuiCtrlCreateButton("More", 320, 299, 50, 22) 114 | GUICtrlSetFont($Button_more, 7, 600, 0, "Small Fonts") 115 | GUICtrlSetTip($Button_more, "View more information from manifest!") 116 | ; 117 | $Group_cover = GuiCtrlCreateGroup("Cover", 390, 10, 190, 160) 118 | $Pic_cover = GUICtrlCreatePic($blackjpg, 400, 30, 170, 100, $SS_NOTIFY) 119 | GUICtrlSetTip($Pic_cover, "Game cover image (click to enlarge)!") 120 | $Label_cover = GuiCtrlCreateLabel("", 410, 70, 150, 20, $SS_CENTER + $SS_CENTERIMAGE) 121 | GUICtrlSetBkColor($Label_cover, $GUI_BKCOLOR_TRANSPARENT) 122 | GUICtrlSetColor($Label_cover, $COLOR_WHITE) 123 | $Button_pic = GuiCtrlCreateButton("Download Cover", 400, 135, 120, 25) 124 | GUICtrlSetFont($Button_pic, 7, 600, 0, "Small Fonts") 125 | GUICtrlSetTip($Button_pic, "Download the selected image!") 126 | $Checkbox_show = GUICtrlCreateCheckbox("Show", 525, 138, 45, 20) 127 | GUICtrlSetTip($Checkbox_show, "Show the cover image!") 128 | ; 129 | $Group_down = GuiCtrlCreateGroup("", 450, 175, 65, 51) 130 | $Button_down = GuiCtrlCreateButton("Down" & @LF & "One", 390, 180, 67, 48, $BS_MULTILINE) 131 | GUICtrlSetFont($Button_down, 9, 600) 132 | GUICtrlSetTip($Button_down, "Download the selected game!") 133 | $Checkbox_verify = GUICtrlCreateCheckbox("Verify", 462, 186, 45, 18) 134 | GUICtrlSetFont($Checkbox_verify, 8, 400) 135 | GUICtrlSetTip($Checkbox_verify, "Enable verifying one or all games!") 136 | $Checkbox_all = GUICtrlCreateCheckbox("ALL", 462, 204, 35, 18) 137 | GUICtrlSetFont($Checkbox_all, 8, 400) 138 | GUICtrlSetTip($Checkbox_all, "Process one or ALL games!") 139 | ; 140 | $Button_queue = GuiCtrlCreateButton("VIEW" & @LF & "QUEUE", 522, 180, 58, 48, $BS_MULTILINE) 141 | GUICtrlSetFont($Button_queue, 7, 600, 0, "Small Fonts") 142 | GUICtrlSetTip($Button_queue, "View the download queue!") 143 | ; 144 | $Group_opts = GuiCtrlCreateGroup("Download Options", 390, 233, 130, 107) 145 | $Combo_OS = GUICtrlCreateCombo("", 400, 249, 110, 21) 146 | GUICtrlSetTip($Combo_OS, "OS to download files for!") 147 | $Checkbox_test = GUICtrlCreateCheckbox("Validate", 400, 273, 55, 20) 148 | GUICtrlSetTip($Checkbox_test, "Verify integrity of downloaded files!") 149 | $Checkbox_extra = GUICtrlCreateCheckbox("Extras", 463, 273, 55, 21) 150 | GUICtrlSetTip($Checkbox_extra, "Download game extras files!") 151 | $Checkbox_cover = GUICtrlCreateCheckbox("Download the cover", 400, 293, 115, 20) 152 | GUICtrlSetFont($Checkbox_cover, 8, 400) 153 | GUICtrlSetTip($Checkbox_cover, "Download the cover image files!") 154 | $Checkbox_game = GUICtrlCreateCheckbox("Game Files", 400, 313, 70, 20) 155 | GUICtrlSetTip($Checkbox_game, "Download the game files!") 156 | $Input_langs = GUICtrlCreateInput("", 475, 313, 35, 18, $ES_READONLY) 157 | GUICtrlSetFont($Input_langs, 9, 400, 0, "MS Serif") 158 | GUICtrlSetTip($Input_langs, "Download language(s)!") 159 | ; 160 | $Group_dest = GuiCtrlCreateGroup("Download Destination - Games Folder", 10, $height - 63, 308, 52) 161 | $Input_dest = GUICtrlCreateInput("", 20, $height - 43, 185, 20) 162 | GUICtrlSetTip($Input_dest, "Destination path (main parent folder for games)!") 163 | $Button_dest = GuiCtrlCreateButton("B", 210, $height - 43, 20, 20, $BS_ICON) 164 | GUICtrlSetTip($Button_dest, "Browse to set the destination folder!") 165 | $Checkbox_alpha = GUICtrlCreateCheckbox("Alpha", 235, $height - 43, 45, 20) 166 | GUICtrlSetTip($Checkbox_alpha, "Create alphanumeric sub-folder!") 167 | $Button_fold = GuiCtrlCreateButton("Open", 285, $height - 44, 23, 22, $BS_ICON) 168 | GUICtrlSetTip($Button_fold, "Open the selected destination folder!") 169 | ; 170 | $Button_setup = GuiCtrlCreateButton("SETUP", $width - 264, $height - 58, 56, 49) 171 | GUICtrlSetFont($Button_setup, 7, 600, 0, "Small Fonts") 172 | GUICtrlSetTip($Button_setup, "Setup username and password!") 173 | ; 174 | $Group_update = GuiCtrlCreateGroup("", $width - 129, $height - 60, 59, 48) 175 | $Button_update = GuiCtrlCreateButton("Update", $width - 200, $height - 55, 78, 46) 176 | GUICtrlSetFont($Button_update, 9, 600) 177 | GUICtrlSetTip($Button_update, "Update the manifest!") 178 | $Checkbox_every = GUICtrlCreateCheckbox("ALL", $width - 116, $height - 43, 35, 20) 179 | GUICtrlSetTip($Checkbox_every, "Update one or ALL games!") 180 | ; 181 | $Button_log = GuiCtrlCreateButton("LOG", $width - 60, $height - 169, 50, 43) 182 | GUICtrlSetFont($Button_log, 7, 600, 0, "Small Fonts") 183 | GUICtrlSetTip($Button_log, "View the record log file!") 184 | ; 185 | $Button_info = GuiCtrlCreateButton("Info", $width - 60, $height - 118, 50, 50, $BS_ICON) 186 | GUICtrlSetTip($Button_info, "Program Information!") 187 | ; 188 | $Button_exit = GuiCtrlCreateButton("EXIT", $width - 60, $height - 60, 50, 50, $BS_ICON) 189 | GUICtrlSetTip($Button_exit, "Exit / Close / Quit the program!") 190 | ; 191 | ; OS SETTINGS 192 | $user = @SystemDir & "\user32.dll" 193 | $shell = @SystemDir & "\shell32.dll" 194 | $icoD = -4 195 | $icoF = -85 196 | $icoI = -5 197 | $icoT = -71 198 | $icoX = -4 199 | GUICtrlSetImage($Button_dest, $shell, $icoF, 0) 200 | GUICtrlSetImage($Button_fold, $shell, $icoD, 0) 201 | GUICtrlSetImage($Button_info, $user, $icoI, 1) 202 | GUICtrlSetImage($Button_exit, $user, $icoX, 1) 203 | ; 204 | ; SETTINGS 205 | GuiSetState(@SW_DISABLE, $GOGRepoGUI) 206 | ; 207 | If Not FileExists($cookies) Then 208 | GUICtrlSetState($Button_down, $GUI_DISABLE) 209 | GUICtrlSetState($Button_update, $GUI_DISABLE) 210 | EndIf 211 | If Not FileExists($manifest) Then 212 | GUICtrlSetState($Button_more, $GUI_DISABLE) 213 | GUICtrlSetState($Button_pic, $GUI_DISABLE) 214 | EndIf 215 | ; 216 | $show = IniRead($inifle, "Cover Image", "show", "") 217 | If $show = "" Then 218 | $show = 1 219 | IniWrite($inifle, "Cover Image", "show", $show) 220 | EndIf 221 | GUICtrlSetState($Checkbox_show, $show) 222 | ; 223 | $OSes = "Windows + Linux|Windows + Mac|Linux + Mac|Windows|Linux|Mac|Every OS" 224 | $OSget = IniRead($inifle, "Download Options", "OS", "") 225 | If $OSget = "" Then 226 | $OSget = "Windows + Linux" 227 | IniWrite($inifle, "Download Options", "OS", $OSget) 228 | EndIf 229 | GUICtrlSetData($Combo_OS, $OSes, $OSget) 230 | ; 231 | $extras = IniRead($inifle, "Download Options", "extras", "") 232 | If $extras = "" Then 233 | $extras = 1 234 | IniWrite($inifle, "Download Options", "extras", $extras) 235 | EndIf 236 | GUICtrlSetState($Checkbox_extra, $extras) 237 | ; 238 | $validate = IniRead($inifle, "Download Options", "verify", "") 239 | If $validate = "" Then 240 | $validate = 1 241 | IniWrite($inifle, "Download Options", "verify", $validate) 242 | EndIf 243 | GUICtrlSetState($Checkbox_test, $validate) 244 | ; 245 | $cover = IniRead($inifle, "Download Options", "cover", "") 246 | If $cover = "" Then 247 | $cover = 1 248 | IniWrite($inifle, "Download Options", "cover", $cover) 249 | EndIf 250 | GUICtrlSetState($Checkbox_cover, $cover) 251 | ; 252 | $gamesfold = IniRead($inifle, "Main Games Folder", "path", "") 253 | If $gamesfold = "" Then 254 | $gamesfold = @ScriptDir & "\GAMES" 255 | IniWrite($inifle, "Main Games Folder", "path", $gamesfold) 256 | If Not FileExists($gamesfold) Then DirCreate($gamesfold) 257 | EndIf 258 | GUICtrlSetData($Input_dest, $gamesfold) 259 | $alpha = IniRead($inifle, "Alphanumerical Game Folders", "use", "") 260 | If $alpha = "" Then 261 | $alpha = 4 262 | IniWrite($inifle, "Alphanumerical Game Folders", "use", $alpha) 263 | EndIf 264 | GUICtrlSetState($Checkbox_alpha, $alpha) 265 | ; 266 | $lang = IniRead($inifle, "Download Options", "language", "") 267 | If $lang = "" Then 268 | $lang = "en" 269 | $val = InputBox("Language Query", "Please enter the two character" _ 270 | & @LF & "code for your language ... plus" _ 271 | & @LF & "any other languages you wish" _ 272 | & @LF & "to download for, using a space" _ 273 | & @LF & "as divider between." & @LF _ 274 | & @LF & "i.e. de en fr", _ 275 | $lang, "", 100, 205, Default, Default, 0, $GOGRepoGUI) 276 | If Not @error Then 277 | $lang = $val 278 | EndIf 279 | IniWrite($inifle, "Download Options", "language", $lang) 280 | EndIf 281 | GUICtrlSetData($Input_langs, $lang) 282 | ; 283 | FillTheGamesList() 284 | ; 285 | $all = 4 286 | $every = 4 287 | $verify = 4 288 | 289 | 290 | GuiSetState(@SW_ENABLE, $GOGRepoGUI) 291 | While 1 292 | $msg = GuiGetMsg() 293 | Select 294 | Case $msg = $GUI_EVENT_CLOSE Or $msg = $Button_exit 295 | ; Exit / Close / Quit the program 296 | GetWindowPosition() 297 | ; 298 | GUIDelete($GOGRepoGUI) 299 | ExitLoop 300 | Case $msg = $Button_update 301 | ; Update the manifest 302 | If FileExists($gogrepo) Then 303 | EnableDisableControls($GUI_DISABLE) 304 | $OSget = GUICtrlRead($Combo_OS) 305 | $OS = StringReplace($OSget, " + ", " ") 306 | $OS = StringLower($OS) 307 | FileChangeDir(@ScriptDir) 308 | If $every = 1 Then 309 | $pid = RunWait(@ComSpec & ' /k gogrepo.py update -os ' & $OS & ' -lang ' & $lang, @ScriptDir) 310 | _FileWriteLog($logfle, "Updated manifest for all games.") 311 | Else 312 | $title = GUICtrlRead($Input_title) 313 | If $title <> "" Then 314 | $pid = RunWait(@ComSpec & ' /k gogrepo.py update -os ' & $OS & ' -lang ' & $lang & ' -id ' & $title, @ScriptDir) 315 | _FileWriteLog($logfle, "Updated manifest for - " & $title & ".") 316 | Else 317 | MsgBox(262192, "Game Error", "Title is not selected!", 0, $GOGRepoGUI) 318 | ContinueLoop 319 | EndIf 320 | EndIf 321 | GUICtrlSetData($List_games, "") 322 | GUICtrlSetData($Input_name, "") 323 | GUICtrlSetData($Input_title, "") 324 | GUICtrlSetData($Input_OS, "") 325 | GUICtrlSetData($Input_extra, "") 326 | _FileCreate($titlist) 327 | ParseTheManifest() 328 | FillTheGamesList() 329 | EnableDisableControls($GUI_ENABLE) 330 | EndIf 331 | Case $msg = $Button_setup 332 | ; Setup username and password 333 | SetupGUI() 334 | Case $msg = $Button_queue 335 | ; View the download queue 336 | GetWindowPosition() 337 | GuiSetState(@SW_HIDE, $GOGRepoGUI) 338 | QueueGUI() 339 | GuiSetState(@SW_SHOW, $GOGRepoGUI) 340 | Case $msg = $Button_pic 341 | ; Download the selected image 342 | $name = GUICtrlRead($Input_name) 343 | If $name <> "" Then 344 | $image = IniRead($gamesfle, $name, "image", "") 345 | If $image <> "" Then 346 | SplashTextOn("", "Saving!", 200, 120, Default, Default, 33) 347 | $gamepic = $name & ".jpg" 348 | $gamepic = StringReplace($gamepic, ": ", " - ") 349 | $gamepic = StringReplace($gamepic, "?", "") 350 | $gamepic = StringReplace($gamepic, "*", "") 351 | $gamepic = StringReplace($gamepic, "|", "") 352 | $gamepic = StringReplace($gamepic, "/", "") 353 | $gamepic = StringReplace($gamepic, "\", "") 354 | $gamepic = StringReplace($gamepic, "<", "") 355 | $gamepic = StringReplace($gamepic, ">", "") 356 | $gamepic = StringReplace($gamepic, '"', '') 357 | $gamepic = @ScriptDir & "\" & $gamepic 358 | InetGet($image, $gamepic, 1, 0) 359 | SplashOff() 360 | EndIf 361 | EndIf 362 | Case $msg = $Button_more 363 | ; View more information from manifest 364 | If FileExists($manifest) Then 365 | $name = GUICtrlRead($Input_name) 366 | If $name <> "" Then 367 | $title = GUICtrlRead($Input_title) 368 | If $title <> "" Then 369 | SplashTextOn("", "Please Wait!", 200, 120, Default, Default, 33) 370 | $open = FileOpen($manifest, 0) 371 | $read = FileRead($open) 372 | FileClose($open) 373 | $segment = StringSplit($read, "'title': '" & $title & "'}", 1) 374 | If $segment[0] = 2 Then 375 | $segment = $segment[1] 376 | $segment = StringSplit($segment, "{'bg_url':", 1) 377 | If $segment[0] > 1 Then 378 | $html = "" & @CRLF & "
" & @CRLF & "" & $title & "" & @CRLF & "
" & @CRLF & "" 379 | $image = IniRead($gamesfle, $name, "image", "") 380 | If $image <> "" Then 381 | $html = $html & @CRLF & "" 382 | EndIf 383 | $chunk = $title & @CRLF & "'bg_url':" & $segment[$segment[0]] 384 | $chunk = StringReplace($chunk, "\n", "") 385 | $chunk = StringReplace($chunk, "'

", "

") 386 | $chunk = StringReplace($chunk, "

'", "") 387 | $chunk = StringReplace($chunk, "'
", "
") 388 | $chunk = StringReplace($chunk, "
'", "") 389 | ;$chunk = StringReplace($chunk, " ", "") 390 | $chunk = StringReplace($chunk, @CRLF, "
") 391 | $chunk = StringReplace($chunk, @CR, "
") 392 | $chunk = StringReplace($chunk, @LF, "
") 393 | $chunk = StringReplace($chunk, "

", "

") 394 | $chunk = StringReplace($chunk, "

", "
") 395 | $chunk = StringReplace($chunk, "

", "") 396 | $chunk = StringReplace($chunk, "
", "") 397 | $chunk = StringReplace($chunk, "'
'
  • ", "
  • ") 398 | $chunk = StringReplace($chunk, "'
      '
      '
    • ", "
      • ") 399 | $chunk = StringReplace($chunk, "
      • '
        '
      '
      ", "
    ") 400 | $chunk = StringReplace($chunk, "
  • '
    '

    ", "

  • ") 401 | $chunk = StringReplace($chunk, "

    '
    '
  • '
    '

    ", "

  • ") 402 | $chunk = StringReplace($chunk, "

    '
    '
  • ", "

  • ") 403 | $chunk = StringReplace($chunk, "'
    '", "") 404 | $chunk = StringReplace($chunk, "',
    ", "") 405 | $chunk = StringReplace($chunk, "'
      '
      '
    • ", "
      • ") 406 | $chunk = StringReplace($chunk, "
      • '
        " & '"
      • ', "
      • ") 407 | $chunk = StringReplace($chunk, "
      '
      '
      '

      ", "


    ") 408 | $chunk = StringReplace($chunk, "'
    ", "") 409 | $chunk = StringReplace($chunk, " '
  • ", "
  • ") 410 | $chunk = StringReplace($chunk, " '
  • ", "") 411 | $chunk = StringReplace($chunk, ' "
  • ', "
  • ") 412 | $chunk = StringReplace($chunk, ' "
  • ', "") 413 | $chunk = StringReplace($chunk, " '
      ", "
        ") 414 | $chunk = StringReplace($chunk, " '
      ", "
    ") 415 | $chunk = StringReplace($chunk, " '
    ", "
    ") 416 | $chunk = StringReplace($chunk, "

    ", "

    ") 417 | $chunk = StringReplace($chunk, "

    ", "
    ") 418 | $chunk = StringReplace($chunk, " '

    ", "

    ") 419 | $chunk = StringReplace($chunk, ' "

    ', "

    ") 420 | $chunk = StringReplace($chunk, " '

    ", "

    ") 421 | $chunk = StringReplace($chunk, "
      '
      ", "
        ") 422 | $chunk = StringReplace($chunk, "
      '
      ", "
    ") 423 | $chunk = StringReplace($chunk, "
    ',
    ", "
    ") 424 | $chunk = StringReplace($chunk, "
    '
    ", "
    ") 425 | $chunk = StringReplace($chunk, "
  • '
    ", "
  • ") 426 | $chunk = StringReplace($chunk, "

    '
    ", "

    ") 427 | $chunk = StringReplace($chunk, '

    "
    ', "

    ") 428 | $chunk = StringReplace($chunk, "

    ", "

    ") 429 | $chunk = $html & @CRLF & "
    " & $chunk & "
    " & @CRLF & "" & @CRLF & "" 430 | SplashOff() 431 | ;MsgBox(262208, "Game Information From Manifest - " & $title, $chunk, 0, $GOGRepoGUI) 432 | $file = FileOpen($infofle, 2) 433 | FileWriteLine($file, $chunk) 434 | FileClose($file) 435 | ShellExecute($infofle) 436 | EndIf 437 | Else 438 | SplashOff() 439 | EndIf 440 | EndIf 441 | EndIf 442 | EndIf 443 | Case $msg = $Button_log 444 | ; View the record log file 445 | If FileExists($logfle) Then ShellExecute($logfle) 446 | Case $msg = $Button_info 447 | ; Program Information 448 | MsgBox(262208, "Program Information", _ 449 | "This program is a frontend GUI for 'gogrepo.py' (Python) program" & @LF & _ 450 | "that can get a manifest of your GOG.com games library, as well as" & @LF & _ 451 | "download your games, verify and update etc." & @LF & @LF & _ 452 | "This GOGRepo GUI program is totally reliant on 'gogrepo.py', but" & @LF & _ 453 | "has some handy abilities of its own - downloading cover images," & @LF & _ 454 | "queuing downloads, viewing a list of your games, etc." & @LF & @LF & _ 455 | "Before starting with GOGRepo GUI, you need a cookie file, which" & @LF & _ 456 | "can be created, if you haven't yet got one, via the SETUP button." & @LF & @LF & _ 457 | "REQUIREMENTS" & @LF & _ 458 | "------------------" & @LF & _ 459 | "Python needs to be installed on your PC." & @LF & _ 460 | "Python needs to have the html5lib installed." & @LF & _ 461 | "Python can also optionally have html2text installed (advised)." & @LF & _ 462 | "gogrepo.py needs to be in the same folder as GOGRepo GUI." & @LF & @LF & _ 463 | "BIG THANKS to those responsible for gogrepo.py." & @LF & _ 464 | "(woolymethodman, Kalanyr, etc)" & @LF & @LF & _ 465 | "© June 2020 - GOGRepo GUI created by Timboli.", 0, $GOGRepoGUI) 466 | Case $msg = $Button_fold 467 | ; Open the selected Game folder 468 | If FileExists($gamesfold) Then 469 | GUISetState(@SW_MINIMIZE, $GOGRepoGUI) 470 | $title = GUICtrlRead($Input_title) 471 | If $title <> "" Then 472 | $gamefold = $gamesfold 473 | If $alpha = 1 Then 474 | $let = StringUpper(StringLeft($title, 1)) 475 | $gamefold = $gamefold & "\" & $let 476 | EndIf 477 | $gamefold = $gamefold & "\" & $title 478 | If FileExists($gamefold) Then 479 | Run(@WindowsDir & "\Explorer.exe " & $gamefold) 480 | Else 481 | Run(@WindowsDir & "\Explorer.exe " & $gamesfold) 482 | EndIf 483 | Else 484 | Run(@WindowsDir & "\Explorer.exe " & $gamesfold) 485 | EndIf 486 | EndIf 487 | Case $msg = $Button_down 488 | ; Download the selected game 489 | If FileExists($gogrepo) Then 490 | $title = GUICtrlRead($Input_title) 491 | If $title <> "" Or $all = 1 Then 492 | $gamefold = $gamesfold 493 | If $all = 4 Then 494 | ;MsgBox(262192, "Got Here 1", $title & @LF & $gamefold, 0, $GOGRepoGUI) 495 | If $alpha = 1 Then 496 | $let = StringUpper(StringLeft($title, 1)) 497 | $gamefold = $gamefold & "\" & $let 498 | ;MsgBox(262192, "Got Here 2", $title & @LF & $gamefold, 0, $GOGRepoGUI) 499 | EndIf 500 | EndIf 501 | If Not FileExists($gamefold) And $verify = 4 Then 502 | DirCreate($gamefold) 503 | EndIf 504 | If FileExists($gamefold) Then 505 | ;MsgBox(262192, "Game Folder", $title & @LF & $gamefold, 0, $GOGRepoGUI) 506 | EnableDisableControls($GUI_DISABLE) 507 | FileChangeDir(@ScriptDir) 508 | If $verify = 1 Then 509 | If $all = 1 Then 510 | If $alpha = 1 Then 511 | For $a = 48 To 90 512 | If $a < 58 Or $a > 64 Then 513 | $let = Chr($a) 514 | $pid = RunWait(@ComSpec & ' /k gogrepo.py verify "' & $gamefold & "\" & $let & '"', @ScriptDir) 515 | _FileWriteLog($logfle, "Verified all games in " & $let & ".") 516 | If $a < 90 Then 517 | $ans = MsgBox(262177, "Verify Query", _ 518 | "The games in alphanumeric folder " & $let & " have just been processed." & @LF & @LF & _ 519 | "Do you want to continue checking the remaining alphanumeric" & @LF & _ 520 | "folder games?", 0, $GOGRepoGUI) 521 | If $ans = 2 Then 522 | ExitLoop 523 | EndIf 524 | EndIf 525 | EndIf 526 | Next 527 | Else 528 | $pid = RunWait(@ComSpec & ' /k gogrepo.py verify "' & $gamefold & '"', @ScriptDir) 529 | _FileWriteLog($logfle, "Verified all games.") 530 | EndIf 531 | Else 532 | $pid = RunWait(@ComSpec & ' /k gogrepo.py verify -id ' & $title & ' "' & $gamefold & '"', @ScriptDir) 533 | _FileWriteLog($logfle, "Verified - " & $title & ".") 534 | EndIf 535 | Else 536 | If $all = 1 Then 537 | $pid = RunWait(@ComSpec & ' /c gogrepo.py download "' & $gamefold & '"', @ScriptDir) 538 | If $validate = 1 Then $pid = RunWait(@ComSpec & ' /k gogrepo.py verify "' & $gamefold & '"', @ScriptDir) 539 | _FileWriteLog($logfle, "Downloaded all games.") 540 | Else 541 | $pid = RunWait(@ComSpec & ' /c gogrepo.py download -id ' & $title & ' "' & $gamefold & '"', @ScriptDir) 542 | If $validate = 1 Then $pid = RunWait(@ComSpec & ' /k gogrepo.py verify -id ' & $title & ' "' & $gamefold & '"', @ScriptDir) 543 | _FileWriteLog($logfle, "Downloaded - " & $title & ".") 544 | If $cover = 1 Then 545 | $name = GUICtrlRead($Input_name) 546 | If $name <> "" Then 547 | $image = IniRead($gamesfle, $name, "image", "") 548 | If $image <> "" Then 549 | SplashTextOn("", "Saving!", 200, 120, Default, Default, 33) 550 | $gamepic = $gamefold & "\" & $title & "\Folder.jpg" 551 | InetGet($image, $gamepic, 1, 0) 552 | SplashOff() 553 | EndIf 554 | EndIf 555 | EndIf 556 | EndIf 557 | EndIf 558 | EnableDisableControls($GUI_ENABLE) 559 | Else 560 | MsgBox(262192, "Path Error", "Game folder not found!", 0, $GOGRepoGUI) 561 | EndIf 562 | Else 563 | MsgBox(262192, "Game Error", "Title is not selected!", 0, $GOGRepoGUI) 564 | EndIf 565 | Else 566 | MsgBox(262192, "Program Error", "Required gogrepo.py not found!", 0, $GOGRepoGUI) 567 | EndIf 568 | Case $msg = $Button_dest 569 | ; Browse to set the destination folder 570 | $pth = FileSelectFolder("Browse to set the main games folder.", @ScriptDir, 7, $gamesfold, $GOGRepoGUI) 571 | If Not @error And StringMid($pth, 2, 2) = ":\" Then 572 | $gamesfold = $pth 573 | IniWrite($inifle, "Main Games Folder", "path", $gamesfold) 574 | GUICtrlSetData($Input_dest, $gamesfold) 575 | EndIf 576 | Case $msg = $Checkbox_verify 577 | ; Enable verifying one or all games 578 | If GUICtrlRead($Checkbox_verify) = $GUI_CHECKED Then 579 | $verify = 1 580 | If $all = 1 Then 581 | $buttitle = "Verify" & @LF & "ALL" 582 | GUICtrlSetTip($Button_down, "Verify ALL games!") 583 | Else 584 | $buttitle = "Verify" & @LF & "One" 585 | GUICtrlSetTip($Button_down, "Verify the selected game!") 586 | EndIf 587 | Else 588 | $verify = 4 589 | If $all = 1 Then 590 | $buttitle = "Down" & @LF & "ALL" 591 | GUICtrlSetTip($Button_down, "Download ALL games!") 592 | Else 593 | $buttitle = "Down" & @LF & "One" 594 | GUICtrlSetTip($Button_down, "Download the selected game!") 595 | EndIf 596 | EndIf 597 | GUICtrlSetData($Button_down, $buttitle) 598 | Case $msg = $Checkbox_test 599 | ; Verify integrity of downloaded files 600 | If GUICtrlRead($Checkbox_test) = $GUI_CHECKED Then 601 | $validate = 1 602 | Else 603 | $validate = 4 604 | EndIf 605 | IniWrite($inifle, "Download Options", "verify", $validate) 606 | Case $msg = $Checkbox_show 607 | ; Show the cover image 608 | If GUICtrlRead($Checkbox_show) = $GUI_CHECKED Then 609 | $show = 1 610 | Else 611 | $show = 4 612 | GUICtrlSetImage($Pic_cover, $blackjpg) 613 | EndIf 614 | IniWrite($inifle, "Cover Image", "show", $show) 615 | Case $msg = $Checkbox_extra 616 | ; Download game extras files 617 | If GUICtrlRead($Checkbox_extra) = $GUI_CHECKED Then 618 | $extras = 1 619 | Else 620 | $extras = 4 621 | EndIf 622 | IniWrite($inifle, "Download Options", "extras", $extras) 623 | Case $msg = $Checkbox_every 624 | ; Update one or ALL games 625 | If GUICtrlRead($Checkbox_every) = $GUI_CHECKED Then 626 | $every = 1 627 | Else 628 | $every = 4 629 | EndIf 630 | Case $msg = $Checkbox_cover 631 | ; Download the cover image files 632 | If GUICtrlRead($Checkbox_cover) = $GUI_CHECKED Then 633 | $cover = 1 634 | Else 635 | $cover = 4 636 | EndIf 637 | IniWrite($inifle, "Download Options", "cover", $cover) 638 | Case $msg = $Checkbox_alpha 639 | ; Create alphanumeric sub-folder 640 | If GUICtrlRead($Checkbox_alpha) = $GUI_CHECKED Then 641 | $alpha = 1 642 | Else 643 | $alpha = 4 644 | EndIf 645 | IniWrite($inifle, "Alphanumerical Game Folders", "use", $alpha) 646 | Case $msg = $Checkbox_all 647 | ; Process one or ALL games 648 | If GUICtrlRead($Checkbox_all) = $GUI_CHECKED Then 649 | $all = 1 650 | If $verify = 1 Then 651 | $buttitle = "Verify" & @LF & "ALL" 652 | GUICtrlSetTip($Button_down, "Verify ALL games!") 653 | Else 654 | $buttitle = "Down" & @LF & "ALL" 655 | GUICtrlSetTip($Button_down, "Download ALL games!") 656 | EndIf 657 | Else 658 | $all = 4 659 | If $verify = 1 Then 660 | $buttitle = "Verify" & @LF & "One" 661 | GUICtrlSetTip($Button_down, "Verify the selected game!") 662 | Else 663 | $buttitle = "Down" & @LF & "One" 664 | GUICtrlSetTip($Button_down, "Download the selected game!") 665 | EndIf 666 | EndIf 667 | GUICtrlSetData($Button_down, $buttitle) 668 | Case $msg = $Combo_OS 669 | ; OS to download files for 670 | $OSget = GUICtrlRead($Combo_OS) 671 | IniWrite($inifle, "Download Options", "OS", $OSget) 672 | Case $msg = $Label_title 673 | ; Click to convert text in input field 674 | $title = GUICtrlRead($Input_title) 675 | If $title <> "" Then 676 | $title = StringReplace($title, ":", "") 677 | $title = StringReplace($title, ";", "") 678 | $title = StringReplace($title, "?", "") 679 | $title = StringReplace($title, "-", "") 680 | $title = StringReplace($title, ",", "") 681 | $title = StringLower($title) 682 | $title = StringReplace($title, "'", "_") 683 | $title = StringReplace($title, ".", "_") 684 | $title = StringStripWS($title, 7) 685 | $title = StringReplace($title, " ", "_") 686 | GUICtrlSetData($Input_title, $title) 687 | EndIf 688 | Case $msg = $List_games 689 | ; Open the selected Calibre Library folder 690 | $name = GUICtrlRead($List_games) 691 | ;$name = StringReplace($name, Chr(150), " - ") 692 | ;$name = StringReplace($name, Chr(151), " - ") 693 | ;$name = StringReplace($name, Chr(175), " - ") 694 | ;$name = StringReplace($name, "–", "-") 695 | GUICtrlSetData($Input_name, $name) 696 | $title = IniRead($gamesfle, $name, "title", "error") 697 | GUICtrlSetData($Input_title, $title) 698 | $OS = IniRead($gamesfle, $name, "osextra", "") 699 | If StringInStr($OS, "Extras") > 0 Then 700 | $OS = StringReplace($OS, " + Extras", "") 701 | $OS = StringReplace($OS, "Extras", "") 702 | GUICtrlSetData($Input_OS, $OS) 703 | GUICtrlSetData($Input_extra, "Extras") 704 | Else 705 | GUICtrlSetData($Input_OS, $OS) 706 | GUICtrlSetData($Input_extra, "") 707 | EndIf 708 | If $show = 1 Then 709 | $image = IniRead($gamesfle, $name, "image", "") 710 | If $image <> "" Then 711 | GUICtrlSetData($Label_cover, "Please Wait") 712 | $image = StringTrimRight($image, 4) & "_196.jpg" 713 | FileDelete($imgfle) 714 | InetGet($image, $imgfle, 1, 0) 715 | If FileExists($imgfle) Then 716 | GUICtrlSetImage($Pic_cover, $imgfle) 717 | Else 718 | GUICtrlSetImage($Pic_cover, $blackjpg) 719 | EndIf 720 | Else 721 | GUICtrlSetImage($Pic_cover, $blackjpg) 722 | EndIf 723 | EndIf 724 | GUICtrlSetData($Label_cover, "") 725 | Case $msg = $Pic_cover 726 | ; Cover Image - Click For Large Preview 727 | If $imgfle <> "" Then 728 | $image = IniRead($gamesfle, $name, "image", "") 729 | If $image <> "" Then 730 | SplashTextOn("", "Please Wait!", 200, 120, Default, Default, 33) 731 | FileDelete($bigpic) 732 | InetGet($image, $bigpic, 1, 0) 733 | If FileExists($bigpic) Then 734 | GUICtrlSetState($Pic_cover, $GUI_DISABLE) 735 | SplashImageOn("", $bigpic, 900, 450, Default, Default, 17) 736 | Sleep(300) 737 | $mpos = MouseGetPos() 738 | $xpos = $mpos[0] 739 | $ypos = $mpos[1] 740 | Sleep(300) 741 | $dll = DllOpen("user32.dll") 742 | While 1 743 | $mpos = MouseGetPos() 744 | If $mpos[0] > $xpos + 40 Or $mpos[0] < $xpos - 40 Then ExitLoop 745 | If $mpos[1] > $ypos + 40 Or $mpos[1] < $ypos - 40 Then ExitLoop 746 | If _IsPressed("01", $dll) Then ExitLoop 747 | Sleep(300) 748 | WEnd 749 | DllClose($dll) 750 | SplashOff() 751 | GUICtrlSetState($Pic_cover, $GUI_ENABLE) 752 | Else 753 | SplashOff() 754 | EndIf 755 | EndIf 756 | EndIf 757 | Case Else 758 | ;;; 759 | EndSelect 760 | WEnd 761 | EndFunc ;=> MainGUI 762 | 763 | Func QueueGUI() 764 | Local $Button_add, $Button_edit, $Button_inf, $Button_movedown, $Button_moveup, $Button_quit, $Button_record 765 | Local $Button_remove, $Button_start, $Button_stop, $Checkbox_dos, $Checkbox_files, $Checkbox_image, $Checkbox_other 766 | Local $Checkbox_start, $Checkbox_stop, $Combo_shutdown, $Group_auto, $Group_done, $Group_download, $Group_info 767 | Local $Group_progress, $Group_shutdown, $Group_stop, $Group_waiting, $Input_download, $Input_lang, $Input_OS 768 | Local $List_done, $List_waiting, $Progress_bar 769 | ; 770 | Local $QueueGUI 771 | ; 772 | $QueueGUI = GuiCreate("QUEUE & Options", $width, $height, $left, $top, $style, $WS_EX_TOPMOST) 773 | GUISetBkColor(0xFFD5FF, $QueueGUI) 774 | ; CONTROLS 775 | $Group_download = GuiCtrlCreateGroup("Current Download", 10, 10, 370, 55) 776 | $Input_download = GUICtrlCreateInput("", 20, 30, 350, 20) 777 | GUICtrlSetTip($Input_download, "Game Name!") 778 | ; 779 | $Group_waiting = GuiCtrlCreateGroup("Games To Download", 10, 75, 370, 155) 780 | $List_waiting = GuiCtrlCreateList("", 20, 95, 350, 130) 781 | GUICtrlSetTip($List_waiting, "List of games waiting to download!") 782 | ; 783 | $Group_done = GuiCtrlCreateGroup("Downloads Finished", 10, 240, 370, 155) 784 | $List_done = GuiCtrlCreateList("", 20, 260, 350, 130) 785 | GUICtrlSetTip($List_done, "List of games that have finished downloading!") 786 | ; 787 | $Group_auto = GuiCtrlCreateGroup("Auto", 390, 10, 60, 55) 788 | $Checkbox_start = GUICtrlCreateCheckbox("Start", 400, 30, 40, 20) 789 | GUICtrlSetTip($Checkbox_start, "Automatically start downloading!") 790 | ; 791 | $Button_start = GuiCtrlCreateButton("START", 460, 15, 60, 30) 792 | GUICtrlSetFont($Button_start, 8, 600) 793 | GUICtrlSetTip($Button_start, "Start downloading!") 794 | ; 795 | $Button_stop = GuiCtrlCreateButton("STOP", 530, 15, 50, 30) 796 | GUICtrlSetFont($Button_stop, 8, 600) 797 | GUICtrlSetTip($Button_stop, "Stop downloading!") 798 | ; 799 | $Checkbox_dos = GUICtrlCreateCheckbox("Minimize DOS Console", 462, 49, 120, 20) 800 | GUICtrlSetFont($Checkbox_dos, 7, 400, 0, "Small Fonts") 801 | GUICtrlSetTip($Checkbox_dos, "Minimize the gogrepo.py DOS Console when it starts!") 802 | ; 803 | $Group_stop = GuiCtrlCreateGroup("Stop After", 390, 75, 122, 55) 804 | $Checkbox_stop = GUICtrlCreateCheckbox("Current Download", 400, 95, 102, 20) 805 | GUICtrlSetTip($Checkbox_stop, "Stop after current download!") 806 | ; 807 | $Button_add = GuiCtrlCreateButton("ADD" & @LF & "STOP", 522, 80, 58, 50, $BS_MULTILINE) 808 | GUICtrlSetFont($Button_add, 7, 600, 0, "Small Fonts") 809 | GUICtrlSetTip($Button_add, "Add a stop before selected entry!") 810 | ; 811 | $Button_moveup = GuiCtrlCreateButton("UP", 390, 140, 50, 50, $BS_ICON) 812 | GUICtrlSetTip($Button_moveup, "Move selected entry up the list!") 813 | ; 814 | $Button_movedown = GuiCtrlCreateButton("DOWN", 390, 200, 50, 50, $BS_ICON) 815 | GUICtrlSetTip($Button_movedown, "Move selected entry down the list!") 816 | ; 817 | $Button_remove = GuiCtrlCreateButton("REMOVE" & @LF & "Selected", 450, 140, 80, 50, $BS_MULTILINE) 818 | GUICtrlSetFont($Button_remove, 8, 600) 819 | GUICtrlSetTip($Button_remove, "Remove selected entry from the list!") 820 | ; 821 | $Button_edit = GuiCtrlCreateButton("EDIT" & @LF & "Selected", 450, 200, 80, 50, $BS_MULTILINE) 822 | GUICtrlSetFont($Button_edit, 8, 600) 823 | GUICtrlSetTip($Button_edit, "Edit download options for selected entry!") 824 | ; 825 | $Group_progress = GuiCtrlCreateGroup("", 540, 135, 40, 115) 826 | $Progress_bar = GUICtrlCreateProgress(550, 150, 20, 90, $PBS_SMOOTH + $PBS_VERTICAL) 827 | GUICtrlSetData($Progress_bar, 20) 828 | ; 829 | $Group_info = GuiCtrlCreateGroup("Download Entry Information", 390, 258, 190, 75) 830 | $Input_OS = GUICtrlCreateInput("", 400, 278, 90, 20) 831 | GUICtrlSetTip($Input_OS, "OS to download!") 832 | $Checkbox_files = GUICtrlCreateCheckbox("Game Files", 500, 278, 70, 20) 833 | GUICtrlSetTip($Checkbox_files, "Download game files!") 834 | $Checkbox_other = GUICtrlCreateCheckbox("Extras", 400, 303, 50, 20) 835 | GUICtrlSetTip($Checkbox_other, "Download extras files!") 836 | $Checkbox_image = GUICtrlCreateCheckbox("Cover", 460, 303, 45, 20) 837 | GUICtrlSetTip($Checkbox_image, "Download cover file!") 838 | $Input_lang = GUICtrlCreateInput("", 515, 303, 55, 20) 839 | GUICtrlSetTip($Input_lang, "Language for selected entry!") 840 | ; 841 | $Group_shutdown = GuiCtrlCreateGroup("Shutdown", $width - 198, $height - 65, 91, 55) 842 | $Combo_shutdown = GUICtrlCreateCombo("", $width - 188, $height - 45, 71, 21) 843 | GUICtrlSetTip($Combo_shutdown, "Shutdown options!") 844 | ; 845 | $Button_record = GuiCtrlCreateButton("Log", $width - 98, $height - 60, 30, 23, $BS_ICON) 846 | GUICtrlSetTip($Button_record, "Log Record!") 847 | ; 848 | $Button_inf = GuiCtrlCreateButton("Info", $width - 98, $height - 33, 30, 23, $BS_ICON) 849 | GUICtrlSetTip($Button_inf, "Program Information!") 850 | ; 851 | $Button_quit = GuiCtrlCreateButton("EXIT", $width - 60, $height - 60, 50, 50, $BS_ICON) 852 | GUICtrlSetTip($Button_quit, "Exit / Close / Quit the window!") 853 | ; 854 | ; SETTINGS 855 | GuiSetState(@SW_DISABLE, $QueueGUI) 856 | ; 857 | GUICtrlSetImage($Button_moveup, $shell, -247, 1) 858 | GUICtrlSetImage($Button_movedown, $shell, -248, 1) 859 | GUICtrlSetImage($Button_record, $shell, $icoT, 0) 860 | GUICtrlSetImage($Button_inf, $user, $icoI, 0) 861 | GUICtrlSetImage($Button_quit, $user, $icoX, 1) 862 | ; 863 | $shutopts = "none|Hibernate|Logoff|Restart|Shutdown" 864 | $shutdown = "none" 865 | GUICtrlSetData($Combo_shutdown, $shutopts, $shutdown) 866 | ; 867 | ;$downlist 868 | 869 | 870 | GuiSetState(@SW_ENABLE, $QueueGUI) 871 | While 1 872 | $msg = GuiGetMsg() 873 | Select 874 | Case $msg = $GUI_EVENT_CLOSE Or $msg = $Button_quit 875 | ; Exit / Close / Quit the window 876 | GUIDelete($QueueGUI) 877 | ExitLoop 878 | ;Case $msg = $GUI_EVENT_MINIMIZE 879 | ; ; Minimize the main window 880 | ; GuiSetState(@SW_MINIMIZE, $GOGRepoGUI) 881 | ;Case $msg = $GUI_EVENT_RESTORE 882 | ; ; Restoree the main window 883 | ; GuiSetState(@SW_RESTORE, $GOGRepoGUI) 884 | ; GuiSetState(@SW_RESTORE, $QueueGUI) 885 | Case Else 886 | ;;; 887 | EndSelect 888 | WEnd 889 | EndFunc ;=> QueueGUI 890 | 891 | Func SetupGUI() 892 | ; Script generated by GUIBuilder Prototype 0.9 893 | Local $Button_attach, $Button_close, $Button_cookie, $Button_install, $Combo_lang, $Combo_langs, $Group_lang, $Input_pass 894 | Local $Input_user, $Label_info, $Label_lang, $Label_langs, $Label_pass, $Label_user 895 | ; 896 | Local $combos, $langs, $long, $password, $SetupGUI, $username 897 | ; 898 | $SetupGUI = GuiCreate("Setup - Python & Cookie etc", 230, 410, Default, Default, $WS_OVERLAPPED + $WS_CAPTION + $WS_SYSMENU _ 899 | + $WS_VISIBLE + $WS_CLIPSIBLINGS, $WS_EX_TOPMOST, $GOGRepoGUI) 900 | GUISetBkColor($COLOR_YELLOW, $SetupGUI) 901 | ; 902 | ; CONTROLS 903 | $Label_info = GuiCtrlCreateLabel("Before using gogrepo.py to download your" _ 904 | & @LF & "games, update etc, you need a cookie file." & @LF _ 905 | & @LF & "You also need html5lib installed in Python." & @LF _ 906 | & @LF & "Both require an active web connection." & @LF _ 907 | & @LF & "Please supply your username (or email) and" _ 908 | & @LF & "password, to have it create a cookie file to" _ 909 | & @LF & "use with GOG." & @LF _ 910 | & @LF & "GOGRepo GUI does not store that detail.", 13, 10, 210, 155) 911 | ; 912 | $Button_install = GuiCtrlCreateButton("INSTALL html5lib && html2text", 10, 175, 210, 40) 913 | GUICtrlSetFont($Button_install, 9, 600) 914 | GUICtrlSetTip($Button_install, "Install html5lib & html2text in Python!") 915 | ; 916 | $Group_lang = GuiCtrlCreateGroup("Language(s) - Select One Option", 10, 223, 210, 55) 917 | $Label_lang = GuiCtrlCreateLabel("User", 20, 243, 38, 21, $SS_CENTER + $SS_CENTERIMAGE + $SS_SUNKEN) 918 | GUICtrlSetBkColor($Label_lang, $COLOR_BLUE) 919 | GUICtrlSetColor($Label_lang, $COLOR_WHITE) 920 | $Combo_lang = GUICtrlCreateCombo("", 58, 243, 34, 21) 921 | GUICtrlSetTip($Combo_lang, "User language!") 922 | $Label_langs = GuiCtrlCreateLabel("Multi", 97, 243, 38, 21, $SS_CENTER + $SS_CENTERIMAGE + $SS_SUNKEN) 923 | GUICtrlSetBkColor($Label_langs, $COLOR_BLUE) 924 | GUICtrlSetColor($Label_langs, $COLOR_WHITE) 925 | $Combo_langs = GUICtrlCreateCombo("", 135, 243, 50, 21) 926 | GUICtrlSetTip($Combo_langs, "Multiple languages!") 927 | $Button_attach = GuiCtrlCreateButton("+", 190, 243, 20, 20) 928 | GUICtrlSetFont($Button_attach, 9, 600) 929 | GUICtrlSetTip($Button_attach, "Add a single language or combination!") 930 | ; 931 | $Label_user = GuiCtrlCreateLabel("User or Email", 10, 290, 75, 20, $SS_CENTER + $SS_CENTERIMAGE + $SS_SUNKEN) 932 | GUICtrlSetBkColor($Label_user, $COLOR_BLACK) 933 | GUICtrlSetColor($Label_user, $COLOR_WHITE) 934 | $Input_user = GuiCtrlCreateInput("", 85, 290, 135, 20) 935 | GUICtrlSetTip($Input_user, "Username or Email to access your GOG game library!") 936 | ; 937 | $Label_pass = GuiCtrlCreateLabel("Password", 10, 320, 60, 20, $SS_CENTER + $SS_CENTERIMAGE + $SS_SUNKEN) 938 | GUICtrlSetBkColor($Label_pass, $COLOR_BLACK) 939 | GUICtrlSetColor($Label_pass, $COLOR_WHITE) 940 | $Input_pass = GuiCtrlCreateInput("", 70, 320, 150, 20) 941 | GUICtrlSetTip($Input_pass, "Password to access your GOG game library!") 942 | ; 943 | $Button_cookie = GuiCtrlCreateButton("CREATE COOKIE", 10, 350, 140, 50) 944 | GUICtrlSetFont($Button_cookie, 9, 600) 945 | GUICtrlSetTip($Button_cookie, "Create or Update the cookie file!") 946 | ; 947 | $Button_close = GuiCtrlCreateButton("EXIT", 160, 350, 60, 50, $BS_ICON) 948 | GUICtrlSetTip($Button_close, "Exit / Close / Quit the window!") 949 | ; 950 | ; SETTINGS 951 | GUICtrlSetImage($Button_close, $user, $icoX, 1) 952 | ; 953 | $langs = IniRead($inifle, "Download Languages", "singles", "") 954 | If $langs = "" Then 955 | $langs = "||de|en|fr" 956 | IniWrite($inifle, "Download Languages", "singles", $langs) 957 | EndIf 958 | $combos = IniRead($inifle, "Download Languages", "combined", "") 959 | If $combos = "" Then 960 | $combos = "||de en|de fr|fr en" 961 | IniWrite($inifle, "Download Languages", "combined", $combos) 962 | EndIf 963 | $long = StringLen($lang) 964 | If $long = 2 Then 965 | GUICtrlSetData($Combo_lang, $langs, $lang) 966 | GUICtrlSetData($Combo_langs, $combos, "") 967 | Else 968 | GUICtrlSetData($Combo_lang, $langs, "") 969 | GUICtrlSetData($Combo_langs, $combos, $lang) 970 | EndIf 971 | 972 | 973 | GuiSetState() 974 | While 1 975 | $msg = GuiGetMsg() 976 | Select 977 | Case $msg = $GUI_EVENT_CLOSE Or $msg = $Button_close 978 | ; Exit / Close / Quit the window 979 | GUIDelete($SetupGUI) 980 | ExitLoop 981 | Case $msg = $Button_install 982 | ; Install html5lib & html2text in Python 983 | GuiSetState(@SW_DISABLE, $SetupGUI) 984 | $pid = RunWait(@ComSpec & ' /k pip install html5lib html2text', "") 985 | GuiSetState(@SW_ENABLE, $SetupGUI) 986 | Case $msg = $Button_cookie 987 | ; Create or Update the cookie file 988 | If FileExists($gogrepo) Then 989 | If FileExists($cookies) Then 990 | $ans = MsgBox(262177, "Update Query", _ 991 | "An existing cookie file was found." & @LF & @LF & _ 992 | "Do you want to update (overwrite)?", 0, $SetupGUI) 993 | Else 994 | $ans = 1 995 | EndIf 996 | If $ans = 1 Then 997 | $username = GUICtrlRead($Input_user) 998 | If $username <> "" Then 999 | $password = GUICtrlRead($Input_pass) 1000 | If $password <> "" Then 1001 | GuiSetState(@SW_DISABLE, $SetupGUI) 1002 | $pid = RunWait(@ComSpec & ' /k gogrepo.py login ' & $username & ' ' & $password, @ScriptDir) 1003 | $username = "" 1004 | $password = "" 1005 | GuiSetState(@SW_ENABLE, $SetupGUI) 1006 | Else 1007 | MsgBox(262192, "Cookie Error", "Password field is blank!", 0, $SetupGUI) 1008 | EndIf 1009 | Else 1010 | MsgBox(262192, "Cookie Error", "User or Email field is blank!", 0, $SetupGUI) 1011 | EndIf 1012 | EndIf 1013 | Else 1014 | MsgBox(262192, "Program Error", "Required gogrepo.py not found!", 0, $SetupGUI) 1015 | EndIf 1016 | Case Else 1017 | ;;; 1018 | EndSelect 1019 | WEnd 1020 | EndFunc ;=> SetupGUI 1021 | 1022 | 1023 | Func EnableDisableControls($state) 1024 | GUICtrlSetState($List_games, $state) 1025 | GUICtrlSetState($Input_name, $state) 1026 | GUICtrlSetState($Input_title, $state) 1027 | ;GUICtrlSetState($Input_OS, $state) 1028 | ;GUICtrlSetState($Input_extra, $state) 1029 | GUICtrlSetState($Button_more, $state) 1030 | ; 1031 | GUICtrlSetState($Pic_cover, $state) 1032 | GUICtrlSetState($Button_pic, $state) 1033 | GUICtrlSetState($Checkbox_show, $state) 1034 | ; 1035 | GUICtrlSetState($Button_down, $state) 1036 | GUICtrlSetState($Checkbox_verify, $state) 1037 | GUICtrlSetState($Checkbox_all, $state) 1038 | GUICtrlSetState($Button_queue, $state) 1039 | ; 1040 | GUICtrlSetState($Combo_OS, $state) 1041 | GUICtrlSetState($Checkbox_extra, $state) 1042 | GUICtrlSetState($Checkbox_test, $state) 1043 | GUICtrlSetState($Checkbox_cover, $state) 1044 | GUICtrlSetState($Checkbox_game, $state) 1045 | ;GUICtrlSetState($Input_langs, $state) 1046 | ; 1047 | GUICtrlSetState($Button_setup, $state) 1048 | GUICtrlSetState($Button_update, $state) 1049 | GUICtrlSetState($Checkbox_every, $state) 1050 | ; 1051 | GUICtrlSetState($Input_dest, $state) 1052 | GUICtrlSetState($Button_dest, $state) 1053 | GUICtrlSetState($Checkbox_alpha, $state) 1054 | GUICtrlSetState($Button_fold, $state) 1055 | ; 1056 | GUICtrlSetState($Button_log, $state) 1057 | GUICtrlSetState($Button_info, $state) 1058 | GUICtrlSetState($Button_exit, $state) 1059 | EndFunc ;=> EnableDisableControls 1060 | 1061 | Func FillTheGamesList() 1062 | If FileExists($titlist) Then 1063 | $res = _FileReadToArray($titlist, $array) 1064 | If $res = 1 Then 1065 | $games = 0 1066 | For $a = 1 To $array[0] 1067 | $line = $array[$a] 1068 | If $line <> "" Then 1069 | $line = StringSplit($line, " | ", 1) 1070 | $name = $line[1] 1071 | GUICtrlSetData($List_games, $name) 1072 | $games = $games + 1 1073 | EndIf 1074 | Next 1075 | If $games > 0 Then GUICtrlSetData($Group_games, "Games (" & $games & ")") 1076 | EndIf 1077 | EndIf 1078 | EndFunc ;=> FillTheGamesList 1079 | 1080 | Func GetWindowPosition() 1081 | $winpos = WinGetPos($GOGRepoGUI, "") 1082 | $left = $winpos[0] 1083 | If $left < 0 Then 1084 | $left = 2 1085 | ElseIf $left > @DesktopWidth - $width Then 1086 | $left = @DesktopWidth - $width - 25 1087 | EndIf 1088 | IniWrite($inifle, "Program Window", "left", $left) 1089 | $top = $winpos[1] 1090 | If $top < 0 Then 1091 | $top = 2 1092 | ElseIf $top > @DesktopHeight - $height Then 1093 | $top = @DesktopHeight - $height - 30 1094 | EndIf 1095 | IniWrite($inifle, "Program Window", "top", $top) 1096 | EndFunc ;=> GetWindowPosition 1097 | 1098 | Func ParseTheManifest() 1099 | If FileExists($manifest) Then 1100 | SplashTextOn("", "Please Wait!", 200, 120, Default, Default, 33) 1101 | $file = FileOpen($titlist, 2) 1102 | $date = _NowCalc() 1103 | $date = StringReplace($date, "/", "-") 1104 | FileWriteLine($file, "List Created on " & $date) 1105 | $open = FileOpen($manifest, 0) 1106 | $read = FileRead($open) 1107 | FileClose($open) 1108 | $split = "{'bg_url':" 1109 | $chunk = StringSplit($read, $split, 1) 1110 | $chunks = $chunk[0] 1111 | If $chunks > 1 Then 1112 | $textdump = "" 1113 | For $c = 2 To $chunks 1114 | $game = $chunk[$c] 1115 | ;$lines = StringSplit($game, @CRLF, 1) 1116 | $segment = StringSplit($game, "'title': '", 1) 1117 | If $segment[0] = 2 Then 1118 | $title = $segment[2] 1119 | $segment = $segment[1] 1120 | If $c = $chunks Then 1121 | $title = StringSplit($title, "'}]", 1) 1122 | Else 1123 | $title = StringSplit($title, "'},", 1) 1124 | EndIf 1125 | $title = $title[1] 1126 | $extras = "" 1127 | $image = "" 1128 | $name = "" 1129 | $OS = "" 1130 | $check = StringSplit($segment, "'os_type': 'linux'", 1) 1131 | If $check[0] > 1 Then $OS = "Linux" 1132 | $check = StringSplit($segment, "'os_type': 'windows'", 1) 1133 | If $check[0] > 1 Then 1134 | If $OS = "" Then 1135 | $OS = "(Windows" 1136 | Else 1137 | $OS = "(Windows + " & $OS 1138 | EndIf 1139 | Else 1140 | If $OS = "" Then 1141 | $OS = " " 1142 | Else 1143 | $OS = "(" & $OS 1144 | EndIf 1145 | EndIf 1146 | $check = StringSplit($segment, "'extras': [],", 1) 1147 | If $check[0] > 1 Then 1148 | If $OS = " " Then 1149 | $OS = "" 1150 | ElseIf $OS <> "" Then 1151 | $OS = $OS & ")" 1152 | EndIf 1153 | Else 1154 | If $OS = "" Or $OS = " " Then 1155 | $OS = "(Extras)" 1156 | Else 1157 | $OS = $OS & " + Extras)" 1158 | EndIf 1159 | EndIf 1160 | If $OS <> "" Then $extras = " " & $OS 1161 | $check = StringSplit($segment, "'image_url': '", 1) 1162 | If $check[0] > 1 Then 1163 | $image = $check[2] 1164 | $check = StringSplit($image, "',", 1) 1165 | $image = $check[1] 1166 | If $image <> "" Then 1167 | $image = " - https:" & $image & ".jpg" 1168 | EndIf 1169 | EndIf 1170 | $check = StringSplit($segment, "'long_title': '", 1) 1171 | If $check[0] > 1 Then 1172 | $name = $check[2] 1173 | $check = StringSplit($name, "',", 1) 1174 | $name = $check[1] 1175 | $name = StringReplace($name, Chr(150), "-") 1176 | $name = StringReplace($name, Chr(151), "-") 1177 | $name = StringReplace($name, Chr(175), "-") 1178 | $name = StringReplace($name, "–", "-") 1179 | Else 1180 | ; Cover rarer scenario of double quotes instead of single ones. 1181 | $check = StringSplit($segment, "'long_title': ", 1) 1182 | If $check[0] > 1 Then 1183 | $name = $check[2] 1184 | $check = StringSplit($name, '",', 1) 1185 | $name = StringReplace($check[1], '"', '') 1186 | $name = StringReplace($name, Chr(150), "-") 1187 | $name = StringReplace($name, Chr(151), "-") 1188 | $name = StringReplace($name, Chr(175), "-") 1189 | $name = StringReplace($name, "–", "-") 1190 | EndIf 1191 | EndIf 1192 | FileWriteLine($file, $name & " | " & $title & $extras & $image) 1193 | ;IniWrite($gamesfle, $title, "title", $title) 1194 | ;IniWrite($gamesfle, $title, "name", $name) 1195 | ;IniWrite($gamesfle, $title, "osextra", $OS) 1196 | ;IniWrite($gamesfle, $title, "image", $image) 1197 | $text = "[" & $name & "]" & @CRLF 1198 | $text = $text & "title=" & $title & @CRLF 1199 | $text = $text & "name=" & $name & @CRLF 1200 | $OS = StringReplace($OS, "(", "") 1201 | $OS = StringReplace($OS, ")", "") 1202 | $text = $text & "osextra=" & $OS & @CRLF 1203 | $image = StringTrimLeft($image, 3) 1204 | $text = $text & "image=" & $image & @CRLF 1205 | If $textdump = "" Then 1206 | $textdump = $text 1207 | Else 1208 | $textdump = $textdump & $text 1209 | EndIf 1210 | EndIf 1211 | ;If $c = 15 Then ExitLoop 1212 | Next 1213 | If $textdump <> "" Then 1214 | $open = FileOpen($gamesfle, 2) 1215 | FileWriteLine($open, $textdump) 1216 | FileClose($open) 1217 | EndIf 1218 | EndIf 1219 | $date = _NowCalc() 1220 | $date = StringReplace($date, "/", "-") 1221 | FileWriteLine($file, "List Completed on " & $date) 1222 | FileClose($file) 1223 | $read = "" 1224 | $textdump = "" 1225 | SplashOff() 1226 | EndIf 1227 | EndFunc ;=> ParseTheManifest 1228 | 1229 | -------------------------------------------------------------------------------- /Older_Versions/2020-07-21/Reporun.au3: -------------------------------------------------------------------------------- 1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2 | ;; ;; 3 | ;; AutoIt Version: 3.3.14.2 ;; 4 | ;; ;; 5 | ;; Template AutoIt script. ;; 6 | ;; ;; 7 | ;; AUTHOR: Timboli ;; 8 | ;; ;; 9 | ;; SCRIPT FUNCTION: A progress and feedback GUI frontend for gogrepo.py ;; 10 | ;; ;; 11 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 12 | 13 | ; FUNCTIONS 14 | ; CloseEvent(), KeepWidth() 15 | 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | 25 | _Singleton("gog-repo-progress-timboli") 26 | 27 | Global $Edit_console, $Label_files, $Label_percent, $Label_size, $Label_status, $Label_title, $Progress_bar 28 | ; 29 | Global $cnt, $complete, $count, $done, $downlist, $download, $err, $exit, $extras, $file, $files, $gamefold 30 | Global $gogrepo, $inifle, $num, $out, $outfle, $output, $params, $percent, $pid, $process, $progress 31 | Global $ProgressGUI, $results, $ret, $size, $status, $style, $titfold, $title, $width 32 | 33 | $downlist = @ScriptDir & "\Downloads.ini" 34 | $gogrepo = @ScriptDir & "\gogrepo.py" 35 | $inifle = @ScriptDir & "\Settings.ini" 36 | $outfle = @ScriptDir & "\Output.txt" 37 | 38 | If $Cmdline[0] = 0 Then 39 | $status = "" 40 | Else 41 | $status = $Cmdline[1] 42 | If $status = "Download" Then 43 | $status = "Downloading" 44 | ElseIf $status = "Verify" Then 45 | $status = "Verifying" 46 | Else 47 | $status = "" 48 | EndIf 49 | EndIf 50 | 51 | If FileExists($gogrepo) Then 52 | $width = 600 53 | $style = $WS_OVERLAPPED + $WS_CAPTION + $WS_SYSMENU + $WS_CLIPSIBLINGS + $WS_MINIMIZEBOX + $WS_SIZEBOX 54 | $ProgressGUI = GuiCreate("Floating Progress", $width, 160, Default, Default, $style, $WS_EX_TOPMOST) 55 | GUISetBkColor($COLOR_SKYBLUE, $ProgressGUI) 56 | ; CONTROLS 57 | $Label_status = GUICtrlCreateLabel($status, 10, 10, 80, 20, $SS_CENTER + $SS_CENTERIMAGE + $SS_SUNKEN) 58 | GUICtrlSetBkColor($Label_status, $COLOR_BLUE) 59 | GUICtrlSetColor($Label_status, $COLOR_WHITE) 60 | GUICtrlSetFont($Label_status, 7, 600, 0, "Small Fonts") 61 | GUICtrlSetResizing($Label_status, $GUI_DOCKALL) 62 | $Label_title = GUICtrlCreateLabel("", 90, 10, 360, 20, $SS_CENTER + $SS_CENTERIMAGE + $SS_SUNKEN) 63 | GUICtrlSetBkColor($Label_title, $COLOR_GRAY) 64 | GUICtrlSetColor($Label_title, $COLOR_RED) 65 | GUICtrlSetFont($Label_title, 9, 600) 66 | GUICtrlSetResizing($Label_title, $GUI_DOCKALL) 67 | $Label_files = GUICtrlCreateLabel("", 455, 10, 60, 20, $SS_CENTER + $SS_CENTERIMAGE + $SS_SUNKEN) 68 | GUICtrlSetBkColor($Label_files, 0xFFB366) 69 | GUICtrlSetColor($Label_files, $COLOR_BLUE) 70 | GUICtrlSetFont($Label_files, 7, 600, 0, "Small Fonts") 71 | GUICtrlSetResizing($Label_files, $GUI_DOCKALL) 72 | $Label_size = GUICtrlCreateLabel("", 520, 10, 70, 20, $SS_CENTER + $SS_CENTERIMAGE + $SS_SUNKEN) 73 | GUICtrlSetBkColor($Label_size, 0xF0F000) 74 | GUICtrlSetColor($Label_size, $COLOR_GREEN) 75 | GUICtrlSetFont($Label_size, 7, 600, 0, "Small Fonts") 76 | GUICtrlSetResizing($Label_size, $GUI_DOCKALL) 77 | $Edit_console = GUICtrlCreateEdit("", 10, 40, 580, 80, $ES_MULTILINE + $ES_READONLY) ; $ES_AUTOVSCROLL + $WS_VSCROLL + + $ES_WANTRETURN 78 | GUICtrlSetBkColor($Edit_console, $COLOR_BLACK) 79 | GUICtrlSetColor($Edit_console, $COLOR_WHITE) 80 | GUICtrlSetFont($Edit_console, 7, 600, 0, "Small Fonts") 81 | GUICtrlSetResizing($Edit_console, $GUI_DOCKAUTO + $GUI_DOCKTOP + $GUI_DOCKBOTTOM + $GUI_DOCKWIDTH) ; + $GUI_DOCKLEFT + $GUI_DOCKRIGHT 82 | ; 83 | $Progress_bar = GUICtrlCreateProgress(10, 130, 580, 20, $PBS_SMOOTH) 84 | GUICtrlSetResizing($Progress_bar, $GUI_DOCKBOTTOM + $GUI_DOCKSIZE) 85 | $Label_percent = GUICtrlCreateLabel("", 20, 131, 570, 18, $SS_CENTER + $SS_CENTERIMAGE) 86 | GUICtrlSetBkColor($Label_percent, $GUI_BKCOLOR_TRANSPARENT) 87 | GUICtrlSetColor($Label_percent, $COLOR_BLACK) 88 | GUICtrlSetFont($Label_percent, 9, 600) 89 | GUICtrlSetResizing($Label_percent, $GUI_DOCKBOTTOM + $GUI_DOCKSIZE) 90 | ; 91 | ; SETTINGS 92 | ;$title = "" 93 | ;$title = "memoranda" 94 | ;$gamefold = "G:\GOG\GoG" 95 | ;If $title <> "" Then 96 | ; $titfold = $gamefold & "\" & $title 97 | ; If FileExists($titfold) Then DirRemove($titfold, 1) 98 | ;EndIf 99 | ;$files = 1 100 | ;$extras = 1 101 | $title = IniRead($inifle, "Current Download", "title", "") 102 | GUICtrlSetData($Label_title, $title) 103 | $gamefold = IniRead($inifle, "Current Download", "destination", "") 104 | $files = IniRead($inifle, "Current Download", "files", "") 105 | $extras = IniRead($inifle, "Current Download", "extras", "") 106 | $pid = 0 107 | $exit = "" 108 | ; 109 | ; Example 110 | ;~ GUICtrlSetData($Label_title, "memoranda") 111 | ;~ GUICtrlSetData($Label_files, "1 of 7") 112 | ;~ GUICtrlSetData($Label_size, "735.24MB") 113 | ;~ $text = "21:23:38 | 577.8MB 5.0MB/s 1x memoranda/setup_memoranda_gog-4_(11000).exe" 114 | ;~ $text = $text & @CRLF & "21:23:38 | 0.56GB remaining" 115 | ;~ GUICtrlSetData($Edit_console, "setup_memoranda_gog-4_(11000).exe" & @CRLF & $text) 116 | ;~ GUICtrlSetData($Label_percent, "33%") 117 | ;~ GUICtrlSetData($Progress_bar, 33) 118 | ; 119 | Opt("GUIOnEventMode", 1) 120 | ; 121 | GUISetOnEvent($GUI_EVENT_CLOSE, "CloseEvent") 122 | GUISetOnEvent($GUI_EVENT_RESIZED, "KeepWidth") 123 | 124 | GuiSetState() 125 | While 1 126 | ; Start downloading and monitor 127 | If $title <> "" Then 128 | If $gamefold <> "" Then 129 | If $status = "Downloading" Then 130 | $file = FileOpen($outfle, 2) 131 | GUICtrlSetData($Edit_console, "Starting ....") 132 | Local $params = " -skipextras -skipgames" 133 | If $files = 1 Then $params = StringReplace($params, " -skipgames", "") 134 | If $extras = 1 Then $params = StringReplace($params, " -skipextras", "") 135 | $ret = Run(@ComSpec & ' /c gogrepo.py download' & $params & ' -id ' & $title & ' "' & $gamefold & '"', @ScriptDir, @SW_HIDE, $STDERR_MERGED) 136 | $pid = $ret 137 | IniWrite($inifle, "Current Download", "pid", $pid) 138 | $complete = "" 139 | $count = 0 140 | $download = "" 141 | $num = 0 142 | $results = "" 143 | $size = 0 144 | $title = "" 145 | While 1 146 | $out = StdoutRead($ret) 147 | If @error Then 148 | ; Exit the loop if the process closes or StdoutRead returns an error. 149 | ; NOTE - If process closes without error, then two Exitloops should occur, without getting an error $val. 150 | While 1 151 | $out = StderrRead($ret) 152 | If @error Then 153 | ; Exit the loop if the process closes or StderrRead returns an error. 154 | ExitLoop 155 | EndIf 156 | MsgBox($MB_SYSTEMMODAL, "Stderr Read:", $out) 157 | $err = 1 158 | WEnd 159 | ;If $out <> "" Then $results &= $out 160 | ;If $out <> "" Then FileWriteLine($file, "LAST = " & $out) 161 | ExitLoop 162 | Else 163 | $out = StringStripWS($out, 3) 164 | If $out <> "" Then 165 | FileWriteLine($file, $out) 166 | $results &= @CRLF & $out 167 | $results = StringStripWS($results, 1) 168 | If $size = 0 Then 169 | GUICtrlSetData($Progress_bar, 0) 170 | If StringInStr($out, " 1x ") > 0 Then 171 | $size = StringSplit($out, " 1x ", 1) 172 | $download = $size[2] 173 | $download = StringSplit($download, "/", 1) 174 | $download = $download[2] 175 | If StringInStr($download, " remaining") > 0 Then 176 | $download = StringSplit($download, " remaining", 1) 177 | $download = $download[1] 178 | $download = StringSplit($download, @CRLF, 1) 179 | $download = $download[1] 180 | EndIf 181 | $size = $size[1] 182 | $size = StringSplit($size, "|", 1) 183 | $size = $size[2] 184 | $size = StringStripWS($size, 1) 185 | $size = StringSplit($size, " ", 1) 186 | $size = $size[1] 187 | GUICtrlSetData($Label_size, $size) 188 | $size = StringRegExpReplace($size, "\D", "") 189 | If $count = 0 Then 190 | $count = StringSplit($results, " download ", 1) 191 | $count = $count[0] - 1 192 | EndIf 193 | $num = $num + 1 194 | GUICtrlSetData($Label_files, $num & " of " & $count) 195 | EndIf 196 | Else 197 | If StringInStr($out, " 1x ") > 0 Then 198 | $done = StringSplit($out, " 1x ", 1) 199 | $done = $done[1] 200 | $done = StringSplit($done, "|", 1) 201 | $done = $done[2] 202 | $done = StringStripWS($done, 1) 203 | $done = StringSplit($done, " ", 1) 204 | $done = $done[1] 205 | $done = StringRegExpReplace($done, "\D", "") 206 | If $percent <> "100%" Then 207 | $progress = $size - $done 208 | $percent = ($progress / $size) * 100 209 | GUICtrlSetData($Progress_bar, $percent) 210 | $percent = Floor($percent) & "%" 211 | If $done = "0.0" Then 212 | $percent = "100%" 213 | EndIf 214 | If $percent = "100%" Then $complete = 1 215 | GUICtrlSetData($Label_percent, $percent) 216 | GUICtrlSetTip($Progress_bar, $percent) 217 | EndIf 218 | ElseIf $complete = 1 Then 219 | GUICtrlSetData($Progress_bar, 100) 220 | GUICtrlSetData($Label_percent, "100%") 221 | Sleep(150) 222 | $complete = "" 223 | $size = 0 224 | $results = "" 225 | $percent = 0 226 | GUICtrlSetData($Edit_console, "") 227 | EndIf 228 | EndIf 229 | $results = StringReplace($results, @CRLF, @CR) 230 | $results = StringReplace($results, @LF, @CR) 231 | $results = StringReplace($results, @CR, @CRLF) 232 | If $size = 0 And $num < 1 Then 233 | If StringInStr($results, " remaining") < 1 Then 234 | $output = $results 235 | Else 236 | $output = "" 237 | EndIf 238 | Else 239 | $output = StringSplit($results, @CRLF, 1) 240 | $cnt = $output[0] 241 | If $cnt > 1 Then 242 | $first = $output[$cnt - 1] 243 | $second = $output[$cnt] 244 | $output = "" 245 | If $download <> "" Then 246 | $output = $download & @CRLF 247 | EndIf 248 | If $first <> "" Then 249 | If StringInStr($first, " remaining") < 1 Then 250 | $output = $output & $first & @CRLF 251 | EndIf 252 | EndIf 253 | If $second <> "" Then 254 | If StringInStr($second, " remaining") > 0 Then 255 | $first = StringSplit($second, " remaining", 1) 256 | If $first[0] > 2 Then 257 | $second = $first[2] & " remaining" 258 | $second = StringStripWS($second, 3) 259 | EndIf 260 | EndIf 261 | $output = $output & $second 262 | EndIf 263 | Else 264 | If StringInStr($results, " remaining") < 1 Then 265 | $output = $results 266 | Else 267 | $output = "" 268 | EndIf 269 | EndIf 270 | EndIf 271 | GUICtrlSetData($Edit_console, "") 272 | GUICtrlSetData($Edit_console, "") 273 | GUICtrlSetData($Edit_console, $output) 274 | If StringInStr($output, "total time:") > 0 Then 275 | Sleep(2000) 276 | EndIf 277 | EndIf 278 | EndIf 279 | If $exit = 1 Then 280 | If $pid <> 0 Then 281 | If ProcessExists($pid) Then ProcessClose($pid) 282 | ; Need to be careful doing these. Perhaps check for number of instances. 283 | If ProcessExists("py.exe") Then 284 | $process = ProcessList("py.exe") 285 | If $process[0] = 1 Then ProcessClose("py.exe") 286 | EndIf 287 | If ProcessExists("Python.exe") Then 288 | $process = ProcessList("Python.exe") 289 | If $process[0] = 1 Then ProcessClose("Python.exe") 290 | EndIf 291 | EndIf 292 | GUIDelete($ProgressGUI) 293 | ExitLoop 2 294 | EndIf 295 | WEnd 296 | FileWriteLine($file, $size) 297 | FileClose($file) 298 | ExitLoop 299 | ElseIf $status = "Verifying" Then 300 | EndIf 301 | EndIf 302 | EndIf 303 | Sleep(10) 304 | If $exit = 1 Then 305 | GUIDelete($ProgressGUI) 306 | ExitLoop 307 | EndIf 308 | WEnd 309 | Else 310 | MsgBox(262192, "Program Error", "The 'gogrepo.py' file could not be found!", 0) 311 | EndIf 312 | 313 | Exit 314 | 315 | Func CloseEvent() 316 | ; Exit / Close / Quit the program 317 | If $status = "" Then 318 | $exit = 1 319 | Else 320 | MsgBox(262192, "Close Error", "Use the QUEUE window STOP button!", 3, $ProgressGUI) 321 | EndIf 322 | EndFunc ;=> CloseEvent 323 | 324 | Func KeepWidth() 325 | ; Keep the same window width 326 | Local $height, $winpos 327 | $winpos = WinGetPos($ProgressGUI, "") 328 | $height = $winpos[3] 329 | If $height < 200 Then $height = 200 330 | WinMove($ProgressGUI, "", $winpos[0], $winpos[1], $width + 15, $height) 331 | EndFunc ;=> KeepWidth 332 | -------------------------------------------------------------------------------- /Older_Versions/2020-07-21/Unrelated/Because I can.txt: -------------------------------------------------------------------------------- 1 | I have this opportunity to set the record straight, and are doing it in this manner, to lessen the off-topic nature of it. It is a response to claims about me etc. 2 | -------------------------------------------------------------------------------- /Older_Versions/2020-07-21/Unrelated/Private_Communication/In response.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/Older_Versions/2020-07-21/Unrelated/Private_Communication/In response.png -------------------------------------------------------------------------------- /Older_Versions/2020-07-31/Reporun.au3: -------------------------------------------------------------------------------- 1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2 | ;; ;; 3 | ;; AutoIt Version: 3.3.14.2 ;; 4 | ;; ;; 5 | ;; Template AutoIt script. ;; 6 | ;; ;; 7 | ;; AUTHOR: Timboli ;; 8 | ;; ;; 9 | ;; SCRIPT FUNCTION: A progress and feedback GUI frontend for gogrepo.py ;; 10 | ;; ;; 11 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 12 | 13 | ; FUNCTIONS 14 | ; CloseEvent(), KeepWidth() 15 | 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | 25 | _Singleton("gog-repo-progress-timboli") 26 | 27 | Global $Edit_console, $Label_files, $Label_percent, $Label_size, $Label_status, $Label_title, $Progress_bar 28 | ; 29 | Global $cnt, $complete, $count, $done, $downlist, $download, $err, $exit, $extras, $file, $files, $gamefold 30 | Global $gogrepo, $height, $inifle, $left, $minimize, $num, $out, $outfle, $output, $params, $percent, $pid 31 | Global $process, $progress, $ProgressGUI, $results, $ret, $size, $status, $style, $titfold, $title, $top 32 | Global $width, $winpos 33 | 34 | $downlist = @ScriptDir & "\Downloads.ini" 35 | $gogrepo = @ScriptDir & "\gogrepo.py" 36 | $inifle = @ScriptDir & "\Settings.ini" 37 | $outfle = @ScriptDir & "\Output.txt" 38 | 39 | If $Cmdline[0] = 0 Then 40 | $status = "" 41 | Else 42 | $status = $Cmdline[1] 43 | If $status = "Download" Then 44 | $status = "Downloading" 45 | ElseIf $status = "Verify" Then 46 | $status = "Verifying" 47 | Else 48 | $status = "" 49 | EndIf 50 | EndIf 51 | 52 | If FileExists($gogrepo) Then 53 | $minimize = IniRead($inifle, "Progress Bar Or Console", "minimize", "") 54 | $height = 160 55 | $width = 600 56 | $style = $WS_OVERLAPPED + $WS_CAPTION + $WS_SYSMENU + $WS_CLIPSIBLINGS + $WS_MINIMIZEBOX + $WS_SIZEBOX 57 | If $minimize = 1 Then $style = $style + $WS_MINIMIZE 58 | $left = IniRead($inifle, "Progress Window", "left", 2) 59 | $top = IniRead($inifle, "Progress Window", "top", @DesktopHeight - $height - 100) 60 | $ProgressGUI = GuiCreate("Floating Progress", $width, 160, $left, $top, $style, $WS_EX_TOPMOST) 61 | GUISetBkColor($COLOR_SKYBLUE, $ProgressGUI) 62 | ; CONTROLS 63 | $Label_status = GUICtrlCreateLabel($status, 10, 10, 80, 20, $SS_CENTER + $SS_CENTERIMAGE + $SS_SUNKEN) 64 | GUICtrlSetBkColor($Label_status, $COLOR_BLUE) 65 | GUICtrlSetColor($Label_status, $COLOR_WHITE) 66 | GUICtrlSetFont($Label_status, 7, 600, 0, "Small Fonts") 67 | GUICtrlSetResizing($Label_status, $GUI_DOCKALL) 68 | $Label_title = GUICtrlCreateLabel("", 90, 10, 360, 20, $SS_CENTER + $SS_CENTERIMAGE + $SS_SUNKEN) 69 | GUICtrlSetBkColor($Label_title, $COLOR_GRAY) 70 | GUICtrlSetColor($Label_title, $COLOR_RED) 71 | GUICtrlSetFont($Label_title, 9, 600) 72 | GUICtrlSetResizing($Label_title, $GUI_DOCKALL) 73 | $Label_files = GUICtrlCreateLabel("", 455, 10, 60, 20, $SS_CENTER + $SS_CENTERIMAGE + $SS_SUNKEN) 74 | GUICtrlSetBkColor($Label_files, 0xFFB366) 75 | GUICtrlSetColor($Label_files, $COLOR_BLUE) 76 | GUICtrlSetFont($Label_files, 7, 600, 0, "Small Fonts") 77 | GUICtrlSetResizing($Label_files, $GUI_DOCKALL) 78 | $Label_size = GUICtrlCreateLabel("", 520, 10, 70, 20, $SS_CENTER + $SS_CENTERIMAGE + $SS_SUNKEN) 79 | GUICtrlSetBkColor($Label_size, 0xF0F000) 80 | GUICtrlSetColor($Label_size, $COLOR_GREEN) 81 | GUICtrlSetFont($Label_size, 7, 600, 0, "Small Fonts") 82 | GUICtrlSetResizing($Label_size, $GUI_DOCKALL) 83 | $Edit_console = GUICtrlCreateEdit("", 10, 40, 580, 80, $ES_MULTILINE + $ES_READONLY) ; $ES_AUTOVSCROLL + $WS_VSCROLL + + $ES_WANTRETURN 84 | GUICtrlSetBkColor($Edit_console, $COLOR_BLACK) 85 | GUICtrlSetColor($Edit_console, $COLOR_WHITE) 86 | GUICtrlSetFont($Edit_console, 7, 600, 0, "Small Fonts") 87 | GUICtrlSetResizing($Edit_console, $GUI_DOCKAUTO + $GUI_DOCKTOP + $GUI_DOCKBOTTOM + $GUI_DOCKWIDTH) ; + $GUI_DOCKLEFT + $GUI_DOCKRIGHT 88 | ; 89 | $Progress_bar = GUICtrlCreateProgress(10, 130, 580, 20, $PBS_SMOOTH) 90 | GUICtrlSetResizing($Progress_bar, $GUI_DOCKBOTTOM + $GUI_DOCKSIZE) 91 | $Label_percent = GUICtrlCreateLabel("", 20, 131, 570, 18, $SS_CENTER + $SS_CENTERIMAGE) 92 | GUICtrlSetBkColor($Label_percent, $GUI_BKCOLOR_TRANSPARENT) 93 | GUICtrlSetColor($Label_percent, $COLOR_BLACK) 94 | GUICtrlSetFont($Label_percent, 9, 600) 95 | GUICtrlSetResizing($Label_percent, $GUI_DOCKBOTTOM + $GUI_DOCKSIZE) 96 | ; 97 | ; SETTINGS 98 | ;$title = "" 99 | ;$title = "memoranda" 100 | ;$gamefold = "G:\GOG\GoG" 101 | ;If $title <> "" Then 102 | ; $titfold = $gamefold & "\" & $title 103 | ; If FileExists($titfold) Then DirRemove($titfold, 1) 104 | ;EndIf 105 | ;$files = 1 106 | ;$extras = 1 107 | $title = IniRead($inifle, "Current Download", "title", "") 108 | GUICtrlSetData($Label_title, $title) 109 | $gamefold = IniRead($inifle, "Current Download", "destination", "") 110 | $files = IniRead($inifle, "Current Download", "files", "") 111 | $extras = IniRead($inifle, "Current Download", "extras", "") 112 | $pid = 0 113 | $exit = "" 114 | ; 115 | ; Example 116 | ;~ GUICtrlSetData($Label_title, "memoranda") 117 | ;~ GUICtrlSetData($Label_files, "1 of 7") 118 | ;~ GUICtrlSetData($Label_size, "735.24MB") 119 | ;~ $text = "21:23:38 | 577.8MB 5.0MB/s 1x memoranda/setup_memoranda_gog-4_(11000).exe" 120 | ;~ $text = $text & @CRLF & "21:23:38 | 0.56GB remaining" 121 | ;~ GUICtrlSetData($Edit_console, "setup_memoranda_gog-4_(11000).exe" & @CRLF & $text) 122 | ;~ GUICtrlSetData($Label_percent, "33%") 123 | ;~ GUICtrlSetData($Progress_bar, 33) 124 | ; 125 | Opt("GUIOnEventMode", 1) 126 | ; 127 | GUISetOnEvent($GUI_EVENT_CLOSE, "CloseEvent") 128 | GUISetOnEvent($GUI_EVENT_RESIZED, "KeepWidth") 129 | 130 | GuiSetState() 131 | While 1 132 | ; Start downloading and monitor 133 | If $title <> "" Then 134 | If $gamefold <> "" Then 135 | If $status = "Downloading" Then 136 | $file = FileOpen($outfle, 2) 137 | GUICtrlSetData($Edit_console, "Starting ....") 138 | Local $params = " -skipextras -skipgames" 139 | If $files = 1 Then $params = StringReplace($params, " -skipgames", "") 140 | If $extras = 1 Then $params = StringReplace($params, " -skipextras", "") 141 | $ret = Run(@ComSpec & ' /c gogrepo.py download' & $params & ' -id ' & $title & ' "' & $gamefold & '"', @ScriptDir, @SW_HIDE, $STDERR_MERGED) 142 | $pid = $ret 143 | IniWrite($inifle, "Current Download", "pid", $pid) 144 | $complete = "" 145 | $count = 0 146 | $download = "" 147 | $num = 0 148 | $results = "" 149 | $size = 0 150 | $title = "" 151 | While 1 152 | $out = StdoutRead($ret) 153 | If @error Then 154 | ; Exit the loop if the process closes or StdoutRead returns an error. 155 | ; NOTE - If process closes without error, then two Exitloops should occur, without getting an error $val. 156 | While 1 157 | $out = StderrRead($ret) 158 | If @error Then 159 | ; Exit the loop if the process closes or StderrRead returns an error. 160 | ExitLoop 161 | EndIf 162 | MsgBox($MB_SYSTEMMODAL, "Stderr Read:", $out) 163 | $err = 1 164 | WEnd 165 | ;If $out <> "" Then $results &= $out 166 | ;If $out <> "" Then FileWriteLine($file, "LAST = " & $out) 167 | ExitLoop 2 168 | Else 169 | $out = StringStripWS($out, 3) 170 | If $out <> "" Then 171 | FileWriteLine($file, $out) 172 | $results &= @CRLF & $out 173 | $results = StringStripWS($results, 1) 174 | If $size = 0 Then 175 | GUICtrlSetData($Progress_bar, 0) 176 | If StringInStr($out, " 1x ") > 0 Then 177 | $size = StringSplit($out, " 1x ", 1) 178 | $download = $size[2] 179 | $download = StringSplit($download, "/", 1) 180 | $download = $download[2] 181 | If StringInStr($download, " remaining") > 0 Then 182 | $download = StringSplit($download, " remaining", 1) 183 | $download = $download[1] 184 | $download = StringSplit($download, @CRLF, 1) 185 | $download = $download[1] 186 | EndIf 187 | $size = $size[1] 188 | $size = StringSplit($size, "|", 1) 189 | $size = $size[2] 190 | $size = StringStripWS($size, 1) 191 | $size = StringSplit($size, " ", 1) 192 | $size = $size[1] 193 | GUICtrlSetData($Label_size, $size) 194 | $size = StringRegExpReplace($size, "\D", "") 195 | If $count = 0 Then 196 | $count = StringSplit($results, " download ", 1) 197 | $count = $count[0] - 1 198 | EndIf 199 | $num = $num + 1 200 | GUICtrlSetData($Label_files, $num & " of " & $count) 201 | EndIf 202 | Else 203 | If StringInStr($out, " 1x ") > 0 Then 204 | $done = StringSplit($out, " 1x ", 1) 205 | $done = $done[1] 206 | $done = StringSplit($done, "|", 1) 207 | $done = $done[2] 208 | $done = StringStripWS($done, 1) 209 | $done = StringSplit($done, " ", 1) 210 | $done = $done[1] 211 | $done = StringRegExpReplace($done, "\D", "") 212 | If $percent <> "100%" Then 213 | $progress = $size - $done 214 | $percent = ($progress / $size) * 100 215 | GUICtrlSetData($Progress_bar, $percent) 216 | $percent = Floor($percent) & "%" 217 | If $done = "0.0" Then 218 | $percent = "100%" 219 | EndIf 220 | If $percent = "100%" Then $complete = 1 221 | GUICtrlSetData($Label_percent, $percent) 222 | GUICtrlSetTip($Progress_bar, $percent) 223 | EndIf 224 | ElseIf $complete = 1 Then 225 | GUICtrlSetData($Progress_bar, 100) 226 | GUICtrlSetData($Label_percent, "100%") 227 | Sleep(150) 228 | $complete = "" 229 | $size = 0 230 | $results = "" 231 | $percent = 0 232 | GUICtrlSetData($Edit_console, "") 233 | EndIf 234 | EndIf 235 | $results = StringReplace($results, @CRLF, @CR) 236 | $results = StringReplace($results, @LF, @CR) 237 | $results = StringReplace($results, @CR, @CRLF) 238 | If $size = 0 And $num < 1 Then 239 | If StringInStr($results, " remaining") < 1 Then 240 | $output = $results 241 | Else 242 | $output = "" 243 | EndIf 244 | Else 245 | $output = StringSplit($results, @CRLF, 1) 246 | $cnt = $output[0] 247 | If $cnt > 1 Then 248 | $first = $output[$cnt - 1] 249 | $second = $output[$cnt] 250 | $output = "" 251 | If $download <> "" Then 252 | $output = $download & @CRLF 253 | EndIf 254 | If $first <> "" Then 255 | If StringInStr($first, " remaining") < 1 Then 256 | $output = $output & $first & @CRLF 257 | EndIf 258 | EndIf 259 | If $second <> "" Then 260 | If StringInStr($second, " remaining") > 0 Then 261 | $first = StringSplit($second, " remaining", 1) 262 | If $first[0] > 2 Then 263 | $second = $first[2] & " remaining" 264 | $second = StringStripWS($second, 3) 265 | EndIf 266 | EndIf 267 | $output = $output & $second 268 | EndIf 269 | Else 270 | If StringInStr($results, " remaining") < 1 Then 271 | $output = $results 272 | Else 273 | $output = "" 274 | EndIf 275 | EndIf 276 | EndIf 277 | GUICtrlSetData($Edit_console, "") 278 | GUICtrlSetData($Edit_console, "") 279 | GUICtrlSetData($Edit_console, $output) 280 | If StringInStr($output, "total time:") > 0 Then 281 | Sleep(2000) 282 | EndIf 283 | EndIf 284 | EndIf 285 | If $exit = 1 Then 286 | If $pid <> 0 Then 287 | If ProcessExists($pid) Then ProcessClose($pid) 288 | ; Need to be careful doing these. Perhaps check for number of instances. 289 | $ans = MsgBox(262177, "Processes Close Query", _ 290 | "Do you also want to close any running" & @LF & _ 291 | "'py.exe' and 'Python.exe' process?", $wait, $QueueGUI) 292 | If $ans = 1 Then 293 | If ProcessExists("py.exe") Then 294 | $process = ProcessList("py.exe") 295 | If @error <> 1 Then 296 | If $process[0][0] = 1 Then ProcessClose("py.exe") 297 | EndIf 298 | EndIf 299 | If ProcessExists("Python.exe") Then 300 | $process = ProcessList("Python.exe") 301 | If @error <> 1 Then 302 | If $process[0][0] = 1 Then ProcessClose("Python.exe") 303 | EndIf 304 | EndIf 305 | EndIf 306 | EndIf 307 | GUIDelete($ProgressGUI) 308 | ExitLoop 2 309 | EndIf 310 | WEnd 311 | FileWriteLine($file, $size) 312 | FileClose($file) 313 | ExitLoop 314 | ElseIf $status = "Verifying" Then 315 | EndIf 316 | EndIf 317 | EndIf 318 | Sleep(10) 319 | If $exit = 1 Then 320 | ExitLoop 321 | EndIf 322 | WEnd 323 | $winpos = WinGetPos($ProgressGUI, "") 324 | $left = $winpos[0] 325 | If $left < 0 Then 326 | $left = 2 327 | ElseIf $left > @DesktopWidth - $width Then 328 | $left = @DesktopWidth - $width - 25 329 | EndIf 330 | IniWrite($inifle, "Progress Window", "left", $left) 331 | $top = $winpos[1] 332 | If $top < 0 Then 333 | $top = 2 334 | ElseIf $top > @DesktopHeight - $height - 40 Then 335 | $top = @DesktopHeight - $height - 100 336 | EndIf 337 | IniWrite($inifle, "Progress Window", "top", $top) 338 | ; 339 | GUIDelete($ProgressGUI) 340 | Else 341 | MsgBox(262192, "Program Error", "The 'gogrepo.py' file could not be found!", 0) 342 | EndIf 343 | 344 | Exit 345 | 346 | Func CloseEvent() 347 | ; Exit / Close / Quit the program 348 | If $status = "" Then 349 | $exit = 1 350 | Else 351 | MsgBox(262192, "Close Error", "Use the QUEUE window STOP button!", 3, $ProgressGUI) 352 | EndIf 353 | EndFunc ;=> CloseEvent 354 | 355 | Func KeepWidth() 356 | ; Keep the same window width 357 | Local $height, $winpos 358 | $winpos = WinGetPos($ProgressGUI, "") 359 | $height = $winpos[3] 360 | If $height < 200 Then $height = 200 361 | WinMove($ProgressGUI, "", $winpos[0], $winpos[1], $width + 15, $height) 362 | EndFunc ;=> KeepWidth 363 | -------------------------------------------------------------------------------- /Older_Versions/2020-08-02/Reporun.au3: -------------------------------------------------------------------------------- 1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2 | ;; ;; 3 | ;; AutoIt Version: 3.3.14.2 ;; 4 | ;; ;; 5 | ;; Template AutoIt script. ;; 6 | ;; ;; 7 | ;; AUTHOR: Timboli ;; 8 | ;; ;; 9 | ;; SCRIPT FUNCTION: A progress and feedback GUI frontend for gogrepo.py ;; 10 | ;; ;; 11 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 12 | 13 | ; FUNCTIONS 14 | ; CloseEvent(), KeepWidth() 15 | 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | 25 | _Singleton("gog-repo-progress-timboli") 26 | 27 | Global $Edit_console, $Label_files, $Label_percent, $Label_size, $Label_status, $Label_title, $Progress_bar 28 | ; 29 | Global $auth, $cnt, $complete, $count, $done, $downlist, $download, $downlog, $err, $exit, $extras, $file 30 | Global $files, $galaxy, $gamefold, $gogrepo, $height, $inifle, $langskip, $left, $minimize, $num, $osskip 31 | Global $out, $outfle, $output, $params, $percent, $pid, $process, $progress, $ProgressGUI, $results, $ret 32 | Global $script, $shared, $size, $skiplang, $skipos, $standalone, $status, $style, $titfold, $title, $top 33 | Global $vers, $width, $winpos 34 | 35 | $downlist = @ScriptDir & "\Downloads.ini" 36 | $gogrepo = @ScriptDir & "\gogrepo.py" 37 | $inifle = @ScriptDir & "\Settings.ini" 38 | $outfle = @ScriptDir & "\Output.txt" 39 | 40 | $auth = IniRead($inifle, "gogrepo.py", "author", "") 41 | $vers = IniRead($inifle, "gogrepo.py", "version", "") 42 | If $auth = "eddie3" Or $auth <> "eddie3,kalynr" Then 43 | ;eddie3-0.3a 44 | $script = "default" 45 | ElseIf $auth = "eddie3,kalynr" Then 46 | ;eddie3,kalynr-k0.3a 47 | $script = "fork" 48 | EndIf 49 | 50 | If $Cmdline[0] = 0 Then 51 | $status = "" 52 | Else 53 | $status = $Cmdline[1] 54 | If $status = "Download" Then 55 | $status = "Downloading" 56 | ElseIf $status = "Verify" Then 57 | $status = "Verifying" 58 | Else 59 | $status = "" 60 | EndIf 61 | EndIf 62 | 63 | If FileExists($gogrepo) Then 64 | $minimize = IniRead($inifle, "Progress Bar Or Console", "minimize", "") 65 | $height = 160 66 | $width = 600 67 | $style = $WS_OVERLAPPED + $WS_CAPTION + $WS_SYSMENU + $WS_CLIPSIBLINGS + $WS_MINIMIZEBOX + $WS_SIZEBOX 68 | If $minimize = 1 Then $style = $style + $WS_MINIMIZE 69 | $left = IniRead($inifle, "Progress Window", "left", 2) 70 | $top = IniRead($inifle, "Progress Window", "top", @DesktopHeight - $height - 100) 71 | $ProgressGUI = GuiCreate("Floating Progress", $width, 160, $left, $top, $style, $WS_EX_TOPMOST) 72 | GUISetBkColor($COLOR_SKYBLUE, $ProgressGUI) 73 | ; CONTROLS 74 | $Label_status = GUICtrlCreateLabel($status, 10, 10, 80, 20, $SS_CENTER + $SS_CENTERIMAGE + $SS_SUNKEN) 75 | GUICtrlSetBkColor($Label_status, $COLOR_BLUE) 76 | GUICtrlSetColor($Label_status, $COLOR_WHITE) 77 | GUICtrlSetFont($Label_status, 7, 600, 0, "Small Fonts") 78 | GUICtrlSetResizing($Label_status, $GUI_DOCKALL) 79 | $Label_title = GUICtrlCreateLabel("", 90, 10, 360, 20, $SS_CENTER + $SS_CENTERIMAGE + $SS_SUNKEN) 80 | GUICtrlSetBkColor($Label_title, $COLOR_GRAY) 81 | GUICtrlSetColor($Label_title, $COLOR_RED) 82 | GUICtrlSetFont($Label_title, 9, 600) 83 | GUICtrlSetResizing($Label_title, $GUI_DOCKALL) 84 | $Label_files = GUICtrlCreateLabel("", 455, 10, 60, 20, $SS_CENTER + $SS_CENTERIMAGE + $SS_SUNKEN) 85 | GUICtrlSetBkColor($Label_files, 0xFFB366) 86 | GUICtrlSetColor($Label_files, $COLOR_BLUE) 87 | GUICtrlSetFont($Label_files, 7, 600, 0, "Small Fonts") 88 | GUICtrlSetResizing($Label_files, $GUI_DOCKALL) 89 | $Label_size = GUICtrlCreateLabel("", 520, 10, 70, 20, $SS_CENTER + $SS_CENTERIMAGE + $SS_SUNKEN) 90 | GUICtrlSetBkColor($Label_size, 0xF0F000) 91 | GUICtrlSetColor($Label_size, $COLOR_GREEN) 92 | GUICtrlSetFont($Label_size, 7, 600, 0, "Small Fonts") 93 | GUICtrlSetResizing($Label_size, $GUI_DOCKALL) 94 | $Edit_console = GUICtrlCreateEdit("", 10, 40, 580, 80, $ES_MULTILINE + $ES_READONLY) ; $ES_AUTOVSCROLL + $WS_VSCROLL + + $ES_WANTRETURN 95 | GUICtrlSetBkColor($Edit_console, $COLOR_BLACK) 96 | GUICtrlSetColor($Edit_console, $COLOR_WHITE) 97 | GUICtrlSetFont($Edit_console, 7, 600, 0, "Small Fonts") 98 | GUICtrlSetResizing($Edit_console, $GUI_DOCKAUTO + $GUI_DOCKTOP + $GUI_DOCKBOTTOM + $GUI_DOCKWIDTH) ; + $GUI_DOCKLEFT + $GUI_DOCKRIGHT 99 | ; 100 | $Progress_bar = GUICtrlCreateProgress(10, 130, 580, 20, $PBS_SMOOTH) 101 | GUICtrlSetResizing($Progress_bar, $GUI_DOCKBOTTOM + $GUI_DOCKSIZE) 102 | $Label_percent = GUICtrlCreateLabel("", 20, 131, 570, 18, $SS_CENTER + $SS_CENTERIMAGE) 103 | GUICtrlSetBkColor($Label_percent, $GUI_BKCOLOR_TRANSPARENT) 104 | GUICtrlSetColor($Label_percent, $COLOR_BLACK) 105 | GUICtrlSetFont($Label_percent, 9, 600) 106 | GUICtrlSetResizing($Label_percent, $GUI_DOCKBOTTOM + $GUI_DOCKSIZE) 107 | ; 108 | ; SETTINGS 109 | ;$title = "" 110 | ;$title = "memoranda" 111 | ;$gamefold = "G:\GOG\GoG" 112 | ;If $title <> "" Then 113 | ; $titfold = $gamefold & "\" & $title 114 | ; If FileExists($titfold) Then DirRemove($titfold, 1) 115 | ;EndIf 116 | ;$files = 1 117 | ;$extras = 1 118 | $title = IniRead($inifle, "Current Download", "title", "") 119 | GUICtrlSetData($Label_title, $title) 120 | $gamefold = IniRead($inifle, "Current Download", "destination", "") 121 | If $script = "default" Then 122 | $files = IniRead($inifle, "Current Download", "files", "") 123 | Else 124 | $standalone = IniRead($inifle, "Current Download", "standalone", "") 125 | $galaxy = IniRead($inifle, "Current Download", "galaxy", "") 126 | $shared = IniRead($inifle, "Current Download", "shared", "") 127 | $downlog = IniRead($inifle, "Current Download", "log", "") 128 | $skiplang = IniRead($inifle, "Current Download", "language", "") 129 | $langskip = IniRead($inifle, "Current Download", "languages", "") 130 | $skipos = IniRead($inifle, "Current Download", "OS", "") 131 | $osskip = IniRead($inifle, "Current Download", "OSes", "") 132 | EndIf 133 | $extras = IniRead($inifle, "Current Download", "extras", "") 134 | $pid = 0 135 | $exit = "" 136 | ; 137 | ; Example 138 | ;~ GUICtrlSetData($Label_title, "memoranda") 139 | ;~ GUICtrlSetData($Label_files, "1 of 7") 140 | ;~ GUICtrlSetData($Label_size, "735.24MB") 141 | ;~ $text = "21:23:38 | 577.8MB 5.0MB/s 1x memoranda/setup_memoranda_gog-4_(11000).exe" 142 | ;~ $text = $text & @CRLF & "21:23:38 | 0.56GB remaining" 143 | ;~ GUICtrlSetData($Edit_console, "setup_memoranda_gog-4_(11000).exe" & @CRLF & $text) 144 | ;~ GUICtrlSetData($Label_percent, "33%") 145 | ;~ GUICtrlSetData($Progress_bar, 33) 146 | ; 147 | Opt("GUIOnEventMode", 1) 148 | ; 149 | GUISetOnEvent($GUI_EVENT_CLOSE, "CloseEvent") 150 | GUISetOnEvent($GUI_EVENT_RESIZED, "KeepWidth") 151 | 152 | GuiSetState() 153 | While 1 154 | ; Start downloading and monitor 155 | If $title <> "" Then 156 | If $gamefold <> "" Then 157 | If $status = "Downloading" Then 158 | $file = FileOpen($outfle, 2) 159 | GUICtrlSetData($Edit_console, "Starting ....") 160 | If $script = "default" Then 161 | $params = " -skipextras -skipgames" 162 | If $files = 1 Then $params = StringReplace($params, " -skipgames", "") 163 | Else 164 | $params = " -skipextras -skipgalaxy -skipstandalone -skipshared -nolog" 165 | If $galaxy = 1 Then $params = StringReplace($params, " -skipgalaxy", "") 166 | If $standalone = 1 Then $params = StringReplace($params, " -skipstandalone", "") 167 | If $shared = 1 Then $params = StringReplace($params, " -skipshared", "") 168 | If $downlog = 1 Then $params = StringReplace($params, " -nolog", "") 169 | If $skiplang = 1 Then 170 | If $langskip <> "" Then $params = $params & " -skiplang " & $langskip 171 | EndIf 172 | If $skipos = 1 Then 173 | If $osskip <> "" Then $params = $params & " -skipos " & $osskip 174 | EndIf 175 | EndIf 176 | If $extras = 1 Then $params = StringReplace($params, " -skipextras", "") 177 | $ret = Run(@ComSpec & ' /c gogrepo.py download' & $params & ' -id ' & $title & ' "' & $gamefold & '"', @ScriptDir, @SW_HIDE, $STDERR_MERGED) 178 | $pid = $ret 179 | IniWrite($inifle, "Current Download", "pid", $pid) 180 | $complete = "" 181 | $count = 0 182 | $download = "" 183 | $num = 0 184 | $results = "" 185 | $size = 0 186 | $title = "" 187 | While 1 188 | $out = StdoutRead($ret) 189 | If @error Then 190 | ; Exit the loop if the process closes or StdoutRead returns an error. 191 | ; NOTE - If process closes without error, then two Exitloops should occur, without getting an error $val. 192 | While 1 193 | $out = StderrRead($ret) 194 | If @error Then 195 | ; Exit the loop if the process closes or StderrRead returns an error. 196 | ExitLoop 197 | EndIf 198 | MsgBox($MB_SYSTEMMODAL, "Stderr Read:", $out) 199 | $err = 1 200 | WEnd 201 | ;If $out <> "" Then $results &= $out 202 | ;If $out <> "" Then FileWriteLine($file, "LAST = " & $out) 203 | ExitLoop 2 204 | Else 205 | $out = StringStripWS($out, 3) 206 | If $out <> "" Then 207 | FileWriteLine($file, $out) 208 | $results &= @CRLF & $out 209 | $results = StringStripWS($results, 1) 210 | If $size = 0 Then 211 | GUICtrlSetData($Progress_bar, 0) 212 | If StringInStr($out, " 1x ") > 0 Then 213 | $size = StringSplit($out, " 1x ", 1) 214 | $download = $size[2] 215 | $download = StringSplit($download, "/", 1) 216 | $download = $download[2] 217 | If StringInStr($download, " remaining") > 0 Then 218 | $download = StringSplit($download, " remaining", 1) 219 | $download = $download[1] 220 | $download = StringSplit($download, @CRLF, 1) 221 | $download = $download[1] 222 | EndIf 223 | $size = $size[1] 224 | $size = StringSplit($size, "|", 1) 225 | $size = $size[2] 226 | $size = StringStripWS($size, 1) 227 | $size = StringSplit($size, " ", 1) 228 | $size = $size[1] 229 | GUICtrlSetData($Label_size, $size) 230 | $size = StringRegExpReplace($size, "\D", "") 231 | If $count = 0 Then 232 | $count = StringSplit($results, " download ", 1) 233 | $count = $count[0] - 1 234 | EndIf 235 | $num = $num + 1 236 | GUICtrlSetData($Label_files, $num & " of " & $count) 237 | EndIf 238 | Else 239 | If StringInStr($out, " 1x ") > 0 Then 240 | $done = StringSplit($out, " 1x ", 1) 241 | $done = $done[1] 242 | $done = StringSplit($done, "|", 1) 243 | $done = $done[2] 244 | $done = StringStripWS($done, 1) 245 | $done = StringSplit($done, " ", 1) 246 | $done = $done[1] 247 | $done = StringRegExpReplace($done, "\D", "") 248 | If $percent <> "100%" Then 249 | $progress = $size - $done 250 | $percent = ($progress / $size) * 100 251 | GUICtrlSetData($Progress_bar, $percent) 252 | $percent = Floor($percent) & "%" 253 | If $done = "0.0" Then 254 | $percent = "100%" 255 | EndIf 256 | If $percent = "100%" Then $complete = 1 257 | GUICtrlSetData($Label_percent, $percent) 258 | GUICtrlSetTip($Progress_bar, $percent) 259 | EndIf 260 | ElseIf $complete = 1 Then 261 | GUICtrlSetData($Progress_bar, 100) 262 | GUICtrlSetData($Label_percent, "100%") 263 | Sleep(150) 264 | $complete = "" 265 | $size = 0 266 | $results = "" 267 | $percent = 0 268 | GUICtrlSetData($Edit_console, "") 269 | EndIf 270 | EndIf 271 | $results = StringReplace($results, @CRLF, @CR) 272 | $results = StringReplace($results, @LF, @CR) 273 | $results = StringReplace($results, @CR, @CRLF) 274 | If $size = 0 And $num < 1 Then 275 | If StringInStr($results, " remaining") < 1 Then 276 | $output = $results 277 | Else 278 | $output = "" 279 | EndIf 280 | Else 281 | $output = StringSplit($results, @CRLF, 1) 282 | $cnt = $output[0] 283 | If $cnt > 1 Then 284 | $first = $output[$cnt - 1] 285 | $second = $output[$cnt] 286 | $output = "" 287 | If $download <> "" Then 288 | $output = $download & @CRLF 289 | EndIf 290 | If $first <> "" Then 291 | If StringInStr($first, " remaining") < 1 Then 292 | $output = $output & $first & @CRLF 293 | EndIf 294 | EndIf 295 | If $second <> "" Then 296 | If StringInStr($second, " remaining") > 0 Then 297 | $first = StringSplit($second, " remaining", 1) 298 | If $first[0] > 2 Then 299 | $second = $first[2] & " remaining" 300 | $second = StringStripWS($second, 3) 301 | EndIf 302 | EndIf 303 | $output = $output & $second 304 | EndIf 305 | Else 306 | If StringInStr($results, " remaining") < 1 Then 307 | $output = $results 308 | Else 309 | $output = "" 310 | EndIf 311 | EndIf 312 | EndIf 313 | GUICtrlSetData($Edit_console, "") 314 | GUICtrlSetData($Edit_console, "") 315 | GUICtrlSetData($Edit_console, $output) 316 | If StringInStr($output, "total time:") > 0 Then 317 | Sleep(2000) 318 | EndIf 319 | EndIf 320 | EndIf 321 | If $exit = 1 Then 322 | If $pid <> 0 Then 323 | If ProcessExists($pid) Then ProcessClose($pid) 324 | ; Need to be careful doing these. Perhaps check for number of instances. 325 | $ans = MsgBox(262177, "Processes Close Query", _ 326 | "Do you also want to close any running" & @LF & _ 327 | "'py.exe' and 'Python.exe' process?", $wait, $QueueGUI) 328 | If $ans = 1 Then 329 | If ProcessExists("py.exe") Then 330 | $process = ProcessList("py.exe") 331 | If @error <> 1 Then 332 | If $process[0][0] = 1 Then ProcessClose("py.exe") 333 | EndIf 334 | EndIf 335 | If ProcessExists("Python.exe") Then 336 | $process = ProcessList("Python.exe") 337 | If @error <> 1 Then 338 | If $process[0][0] = 1 Then ProcessClose("Python.exe") 339 | EndIf 340 | EndIf 341 | EndIf 342 | EndIf 343 | GUIDelete($ProgressGUI) 344 | ExitLoop 2 345 | EndIf 346 | WEnd 347 | FileWriteLine($file, $size) 348 | FileClose($file) 349 | ExitLoop 350 | ElseIf $status = "Verifying" Then 351 | EndIf 352 | EndIf 353 | EndIf 354 | Sleep(10) 355 | If $exit = 1 Then 356 | ExitLoop 357 | EndIf 358 | WEnd 359 | $winpos = WinGetPos($ProgressGUI, "") 360 | $left = $winpos[0] 361 | If $left < 0 Then 362 | $left = 2 363 | ElseIf $left > @DesktopWidth - $width Then 364 | $left = @DesktopWidth - $width - 25 365 | EndIf 366 | IniWrite($inifle, "Progress Window", "left", $left) 367 | $top = $winpos[1] 368 | If $top < 0 Then 369 | $top = 2 370 | ElseIf $top > @DesktopHeight - $height - 40 Then 371 | $top = @DesktopHeight - $height - 100 372 | EndIf 373 | IniWrite($inifle, "Progress Window", "top", $top) 374 | ; 375 | GUIDelete($ProgressGUI) 376 | Else 377 | MsgBox(262192, "Program Error", "The 'gogrepo.py' file could not be found!", 0) 378 | EndIf 379 | 380 | Exit 381 | 382 | Func CloseEvent() 383 | ; Exit / Close / Quit the program 384 | If $status = "" Then 385 | $exit = 1 386 | Else 387 | MsgBox(262192, "Close Error", "Use the QUEUE window STOP button!", 3, $ProgressGUI) 388 | EndIf 389 | EndFunc ;=> CloseEvent 390 | 391 | Func KeepWidth() 392 | ; Keep the same window width 393 | Local $height, $winpos 394 | $winpos = WinGetPos($ProgressGUI, "") 395 | $height = $winpos[3] 396 | If $height < 200 Then $height = 200 397 | WinMove($ProgressGUI, "", $winpos[0], $winpos[1], $width + 15, $height) 398 | EndFunc ;=> KeepWidth 399 | -------------------------------------------------------------------------------- /Older_Versions/2020-08-05/GOGRepo GUI.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/Older_Versions/2020-08-05/GOGRepo GUI.exe -------------------------------------------------------------------------------- /Older_Versions/2020-08-08/GOGRepo GUI.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/Older_Versions/2020-08-08/GOGRepo GUI.exe -------------------------------------------------------------------------------- /Older_Versions/GetgogWL.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/Older_Versions/GetgogWL.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # GOGRepo-GUI 2 | A frontend GUI for the gogrepo.py Python script that interacts with GOG.com. 3 | 4 | The gogrepo.py script obtains a manifest of a user's game file library at GOG.com, and enables updating that manifest locally and downloading the game files (including related extras), and verifying those downloads, etc. 5 | 6 | The gogrepo.py script can be found here - https://github.com/eddie3/gogrepo 7 | 8 | Kalanyr's forked version of gogrepo.py can be found here - https://github.com/Kalanyr/gogrepoc 9 | 10 | GOGRepo GUI makes things easier to do, especially for those not comfortable with the command-line or using BAT files, plus it has some additional features. 11 | 12 | BIG THANKS to woolymethodman, Kalanyr, etc for gogrepo. 13 | https://www.gog.com/forum/general/gogrepopy_python_script_for_regularly_backing_up_your_purchased_gog_collection_for_full_offline_e/page1 14 | 15 | And thanks to Flyingfluffypiglet and Lifthrasil for extra inspiration. 16 | -------------------------------------------------------------------------------- /Reporun.au3: -------------------------------------------------------------------------------- 1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2 | ;; ;; 3 | ;; AutoIt Version: 3.3.14.2 ;; 4 | ;; ;; 5 | ;; Template AutoIt script. ;; 6 | ;; ;; 7 | ;; AUTHOR: Timboli ;; 8 | ;; ;; 9 | ;; SCRIPT FUNCTION: A progress and feedback GUI frontend for gogrepo.py ;; 10 | ;; ;; 11 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 12 | 13 | ; FUNCTIONS 14 | ; CloseEvent(), KeepWidth() 15 | 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | 25 | _Singleton("gog-repo-progress-timboli") 26 | 27 | Global $Edit_console, $Label_files, $Label_percent, $Label_size, $Label_status, $Label_title, $Progress_bar 28 | ; 29 | Global $auth, $cnt, $complete, $count, $done, $downlist, $download, $downlog, $err, $exit, $extras, $file 30 | Global $files, $galaxy, $gamefold, $gogrepo, $height, $inifle, $lang, $langskip, $left, $minimize, $num 31 | Global $OS, $osskip, $out, $outfle, $output, $params, $percent, $pid, $process, $progress, $ProgressGUI 32 | Global $results, $ret, $script, $shared, $size, $skiplang, $skipos, $standalone, $status, $style, $titfold 33 | Global $title, $top, $vers, $width, $winpos 34 | 35 | $downlist = @ScriptDir & "\Downloads.ini" 36 | $gogrepo = @ScriptDir & "\gogrepo.py" 37 | $inifle = @ScriptDir & "\Settings.ini" 38 | $outfle = @ScriptDir & "\Output.txt" 39 | 40 | $auth = IniRead($inifle, "gogrepo.py", "author", "") 41 | $vers = IniRead($inifle, "gogrepo.py", "version", "") 42 | If $auth = "eddie3" Or $auth <> "eddie3,kalynr" Then 43 | ;eddie3-0.3a 44 | $script = "default" 45 | ElseIf $auth = "eddie3,kalynr" Then 46 | ;eddie3,kalynr-k0.3a 47 | $script = "fork" 48 | EndIf 49 | 50 | If $Cmdline[0] = 0 Then 51 | $status = "" 52 | Else 53 | $status = $Cmdline[1] 54 | If $status = "Download" Then 55 | $status = "Downloading" 56 | ElseIf $status = "Verify" Then 57 | $status = "Verifying" 58 | Else 59 | $status = "" 60 | EndIf 61 | EndIf 62 | 63 | If FileExists($gogrepo) Then 64 | $minimize = IniRead($inifle, "Progress Bar Or Console", "minimize", "") 65 | $height = 160 66 | $width = 600 67 | $style = $WS_OVERLAPPED + $WS_CAPTION + $WS_SYSMENU + $WS_CLIPSIBLINGS + $WS_MINIMIZEBOX + $WS_SIZEBOX 68 | If $minimize = 1 Then $style = $style + $WS_MINIMIZE 69 | $left = IniRead($inifle, "Progress Window", "left", 2) 70 | $top = IniRead($inifle, "Progress Window", "top", @DesktopHeight - $height - 100) 71 | $ProgressGUI = GuiCreate("Floating Progress", $width, 160, $left, $top, $style, $WS_EX_TOPMOST) 72 | GUISetBkColor($COLOR_SKYBLUE, $ProgressGUI) 73 | ; CONTROLS 74 | $Label_status = GUICtrlCreateLabel($status, 10, 10, 80, 20, $SS_CENTER + $SS_CENTERIMAGE + $SS_SUNKEN) 75 | GUICtrlSetBkColor($Label_status, $COLOR_BLUE) 76 | GUICtrlSetColor($Label_status, $COLOR_WHITE) 77 | GUICtrlSetFont($Label_status, 7, 600, 0, "Small Fonts") 78 | GUICtrlSetResizing($Label_status, $GUI_DOCKALL) 79 | $Label_title = GUICtrlCreateLabel("", 90, 10, 360, 20, $SS_CENTER + $SS_CENTERIMAGE + $SS_SUNKEN) 80 | GUICtrlSetBkColor($Label_title, $COLOR_GRAY) 81 | GUICtrlSetColor($Label_title, $COLOR_RED) 82 | GUICtrlSetFont($Label_title, 9, 600) 83 | GUICtrlSetResizing($Label_title, $GUI_DOCKALL) 84 | $Label_files = GUICtrlCreateLabel("", 455, 10, 60, 20, $SS_CENTER + $SS_CENTERIMAGE + $SS_SUNKEN) 85 | GUICtrlSetBkColor($Label_files, 0xFFB366) 86 | GUICtrlSetColor($Label_files, $COLOR_BLUE) 87 | GUICtrlSetFont($Label_files, 7, 600, 0, "Small Fonts") 88 | GUICtrlSetResizing($Label_files, $GUI_DOCKALL) 89 | $Label_size = GUICtrlCreateLabel("", 520, 10, 70, 20, $SS_CENTER + $SS_CENTERIMAGE + $SS_SUNKEN) 90 | GUICtrlSetBkColor($Label_size, 0xF0F000) 91 | GUICtrlSetColor($Label_size, $COLOR_GREEN) 92 | GUICtrlSetFont($Label_size, 7, 600, 0, "Small Fonts") 93 | GUICtrlSetResizing($Label_size, $GUI_DOCKALL) 94 | $Edit_console = GUICtrlCreateEdit("", 10, 40, 580, 80, $ES_MULTILINE + $ES_READONLY) ; $ES_AUTOVSCROLL + $WS_VSCROLL + + $ES_WANTRETURN 95 | GUICtrlSetBkColor($Edit_console, $COLOR_BLACK) 96 | GUICtrlSetColor($Edit_console, $COLOR_WHITE) 97 | GUICtrlSetFont($Edit_console, 7, 600, 0, "Small Fonts") 98 | GUICtrlSetResizing($Edit_console, $GUI_DOCKAUTO + $GUI_DOCKTOP + $GUI_DOCKBOTTOM + $GUI_DOCKWIDTH) ; + $GUI_DOCKLEFT + $GUI_DOCKRIGHT 99 | ; 100 | $Progress_bar = GUICtrlCreateProgress(10, 130, 580, 20, $PBS_SMOOTH) 101 | GUICtrlSetResizing($Progress_bar, $GUI_DOCKBOTTOM + $GUI_DOCKSIZE) 102 | $Label_percent = GUICtrlCreateLabel("", 20, 131, 570, 18, $SS_CENTER + $SS_CENTERIMAGE) 103 | GUICtrlSetBkColor($Label_percent, $GUI_BKCOLOR_TRANSPARENT) 104 | GUICtrlSetColor($Label_percent, $COLOR_BLACK) 105 | GUICtrlSetFont($Label_percent, 9, 600) 106 | GUICtrlSetResizing($Label_percent, $GUI_DOCKBOTTOM + $GUI_DOCKSIZE) 107 | ; 108 | ; SETTINGS 109 | ;$title = "" 110 | ;$title = "memoranda" 111 | ;$gamefold = "G:\GOG\GoG" 112 | ;If $title <> "" Then 113 | ; $titfold = $gamefold & "\" & $title 114 | ; If FileExists($titfold) Then DirRemove($titfold, 1) 115 | ;EndIf 116 | ;$files = 1 117 | ;$extras = 1 118 | $title = IniRead($inifle, "Current Download", "title", "") 119 | GUICtrlSetData($Label_title, $title) 120 | $gamefold = IniRead($inifle, "Current Download", "destination", "") 121 | If $script = "default" Then 122 | $files = IniRead($inifle, "Current Download", "files", "") 123 | Else 124 | $OS = IniRead($inifle, "Current Download", "OS", "") 125 | $lang = IniRead($inifle, "Current Download", "language", "") 126 | $standalone = IniRead($inifle, "Current Download", "standalone", "") 127 | $galaxy = IniRead($inifle, "Current Download", "galaxy", "") 128 | $shared = IniRead($inifle, "Current Download", "shared", "") 129 | $downlog = IniRead($inifle, "Current Download", "log", "") 130 | $skiplang = IniRead($inifle, "Current Download", "skiplang", "") 131 | $langskip = IniRead($inifle, "Current Download", "langskip", "") 132 | $skipos = IniRead($inifle, "Current Download", "skipOS", "") 133 | $osskip = IniRead($inifle, "Current Download", "OSes", "") 134 | EndIf 135 | $extras = IniRead($inifle, "Current Download", "extras", "") 136 | $pid = 0 137 | $exit = "" 138 | ; 139 | ; Example 140 | ;~ GUICtrlSetData($Label_title, "memoranda") 141 | ;~ GUICtrlSetData($Label_files, "1 of 7") 142 | ;~ GUICtrlSetData($Label_size, "735.24MB") 143 | ;~ $text = "21:23:38 | 577.8MB 5.0MB/s 1x memoranda/setup_memoranda_gog-4_(11000).exe" 144 | ;~ $text = $text & @CRLF & "21:23:38 | 0.56GB remaining" 145 | ;~ GUICtrlSetData($Edit_console, "setup_memoranda_gog-4_(11000).exe" & @CRLF & $text) 146 | ;~ GUICtrlSetData($Label_percent, "33%") 147 | ;~ GUICtrlSetData($Progress_bar, 33) 148 | ; 149 | Opt("GUIOnEventMode", 1) 150 | ; 151 | GUISetOnEvent($GUI_EVENT_CLOSE, "CloseEvent") 152 | GUISetOnEvent($GUI_EVENT_RESIZED, "KeepWidth") 153 | 154 | GuiSetState() 155 | While 1 156 | ; Start downloading and monitor 157 | If $title <> "" Then 158 | If $gamefold <> "" Then 159 | If $status = "Downloading" Then 160 | $file = FileOpen($outfle, 2) 161 | GUICtrlSetData($Edit_console, "Starting ....") 162 | If $script = "default" Then 163 | $params = " -skipextras -skipgames" 164 | If $files = 1 Then $params = StringReplace($params, " -skipgames", "") 165 | Else 166 | $params = " -os " & $OS & " -lang " & $lang & " -skipextras -skipgalaxy -skipstandalone -skipshared -nolog" 167 | If $galaxy = 1 Then $params = StringReplace($params, " -skipgalaxy", "") 168 | If $standalone = 1 Then $params = StringReplace($params, " -skipstandalone", "") 169 | If $shared = 1 Then $params = StringReplace($params, " -skipshared", "") 170 | If $downlog = 1 Then $params = StringReplace($params, " -nolog", "") 171 | If $skiplang = 1 Then 172 | If $langskip <> "" Then $params = $params & " -skiplang " & $langskip 173 | EndIf 174 | If $skipos = 1 Then 175 | If $osskip <> "" Then $params = $params & " -skipos " & $osskip 176 | EndIf 177 | EndIf 178 | If $extras = 1 Then $params = StringReplace($params, " -skipextras", "") 179 | $ret = Run(@ComSpec & ' /c gogrepo.py download' & $params & ' -id ' & $title & ' "' & $gamefold & '"', @ScriptDir, @SW_HIDE, $STDERR_MERGED) 180 | $pid = $ret 181 | IniWrite($inifle, "Current Download", "pid", $pid) 182 | $complete = "" 183 | $count = 0 184 | $download = "" 185 | $num = 0 186 | $results = "" 187 | $size = 0 188 | $title = "" 189 | While 1 190 | $out = StdoutRead($ret) 191 | If @error Then 192 | ; Exit the loop if the process closes or StdoutRead returns an error. 193 | ; NOTE - If process closes without error, then two Exitloops should occur, without getting an error $val. 194 | While 1 195 | $out = StderrRead($ret) 196 | If @error Then 197 | ; Exit the loop if the process closes or StderrRead returns an error. 198 | ExitLoop 199 | EndIf 200 | MsgBox($MB_SYSTEMMODAL, "Stderr Read:", $out) 201 | $err = 1 202 | WEnd 203 | ;If $out <> "" Then $results &= $out 204 | ;If $out <> "" Then FileWriteLine($file, "LAST = " & $out) 205 | ExitLoop 2 206 | Else 207 | $out = StringStripWS($out, 3) 208 | If $out <> "" Then 209 | FileWriteLine($file, $out) 210 | $results &= @CRLF & $out 211 | $results = StringStripWS($results, 1) 212 | If $size = 0 Then 213 | GUICtrlSetData($Progress_bar, 0) 214 | If StringInStr($out, " 1x ") > 0 Then 215 | $size = StringSplit($out, " 1x ", 1) 216 | $download = $size[2] 217 | $download = StringSplit($download, "/", 1) 218 | $download = $download[2] 219 | If StringInStr($download, " remaining") > 0 Then 220 | $download = StringSplit($download, " remaining", 1) 221 | $download = $download[1] 222 | $download = StringSplit($download, @CRLF, 1) 223 | $download = $download[1] 224 | EndIf 225 | $size = $size[1] 226 | $size = StringSplit($size, "|", 1) 227 | $size = $size[2] 228 | $size = StringStripWS($size, 1) 229 | $size = StringSplit($size, " ", 1) 230 | $size = $size[1] 231 | GUICtrlSetData($Label_size, $size) 232 | $size = StringRegExpReplace($size, "\D", "") 233 | If $count = 0 Then 234 | $count = StringSplit($results, " download ", 1) 235 | $count = $count[0] - 1 236 | EndIf 237 | $num = $num + 1 238 | GUICtrlSetData($Label_files, $num & " of " & $count) 239 | EndIf 240 | Else 241 | If StringInStr($out, " 1x ") > 0 Then 242 | $done = StringSplit($out, " 1x ", 1) 243 | $done = $done[1] 244 | $done = StringSplit($done, "|", 1) 245 | $done = $done[2] 246 | $done = StringStripWS($done, 1) 247 | $done = StringSplit($done, " ", 1) 248 | $done = $done[1] 249 | $done = StringRegExpReplace($done, "\D", "") 250 | If $percent <> "100%" Then 251 | $progress = $size - $done 252 | $percent = ($progress / $size) * 100 253 | GUICtrlSetData($Progress_bar, $percent) 254 | $percent = Floor($percent) & "%" 255 | If $done = "0.0" Then 256 | $percent = "100%" 257 | EndIf 258 | If $percent = "100%" Then $complete = 1 259 | GUICtrlSetData($Label_percent, $percent) 260 | GUICtrlSetTip($Progress_bar, $percent) 261 | EndIf 262 | ElseIf $complete = 1 Then 263 | GUICtrlSetData($Progress_bar, 100) 264 | GUICtrlSetData($Label_percent, "100%") 265 | Sleep(150) 266 | $complete = "" 267 | $size = 0 268 | $results = "" 269 | $percent = 0 270 | GUICtrlSetData($Edit_console, "") 271 | EndIf 272 | EndIf 273 | $results = StringReplace($results, @CRLF, @CR) 274 | $results = StringReplace($results, @LF, @CR) 275 | $results = StringReplace($results, @CR, @CRLF) 276 | If $size = 0 And $num < 1 Then 277 | If StringInStr($results, " remaining") < 1 Then 278 | $output = $results 279 | Else 280 | $output = "" 281 | EndIf 282 | Else 283 | $output = StringSplit($results, @CRLF, 1) 284 | $cnt = $output[0] 285 | If $cnt > 1 Then 286 | $first = $output[$cnt - 1] 287 | $second = $output[$cnt] 288 | $output = "" 289 | If $download <> "" Then 290 | $output = $download & @CRLF 291 | EndIf 292 | If $first <> "" Then 293 | If StringInStr($first, " remaining") < 1 Then 294 | $output = $output & $first & @CRLF 295 | EndIf 296 | EndIf 297 | If $second <> "" Then 298 | If StringInStr($second, " remaining") > 0 Then 299 | $first = StringSplit($second, " remaining", 1) 300 | If $first[0] > 2 Then 301 | $second = $first[2] & " remaining" 302 | $second = StringStripWS($second, 3) 303 | EndIf 304 | EndIf 305 | $output = $output & $second 306 | EndIf 307 | Else 308 | If StringInStr($results, " remaining") < 1 Then 309 | $output = $results 310 | Else 311 | $output = "" 312 | EndIf 313 | EndIf 314 | EndIf 315 | GUICtrlSetData($Edit_console, "") 316 | GUICtrlSetData($Edit_console, "") 317 | GUICtrlSetData($Edit_console, $output) 318 | If StringInStr($output, "total time:") > 0 Then 319 | Sleep(2000) 320 | EndIf 321 | EndIf 322 | EndIf 323 | If $exit = 1 Then 324 | If $pid <> 0 Then 325 | If ProcessExists($pid) Then ProcessClose($pid) 326 | ; Need to be careful doing these. Perhaps check for number of instances. 327 | $ans = MsgBox(262177, "Processes Close Query", _ 328 | "Do you also want to close any running" & @LF & _ 329 | "'py.exe' and 'Python.exe' process?", $wait, $QueueGUI) 330 | If $ans = 1 Then 331 | If ProcessExists("py.exe") Then 332 | $process = ProcessList("py.exe") 333 | If @error <> 1 Then 334 | If $process[0][0] = 1 Then ProcessClose("py.exe") 335 | EndIf 336 | EndIf 337 | If ProcessExists("Python.exe") Then 338 | $process = ProcessList("Python.exe") 339 | If @error <> 1 Then 340 | If $process[0][0] = 1 Then ProcessClose("Python.exe") 341 | EndIf 342 | EndIf 343 | EndIf 344 | EndIf 345 | GUIDelete($ProgressGUI) 346 | ExitLoop 2 347 | EndIf 348 | WEnd 349 | FileWriteLine($file, $size) 350 | FileClose($file) 351 | ExitLoop 352 | ElseIf $status = "Verifying" Then 353 | EndIf 354 | EndIf 355 | EndIf 356 | Sleep(10) 357 | If $exit = 1 Then 358 | ExitLoop 359 | EndIf 360 | WEnd 361 | $winpos = WinGetPos($ProgressGUI, "") 362 | $left = $winpos[0] 363 | If $left < 0 Then 364 | $left = 2 365 | ElseIf $left > @DesktopWidth - $width Then 366 | $left = @DesktopWidth - $width - 25 367 | EndIf 368 | IniWrite($inifle, "Progress Window", "left", $left) 369 | $top = $winpos[1] 370 | If $top < 0 Then 371 | $top = 2 372 | ElseIf $top > @DesktopHeight - $height - 40 Then 373 | $top = @DesktopHeight - $height - 100 374 | EndIf 375 | IniWrite($inifle, "Progress Window", "top", $top) 376 | ; 377 | GUIDelete($ProgressGUI) 378 | Else 379 | MsgBox(262192, "Program Error", "The 'gogrepo.py' file could not be found!", 0) 380 | EndIf 381 | 382 | Exit 383 | 384 | Func CloseEvent() 385 | ; Exit / Close / Quit the program 386 | If $status = "" Then 387 | $exit = 1 388 | Else 389 | MsgBox(262192, "Close Error", "Use the QUEUE window STOP button!", 3, $ProgressGUI) 390 | EndIf 391 | EndFunc ;=> CloseEvent 392 | 393 | Func KeepWidth() 394 | ; Keep the same window width 395 | Local $height, $winpos 396 | $winpos = WinGetPos($ProgressGUI, "") 397 | $height = $winpos[3] 398 | If $height < 200 Then $height = 200 399 | WinMove($ProgressGUI, "", $winpos[0], $winpos[1], $width + 15, $height) 400 | EndFunc ;=> KeepWidth 401 | -------------------------------------------------------------------------------- /Simple_GUI/ExtProp.au3: -------------------------------------------------------------------------------- 1 | ;=============================================================================== 2 | ; Function Name: GetExtProperty($sPath,$iProp) 3 | ; Description: Returns an extended property of a given file. 4 | ; Parameter(s): $sPath - The path to the file you are attempting to retrieve an extended property from. 5 | ; $iProp - The numerical value for the property you want returned. If $iProp is is set 6 | ; to -1 then all properties will be returned in a 1 dimensional array in their corresponding order. 7 | ; The properties are as follows: 8 | ; Name = 0 9 | ; Size = 1 10 | ; Type = 2 11 | ; DateModified = 3 12 | ; DateCreated = 4 13 | ; DateAccessed = 5 14 | ; Attributes = 6 15 | ; Status = 7 16 | ; Owner = 8 17 | ; Author = 9 18 | ; Title = 10 19 | ; Subject = 11 20 | ; Category = 12 21 | ; Pages = 13 22 | ; Comments = 14 23 | ; Copyright = 15 24 | ; Artist = 16 25 | ; AlbumTitle = 17 26 | ; Year = 18 27 | ; TrackNumber = 19 28 | ; Genre = 20 29 | ; Duration = 21 30 | ; BitRate = 22 31 | ; Protected = 23 32 | ; CameraModel = 24 33 | ; DatePictureTaken = 25 34 | ; Dimensions = 26 35 | ; Width = 27 36 | ; Height = 28 37 | ; Company = 30 38 | ; Description = 31 39 | ; FileVersion = 32 40 | ; ProductName = 33 41 | ; ProductVersion = 34 42 | ; Requirement(s): File specified in $spath must exist. 43 | ; Return Value(s): On Success - The extended file property, or if $iProp = -1 then an array with all properties 44 | ; On Failure - 0, @Error - 1 (If file does not exist) 45 | ; Author(s): Simucal (Simucal@gmail.com) 46 | ; Note(s): 47 | ; 48 | ;=============================================================================== 49 | Func _GetExtProperty($sPath, $iProp) 50 | Local $iExist, $sFile, $sDir, $oShellApp, $oDir, $oFile, $aProperty, $sProperty 51 | $iExist = FileExists($sPath) 52 | If $iExist = 0 Then 53 | SetError(1) 54 | Return 0 55 | Else 56 | $sFile = StringTrimLeft($sPath, StringInStr($sPath, "\", 0, -1)) 57 | $sDir = StringTrimRight($sPath, (StringLen($sPath) - StringInStr($sPath, "\", 0, -1))) 58 | $oShellApp = ObjCreate ("shell.application") 59 | $oDir = $oShellApp.NameSpace ($sDir) 60 | $oFile = $oDir.Parsename ($sFile) 61 | If $iProp = -1 Then 62 | Local $aProperty[35] 63 | For $i = 0 To 34 64 | $aProperty[$i] = $oDir.GetDetailsOf ($oFile, $i) 65 | Next 66 | Return $aProperty 67 | Else 68 | $sProperty = $oDir.GetDetailsOf ($oFile, $iProp) 69 | ; TheSaint changed for unnecessary (wrong?) (& annoying) return of 0 70 | ; It is far better to return the true value and deal with that in any way that 71 | ; is necessary to the caller. '0' in this instance, is not always indicative of 72 | ; failure (i.e. ID3 tags), so it shouldn't be used. 73 | ;~ If $sProperty = "" Then 74 | ;~ Return 0 75 | ;~ Else 76 | Return $sProperty 77 | ;~ EndIf 78 | EndIf 79 | EndIf 80 | EndFunc ;==>_GetExtProperty -------------------------------------------------------------------------------- /Simple_GUI/GOGRepo_results.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/Simple_GUI/GOGRepo_results.png -------------------------------------------------------------------------------- /Simple_GUI/GOGRepo_simple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/Simple_GUI/GOGRepo_simple.png -------------------------------------------------------------------------------- /Simple_GUI/GOGRepo_simple_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/Simple_GUI/GOGRepo_simple_2.png -------------------------------------------------------------------------------- /Simple_GUI/GOGRepo_simple_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/Simple_GUI/GOGRepo_simple_3.png -------------------------------------------------------------------------------- /Simple_GUI/GOGRepo_simple_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/Simple_GUI/GOGRepo_simple_4.png -------------------------------------------------------------------------------- /Simple_GUI/GOGRepo_simple_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/Simple_GUI/GOGRepo_simple_5.png -------------------------------------------------------------------------------- /Simple_GUI/GOGRepo_simple_setup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/Simple_GUI/GOGRepo_simple_setup.png -------------------------------------------------------------------------------- /Simple_GUI/GRS.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/Simple_GUI/GRS.ico -------------------------------------------------------------------------------- /Simple_GUI/History.txt: -------------------------------------------------------------------------------- 1 | 2 | (v1.5) FSUM is no longer required or used. Window controls now get disabled during processes. 3 | 4 | (v1.4) BUGFIX for incorrect line ending insertions into gogrepo.py. These insertions did not occur if using the Kalanyr forked version of gogrepo.py. 5 | 6 | (v1.3) Added a file Size field. Two buttons resized with multiline text. Some text changes. 7 | 8 | (v1.2) BUGFIX for detecting the version of 'gogrepo.py'. This involves checking for the Kalanyr forked version, which is automatically supported, and then checking for a modified version of the original 'gogrepo.py', which is also supported. The user is queried if neither are the case, with an option to modify the existing. 7-Zip is now checked for at startup, with priority given to the '7z.exe' file over '7za.exe' if found. 9 | -------------------------------------------------------------------------------- /Simple_GUI/v1.0/GOGRepo Simple GUI.au3: -------------------------------------------------------------------------------- 1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2 | ;; ;; 3 | ;; AutoIt Version: 3.3.14.2 ;; 4 | ;; ;; 5 | ;; Template AutoIt script. ;; 6 | ;; ;; 7 | ;; AUTHOR: Timboli ;; 8 | ;; ;; 9 | ;; SCRIPT FUNCTION: A limited simple GUI frontend for gogrepo.py ;; 10 | ;; ;; 11 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 12 | 13 | ; FUNCTIONS 14 | ; MainGUI(), SetupGUI() 15 | ; FillTheGamesList(), GetAllowedName(), ReplaceForeignCharacters($text), ReplaceOtherCharacters($text) 16 | 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | 30 | _Singleton("gog-repo-simple-gui-timboli") 31 | 32 | Global $Button_exit, $Button_find, $Button_get, $Button_info, $Button_log, $Checkbox_exact, $Checkbox_update, $Group_drop 33 | Global $Group_games, $Group_status, $Input_file, $Input_name, $Input_title, $Label_drop, $Label_status, $Label_title, $List_games 34 | ; 35 | Global $7zip, $a, $ans, $array, $atts, $boxcol, $cmdpid, $cookies, $entries, $entry, $file, $find, $foldrar, $foldzip 36 | Global $fsum, $fsumfld, $games, $gamesfle, $gogrepo, $handle, $height, $icoI, $icoS, $icoX, $ind, $inifle, $lang, $left 37 | Global $line, $logfle, $manifest, $match, $md5, $name, $names, $open, $OS, $OSget, $out, $pid, $repoGUI, $res, $resfle 38 | Global $results, $resumeman, $ret, $shell, $SimpleGUI, $size, $srcfld, $srcfle, $style, $target, $text, $textcol, $title 39 | Global $titlist, $top, $unrar, $update, $updated, $user, $val, $version, $w, $warning, $width, $winpos, $wins, $wintit 40 | ;Global $innoextract 41 | ; 42 | $7zip = @ScriptDir & "\7-Zip\7za.exe" 43 | $cookies = @ScriptDir & "\gog-cookies.dat" 44 | $foldrar = @ScriptDir & "\UnRAR" 45 | $foldzip = @ScriptDir & "\7-Zip" 46 | $fsum = @ScriptDir & "\FSUM\fsum.exe" 47 | $fsumfld = @ScriptDir & "\FSUM" 48 | $gamesfle = @ScriptDir & "\Games.ini" 49 | $gogrepo = @ScriptDir & "\gogrepo.py" 50 | $inifle = @ScriptDir & "\Options.ini" 51 | ;$innoextract = @ScriptDir & "\innoextract.exe" 52 | $logfle = @ScriptDir & "\Log.txt" 53 | $manifest = @ScriptDir & "\gog-manifest.dat" 54 | $resfle = @ScriptDir & "\Checksums.txt" 55 | $resumeman = @ScriptDir & "\gog-resume-manifest.dat" 56 | $target = @LF & "Drag && Drop" & @LF & "Downloaded" & @LF & "Game Files" & @LF & "HERE" 57 | $titlist = @ScriptDir & "\Titles.txt" 58 | $unrar = @ScriptDir & "\UnRAR\UnRAR.exe" 59 | $version = "v1.0" 60 | 61 | $repoGUI = @ScriptDir & "\GOGRepo GUI.au3" 62 | If FileExists($repoGUI) Then 63 | $warning = 1 64 | Else 65 | $repoGUI = @ScriptDir & "\GOGRepo GUI.exe" 66 | If FileExists($repoGUI) Then 67 | $warning = 1 68 | EndIf 69 | EndIf 70 | If $warning = 1 Then 71 | MsgBox(262192, "Program Warning", "This program cannot exist and run in the same folder" _ 72 | & @LF & "as my GOGRepo GUI program. It will now close (exit).", 0) 73 | Exit 74 | EndIf 75 | 76 | If Not FileExists($foldrar) Then DirCreate($foldrar) 77 | If Not FileExists($foldzip) Then DirCreate($foldzip) 78 | If Not FileExists($fsumfld) Then DirCreate($fsumfld) 79 | 80 | If Not FileExists($titlist) Then _FileCreate($titlist) 81 | 82 | If FileExists($titlist) Then 83 | If FileExists($gogrepo) Then 84 | MainGUI() 85 | Else 86 | MsgBox(262192, "Program Error", "Required 'gogrepo.py' file could not be found!", 0) 87 | EndIf 88 | Else 89 | MsgBox(262192, "Program Error", "Titles.txt file could not be created!", 0) 90 | EndIf 91 | 92 | Exit 93 | 94 | Func MainGUI() 95 | Local $date, $diff, $dir, $drv, $exe, $fext, $fnam, $o, $output, $rar, $sh, $zip 96 | ; 97 | $width = 580 98 | $height = 345 99 | $left = IniRead($inifle, "Program Window", "left", @DesktopWidth - $width - 25) 100 | $top = IniRead($inifle, "Program Window", "top", @DesktopHeight - $height - 30) 101 | $style = $WS_OVERLAPPED + $WS_CAPTION + $WS_SYSMENU + $WS_CLIPSIBLINGS + $WS_MINIMIZEBOX ; + $WS_VISIBLE 102 | $SimpleGUI = GuiCreate("GOGRepo Simple GUI", $width, $height, $left, $top, $style, $WS_EX_TOPMOST + $WS_EX_ACCEPTFILES) 103 | GUISetBkColor($COLOR_SKYBLUE, $SimpleGUI) 104 | ; CONTROLS 105 | $Group_games = GuiCtrlCreateGroup("Games", 10, 10, 370, 323) 106 | $List_games = GuiCtrlCreateList("", 20, 30, 350, 220) 107 | GUICtrlSetBkColor($List_games, 0xBBFFBB) 108 | GUICtrlSetTip($List_games, "List of games!") 109 | $Input_name = GUICtrlCreateInput("", 20, 250, 350, 20) 110 | GUICtrlSetBkColor($Input_name, 0xFFFFB0) 111 | GUICtrlSetTip($Input_name, "Game Name!") 112 | $Label_title = GuiCtrlCreateLabel("Title", 20, 275, 38, 20, $SS_CENTER + $SS_CENTERIMAGE + $SS_SUNKEN + $SS_NOTIFY) 113 | GUICtrlSetBkColor($Label_title, $COLOR_BLUE) 114 | GUICtrlSetColor($Label_title, $COLOR_WHITE) 115 | GUICtrlSetFont($Label_title, 7, 600, 0, "Small Fonts") 116 | GUICtrlSetTip($Label_title, "Click to restore last search text to Title input field!") 117 | $Input_title = GUICtrlCreateInput("", 58, 275, 240, 20) ;, $ES_READONLY 118 | GUICtrlSetBkColor($Input_title, 0xBBFFBB) 119 | GUICtrlSetTip($Input_title, "Game Title!") 120 | $Button_find = GuiCtrlCreateButton("?", 301, 274, 22, 22, $BS_ICON) 121 | GUICtrlSetTip($Button_find, "Find the specified game title on list!") 122 | $Checkbox_exact = GUICtrlCreateCheckbox("Exact", 325, 275, 45, 20) 123 | GUICtrlSetTip($Checkbox_exact, "Exact from left!") 124 | $Label_file = GuiCtrlCreateLabel("File", 20, 300, 38, 20, $SS_CENTER + $SS_CENTERIMAGE + $SS_SUNKEN + $SS_NOTIFY) 125 | GUICtrlSetBkColor($Label_file, $COLOR_FUCHSIA) 126 | GUICtrlSetColor($Label_file, $COLOR_BLUE) 127 | GUICtrlSetFont($Label_file, 7, 600, 0, "Small Fonts") 128 | ;GUICtrlSetTip($Label_file, "Dropped game file!") 129 | $Input_file = GUICtrlCreateInput("", 58, 300, 310, 20) 130 | ;GUICtrlSetBkColor($Input_file, 0xBBFFBB) 131 | GUICtrlSetBkColor($Input_file, 0xFFD5FF) 132 | GUICtrlSetTip($Input_file, "Dropped game file!") 133 | ; 134 | $Group_drop = GuiCtrlCreateGroup("Drop Zone", 390, 10, 180, 110) 135 | $Label_drop = GUICtrlCreateLabel($target, 400, 30, 160, 80, $SS_CENTER) 136 | GUICtrlSetFont($Label_drop, 9, 600, 0, "Small Fonts") 137 | GUICtrlSetState($Label_drop, $GUI_DROPACCEPTED) 138 | GUICtrlSetTip($Label_drop, "Drag & Drop downloaded game files here!") 139 | $boxcol = $COLOR_YELLOW 140 | $textcol = $COLOR_RED 141 | GUICtrlSetBkColor($Label_drop, $boxcol) 142 | GUICtrlSetColor($Label_drop, $textcol) 143 | ; 144 | $Button_get = GuiCtrlCreateButton("RETRIEVE LIST OF GAMES", 390, 130, 180, 40) 145 | GUICtrlSetFont($Button_get, 7, 600, 0, "Small Fonts") 146 | GUICtrlSetTip($Button_get, "Get game title from GOG library!") 147 | ; 148 | $Group_status = GuiCtrlCreateGroup("Status", 390, 175, 180, 50) 149 | $Label_status = GuiCtrlCreateLabel("Waiting", 400, 193, 160, 22, $SS_CENTER + $SS_CENTERIMAGE + $SS_SUNKEN) 150 | GUICtrlSetBkColor($Label_status, $COLOR_BLUE) 151 | GUICtrlSetColor($Label_status, $COLOR_WHITE) 152 | GUICtrlSetFont($Label_status, 9, 600) 153 | ; 154 | ;$Button_verify = GuiCtrlCreateButton("VERIFY DROPPED FILE", 390, 235, 180, 40) 155 | ;GUICtrlSetFont($Button_verify, 8.5, 600) 156 | $Button_verify = GuiCtrlCreateButton("VERIFY DROPPED FILE", 390, 235, 150, 40) 157 | GUICtrlSetFont($Button_verify, 7, 600, 0, "Small Fonts") 158 | GUICtrlSetTip($Button_verify, "Verify the dropped game file!") 159 | ; 160 | $Button_log = GuiCtrlCreateButton("Log", 545, 240, 25, 30, $BS_ICON) 161 | GUICtrlSetTip($Button_log, "Log Record!") 162 | ; 163 | $Checkbox_update = GUICtrlCreateCheckbox("Update", 393, 277, 57, 20) 164 | GUICtrlSetTip($Checkbox_update, "Update selected game title detail!") 165 | ; 166 | $Button_setup = GuiCtrlCreateButton("SETUP", 390, 300, 60, 35) 167 | GUICtrlSetFont($Button_setup, 8, 600) 168 | GUICtrlSetTip($Button_setup, "Program Setup!") 169 | ; 170 | $Button_info = GuiCtrlCreateButton("Info", 460, 285, 50, 50, $BS_ICON) 171 | GUICtrlSetTip($Button_info, "Program Information!") 172 | ; 173 | $Button_exit = GuiCtrlCreateButton("EXIT", 520, 285, 50, 50, $BS_ICON) 174 | GUICtrlSetTip($Button_exit, "Exit / Close / Quit the program!") 175 | ; 176 | ; OS SETTINGS 177 | $user = @SystemDir & "\user32.dll" 178 | $shell = @SystemDir & "\shell32.dll" 179 | $icoI = -5 180 | $icoS = -23 181 | $icoT = -71 182 | $icoX = -4 183 | GUICtrlSetImage($Button_find, $shell, $icoS, 0) 184 | GUICtrlSetImage($Button_log, $shell, $icoT, 0) 185 | GUICtrlSetImage($Button_info, $user, $icoI, 1) 186 | GUICtrlSetImage($Button_exit, $user, $icoX, 1) 187 | ; 188 | ; SETTINGS 189 | GUICtrlSetState($Checkbox_exact, $GUI_CHECKED) 190 | ; 191 | $update = 1 192 | GUICtrlSetState($Checkbox_update, $update) 193 | ; 194 | FillTheGamesList() 195 | ; 196 | $OSget = IniRead($inifle, "Update Options", "OS", "") 197 | If $OSget = "" Then 198 | $OSget = "windows linux" 199 | IniWrite($inifle, "Update Options", "OS", $OSget) 200 | EndIf 201 | ; 202 | $lang = IniRead($inifle, "Update Options", "language", "") 203 | If $lang = "" Then 204 | $lang = "en" 205 | $val = InputBox("Language Query", "Please enter the two character" _ 206 | & @LF & "code for your language ... plus" _ 207 | & @LF & "any other languages you wish" _ 208 | & @LF & "to download for, using a space" _ 209 | & @LF & "as divider between." & @LF _ 210 | & @LF & "i.e. de en fr", _ 211 | $lang, "", 100, 205, Default, Default, 0, $SimpleGUI) 212 | If Not @error Then 213 | $lang = $val 214 | EndIf 215 | IniWrite($inifle, "Update Options", "language", $lang) 216 | EndIf 217 | ; 218 | If Not FileExists($cookies) Then 219 | GUICtrlSetState($Button_get, $GUI_DISABLE) 220 | GUICtrlSetState($Button_verify, $GUI_DISABLE) 221 | EndIf 222 | 223 | GuiSetState(@SW_SHOWNORMAL, $SimpleGUI) 224 | While 1 225 | $msg = GuiGetMsg() 226 | Select 227 | Case $msg = $GUI_EVENT_CLOSE Or $msg = $Button_exit 228 | ; Exit / Close / Quit the program 229 | $winpos = WinGetPos($SimpleGUI, "") 230 | $left = $winpos[0] 231 | If $left < 0 Then 232 | $left = 2 233 | ElseIf $left > @DesktopWidth - $width Then 234 | $left = @DesktopWidth - $width - 25 235 | EndIf 236 | IniWrite($inifle, "Program Window", "left", $left) 237 | $top = $winpos[1] 238 | If $top < 0 Then 239 | $top = 2 240 | ElseIf $top > @DesktopHeight - $height Then 241 | $top = @DesktopHeight - $height - 30 242 | EndIf 243 | IniWrite($inifle, "Program Window", "top", $top) 244 | ; 245 | GUIDelete($SimpleGUI) 246 | ExitLoop 247 | Case $msg = $GUI_EVENT_DROPPED 248 | $srcfle = @GUI_DragFile 249 | $atts = FileGetAttrib($srcfle) 250 | If StringInStr($atts, "D") > 0 Then 251 | MsgBox(262192, "Drop Error", "Folders are not supported!", 0, $SimpleGUI) 252 | Else 253 | _PathSplit($srcfle, $drv, $dir, $fnam, $fext) 254 | If $fext = ".exe" Or $fext = ".bin" Or $fext = ".rar" Or $fext = ".zip" Or $fext = ".7z" Or $fext = ".sh" Then 255 | GUICtrlSetData($Input_file, $srcfle) 256 | IniWrite($inifle, "Last File", "path", $srcfle) 257 | $file = StringSplit($srcfle, "\", 1) 258 | $file = $file[$file[0]] 259 | $file = StringSplit($file, "_", 1) 260 | $find = $file[1] 261 | If $find = "gog" Or $find = "setup" Or $find = "patch" Then 262 | $find = $file[2] 263 | If $find = "the" Or $find = "a" Then 264 | $find = $find & " " & $file[3] 265 | EndIf 266 | ElseIf $find = "the" Or $find = "a" Then 267 | $find = $find & " " & $file[2] 268 | EndIf 269 | GUICtrlSetData($Input_title, $find) 270 | GUICtrlSetData($Input_name, "") 271 | If GUICtrlRead($Label_status) <> "Waiting" Then 272 | GUICtrlSetData($Label_status, "Waiting") 273 | GUICtrlSetBkColor($Label_status, $COLOR_BLUE) 274 | GUICtrlSetColor($Label_status, $COLOR_WHITE) 275 | GUICtrlSetFont($Label_status, 9, 600) 276 | EndIf 277 | Else 278 | MsgBox(262192, "Drop Error", "File type not supported!", 0, $SimpleGUI) 279 | EndIf 280 | EndIf 281 | Case $msg = $Button_verify 282 | ; Verify the dropped game file 283 | $ans = MsgBox(262177, "Verify Query", _ 284 | "Verify integrity of dropped file for selected game title?", 0, $SimpleGUI) 285 | If $ans = 1 Then 286 | $name = GUICtrlRead($Input_name) 287 | $title = GUICtrlRead($Input_title) 288 | If $name <> "" And $title <> "" Then 289 | If $title = IniRead($gamesfle, $name, "title", "") Then 290 | $srcfle = GUICtrlRead($Input_file) 291 | If $srcfle <> "" Then 292 | GUICtrlSetBkColor($Label_status, 0xFFCE9D) 293 | GUICtrlSetColor($Label_status, $COLOR_BLUE) 294 | GUICtrlSetFont($Label_status, 9, 600) 295 | _FileWriteLog($logfle, "NAME = " & $name) 296 | _FileWriteLog($logfle, "TITLE = " & $title) 297 | $updated = IniRead($gamesfle, $name, "updated", "") 298 | If $updated <> "" Then 299 | $date = _NowCalc() 300 | $diff = _DateDiff('h', $updated, $date) 301 | If $diff >= 24 And $update = 4 Then 302 | $ans = MsgBox(262177, "Update Query", _ 303 | "This game title has been checked before," & @LF & _ 304 | "but that was more than 24 hours ago." & @LF & @LF & _ 305 | "OK = Update the details again." & @LF & _ 306 | "CANCEL = Continue with existing." & @LF & @LF & _ 307 | "NOTE - CANCEL resets for 24 hours.", 0, $SimpleGUI) 308 | If $ans = 1 Then 309 | $updated = "" 310 | ElseIf $ans = 2 Then 311 | IniWrite($gamesfle, $name, "updated", $date) 312 | EndIf 313 | ElseIf $diff < 24 And $update = 1 Then 314 | $ans = MsgBox(262177, "Update Query", _ 315 | "This game title has been checked before," & @LF & _ 316 | "but that was less than 24 hours ago." & @LF & @LF & _ 317 | "OK = Update the details again." & @LF & _ 318 | "CANCEL = Continue with existing.", 0, $SimpleGUI) 319 | If $ans = 2 Then 320 | $update = 4 321 | GUICtrlSetState($Checkbox_update, $update) 322 | EndIf 323 | EndIf 324 | ;ElseIf $update = 4 Then 325 | EndIf 326 | If $update = 1 Or $updated = "" Then 327 | GUICtrlSetData($Label_status, "Downloading Data") 328 | If FileExists($resumeman) Then FileDelete($resumeman) 329 | FileChangeDir(@ScriptDir) 330 | If $OSget = "" Then $OSget = "windows linux" 331 | If $lang = "" Then $lang = "en" 332 | RunWait(@ComSpec & ' /c gogrepo.py update -os ' & $OSget & ' -lang ' & $lang & ' -id ' & $title, @ScriptDir) 333 | $updated = _NowCalc() 334 | IniWrite($gamesfle, $name, "updated", $updated) 335 | EndIf 336 | _PathSplit($srcfle, $drv, $dir, $fnam, $fext) 337 | $srcfld = StringTrimRight($drv & $dir, 1) 338 | $file = $fnam & $fext 339 | _FileWriteLog($logfle, "VERIFYING = " & $file) 340 | GUICtrlSetData($Label_status, "Verifying File") 341 | $res = _FileReadToArray($manifest, $array, 1) 342 | If $res = 1 Then 343 | $err = "" 344 | $out = "" 345 | $results = "" 346 | ; 347 | $exe = "" 348 | $md5 = "" 349 | $rar = "" 350 | $sh = "" 351 | $size = "" 352 | $zip = "" 353 | For $a = 2 To $array[0] 354 | $line = $array[$a] 355 | If $line <> "" Then 356 | If StringInStr($line, $file) > 0 Then 357 | _FileWriteLog($logfle, "File found in manifest.") 358 | $a = $a - 1 359 | If $fext = ".exe" Or $fext = ".bin" Or $fext = ".sh" Then 360 | GUICtrlSetData($Label_status, "Getting MD5") 361 | $line = $array[$a] 362 | If StringInStr($line, "'md5':") > 0 Then 363 | $md5 = $line 364 | $md5 = StringSplit($md5, "'", 1) 365 | $md5 = $md5[$md5[0]-1] 366 | $md5 = StringSplit($md5, "'", 1) 367 | $md5 = $md5[$md5[0]] 368 | EndIf 369 | ElseIf $fext = ".zip" Or $fext = ".7z" Then 370 | If FileExists($7zip) Then 371 | If $fext = ".zip" Then 372 | GUICtrlSetData($Label_status, "Checking ZIP file") 373 | ElseIf $fext = ".7z" Then 374 | GUICtrlSetData($Label_status, "Checking 7Z file") 375 | EndIf 376 | FileChangeDir($foldzip) 377 | $ret = Run('7za.exe t "' & $srcfle & '"', "", @SW_SHOW, $STDERR_MERGED) 378 | ;$pid = $ret 379 | While 1 380 | $out = StdoutRead($ret) 381 | If @error Then 382 | ; Exit the loop if the process closes or StdoutRead returns an error. 383 | ; NOTE - If process closes without error, then two Exitloops should occur, without getting an error $val. 384 | While 1 385 | $out = StderrRead($ret) 386 | If @error Then 387 | ; Exit the loop if the process closes or StderrRead returns an error. 388 | ExitLoop 389 | EndIf 390 | ;MsgBox($MB_SYSTEMMODAL, "Stderr Read:", $out) 391 | $err = 1 392 | WEnd 393 | If $out <> "" Then $results &= $out 394 | ExitLoop 395 | Else 396 | If $out <> "" Then 397 | $output = StringSplit($out, @CR, 1) 398 | For $o = 1 To $output[0] 399 | $out = $output[$o] 400 | $out = StringStripWS($out, 7) 401 | If $out <> "" Then 402 | $out = $out & @CRLF 403 | If StringInStr($out, "Everything is Ok") > 0 Then 404 | $zip = "Passed." 405 | ;MsgBox($MB_SYSTEMMODAL, "Stderr Read:", $out) 406 | EndIf 407 | $results &= $out 408 | EndIf 409 | Next 410 | EndIf 411 | EndIf 412 | Wend 413 | If $zip <> "Passed." Then 414 | $zip = "Failed." 415 | EndIf 416 | If $fext = ".zip" Then 417 | $zip = "ZIP " & $zip 418 | ElseIf $fext = ".7z" Then 419 | $zip = "7Z " & $zip 420 | EndIf 421 | Else 422 | $zip = "7-Zip Missing." 423 | EndIf 424 | ElseIf $fext = ".rar" Then 425 | If FileExists($unrar) Then 426 | GUICtrlSetData($Label_status, "Checking RAR file") 427 | FileChangeDir($foldrar) 428 | $ret = Run('UnRAR.exe t "' & $srcfle & '"', "", @SW_SHOW, $STDERR_MERGED) 429 | ;$pid = $ret 430 | While 1 431 | $out = StdoutRead($ret) 432 | If @error Then 433 | ; Exit the loop if the process closes or StdoutRead returns an error. 434 | ; NOTE - If process closes without error, then two Exitloops should occur, without getting an error $val. 435 | While 1 436 | $out = StderrRead($ret) 437 | If @error Then 438 | ; Exit the loop if the process closes or StderrRead returns an error. 439 | ExitLoop 440 | EndIf 441 | ;MsgBox($MB_SYSTEMMODAL, "Stderr Read:", $out) 442 | $err = 1 443 | WEnd 444 | If $out <> "" Then $results &= $out 445 | ExitLoop 446 | Else 447 | If $out <> "" Then 448 | $output = StringSplit($out, @CR, 1) 449 | For $o = 1 To $output[0] 450 | $out = $output[$o] 451 | $out = StringStripWS($out, 7) 452 | If $out <> "" Then 453 | $out = $out & @CRLF 454 | If StringInStr($out, "All OK") > 0 Then 455 | $rar = "RAR Passed." 456 | ;MsgBox($MB_SYSTEMMODAL, "Stderr Read:", $out) 457 | EndIf 458 | $results &= $out 459 | EndIf 460 | Next 461 | EndIf 462 | EndIf 463 | Wend 464 | If $rar <> "RAR Passed." Then $rar = "RAR Failed." 465 | Else 466 | $rar = "UnRAR Missing." 467 | EndIf 468 | EndIf 469 | If $md5 = "" Then 470 | If $fext = ".exe" Or $fext = ".bin" Then 471 | If FileExists($7zip) Then 472 | If $fext = ".exe" Then 473 | GUICtrlSetData($Label_status, "Checking EXE file") 474 | ElseIf $fext = ".bin" Then 475 | GUICtrlSetData($Label_status, "Checking BIN file") 476 | EndIf 477 | FileChangeDir($foldzip) 478 | $ret = Run('7za.exe t -t# "' & $srcfle & '"', "", @SW_HIDE, $STDERR_MERGED) 479 | ;$pid = $ret 480 | While 1 481 | $out = StdoutRead($ret) 482 | If @error Then 483 | ; Exit the loop if the process closes or StdoutRead returns an error. 484 | ; NOTE - If process closes without error, then two Exitloops should occur, without getting an error $val. 485 | While 1 486 | $out = StderrRead($ret) 487 | If @error Then 488 | ; Exit the loop if the process closes or StderrRead returns an error. 489 | ExitLoop 490 | EndIf 491 | ;MsgBox($MB_SYSTEMMODAL, "Stderr Read:", $out) 492 | $err = 1 493 | WEnd 494 | If $out <> "" Then $results &= $out 495 | ExitLoop 496 | Else 497 | If $out <> "" Then 498 | $output = StringSplit($out, @CR, 1) 499 | For $o = 1 To $output[0] 500 | $out = $output[$o] 501 | $out = StringStripWS($out, 7) 502 | If $out <> "" Then 503 | $out = $out & @CRLF 504 | If StringInStr($out, "Everything is Ok") > 0 Then 505 | $exe = "Passed." 506 | ;MsgBox($MB_SYSTEMMODAL, "Stderr Read:", $out) 507 | EndIf 508 | $results &= $out 509 | EndIf 510 | Next 511 | EndIf 512 | EndIf 513 | Wend 514 | If $exe <> "Passed." Then 515 | $exe = "Failed." 516 | EndIf 517 | If $fext = ".exe" Then 518 | $exe = "EXE " & $exe 519 | ElseIf $fext = ".bin" Then 520 | $exe = "BIN " & $exe 521 | EndIf 522 | Else 523 | $exe = "7-Zip Missing." 524 | EndIf 525 | ElseIf $fext = ".sh" Then 526 | If FileExists($7zip) Then 527 | GUICtrlSetData($Label_status, "Checking SH file") 528 | FileChangeDir($foldzip) 529 | $ret = Run('7za.exe t -tzip "' & $srcfle & '"', "", @SW_SHOW, $STDERR_MERGED) 530 | ;$pid = $ret 531 | While 1 532 | $out = StdoutRead($ret) 533 | If @error Then 534 | ; Exit the loop if the process closes or StdoutRead returns an error. 535 | ; NOTE - If process closes without error, then two Exitloops should occur, without getting an error $val. 536 | While 1 537 | $out = StderrRead($ret) 538 | If @error Then 539 | ; Exit the loop if the process closes or StderrRead returns an error. 540 | ExitLoop 541 | EndIf 542 | ;MsgBox($MB_SYSTEMMODAL, "Stderr Read:", $out) 543 | $err = 1 544 | WEnd 545 | If $out <> "" Then $results &= $out 546 | ExitLoop 547 | Else 548 | If $out <> "" Then 549 | $output = StringSplit($out, @CR, 1) 550 | For $o = 1 To $output[0] 551 | $out = $output[$o] 552 | $out = StringStripWS($out, 7) 553 | If $out <> "" Then 554 | $out = $out & @CRLF 555 | If StringInStr($out, "Everything is Ok") > 0 Then 556 | $sh = "SH Passed." 557 | ;MsgBox($MB_SYSTEMMODAL, "Stderr Read:", $out) 558 | EndIf 559 | $results &= $out 560 | EndIf 561 | Next 562 | EndIf 563 | EndIf 564 | Wend 565 | If $sh <> "SH Passed." Then $sh = "SH Failed." 566 | Else 567 | $sh = "7-Zip Missing." 568 | EndIf 569 | EndIf 570 | EndIf 571 | GUICtrlSetData($Label_status, "Getting Size") 572 | $a = $a + 3 573 | $line = $array[$a] 574 | If StringInStr($line, "'size':") < 1 Then 575 | $a = $a + 1 576 | $line = $array[$a] 577 | If StringInStr($line, "'size':") < 1 Then 578 | $a = $a + 1 579 | $line = $array[$a] 580 | EndIf 581 | EndIf 582 | If StringInStr($line, "'size':") > 0 Then 583 | $size = $line 584 | $size = StringSplit($size, ",", 1) 585 | $size = $size[1] 586 | $size = StringSplit($size, "'size':", 1) 587 | ;$size = StringSplit($size, " ", 1) 588 | $size = $size[2] 589 | $size = StringStripWS($size, 3) 590 | ;MsgBox(262192, "Got Here", $size, 0, $SimpleGUI) 591 | If StringIsDigit($size) = 0 Then $size = "" 592 | EndIf 593 | ExitLoop 594 | EndIf 595 | EndIf 596 | Next 597 | ;MsgBox(262192, "Data", "MD5 = " & $md5 & @LF & "Size = " & $size, 0, $SimpleGUI) 598 | $match = "" 599 | If $md5 <> "" Then 600 | If FileExists($fsum) Then 601 | GUICtrlSetData($Label_status, "Comparing MD5") 602 | FileChangeDir(@ScriptDir & "\FSUM") 603 | RunWait(@ComSpec & ' /c fsum.exe -jnc -md5 -d"' & $srcfld & '" ' & $file & ' >"' & $resfle & '"') 604 | $res = _FileReadToArray($resfle, $array, 1) 605 | If $res = 1 Then 606 | $match = $array[1] 607 | $match = StringSplit($match, " ", 1) 608 | $match = $match[1] 609 | If $match = $md5 Then 610 | $match = "MD5 Passed." 611 | Else 612 | $match = "MD5 Failed." 613 | EndIf 614 | Else 615 | $match = "FSUM Error." 616 | EndIf 617 | Else 618 | $match = "FSUM Missing." 619 | EndIf 620 | Else 621 | If (($fext = ".exe" Or $fext = ".bin") And $exe = "") Or ($fext = ".sh" And $sh = "") Then 622 | $match = "MD5 Missing." 623 | ElseIf $fext = ".exe" Or $fext = ".bin" Or $fext = ".sh" Then 624 | _FileWriteLog($logfle, "MD5 Missing.") 625 | EndIf 626 | EndIf 627 | If $exe <> "" Then 628 | $match = $exe 629 | EndIf 630 | If $rar <> "" Then 631 | $match = $rar 632 | EndIf 633 | If $sh <> "" Then 634 | $match = $sh 635 | EndIf 636 | If $zip <> "" Then 637 | $match = $zip 638 | EndIf 639 | If $size <> "" Then 640 | If FileGetSize($srcfle) = $size Then 641 | $match = $match & " Size Passed." 642 | Else 643 | $match = $match & " Size Failed." 644 | EndIf 645 | Else 646 | $match = " Size Missing." 647 | EndIf 648 | $match = StringStripWS($match, 1) 649 | _FileWriteLog($logfle, $match) 650 | If StringInStr($match, "Failed") > 0 Or StringInStr($match, "Missing") > 0 Or StringInStr($match, "Error") > 0 Then 651 | GUICtrlSetBkColor($Label_status, $COLOR_WHITE) 652 | GUICtrlSetColor($Label_status, $COLOR_RED) 653 | Else 654 | GUICtrlSetBkColor($Label_status, $COLOR_LIME) 655 | GUICtrlSetColor($Label_status, $COLOR_BLACK) 656 | EndIf 657 | GUICtrlSetFont($Label_status, 7, 600, 0, "Small Fonts") 658 | GUICtrlSetData($Label_status, $match) 659 | Else 660 | MsgBox(262192, "Read Error", "Manifest could not be opened!", 0, $SimpleGUI) 661 | EndIf 662 | Else 663 | MsgBox(262192, "Source Error", "File is missing!", 0, $SimpleGUI) 664 | EndIf 665 | Else 666 | MsgBox(262192, "Game Selection Error", "Title and Name pairing are incorrect!", 0, $SimpleGUI) 667 | EndIf 668 | Else 669 | MsgBox(262192, "Game Selection Error", "Title not selected correctly!", 0, $SimpleGUI) 670 | EndIf 671 | EndIf 672 | Case $msg = $Button_setup 673 | ; Setup username and password 674 | GuiSetState(@SW_DISABLE, $SimpleGUI) 675 | SetupGUI() 676 | GuiSetState(@SW_ENABLE, $SimpleGUI) 677 | If FileExists($cookies) Then 678 | GUICtrlSetState($Button_get, $GUI_ENABLE) 679 | GUICtrlSetState($Button_verify, $GUI_ENABLE) 680 | EndIf 681 | Case $msg = $Button_log 682 | ; Log Record 683 | If FileExists($logfle) Then ShellExecute($logfle) 684 | Case $msg = $Button_info 685 | ; Program Information 686 | $ans = MsgBox(262209 + 256, "Program Information", _ 687 | "This program is a limited frontend GUI for 'gogrepo.py' (Python)" & @LF & _ 688 | "program that can get manifest detail from your GOG.com games" & @LF & _ 689 | "library, to verify the integrity of specified game files." & @LF & @LF & _ 690 | "GOGRepo Simple GUI program is totally reliant on 'gogrepo.py'," & @LF & _ 691 | "for game detail, but has some handy abilities of its own, when it" & @LF & _ 692 | "comes to verifying your downloaded GOG game file types, etc." & @LF & @LF & _ 693 | "Before starting with GOGRepo Simple GUI, you need a cookie file," & @LF & _ 694 | "which can be created, if you haven't got one, via SETUP button." & @LF & @LF & _ 695 | "REQUIREMENTS" & @LF & _ 696 | "------------------" & @LF & _ 697 | "Python needs to be installed on your PC." & @LF & _ 698 | "Python needs to have the html5lib (etc) installed." & @LF & _ 699 | "If installing manually html2text is optional but advised." & @LF & _ 700 | "If using Kalanyr's forked version of gogrepo.py, then some other" & @LF & _ 701 | "Python libraries are required, and installed from SETUP window." & @LF & _ 702 | "The gogrepo.py script needs to be located in the same folder as" & @LF & _ 703 | "GOGRepo Simple GUI. We call this the main or parent folder." & @LF & _ 704 | "The free program FSUM is required for MD5 checking, and also" & @LF & _ 705 | "needs to be located in the main folder, as an FSUM sub-folder." & @LF & _ 706 | "The free program 7-Zip is required for ZIP & 7Z checking, and" & @LF & _ 707 | "needs to be located in the main folder, as a 7-Zip sub-folder." & @LF & _ 708 | "7-Zip can also be used for EXE, BIN or SH files if MD5 is missing." & @LF & _ 709 | "The free program UnRAR is required for RAR checking, and also" & @LF & _ 710 | "needs to be located in the main folder, as an UnRAR sub-folder." & @LF & @LF & _ 711 | "Click OK to see more information.", 0, $SimpleGUI) 712 | If $ans = 1 Then 713 | MsgBox(262208, "Program Information (continued)", _ 714 | "DISCLAIMER - As always, you use my programs at your own" & @LF & _ 715 | "risk. That said, I strive to ensure they work safe. I also cannot" & @LF & _ 716 | "guarantee the results (or my read) of the 3rd party programs." & @LF & _ 717 | "This is Freeware that I have voluntarily given many hours to." & @LF & @LF & _ 718 | "BIG THANKS to those responsible for 'gogrepo.py' versions." & @LF & _ 719 | "(woolymethodman, Kalanyr, etc)" & @LF & @LF & _ 720 | "Praise & BIG thanks as always, to Jon & team for free AutoIt." & @LF & @LF & _ 721 | "© August 2020 - Created by Timboli (aka TheSaint). (" & $version & ")", 0, $SimpleGUI) 722 | EndIf 723 | Case $msg = $Button_get 724 | ; Get game title from GOG library 725 | GUICtrlSetBkColor($Label_status, $COLOR_RED) 726 | GUICtrlSetColor($Label_status, $COLOR_WHITE) 727 | GUICtrlSetFont($Label_status, 9, 600) 728 | GUICtrlSetData($Label_status, "Retrieving Titles") 729 | FileChangeDir(@ScriptDir) 730 | If FileExists($resumeman) Then FileDelete($resumeman) 731 | _FileCreate($titlist) 732 | GUICtrlSetData($List_games, "") 733 | ; Create a list of all titles in the resume manifest. 734 | _FileWriteLog($logfle, "Getting list of game titles.") 735 | $ret = Run(@ComSpec & ' /c gogrepo.py update', @ScriptDir, @SW_SHOW, $STDERR_MERGED) ;@SW_HIDE 736 | $pid = $ret 737 | $out = "" 738 | $results = "" 739 | While 1 740 | $out = StdoutRead($ret) 741 | If @error Then 742 | ; Exit the loop if the process closes or StdoutRead returns an error. 743 | ; NOTE - If process closes without error, then two Exitloops should occur, without getting an error $val. 744 | While 1 745 | $out = StderrRead($ret) 746 | If @error Then 747 | ; Exit the loop if the process closes or StderrRead returns an error. 748 | ExitLoop 749 | EndIf 750 | MsgBox($MB_SYSTEMMODAL, "Stderr Read:", $out) 751 | $err = 1 752 | WEnd 753 | ;If $out <> "" Then $results &= $out 754 | ;If $out <> "" Then FileWriteLine($file, "LAST = " & $out) 755 | ExitLoop 756 | Else 757 | $out = StringStripWS($out, 3) 758 | If $out <> "" Then 759 | ;_FileWriteLog($stagefile, $out) 760 | $results &= @CRLF & $out 761 | $results = StringStripWS($results, 7) 762 | If StringInStr($results, "saved resume manifest") > 0 Then 763 | $wintit = @SystemDir & "\cmd.exe" 764 | $wins = WinList($wintit, "") 765 | For $w = 1 To $wins[0][0] 766 | $handle = $wins[$w][1] 767 | $cmdpid = WinGetProcess($handle, "") 768 | If $cmdpid = $pid Then 769 | WinClose($handle, "") 770 | GUICtrlSetData($Label_status, "Bingo!") 771 | Sleep(1000) 772 | EndIf 773 | Next 774 | If ProcessExists($pid) Then ProcessClose($pid) 775 | ExitLoop 776 | EndIf 777 | EndIf 778 | EndIf 779 | If ProcessExists($pid) = 0 Then ExitLoop 780 | WEnd 781 | ; Create a list of all titles. 782 | GUICtrlSetData($Label_status, "Extracting Titles") 783 | If FileExists($resumeman) Then 784 | $res = _FileReadToArray($resumeman, $array, 1) 785 | If $res = 1 Then 786 | $entries = "" 787 | $entry = "" 788 | $name = "" 789 | $names = "" 790 | $title = "" 791 | For $a = 2 To $array[0] 792 | $line = $array[$a] 793 | If $line <> "" Then 794 | If StringInStr($line, "'long_title': '") > 0 Then 795 | $line = StringSplit($line, "'long_title': '", 1) 796 | $line = $line[2] 797 | $line = StringSplit($line, "',", 1) 798 | $line = $line[1] 799 | $name = StringStripWS($line, 7) 800 | ElseIf StringInStr($line, "'long_title': ") > 0 Then 801 | $line = StringSplit($line, "'long_title': ", 1) 802 | $line = $line[2] 803 | $line = StringSplit($line, '",', 1) 804 | $line = $line[1] 805 | $line = StringReplace($line, '"', '') 806 | $name = StringStripWS($line, 7) 807 | ElseIf StringInStr($line, "'title': '") > 0 Then 808 | $line = StringSplit($line, "'title': '", 1) 809 | $line = $line[2] 810 | $line = StringSplit($line, "'}", 1) 811 | $line = $line[1] 812 | $title = StringStripWS($line, 8) 813 | EndIf 814 | If $name <> "" And $title <> "" Then 815 | GetAllowedName() 816 | If $names = "" Then 817 | $names = $name 818 | Else 819 | $names = $names & @CRLF & $name 820 | EndIf 821 | $entry = "[" & $name & "]" & @CRLF 822 | $entry = $entry & "title=" & $title & @CRLF 823 | If $entries = "" Then 824 | $entries = $entry 825 | Else 826 | $entries = $entries & $entry 827 | EndIf 828 | $name = "" 829 | $title = "" 830 | EndIf 831 | EndIf 832 | Next 833 | GUICtrlSetData($Label_status, "Finalizing") 834 | If $entries <> "" Then 835 | $open = FileOpen($gamesfle, 2) 836 | FileWriteLine($open, $entries) 837 | FileClose($open) 838 | $entries = "" 839 | EndIf 840 | If $names <> "" Then 841 | $names = StringSplit($names, @CRLF, 1) 842 | _ArraySort($names, 0, 1) 843 | $names = _ArrayToString($names, @CRLF, 1) 844 | $file = FileOpen($titlist, 2) 845 | FileWrite($file, $names & @CRLF) 846 | FileClose($file) 847 | $names = "" 848 | EndIf 849 | Else 850 | MsgBox(262192, "Extract Error", "Could not get titles!", 0, $SimpleGUI) 851 | EndIf 852 | Else 853 | MsgBox(262192, "Update Error", "Could not find the resume manifest file!", 0, $SimpleGUI) 854 | EndIf 855 | _FileWriteLog($logfle, "Titles retrieved.") 856 | FillTheGamesList() 857 | GUICtrlSetBkColor($Label_status, $COLOR_BLUE) 858 | GUICtrlSetData($Label_status, "Finished") 859 | Case $msg = $Button_find 860 | ; Find the specified game title on list 861 | $title = GUICtrlRead($Input_title) 862 | If $title <> "" Then 863 | GUICtrlSetData($Input_name, "") 864 | $find = $title 865 | $ind = _GUICtrlListBox_GetCurSel($List_games) 866 | If GUICtrlRead($Checkbox_exact) = $GUI_CHECKED Then 867 | $ind = _GUICtrlListBox_SelectString($List_games, $title, $ind) 868 | Else 869 | $ind = _GUICtrlListBox_FindInText($List_games, $title, $ind, True) 870 | EndIf 871 | If $ind > -1 Then 872 | _GUICtrlListBox_SetCurSel($List_games, $ind) 873 | ;_GUICtrlListBox_ClickItem($List_games, $ind) 874 | EndIf 875 | EndIf 876 | Case $msg = $Checkbox_update 877 | ; Update selected game title detail 878 | If GUICtrlRead($Checkbox_update) = $GUI_CHECKED Then 879 | $update = 1 880 | Else 881 | $update = 4 882 | EndIf 883 | Case $msg = $Label_title 884 | ; Click to restore last search text to Title input field 885 | GUICtrlSetData($Input_title, $find) 886 | Case $msg = $Label_file 887 | ; Click to find nearest Title beginning with first word 888 | $srcfle = GUICtrlRead($Input_file) 889 | If $srcfle <> "" Then 890 | $file = StringSplit($srcfle, "\", 1) 891 | $file = $file[$file[0]] 892 | $file = StringReplace($file, "setup_", "") 893 | $file = StringSplit($file, "_", 1) 894 | $find = $file[1] 895 | If $find = "the" Or $find = "a" Then 896 | $find = $find & " " & $file[2] 897 | EndIf 898 | GUICtrlSetData($Input_title, $find) 899 | GUICtrlSetData($Input_name, "") 900 | If GUICtrlRead($Label_status) <> "Waiting" Then 901 | GUICtrlSetData($Label_status, "Waiting") 902 | GUICtrlSetBkColor($Label_status, $COLOR_BLUE) 903 | GUICtrlSetColor($Label_status, $COLOR_WHITE) 904 | GUICtrlSetFont($Label_status, 9, 600) 905 | EndIf 906 | Else 907 | $srcfle = IniRead($inifle, "Last File", "path", "") 908 | GUICtrlSetData($Input_file, $srcfle) 909 | EndIf 910 | Case $msg = $List_games 911 | ; List of games 912 | $name = GUICtrlRead($List_games) 913 | GUICtrlSetData($Input_name, $name) 914 | $title = IniRead($gamesfle, $name, "title", "error") 915 | GUICtrlSetData($Input_title, $title) 916 | Case Else 917 | ;;; 918 | EndSelect 919 | WEnd 920 | EndFunc ;=> MainGUI 921 | 922 | Func SetupGUI() 923 | ; Script generated by GUIBuilder Prototype 0.9 924 | Local $Button_attach, $Button_close, $Button_cookie, $Button_install, $Combo_lang, $Combo_langs, $Combo_OS 925 | Local $Group_lang, $Input_pass, $Input_user, $Label_info, $Label_lang, $Label_langs, $Label_pass, $Label_user 926 | ; 927 | Local $above, $combos, $high, $langs, $long, $OSes, $password, $side, $username, $wide 928 | ; 929 | $wide = 235 930 | $high = 430 931 | $val = $high - $height 932 | $side = IniRead($inifle, "Setup Window", "left", $left) 933 | $above = IniRead($inifle, "Setup Window", "top", $top - $val) 934 | $SetupGUI = GuiCreate("Setup - Python & Cookie etc", $wide, $high, $side, $above, $WS_OVERLAPPED + $WS_CAPTION _ 935 | + $WS_SYSMENU + $WS_VISIBLE + $WS_CLIPSIBLINGS, $WS_EX_TOPMOST, $SimpleGUI) 936 | GUISetBkColor(0xFFFFB0, $SetupGUI) 937 | ; 938 | ; CONTROLS 939 | $Label_info = GuiCtrlCreateLabel("Before using gogrepo.py to interact with your" _ 940 | & @LF & "GOG game library, you will need a cookie file." _ 941 | & @LF & "You also need html5lib etc installed in Python." _ 942 | & @LF & "Both those require an active web connection." & @LF _ 943 | & @LF & "Please supply your GOG username (or email)" _ 944 | & @LF & "and password, to have it create a cookie file" _ 945 | & @LF & "to use with GOG. Install Python etc first." & @LF _ 946 | & @LF & "GOGRepo GUI does not store that detail.", 11, 10, 215, 130) 947 | ; 948 | $Button_install = GuiCtrlCreateButton("INSTALL Required Libraries", 10, 150, 215, 35) 949 | GUICtrlSetTip($Button_install, "Install html5lib, requests, pyopenssl & html2text in Python!") 950 | GUICtrlSetFont($Button_install, 9, 600) 951 | ; 952 | $Group_lang = GuiCtrlCreateGroup("Language(s) - Select One Option", 10, 194, 215, 53) 953 | $Label_lang = GuiCtrlCreateLabel("User", 20, 214, 37, 21, $SS_CENTER + $SS_CENTERIMAGE + $SS_SUNKEN) 954 | GUICtrlSetBkColor($Label_lang, $COLOR_BLUE) 955 | GUICtrlSetColor($Label_lang, $COLOR_WHITE) 956 | GUICtrlSetFont($Label_lang, 7, 600, 0, "Small Fonts") 957 | $Combo_lang = GUICtrlCreateCombo("", 57, 214, 34, 21) 958 | GUICtrlSetTip($Combo_lang, "User language!") 959 | $Label_langs = GuiCtrlCreateLabel("Multi", 96, 214, 39, 21, $SS_CENTER + $SS_CENTERIMAGE + $SS_SUNKEN) 960 | GUICtrlSetBkColor($Label_langs, $COLOR_BLUE) 961 | GUICtrlSetColor($Label_langs, $COLOR_WHITE) 962 | GUICtrlSetFont($Label_langs, 7, 600, 0, "Small Fonts") 963 | $Combo_langs = GUICtrlCreateCombo("", 135, 214, 50, 21) 964 | GUICtrlSetTip($Combo_langs, "Multiple languages!") 965 | $Button_attach = GuiCtrlCreateButton("+", 190, 214, 25, 20) 966 | GUICtrlSetFont($Button_attach, 9, 600) 967 | GUICtrlSetTip($Button_attach, "Add a single language or combination (with CTRL to remove)!") 968 | ; 969 | $Group_OS = GuiCtrlCreateGroup("", 10, 253, 215, 50) 970 | $Label_OS = GuiCtrlCreateLabel("OS Options", 20, 270, 73, 21, $SS_CENTER + $SS_CENTERIMAGE + $SS_SUNKEN) 971 | GUICtrlSetBkColor($Label_OS, $COLOR_BLUE) 972 | GUICtrlSetColor($Label_OS, $COLOR_WHITE) 973 | GUICtrlSetFont($Label_OS, 7, 600, 0, "Small Fonts") 974 | $Combo_OS = GUICtrlCreateCombo("", 93, 270, 122, 21) 975 | GUICtrlSetBkColor($Combo_OS, 0xFFD5FF) 976 | GUICtrlSetTip($Combo_OS, "OS to download files for!") 977 | ; 978 | $Label_user = GuiCtrlCreateLabel("User or Email", 10, 315, 80, 20, $SS_CENTER + $SS_CENTERIMAGE + $SS_SUNKEN) 979 | GUICtrlSetBkColor($Label_user, $COLOR_BLACK) 980 | GUICtrlSetColor($Label_user, $COLOR_WHITE) 981 | GUICtrlSetFont($Label_user, 7, 600, 0, "Small Fonts") 982 | $Input_user = GuiCtrlCreateInput("", 90, 315, 135, 20) 983 | GUICtrlSetTip($Input_user, "Username or Email to access your GOG game library!") 984 | ; 985 | $Label_pass = GuiCtrlCreateLabel("Password", 10, 340, 63, 20, $SS_CENTER + $SS_CENTERIMAGE + $SS_SUNKEN) 986 | GUICtrlSetBkColor($Label_pass, $COLOR_BLACK) 987 | GUICtrlSetColor($Label_pass, $COLOR_WHITE) 988 | GUICtrlSetFont($Label_pass, 7, 600, 0, "Small Fonts") 989 | $Input_pass = GuiCtrlCreateInput("", 73, 340, 152, 20) 990 | GUICtrlSetTip($Input_pass, "Password to access your GOG game library!") 991 | ; 992 | $Button_cookie = GuiCtrlCreateButton("CREATE COOKIE", 10, 370, 145, 50) 993 | GUICtrlSetFont($Button_cookie, 9, 600) 994 | GUICtrlSetTip($Button_cookie, "Create or Update the cookie file!") 995 | ; 996 | $Button_close = GuiCtrlCreateButton("EXIT", 165, 370, 60, 50, $BS_ICON) 997 | GUICtrlSetTip($Button_close, "Exit / Close / Quit the window!") 998 | ; 999 | ; SETTINGS 1000 | GUICtrlSetImage($Button_close, $user, $icoX, 1) 1001 | ; 1002 | $langs = IniRead($inifle, "Update Languages", "singles", "") 1003 | If $langs = "" Then 1004 | $langs = "||de|en|fr|" 1005 | IniWrite($inifle, "Update Languages", "singles", $langs) 1006 | EndIf 1007 | $combos = IniRead($inifle, "Update Languages", "combined", "") 1008 | If $combos = "" Then 1009 | $combos = "||de en|de fr|fr en|" 1010 | IniWrite($inifle, "Update Languages", "combined", $combos) 1011 | EndIf 1012 | $long = StringLen($lang) 1013 | If $long = 2 Then 1014 | GUICtrlSetData($Combo_lang, $langs, $lang) 1015 | GUICtrlSetData($Combo_langs, $combos, "") 1016 | Else 1017 | GUICtrlSetData($Combo_lang, $langs, "") 1018 | GUICtrlSetData($Combo_langs, $combos, $lang) 1019 | EndIf 1020 | ; 1021 | $OSes = "windows linux mac|windows linux|windows mac|linux mac|windows|linux|mac" 1022 | GUICtrlSetData($Combo_OS, $OSes, $OSget) 1023 | 1024 | 1025 | GuiSetState(@SW_SHOW, $SetupGUI) 1026 | While 1 1027 | $msg = GuiGetMsg() 1028 | Select 1029 | Case $msg = $GUI_EVENT_CLOSE Or $msg = $Button_close 1030 | ; Exit / Close / Quit the window 1031 | $winpos = WinGetPos($SetupGUI, "") 1032 | $side = $winpos[0] 1033 | If $side < 0 Then 1034 | $side = 2 1035 | ElseIf $side > @DesktopWidth - $wide Then 1036 | $side = @DesktopWidth - $wide - 25 1037 | EndIf 1038 | IniWrite($inifle, "Setup Window", "left", $side) 1039 | $above = $winpos[1] 1040 | If $above < 0 Then 1041 | $above = 2 1042 | ElseIf $above > @DesktopHeight - $high Then 1043 | $above = @DesktopHeight - $high - 30 1044 | EndIf 1045 | IniWrite($inifle, "Setup Window", "top", $above) 1046 | ; 1047 | GUIDelete($SetupGUI) 1048 | ExitLoop 1049 | Case $msg = $Button_install 1050 | ; Install html5lib & html2text etc in Python 1051 | GuiSetState(@SW_DISABLE, $SetupGUI) 1052 | RunWait(@ComSpec & ' /c pip install html5lib html2text requests pyopenssl &&pause', "") 1053 | GuiSetState(@SW_ENABLE, $SetupGUI) 1054 | Case $msg = $Button_cookie 1055 | ; Create or Update the cookie file 1056 | If FileExists($gogrepo) Then 1057 | If FileExists($cookies) Then 1058 | $ans = MsgBox(262177, "Update Query", _ 1059 | "An existing cookie file was found." & @LF & @LF & _ 1060 | "Do you want to update (overwrite)?", 0, $SetupGUI) 1061 | Else 1062 | $ans = 1 1063 | EndIf 1064 | If $ans = 1 Then 1065 | $username = GUICtrlRead($Input_user) 1066 | If $username <> "" Then 1067 | $password = GUICtrlRead($Input_pass) 1068 | If $password <> "" Then 1069 | GuiSetState(@SW_DISABLE, $SetupGUI) 1070 | RunWait(@ComSpec & ' /c gogrepo.py login ' & $username & ' ' & $password & ' &&pause', @ScriptDir) 1071 | $username = "" 1072 | $password = "" 1073 | GuiSetState(@SW_ENABLE, $SetupGUI) 1074 | Else 1075 | MsgBox(262192, "Cookie Error", "Password field is blank!", 0, $SetupGUI) 1076 | EndIf 1077 | Else 1078 | MsgBox(262192, "Cookie Error", "User or Email field is blank!", 0, $SetupGUI) 1079 | EndIf 1080 | EndIf 1081 | Else 1082 | MsgBox(262192, "Program Error", "Required file 'gogrepo.py' not found!", 0, $SetupGUI) 1083 | EndIf 1084 | Case $msg = $Button_attach 1085 | ; Add a single language or combination 1086 | $val = GUICtrlRead($Combo_langs) 1087 | If $val <> "" And GUICtrlRead($Combo_lang) <> "" Then 1088 | MsgBox(262192, "Add Error", _ 1089 | "When adding a new language or combined language entry," & @LF & _ 1090 | "the other field should be blank, and you should have typed" & @LF & _ 1091 | "over the entry in the field you want to add to." & @LF & @LF & _ 1092 | "Try Again!", 0, $SetupGUI) 1093 | ContinueLoop 1094 | EndIf 1095 | $long = StringLen($val) 1096 | If $long > 3 Then 1097 | $lang = $val 1098 | If _IsPressed("11") Then 1099 | If $lang <> "de en" Then 1100 | If StringInStr($combos, "|" & $lang & "|") > 0 Then 1101 | $combos = StringReplace($combos, "|" & $lang & "|", "|") 1102 | IniWrite($inifle, "Update Languages", "combined", $combos) 1103 | GUICtrlSetData($Combo_langs, "", "") 1104 | $lang = "de en" 1105 | GUICtrlSetData($Combo_langs, $combos, $lang) 1106 | EndIf 1107 | EndIf 1108 | Else 1109 | If StringInStr($combos, "|" & $lang & "|") < 1 Then 1110 | $combos = $combos & $lang & "|" 1111 | IniWrite($inifle, "Update Languages", "combined", $combos) 1112 | GUICtrlSetData($Combo_langs, "", "") 1113 | GUICtrlSetData($Combo_langs, $combos, $lang) 1114 | EndIf 1115 | EndIf 1116 | Else 1117 | $val = GUICtrlRead($Combo_lang) 1118 | $long = StringLen($val) 1119 | If $long = 2 Then 1120 | $lang = $val 1121 | If _IsPressed("11") Then 1122 | If $lang <> "en" Then 1123 | If StringInStr($langs, "|" & $lang & "|") > 0 Then 1124 | $langs = StringReplace($langs, "|" & $lang & "|", "|") 1125 | IniWrite($inifle, "Update Languages", "singles", $langs) 1126 | GUICtrlSetData($Combo_lang, "", "") 1127 | $lang = "en" 1128 | GUICtrlSetData($Combo_lang, $langs, $lang) 1129 | EndIf 1130 | EndIf 1131 | Else 1132 | If StringInStr($langs, "|" & $lang & "|") < 1 Then 1133 | $langs = $langs & $lang & "|" 1134 | IniWrite($inifle, "Update Languages", "singles", $langs) 1135 | GUICtrlSetData($Combo_lang, "", "") 1136 | GUICtrlSetData($Combo_lang, $langs, $lang) 1137 | EndIf 1138 | EndIf 1139 | Else 1140 | MsgBox(262208, "Program Advice", "To remove a language or combined language entry," _ 1141 | & @LF & "hold down CTRL while clicking the plus button.", 0, $SetupGUI) 1142 | EndIf 1143 | EndIf 1144 | IniWrite($inifle, "Update Options", "language", $lang) 1145 | Case $msg = $Combo_OS 1146 | ; OS to update files for 1147 | $OSget = GUICtrlRead($Combo_OS) 1148 | IniWrite($inifle, "Update Options", "OS", $OSget) 1149 | Case $msg = $Combo_langs 1150 | ; Multiple languages 1151 | $val = GUICtrlRead($Combo_langs) 1152 | If $val = "" Then 1153 | _GUICtrlComboBox_SetCurSel($Combo_lang, 1) 1154 | $lang = GUICtrlRead($Combo_lang) 1155 | Else 1156 | _GUICtrlComboBox_SetCurSel($Combo_lang, 0) 1157 | $lang = $val 1158 | EndIf 1159 | IniWrite($inifle, "Update Options", "language", $lang) 1160 | Case $msg = $Combo_lang 1161 | ; User language 1162 | $val = GUICtrlRead($Combo_lang) 1163 | If $val = "" Then 1164 | _GUICtrlComboBox_SetCurSel($Combo_langs, 1) 1165 | $lang = GUICtrlRead($Combo_langs) 1166 | Else 1167 | _GUICtrlComboBox_SetCurSel($Combo_langs, 0) 1168 | $lang = $val 1169 | EndIf 1170 | IniWrite($inifle, "Update Options", "language", $lang) 1171 | Case Else 1172 | ;;; 1173 | EndSelect 1174 | WEnd 1175 | EndFunc ;=> SetupGUI 1176 | 1177 | 1178 | Func FillTheGamesList() 1179 | If FileExists($titlist) Then 1180 | $res = _FileReadToArray($titlist, $array) 1181 | If $res = 1 Then 1182 | $games = 0 1183 | For $a = 1 To $array[0] 1184 | $line = $array[$a] 1185 | If $line <> "" Then 1186 | $name = $line 1187 | GUICtrlSetData($List_games, $name) 1188 | $games = $games + 1 1189 | EndIf 1190 | Next 1191 | If $games > 0 Then GUICtrlSetData($Group_games, "Games (" & $games & ")") 1192 | EndIf 1193 | EndIf 1194 | EndFunc ;=> FillTheGamesList 1195 | 1196 | Func GetAllowedName() 1197 | $name = StringReplace($name, Chr(150), "-") 1198 | $name = StringReplace($name, Chr(151), "-") 1199 | $name = StringReplace($name, Chr(175), "-") 1200 | $name = StringReplace($name, "–", "-") 1201 | $name = ReplaceForeignCharacters($name) 1202 | $name = ReplaceOtherCharacters($name) 1203 | $name = StringStripWS($name, 7) 1204 | EndFunc ;=> GetAllowedName 1205 | 1206 | Func ReplaceForeignCharacters($text) 1207 | Local $char, $let, $p, $pair, $pairs 1208 | $pairs = "À,A|Á,A|Â,A|Ã,A|Ä,A|Å,A|Æ,AE|Ç,C|È,E|É,E|Ê,E|Ë,E|Ì,I|Í,I|Î,I|Ï,I|Ð,D|Ñ,N|Ò,O|Ó,O|Ô,O|Õ,O|Ö,O|×,x|Ø,O|Ù,U|Ú,U|Û,U|Ü,U|Ý,Y|ß,B|" _ 1209 | & "à,a|á,a|â,a|ã,a|ä,a|å,a|æ,ae|ç,c|è,e|é,e|ê,e|ë,e|ì,i|í,i|î,i|ï,i|ð,o|ñ,n|ò,o|ó,o|ô,o|õ,o|ö,o|ø,o|ù,u|ú,u|û,u|ü,u|ý,y|ÿ,y" 1210 | $pairs = StringSplit($pairs, "|", 1) 1211 | For $p = 1 To $pairs[0] 1212 | $pair = $pairs[$p] 1213 | $pair = StringSplit($pair, ",", 1) 1214 | $char = $pair[1] 1215 | $let = $pair[2] 1216 | $text = StringReplace($text, $char, $let, 0, 1) 1217 | Next 1218 | Return $text 1219 | EndFunc ;=> ReplaceForeignCharacters 1220 | 1221 | Func ReplaceOtherCharacters($text) 1222 | Local $char, $l, $len, $let 1223 | $let = StringLeft($text, 1) 1224 | If $let = "'" Or $let = '"' Then $text = StringTrimLeft($text, 1) 1225 | $let = StringRight($text, 1) 1226 | If $let = "'" Or $let = '"' Then $text = StringTrimRight($text, 1) 1227 | ; 1228 | $text = StringReplace($text, "[", "{") 1229 | $text = StringReplace($text, "]", "}") 1230 | $text = StringReplace($text, "|", " ") 1231 | ; 1232 | $name = "" 1233 | $len = StringLen($text) 1234 | For $l = 1 To $len 1235 | $let = StringMid($text, $l, 1) 1236 | $char = Asc($let) 1237 | If $char > 31 And $char < 127 Then 1238 | $name = $name & $let 1239 | EndIf 1240 | Next 1241 | $text = $name 1242 | Return $text 1243 | EndFunc ;=> ReplaceOtherCharacters 1244 | -------------------------------------------------------------------------------- /Simple_GUI/v1.0/GOGRepo Simple GUI.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/Simple_GUI/v1.0/GOGRepo Simple GUI.exe -------------------------------------------------------------------------------- /Simple_GUI/v1.0_update/GOGRepo Simple GUI.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/Simple_GUI/v1.0_update/GOGRepo Simple GUI.exe -------------------------------------------------------------------------------- /Simple_GUI/v1.1/GOGRepo Simple GUI.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/Simple_GUI/v1.1/GOGRepo Simple GUI.exe -------------------------------------------------------------------------------- /Simple_GUI/v1.2/GOGRepo Simple GUI.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/Simple_GUI/v1.2/GOGRepo Simple GUI.exe -------------------------------------------------------------------------------- /Simple_GUI/v1.3/GOGRepo Simple GUI.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/Simple_GUI/v1.3/GOGRepo Simple GUI.exe -------------------------------------------------------------------------------- /Simple_GUI/v1.4/GOGRepo Simple GUI.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/Simple_GUI/v1.4/GOGRepo Simple GUI.exe -------------------------------------------------------------------------------- /Simple_GUI/v1.4/History.txt: -------------------------------------------------------------------------------- 1 | 2 | (v1.4) BUGFIX for incorrect line ending insertions into gogrepo.py. These insertions did not occur if using the Kalanyr forked version of gogrepo.py. 3 | 4 | (v1.3) Added a file Size field. Two buttons resized with multiline text. Some text changes. 5 | 6 | (v1.2) BUGFIX for detecting the version of 'gogrepo.py'. This involves checking for the Kalanyr forked version, which is automatically supported, and then checking for a modified version of the original 'gogrepo.py', which is also supported. The user is queried if neither are the case, with an option to modify the existing. 7-Zip is now checked for at startup, with priority given to the '7z.exe' file over '7za.exe' if found. 7 | -------------------------------------------------------------------------------- /Simple_GUI/v1.6/GOGRepo Simple GUI.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/Simple_GUI/v1.6/GOGRepo Simple GUI.exe -------------------------------------------------------------------------------- /Simple_GUI/v1.6/History.txt: -------------------------------------------------------------------------------- 1 | 2 | (v1.6) GOGRepo Simple GUI has now been adapted for use with a special compiled version of gogrepo.exe. 3 | 4 | (v1.5) FSUM is no longer required or used. Window controls now get disabled during processes. 5 | 6 | (v1.4) BUGFIX for incorrect line ending insertions into gogrepo.py. These insertions did not occur if using the Kalanyr forked version of gogrepo.py. 7 | 8 | (v1.3) Added a file Size field. Two buttons resized with multiline text. Some text changes. 9 | 10 | (v1.2) BUGFIX for detecting the version of 'gogrepo.py'. This involves checking for the Kalanyr forked version, which is automatically supported, and then checking for a modified version of the original 'gogrepo.py', which is also supported. The user is queried if neither are the case, with an option to modify the existing. 7-Zip is now checked for at startup, with priority given to the '7z.exe' file over '7za.exe' if found. 11 | -------------------------------------------------------------------------------- /Simple_GUI/v1.6/ReadMe.txt: -------------------------------------------------------------------------------- 1 | 2 | The 'gogrepo.exe' file, is a compiled version of 'gogrepo.py', and was compiled by Timboli (from the GOG Forums), using the last original version of 'gogrepo.py' as source. 3 | 4 | It was compiled on a Windows 7, 32 Bit PC, where Python 3.4 and required libraries were installed, for use with 'gogrepo.py' and 'GOGRepo Simple GUI' and related. 5 | 6 | The last original version of 'gogrepo.py', a Python program (script) can be found at GitHub. 7 | 8 | https://github.com/eddie3/gogrepo/blob/master/gogrepo.py 9 | 10 | That file was uploaded to GitHub two years ago, as of the 13th October 2021. 11 | 12 | License: GPLv3+ 13 | 14 | More information can be found at - https://github.com/eddie3/gogrepo 15 | 16 | 8 contributors are listed at - https://github.com/eddie3/gogrepo/graphs/contributors 17 | 18 | (eddie3, disi, resonantworks, Shiryou, tiehichi, Trilarion, jpenney, HamsterExAstris) 19 | 20 | IMPORTANT - Only this compiled version will work properly with 'GOGRepo Simple GUI v1.6'. 21 | -------------------------------------------------------------------------------- /Simple_GUI/v1.6/gogrepo.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/Simple_GUI/v1.6/gogrepo.zip -------------------------------------------------------------------------------- /Splash.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/Splash.jpg -------------------------------------------------------------------------------- /YT-DL Dropper/GetSBS List.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/YT-DL Dropper/GetSBS List.zip -------------------------------------------------------------------------------- /YT-DL Dropper/YT-DL Dropper v7.6.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/YT-DL Dropper/YT-DL Dropper v7.6.zip -------------------------------------------------------------------------------- /YT-DL Dropper/YT-DL Dropper v7.7_AUS.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/YT-DL Dropper/YT-DL Dropper v7.7_AUS.zip -------------------------------------------------------------------------------- /YT-DL Dropper/YT-DL Dropper v7.8.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Twombs/GOGRepo-GUI/5a09cbc3148603364b8c0627245f017f4579dea2/YT-DL Dropper/YT-DL Dropper v7.8.zip --------------------------------------------------------------------------------