Re: What the "tell" is going on?
Re: What the "tell" is going on?
- Subject: Re: What the "tell" is going on?
- From: Pier Kuipers <email@hidden>
- Date: Sat, 23 Jun 2001 23:39:20 +0100
At 18:17 -0700 22/6/01, Gary B. Little wrote:
>
Pier,
>
>
Thanks, but this won't work because the script won't compile when I
>
include Fetch-related commands in the second tell block. Probably
>
because the compiler doesn't know the dictionary to use since the
>
name of the application is specified through a variable.
>
>
Gary
Yeah, sounds familiar. You'll need to use "raw" code in that case.
There has been some discussion about that in the past on this forum.
Script-writing software called Smile allows you to access an
application directly and then copy the raw code. In my example you
would end up with something like:
tell application "Finder"
open application file id "FTCh"
set AppFetch to name of result
end tell
tell application AppFetch
activate
make new +class cFWA; at beginning with properties {+class
pHNm;:"www.myServer.com", +class pUid;:"myName", +class
pPwd;:"myPassword"}
+event FTChPutI; +class cFWA; "www.myServer.com" given +class
Itms;:alias "myComputer:desktop folder:file", +class TFmt;:+constant
FFmtRawD;, +class BFmt;:+constant FFmtRawD;
end tell
You may be familiar with that type of raw code, if you've ever opened
a script on a machine where a scripting addition used in the script
is not available - in which case the raw code is displayed. Try the
above script: apart from the alias bit, it will compile without
asking where "Fetch" is.
Regards,
Pier.
--
Pier Kuipers
Visual ID
* the Media Asset Management solution *
2 Whitefriars
Aungier Street
Dublin 2
Tel. +353 1 476 7059
Mobile +353 87 294 3063
Fax +353 1 478 1366
ISDN +353 1 602 0754
http://www.visualid.com