Sign in to follow this  
Followers 0
EssDee

Get text from specified position

4 posts in this topic

Hi

Is it possible to get text from a specified position (area) on the screen? I don't want to copy the position and get it as a picture, I need the text to put it in a text-file.

/EssDee

Share this post


Link to post
Share on other sites



Hi

Is it possible to get text from a specified position (area) on the screen? I don't want to copy the position and get it as a picture, I need the text to put it in a text-file.

/EssDee

ControlGetText might do the job.


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

I can't see how.

Any example??

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Something like:

#include <WinAPI.au3>
$active = WinGetHandle ("[ACTIVE]")
$window = WinGetPos ($active)
$mouse = MouseGetPos ()
$tpoint = DllStructCreate("int X;int Y")
DllStructSetData ($tpoint, "X", $mouse[0])
DllStructSetData ($tpoint, "Y", $mouse[1])
_WinAPI_ScreenToClient ($active, $tpoint)
$x = DllStructGetData($tpoint, "x")
$y = DllStructGetData($tpoint, "Y")
_WinAPI_EnumWindowsInit()
_WinAPI_EnumWindowsChild($active, True)
For $i = 1 to $winapi_gaWinList[0][0]
    $ctrl = ControlGetPos ($active, "", $winapi_gaWinList[$i][0])
    If $ctrl[0] >= $x AND $ctrl[0] <= ($x + $ctrl[2]) Then
        If $ctrl[1] >= $y AND $ctrl[1] <= $y + $ctrl[3] Then
            MsgBox (0, "", "EUREKA!")
        EndIf
    EndIf
Next

EDIT: May, may not work. Just threw it together... :D

Edited by Bert

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  
Followers 0