Topics - ewemoa [ switch to compact view ]

Pages: prev1 ... 16 17 18 19 20 [21] 22 23 24 25 26 27next
101
FARR Plugins and Aliases / FLua: FARR Plugins Using Lua
« on: July 02, 2010, 09:38 AM »
I've been working on trying to make it possible to write plugins for FARR in Lua and there is now something that seems to work somewhat so...

The design is almost completely based on ecaradec's FScript (many thanks to him for releasing the source to that).  I haven't implemented timers yet, but other things are somewhat in-place.  If you've used FScript before, the interface should feel very familiar. 

Had some luck with following:

  • on_init
  • on_set_str_val
  • on_search_begins
  • on_regex_search_match
  • on_process_trigger
  • farr_set_str_value
  • farr_get_str_value
  • farr_emit_result
  • farr_set_state
  • farr_emit_results (this may be more convenient than using the last two)

Implemented but didn't really test:

  • on_receive_key
  • on_idle_time

Below is a link to a sample Lua plugin.  It is supposed to be similar to vitalyb's FARREnvironmentVariables plugin.

It's got some issues (e.g. DOS window showing up momentarily), but anyway:

  http://ewemoa.dcmembers.com/tmp/LuaPathEnvVars.zip

SHA-1: 50f501d3d6e85b7ea3052e76b13ecda58ca8be72

The contained files and folders are:

  • FLua.dll
  • flua.lua
  • LICENSES\
  • LuaPathEnvVars.ico
  • plugin.lua
  • README.txt <- pretty much useless at this point

The main file to tinker with at this point is plugin.lua.

Any comments welcome :)

102
Developer's Corner / Code::Blocks 10.05 has been out...
« on: June 27, 2010, 07:48 AM »
I completely missed that:

Code::Blocks 10.05 is here!
Sunday, 30 May 2010 10:20

http://www.codeblocks.org/

cb.jpg

103
Developer's Corner / Some Lua References Converted
« on: June 20, 2010, 09:58 AM »
Converted some Lua references for reading on smaller screen devices [1].  Don't know if anyone else will have any use, but FWIW:

  <a href="http://ewemoa.dcmembers.com/lua/www.lua.org/manual/5.1/">Multiple Page Version of Version 5.1 Reference Manual</a>
  <a href="http://ewemoa.dcmembers.com/lua/the_lua_architecture">The Lua Architecture</a>
  <a href="http://ewemoa.dcmembers.com/lua/A_No_Frills_Introduction_to_Lua_5.1_VM_Instructions">A No-Frills Introduction to Lua 5.1 VM Instructions</a>

Done via hand so expect errors :)


[1] This means either splitting of a large original or conversion from some non-HTML format to HTML.

104
General Software Discussion / Firefox Add-on: SiteDelta
« on: June 18, 2010, 10:39 AM »
Started testing out the SiteDelta Firefox Add-on today:

SiteDelta can scan for changes to a website since your last visit.

It adds a small Delta icon to your browser status bar. When you click onto it, it highlights all changed text contents of the current page (since the last time you clicked onto it). Clicking again cycles through the changes. Rightclick onto the icon provides access to other features offered by SiteDelta.

From the features page:

   * Scan pages you are visiting - what has changed?
    * Highlights inserted, deleted and moved text as well as changed images (if the file name changed)
    * Checks even password-protected pages (only HTTP-Auth)
    * Select interesting page regions you want to check
    * Ignore regions you are not interested in or that change often (e.g. counters, current date, ads etc.)
    * Save selected regions as presets to use them for all similar pages
    * Automatically scan known websites for changes
    * Optional: Archive all changed versions of the page

Any other users?

sitedelta.png

105
Background

I find that Control+A doesn't necessarily select all text in various contexts and typically notice this after typing Control+A.

Not finding anything that seemed to help, I put together a little utility tentatively named "SelectAll" in an attempt to improve the situation a bit.  I have been using it for a bit now and have found that it has turned out to be useful in my particular situation.  After some discussion with mouser a decision to post it was reached.  (Please let me know if you know of something similar or better.)

