AutoHotkey Community

It is currently May 27th, 2012, 4:37 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: February 28th, 2010, 4:33 am 
Offline

Joined: December 8th, 2009, 10:31 pm
Posts: 18
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 March 6th, 2010, 12:16 am, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 28th, 2010, 6:32 am 
You've pointed already to another thread which provided (AFAICS) a solution: http://www.autohotkey.com/forum/topic49620-16.html, or ??


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 5th, 2010, 10:47 pm 
Offline

Joined: December 8th, 2009, 10:31 pm
Posts: 18
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 :oops:
I really don't know what to do next.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 5th, 2010, 11:22 pm 
Offline
User avatar

Joined: March 19th, 2008, 12:43 am
Posts: 5480
Location: the tunnel(?=light)
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.

_________________
Image
Try Quick Search for Autohotkey or see the tutorial for newbies.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 6th, 2010, 4:26 am 
Offline

Joined: July 9th, 2009, 1:13 am
Posts: 140
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


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: rbrtryn and 67 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group