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: Sun, 28 Mar 2004 20:03:35 -0800
Just do this, using the version you have open on your compuer when you
compile the script, and assuming you really can use the same script for Word
as you can for AppleWorks, i.e. that all you need is to activate it. This
script should work whether or not the application is currently open or not.
(Walter's version only brings a currently open app to the front, it won't
open it.)
tell application "Finder"
if appChoice is "Microsoft Word" then
set appFile to (application file id "MSWD")
else
set appFile to (application file id "BOBO")
end if
open appFile
end tell
Another way to do the same thing (in X) is:
tell application "System Events"
if appChoice is "Microsoft Word" then
set appFilePath to (application file id "MSWD" as Unicode text)
else
set appFilePath to (application file id "BOBO" as Unicode text))
end if
end tell
tell application appFilePath to activate
--
Paul Berkowitz
>
From: Joseph Weaks <email@hidden>
>
Date: Sun, 28 Mar 2004 20:39:46 -0600
>
To: Hanaan Rosenthal <email@hidden>
>
Cc: AppleScript-Users list <email@hidden>
>
Subject: Re: Prevent asking to locate application
>
>
Hanaan,
>
You're not understanding the whole issue, so let me restate. I want to
>
send a script to other users for them to use. They provide the name of
>
the app in a dialog and then the script does it's stuff in that app
>
when the time comes to paste result in a word processor.
>
I want to suppress the asking to locate an app altogether, no matter
>
what clever alias name you've given it.
>
Although, I use a variation of what you mentioned to my advantage at
>
another place. I created an empy applet called "the application you
>
want to use" so that it prompts the user:
>
"Find the application you want to use." hehe.
>
Cheers,
>
Joe
>
>
>
On Mar 28, 2004, at 8:11 PM, Hanaan Rosenthal wrote:
>
>
> Joe,
>
>
>
> Place an alias to that application in the Scripting Additions folder.
>
> On top of that, if you change the file name of the alias, you can use
>
> the new name to refer to the application.
>
> For instance, make an alias of QuakXPress to the scripting additions
>
> folder and name it "Quark"
>
> Now, instead of having to type
>
> Tell Application "QuarkXPress 4.11"
>
> you can do
>
> Tell Application "Quark"
>
>
>
> Hanaan
>
>
>
> On Mar 28, 2004, at 8:50 PM, Joseph Weaks wrote:
>
>
>
>> Ok, with code like:
>
>>
>
>> if appChoice is "Microsoft Word" then
>
>> tell app "Microsoft Word" to activate
>
>> else if appChoice is "Appleworks" then
>
>> tell app "Appleworks" to activate
>
>> end if
>
>>
>
>> the problem is of course that when the end user first runs the
>
>> script, it asks them to locate those apps. If they don't have it,
>
>> they cancel and can't use the script. What is the easiest, cleanest,
>
>> shortest workaround for this?
>
>> Is it using
>
>> run script "Tell app..." ?
>
>>
>
>> Thanks,
>
>> 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.
>
>>
>
>>
>
> --
>
> Hanaan Rosenthal * Custom Flow Solutions
>
> MEDIA AUTOMATION CONSULTING
>
> 401-487-2957 * email@hidden
>
> * www.customflowsolutions.com *
>
>
>
> be successful... ...work less.
>
_______________________________________________
>
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.
[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
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.