Filextra3 or Buddy API

Ok, I am having trouble as I port my windows project to the Mac because of Buddy API and File3Xtra. The problem lies in that I am using Buddy API to save the jpegs from the graphics folder, giving the user a choice as to where they would like to save them. I am using this script on windows

on mouseUp me
 file = baGetFilename( "save", baSysFolder( "desktop" ), "pic1.Jpg", "JPGfiles|*.jpg", 524288, "Save file", false, 0, 0 )
if file <> "" then
baCopyFile( the moviePath & "graphics\billedee.jpg", file, "always" )
 end if
end
Now it works fine on windows but not on the Mac. Can someone help me? I've tried everything. I ran into the same problem with File3Xtra I ammusing this script

on mouseUp me

filenam = "rejoice.mp3"
filesource = the moviePath & "Music\" & filenam

fxObj = xtra("FileXtra3").new()
destination = fxObj.fx_FileSaveAsDialog("c:\", filenam, "Save File...", True)


fxfile = xtra("FileXtra3").new()
put fxfile.fx_FileCopy(filesource, destination)

fxfile = 0
fxfObj = 0

end
Here I am trying to save an mp3. I'll really appreciate help here as the project must go multi platform.
sincejan63Asked:
Who is Participating?
 
naxConnect With a Mentor Commented:
One thing could be causing problems is the path's separator

"/" or "\" only works on a PC and ":" is for the Mac so to make sure that your script works for both, use the machineType to check the machine and change the separator accordingly:

---
global pathSep

on startmovie
   pathSep = [":", "\"][(the machineType = 256)+1]
end
---

and use this for every instance that you use a separator, like in the following:

---
baCopyFile( the moviePath & "graphics" & pathSep & "billedee.jpg", file, "always" )
---

and also in:

---
filesource = the moviePath & "Music" & pathSep & filenam
---

be sure to specify pathSep variable in your global declaration for each script that you use it.  Don't use "c:\" as a way to start your default path.  use buddyAPI or fileXtra3 methods to check the actual drive and pathname of the local hard drives.

hope that helps
0
 
sincejan63Author Commented:
It's still not working, okay I give up on the mac part of FileXtra, if these Xtra writers does not have the commonsense to include the mac codes for their xtra, I have no choice so I'll go with buddy API. All I want to do is to modify my current behavoir I am using with the buddy API xtra to work on the mac. I have been trying to get this answer since November of last year and no one seems to understand. I am getting frustrated here. It's bussy API on the Mac Nax, on the Mac. I am using this script on the PC
on mouseUp me
  file = baGetFilename( "save", baSysFolder( "desktop" ), "pic1.Jpg", "JPGfiles|*.jpg", 524288, "Save file", false, 0, 0 )
 if file <> "" then
 baCopyFile( the moviePath & "graphics\billedee.jpg", file, "always" )
  end if
end

What do I have to do to give the user an option to save the file????
0
 
naxCommented:
what kind of errors did you get?  

I don't have problems with cross platform pojects as long as you use the right Xtras and the right methods -- we do that all the time.  fileXtra4 has Mac Version -- buddyAPI has also Mac version but with some differences in features.
0
 
sincejan63Author Commented:
well I had to email the makers and they provided me with  the correct script, Thank anyway.
0
All Courses

From novice to tech pro — start learning today.