avatar image

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

Login with username, password and session length
  • Monday May 23, 2022, 10:19 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.

Topics - ewemoa [ switch to compact view ]

Pages: prev1 2 [3] 4 5 6next
Was looking for a simple way to do this without much tweaking and came across:

  Virtual Router Plus

In brief testing of version 2.3.0 (via .zip on project site, not .7z available via "other" site), it seemed to work fine.

No installation appears to be necessary and there appears to be WPA/WPA2 support.  One thing that seemed a bit unfortunate was that the password field appears unobscured.

Anyone have experience with this or have some other recommendation?

Recently I noticed that a number of installed Firefox addons were using a language different from what they used to.  The language I had been expecting was some kind of English, but what was being used was some non-English language.  Investigating a bit, came across:

  how can I force addons to be displayed in English?

This sounded similar to the situation here and there didn't seem to be a solution mentioned that didn't involve a fair bit of reinstalling and reconfiguring.

Tried removing addons one by one and eventually discovered that disabling (or removing) a version of the Pencil addon seemed to fix things.

So perhaps selective addon-disabling/removal is a potentially helpful approach...

For the record, had manually installed the seemingly problematic addon via an .xpi, so perhaps I had that coming as (at the moment anyway) there doesn't appear to be a version compatible with the version of FF here:

Not available for Firefox 18.0

via https://addons.mozil...irefox/addon/pencil/

N.A.N.Y. 2013 / N.A.N.Y 2013 Submission - DiffWith for FARR
« on: December 29, 2012, 10:39 PM »
Running comparison programs on FARR results.



Installation / Uninstallation / Requirements

It's a FARR plugin so installation and uninstallation are as usual.  Tested under Windows 7 64-bit with FARR 2.203.01.  May work for other versions of Windows.

Some kind of comparison program needs to be installed.  I've tested with WinMerge, KDiff3, and SmartSynchronize and I've heard that BeyondCompare can be made to work too.

