Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • December 06, 2016, 02:19:46 AM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Scriptable FARR window events for interaction with other windows apps?  (Read 2845 times)

dreftymac

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 13
    • View Profile
    • Donate to Member
Greetings Fellow FARR fans!

When the user presses the FARR hotkey(s) for an already-running instance of FARR, is there a way for an *external* script or application to tell whether FARR still has focus?

The reason for this question is I'd like to see if FARR can work as a kind of "command console" for already-running instances of other windows apps.

If this could work, a user could FARR not only to *launch* other applications, but actually *interact* with them as well. The "other" application could trigger the FARR hotkey, the user could input some commands, and the "other" application could wait for FARR to be dismissed and then try to act on whatever the user did inside FARR.

An alternative of course is to just send commands from FARR to other applications, using plugins, but it'd be nice to go the other way as well, and just use FARR as a "plugin" of sorts inside another application that does all the work. FARR could then just act as a "smart command window".

If you have heard of "Quicksilver" for the Mac or "Ubiquity" for Firefox, you understand the basic concept I am shooting for.

There is a pretty easy way (by using other software along with FARR) to detect when the FARR window is active and when it has focus, and when it loses focus, but I am just curious if anyone has ever tried this just by using FARR itself.

Any feedback or reference to other existing forum topics on this issue much appreciated.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,406
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Scriptable FARR window events for interaction with other windows apps?
« Reply #1 on: October 31, 2008, 01:29:56 PM »
interesting idea.. can you give a specific example or two about how this would work in practice? ie an example of using farr for this purpose with a specific app?

dreftymac

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 13
    • View Profile
    • Donate to Member
Re: Scriptable FARR window events for interaction with other windows apps?
« Reply #2 on: November 01, 2008, 03:03:46 AM »
Greetings Mouser,

http://www.youtube.c...&feature=related
http://labs.mozilla....introducing-ubiquity

The links above probably explain better, they are screencasts that have the same or similar idea to what I am thinking of. Sorry if you have already seen these before.

For (a very simplified) Example:

Suppose you are writing an email using your regular desktop email client. Inside that email client there is probably a feature to configure "signatures" that go at the bottom of your email message. Moreover, there are probably multiple signatures that you can choose from, depending on the context.

The problem is, what if you want to send an email message using your web-based email client? Do you have to go in and re-configure the signatures again? What if your web-based mail doesn't support this feature?

One approach to this situation is to open up your desktop email client, get a signature out, use the windows "clipboard" and copy and paste from one application into the other.

Why not have a *centralized* place to put your email signatures? FARR can do this kind of thing easily. In addition, it would be great if you could have a single set of FARR commands to do all kinds of "message related" stuff without having to use fifteen different user interfaces to do essentially the same thing:

(e.g., formletter.paste;category=work;snippet=timesheet_report)
(e.g., textarea.sign;identity=work;picture=off)
(e.g., textarea.sign;identity=anonymous;category=donationcoder)

(the nice thing about this, these commands are kind of verbose, but FARR can already "autocomplete" and "auto-suggest" as you type, this means you don't have to memorize all the little arguments and stuff, and you don't have to literally type every keystroke to get this output)

This could not only "cut and paste" your content, but actually be smart enough to know which application you were sending the command to, and therefore use features that were sensitive to the context. For example, know which anonymous screen name to use, depending on which forum you are writing your message in.

This is just a simple snapshot. There are thousands of ideas that can be built of of this basic premise.






czb

  • Honorary Member
  • Joined in 2007
  • **
  • Posts: 336
    • View Profile
    • My open-source online piano game
    • Donate to Member
Re: Scriptable FARR window events for interaction with other windows apps?
« Reply #3 on: November 01, 2008, 04:22:47 AM »
I think the biggest issue here is that FARR has generaly no way how to get information from any program. How to let FARR know on which forum you are on? Ubiquity is addon for firefox so it has access to such type of information but again it is limited to firefox only. There would have to be some kind of shared api among all programs. But I doubt there is any for Windows. So generaly you would have to write addon for program in use + plugin for FARR. Is it worth it?

One solution would be to use aliases or hotkeys by which you specify your command or FARR might also provide information about from what application you came from.

If you have any idea for a cool plugin pls share and we may find some solution ;) There is hardly anything which is not possible to do in FARR :Thmbsup:

My open-source online piano game: https://github.com/musicope/game

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,406
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Scriptable FARR window events for interaction with other windows apps?
« Reply #4 on: November 01, 2008, 06:41:13 AM »
Farr keeps track of the window that had focus before farr was enabled, and i have code to get the current url from firefox or internet explorer -- so giving a farr plugin the ability to tell what program/web page the user was on before triggering it is not too hard, but what you do from there is a dif quesiton.

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,845
    • View Profile
    • Donate to Member
Re: Scriptable FARR window events for interaction with other windows apps?
« Reply #5 on: November 01, 2008, 09:04:05 AM »
I think the biggest issue here is that FARR has generaly no way how to get information from any program. How to let FARR know on which forum you are on? Ubiquity is addon for firefox so it has access to such type of information but again it is limited to firefox only. There would have to be some kind of shared api among all programs. But I doubt there is any for Windows. So generaly you would have to write addon for program in use + plugin for FARR. Is it worth it?

For reference, some of the approaches taken for Quicksilver plugins included: use the AppleScript support that some applications provided (retrieve data as well as request execution of tasks), write tools that extracted information from application data files, and I believe there were a few plugins that went as far as injecting code into other processes to get info or even control :)

I've not played w/ D-Bus at all, but a Wikipedia page on it seems to suggest that there might be some such thing for Windows too [1] -- it sounds like for that to be useful though, applications would have to support it.

Under Windows, don't certain applications support some kind of way to get info, say via COM (or whatever it's called these days)?

It sounds like it'd be nice to have the MPI (Metaprogramming Interface) mentioned in Fred Brooks' "The Mythical Man-Month after 20 Years"...

Sorry if I'm missing the point here...should go to sleep.


[1] Ah, perhaps it's: http://sourceforge.net/projects/windbus