AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Grabbing content from a List, not working ?

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
ulti



Joined: 08 Dec 2009
Posts: 18

PostPosted: Sun Feb 28, 2010 3:33 am    Post subject: Grabbing content from a List, not working ? Reply with quote

I want to grab the content from a List

Windows Spy detects this list as the following:
ClassNN: WindowsForms10.Window.8.app.0.687911a6

I've been trying to grab the content from the List with AutoHotkey but it failed:
Code:

WinGet, application_window, , Found Data
ControlGet, var_count, List, Count , WindowsForms10.Window.8.app.0.687911a6, ahk_id%application_window%
if ErrorLevel
    MsgBox There was a problem. Errorlevel: %ErrorLevel%
else
    MsgBox, test count: %var_count%
MsgBox, %var%


==> this code gives "There was a problem. Errorlevel: 1"


I came across this topic:
"ControlGet List doesn't work with .NET Windows.Forms" - http://www.autohotkey.com/forum/topic50654.html


It seems ( with my limited knowledge ) that i'm suffering from the same problem.

Does anyone know what the real problem is?
Can someone help me with getting the content from the list of this program?
I've been looking around for a long time now and i don't really know what to do next.


Last edited by ulti on Fri Mar 05, 2010 11:16 pm; edited 1 time in total
Back to top
View user's profile Send private message
Murx
Guest





PostPosted: Sun Feb 28, 2010 5:32 am    Post subject: Reply with quote

You've pointed already to another thread which provided (AFAICS) a solution: http://www.autohotkey.com/forum/topic49620-16.html, or ??
Back to top
ulti



Joined: 08 Dec 2009
Posts: 18

PostPosted: Fri Mar 05, 2010 9:47 pm    Post subject: Reply with quote

Murx wrote:
You've pointed already to another thread which provided (AFAICS) a solution: http://www.autohotkey.com/forum/topic49620-16.html, or ??


I don't really understand what he is talking about Embarassed
I really don't know what to do next.
Back to top
View user's profile Send private message
sinkfaze



Joined: 18 Mar 2008
Posts: 5043
Location: the tunnel(?=light)

PostPosted: Fri Mar 05, 2010 10:22 pm    Post subject: Reply with quote

It's not really a solution so much as a recognition of a problem. AHK is not yet adapted to retrieve information from .NET applications (although by appearances it may be simple to fix). You can try the Accessibility method Sean recommended the user attempt in that previous thread but the problem is that, even if it does work, you'd have to execute it every time while your mouse is actively over the table.
_________________
Try Quick Search for Autohotkey or see the tutorial for newbies.
Back to top
View user's profile Send private message Send e-mail
Tyrsius



Joined: 09 Jul 2009
Posts: 140

PostPosted: Sat Mar 06, 2010 3:26 am    Post subject: Reply with quote

I have been able to pull list contents from .net controls before, but it is a bit touchy. Try using this tooltip, and hover around the control. You may just not be getting the right information from windowspy. I have also noticed that, for whatever reason, it will not work in some areas of a single control.

Code:

f1::
SetTimer, WatchCursorList, 100
return


WatchCursorList:
   MouseGetPos, , , , WhichHWND, 2
   Controlget, mouselist, List, ,, ahk_id %WhichHWND%
T_Tip=
(
HWND Name: %WhichHWND%

List Contents:
%mouselist%
)
   ToolTip, %T_Tip%
   Return


*I have tested this code, it works in a .net application
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group