DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: AHK hack to enable 'live search' in Winorganizer  (Read 5,283 times)

nosh

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,441
AHK hack to enable 'live search' in Winorganizer
« on: February 27, 2012, 02:38 PM »
I don't know how many Winorganizer users are still around. Very few, if any, I'm guessing. I've tried to move away from it since it's been all but abandoned and have tried several other programs. Some of them have a feature or two to beat Winorganizer but overall, they always fall short.

One feature that some of the newer programs have and that I really miss in Winorganizer is live search results (find as you type).

I've put together a hack to supercharge Winorganizer's search into live search. Some of the code is my own and some of it is straight-up nicked from the interwebs. :)

The end result seems to work fine on my (XP) system. It seems harmless enough to me as far as unwarranted side-effects are concerned and consumes next to no resources. But, as a complete novice who only dabbles with AHK every year or so, I think it's appropriate that I share it with a USE AT YOUR OWN RISK - REALLY NOT MY PROBLEM kind of disclaimer.  :P

If someone who actually knows AHK wants to refine the code, that'd be great.

tl;dr - AHK hack to convert Winorganizer search into live search, use at you own risk.

Code: (autohotkey)

#InstallKeybdHook
		WinWait, ahk_class TfrmFind
		IfWinActive, ahk_class TfrmFind
		{	TClick = 0
			SetTimer Stroke, 1
		}	

Stroke:
;Based on code from http://www.autohotkey.com/forum/topic17614.html
	If (A_TimeIdlePhysical > 30 or A_TickCount-TClick < 125)
      	Return
   	MouseGetPos mX, mY
   
	If (mX0 = mX && mY0 = mY) 
	{
      		TClick := A_TickCount
      		LiveSearch()
   	}
   	Else
      	mX0 := mX, mY0 := mY
	Return


LiveSearch()
{	ControlGetText, MyOutputVar, TdxPickEdit1 , Find text in file 
	StringLen, MyStrLen, MyOutputVar
	if MyStrLen > 0
	ControlSend, Find, {Enter}, Find text in file
	Return	
}

Original address: https://www.donationcoder.com/forum/index.php?topic=30107.0