topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • Tuesday June 4, 2024, 1:57 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.


Topics - ewemoa [ switch to compact view ]

Pages: prev1 2 3 4 5 [6]
126
I've started to use Firebug (1.2.1) recently to trace execution of code in an attempt to verify my rather limited understanding of fulljslint.js (JSLint). 

So, I'd like to watch the code execute for different inputs (basically what one specifies as parameters for JSLint are: 1. source code, 2. options for what things to check for) to examine values and paths of execution. 

I'm finding it instructive to have certain watch expressions (e.g. token, prevtoken, nexttoken, syntax, funct, functions, scope, option, etc.) and breakpoints set up -- but I'd like to not have to enter / set these each time I start up Firefox.

I haven't had much luck determining whether this is possible -- does anyone happen to know?

127
Developer's Corner / SpiderMonkey
« on: December 23, 2008, 02:00 PM »
Started looking into SpiderMonkey the other day and noticed some nice links at the bottom of a related Wikipedia page.  A selection of some (well, most) of them:

Scripting C++ with JavaScript using SpiderMonkey
wxJavaScript - porting wxWidgets using SpiderMonkey (and more)
SpiderApe - a C++ library built on top of SpiderMonkey [which] allows C++ developers to embed SpiderMonkey simply and easily into their client applications
jslibs - zlib, SQLite, NSPR, ode, libpng, libjpeg, libffi, (...) libraries for SpiderMonkey
TriXUL - XML-based GUI toolkit embeds SpiderMonkey, using JavaScript to implement logic behind its GUI, supporting calls from JavaScript to C++ objects.
Misc Projects - JavaScript Native Interface (JSNI), CPP to JS object wrapper, Script Host

If anyone has experience w/ SpiderMonkey already or is considering using it or has opinions about it, etc. would love to hear any related thoughts :)

128
FARR Plugins and Aliases / FARR plugin: Akete
« on: December 15, 2008, 03:04 AM »
Akete - FARR-specific file associations

Purpose

  FARR enables customization of the browser and/or file explorer used to "launch" URLs and files/folders respectively.  This plugin generalizes this idea for files based on filename extensions.  

  The original motivation for this plugin was to enable one to make use of and transport file associations without getting involved with the registry -- e.g. for portable application types of settings -- well, at least for files launched via FARR :)

Usage

  To customize the handling for a specific file extension, first ensure that FARR's "Program Options -> Lists -> User Variables" setting has an [Akete] section.  

  Then create a line in that section of the form:

    <extension>=<executable-path>

where <extension> stands for the (typically 3-letter) file extension in question and <executable-path> is an appropriate path to an appropriate executable.

  For example, to handle PDF files using SumatraPDF, one might use the following sort of text (assuming here that SumatraPDF.exe is the name of the executable and that it lives in D:\Apps\):

    [Akete]
    pdf=D:\Apps\SumatraPDF.exe

  If all goes well, FARR should now launch all files that end in '.pdf' using SumatraPDF.

Credits

  Thanks go out to:

    mouser
    ecaradec
    phitsc
    Plugin authors that provided source and/or comments on the forums
    DC Forums participants
    DC Supporters

Download

  Stable MD5: 1c2fb4e40841437c48cf3f5070d9fa66
  Experimenting MD5: 58ebf5cc5a6b2ffa1a3c76a3348fccc1

If trying the Experimental version, please make sure to install the plugin in FARR's Plugins folder and name the folder for the plugin "Akete".

  
README for Experimental Version
Akete - FARR-specific file associations

Introduction
------------

The main point of this plugin is to be able to customize how files
with particular file extensions are opened.  To achieve this end,
the user is expected to provide a configuration which specifies
associations between file extensions and corresponding methods of
opening files with those extensions.

The plugin provides additional functionality including support for:

  * multiple possible methods of opening files via context menu items

  * default context menu items (i.e. always appear in context menu)

  * overriding of method to open files via an appropriate keyword

Configuration
-------------

The Akete plugin may be configured by using FARR User Variables.

FARR User Variables are accessible via "Program Options" ->
"Lists" -> "User Variables" in FARR's Options dialog box.  The section
for Akete (may not exist unless manually created) begins with the
string [Akete].  (For more information regarding FARR User Variables,
in FARR's .chm Help File, see the section titled "User Variables -
Advanced Use" under "Advanced Use".  The rest of the text assumes
familiarity with the FARR documentation content.)

