#include #include #include #include #Include #include #include #include #Include #include #include #include #include #include #include #include #include #include #include #include #include ;Functions script Opt("GUIOnEventMode", 1) Global $Resources = "C:\SAC_IS\SAC_Robocopy\Resources\" DirCreate($Resources) FileInstall ("C:\Users\h74033\Desktop\Scirpts\AD_Toolbox\Resources\SAClogo.jpg", $resources & "\SAClogo.jpg", 0) f_CheckUSB() While 1 Sleep(10) Wend Func f_CheckUSB() Global $aDrive = DriveGetDrive("REMOVABLE") $i_Error = @error If @error = 1 Then Global $s_NoUSB = MsgBox(5, "NO USB", "No Removable Disks Detected Please plug one!") If $s_NoUSB = $IDRETRY Then f_CheckUSB() ElseIf $s_NoUSB = $IDCANCEL Then _exit() Endif Endif If $i_Error <> 1 Then f_chooseUSER() EndFunc Func f_chooseUSER() Global $g_RobocopyGUI = GuiCreate ("SAC Robocopy", 400, 550) GUISetBkColor ($Color_White) GUICtrlCreatePic ($Resources & "\SAClogo.jpg", 80, 10, 240, 80) $g_DescLabel = GUICtrlCreateLabel("-- SAC ROBOCOPY --", 140, 105) GUICtrlSetFont (-1, 8.5, 700, 0) GUICtrlCreateSeperator(0, 5, 130, 2, 390) GUICtrlCreateLabel("*** Current Username: " & @UserName & " ***", 100, 140, 200, 20) GUICtrlSetFont (-1, 8.5, 700, 0) GUICtrlSetColor (-1, $COLOR_PURPLE) GUICtrlCreateLabel ("- Step 1: ", 5, 180) GUICtrlSetFont (-1, 8.5, 700, 0) GUICtrlCreateButton ("Select Source Drive", 60, 174) GUICtrlSetOnEvent (-1, "f_SelDrive") Global $chk_SelectedBtn = GUICtrlCreateButton ("Submit", 125, 490, 150, 50) GUICtrlSetState(-1, $GUI_DISABLE) GUICtrlSetOnEvent (-1, "SubmitCopyChoice") GUISetOnEvent($GUI_EVENT_CLOSE, "_exit") GuiSetState() EndFunc