I am trying to replace a Mac app with a higher version. I have successfully used
revCopyFile in this script elsewhere. But, here, it doesn't.t work. The if statement is true.
Yes, I know there is version checking built in but I didn't do it that way. Distribution of app/exe is limited to immediate family only. Grandson is on Windows. I am Mac OS 15.2, LC 10.0.
The Script
if tAppExeVersionUpdateCheck > tAppExeVersionMusicRGTCheck then
put tFolderMusicRGT & slash & tTextToCheck & " -- 1" & return into msg -------
delete file tFolderMusicRGT & slash & tTextToCheck
put the result & " -- 2A" & return after msg ------
put the sysError & " -- 2B" & return after msg ------
put tFolderUpdate & slash & tTextUpdate into tFileToCopy
put tFileToCopy & " -- 3" & return after msg -------
put tFolderMusicRGT & " -- 4" & return after msg ------
revCopyFile tFileToCopy, tFolderMusicRGT
if the result is empty then ------
put "the result is empty -- 5A" & return after msg ---
else -----
put the result & " -- 5B" & return after msg -------
end if -----
if the sysError is empty then ------
put "the sysError is empty -- 6A" & return after msg ---
else -----
put the sysError & " -- 6B" & return after msg -------
end if
set the thumbPosition of scrollbar "Progress" to 100
put "Replacing Mac App with " & quote & tTextUpdate & quote & " is Completed." & \
return & return after field "Status"
else
put "Mac App - " & quote & tTextUpdate & quote & " is the latest !" & return & \
return after field "Status"
end if
The Message Box
/Users/RgtClassic/Desktop/Music-RGT/Music_Files -- 1
can't delete that file -- 2A
66 -- 2B
/Users/RgtClassic/Desktop/Music-RGT-Update-Test-1/Music-By-RGT-V73.app -- 3
/Users/RgtClassic/Desktop/Music-RGT -- 4
execution error -- 5B
66 -- 6B
revCopyFile in this script elsewhere. But, here, it doesn't.t work. The if statement is true.
Yes, I know there is version checking built in but I didn't do it that way. Distribution of app/exe is limited to immediate family only. Grandson is on Windows. I am Mac OS 15.2, LC 10.0.
The Script
if tAppExeVersionUpdateCheck > tAppExeVersionMusicRGTCheck then
put tFolderMusicRGT & slash & tTextToCheck & " -- 1" & return into msg -------
delete file tFolderMusicRGT & slash & tTextToCheck
put the result & " -- 2A" & return after msg ------
put the sysError & " -- 2B" & return after msg ------
put tFolderUpdate & slash & tTextUpdate into tFileToCopy
put tFileToCopy & " -- 3" & return after msg -------
put tFolderMusicRGT & " -- 4" & return after msg ------
revCopyFile tFileToCopy, tFolderMusicRGT
if the result is empty then ------
put "the result is empty -- 5A" & return after msg ---
else -----
put the result & " -- 5B" & return after msg -------
end if -----
if the sysError is empty then ------
put "the sysError is empty -- 6A" & return after msg ---
else -----
put the sysError & " -- 6B" & return after msg -------
end if
set the thumbPosition of scrollbar "Progress" to 100
put "Replacing Mac App with " & quote & tTextUpdate & quote & " is Completed." & \
return & return after field "Status"
else
put "Mac App - " & quote & tTextUpdate & quote & " is the latest !" & return & \
return after field "Status"
end if
The Message Box
/Users/RgtClassic/Desktop/Music-RGT/Music_Files -- 1
can't delete that file -- 2A
66 -- 2B
/Users/RgtClassic/Desktop/Music-RGT-Update-Test-1/Music-By-RGT-V73.app -- 3
/Users/RgtClassic/Desktop/Music-RGT -- 4
execution error -- 5B
66 -- 6B
Statistics: Posted by RobertTeeter — Mon Feb 03, 2025 7:50 pm