Jump to content

Capture text under cursor


Recommended Posts

Please help me how do i capture or copy text under the cursor without selecting it.

The text might be on a webpage or an application.

I just hit tab to go to the next column which has text and those text need to be copied into clipboard.

Please help me out as i am struggling to build the perfect script.

Thanks in advance:)

!!!AUTOIT Rocks!!!^^^^^^^^^^^^

Link to comment
Share on other sites

hi

for getting the text from a windows control you can use "ControlGetText"

$classlist = WinGetClassList("title", "")

$controls = StringSplit($classlist, @LF)

For $y = 1 To $controls[0]

$t = ControlGetText ( $Selected, "", $controls[$y] )

MsgBox(0,"",$t);

Next

for the webpage : it is now easier to load with the _ie functions and get the text from

_IEBodyReadHTML() directly..

Link to comment
Share on other sites

Thanks a lot dude, i never expected the reply would be so fast..

AutoIT rocks..!

But can you please tell me, how long did you take to complete this (AutoIT) course, My skills have developed when compared to last month.

Also tell me how to learn to be the best.

!!!AUTOIT Rocks!!!^^^^^^^^^^^^

Link to comment
Share on other sites

I am in the situation like,

i give an example :

I open www.yahoo.com, inside the page we find the text "Markets:Dow: -0.9%Nasdaq: -0.2%" , there i need to copy only the percentage number i.e. "-0.9%" and "-0.2%" .

Also tell me how do i click on any links in the webpage without using TAB button

Please help me, as sometime i feel very tough working on webpages.

Thanks in Advance :)

!!!AUTOIT Rocks!!!^^^^^^^^^^^^

Link to comment
Share on other sites

1.look at the String* group func

2._IELinkClickByText | _IELinkClickByIndex are exactly what you need

[quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys

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...