Configuration details will be demonstrated through a series of examples.
After each example a general rule will be stated possibly followed by
some related notes.

Example 1

A configuration to get files with the extension 'txt' to be opened using
Wordpad might be:

  [Akete]
  txt=%PROGRAMFILES%\Windows NT\Accessories\wordpad.exe

Rule 1: <file-extension>=<path-to-executable>

Notes: The path to the executable may contain FARR Virtual Folder
names (see the FARR help file).  Also, file extensions do NOT contain
the period character.

Example 2

A configuration to get files with the extension 'txt' to be opened by
(possibly additional instances of) Notepad++ might be:

  [Akete]
  txt=%PROGRAMFILES%\Notepad++\Notepad++ -multiInst "$$1"

Rule 2: <file-extension>=<launch-template-string>

Notes: The launch template string allows specification of command line
arguments.  The plugin replaces the string $$1 by the path to the file to
be opened.  Do NOT use the vertical bar character in a launch template
string -- the reason for this should become clear below.

Once a file extension has been associated with a path or launch template
string, it is possible to leverage this association so that any file
specified via FARR's text edit field is opened using the associated
path or launch template string.

For the examples above, if the text in FARR's text edit field looks like:

  C:\boot.ini +withtxt

"launching" via FARR will open the file with path C:\boot.ini using
Wordpad in the case of the first example, and Notepad++ in the case of
the second example.

Notes: The keyword is assembled by prepending the file extension with the
string "with" (the default keyword prefix string).

Example 3

A configuration to override the default keyword prefix string with the
string "open" instead of "with", might be:

  [Akete]
  Options.KeywordPrefix=open

Rule 3: Options.KeywordPrefix=<keyword-prefix-string>

Notes: The user variable name is the fixed string "Options.KeywordPrefix".  
The user variable value should probably be kept to a string composed of
numbers and letters -- other values such as spaces, pluses, and the like
are not likely to work.  It may also be safer to not use uppercase letters
in the user variable value.

Example 4

A configuration to get files with the extension 'doc' to be opened using
whatever is configured for 'txt' might be:

  [Akete]
  txt=%PROGRAMFILES%\Windows NT\Accessories\wordpad.exe
  doc=txt

Rule 4: <file-extension>=<file-extension>

Notes: For simplicity of configuration and implementation, if a file
extension appears on the right hand side of an equals sign, it may not
appear on the left hand side of the equals sign.  Another way to phrase
this is that only one level of indirection is supported.

Example 5

A configuration to get the context menu of a file with extension 'txt'
to show context menu items for opening via Wordpad and Notepad++ might be:

  [Akete]
  txt=%PROGRAMFILES%\Windows NT\Accessories\wordpad.exe|%PROGRAMFILES%\Notepad++\Notepad++ -multiInst "$$1"

Rule 5: <file-extension>=<list-of-paths-or-templates>

Notes: The items in the list may be paths or launch string templates.  
The vertical bar character is reserved for separating the items so it may
not be used in a path (doesn't tend to work in Windows anyway?) or a
launch template string.  Opening of files via FARR's text edit field will
be handled using the first item in the list.  It may be worth noticing
that a single path or launch template string might be viewed as a list of
one item.

A configuration to get the context menu of a file with extension 'txt'
to show context menu items for opening via Wordpad and Notepad, but leaves
handling of opening of such files untouched if done via FARR's text edit
field might be:

  [Akete]
  txt=|%PROGRAMFILES%\Windows NT\Accessories\wordpad.exe|C:\Windows\System32\notepad.exe

Notes: One can think of the list as having an empty first item.

Example 6

A configuration to get a file without a file extension to be opened by
Emacs might be:

  [Akete]
  Options.NoExtension=%PROGRAMFILES%\Emacs\bin\runemacs.exe

Rule 6: Options.NoExtension=<file-extension-or-list-of-paths-or-templates>

Example 7

A configuration to get the context menu of any file to show context menu
items for opening via Wordpad, Notepad, and Emacs might be:

  [Akete]
  *=%PROGRAMFILES%\Windows NT\Accessories\wordpad.exe|C:\Windows\System32\notepad.exe|%PROGRAMFILES%\Emacs\bin\runemacs.exe

Rule 7: *=<list-of-paths-or-templates>

Notes: One can think of the asterisk character as similar to a wildcard
pattern character.

In summary, the types of user variable names (strings to the left of the
equals sign) that may be specified include:

  1) file extension
  2) Options.NoExtension
  3) *
  4) Options.KeywordPrefix

