The method used to prevent having to re-enter the sudo password through a recursive function call failed so I created a function call with a loop that runs in the background set to keep sudo going for an hour 15 minutes which is a generous amount of time to download or install anything or run Tiger or Winetricks on slow computers. Of course, I also added a function call to reset a variable wich in turn kills the loop when it is no longer needed and had both function calls called at any time when there is a possibility of things taking too long due to a delay. The loop should also stop after awhile if the program terminates and is terminated when the program starts doing stuff again after it was stopped using ctrl-c.
Or, in layman's terms (or tldr), I took a defunct process for keeping sudo going, replaced it with something that works and made it intelligent.