• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Generating AppleScript modal dlogs from a background app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Generating AppleScript modal dlogs from a background app


  • Subject: Re: Generating AppleScript modal dlogs from a background app
  • From: John Scalo <email@hidden>
  • Date: Sun, 18 Aug 2002 12:32:11 -0700

Never mind. It seems the problem was that I was using kOSAModeNull instead
of kOSAModeAlwaysInteract for the modeFlags param of OSAExecute(). Strangely
I can't find precise definitions of those flags anywhere, but what works
works I guess.

on 8/17/02 3:38 PM, John Scalo at email@hidden wrote:

> I have an app that is background only (LSUIElement == '1'), sometimes
> generates windows, and sometimes these windows are AppleScript dialogs
> resulting from OSAExecute calls. Since to my knowledge all AppleScript
> dialogs are modal, I have to be very careful to make sure the dialogs are
> visible, otherwise there's a window that the user can't see waiting for
> input, which gives the appearance that the app has hung.
>
> So, I call [NSApp activateIgnoringOtherApps:YES] before calling any
> AppleScript which generates dialogs. Now here's the problem-
> activateIgnoringOtherApps isn't guaranteed to bring the app to the front
> immediately. I've found if the computer has been idle for more than about
> five minutes, the app doesn't come to the front quick enough and the
> AppleScript dialogs don't appear, so the app is essentially hung up.
>
> How I can I ensure that the app is "ready" to display these modal dialogs?
> [NSApp isActive] is no help because it always return YES right away. Same
> with Carbon GetFrontProcess(). I'd rather not implement some arbitrary delay
> if possible.
>
> Thanks
> - John
> _______________________________________________
> cocoa-dev mailing list | email@hidden
> Help/Unsubscribe/Archives:
> http://www.lists.apple.com/mailman/listinfo/cocoa-dev
> Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Generating AppleScript modal dlogs from a background app (From: John Scalo <email@hidden>)

  • Prev by Date: Bookmarks a la OmniWeb!
  • Next by Date: Getting machine's host id
  • Previous by thread: Generating AppleScript modal dlogs from a background app
  • Next by thread: Re: ObjC/Cocoa in university curricula?
  • Index(es):
    • Date
    • Thread