! EncZoomCopyCal.scr ! Copy magnification calibration file to the standard location (so that it will be used by MetroPro) ! ----------------------------------------------------------------------------------------------- loadsub "EncZoomGlob.scr" ! ----------------------------------------------------------------------------------------------- gosub GET_QUIET_FLAG ! Sets var quietFlag% ! ----------------------------------------------------------------------------------------------- gosub CLR_STATUS_MSG_ALL gosub SET_SCRIPT_STATUS_FAIL ! ----------------------------------------------------------------------------------------------- ! Source file fn$ = ZoomCalDataFile$ gosub DOES_FILE_EXIST ! Uses var fn$, sets var fileExists% if fileExists% = 0 then msg$ = " Cannot access file " & fn$ & " " gosub SHOW_ERROR_DIALOG stop endif src$ = fn$ ! ----------------------------------------------------------------------------------------------- ! Destination file fn$ = ZoomCalDataDir$ & "\\" & ZoomCalDataFn$ dst$ = fn$ gosub DOES_FILE_EXIST ! Uses var fn$, sets var fileExists% ! ----------------------------------------------------------------------------------------------- if quietFlag% = 0 then msg$ = " Install Mag Cal Data \n\n" msg$ = msg$ & " This will copy file \n" msg$ = msg$ & " " & src$ & " \n" msg$ = msg$ & " to \n" msg$ = msg$ & " " & dst$ & " \n" if fileExists% <> 0 then msg$ = msg$ & " overwriting the existing file \n" endif msg$ = msg$ & "\n" msg$ = msg$ & " Do you want to continue? " msgtype% = 6 gosub SHOW_DIALOG ! Uses vars msg$ and msgtype%, sets var ok% if ok% = 0 then stop endif endif ! ----------------------------------------------------------------------------------------------- msg$ = "Install Mag Cal Data" gosub SET_STATUS_MSG_1 gosub LOG_DATE_TIME_MSG ! ----------------------------------------------------------------------------------------------- gosub COPY_SRC_TO_DST ! Uses vars src$ and dst$ ! ----------------------------------------------------------------------------------------------- msg$ = "Copied file " & src$ & " to " & dst$ gosub SET_STATUS_MSG_2 gosub LOG_DATE_TIME_MSG ! ----------------------------------------------------------------------------------------------- gosub SET_SCRIPT_STATUS_PASS ! ----------------------------------------------------------------------------------------------- end ! ----------------------------------------------------------------------------------------------- loadsub "EncZoomSubs.scr" ! -----------------------------------------------------------------------------------------------