avatar image

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

Login with username, password and session length
  • Wednesday August 17, 2022, 9:36 am
  • Proudly celebrating 15+ 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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - dreftymac [ switch to compact view ]

Pages: [1]
Thanks for the Lintalist recommendation. It looks like a well-rounded project and a good productivity booster for folks who are proficient with AHK.

I personally have gone down the Python route for this kind of thing.

For example, I actually have something substantially similar to Lintalist, worked out with YAML/JINJA2/TK.

I do see Lintalist appears to have some distinct advantages in some areas, relative to Python. For example, it is obviously geared toward simpler manipulation of WindowsAPI primitives, which can definitely require a lot more grunt-work from within Python.

In contrast, with Python, there is very little (if anything) that cannot be tweaked to your exact liking. Packages exist for everything under the sun, and you can configure things down to what precise syntax you want to use for snippet placeholders (for example), and what kind of expressions or dynamic values you want to have available to populate them.

This is why pastefromfile in FARR would round things out nicely, since it would permit any kind of inter-process communication where simple textfiles serve as the "pipes" between different applications, and FARR could serve as the general-purpose GUI front-end. Technically, it is already possible, since FARR is so extensible, but one goal is to minimize the amount of "clever workarounds" required.

Anyway, it is always satisfying to see other people's solutions and tools for productivity boosts, all centered around great ideas that you know took some time and thought.

Thanks, therefore, for your time and thought, and informative feedback!

Thanks for the replies folks!

I was hoping to avoid additional external dependencies outside FARR, but these are great suggestions.


This is a good reminder, thanks for the post.

Find And Run Robot / alias pastefromfile instead of alias paste
« on: May 07, 2021, 04:36 PM »

## Question

Is there an alias that works just like paste %WHATEVER% ... except it takes the contents of %WHATEVER% from a filepath on your local machine?

Something like pastefromfile %FILEPATH_HERE% ?

Something like pastefromfile c:\docs\temp\mytemporary_text_file.txt ?

## Rationale

The rationale for this request: paste works great for single-line-only text, but this request is looking for something that can take any arbitrary multi-line-string that lives in a file somewhere on the local machine.

Greetings Mouser,

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.

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.

There's one thing I forgot to mention, another reason why the suggestions don't seem to work for me, it's the behavior of the TAB key.

Even though I have "tab autocompletes" turned on in FARR options, the TAB key doesn't behave for me the way you seem to be suggesting it should. What I get is the following (assuming the same example from before):

1) If the user has "fooscript base" in the input box, and the FARR command input box has focus, TAB causes the focus to change to the first result item with the first result item being highlighted. The text of the input box does not change, and remains "fooscript base" even if the user repeatedly presses TAB or the arrow up/down keys;

2) If the user has "fooscript base" in the input box, and the FARR results window has focus, TAB causes highlight to toggle on and off on whichever specific result item last had focus. The text of the input box does not change.

The alternate behavior that you mentioned (TAB causing the input text to change to the path) *does* work when FARR is generating windows file paths on its own, but this behavior does not carry over to the situation where an Fscript plugin is emitting the results.

Not sure if that's usual, or if something can be changed in the fscript to change the TAB key behavior, but there's that.

Thanks guys,

phitsc, your suggestion makes sense, and it is an alternative approach that I did actually try, but abandoned.

The only real drawback (if you can call it a drawback, FARR really does an outstanding job as-is) is that
I am actually using the "path" as a command description with complete details, so the user sees something
like this:

'fooscript base64.encode'  <<<--- FARR launch input box

fooscript base64.encode ;; category: codec ;; this will encode the currently-selected text using base64 encoding <<<--- FARR status bar

That is, the status bar description (aka path) has a long-winded complete description of what the command will do before the user chooses it. This looks great when its down there in the status bar and only showing one-at-a-time when the specific command is highlighted, but it looks not-so-great (aka upside-down awful) when you populate the FARR results window with a bunch of these long-winded descriptions, and you put the short-winded text down in the status bar. The results become very hard to read and poorly aligned.