and the types of user variable values (strings to the right of the equals
sign) that may be specified include:

  1) list of paths and/or launch templates
  2) file extension

Bugs
----

Probably ;)

Credits
-------

Thanks go out to:

  mouser
  ecaradec
  phitsc
  raybeere
  Plugin authors that provided source and/or comments on the forums
  DC Forums participants
  DC Supporters




git repository containing code with various changes and restructuring

README.txt
Akete

Purpose:

  To enable one to create, edit, make use of, and transport
  FARR-specific file associations.

Requirements:

  Tested with:

    - Windows 7 - may work for other versions of Windows

    - FindAndRunRobot 2.203.01 - may work for other versions

Example Usage:

  To get FARR to handle PDF files using SumatraPDF:

    Method 1:

    1. Bring up FARR's main window.

    2. Type the following in to the text field: .pdf

    Assuming FARR can find some PDF files, this should result in
    a number of FARR results representing PDF files.

    3. Bring up the context menu for one of the PDF file results.

    4. Choose the "Edit file assocation: pdf" menu item.

    FARR should switch to a view with a form requesting a path.

    5. Enter the full path to SumatraPDF.exe in the text field
       and click the button labeled "update".

    Method 2:

    1. Bring up FARR's Options dialog box.

    2. Select the Program Options -> Lists -> User Variables section.

    3. If there is no [Akete] section, add one.

    4. Under the [Akete] section, add text similar to:

         pdf = c:\apps\SumatraPDF\SumatraPDF.exe

       where the portion to the right of the equals sign is an
       appropriate path to the SumatraPDF.exe file.

  Subsequent to such configuration, in FARR, launching a file whose
  name ends in .pdf should use the SumatraPDF application do open the
  file.

Notes:

  There are other under-documented features including:

    1. Specifying more than one executable for a particular file
       association.

       Multiple paths are separated by the | character.

       For example:

         txt = c:\windows\system32\notepad.exe|c:\apps\Notepad++\notepad++.exe

       The first one mentioned is what FARR will use when launching
       normally.

       If a context menu for a result is displayed, each of the listed
       paths should appear as options for opening the file with.

    2. Specifying a "template" instead of an executable file path.

       A "template" to be filled in with the path of a FARR result
       may be specified -- the "slot" is represented by $$1

       For example:

         zip = c:\apps\NirLauncher\NirSoft\HashMyFiles.exe /file "$$1"

    3. A wildcard may be specified as a file extension so particular
       executable paths or templates will always show up on a FARR file
       result's context menu.

       The * character is used to represent the wildcard file extension.

       For example:

         * = c:\apps\Notepad++\notepad++.exe

    4. Specifying executable paths or templates for operating on FARR
       folder (not file) results.

       For example:

         Folder.* = c:\NirLauncher\NirSoft\HashMyFiles.exe /folder "$$1"
   
    5. Specifying the path to certain applications' ini files to utilize
       file association information configured for those applications.

       For example:

         IniPath.QDir = c:\apps\Q-Dir\Q-Dir.ini
         IniPath.Xenon = c:\apps\XenonPortable\Data\settings\assoc.ini

Credits:

  Find And Run Robot

    mouser

  FScript

    ecaradec

  Discussion and Testing

    JaneDC
    komtak
    mouser
    nitrix-ud
    phitsc

  Icons

    https://www.fatcow.com/free-icons

  General Thanks

    Plugin authors that provided source and/or comments on the forums
    DC Forums participants
    DC Supporters


129
N.A.N.Y. 2009 / NANY 2009 Release: Keyser
« on: December 03, 2008, 06:45 AM »
NANY 2009 Entry Information

Name of ApplicationKeyser FARR Plugin
Version1.0.1.7
Short DescriptionAccess Web Browser Searches via FARR
Supported OSesWinAll
Web Pagen/a
Download Linkhttp://ewemoa.dcmembers.com/Plugins/Keyser/Keyser.zip
ChecksumsMD5: b0b8514fc69fc45cfc6abcae835183a0, SHA1: 839198124f7fee0a898f4e2da97c2f77c49bd297
System Requirements
Version History
  • None yet
