Jump to content

winread/line?


ravenfyre
 Share

Recommended Posts

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.

Link to comment
Share on other sites

  • Developers

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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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 ^^.
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...