Jump to content
Sign in to follow this  
faire

_GUICtrlListView_FindText returns -1 on Vista(x64), works on XP

Recommended Posts

faire

I'm trying to see if a certain text string exists in the CtrlList from a specific application.

Here's the code:

#Include <GuiListView.au3>
    $handle = ControlGetHandle ("My Application", "List", 103 )
    $i = _GUICtrlListView_FindText ($handle, "some_text")
    MsgBox (4160, "Information", "Target Item Index: " & $i & " Target Handle: " & $handle)

On XP SP2 (32-bit): both $handle and $i have a positive value (works).

On Vista RTM (64-bit): $handle has the correct value, but $i always returns -1. This implies that it does find the application, so it's purely _GUICtrlListView_FindText that fails.

I don't know if it's limited to the 64-bit edition specifically or Vista as a whole. All I know is that the AutoIt Window Info Tool information is the same on XP and Vista, hence the correct $handle. But on Vista it's never able to find the text (-1).

Feel free to comment :)

Update: thought I'd add that on both OS's I run the app using an admin account and on the Vista machine UAC is disabled.

Edited by faire

Share this post


Link to post
Share on other sites
GaryFrost

Don't have a Vista 64 bit to test on at the moment, only had a Vista 32 bit and it worked fine for Control Panel in classic view.


SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites
faire

Don't have a Vista 64 bit to test on at the moment, only had a Vista 32 bit and it worked fine for Control Panel in classic view.

I'll install Vista 32-bit in a VM and test it later.. Will report back.

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.