>
> 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
> >
> > > >
> >
> > > >
> >
> > > >
> >
> > > >
> >
> > > >
> >
> >
> >