How to Use
  
While this program is running, if Control+A does not select all text for a field with focus, try entering Control+A twice quickly to get all of the text selected.
  
The invocation may be done in at least two ways:
  
1. An initial Control+A sequence, then letting go of both keys, and a subsequent Control+A sequence.
    
2. An initial Control+A sequence, then without letting go of the control key, let go of the A key and press the A key again.
        
(I prefer the second approach, but both seem to work as far as triggering an attempt to select all text.)

Caveat

Unfortunately, it doesn't work with a number of (all?) NirSoft utilities -- and it seems likely there are other things it won't work with.  I might make an exception list, but haven't decided whether it's worth it or if it makes sense just yet.  Also, depending on the size of the text field, after text is selected there may be some scrolling.  Anyway, perhaps the code can be improved upon or someone can come up with a better idea :)

Credits

The code is basically an adaptation of an AHK Forum post (thanks to the author "jonny"):

  http://www.autohotkey.com/forum/topic15537-1.html

The selection method was improved by lanux128 -- thanks to him for that  :Thmbsup:

Code

Source:

/*

   Name: SelectAll
   Description: Select All Text via Hotkey
  
   Control+A does not always select all text unfortunately.
   This program is an attempt to improve the situation a bit.
  
   While this program is running, if Control+A does not select all
   text for a field with focus, try entering Control+A twice
   quickly.
  
   This may be done in at least two ways:
  
     1. An initial Control+A sequence, then letting go of both keys,
        and a subsequent Control+A sequence.
    
     2. An initial Control+A sequence, then without letting go of the
        control key, let go of the A key and press the A key again.
        
   FWIW, the author finds the second form easier to execute.
        
   Example locations of relevance (Windows XP):
  
     -7-zip: address/path text field [1]
     -Code::Block: multiple text fields
     -Everything: options dialog: multiple text fields
     -FileZilla: multiple text fields
     -Free Download Manager: multiple text fields
     -grepWin: multiple text fields
     -Internet Explorer:
       home page text field [1]
     -IrfanView: multiple text fields
     -Notepad++: Preferences dialog: multiple text fields
     -ReNamer: multiple text fields
     -Universal Extractor: multiple text fields
     -Windows Explorer:
       address/path text field [1]
       file/folder name when renaming via F2 [1]
     -WinMerge:
       Select Files and Folders: mulitple text fields [1]
       Options dialog: multiple text fields
     -WinSpy++: multiple text fields
     -Save / Open Dialogs: filename text field [1]
     -Run Dialog: name text field [1]
     -File/Folder Properties Dialog:
       various text fields
     -HTMLHelp (hh.exe, .chm viewing): keyword text field [2]
      
   Where this code does not work (Windows XP):
    
     -Windows Explorer:
        file name text field in searching for files
        string text field in searching for files    
    
   [1] Though initial focus selects all text
   [2] Double-clicking on field selects some text
  
   code based on http://www.autohotkey.com/forum/topic15537-1.html

*/

#NoEnv
#Persistent

; XXX: place in .ini?
delay = 400
hkmod = ^
hkletter = a
hk = %hkmod%%hkletter%
fullhk = ~%hk%
Hotkey, %fullhk%, Invoke
Return

Invoke:
; 'delay' is the maximum allowed delay (in ms) between presses.
If ((A_PriorHotKey = fullhk) && (A_TimeSincePriorHotkey < delay))
{
  BlockInput, On
  ; thanks to lanux128 for the following
  Send, {Control Down}{Home}{Control Up}{Control Down}{Shift Down}{End}{Shift Up}{Control Up}
  BlockInput, Off
}
; XXX: don't know what this Sleep is for...
Sleep, 0
KeyWait, %hkletter%
Return

Executable

Meta

Posted this here as per:

https://www.donationcoder.com/forum/index.php?topic=22126.msg199036#msg199036

Please move if necessary :)

Pages: prev1 ... 16 17 18 19 20 [21] 22 23 24 25 26 27next
Go to full version