Re: Prevent asking to locate application
Re: Prevent asking to locate application
- Subject: Re: Prevent asking to locate application
- From: Paul Berkowitz <email@hidden>
- Date: Mon, 29 Mar 2004 16:25:21 -0800
On 3/29/04 1:07 PM, "Joseph Weaks" <email@hidden> wrote:
>
New problem. Now I remember why I hard-coded the name of the app to
>
begin with. The problem is that this won't compile:
>
>
set theApp to "Microsoft Word"
>
tell app theApp
>
do Visual Basic "Application.Activate
>
end tell
>
>
Is this where I can use a "using terms from" block? Does a "using terms
>
from" block ask the script user to locate that app when the script is
>
placed on their machine in the same way a "tell application" block?
Yes, except you really don't need it. The normal 'activate' should work OK
in a Word tell block - that's not one of the commands that crashes Word.
It's not a Word-specific command, and will compile just fine in a generic
'tell app theApp' block, and not show a "Where is?" block if you use the
Finder to extract a full file path as I and Walter showed you last time.
I would say just use 'activate' here.
If you really do need to use 'do Visual Basic' for some other command, then,
yes, you'd use
using terms from application "Microsoft Word"
tell app theApp
do Visual Basic "Dim oDoc as Document
Set oDoc = Documents.Add"
end tell
end using terms from
or whatever.
--
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.