Incidentally, this option *would* be a great choice if I could get FARR to "clean up" the results window by putting the long-winded descriptions in a *grid* ... where the cells could be aligned and auto-determined by a user-configurable delimiter. (such as pipe or double-semicolon or whatever). That way, the FARR results window would still look clean and easy to use no matter how verbose the individual commands got.

Anyway, I know that the "grid" thing is also a feature that has been already talked about and slated for inclusion in FARR at some point (if time permits). 

Another great option would be the ability to copy-paste the the "short winded" text instead of the "long winded" text.

Nonetheless, I'm not complaining, FARR enables so much with what it has, these are really very minor limitations.

Hats off and thanks for the suggestions.

Find+Run Robot
v2.30.01 by DonationCoder
working with custom-made fscript javascript plugin

How can you apply the tab-autocomplete feature to fscript-generated
FARR results?

I am custom generating a list of output results from a javascript plugin
using the really great plugin system. I would like to be able to autocomplete
and let the user press tab to make the completed suggestion appear in the
launcher input box. The steps below describe what I am trying to do.

- user enters the alias to trigger the plugin

    fooscript       <-- FARR user input box
- the fooscript plugin returns a long list of results
- the user types some text to narrow down the results

    fooscript base  <-- FARR user input box
- the result list now shows only those entries that have:

    1) the word "base" in the launch list; or
    2) the word "base" in the path string down in the FARR statusbar
    (both of these are generated by the fscript)
    For example:
    fooscript base  <-- FARR user input box   <-- result list

- NEEDED: what i would like to do is allow the user to arrow down
    to one of the items in the filtered result list, and then press
    TAB. In the previous example, the user presses arrow down
    three times and then TAB to get this:
    fooscript base64.encode  <-- FARR user input box
The reason why I would like to do this is because the user
should be allowed to enter additional arguments before triggering
the command:
    fooscript base64.encode "hello world" <-- FARR user input box
    *The user would now press ENTER and the fscript will take the
     result and run the appropriate action*
I notice that you can always right-click an item in the result
list and choose "copy path" ... the problem with this is it copies
the status bar text at the bottom, and I would like it to copy the
text from the result list instead. This way the user could copy
and just paste into the FARR user input box.

Does anyone know how to get autocomplete working this way?


Greetings Fellow-FARR-Fans,

After learning about the command-line arguments that you can send to FARR, I tried to use the -show option. It works, but it does not seem to work as advertised in the help document. Specifically, the part about "(or bring up any running copy) " doesn't seem to actually bring up an existing instance of FARR.

To prove this I created a script that just calls FARR after one instance is already running and showing in the taskbar. Sure enough, when running the script there is a slight delay and then FARR runs a second instance, which clearly shows up in the taskbar along with the previous instance.

Is there something I'm doing wrong, or a special way to formulate the commandline string so that FARR will simply instantiate the already-running instance?

If -show is truly capable of running an existing instance of FARR, is it also possible to use -show in combination with -search so that the already-running instance of FARR can be instantiated, and pre-populated with a filled-in search (such as an alias string)? I tried both and niether option seems to honor the (any running copy) clause.

Thanks in advance for any additional insight.

That looks good and is a clever idea.


Just checking back ... in case Mouser is super super busy, does anyone else out there have an idea how to get scripting to work the way described above? I'm just looking to do a very simple example where FARR can accept and paste a user input string even if it is not in the list of script-generated auto-complete suggestions.

Thanks anyone out there who may have ideas on this.



    FARR: v2.10.01 by DonationCoder
    SCRIPT: fscript.js plugin script using the javascript plugin facility
    RUN PROFILE: calling farr.exe with the argument      -show -search ":myplugin";


I run farr using the prefix defined by my plugin as a commandline argument. All my plugin does is generate a list of suggestions
using FARR.emitResult. Then the user gets to pick one of the suggestions from the list. Once the user has chosen, the plugin
simply pastes what the user chose using the FARR "paste" command. This is done in the onProcessTrigger function of the jscript

            FARR.setStrValue("launch", "paste "+path);           
            return CLOSE;

This works fine when the user types something that is already inside the suggestion list. If the user types something that is not
yet in the list, however, the script has to handle the input using onRegexSearchMatch function.

