1. How to Delete Selected Text and Remove Highlights Using EmEditor - A Comprehensive Guide

1. How to Delete Selected Text and Remove Highlights Using EmEditor - A Comprehensive Guide

Charles Lv8

1. How to Delete Selected Text and Remove Highlights Using EmEditor - A Comprehensive Guide

July 27, 2010 at 11:33 pm #8804

CrashNBurn

Member

I didn’t want to disable the Find Highlight.
My request was to to automatically clear the Find Highlight when the Find Dialog was closed — if a checkbox on the find dialog was checked: [x] Clear Highlights.

I solved it with AutoHotKey. The original AHK solution was Kludgy and didn’t work consistently.

Perhaps someone else will find some use for it.
Fixed clean code:

;;

;;  Script: EE_AutoClearFindHighlight.ahk  

;;  Author: MwM - Crash&Burn, 2010  

;;  Usage::   

;;    Automatically clear the Find Highlight when EmEditor's  

;;    Find Dialog is closed with the [Close] Button.  

;;  

;;    Does not clear the Find Highlight if ESC, or the   

;;    Find Dialog's TitleBar [X] is used, nor if a modifier  

;;    key is held down when clicking [Close] (i.e. Shift)  

;;  

  #SingleInstance, Force   

  #NoEnv  

SetBatchLInes, -1  
  

#ifWinActive, Find ahk_class #32770  

  ~LButton::  

; $ESC::  

    aParent := DllCall("GetParent", UInt, WinExist("A"))  

    aParent := ((!aParent) ? WinExist("A") : aParent)  

    WinGetClass, aClass, ahk_id \%aParent\%   

    if(aClass <> "EmEditorMainFrame3")  

      return  

    if(A_ThisHotKey == "LButton")  

      MouseGetPos, ,, aFind, aControl  

      if(aControl <> "Button16")  

        return  

      KeyWait, LButton  

      Sleep, 50  

      ifWinExist, ahk_id \%aFind\%  

        return  

      WinWaitActive, ahk_class EmEditorMainFrame3  

      Send, !{F3}  

    ;; If one wanted the Find Highlight to clear on ESC  

    ;; Remove comment block below, and uncomment ESC above.  

    /*  

     *  

    else      

    if(A_ThisHotKey == "$ESC")        ;;  Not clearing Find Highlight on ESC, atm  

      Send, {ESC}  

      Sleep, 50  

      ifWinExist, ahk_id \%aFind\%  

        return  

      WinWaitActive, ahk_class EmEditorMainFrame3  

      Send, !{F3}  

     *  

     */  

  return  

return

Also read:

https://techidaily.com
  • Title: 1. How to Delete Selected Text and Remove Highlights Using EmEditor - A Comprehensive Guide
  • Author: Charles
  • Created at : 2024-10-09 08:55:16
  • Updated at : 2024-10-13 16:16:57
  • Link: https://win-info.techidaily.com/1-how-to-delete-selected-text-and-remove-highlights-using-emeditor-a-comprehensive-guide/
  • License: This work is licensed under CC BY-NC-SA 4.0.
On this page
1. How to Delete Selected Text and Remove Highlights Using EmEditor - A Comprehensive Guide