Jump to content
Sign in to follow this  
zigsdk

Getting text from a window

Recommended Posts

zigsdk

Hey

I've been messing around with AutoIt recently, reading tutorials, writing small task programs ect.

However I've never really been able to find a good tutorial which explains beyound the basics. For instence I would really be able to read text from a window, if it's possible ofcorse. Without having to write a program that can recognize the letters pixel per pixel, that is.

Also: I never seem to get anything out of the documentations for some reason. Guess I'm not experinced enough or something. Do you know any good books on AutoIt scripting?

Thanks in advance (:

Share this post


Link to post
Share on other sites
bf2forlife

Have you tried the WinGetText function?

Example

HotKeySet("{F5}", "go") 
Func go() 
$text = WinGetText("", "")
If not @error Then
    Run("notepad.exe")

Sleep(1000)
Send($text)
EndIf
EndFunc
 

While 1 
sleep(10) 
WEnd

Share this post


Link to post
Share on other sites
zigsdk

Have you tried the WinGetText function?

Thanks a bunch, this will come in handy. However, what I'm trying to is to make automatic web navigator. When asking what's inside the browser it just returns "" allthough there's stuff in the window.

Any commands which is more spisific about their target? maybe searching the screen for the words, that would be pretty awesome.

Share this post


Link to post
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
Sign in to follow this  

×