Re: "choose file name" Redux
Re: "choose file name" Redux
- Subject: Re: "choose file name" Redux
- From: Paul Berkowitz <email@hidden>
- Date: Sat, 19 Oct 2002 08:37:51 -0700
On 10/19/02 4:21 AM, "Jeffrey Berman" <email@hidden> wrote:
>
A while back I reported a problem I have with the "choose file name" command
>
since upgrading to Jaguar (10.2.1). When I use the "default name" parameter
>
as part of the command and the syntax is inside a "tell application" block,
>
it causes the application to quit unexpectedly and returns a "Connection is
>
invalid" error message.
>
>
The error does not occur when the syntax is not inside a "tell" block.
>
Unfortunately, most of my scripts using the "choose file name" command are
>
either for use from the QuicKeys menu or from Microsoft Entourage's script
>
items menu so the command ends up being embedded in an implicit "tell"
>
block. Running these commands through QuicKeys or Entourage triggers a
>
crash of these applications and the error message.
Just begin the line with 'tell me'. that should remove the effect of the
tell block, include the implicit one:
tell application "Microsoft Entourage"
tell me to choose file name with prompt "Whatever"
end tell
The 'me' is the script.
There's an oddity which may perhaps be related. You can't form an 'alias'
using concatenation of the file path in an Entourage tell block:
set theDesktop to path to desktop as string
tell application "Microsoft Entourage"
set theFile to alias (theDesktop & "File Name")
end tell
whereas you can do that fine outside an Entourage tell block (or with 'tell
me to'), and then use the result inside a tell block. The stranger thing is
that this works even when run from the Entourage Script Menu where it should
hit the same problem since even an "outside" line is inside an implicit tell
block, but it doesn't! I've asked the person who should know why not just
yesterday, as it happens, so I hope to be told the answer quite soon.
--
Paul Berkowitz
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.