Authorewemoa


Description
The initial motivation for this plugin was to enable FARR to reuse the searches already available in one's local installation of Firefox -- those available via its Search Bar / Search Box.  Firefox makes use of OpenSearch plugins to provide this functionality.  OpenSearch plugins are used by Firefox, IE 7, and other apps to allow one to search various sites more conveniently and quickly.  For those interested, there is more OpenSearch-related info at:

http://mycroft.mozdev.org/
http://www.opensearch.org/Home

As it stands now, the plugin has some level of support for the following browsers:

  • Firefox 3 (2 might work, but I didn't test)
  • IE7 (8 may end up working, but who knows?)
  • K-Meleon (not as customizable as the other two)

I haven't decided whether to continue developing this plugin at this point.  Whether I continue may depend on the level of success I have with cleaning up the existing code :)


Screenshots

keyser-0.png
keyser-1.png
keyser-2.png
keyser-3.png
keyser-4.png


Usage

Installation

The installation flow is the same as other FARR plugins:

  • Unpack the archive (probably a zip file) into FARR's Plugins directory
  • If FARR is running already, tell it to reload plugins (e.g. via the 'goreload' alias)
  • If FARR is not running, start it up

Configuration may be necessary to indicate to the plugin where to look for browser-maintained searches.  There is a detailed README.txt included in the plugin.

Using the Application

  • Bring up FARR.
  • Type: ks Amazon:little schemer
  • Choose one of the results (e.g. via numeric keypad).

The usage is modeled after the SokuGin Alias -- more details are available for that at its forum thread.

Uninstallation

One way that may work is:

  • Quit FARR
  • Find and delete the plugin's folder from FARR's Plugins directory

130
I have been using 2 instances of FARR running simultaneously for a bit now [1] -- below are some of my observations, followed by a sketch of what I did to set things up.  May be there are some others who are doing the same and wouldn't mind sharing their experiences.

Some advantages

  • Can test out new versions of FARR more conveniently -- just upgrade one of them
  • I am not FARR-less when one of them crashes ;)
  • Don't feel nearly as disabled when testing plugins in one of the installations and things aren't quite working -- I have a "left" FARR (appears on the left side of the screen and is invoked via double-left-control [2]) which is sort of my "stable" configuration and a "right" FARR (you can probably guess how this one works) which is more of my "development" configuration.  I tend to test with the right-hand one -- it ends up crashing (perhaps mostly MS' debugger-related) more often and consequently needs to be restarted more frequently.
  • Can use KlipKeeper to interact w/ some of the FARR dialog boxen that I couldn't before.

Downsides include

  • Portions of configuration information are not obviously shareable -- you don't want everything the same because you may want to maintain different sets of window locations, hotkeys, skins, icons, and plugins (and perhaps other things).  OTOH, you might basically want the same Search Folders.
  • Another app is running all of the time -- but I've found FARR to be pretty light, so this hasn't really been a problem for my setup.
  • Setup is a slight bother
  • Upgrading and ongoing maintenance of configuration might be a pain depending on your situation -- it's been so-so for me so far
  • Using Dcupp?dater and/or interacting with various FARR-related configuration dialog boxen may be a bit confusing -- AFAICT those things aren't affected by skin changes

Interesting and miscellaneous things

  • Can drag back things between FARR windows -- say from the results list of one, to the text field of the other.
  • Another reason to have skins and custom icons :)

Setup

0. Quit any running instances of FARR
1. Copy an existing FARR installation directory and rename it
2. Rename executable of new installation to not conflict w/ any existing FARR executables (I add 'dev' or something else right before '.exe')
3. Start the new installation's executable
4. Customize the skin and tray icon (Options -> Settings -> Advanced visuals)
5. Change hotkeys to not conflict w/ any of the other installations (Options -> Settings -> Hotkeys)
6. Move FARR window to a location where any of the other ones won't appear
7. Tweak anything else desired
8. Restart other FARR instances

That's what I remember at the moment - I may have missed something.


[1] I've noticed a place or two where this has come up and thought I'd "factor" out a thread as I hadn't succeeded in locating a dedicated one.
[2] Thanks to Tap Tap Hotkey Extender.

131
FARR Plugins and Aliases / Alias: SokuGin - Some More Searches
« on: November 27, 2008, 01:25 AM »
What Is It?

