topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • Thursday March 28, 2024, 8:14 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

Author Topic: AutoHotkey: LiveSearch example  (Read 4862 times)

justice

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,898
    • View Profile
    • Donate to Member
AutoHotkey: LiveSearch example
« on: November 26, 2008, 05:32 AM »
Might be useful for N.A.N.Y. this year I thought for those who will use AHK like me. Find below an example of live processing of the contents of an editbox. You can use it to filter a listview for example.

expand code
; Live Search Example
; Performance enchancements
#NoEnv
SetBatchLines, -1
SetKeyDelay, 0

Gui, Add, Edit, vMyEdit gLiveSearch, %LastMyEdit%
Gui, Show

LiveSearch:
   Gui, Submit, NoHide ; or without submitting use get ControlGetText, MyEdit, Edit1, %MainWnd%
   ifEqual, LastMyEdit,MyEdit ; don't process no changes
      return
   Gosub,LiveSearchProcess
return

LiveSearchProcess:
   Tooltip % MyEdit
   LastMyEdit := MyEdit
return

2008-11-26_113103.png
« Last Edit: November 26, 2008, 05:59 AM by justice »