Jump to content

GetItemText is driving me mad!


Recommended Posts

I am attempting to read the selected line from the GUI of another software.

$handle returns the correct info as verified with Au3info.

info() is another function that simply writes to my log file for debugging purposes.

Selected Count = 1 as it should

Selected Indices = 80 as it should.

I am running on an up to date XPpro install.

Func Grabinfo()
info("Start Grabinfo")
    
    $handle = ControlGetHandle($AppStr, "", "Sys753")
    info($handle)   
    info(_GUICtrlListViewGetSelectedCount($handle))
    info(_GUICtrlListViewGetSelectedIndices($handle))
    $count = _GUICtrlListViewGetItemText($handle,_GUICtrlListViewGetSelectedIndices($handle))
    info ($count)
.
.
.
.

EndFunc

All appears fine and the expected values are written to my log until the line beginning with $count = .

This line crashes the app I'm trying to read text from, and info($count) is never written to my log.

All the needed libraries are #included, and I am running beta compile.

To me, it seems as if I'm using almost a direct copy of the sample script from the _GUICtrlListViewGetItemText help at GetItemText Help Page . However, running my script crashes the application I'm trying to read text from!

I'd appreciate any thoughts you may have. I'm stumped. What type of GetItemText behavior can crash the app who's GUI it is reading text from?

Thank You.

Link to comment
Share on other sites

  • Moderators

Are you trying to get the information from your own GUI or an outside application?

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

  • Moderators

Anyone?

Don't be afraid to toss wild theories around. :whistle: I'm willing to explore any theory/possibility.

Sorry, forgot about this post for a bit... You're looking at the wrong controls if you're trying to interact with an outside application, take a look at ControlListView() in the help file to get some results.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Sorry, forgot about this post for a bit... You're looking at the wrong controls if you're trying to interact with an outside application, take a look at ControlListView() in the help file to get some results.

Thanks for pointing me in the right direction, Smoke. I'm curious, though....how could the _GUI functions I used to write values to my log file show the correct results if (as I understand it) _GUI functions are based on Autoit created GUI's only?

Link to comment
Share on other sites

  • Moderators

Thanks for pointing me in the right direction, Smoke. I'm curious, though....how could the _GUI functions I used to write values to my log file show the correct results if (as I understand it) _GUI functions are based on Autoit created GUI's only?

Well I can imagine that some functions will work some what on other applications, but there is going to be a limitation by design obviously as it's being customized for AutoIt specifically, thus the other types of functions work similar but with more functionality and less restrictions as an AutoIt specific one.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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