SokuGin is an alias which provides a fair number of web-based searches. 

Installation

  • Download the SokuGin alias (SokuGin.zip).
  • Extract the contents under %FARRDIR%\AliasGroups\Installed\ [1] -- what you want to end up with is a SokuGin directory (containing among other files a file named "SokuGin.alias") that lives under the Installed directory.  Depending on your decompression method, a SokuGin directory may or may not be created.  If one is not created, please create one manually.  IIUC, this non-existence of a top-level directory within the archive file is for working with DCUpdater -- FARR plugins do this too, AFAICT.

Example Usage

  • Bring up FARR.
  • Type: sg Amazon:little schemer
  • Choose one of the results (e.g. via numeric keypad).

Please note the existence of a colon character in the example.  Also note that colors were used in this post for illustrative purpose only ;)

Notes

The string entered in the FARR window is basically made of 4 pieces:

  • "sg" is short for "SokuGin" -- this is the alias name.
  • The string (w/o the leading spaces) following "sg" and preceeding the last colon in the line specifies a search location.
  • For the alias to distinguish between the search location and the search string, a colon character is used as a separator.
  • The string following the last colon on the line is a search string.

See Regex Alias Filter Patterns for background on how this type of alias works.

The source of the web-based searches is a user-contributed Wiki page so there are likely a number of searches that are broken -- I've pruned some that were broken and others that were not straight-forward to make an alias for (e.g. POST-based queries) but I didn't check all of them (there are > 500 searches).

Credits

  • mouser - FARR, improvements and testing
  • Quicksilver and its user community - provided web-based searches
  • GNU Emacs - data munging of Wiki page data
  • lanux128 - started the Alias: Send Twitter updates from Farr topic on which the current post is based
  • Others - ok, enough -- most things in the world seem to have multiple contributing factors, it can be interesting exploring what those might have been, but if you want to do anything else with your life, you probably have to stop somewhere...I think


[1] I think %FARRDIR% is the FARR installation directory.

132
It's probably obvious to experienced VirtuaWin users, but FWIW on a suggestion from mouser, I was able to successfully have a dock stay visible on all of my VirtuaWin desktops.  This was achieved by using the 'Always Show' option for the dock in question via the control menu [1] for the dock window (I needed to select 'Manage Window' via the control menu first before the 'Always Show' option would appear).  Perhaps this will help someone some day...wait, may be that will be me when, inevitably, I forget how to do this :)


[1] Note, the control menu is a VirtuaWin feature.

133
Launching something that uses an alias via a numpad key leaves "residue" in the Search Edit Box for my local installation.

Below is a description of how one might reproduce.

0. Fresh install of FARR v2.30.01 (I used VirtualBox for this).

1. Create a shortcut to "C:\Program Files" on the Desktop (if the shortcut isn't named "Program Files" already, please rename it to match).

2. Configure a way of toggling FARR that doesn't involve setting or clearing the previous search text:

[attachthumb=#1][/attachthumb]

3. Create an alias 'cmd' for opening cmd.exe with a search result (as described in: https://www.donation....msg120331#msg120331):

[attachthumb=#2][/attachthumb]

4. Bring up FARR using the toggling method defined in 2. and type:

+cmd program f

[attachthumb=#3][/attachthumb]

5. Launch the "Program Files.lnk" result via the appropriate numpad key (let's say for the sake of discussion that it was the first result, so press 1 on the numpad).

6. Bring up FARR again (using the method defined in 2.). 

What I get for the content of the Search Edit Box is (note the trailing number):

+cmd program f1

[attachthumb=#4][/attachthumb]

What I expect is no "residue" (trailing number):

+cmd program f

FWIW, I see the number appearing in the Search Edit Box after I press the numpad key and before the FARR window disappears -- sorry, my visual processing was fast enough, but my fingers were too slow to get a screenshot  :-[

I didn't match the above description to anything listed in 'FARR v2 - Official Bug Tracking and Feature Request Thread' nor did I succeed in locating a post with a closely matching description (perhaps my bad).  I did find a couple of other topics where similar-sounding situations were discussed - but I didn't come away with a confident sense of whether the associated descriptions dereferenced to the same phenomena  ;)

https://www.donation...dex.php?topic=5970.0
https://www.donation...dex.php?topic=6980.0


Pages: prev1 2 3 4 5 [6]