![]() |
![]() |
||||||
|
|||||||
| Tags: |
![]() |
|
|||
|
For the sourcePath you?re using _movie.path and the @ operator which is
redundant. Just use the @ operator and you should be fine. If that doesn?t solve the problem check the value of resultCode, it will probably be something other than 0. |
| Sponsored Links |
|
|||
|
whitestar7 wrote:
> Thanks for this, unfortunately still not having much luck, when I > checked the script it said the resultcode was <void> That would mean that destinationPath="". You perhaps need to use buddyAPI to get a list of the drive names on the Mac before presenting the baGetFolder dialog, although I suggest that just using buddyAPI to get the Desktop folder to supply as the starting folder in the dialog would suffice. Andrew |
|
|||
|
whitestar7 wrote:
> I am not very good at writing lingo (as you might have guessed) how > would I ammend my script to do what you say? I don't have the Mac BuddyAPI docs to hand, but I think it's the same call as on Windows: ---------------------------------- property spriteNum on beginSprite sprite(spriteNum).cursor=280 end on endSprite sprite(spriteNum).cursor= -1 end on mouseUp me sourcePath = _movie.path & "@:PRODUCT_1 roduct_1_images roduct_1_zoom.j pg"provisionalDestFolder=baSysFolder("desktop") destinationPath = baGetFolder(provisionalDestFolder,"Copy image",1,"Select folder",-2,0) if destinationPath <> "" then resultCode = baCopyFileProgress(sourcePath, destinationPath,"ALWAYS", "Saving file... ", "Cancel", 0) end if end ------------------------------- Also, you will get better cursor responsiveness by setting the sprite's cursor rather than using mouseEnter/Leave to set it. I suggest keeping the value of the folder the user chose and starting from there if they can copy more than one file. You can write the code for that :-) HTH Andrew |
|
|||
|
whitestar7 wrote:
> I am still getting the resultcode as <void>, this is what I have put > in as a behaviour on a shape: > sourcePath = _movie.path & > "@:PRODUCT_1 roduct_1_images roduct_1_zoom.j pg"> provisionalDestFolder=baSysFolder("desktop") > destinationPath = baGetFolder(provisionalDestFolder,"Copy image",1,"Select > folder",-2,0) Have you tried those lines in the message window, one at a time and checking the values at each stage? Andrew |
|
|||
|
A quick glance at the BuddyAPI documentation shows that 1 is the error
code for "Invalid Source file name". I would look into the 1st argument of baCopyFile and see what is wrong with it. Is it an invalid filename? Does the file exist? put this immediately before the copy command: put sourcePath Does it return a valid filename? Is it correct? Does that file exist? As Applied CD said earlier, you do not need the @ sign and _movie.path in the same command. They mean the same thing, so you may very well be mangling the actual command by using both. |
|
|||
|
whitestar7 wrote:
> hiya, I gave the message window a go, and everything seems good, the > message I got for the result code was: > > > --> resultCode = baCopyFile(sourcePath, destinationPath,"ALWAYS") This is different code from what you had in your previous posts... you may have to call that BuddyAPI function with different parameters depending on the platform. And a result code of 1 means the source file name was invalid, so something is wrong there too - I guess you didn't get round to correcting the line sourcePath = _movie.path & "@:PRODUCT_1 roduct_1_images roduct_1_zoom.j pg"- didn't the value of sourcePath look wrong in the message window? That would show you what you need to correct. I'd rather show you how to find out what is wrong than spoon-feed you all the answers... HTH Andrew |
|
|||
|
whitestar7 wrote:
> hiya, this is what I get from the message window: > > == Script: (member 1 of castLib 1) Handler: mouseUp > --> sourcePath = > "@ roduct_1 roduct_1_images roduct_1_pack_zoom. jpg" == sourcePath> = "@ roduct_1 roduct_1_images roduct_1_pack_zoom. jpg" -->> provisionalDestFolder=baSysFolder("desktop") == provisionalDestFolder > = "Macintosh HD:Users:2e_admin esktop:" --> destinationPath => baGetFolder(provisionalDestFolder,"Copy image",1,"Select folder",-2,0) > == destinationPath = "Macintosh HD:Users:2e_admin esktop OWNLOAD:"> --> if destinationPath <> "" then > --> resultCode = baCopyFile(sourcePath, destinationPath,"ALWAYS") > == resultCode = 2 > --> end > I am guessing this means the filename is not valid as when chose a > filename which definitely doesnt exist it give the same message, i > have tried using an image which is You've forgotten to tack an actual filename onto the end of destinationPath. Andrew |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
- Contact Us
-|-
Adobe Dreamweaver Forums -|-
Archive -|-
Top -|-Rules/Disclaimer-|-Help/Support-|-Advertise