• 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: Best approach: Hotkey and Pasteboard application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Best approach: Hotkey and Pasteboard application


  • Subject: Re: Best approach: Hotkey and Pasteboard application
  • From: Adam Holt <email@hidden>
  • Date: Sat, 09 Apr 2005 11:50:57 +0100

Thanks Daniel for the reply and for the pointer to LSUIElement.  I will go
and read up on it now.

It's a shame to have to forfeit the dock icon in the "foreground" state with
this app (I'm not worried about losing the menu bar).  I hadn't really
noticed before you mentioned it, but Snapz Pro also exhibits the same
behaviour so presumably they have gone for a similar approach.

Best regards,

Adam.


On 9/4/05 1:59 am, "daniel" <email@hidden> wrote:

> I haven't used Snapz Pro, but I provide a similar behavior to what
> you're describing in my script menu utility, and the way it's done in
> general is to live the world "between background and foreground"
> applications.  These apps are recognized by the OS as being capable of
> and allowed to displaying UI elements, but they don't have a visible
> bar.  Search google or this list for "LSUIElement" and you should find
> some more information.
>
> There are some caveats to being an LSUIElement application, but in
> general you can take control of the UI just as any other app can, with
> the exception that you don't get a dock icon or a menu bar.
>
> Daniel
>
> On Apr 8, 2005, at 4:00 AM, Adam Holt wrote:
>
>> I'm trying to figure out the best approach to take with this...
>>
>> I want my application to run in the background (undocked) and when a
>> certain
>> global key combination is pressed, including a modifier key (e.g.
>> CMD-Escape) I want the GUI to appear and for the contents of the
>> Pasteboard
>> to be pasted into a NSTextView instance.
>>
>> I'm considering two general approaches to this:
>>
>> 1. Split this into two apps.  Make the first one a background app that
>> can
>> be put in startup items.  This is the app that listens for the hot key
>> event
>> and either launches, or brings to the front (if already running) my
>> second
>> app... similar to the application posted here: (
>> http://inessential.com/?comments=1&postid=2920 ).  Whilst from this
>> example
>> I can see how to launch my second app I'm not sure of the best
>> approach to
>> take with the interapplication comms part, i.e. How do I send the
>> trigger to
>> my app2 to tell it to copy the pasteboard contents into the TextView?
>>
>> ALTERNATIVELY...
>>
>> 2. I put all of this inside one application.  The closest example I can
>> think of is Snapz Pro ( http://www.ambrosiasw.com/utilities/snapzprox/
>> )
>> which runs as a background app when you launch it, until you hit the
>> hotkey
>> combination which then brings it to the foreground.  I tried
>> recreating this
>> behaviour but failed.  Does anybody have any examples of how this can
>> be
>> done?
>>
>>
>> I would certainly welcome your views on approach 1 vs approach 2 and
>> any
>> tips that anybody has about making either of these approaches work.
>>
>> Many thanks!
>>
>> Adam.
>>
>>
>>  _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Cocoa-dev mailing list      (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>> sweater.com
>>
>> This email sent to email@hidden
>


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: Best approach: Hotkey and Pasteboard application (From: daniel <email@hidden>)

  • Prev by Date: GDB: How to access arguments
  • Next by Date: Packages vs. Finder (perceived stability problem)
  • Previous by thread: Re: Best approach: Hotkey and Pasteboard application
  • Next by thread: Adding a subview to an NSOpenGLView?
  • Index(es):
    • Date
    • Thread