![]() |
I did that and it stopped crashing. I also commented out --set annot2 to "Copyright"
I drag 100 files in, it does about 3-4 files then stops. |
That's strange. I've just duplicated it on mine. For some reason, Quicktime quits. I'll see what I can do.
|
It's definitely Quicktime unexpectedly quitting. I have been able to get it to do all of the 9 copies I made of the file, but with no significant changes to my code. Then I try it a second time and it crashes on the third file!
|
Here's the latest. Quicktime is crashing on opening the file. The error log says:
Command: QuickTime Player Path: /Applications/QuickTime Player.app/Contents/MacOS/QuickTime Player Version: 6.5.2 (6.5.2) PID: 2713 Thread: 0 Exception: EXC_BAD_ACCESS (0x0001) Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x0000002c What's really strange about this is that is appears to be random, so I doubt it's the Applescript code. Anybody have any ideas? The code: on adding folder items to this_folder after receiving added_items try tell application "Finder" set the folder_name to the name of this_folder set l to the length of folder_name set cpya to folder of this_folder set cpy to ((cpya as string) & folder_name) as string display dialog cpy set ai to length of cpy set annot1 to "Full Name" set annot2 to "Copyright" end tell repeat with aItem in added_items set lai to aItem as string set la to length of lai set adj to ai + 2 set fl to characters adj through la of lai as string set fnm to cpy & "2:" & fl as string tell application "Finder" to open aItem tell application "QuickTime Player" delete annotations in movie 1 save movie 1 in fnm close movie 1 saving no quit "QuickTime Player" end tell end repeat end try end adding folder items to |
Again, worked a couple of times then, this time, got an unexpected error -600
Is it possible to make a droplet and save to another folder? I can hard-code in the location. |
Quote:
set fnm to cpy & "2:" & fl as string and save movie 1 in fnm are for. It's to change the path from "~:folder:filename" to "!:folder2:filename" Anyway, the problem is that Quicktime is crashing on opening the file, not saving it. It's weird because this test script to open and close each file, works: on adding folder items to this_folder after receiving added_items try tell application "Finder" repeat with aItem in added_items open aItem tell application "QuickTime Player" close movie 1 saving no end tell end repeat end tell end try end adding folder items to |
I think I've found the problem, although I don't yet have a solution. It seems that files with spaces in their names often affect not their own processing, but the next file to be opened and then saved. I think it's a bug in Applescript, because it doesn't always happen, especially if there is a delay such as that caused by a dialog or the command: delay 1
on adding folder items to this_folder after receiving added_items tell application "Finder" repeat with aItem in added_items set nxtone to aItem as string set lnxt to the length of nxtone set flname to name of aItem as string set lfln to length of flname set ll to lfln as text --activate --display dialog "#" & flname & "#" delay 1 open aItem set adj to lnxt - lfln - 1 set cpy to characters 1 through adj of nxtone as string set fnm to cpy & "2:" & flname as string tell application "QuickTime Player" delete annotations in movie 1 save movie 1 in fnm close movie 1 saving no end tell end repeat end tell end adding folder items to |
| All times are GMT -5. The time now is 10:21 AM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.