|
|
Thread Tools | Rate Thread | Display Modes |
#1
|
|||
|
|||
Still getting the AppleScript syntax error, after resetting LaunchServices DB w/Onyx
... and pulling these "do shell script" lines back out of "Copy Job.applescript" eliminates the syntax error dialog when I try to schedule the backup. So what am I doing wrong:
Code:
on beforeRunningCopy() -- Put your own code here that should execute just before running the copy. do shell script "diskutil mount /dev/disk1s3 /Volumes/Biggus\ Discus" end beforeRunningCopy on afterRunningCopy() -- Put your own code here that should execute just after running a successful copy. do shell script "diskutil unmount /Volumes/Biggus\ Discus" end afterRunningCopy If I must, I suppose I can do it outside of SD. But it seems like the kind of thing I ought to be able to do here or somewhere inside the app. (Alas, trying to use the "Run shell script before copy starts" checkbox option doesn't mount the drive in time for SD to notice it I guess.) |
#2
|
||||
|
||||
You get an error when compiling the script?
__________________
--Dave Nanian |
#3
|
|||
|
|||
Yes:
"Failed to schedule automatic copy. An error occurred while trying to schedule the copy for automatic execution. If you modified the AppleScript, please endure that the script syntax is correct and try again." Image attached. |
#4
|
||||
|
||||
Try compiling it again, and then send me a System Profiler report to the support email address.
__________________
--Dave Nanian |
#5
|
|||
|
|||
Emailed. But I'm guessing this will be the part you're interested in:
Code:
console.log: Description: User events log Size: 54.73 KB Last Modified: 5/6/08 8:09 AM Location: /Library/Logs/Console/501/console.log Recent Contents: ... 2008-05-06 07:01:47.159 SuperDuper![1966] .scriptSuite warning for type 'NSTextStorage' attribute 'title' of class 'NSWindow' in suite 'NSCoreSuite': AppleScript name references may not work for this property because its type is not NSString-derived. 2008-05-06 07:01:47.159 SuperDuper![1966] .scriptSuite warning for attribute 'boundsAsQDRect' of class 'NSWindow' in suite 'NSCoreSuite': 'NSData<QDRect>' is not a valid type name. 2008-05-06 07:01:47.160 SuperDuper![1966] .scriptSuite warning for superclass of class 'NSAttachmentTextStorage' in suite 'NSTextSuite': 'NSString' is not a valid class name. 2008-05-06 07:03:14.779 SuperDuper![1975] .scriptSuite warning for attribute 'boundsAsQDRect' of class 'NSWindow' in suite 'NSCoreSuite': 'NSData<QDRect>' is not a valid type name. 2008-05-06 07:03:14.779 SuperDuper![1975] .scriptSuite warning for type 'NSTextStorage' attribute 'name' of class 'NSApplication' in suite 'NSCoreSuite': AppleScript name references may not work for this property because its type is not NSString-derived. 2008-05-06 07:03:14.779 SuperDuper![1975] .scriptSuite warning for type 'NSTextStorage' attribute 'lastComponentOfFileName' of class 'NSDocument' in suite 'NSCoreSuite': AppleScript name references may not work for this property because its type is not NSString-derived. 2008-05-06 07:03:14.779 SuperDuper![1975] .scriptSuite warning for type 'NSTextStorage' attribute 'title' of class 'NSWindow' in suite 'NSCoreSuite': AppleScript name references may not work for this property because its type is not NSString-derived. 2008-05-06 07:03:14.779 SuperDuper![1975] .scriptSuite warning for attribute 'boundsAsQDRect' of class 'NSWindow' in suite 'NSCoreSuite': 'NSData<QDRect>' is not a valid type name. 2008-05-06 07:03:14.780 SuperDuper![1975] .scriptSuite warning for superclass of class 'NSAttachmentTextStorage' in suite 'NSTextSuite': 'NSString' is not a valid class name. 2008-05-06 07:03:48.262 SuperDuper![1975] LOGGED EXCEPTION: SDAppleScriptTemplateLoadError, reason: Unable to load AppleScript template: { NSAppleScriptErrorBriefMessage = "Expected \U201c\"\U201d but found unknown token."; NSAppleScriptErrorMessage = "Expected \U201c\"\U201d but found unknown token."; NSAppleScriptErrorNumber = -2741; NSAppleScriptErrorRange = <33010000 01000000 >; }, userInfo: (null) 2008-05-06 07:03:48.263 SuperDuper![1975] Exception raised while scheduling automatic copy: EXCEPTION: SDAppleScriptTemplateLoadError, reason: Unable to load AppleScript template: { NSAppleScriptErrorBriefMessage = "Expected \U201c\"\U201d but found unknown token."; NSAppleScriptErrorMessage = "Expected \U201c\"\U201d but found unknown token."; NSAppleScriptErrorNumber = -2741; NSAppleScriptErrorRange = <33010000 01000000 >; } 2008-05-06 08:06:30.443 SuperDuper![2033] .scriptSuite warning for attribute 'boundsAsQDRect' of class 'NSWindow' in suite 'NSCoreSuite': 'NSData<QDRect>' is not a valid type name. 2008-05-06 08:06:30.443 SuperDuper![2033] .scriptSuite warning for type 'NSTextStorage' attribute 'name' of class 'NSApplication' in suite 'NSCoreSuite': AppleScript name references may not work for this property because its type is not NSString-derived. 2008-05-06 08:06:30.443 SuperDuper![2033] .scriptSuite warning for type 'NSTextStorage' attribute 'lastComponentOfFileName' of class 'NSDocument' in suite 'NSCoreSuite': AppleScript name references may not work for this property because its type is not NSString-derived. 2008-05-06 08:06:30.444 SuperDuper![2033] .scriptSuite warning for type 'NSTextStorage' attribute 'title' of class 'NSWindow' in suite 'NSCoreSuite': AppleScript name references may not work for this property because its type is not NSString-derived. 2008-05-06 08:06:30.444 SuperDuper![2033] .scriptSuite warning for attribute 'boundsAsQDRect' of class 'NSWindow' in suite 'NSCoreSuite': 'NSData<QDRect>' is not a valid type name. 2008-05-06 08:06:30.444 SuperDuper![2033] .scriptSuite warning for superclass of class 'NSAttachmentTextStorage' in suite 'NSTextSuite': 'NSString' is not a valid class name. 2008-05-06 08:08:32.321 SuperDuper![2033] LOGGED EXCEPTION: SDAppleScriptTemplateLoadError, reason: Unable to load AppleScript template: { NSAppleScriptErrorBriefMessage = "Expected \U201c\"\U201d but found unknown token."; NSAppleScriptErrorMessage = "Expected \U201c\"\U201d but found unknown token."; NSAppleScriptErrorNumber = -2741; NSAppleScriptErrorRange = <33010000 01000000 >; }, userInfo: (null) 2008-05-06 08:08:32.321 SuperDuper![2033] Exception raised while scheduling automatic copy: EXCEPTION: SDAppleScriptTemplateLoadError, reason: Unable to load AppleScript template: { NSAppleScriptErrorBriefMessage = "Expected \U201c\"\U201d but found unknown token."; NSAppleScriptErrorMessage = "Expected \U201c\"\U201d but found unknown token."; NSAppleScriptErrorNumber = -2741; NSAppleScriptErrorRange = <33010000 01000000 >; } |
#6
|
||||
|
||||
Yep. And if you open Script Editor, and paste your script line in, you'll see it gives the same error. Try doubling the backslash.
__________________
--Dave Nanian |
#7
|
|||
|
|||
I think I am seeing similar issue with saving scheduled job - I had SD 2.5 installed before, with scheduled jobs. I then upgraded my iMac from Leopard to Snow Leopard 10.6.2, and then upgraded SD to latest version through update menu. After that, I deleted the older scheduled jobs through Scheduler menu of SD, and then tried to create a new scheduled job, when I got the error message as mentioned in this thread. I then used Onyx to rebuild LaunchServices, restarted the mac, and tried again to save scheduled job. Still the same issue. Will appreciate finding out what debugging steps are, to get to the bottom of this issue.
I found this in SD log: | 12:36:59 PM | Info | EXCEPTION: SDAppleScriptTemplateLoadError, reason: Unable to load AppleScript template: <CFBasicHash 0x16a49bc0 [0xa0bdeee0]>{type = mutable dict, count = 4, entries => 2 : <CFString 0xa01087e8 [0xa0bdeee0]>{contents = "NSAppleScriptErrorRange"} = NSRange: {13486, 8} 4 : <CFString 0xa01087a8 [0xa0bdeee0]>{contents = "NSAppleScriptErrorNumber"} = <CFNumber 0x16a3cf70 [0xa0bdeee0]>{value = -2741, type = kCFNumberSInt16Type} 5 : <CFString 0xa01087b8 [0xa0bdeee0]>{contents = "NSAppleScriptErrorMessage"} = <CFString 0x16a76700 [0xa0bdeee0]>{contents = "Expected end of line but found identifier."} 6 : <CFString 0xa01087c8 [0xa0bdeee0]>{contents = "NSAppleScriptErrorBriefMessage"} = <CFString 0x18d0d4b0 [0xa0bdeee0]>{contents = "Expected end of line but found identifier."} } Last edited by sanketr; 12-27-2009 at 12:39 PM. |
#8
|
||||
|
||||
Try deleting your existing copy of SD, emptying your trash, restarting your Mac and reinstalling.
__________________
--Dave Nanian |
#9
|
|||
|
|||
It worked after I followed above steps of deleting and reinstalling. Thanks!
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | Rate This Thread |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
A strategy for managing SD! jobs via AppleScript | Syzygies | General | 15 | 05-01-2006 07:55 AM |