The plugin also needs to be told how to invoke the comparison program.  See the README.txt file for details.






  Invocation of a comparison program on FARR results.


  There are a number of ways to configure DiffWith.  Below are some,
  just choose one :)  The descriptions may sound complex, but perhaps
  that's just a failing of the author...

  Method 1.

  Assuming a successful installation, an appropriate statusbar icon
  should be visible via FARR's main window.  To check whether a
  statusbar icon is appropriate, hover the pointing device pointer /
  cursor over the statusbar icon to observe popup text.  DiffWith's
  statusbar icon popup text should display "DiffWith".

  1. Click on DiffWith's statusbar icon and choose the "Configure"
     menu item.

  FARR should display a number of results.  One of the results should
  be "Configure Comparison Command Template".

  2. Launch the "Configure Comparison Command Template" FARR result.

  FARR should display a window with a form for configuring a template
  for the command to use when performing a comparison.

  3. Fill in an appropriate template and click on the update button.

  Some example values include:

    c:\apps\WinMerge\WinMergeU.exe /r

  Method 2.

  1. Select any FARR result and bring up its context menu.

  2. From the "DiffWith..." submenu, choose "Configure".

  FARR should display the same set of results as in the immediately
  previous method.

  3. Continue with the appropriate steps from the immediately previous

  Method 3.

  1. Bring up FARR's options and find the User Variables section:

     Program Options ->
       Lists ->
         User Variables

  2. Ensure there is a [DiffWith] section and a CommandTemplate
     variable with appropriate content.

  An example of something appropriate is:

    CommandTemplate = c:\apps\WinMerge\WinMergeU.exe /r

  (The plugin will build the comparison command by appending to the
  CommandTemplate value, double quoted paths of the two items to

  Another example configuration is:

    CommandTemplate = c:\apps\X-KDiff3\X-KDiff3.exe

  Yet another example configuration is:

    CommandTemplate = c:\apps\SmartSynchronize\bin\smartsynchronize.exe

Example Usage:

  1. Find some file using FARR and bring up its context-sensitive
     menu.  An example file might be FARR's ConfigDir_Default.ini file.

  2. From the "DiffWith..." menu, choose "Set as Left".

  3. Find another file with FARR and bring up its context-sensitive
     menu.  Another example file might be FARR's ConfigDir_Sample.ini

  4. From the "DiffWith..." menu, choose "Compare with Left".


  To compare two things, those two things need to be specified.  This
  plugin refers to one of those things as "Left" and the other thing
  as "Right".

  One workflow is:

  1. Use FARR to locate a file or folder and "Set as Left" via the
     target's context-sensitive menu (under DiffWith...).

  2. Use FARR to locate another file or folder and "Compare with Left"
     via the target's context-sensitive menu (under DiffWith...).

  Once "Left" and "Right" have been set, the comparison can be
  repeated via the statusbar menu's "Compare Current Pair" command.


  1. FARR's status area (bottom of results view) may show relevant
     information while a "DiffWith..." menu item is selected.

     For example, when the "Set as Left" or "Compare with Left" menu
     item is selected (but not invoked), the status area should
     indicate the current value for "Left".

  2. Other comparison tools may work too.  If a tool can be invoked
     via the command line with the names of the two things to be
     compared listed one after the other (not followed by anything
     else) there's a good chance it should work with this plugin.

  3. Some other comparison tool candidates:

       Beyond Compare


  Find And Run Robot





  Discussion and Testing


Developer's Corner / Learn C (and other things...) the Hard Way
« on: December 23, 2012, 07:56 PM »
Hearing praise from Josh about Learn Regex the Hard Way, went to take a look and found Learn C the Hard Way.

It doesn't appear to be completed yet, but the lessons I've gone through have been helpful in clarifying and improving my limited understanding of C  :)  (As I often seem to retain things better actually performing actions, the author's approach seems to work pretty well for yours truly.)

Has any one else tried it out?

The current list of topics the author appears to be working on (whether updating old versions or completing first versions) includes:

  • Python
  • Ruby
  • C
  • Regex
  • SQL
  • CLI Crash Course

Below are some notes on getting Android x86 working on VirtualBox (thanks to Gothi[c] for the original suggestion and tips in getting it all working!).  (It's unlikely that the steps couldn't be adapted to work with VMWare or similar.)

0. Ensure VirtualBox, the Android SDK, Eclipse, and the ADT are installed appropriately.

1. Download Android x86 Live CD:

  There are many there, but for these instructions:



2. In VirtualBox create a new virtual machine:

   Type: Linux
   Version: Linux 2.6
   Memory: 512 MB
   Hard disk size: 3 GB

   Network Adapter 1: NAT (eth0 - for ordinary network access from android)
     PCnet-FAST III <- other cards may not work
   Network Adapter 2: Host Only (eth1 - for adb connection -- e.g. for eclipse)
     PCnet-FAST III <- other cards may not work

   IDE Optical Drive: Point to downloaded Android x86 live CD iso

3. Start virtual machine

4. Choose "Installation - Install Android-x86 to harddisk"

5. Choose Create/Modify partitions

6. Choose New -> Primary -> Size (default size)

7. Select Bootable

8. Select Quit

9. Select sda1 Linux VBOX HARDDISK

10. Select ext3

11. Confirm format action

12. Confirm installation of boot loader GRUB

13. Select Yes for /system directory read-write

14. Choose to run Android x86 and wait for it to start up (consider unmounting iso image too)

15. Disable mouse pointer integration for the virtual machine

16. Alt+F1 to get to virtual console (for reference: Alt+F7 to get back to Android UI)

17. netcfg to check network interfaces (eth0 for general net, eth1 for adb)

18. If eth1 is not up: netcfg eth1 up dhcp

19. Note the IP address (e.g.

20. On host machine: via <android-sdk>/platform-tools:

      adb connect

21. Start Eclipse

22. Start some Android app via Run in Eclipse UI

23. In resulting dialog, choose running Android (should list one connected

24. If web browsing fails, it may be a DNS problem.  Try the following via a
     virtual console (Alt+F1): setprop net.dns1 <ip-address-of-dns-server>

25. To shutdown via Android UI: Two rapid entries of Host + H

     If the screen locks instead:

      1. Try to unlock and try again

      2. If the lock icon is not draggable, type the menu key (between right win and right control) and try again

    Possibly less safe ways of shutting down or rebooting (preface w/ sync?) via virtual console:

    # reboot -p

   # poweroff


N.A.N.Y. 2013 / N.A.N.Y 2013 Submission - JSHintHere for FARR
« on: December 18, 2012, 07:32 PM »
A FARR plugin to execute JSHint on a FARR file result.






Execution of JSHint on a FARR file result.

The motivating use case was the difficulty in finding errors when developing FScript-based plugins.  As FScript is Windows Scripting Host (WSH) oriented, this plugin uses the WSH support of JSHint.

Installation / Uninstallation / Requirements

It's a FARR plugin so installation and uninstallation are as usual.  Tested under Windows 7 64-bit with FARR 2.203.01.  May work for other versions of Windows.






  Convenient execution of JSHint on a file FARR result.


  Running JSHint on a .js file:

  1. Find a Javascript (WSH) file using FARR.

  2. Bring up a context-sensitive menu for the file result.

  3. Choose "JSHint Here".

  4. Observe results in FARR's memo view.

  Re-running JSHint on the last file operated on:

  1. Via FARR's status bar, choose the JSHint menu icon.

  2. Choose the "Rerun Most Recent" menu item.

  3. Observe results in FARR's memo view.

  Re-running JSHint on files operated on earlier:

  1. Via FARR's status bar, choose the JSHint menu icon.

  2. Choose the "Rerun with..." menu item.

  3. Choose a file from the submenu.

  4. Observe results in FARR's memo view.


  The motivating use case was the difficulty in finding errors when
  developing FScript-based plugins.  As FScript is Windows
  Scripting Host (WSH) oriented, this plugin uses the WSH support of


  Find And Run Robot






    Anton Kovalyov
    Wolfgang Kluge
    Josh Perez
    Brent Lintner


    Douglas Crockford

Developer's Corner / Carmack on Static Code Analysis Tools
« on: December 18, 2012, 07:29 AM »
I was using JSHint today and found:

  John Carmack on static code analysis tools - QuakeCon '11 keynote


  The About page for JSHint

I'm not sure if the following is a transcript, but there appears to be much overlap:

  Static Code Analysis by John Carmack @ #AltDevBlogADay

N.A.N.Y. 2013 / N.A.N.Y 2013 Submission - CommandPromptHere for FARR
« on: December 07, 2012, 05:45 AM »
A FARR plugin to provide "Command Prompt Here"-like behavior for FARR file / folder results.





Command prompt access from FARR results -- for files, the containing directory is used as the working directory.

A variety of "command prompts" are supported (though see README.txt for configuration info):

  • cmd.exe
  • ConEmu
  • Cygwin Bash
  • Cygwin Zsh
  • MSYS Bash
  • msysGit Bash
  • NYAOS3
  • PowerShell
  • TCC (or TCC/LE)

Installation / Uninstallation / Requirements

It's a FARR plugin so installation and uninstallation are as usual.  Tested under Windows 7 64-bit with FARR 2.206.01.  Brief testing done on Windows XP Pro SP3.  May work for other versions of Windows.


If upgrading from an earlier version ( or below), it may be easiest to start over.  The settings are likely compatible, but the arrangement of files in the plugin's directory differ.  I recommend copying the old plugin directory somewhere safe first before trying a newer version.






  Convenient access to a command prompt with the current directory set
  to match a FARR result:

    - for a folder result, the current directory corresponds to the

    - for a file result, the current directory corresponds to the
      containing folder


  Tested with:

    - Windows 7 - may work for other versions of Windows (some XP
      testing has been done too)

    - FindAndRunRobot 2.206.01 - some portion may not work with
      earlier versions of FARR

Basic Usage:

  1. Bring up a context-sensitive menu for a file or folder in FARR's
     result view.

  2. Choose "Command Prompt Here".

  A command prompt window with an appropriate working directory should

Other Command Prompts:

  It's possible to configure the plugin to work with other "command
  prompts" (see the Notes section for details).

  Once configured appropriately:

  1. Bring up a context-sensitive menu for a file or folder in FARR's
     result view.

  2. With appropriate configuration, at least one of the following
     should appear.  Choose one.

       - ConEmu Prompt Here
       - Cygwin Bash Prompt Here
       - Cygwin Zsh Prompt Here
       - MSYS Bash Prompt Here
       - msysGit Bash Prompt Here
       - NYAOS3 Prompt Here
       - PowerShell Prompt Here
       - TCC Prompt Here

  A command prompt window of the corresponding program with an
  appropriate working directory should appear.

Statusbar Icon Menu:

  The plugin provides a statusbar icon in FARR's main window.  Clicking
  this should bring up a menu that may contain some of the following

    Command Prompt at...
    Set Preferred to...

  "Command Prompt at..." allows one to open a command prompt at
  a directory which the plugin previously worked with.  (This menu
  item may not appear if there are no such directories.)

  "Set Preferred to..." allows one to choose the specific command
  prompt type (e.g. ConEmu) to use for "Command Prompt at...".
  (This menu item may not appear if there is only one command prompt
  available for use.)

  "Configure" displays a list of FARR results, each of which may be
  invoked to configure some functionality of the plugin.

  "Help" displays this file.


  1. To bring up a context-sensitive menu for a FARR result, do one of
     the following:

      - Right-click on the result

      - After selecting the result, type one of the following:

          - Control+R
          - Shift+F10
          - Menu / Application key

  2. To enable support for a particular command prompt:

     Method 1: Via a FARR Result

       - Locate the executable using FARR (e.g. c:\cygwin\bin\bash.exe),

       - Bring up the context-sensitive menu via the result
         corresponding to the executable and choose the appropriate
         menu item beginning with "Set as" (e.g. Set as Cygwin Bash).

     Method 2: Via the Plugin's Statusbar Icon

       There should be a statusbar icon for the plugin on the statusbar
       of FARR's main window.

       - Click the plugin's statusbar icon.

       A menu should appear.

       - Choose "Configure".

       A list of FARR results should appear.  Each one corresponds to
       configuring the plugin in some way.  An example result might be
       labeled: "Configure msysGit Bash Path".

       - Select an appropriate result and launch it.

       FARR should switch to a web view with a form for appropriately
       configuring the selected choice.  An example label might be:
       "CommandPromptHere.msysGitBashExe".  An appropriate value might
       be: c:\apps\msysgit\bin\bash.exe

       - Enter an appropriate value in the form field and click the
         button labeled "update".

       - Dismiss FARR or go back to using it as usual.

     Method 3: Via FARR User Variables

     Alternatively, manually create an appropriate FARR User Variable
     with an appropriate value.  For example, for Cygwin Bash, one
     configuration might be:

       CygwinBashExe = c:\cygwin\bin\bash.exe

     The following lists names of FARR User Variables for specifying
     "command prompt" executables:


  3. It's possible to configure the plugin to use a submenu to display
     menu items for each command prompt if there are two or more
     usable command prompts.  The following is an example

       UseSubmenu = 1

     Note: if the submenu mode is used, the names of some of the menu
     items may differ from the earlier descriptions.

  4. Adding support for other command prompts may be possible.

     Apart from a few exceptions, support for each command prompt is
     provided via a corresponding .js file in the plugins subdirectory
     of the CommandPromptHere plugin directory and an appropriate
     addition to the CommandPromptHere.alias file.


  Find And Run Robot




  Discussion and Testing



Starting with focus in the text edit field of the main window, pressing the up arrow key here selects the last result in the results.  This is convenient :)

However, once the last result is selected, pressing the down arrow key doesn't move the focus back to the text edit field.  This feels strange/awkward to me.

Any reflections on this?

Today I noticed that although I had pasted in to the location field, the browser ended up at -- i.e. no SSL (Firefox 16.0.1).

Here are some steps to reproduce:

  • Fresh installation of Firefox 16.0.1 (I used the portable version from portableapps)
  • Start Firefox
  • Type in the location area and press Enter
  • After seeing DC's page, exit the browser
  • Start Firefox again
  • Using Notepad, type, select the text and copy it to the clipboard
  • Paste the copied URL to Firefox's location area and press Enter
  • Observe no lock icon to the left of the displayed URL in the location area (or choose Tools -> Page Info and examine the results)

mouser confirmed that he experiences the same issue.  Any one else?

One work-around appears to be to apply what's mentioned at:

That is, via about:config, set browser.fixup.alternate.enabled to false.

Another may be to use HTTPS Everywhere, though IIUC you'd need to ensure that you've got appropriate settings for all of the sites you want to use https with.  FWIW, for DC, there is:

Thanks to Deozaan for pointing out that the content of this post gets mangled if accessed via http -- changed the post content to address the issue.

Find And Run Robot / Search Result Context Menu Item and Underlining
« on: September 29, 2012, 11:06 PM »
Puzzled by difference in behavior...

With some search results in FARR (2.200.01) under Windows 7 Professional:

  Right-clicking brings up context sensitive menu with no letters underlined

  Pressing the apps / menu key on the keyboard instead of right-clicking brings up a context sensitive menu that does have underlined letters

Any ideas why?

Recently I came across the "Safe Removal" feature in palimpsest (aka Gnome Disk Utility) and I've started using it before detaching some of my USB devices.  I'm not quite sure what it does, but LEDs seem to turn off so I get the sense that using the feature may be better than not.

I'd like to be able to do this or something comparable from the command line though.

Anyone know how that might be done?

The local context is various Debian-based things -- so I guess I'm looking for a GNU/Linux-ish answer :)

General Software Discussion / gMTP (1.3.1) oops
« on: June 07, 2012, 12:35 AM »
After struggling to interface a Samsung Galaxy Tab 10.1 via USB with a PC running Debian and being able to view its content via gMTP (imagine the surprise of discovering that the timing of initiating a connection via the UI after connecting the device to the PC is critical!) to perform a backup, a major oops...

I discovered that what was selected when I chose "Delete" was ".." in a subdirectory of a directory I was trying to back warning...and then no files or folders...

There appears to be a preference for confirming deletion, but as luck would have it...

Beware :)

I've often wanted to share some specific bit from a web page without duplicating the content and yet making it easy for a recipient to perceive which bit I wanted to indicate -- BookmarkQ offers one approach via a bookmarklet (no account required).

Here's a sample:

A rough usage summary:

  • Navigate to a page with some content to share (non-frame stuff might work better)
  • Click on the BookmarkQ bookmarklet (dragged to the Bookmark toolbar as part of set up)
  • Wait a bit for the content to redisplay
  • Highlight some text
  • Click on the BookmarkQ bookmarklet again -- page should redisplay with selected text highlighted in yellow
  • Mouse over the selected area -- should cause a popup to appear with URL to share
  • Copy URL and share as desired

The description may make it sound like it's more complex than it actually is ;)

Note that this approach may be letting a 3rd party know that a page is being shared and specifically what on that page is of interest.

Thanks to mouser for pointing me at the freewaregenius article:

  Highlight specific content on a web page to share with others, with InFocus

The article covers a different service, but that appeared to require Flash (which wasn't in the environment I was using when I took a look), but a commenter mentioned BookmarkQ -- so thanks to that commenter too :)

After not getting along so well with XML Starlet, came across xml-coreutils:

The aim is to make XML processing for shell users exactly as easy as text processing.

Commands include:

xml-cat(1) concatenate XML files and print XML on the standard output.
xml-cp(1) copy nodes from XML files into an XML file.
xml-cut(1) print selected parts of an XML file as an XML file.
xml-echo(1) generate an XML file on the standard output.
xml-file(1) determine type of XML files.
xml-find(1) search for nodes in XML files and execute actions.
xml-fixtags(1) convert HTML into XML on the standard output.
xml-fmt(1) reformat an XML file, writing to the standard output.
xml-grep(1) print matching fragments as an XML file on the standard output.
xml-head(1) truncate the parts of an XML document.
xml-less(1) interactively display an XML file on a terminal.
xml-ls(1) list the contents of an XML file.
xml-mv(1) move nodes from XML files to an XML file or the standard output.
xml-printf(1) format and print data in an XML file to the standard output.
xml-rm(1) remove nodes from XML files.
xml-sed(1) stream editor for filtering and transforming an XML file.
xml-strings(1) print the strings of data in an XML file to the standard output.
xml-unecho(1) ungenerate an XML file into an xml-echo(1) expression.
xml-wc(1) print height, depth and number of tags for each XML file.

The tutorial seems to be a decent introduction -- it seemed to touch on most (if not all) of the aforementioned.


This project is still at an early stage, and is not ready for production use. However, it is usable today for simple tasks, and you can try it out right now by clicking one of the download buttons on the left.

I'm hoping to hear from others who are interested in this topic -- hopefully about actual usage whether current or past :)

Been using the toast [1] tool for a while after having investigated to varying degrees the following:

  • paco
  • alien
  • src2pkg
  • src2pkg-ng
  • checkinstall
  • GNU Stow
  • ESP Package Manager
  • Smart Package Manager
  • OpenPKG

My own usage is under Debian (and a bit of Gentoo).  Some use cases include:

  • Want to use a more up-to-date version of something (and/or would like to patch), but would like to be able to cleanly remove traces / disable / enable
  • Want to use something on a host which lacks that something, but don't have administrative privileges -- and even if I did, don't want to impact other users' environments

Please share stories!

Version: 1.484
MD5: b66e07cd2839177cb644455cc42be3ca
SHA1: 30ec7216cd62b227b51a2ed4ec08641393454f4c

[1] The best introduction to toast I've encountered so far is the article:

  Installing and tracking software updates with toast

If interested, I recommend looking at the toast manual after reading the article.

Developer's Corner / TextAdept: Lua-extensible Editor
« on: April 20, 2012, 03:10 AM »
Today, Edvard pointed out TextAdept:

Textadept is a fast, minimalist, and ridiculously extensible cross-platform text editor for programmers. Written in a combination of C and Lua and relentlessly optimized for speed and minimalism over the years, Textadept is an ideal editor for programmers who want endless extensibility options without sacrificing speed or succumbing to code bloat and featuritis.

Perhaps trying to extend TextAdept and read some of its source may be a helpful activity if one is interested in learning some Lua.


For the win32 download of version 5.2, got the following checksums:

MD5: 20eabe5ae0d62dfd8b44cb3f7cb3ad83
SHA1: bc35c8b9743ffb29fd5669a78cefbb79fa643b4b

Developer's Corner / Online Python Tutor
« on: April 09, 2012, 01:22 AM »

General Software Discussion / JSON Editor
« on: February 08, 2012, 03:24 AM »
I'm looking for a free portable GUI JSON Editor.  I'm hoping to be able to recommend it to folks to create / edit some fairly straight-forward JSON (which might be used as a configuration file).

I've come across:


Has any one tried this and/or know of some alternatives?

Developer's Corner / Node.js Learning Resources?
« on: January 11, 2012, 09:16 PM »
Any favorite Node.js learning resources?

Currently reading The Node Beginner Book, though the version covered is 0.4.9 while what appears available currently is 0.6.7.

Started looking through O'Reilly's Up and Running with Node.js, but found the former preferable at this stage.

A very brief walk-through of some of the GUI elements involved in configuring a custom tool for CHS...

1. Bring up CHS tray menu and choose to show the CHS main window
0. CHS Tray Menu.png

2. Click the "Modify Format/Case" button in the CHS main window
1. CHS Main Window.png

3. Wait for the "Modify Format/Case" dialog to appear
2. Modify Format Case Dialog.png

4. Choose the "Custom Script Tool" item in the left pane and fill in the appropriate fields...appropriately :)
3. Custom Script Tool Item.png

5. Optionally choose the "Preset Hotkey Trigger" item in the left pane and fill in fields.
4. Custom Hotkey Item.png

6. Choose the "Save As.." menu item from the "Presets" menu and specify an appropriate name to save as.
5. Save As Menu Item.png

Web Link Captor / Using Portable Python with Web Link Captor
« on: December 12, 2011, 01:22 AM »
Below are some instructions for getting Web Link Captor to use PortablePython 2.x.

Getting Portable Python on one's system:

  • Navigate to
  • Click on the Portable Python 2.whatever (currently link near the top left of the page
  • Download exe via torrent or one of the mirrors and verify checksum
  • Run the installer -OR- use Universal Extractor (and copy the contents of the $INSTDIR subfolder to some appropriate location)

Configuring WLC to use Portable Python:

  • Start Web Link Captor
  • From the "View" menu, choose "Options and Preferences"
  • Choose the "Scripting" tab on the left pane
  • Ensure that "Python.exe path specified below (default)" is selected
  • Specify the path to python.exe for "Custom path to Python.exe (version 2.x) -- so <installation-dir-path-of-portable-python>\App\python.exe

(Tested on Windows XP SP3 with PortablePython and Web Link Captor 1.01.02.)

Find And Run Robot / Display FARR Near Pointer
« on: December 07, 2011, 02:54 AM »
The following AHK_L script should display FARR's main window and then move it close to the pointer.  I use this when there's something near the pointer I want to drop in FARR's main window (reduce dragging distance and hence risk of mis-drop).

May want to tweak the full path to FARR's exe (see FarrFullPath in code) and/or the hotkey (see KeySequence in code).

Tested on XP SP3 and 7 Pro SP1.

The script may end up as part of Nea.

Code: Autohotkey [Select]
  2. ; change this as desired
  3. KeySequence := "^+p"
  5. ; XXX: may need to change this
  6. FarrFullPath := A_ProgramFiles . "\FindAndRunRobot\FindAndRunRobot.exe"
  8. CoordMode, Mouse, Screen
  10. ShowFARRAtPointer()
  11. {
  12.   global FarrFullPath
  13.   SplitPath, FarrFullPath, FarrExe
  14.   Process, Exist, % FarrExe
  15.   If (ErrorLevel != 0) ; yes FARR
  16.   {
  17.     MouseGetPos, X, Y
  18.     Run, % FarrFullPath . " -show"
  19.     WinWaitActive, % "Find and Run Robot 2 ahk_class TMainForm"
  20.     If (ErrorLevel == 1)
  21.     {
  22.       OutputDebug, % "WinWaitActive timed out waiting for FARR"
  23.       Return
  24.     }
  25.     ; XXX: will this work for multi-display set-ups?
  26.     WinMove, % "Find and Run Robot 2 ahk_class TMainForm", , % X, % Y
  27.   }
  28.   Else ; no FARR
  29.   {
  30.     ; OK/Cancel - esc dismisses dialog
  31.     MsgBox, 1, % "Did Not Find Running FARR"
  32.           , % "FARR doesn't seem to be running.`n`nOk to start FARR?"
  33.     IfMsgBox, OK
  34.     {
  35.       Run, % FarrFullPath
  36.     }
  37.   }
  38.   Return
  39. }
  41. Hotkey, % KeySequence, DoShowFARRAtPointer
  43. Return
  45. DoShowFARRAtPointer:
  46. {
  47.   ShowFARRAtPointer()
  48.   Return
  49. }

Updated: as per Nod5's suggestion to use A_ProgramFiles

Pages: prev1 2 [3] 4 5 6next