Re: NSAppleScript behaving strange
Re: NSAppleScript behaving strange
- Subject: Re: NSAppleScript behaving strange
- From: Matt Neuburg <email@hidden>
- Date: Fri, 20 Jul 2007 13:15:43 -0700
- Thread-topic: NSAppleScript behaving strange
On Fri, 20 Jul 2007 17:38:41 +0200, Micha Fuhrmann <email@hidden> said:
>Hi there,
>
>I really don't know what's going on. The script gets an run error:
>
><CFDictionary 0x147c780 [0xa080b1c0]>{type = mutable, count = 4,
>capacity = 8, pairs = (
> 1 : <CFString 0xa27ddbd0 [0xa080b1c0]>{contents =
>"NSAppleScriptErrorNumber"} = <CFNumber 0x147c7b0 [0xa080b1c0]>{value
>= -43, type = kCFNumberSInt32Type}
> 2 : <CFString 0xa27ddbe0 [0xa080b1c0]>{contents =
>"NSAppleScriptErrorMessage"} = <CFString 0x30ca60 [0xa080b1c0]>
>{contents = "File :Volumes:MICHA:QQQ:AAA: wasn't found."}
> 3 : <CFString 0xa27ddba0 [0xa080b1c0]>{contents =
>"NSAppleScriptErrorRange"} = <00000000 00000000 >
> 7 : <CFString 0xa27ddbb0 [0xa080b1c0]>{contents =
>"NSAppleScriptErrorBriefMessage"} = <CFString 0x14321c0 [0xa080b1c0]>
>{contents = "File :Volumes:MICHA:QQQ:AAA: wasn't found."}
>)}
>
>Now I do a print from the _source of the NSAppleScript in the
>console, copy/paste in Script Editor and it runs just fine...
>
>
>Here is my script:
>
>tell application "Finder"
> set source to ":Volumes:MICHA:QQQ:AAA:" as alias
> set destination to ":Users:Micha:Desktop:" as alias
> duplicate source to destination replacing yes
>end tell
>
>Any idea?
You don't really have those initial colons in the pathnaames in your source,
do you? That's a total no-no (see my book). Maybe you'd better show your
actual Cocoa code (so we can tear it to little shreds :). m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
One of the 2007 MacTech Top 25: <http://tinyurl.com/2rh4pf>
AppleScript: the Definitive Guide - Second Edition!
<http://www.amazon.com/gp/product/0596102119>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden