Sign in to follow this  
Followers 0
ravenfyre

winread/line?

4 posts in this topic

Is there any way to make AutoIt read specific text from a window? Finding a key like iniread or more simple yet reading a line like filereadline? WinGetText is great but if the text is long and I start messing around splitting it up and using stringinstr to search for a specific key then it will get processor intense if I need it to be done quickly and frequently. I'm sure there must be something like winreadline, or something with a similar function which I may have overlooked in the help file.

Share this post


Link to post
Share on other sites



Is there any way to make AutoIt read specific text from a window?  Finding a key like iniread or more simple yet reading a line like filereadline?  WinGetText is great but if the text is long and I start messing around splitting it up and using stringinstr to search for a specific key then it will get processor intense if I need it to be done quickly and frequently.  I'm sure there must be something like winreadline, or something with a similar function which I may have overlooked in the help file.

<{POST_SNAPBACK}>

you can stringsplit the text like:

$wtext = WinGetText("?????????")
$wtext = StringReplace($wtext, @CR, "")
$winrec = StringSplit($wtext, @LF)
For $x = 1 To $winrec[0]
   MsgBox(4096, 'debug:', 'record:' & $winrec[$x]);### Debug MSGBOX 
Next

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

you can stringsplit the text like:

$wtext = WinGetText("?????????")
$wtext = StringReplace($wtext, @CR, "")
$winrec = StringSplit($wtext, @LF)
For $x = 1 To $winrec[0]
   MsgBox(4096, 'debug:', 'record:' & $winrec[$x]);### Debug MSGBOX 
Next

<{POST_SNAPBACK}>

Thanks JdeB for replying. Well I guess no cheap shortcuts, having to read all the text first (WinGetText) is the only way it would seem ^^.

Share this post


Link to post
Share on other sites

is there a command to get the last line of text from a window ?

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