I am having trouble figuring out how to treat user input the same way inside the onRegexSearchMatch function. All I want to do
is take what the user typed and then paste it with the paste command. I have gotten this to work halfway, but FARR refuses to
dismiss when the user presses ENTER. It just sits there. Also, when FARR is started up again the next time, the input box is frozen
and wont accept keystrokes. The only way I have figured out how to dismiss FARR is to use FARR.debug(), which seems to make
FARR go away.

    function onRegexSearchMatch(querykey,querynokeyword) {
        var curr_match  =   null;
        curr_match      =   querynokeyword.match(scriptregex);
        if(curr_match[curr_match.length-1].toString() != ''){
            var stemp       =   '';
            stemp           =   curr_match[curr_match.length-1].toString().strip();

            // The paste works, but i dont want to have to use FARR.debug just to get the FARR window to close
            // Also, when FARR is started up again the next time, the input box is frozen and wont accept
            // keystrokes.
            FARR.setStrValue("launch", "paste "+stemp+"\n");                       

What is the correct way to handle the scenario described here?

This is a step by step description of what I am trying to do.

1) Startup FARR so the prefix for my plugin is automatically filled into the search bar (doing that now with a script that calls FARR with command line args)
2) Allow the user to type in a string to be handled by my plugin
3) Generate a list of "suggestions" to the user, automatically generated by the plugin script
3) a) if the user input matches one of the auto-generated suggestions, take that input and just use FARR paste to get it into the last running app
3) b) if the user input does not match any of the auto-generated suggestions, match that input anyway and paste it into the last running app
4) keep track of whatever input the user supplied in either 3a) or 3b) and save it to a special history file
5) dismiss FARR window and make it wait in the background as usual

I can get all of the above steps to work as expected *except* for step 3) b) and step 5). When those two things happen together I cannot get FARR to exit normally nor startup and accept user input normally.

If you can help out, please do. Thanks.

try this:


That is precisely what I was looking for. Thank you very much, sir czechboy. May honor be upon your house for all days.


assuming you don't need to generate those strings dynamically

*slaps forhead*

Thanks, mouser, but the "hello world" strings were just an effort to keep this discussion very simple. I am not literally interested in how to paste "Hello World" in different languages using FARR ... (my javascript will be indeed doing fancy stuff, but first I gotta lay the foundation, hence the phrase "proof of concept").

Thanks for the *paste* tip, though, as the documentation only talks about using paste with date, time and date+time, so that's an interesting tidbit you've added. I will keep that in mind also.

Just to re-cap:
* This really is a question about Javascript (I promise), a specific example doing the three steps above would be nice;
* FARR aliases are definitely great, but those are already pretty well documented, and javascript examples exist for that, so feel free to omit that from this convo;
* I am also interested in calling an external program and passing what the user selected as a cmdline argument to that program. (alternate variation of STEP3)

The reason I'm asking is because none of the existing Javascript-based examples do all three, and I'm trying to figure out how much time/money/brain-power to invest in this tool. So far it looks good, but I'd really like a bare-bones-very-simple example to start from, doing all three steps as shown above. (also with the second variation of STEP3 would be ultra-super).

Thanks in advance,

Hello FARR-folks!

I am impressed with FARR and I'd like a little help to
determine if FARR is the right tool for me.

I would like to be able to do a proof of concept script
using the Javascript API. I've read the documentation and
I am pretty certain this is possible, I just have not found
it yet.

Code: Text [Select]
  1. STEP1:
  2. Output the following strings to FARR results pane:
  4. * Hello World!
  5. * Bonjour Tout le Monde!
  6. * Hola Mundo!
  7. * Guten Tag Welt!
  9. STEP2:
  10. Allow the user to choose one item from the results pane.
  11. (e.g., user presses ENTER on Hola Mundo!)
  13. STEP3:
  14. Take the text that the user selected and paste it into the
  15. previously-active window.

STEP3 is the one I need help with, the other steps are pretty
easy to figure out from the existing examples.

Also, I'd like to see an example of step3 where FARR launches
any arbitrary application and passes in whatever the user
chose as a cmdline argument to that application.

Any help you can provide will be appreciated, as it will be
a big step in deciding whether FARR is the right tool for
me and I can jump in here with a donation and some code to
possibly help others.

Thanks in advance,

Pages: [1]