Jump to content

how to get the selected text in edit or input


Recommended Posts

  • Developers
2 minutes ago, nacerbaaziz said:

Please help urgently

Where is the fire?

When you want to get proper help you really need to provide better information as it all depends on what kind of application you want to retrive this text from.   Is it an Browser or native Windows application? 
Have you tried anything yet or are you in such a hurry that you can't be bothered to do some research yourself first? :)

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Hi
no not from any external application, from the autoit script
For example

GUICreate("edit test")
$edit = GUICtrlCreateEdit("", 50, 10, 100, 50)
_GUICtrlEdit_SetText($edit, "test, this is a test" & @crlf & "how to select all text from this edit please")

I searched a lot and i found several publications explaining this but didn't work.

to selecte all the text in edit or input  i found function:

_GUICtrlEdit_SetSel

But I did not succeed in identifying all the text
and about how to get the selected text it couldn't find function do this job and all roads reached don't do what I want.
Please help me in this.

Link to comment
Share on other sites

2 hours ago, Jos said:

Where is the fire?

in a rear place about which we can't discuss here  :)

 

@nacerbaaziz

1 hour ago, nacerbaaziz said:

to selecte all the text in edit or input  i found function:
_GUICtrlEdit_SetSel
But I did not succeed in identifying all the text

Helpfile :
_GUICtrlEdit_SetSel ( $hWnd, $iStart, $iEnd )
Remarks : If the $iStart is 0 and the $iEnd is –1, all the text in the edit control is selected.

 

Link to comment
Share on other sites

Welcome again
Dear I am currently creating a text editor for the blind users
In this editor I lacked these options
but now I have reached it successfully
Thanks to everyone who responded to my question
Greetings to all

Edited by nacerbaaziz
Link to comment
Share on other sites

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
 Share

×
×
  • Create New...