Re: Prevent asking to locate application
Re: Prevent asking to locate application
- Subject: Re: Prevent asking to locate application
- From: Joseph Weaks <email@hidden>
- Date: Mon, 29 Mar 2004 01:43:21 -0600
On Mar 29, 2004, at 12:46 AM, Walter Ian Kaye wrote:
Umm... you realize you can use the 'set' command instead of pasting,
right?
At 11:29p -0600 03/28/2004, Joseph Weaks didst inscribe upon an
electronic papyrus:
on pasteInWord()
tell application "Microsoft Word"
set selection to the clipboard -- or to a variable if bypassing the
clipboard
Actually, the rule is to avoid using Applescript in Word for anything
that can be done in VBA. Word + Applescript = Breaky breaky. (as per
the advice of Word MVP Paul B.)
Once again, there are different options for each app and other apps
that I removed in order to focus on the main issue--options to replace
the selection or place the text after the selection or at end of
document, removing style info or not, with or without bringing the app
to the front, etc. The discussion has helped me realize I should change
my structure to something like:
tell app theApp to activate
if theApp is "Appleworks" then
--Appleworks code
else if theApp is "Microsoft Word" then
--Word VBA code
....
end if
But, given the responses so far, I think my
set AppleworksScript to "tell application \"AppleWorks 6\"...
run script AppleworksScript
is the best solution so far for the original problem... which is having
an application call that doesn't check for the app when compiled.
Cheers,
Joe Weaks
_______________________________________________
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.