I am so near with the lingo it hurts, all i want to happen is for Lingo to check whether the file is already there before it saves......what am i doing wrong.....help
on mouseEnter me
cursor 280
end
on mouseLeave me
cursor 0
end
on mouseUp
fileXtraObj = new (xtra "filextra3"
volumeList = fileXtraObj.fx_VolumesToList ()
cdRomVolume = ""
repeat with i in volumeList
if fileXtraObj.fx_VolumeIsCDRom (i) then
cdRomVolume = i
exit repeat
end if
end repeat
if cdRomVolume = "" then
alert "Cannot find the CD"
exit
end if
if the platform contains "Windows" then
destinationPath = fileXtraObj.fx_FileopenDialog("", "image.psd", "Enter a filename", True)
-- filecheck = fileXtraObj.fx_FileExists(destinationPath)
-- if destinationPath < filecheck then
-- put false
-- else
-- put true
-- end if
if destinationPath contains ".psd" then
set ext to ""
else
set ext to ".psd"
end if
end if
--if finalPath <> "" then
fileXtraObj.fx_fileCopy (cdRomVolume & "image.psd", destinationPath & ext)
fileXtraObj = 0
end
on mouseEnter me
cursor 280
end
on mouseLeave me
cursor 0
end
on mouseUp
fileXtraObj = new (xtra "filextra3"
volumeList = fileXtraObj.fx_VolumesToList ()
cdRomVolume = ""
repeat with i in volumeList
if fileXtraObj.fx_VolumeIsCDRom (i) then
cdRomVolume = i
exit repeat
end if
end repeat
if cdRomVolume = "" then
alert "Cannot find the CD"
exit
end if
if the platform contains "Windows" then
destinationPath = fileXtraObj.fx_FileopenDialog("", "image.psd", "Enter a filename", True)
-- filecheck = fileXtraObj.fx_FileExists(destinationPath)
-- if destinationPath < filecheck then
-- put false
-- else
-- put true
-- end if
if destinationPath contains ".psd" then
set ext to ""
else
set ext to ".psd"
end if
end if
--if finalPath <> "" then
fileXtraObj.fx_fileCopy (cdRomVolume & "image.psd", destinationPath & ext)
fileXtraObj = 0
end