Advertisement
Baoulettes

Classmith 2014 V1.0.2

Jul 20th, 2015
698
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #SingleInstance force
  2. ; 20th July 2014 by Baoulettes aka Joffrey Panisset
  3. ; Joffrey.panisset@hotmail.com
  4. ; Unauthorized use is forbidden.
  5. ; Here are my credit list :
  6. ; Autohotkey to allow such code stuff :)
  7. ; fabianosan for Rocksmith Custom Song Toolkit unpacker.
  8. ; Snakez for Rocksmith Custom Song Toolkit unpacker.
  9. ; Maveth for Rocksmith Custom Song Toolkit unpacker.
  10. ; Raynebc for Rocksmith Custom Song Toolkit unpacker.
  11. ; Dreddfoxx for Rocksmith Custom Song Toolkit unpacker.
  12. ; Alex360 (L0fka) for Rocksmith Custom Song Toolkit unpacker.
  13. ; Shrubbery (otaznik) for Rocksmith Custom Song Toolkit unpacker.
  14. ; Cozy1 for Rocksmith Custom Song Toolkit unpacker.
  15. ; Zephyrix for Rocksmith Custom Song Toolkit unpacker.
  16. ; Xavatar (PowerSlinky) for Rocksmith Custom Song Toolkit unpacker.
  17. ; Chlipouni for Rocksmith Custom Song Toolkit unpacker.
  18. ; Cgeorge for Rocksmith Custom Song Toolkit unpacker.
  19.  
  20. ;Variables Setting :
  21. Appname = Classmith 2014
  22. Appversion = V1.0.2
  23.  
  24. ;1.0.2 - Faster and more special character detected fix :)
  25. ;1.0.1 - Fixed RS2014 / RS Original DLC and import tool detection.
  26. ;1.0.0 - Initial Launch
  27.  
  28.  
  29. ;Creating Ressources Directory :
  30. fileCreateDir, %A_ScriptDir%\ressources\
  31. fileCreateDir, %A_ScriptDir%\ressources\packer
  32.  
  33. ;Installing required files :
  34. FileInstall, D:\RS2014SongClassifier\Ressources\packer\NDesk.Options.dll, %A_ScriptDir%\ressources\packer\NDesk.Options.dll
  35. FileInstall, D:\RS2014SongClassifier\Ressources\packer\packer.exe, %A_ScriptDir%\ressources\packer\packer.exe
  36. FileInstall, D:\RS2014SongClassifier\Ressources\packer\packer.pdb, %A_ScriptDir%\ressources\packer\packer.pdb
  37. FileInstall, D:\RS2014SongClassifier\Ressources\packer\RocksmithToolkitLib.dll, %A_ScriptDir%\ressources\packer\RocksmithToolkitLib.dll
  38. FileInstall, D:\RS2014SongClassifier\Ressources\packer\X360.dll, %A_ScriptDir%\ressources\packer\X360.dll
  39. FileInstall, D:\RS2014SongClassifier\Ressources\packer\ZLIB.dll, %A_ScriptDir%\ressources\packer\ZLIB.dll
  40. FileInstall, D:\RS2014SongClassifier\Ressources\packer\zlib.net.dll, %A_ScriptDir%\ressources\packer\zlib.net.dll
  41. FileInstall, D:\RS2014SongClassifier\Ressources\Baoulettes.png, %A_ScriptDir%\ressources\Baoulettes.png,1
  42. FileInstall, D:\RS2014SongClassifier\Ressources\Rocksmith-2014-Edition-Logo.png, %A_ScriptDir%\ressources\Rocksmith-2014-Edition-Logo.png,1
  43.  
  44. ; Reading various Variables
  45. IniRead, Languages, Options.ini, Options, Languages
  46. IniRead, SelectedRS2014Folder, Options.ini, Options, R2014dir
  47. IniRead, DLCWantingNameInput, Options.ini, Options, WantedPsarcName
  48. IniRead, Platform, Options.ini, Options, Platform
  49. IniRead, YesnoDL, Options.ini, Options, SeparateInFolderQS
  50. If SelectedRS2014Folder = ERROR
  51. {
  52. FileSelectFolder, SelectedRS2014Folder,, 3,Please choice Rocksmith 2014 directory.
  53. IniWrite, %SelectedRS2014Folder%, Options.ini, Options, R2014dir
  54. }
  55. If SelectedRS2014Folder =
  56. {
  57. FileSelectFolder, SelectedRS2014Folder,, 3,Please choice Rocksmith 2014 directory.
  58. IniWrite, %SelectedRS2014Folder%, Options.ini, Options, R2014dir
  59. }
  60. If Languages = ERROR
  61. {
  62. Languages=En
  63. }
  64. If Languages =
  65. {
  66. Languages=En
  67. }
  68. If YesnoDL = ERROR
  69. {
  70. YesnoDL = Yes||No
  71. }
  72. If YesnoDL =
  73. {
  74. YesnoDL = Yes||No
  75. }
  76. If YesnoDL = Yes
  77. {
  78. YesnoDL = Yes||No
  79. }
  80. If YesnoDL = No
  81. {
  82. YesnoDL = Yes|No||
  83. }
  84. If Platform = ERROR
  85. {
  86. Platform = PC||Mac
  87. }
  88. If Platform =
  89. {
  90. Platform = PC||Mac
  91. }
  92. If Platform = PC
  93. {
  94. Platform = PC||Mac
  95. }
  96. If Platform = Mac
  97. {
  98. Platform = PC|Mac||
  99. }
  100. If DLCWantingNameInput = ERROR
  101. {
  102. DLCWantingNameInput=`%A`%_`%SN`%_`%AN`%_V`%V`%
  103. }
  104. If DLCWantingNameInput =
  105. {
  106. DLCWantingNameInput=`%A`%_`%SN`%_`%AN`%_V`%V`%
  107. }
  108.  
  109. ;Variables for translation :
  110. ;Base - English :
  111. If Languages = EN
  112. {
  113. about = About
  114. choiceRSDir = Please choice Rocksmith 2014 directory.
  115. RS2014FSelectB = Browse
  116. DLCWantedName = Please set a name scheme. (More information about variables name at right)
  117. BasicInfoFileNaming = use `%A`% for Artist Name`n use `%SN`% for Song Name`n use `%AN`% for Album Name`n use `%V`% for Package Version (Recommended.)`nAll space will be replaced by underscores.
  118. SelectPFText = Target platform :
  119. SeparateInFolderQS = Would you like to sort song in a Artist folder inside DLC folder?
  120. AppsUsageText = 1st You have to select a Rocksmith 2014 directory (NOT dlc just root folder!)`n2nd Config the application as you wish.`n3rd Press "Let do it".`nCommon error possible :`nNo dlc in DLC folder so nothing to do`nAlready sorted .psarc (This application don't look in subfolder to prevent unwanted error)`nFolder isn't Rocksmith 2014 root.`nPlease becareful and make Backups if you're unsure !`nThe more CDLC/DLC you have the more time it will take so please be patient !`nIf you have Any problem contact me over: `nFacebook : Page: Baoulettes`nSkype : mysticia26
  121. StartProcess = Let do it !
  122. CreditText = This Application has been mady by Baoulettes. 2015
  123. AboutTextWindows = Credits List:`nAutohotkey`nBaoulettes`nRocksmith Custom Song Toolkit maker :`nfabianosan`nSnakez`nMaveth`nRaynebc`nDreddfoxx`nAlex360 (L0fka)`nShrubbery (otaznik)`nCozy1`nZephyrix`nXavatar`nChlipouni`nCgeorge
  124. }
  125.  
  126. ;Gui Making !
  127. Gui,1: Add, Button, x412 y5 w60 h20 gaboutwin, %about%
  128. Gui,1: Add, Text, x100 y29 w370 h30 BackGroundTrans +Center, %choiceRSDir%
  129. Gui,1: Add, Button, x412 y29 w60 h20 gSelRS2014Folder, %RS2014FSelectB%
  130. Gui,1: Add, Edit, x2 y59 w470 h30 vactualdir +Center, %SelectedRS2014Folder%
  131. Gui,1: Add, Text, x2 y95 w250 h30 +Center, %DLCWantedName%
  132. Gui,1: Add, Edit, x2 y129 w250 h40 vnameinput +Center, %DLCWantingNameInput%
  133. Gui,1: Add, Text, x262 y95 w210 h80 +Center, %BasicInfoFileNaming%
  134. Gui,1: Add, DropDownList, x362 y187 w100 h20 r2 vSelPlatform, %Platform%
  135. Gui,1: Add, Text, x262 y191 w100 h30 , %SelectPFText%
  136. Gui,1: Add, Text, x2 y185 w150 h30 , %SeparateInFolderQS%
  137. Gui,1: Add, DropDownList, x152 y187 w100 h21 r2 vFolderYesNo, %YesnoDL%
  138. Gui,1: Add, Text, x2 y223 w470 h160 +Center, %AppsUsageText%
  139. Gui,1: Add, Button, x12 y399 w450 h30 gGoforIt, %StartProcess%
  140. Gui,1: Add, Text, x2 y429 w470 h20 +Center, %CreditText%
  141. Gui,1: Add, Picture, x0 y0 w180 h60 BackGroundTrans, %A_ScriptDir%\ressources\Rocksmith-2014-Edition-Logo.png
  142. Gui,1: Show, h450 w476, %Appname% - %Appversion%
  143. Return
  144.  
  145. ; Creating Credit / About window
  146. aboutwin:
  147. Gui,1: Hide
  148. Gui,2: Add, Picture, x0 y0 w150 h150 , %A_ScriptDir%\ressources\Baoulettes.png
  149. Gui,2: Add, Text, x0 y149 w150 h230 +Center, %AboutTextWindows%
  150. Gui,2: Show, h381 w150, %Appname% - %Appversion%
  151. Return
  152.  
  153. ;Functions :
  154. ; Rocksmith Directory selection.
  155. SelRS2014Folder:
  156. FileSelectFolder, SelectedRS2014Folder,, 3,%choiceRSDir%
  157. GuiControl,1:,actualdir, %SelectedRS2014Folder%
  158. IniWrite, %SelectedRS2014Folder%, Options.ini, Options, R2014dir
  159. Return
  160.  
  161. ; Main Function to parse files & rename etc.
  162. GoforIt:
  163. Gui,1: Submit
  164. GuiControlGet, actualdir,1:,
  165. GuiControlGet, nameinput,1:,
  166. GuiControlGet, SelPlatform,1:,
  167. GuiControlGet, FolderYesNo,1:,
  168. DLCWantingNameInput = %nameinput%
  169. SelectedRS2014Folder = %actualdir%
  170. Platform = %SelPlatform%
  171. YesnoDL = %FolderYesNo%
  172. If SelectedRS2014Folder = ERROR
  173. {
  174. FileSelectFolder, SelectedRS2014Folder,, 3,%choiceRSDir%
  175. GuiControl,1:,actualdir, %SelectedRS2014Folder%
  176. IniWrite, %SelectedRS2014Folder%, Options.ini, Options, R2014dir
  177. Gui,1: Restore
  178. return
  179. }
  180. If SelectedRS2014Folder =
  181. {
  182. FileSelectFolder, SelectedRS2014Folder,, 3,%choiceRSDir%
  183. GuiControl,1:,actualdir, %SelectedRS2014Folder%
  184. IniWrite, %SelectedRS2014Folder%, Options.ini, Options, R2014dir
  185. Gui,1: Restore
  186. return
  187. }
  188. If DLCWantingNameInput = ERROR
  189. {
  190. Msgbox, Please set a name other than Error... Use Variables too!
  191. Gui,1: Restore
  192. return
  193. }
  194. If DLCWantingNameInput =
  195. {
  196. Msgbox, Please set a name other than Error... Use Variables too!
  197. Gui,1: Restore
  198. return
  199. }
  200. If Platform = PC||Mac
  201. {
  202. Platform = PC
  203. }
  204. If Platform = PC|Mac||
  205. {
  206. Platform = Mac
  207. }
  208. If YesnoDL = Yes||No
  209. {
  210. YesnoDL = Yes
  211. }
  212. If YesnoDL = Yes|No||
  213. {
  214. YesnoDL = No
  215. }
  216. IniWrite, %Languages%, Options.ini, Options, Languages
  217. IniWrite, %SelectedRS2014Folder%, Options.ini, Options, R2014dir
  218. IniWrite, %DLCWantingNameInput%, Options.ini, Options, WantedPsarcName
  219. IniWrite, %Platform%, Options.ini, Options, Platform
  220. IniWrite, %YesnoDL%, Options.ini, Options, SeparateInFolderQS
  221. NameId=0
  222. FileCreateDir, %SelectedRS2014Folder%\dlc\RocksmithOneDLC
  223. IfExist, %SelectedRS2014Folder%\dlc\RocksmithOneDLC\rs1compatibilitydisc_p.psarc
  224. {
  225. FileCreateDir, %SelectedRS2014Folder%\dlc\01RocksmithOneDLCDuplicat
  226. FileMove, %SelectedRS2014Folder%\dlc\rs1compatibilitydisc_p.psarc,%SelectedRS2014Folder%\dlc\01RocksmithOneDLCDuplicat\%NameId%rs1compatibilitydisc_p.psarc
  227. NameId++
  228. }
  229. IfNotExist, %SelectedRS2014Folder%\dlc\RocksmithOneDLC\rs1compatibilitydisc_p.psarc
  230. {
  231. FileMove, %SelectedRS2014Folder%\dlc\rs1compatibilitydisc_p.psarc,%SelectedRS2014Folder%\dlc\RocksmithOneDLC
  232. }
  233. IfExist, %SelectedRS2014Folder%\dlc\RocksmithOneDLC\rs1compatibilitydisc_m.psarc
  234. {
  235. FileCreateDir, %SelectedRS2014Folder%\dlc\01RocksmithOneDLCDuplicat
  236. FileMove, %SelectedRS2014Folder%\dlc\rs1compatibilitydisc_m.psarc,%SelectedRS2014Folder%\dlc\01RocksmithOneDLCDuplicat\%NameId%rs1compatibilitydisc_m.psarc
  237. NameId++
  238. }
  239. IfNotExist, %SelectedRS2014Folder%\dlc\RocksmithOneDLC\rs1compatibilitydisc_m.psarc
  240. {
  241. FileMove, %SelectedRS2014Folder%\dlc\rs1compatibilitydisc_m.psarc,%SelectedRS2014Folder%\dlc\RocksmithOneDLC
  242. }
  243. IfExist, %SelectedRS2014Folder%\dlc\RocksmithOneDLC\rs1compatibilitydlc_p.psarc
  244. {
  245. FileCreateDir, %SelectedRS2014Folder%\dlc\01RocksmithOneDLCDuplicat
  246. FileMove, %SelectedRS2014Folder%\dlc\rs1compatibilitydlc_p.psarc,%SelectedRS2014Folder%\dlc\01RocksmithOneDLCDuplicat\%NameId%rs1compatibilitydlc_p.psarc
  247. NameId++
  248. }
  249. IfNotExist, %SelectedRS2014Folder%\dlc\RocksmithOneDLC\rs1compatibilitydlc_p.psarc
  250. {
  251. FileMove, %SelectedRS2014Folder%\dlc\rs1compatibilitydlc_p.psarc,%SelectedRS2014Folder%\dlc\RocksmithOneDLC
  252. }
  253. IfExist, %SelectedRS2014Folder%\dlc\RocksmithOneDLC\rs1compatibilitydlc_m.psarc
  254. {
  255. FileCreateDir, %SelectedRS2014Folder%\dlc\01RocksmithOneDLCDuplicat
  256. FileMove, %SelectedRS2014Folder%\dlc\rs1compatibilitydlc_m.psarc,%SelectedRS2014Folder%\dlc\01RocksmithOneDLCDuplicat\%NameId%rs1compatibilitydlc_p.psarc
  257. NameId++
  258. }
  259. IfNotExist, %SelectedRS2014Folder%\dlc\RocksmithOneDLC\rs1compatibilitydlc_m.psarc
  260. {
  261. FileMove, %SelectedRS2014Folder%\dlc\rs1compatibilitydlc_m.psarc,%SelectedRS2014Folder%\dlc\RocksmithOneDLC
  262. }
  263. If Platform = PC
  264. {
  265. endfilename = _p.psarc
  266. PT = _Pc
  267. FileCreateDir, %SelectedRS2014Folder%\dlc\01MacVersion
  268. FileMove, %SelectedRS2014Folder%\dlc\*_m.psarc, %SelectedRS2014Folder%\dlc\01MacVersion
  269. }
  270. If Platform = Mac
  271. {
  272. endfilename = _m.psarc
  273. FileCreateDir, %SelectedRS2014Folder%\dlc\01PcVersion
  274. FileMove, %SelectedRS2014Folder%\dlc\*_p.psarc, %SelectedRS2014Folder%\dlc\01PcVersion
  275. PT = _Mac
  276. }
  277. sleep 1500
  278. FileCreateDir, %A_ScriptDir%\tmp
  279. FileCreateDir, %A_ScriptDir%\tmp\ToRename
  280. Gui,3: Add, Text, x0 y0 w240 h90 vGui3Txt +Center, %Gui3Text%
  281. Gui,3: -SysMenu
  282. Gui,3: Show, h88 w244, Working . . .
  283.  
  284. Loop Files, %SelectedRS2014Folder%\dlc\*.psarc
  285. {
  286. ;FileName = %A_LoopFileName%
  287. StringReplace, CutedName, A_LoopFileName, .psarc, , All
  288. UnpackFDName = %CutedName%%PT%
  289. FileCreateDir, %A_ScriptDir%\tmp\ToRename\Unpack
  290. ;FileMove, %SelectedRS2014Folder%\dlc\%A_LoopFileName%, %A_ScriptDir%\tmp\ToRename
  291. FileMove, %A_LoopFileFullPath%, %A_ScriptDir%\tmp\ToRename
  292. RunWait, %A_ScriptDir%\ressources\packer\packer.exe --unpack -i="%A_ScriptDir%\tmp\ToRename\%A_LoopFileName%" -o="%A_ScriptDir%\tmp\ToRename\Unpack",,Hide
  293. Loop Files, %A_ScriptDir%\tmp\ToRename\Unpack\%UnpackFDName%\*.nt,
  294. {
  295.     StringTrimRight, UniqueID, A_LoopFileName, 18
  296. }
  297.  
  298. IfExist, %A_ScriptDir%\tmp\ToRename\Unpack\%UnpackFDName%\toolkit.version
  299. {
  300. FileRead, VersionCheck, %A_ScriptDir%\tmp\ToRename\Unpack\%UnpackFDName%\toolkit.version
  301. if not ErrorLevel
  302. {
  303. Checkif = Package Version:
  304. IfInString, VersionCheck, %Checkif%
  305. FoundV := InStr(VersionCheck, Checkif)
  306. FoundV+=16
  307. StringTrimLeft, PVersion2Split, VersionCheck, %FoundV%
  308. StringLeft, PVersion, PVersion2Split, 5
  309. }
  310. If PVersion = ERROR
  311. {
  312. PVersion =1
  313. }
  314. If PVersion =
  315. {
  316. PVersion =1
  317. }
  318. }
  319. IfNotExist, %A_ScriptDir%\tmp\ToRename\Unpack\%UnpackFDName%\toolkit.version
  320. {
  321. FileCreateDir, %SelectedRS2014Folder%\dlc\Rocksmith2014DLC
  322. IfExist %SelectedRS2014Folder%\dlc\Rocksmith2014DLC\%A_LoopFileName%
  323. {
  324. FileCreateDir, %SelectedRS2014Folder%\dlc\01Rocksmith2014DLCDuplica
  325. FileMove, %A_ScriptDir%\tmp\ToRename\%A_LoopFileName%, %SelectedRS2014Folder%\dlc\01Rocksmith2014DLCDuplica
  326. }
  327. IfNotExist, %SelectedRS2014Folder%\dlc\Rocksmith2014DLC\%A_LoopFileName%
  328. {
  329. FileMove, %A_ScriptDir%\tmp\ToRename\%A_LoopFileName%, %SelectedRS2014Folder%\dlc\Rocksmith2014DLC
  330. }
  331. FileRemoveDir, %A_ScriptDir%\tmp\ToRename\Unpack, 1
  332.  
  333. }
  334. FileRead, HSANFile, %A_ScriptDir%\tmp\ToRename\Unpack\%UnpackFDName%\manifests\songs_dlc_%UniqueID%\songs_dlc_%UniqueID%.hsan
  335. Check4AN = `"AlbumName`": `"
  336. IfInString, HSANFile, %Check4AN%
  337. FoundAN := InStr(HSANFile, Check4AN)
  338. FoundAN+=13
  339. StringTrimLeft, AlbumName2Split, HSANFile, %FoundAN%
  340. CheckNameEnd = `",
  341. IfInString, AlbumName2Split, %CheckNameEnd%
  342. FoundANEnd := InStr(AlbumName2Split, CheckNameEnd)
  343. FoundANEnd-=1
  344. StringLeft, AlbumNameCuted, AlbumName2Split, %FoundANEnd%
  345. If AlbumNameCuted = Error
  346. {
  347. ArtistNameCuted = Original
  348. SongNameCuted = RS2014 DLC or conrupt !
  349. }
  350. Gui3Text = Working on : %ArtistNameCuted% - %SongNameCuted%
  351. GuiControl,3:,Gui3Txt, %Gui3Text%
  352. Check4ArtN = `"ArtistName`": `"
  353. IfInString, HSANFile, %Check4ArtN%
  354. FoundArtN := InStr(HSANFile, Check4ArtN)
  355. FoundArtN+=14
  356. StringTrimLeft, ArtistName2Split, HSANFile, %FoundArtN%
  357. IfInString, ArtistName2Split, %CheckNameEnd%
  358. FoundArtNEnd := InStr(ArtistName2Split, CheckNameEnd)
  359. FoundArtNEnd-=1
  360. StringLeft, ArtistNameCuted, ArtistName2Split, %FoundArtNEnd%
  361. If AlbumNameCuted = Error
  362. {
  363. ArtistNameCuted = Original
  364. SongNameCuted = RS2014 DLC or conrupt !
  365. }
  366. Gui3Text = Working on : %ArtistNameCuted% - %SongNameCuted%
  367. GuiControl,3:,Gui3Txt, %Gui3Text%
  368. Check4SN = `"SongName`": `"
  369. IfInString, HSANFile, %Check4SN%
  370. FoundSN := InStr(HSANFile, Check4SN)
  371. FoundSN+=12
  372. StringTrimLeft, SongName2Split, HSANFile, %FoundSN%
  373. IfInString, SongName2Split, %CheckNameEnd%
  374. FoundSNEnd := InStr(SongName2Split, CheckNameEnd)
  375. FoundSNEnd-=1
  376. StringLeft, SongNameCuted, SongName2Split, %FoundSNEnd%
  377. If AlbumNameCuted = Error
  378. {
  379. ArtistNameCuted = Original
  380. SongNameCuted = RS2014 DLC or conrupt !
  381. }
  382. If AlbumNameCuted =
  383. {
  384. ArtistNameCuted = Original
  385. SongNameCuted = RS2014 DLC or conrupt !
  386. }
  387. StringReplace, AlbumName, AlbumNameCuted, %A_SPACE%,-, All
  388. StringReplace, ArtistName, ArtistNameCuted, %A_SPACE%,-, All
  389. StringReplace, SongName, SongNameCuted, %A_SPACE%,-, All
  390. StringReplace, PackVersion, PVersion, %A_SPACE%,., All
  391.  
  392. StringReplace, AlbumName, AlbumName, `%,%A_SPACE%, All
  393. StringReplace, ArtistName, ArtistName, `%,%A_SPACE%, All
  394. StringReplace, SongName, SongName, `%,%A_SPACE%, All
  395. StringReplace, PackVersion, PackVersion, `%,%A_SPACE%, All
  396.  
  397. StringReplace, AlbumName, AlbumName, `:,%A_SPACE%, All
  398. StringReplace, ArtistName, ArtistName, `:,%A_SPACE%, All
  399. StringReplace, SongName, SongName,`:,%A_SPACE%, All
  400. StringReplace, PackVersion, PackVersion, `:,%A_SPACE%, All
  401.  
  402. StringReplace, AlbumName, AlbumName, ü,u, All
  403. StringReplace, ArtistName, ArtistName, ü,u, All
  404. StringReplace, SongName, SongName,ü,u, All
  405. StringReplace, PackVersion, PackVersion, ü,u, All
  406.  
  407. StringReplace, AlbumName, AlbumName, ë,e, All
  408. StringReplace, ArtistName, ArtistName, ë,e, All
  409. StringReplace, SongName, SongName, ë,e, All
  410. StringReplace, PackVersion, PackVersion, ë,e, All
  411.  
  412. StringReplace, AlbumName, AlbumName, ê,e, All
  413. StringReplace, ArtistName, ArtistName, ê,e, All
  414. StringReplace, SongName, SongName, ê,e, All
  415. StringReplace, PackVersion, PackVersion, ê,e, All
  416.  
  417. StringReplace, AlbumName, AlbumName, ?,, All
  418. StringReplace, ArtistName, ArtistName, ?,, All
  419. StringReplace, SongName, SongName, ?,, All
  420. StringReplace, PackVersion, PackVersion, ?,, All
  421.  
  422. StringReplace, AlbumName, AlbumName, ¿,, All
  423. StringReplace, ArtistName, ArtistName, ¿,, All
  424. StringReplace, SongName, SongName, ¿,, All
  425. StringReplace, PackVersion, PackVersion, ¿,, All
  426.  
  427. StringReplace, AlbumName, AlbumName, é,e, All
  428. StringReplace, ArtistName, ArtistName, é,e, All
  429. StringReplace, SongName, SongName, é,e, All
  430. StringReplace, PackVersion, PackVersion, é,e, All
  431.  
  432. StringReplace, AlbumName, AlbumName, è,e, All
  433. StringReplace, ArtistName, ArtistName, è,e, All
  434. StringReplace, SongName, SongName, è,e, All
  435. StringReplace, PackVersion, PackVersion, è,e, All
  436.  
  437. StringReplace, AlbumName, AlbumName, ï,i, All
  438. StringReplace, ArtistName, ArtistName, ï,i, All
  439. StringReplace, SongName, SongName, ï,i, All
  440. StringReplace, PackVersion, PackVersion, ï,i, All
  441.  
  442. StringReplace, AlbumName, AlbumName, î,i, All
  443. StringReplace, ArtistName, ArtistName, î,i, All
  444. StringReplace, SongName, SongName, î,i, All
  445. StringReplace, PackVersion, PackVersion, î,i, All
  446.  
  447. StringReplace, AlbumName, AlbumName, ÿ,y, All
  448. StringReplace, ArtistName, ArtistName, ÿ,y, All
  449. StringReplace, SongName, SongName, ÿ,y, All
  450. StringReplace, PackVersion, PackVersion, ÿ,y, All
  451.  
  452. StringReplace, AlbumName, AlbumName, ö,o, All
  453. StringReplace, ArtistName, ArtistName, ö,o, All
  454. StringReplace, SongName, SongName, ö,o, All
  455. StringReplace, PackVersion, PackVersion, ö,o, All
  456.  
  457. StringReplace, AlbumName, AlbumName, ó,o, All
  458. StringReplace, ArtistName, ArtistName, ó,o, All
  459. StringReplace, SongName, SongName, ó,o, All
  460. StringReplace, PackVersion, PackVersion, ó,o, All
  461.  
  462. StringReplace, AlbumName, AlbumName, ô,o, All
  463. StringReplace, ArtistName, ArtistName, ô,o, All
  464. StringReplace, SongName, SongName, ô,o, All
  465. StringReplace, PackVersion, PackVersion, ô,o, All
  466.  
  467. StringReplace, AlbumName, AlbumName, ä,a, All
  468. StringReplace, ArtistName, ArtistName, ä,a, All
  469. StringReplace, SongName, SongName, ä,a, All
  470. StringReplace, PackVersion, PackVersion, ä,a, Allñ
  471.  
  472. StringReplace, AlbumName, AlbumName, ñ,n, All
  473. StringReplace, ArtistName, ArtistName, ñ,n, All
  474. StringReplace, SongName, SongName, ñ,n, All
  475. StringReplace, PackVersion, PackVersion, ñ,n, All
  476.  
  477. StringReplace, AlbumName, AlbumName, à,a, All
  478. StringReplace, ArtistName, ArtistName, à,a, All
  479. StringReplace, SongName, SongName, à,a, All
  480. StringReplace, PackVersion, PackVersion, à,a, All
  481.  
  482. StringReplace, AlbumName, AlbumName, á,a, All
  483. StringReplace, ArtistName, ArtistName, á,a, All
  484. StringReplace, SongName, SongName, á,a, All
  485. StringReplace, PackVersion, PackVersion, á,a, All
  486.  
  487. StringReplace, AlbumName, AlbumName, œ,oe, All
  488. StringReplace, ArtistName, ArtistName, œ,oe, All
  489. StringReplace, SongName, SongName, œ,oe, All
  490. StringReplace, PackVersion, PackVersion, œ,oe, All
  491.  
  492. StringReplace, AlbumName, AlbumName, æ,ao, All
  493. StringReplace, ArtistName, ArtistName, æ,ao, All
  494. StringReplace, SongName, SongName, æ,ao, All
  495. StringReplace, PackVersion, PackVersion, æ,ao, All
  496.  
  497. StringReplace, AlbumName, AlbumName, ç,c, All
  498. StringReplace, ArtistName, ArtistName, ç,c, All
  499. StringReplace, SongName, SongName, ç,c, All
  500. StringReplace, PackVersion, PackVersion, ç,c, All
  501.  
  502. StringReplace, AlbumName, AlbumName, Ñ,N, All
  503. StringReplace, AlbumName, AlbumName, я,r, All
  504. StringReplace, ArtistName, ArtistName, Ñ,N, All
  505. StringReplace, ArtistName, ArtistName, я,r, All
  506. StringReplace, SongName, SongName, Ñ,N, All
  507. StringReplace, SongName, SongName, я,r, All
  508. StringReplace, PackVersion, PackVersion, Ñ,N, All
  509. StringReplace, PackVersion, PackVersion, я,r, All
  510. Gui3Text = Working on : %ArtistNameCuted% - %SongNameCuted%
  511. GuiControl,3:,Gui3Txt, %Gui3Text%
  512. DLCWantingNameInputCorrect = %DLCWantingNameInput%
  513. StringReplace, DLCWantingNameInput, DLCWantingNameInput, `%A`%, %ArtistName%
  514. StringReplace, DLCWantingNameInput, DLCWantingNameInput, `%SN`%, %SongName%
  515. StringReplace, DLCWantingNameInput, DLCWantingNameInput, `%AN`%, %AlbumName%
  516. StringReplace, DLCWantingNameInput, DLCWantingNameInput, `%V`%, %PackVersion%
  517. StringReplace, DLCWantingNameInput, DLCWantingNameInput, `%, , All
  518. StringReplace, DLCWantingNameInput, DLCWantingNameInput, ü, u, All
  519. StringReplace, DLCWantingNameInput, DLCWantingNameInput, %A_SPACE%, , All
  520. ;msgbox,%DLCWantingNameInput%%endfilename%
  521. If YesnoDL = Yes
  522. {
  523. FileCreateDir, %SelectedRS2014Folder%\dlc\%ArtistName%
  524. IfNotExist, %SelectedRS2014Folder%\dlc\%ArtistName%\%DLCWantingNameInput%%endfilename%
  525. {
  526. FileMove, %A_ScriptDir%\tmp\ToRename\%A_LoopFileName%, %SelectedRS2014Folder%\dlc\%ArtistName%\%DLCWantingNameInput%%endfilename%
  527. }
  528. IfExist, %SelectedRS2014Folder%\dlc\%ArtistName%\%DLCWantingNameInput%%endfilename%
  529. {
  530. FileCreateDir, %SelectedRS2014Folder%\dlc\01CheckDuplicat
  531. FileMove, %A_ScriptDir%\tmp\ToRename\%A_LoopFileName%, %SelectedRS2014Folder%\dlc\01CheckDuplicat\%NameId%%DLCWantingNameInput%%endfilename%
  532. NameId++
  533. }
  534. }
  535. If YesnoDL = No
  536. {
  537. IfNotExist, %SelectedRS2014Folder%\dlc\%DLCWantingNameInput%%endfilename%
  538. {
  539. FileMove, %A_ScriptDir%\tmp\ToRename\%A_LoopFileName%, %SelectedRS2014Folder%\dlc\%DLCWantingNameInput%%endfilename%
  540. }
  541. IfExist, %SelectedRS2014Folder%\dlc\%DLCWantingNameInput%%endfilename%
  542. {
  543. FileCreateDir, %SelectedRS2014Folder%\dlc\01CheckDuplicat
  544. FileMove, %A_ScriptDir%\tmp\ToRename\%A_LoopFileName%, %SelectedRS2014Folder%\dlc\01CheckDuplicat\%NameId%%DLCWantingNameInput%%endfilename%
  545. NameId++
  546. }
  547.  
  548. }
  549. FileRemoveDir, %A_ScriptDir%\tmp\ToRename\Unpack, 1
  550. FileDelete, %A_ScriptDir%\tmp\ToRename\%A_LoopFileName%
  551. DLCWantingNameInput = %DLCWantingNameInputCorrect%
  552. ;sleep 1500
  553. }
  554. If YesnoDL = Yes
  555. {
  556. YesnoDL = Yes||No
  557. }
  558. If YesnoDL = No
  559. {
  560. YesnoDL = Yes|No||
  561. }
  562. If Platform = PC
  563. {
  564. Platform = PC||Mac
  565. Platform2 = Pc
  566. }
  567. If Platform = Mac
  568. {
  569. Platform = PC|Mac||
  570. Platform2 = Mac
  571. }
  572. GuiControl,1:,actualdir, %SelectedRS2014Folder%
  573. GuiControl,1:,nameinput, %DLCWantingNameInput%
  574. GuiControl,1:,SelPlatform, %Platform%
  575. GuiControl,1:,FolderYesNo, %YesnoDL%
  576. FileRemoveDir, %A_ScriptDir%\tmp, 1
  577. Gui,3: Destroy
  578. MsgBox, Work Done.`nYou can now play as you wish :)`nCheck DLC folder if there isn't a folder `"01CheckDuplicat`" If there all duplicate or outdated CLDC are there !`nDepending on the platform you choicen but the useless version as been put in folder dlc into `"01%Platform2%Version`"
  579. Gui,1: Restore
  580. return
  581.  
  582. ; Close all if main Gui is closed
  583. GuiClose:
  584. FileRemoveDir, %A_ScriptDir%\tmp, 1
  585. Gui,1: Destroy
  586. Gui,2: Destroy
  587. Gui,3: Destroy
  588. ExitApp
  589.  
  590. ; Restore Gui 1 if Gui 2 is closed.
  591. 2GuiClose:
  592. Gui,1: Restore
  593. Gui,2: Destroy
  594. Gui,3: Destroy
  595. Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement