Advertisement
Guest User

MultiRCT

a guest
Jul 5th, 2014
246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.03 KB | None | 0 0
  1. ' PLEASE TAKE A LOOK AT THE README BEFORE USING/EDITING THIS CODE! IT'S AVAILABLE HERE: http://www.nedesigns.com/topic/29038/multirct-keep-your-ncso-and-custom-scenery-seperate/
  2.  
  3. ' #MultiRCT is made by Oli414, please check the Readme for further information
  4. ' #Creating Object
  5. Set FS = CreateObject("Scripting.FileSystemObject")
  6.  
  7. ' #Creating variables to store the message box answers
  8. Dim answ1
  9. Dim answ2
  10. answ2 = 1
  11. Dim answ
  12. answ = 9
  13.  
  14. ' #Creating a function to swap folder names + Setup
  15. Function swapFolderNames(fileName)
  16. Dim fullpath1
  17. fullpath1 = FS.GetAbsolutePathName(fileName)
  18. Dim fullpath2
  19. fullpath2 = FS.GetAbsolutePathName(fileName & "XXX")
  20. Dim fullpath3
  21. fullpath3 = fullpath1 & " Folder 2"
  22.  
  23. If (FS.FolderExists(fullpath1 & " Folder 1")) Then
  24.  
  25.  
  26. FS.MoveFolder fullpath1, fullpath2
  27. fullpath3 = fullpath1 & " Folder 1"
  28. FS.MoveFolder fullpath3, fullpath1
  29. fullpath3 = fullpath1 & " Folder 2"
  30. FS.MoveFolder fullpath2, fullpath3
  31.  
  32. ElseIf(FS.FolderExists(fullpath1 & " Folder 2")) Then
  33.  
  34. FS.MoveFolder fullpath1, fullpath2
  35. FS.MoveFolder fullpath3, fullpath1
  36. fullpath3 = fullpath1 & " Folder 1"
  37. FS.MoveFolder fullpath2, fullpath3
  38. Else
  39. ' #Setup
  40. If answ = 9 then
  41. answ = MsgBox("Would you like to install MultiRCT? (This might take a few seconds)", 4, "MultiRCT Setup")
  42. End If
  43.  
  44. If answ = 6 then
  45. Dim text1
  46. FS.CopyFolder fullpath1, fullpath3, false
  47. Else
  48. answ1 = MsgBox("[" & fileName & " Folder 1 or 2] was not found, please read the readme file (Problem Solving 1)", 32, "MultiRCT Setup")
  49. End If
  50. End If
  51. End Function
  52.  
  53. ' #Using the swap folder names function
  54. Call swapFolderNames("ObjData")
  55. Call swapFolderNames("Data")
  56. Call swapFolderNames("Tracks")
  57. Call swapFolderNames("Scenarios")
  58. Call swapFolderNames("Saved Games")
  59. Call swapFolderNames("Landscapes")
  60. If answ = 6 then
  61. answ1 = MsgBox("MultiRCT has been installed, please read the Readme for further instructions", 0, "MultiRCT Setup")
  62. ElseIf answ = 9 then
  63. answ1 = MsgBox("Data has been swapped", 0, "MultiRCT")
  64. End If
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement