# Get selected text?

## Recommended Posts

Hello.

I am working in a clipboard manager which I will release to autoit's example scripts. The problem is that I have no Idea how to get currently selected text WITHOUT sending ^c... I've already check out some other similar topics in the forum but nothing..

Any ideas? Thanks in advance. ( Also getting the selected text outside autoit's form, for example getting selected text not from Autoit's GUI but from another window, like Notepad. )

Hello.

If in someway I have helped, please consider liking my post(s).

The formula for the right answer: You + Right Question = Answer

(Think) BEFORE you post.

##### Share on other sites

You want to copy selected text to the clipboard independant from the application the text was selected from?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2019-08-19 - Version 1.4.13.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2019-07-24 - Version 1.3.6.0) - Download - General Help & Support - Example Scripts - Wiki
Outlook Tools (NEW 2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:

##### Share on other sites

@water Somewhat yes, copy text from outside Autoit's GUI, for example another application, web browser or anything similar.

Hello.

If in someway I have helped, please consider liking my post(s).

The formula for the right answer: You + Right Question = Answer

(Think) BEFORE you post.

##### Share on other sites

IIRC there was a similar discussion some time ago.
Unfortunately I can't remember the title of the thread.

But I'm sure you will find an answer by searching the forum.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2019-08-19 - Version 1.4.13.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2019-07-24 - Version 1.3.6.0) - Download - General Help & Support - Example Scripts - Wiki
Outlook Tools (NEW 2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:

##### Share on other sites

IIRC there was a similar discussion some time ago.
Unfortunately I can't remember the title of the thread.

But I'm sure you will find an answer by searching the forum.

​And I did. Thank you so much for your help, this is why I love Autoit so much, because their community is awesome.

Hello.

If in someway I have helped, please consider liking my post(s).

The formula for the right answer: You + Right Question = Answer

(Think) BEFORE you post.

##### Share on other sites

@TheNewHunter yeah forum is really great, btw can you share the link please???

ill get to that... i still need to learn and understand a lot of codes

Correct answer, learn to walk before you take on that marathon.

## Create an account

Register a new account

• ### Similar Content

• By _leo_
Hey there!
I am having a problem with clicking a button in IE. As you can see in the code, there would be a class name to click it, but since this button exists several times with exactly the same code, I can only use the "Noch nicht veröffentlicht" to separate it from the others. But this part is just pure text without any classification.
"<div class="checkmark" data-v-1e5b1f70=""><svg xmlns="http://www.w3.org/2000/svg" class="icon" viewBox="0 0 16 16" data-v-1e5b1f70=""><circle cx="8" cy="8" r="8" data-v-1e5b1f70="" /></svg></div>Noch nicht veröffentlicht"
I was trying to click it with:
#include <IE.au3> local $oNNVs = _IEFormGetCollection($oIE2) For $oNNV in$oNNVs If String($oNNV.innertext) = "Noch nicht veröffentlicht" Then _IEAction($oNNV, "click") EndIf Next and:
$inputs =$oIE2.document.getElementsByTagName("div") For $input In$inputs If $input.innertext == "Noch nicht veröffentlicht" then$input.click() EndIf Next But nothing seems to work. Thanks for the help!

• hello sirs, please i created a tool witch get the focused control in a window and play a audio file linked with this controls
e.g buttons, checkBoxes, radios, comboboxes, and others
i know that their is a function that give us the control focus but it return the classNN
i want to get the class name to use it with a switch and
because their are more than class e.g button tbutton timagebutton tnewButton...
please can any one help me to get the class name not the classnn

• Good morning,

I am trying to align a two-line text in a button so that it would be centered in the button but can't succeed to do it for the vertical part.
Can someone tell me what I do wrong ?
Here is my code:
$btn3 = GUICtrlCreateButton("Execute " & @LF & " file 1", 100, 65, 60, 50, _ BitOr($BS_CENTER,$BS_BOTTOM,$BS_MULTILINE)) and here is the resulting layout I get in my window.
I tried to follow the help, made a lot of different parameter combinations (here it's $BS_BOTTOM, but I tried $BS_VCENTER and BS_TOP), still get the same result : vertical alignement is a no go for me. Can someone help ? TIA Gilles • So basically need to pull text from a .txt file or .sql and use that text to replace something within a different file. First File: jumps Or: Text1 = jumps Text2 = fence Second File: My Dog XXXXX over the YYYYY. After Script: My Dog jumps over the fence I have found a good start, I'm basic programmer at best, I have some experience but this gets out of my wheel house. Any help is appreciated. • By misioooo Hi! I am writing some GUI and i need to use images as buttons, but with text on them (text is from INI file). Part with button looks like this:ankieta1 = GUICtrlCreateButton($txtAnk1, 100,350,765,164) GUICtrlSetFont(-1, 22, 800, -1, "Arial") ;GUICtrlSetColor(-1,0xffffff)$hImageBtn_1 = _GUIImageList_Create(765, 164) _GUIImageList_AddBitmap($hImageBtn_1, "c:\path\to\ankieta_clean.bmp") _GUICtrlButton_SetImageList($ankieta1, \$hImageBtn_1, 4) GUICtrlSetOnEvent(-1, "On_Ankieta1") The problem - if i uncomment GUICtrlSetColor, color of text changes, but button is just plain gray (no image). How i can change text color not touching image on a button here?
×

• Wiki

• Back

• #### Beta

• Git
• FAQ
• Our Picks
×
• Create New...