Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Avoid application launch
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Avoid application launch



I want to execute the following apple script successfully. If Entourage is not running should not launch Entourage.

tell application "Microsoft Entourage"
         selection
end tell

and also don't want to use the check

if application "Microsoft Entourage" is running then
------------
------------
end if


we need to stop the apple script execution when Entourage quits. That's what we need.


Thanks & Regards,
Joby Abraham.

On Tue, Feb 23, 2010 at 16:06, Christiaan Hofman <email@hidden> wrote:

On Feb 23, 2010, at 11:31, email@hidden wrote:

> Actually my app is using apple script for fetching some mail details from entourage. This script will execute from my app when performing some task. some back ground process using this apple script for fetching details. when performing this back ground process we may quit Entourage in between scripting action. In this situation Entourage will launch suddenly.
>
> Thanks & Regards,
> Joby Abraham.
>

So? Either make sure your app doesn't quit while it's busy in the background, if that's what you want, or make sure that the applescript doesn't call back when the app has been quit during the background process, if that's what you want. I don't see your problem.

Christiaan

>
> On , Christiaan Hofman <email@hidden> wrote:
> > Yes, that script works exactly as I would expect it to work.
> >
> >
> >
> > If you want to quit the app, you shouldn't ask it something.
> >
> > If you want to ask the app something, you shouldn't quit it.
> >
> > If you want to call a particular scripting action only when the app is running, then you enclose /that event/ in an if statement checking whether the app is running.
> >
> >
> >
> > Christiaan
> >
> >
> >
> > On Feb 23, 2010, at 9:39, email@hidden wrote:
> >
> >
> >
> > > Can you please try the following apple script
> >
> > >
> >
> > > "if application "Microsoft Entourage" is running then
> >
> > > tell application "Microsoft Entourage"
> >
> > > delay 10
> >
> > > selection
> >
> > > end tell
> >
> > > end if"
> >
> > >
> >
> > > Step 1: launch Microsoft Entourage
> >
> > > Step 2: execute the above applescript
> >
> > > Step 3: execution will wait for 10 secs to continue from line "delay 10".
> >
> > > Step 4: Quit Microsoft Entourage completing execution of line "delay 10".
> >
> > > Step 5: wait for completing execution of line "delay 10"
> >
> > >
> >
> > > Thanks and Regards,
> >
> > > Joby Abraham.
> >
> > >
> >
> > > On , Christiaan Hofman email@hidden> wrote:
> >
> > > >
> >
> > > >
> >
> > > > On Feb 22, 2010, at 9:49, email@hidden wrote:
> >
> > > >
> >
> > > >
> >
> > > >
> >
> > > > > Hi All,
> >
> > > >
> >
> > > > >
> >
> > > >
> >
> > > > > I am using the following apple script for getting current selection.
> >
> > > >
> >
> > > > >
> >
> > > >
> >
> > > > > "if application "Microsoft Entourage" is running then
> >
> > > >
> >
> > > > > tell application "Microsoft Entourage"
> >
> > > >
> >
> > > > > selection
> >
> > > >
> >
> > > > > end tell
> >
> > > >
> >
> > > > > end if"
> >
> > > >
> >
> > > > >
> >
> > > >
> >
> > > > > when running this applescript I quit "Microsoft Entourage". Suddenly "Microsoft Entourage" got relaunch. I need to avoid this. Any body knows the solution for avoiding this "Microsoft Entourage" launching?
> >
> > > >
> >
> > > > >
> >
> > > >
> >
> > > > > Thank You,
> >
> > > >
> >
> > > > > Joby Abraham.
> >
> > > >
> >
> > > >
> >
> > > >
> >
> > > > I am not sure what you are saying, as your sentences make no sense to me. How can you quit an app while running an applescript that takes virtually no time to execute? And WHEN does the app gets relaunched?
> >
> > > >
> >
> > > >
> >
> > > >
> >
> > > > When I run this AppleScript while Entourage is not running, nothing happens, which is exactly what is expected, so I see no problem. And when Entourage is running, it just gives the selection, so also no problem.
> >
> > > >
> >
> > > >
> >
> > > >
> >
> > > > Christiaan
> >
> > > >
> >
> > > >
> >
> > > >
> >
> > > >
> >
> > > >
> >
> >
> >




--
Joby Abraham|Sr. Software Engineer|Sourcebits Technologies Pvt. Ltd.|# 63, 2nd Floor, 19th Main,Rajajinagar 2nd Block,Bangalore - 560010,India.|Mobile +919916738174
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-implementors mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: Re: Avoid application launch (From: email@hidden)
 >Re: Avoid application launch (From: Christiaan Hofman <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.