Jump to content

Detect if text is selected


Recommended Posts

Hello!

I want to create a program that detects if any text is selected. The idea is to copy this text and put it in a file but I can't find a way to detect if any text is selected. I searched the forum for similar topics but I did not find anything relevant. If you have idea please share.

Thanks

I ran. I ran until my muscles burned and my veins pumped battery acid. Then I ran some more.

Link to comment
Share on other sites

In the helpfile under User Defined Functions (UDF) -> GuiEdit Management: there is _GUICtrlEdit_GetSel.

Retrieves the starting and ending character positions of the current selection

#Include <GuiEdit.au3>

_GUICtrlEdit_GetSel($hWnd)

But this is for the Edit control only! Search for similar features if it's for something else then the Edit box.

My active project(s): A-maze-ing generator (generates a maze)

My archived project(s): Pong3 (Multi-pinger)

Link to comment
Share on other sites

Hi!

I want to get selected text from other programs like notepad or ie not from a gui control. My only idea so far is to check if the pouse cursor has changed from a arrow to a this 'I' - shaped figure but then how can I know that some text is selected? And also it won't work when I press ctrl+a and on some sites the cursor doesn't change.

Does someone have any idea?

I ran. I ran until my muscles burned and my veins pumped battery acid. Then I ran some more.

Link to comment
Share on other sites

Hi!

I want to get selected text from other programs like notepad or ie not from a gui control. My only idea so far is to check if the pouse cursor has changed from a arrow to a this 'I' - shaped figure but then how can I know that some text is selected? And also it won't work when I press ctrl+a and on some sites the cursor doesn't change.

Does someone have any idea?

Sleep(7000)

ClipPut("")

Send("^c")

Sleep(100)

If ClipGet() <> "" Then MsgBox(0,"You selected", ClipGet())

:P

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 
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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...