avatar image

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

Login with username, password and session length
  • Tuesday July 7, 2020, 9:35 pm
  • 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 - klausbh [ switch to compact view ]

Pages: [1]
Find And Run Robot / FARR works ok in crunchbang linux
« on: April 17, 2014, 10:46 PM »
I recently migrated from win XP to #! linux and one of the programs I didn't want to live without was find and run robot. Well, after playing around for several evenings I now have FARR mostly set up to my liking:

- on first "pause" key-press after booting, FARR is loaded via WINE
- subsequent "pauses" summon and dismiss the FARR search window as expected
- the search window is (almost always) focused such that typing triggers searches as expected
- files on both my NTFS (windows) and EXT4 (linux) partition are found as expected
- windows .exe files start via WINE
- document types configured to launch via specific windows apps do so
- document types configured to launch via specific linux apps do so
- unspecified document types consult the linux file manager for a default linux app
- some bugs require workarounds (e.g., ordering searched folders by drag-and-drop does not work, but editing FindAndRunRobot.ini does work)

There were two main issues that required work on my part:

1st problem: WINE alone does not get “pause” to work. Solution: a linux script (I call it “") is triggered by “pause” and sends another “pause” to FARR. The same script also focuses the window, and launches FARR in the first place. Here it is:

Code: Text [Select]
  1. #!/bin/sh
  2. if [ -z "$(pgrep FindAndRunRobot)" ]
  3.         then
  4.                 /usr/bin/wine /media/third/testing/FindAndRunRobot/FindAndRunRobot.exe
  5.         else   
  6.                 xdotool search --classname FindAndRunRobot key "Pause" search --name "Find And Run Robot 2" windowactivate --sync
  7. fi
  8. exit 0

Since crunchbang uses openbox as a window manager, the initial hotkey can be set up in ~/.config/openbox/rc.xml as follows:

Code: Text [Select]
  1. [code=text]
  2.     <keybind key="Pause">
  3.       <action name="Execute">
  4.         <startupnotify>
  5.           <enabled>true</enabled>
  6.           <name>Run Program</name>
  7.         </startupnotify>
  8.         <command></command>
  9.       </action>
  10.     </keybind>

2nd problem: FARR needs a custom document opener that can trigger both linux and WINE applications as needed. Solution: a windows batch file (which I call “bender.bat” after the wino robot in futurama).  Since #! uses thunar as a file manager,  thunar can be called to indirectly associate documents with linux applications. One could also bypass thunar and specify everything explicitly. Here is the batch script:

Code: Text [Select]
  1. @ECHO OFF
  4. SET foo=%1
  5. SET foo=%foo:a=A%
  6. SET foo=%foo:b=B%
  7. SET foo=%foo:c=C%
  8. SET foo=%foo:d=D%
  9. SET foo=%foo:e=E%
  10. SET foo=%foo:f=F%
  11. SET foo=%foo:g=G%
  12. SET foo=%foo:h=H%
  13. SET foo=%foo:i=I%
  14. SET foo=%foo:j=J%
  15. SET foo=%foo:k=K%
  16. SET foo=%foo:l=L%
  17. SET foo=%foo:m=M%
  18. SET foo=%foo:n=N%
  19. SET foo=%foo:o=O%
  20. SET foo=%foo:p=P%
  21. SET foo=%foo:q=Q%
  22. SET foo=%foo:r=R%
  23. SET foo=%foo:s=S%
  24. SET foo=%foo:t=T%
  25. SET foo=%foo:u=U%
  26. SET foo=%foo:v=V%
  27. SET foo=%foo:w=W%
  28. SET foo=%foo:x=X%
  29. SET foo=%foo:y=Y%
  30. SET foo=%foo:z=Z%
  32. SET bar=goto :thunar
  34. IF %foo:~-2%==.R   SET bar=z:\media\third\testing\npp.6.5.minimalist\notepad++.exe "%1"
  35. IF %foo:~-4%==.PDF SET bar=z:\media\third\testing\SumatraPDFPortable\SumatraPDFPortable.exe "%1"
  37. %bar%
  39. goto :theend
  41. :thunar
  42. winepath -u "%1" > %TEMP%\temp.txt
  43. SET /P foo=< %TEMP%\temp.txt
  44. del %TEMP%\temp.txt
  45. SET foo=%foo: =\ %
  46. \bin\sh -c "thunar %foo%"
  48. :theend

I think the only part that needs to be customized is the section with if statements (one for each file type).


P.S.: Does anyone know how FARR could tell, without indexing, which files on a linux partition are executable (i.e. read the execute bit)?

Finished Programs / Re: SOLVED: better keyboard language switching
« on: January 20, 2012, 03:54 AM »
Thank you, thank you, thank you!

I had searched far and wide without finding that solution, perhaps because it never occurred to me that one complex keyboard layout could accommodate two standard layouts simultaneously. Specifically, I did not realize that caps-lock and shift can be used without cancelling each other out, i.e. "caps-lock + shift + ;" = "Ö" .

As far as I am concerned the issue has been solved, and by the good folks at microsoft no less! Do I need to do anything to mark the thread as such?


Finished Programs / SOLVED: better keyboard language switching
« on: January 19, 2012, 04:29 PM »
Hi all,

I am a new member, lured in by Find And Run Robot, and the first thing I would like to try out here is a coding snack idea. I would be quite thrilled if somebody could implement the idea, because it has been bugging me for years!

Quick description: Simple hotkey keyboard language switching for all previously launched and newly launched applications. The icing on the cake would be an option to make keyboard languages device-specific, i.e. allow simultaneous use of one internal English laptop keyboard and one external German USB keyboard. (Win XP)

Long-winded description: I use two different keyboards (internal laptop and external USB) and I also use two different languages (English and German). The internal keyboard happens to have the US-English layout printed on it and the external one happens to be German, but that is not important just yet. What is important is that I frequently switch between keyboards and languages in all possible combinations. Currently I do this via the windows language bar (ctfmon.exe) using ALT-SHIFT to toggle between English and German. Unfortunately, the language bar implements keyboard layout on an application by application basis. So, lets say I am writing an email in German on the German keyboard, and I suddenly want to check something on the web. I launch a browser and start typing but forget that, by default, I am now back to a US keyboard layout. I am reminded when all the Ys and Zs are switched, not to mention the lack of Ä, ß, ... As far as I can tell there is no way to make windows understand that when I switch to the German layout, I mean ALL applications and not just the active window. There is an additional feature that may be very useful. I usually have both keyboards within reach, and might not have to switch languages as often (reducing memory-related spelling problems), if I could simultaneously have the laptop keyboard mapped to the US layout and the USB keyboard mapped to the German layout. Just imagine all those keys actually doing what they say! By the way, I happen to use a variant of windows XP, but I suspect that there are many other multi-(keyboard-)lingual folks out there who could benefit from this, so "win all" would be best.

Thanks in advance,


Pages: [1]