Jump to content

Recommended Posts

Posted

I'm trying to write a script that will select text in notepad. Someone asked me to write a program that would work like the "Find" function in notepad. Everything works great except I can't figure out how to set the caret position and select text in the window.

Can anyone point me in the right direction?

Posted

Can you please post the code you have so far? How do you "find" the text in Notepad?

My UDFs and Tutorials:

  Reveal hidden contents

 

Posted

Maybe You looking for that ?

#include <GuiEdit.au3>
_GUICtrlEdit_Find($hWnd [, $fReplace = False])
_GUICtrlEdit_SetSel($hWnd, $iStart, $iEnd)
_GUICtrlEdit_Scroll($hWnd, $iDirection)
_GUICtrlEdit_LineScroll($hWnd, $iHoriz, $iVert)
_GUICtrlEdit_PosFromChar($hWnd, $iIndex)

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted

They will also need ControlGetHandle as well.

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...