 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
ulti
Joined: 08 Dec 2009 Posts: 18
|
Posted: Sun Feb 28, 2010 3:33 am Post subject: Grabbing content from a List, not working ? |
|
|
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 |
|
 |
Murx Guest
|
|
| Back to top |
|
 |
ulti
Joined: 08 Dec 2009 Posts: 18
|
Posted: Fri Mar 05, 2010 9:47 pm Post subject: |
|
|
I don't really understand what he is talking about
I really don't know what to do next. |
|
| Back to top |
|
 |
sinkfaze
Joined: 18 Mar 2008 Posts: 5043 Location: the tunnel(?=light)
|
Posted: Fri Mar 05, 2010 10:22 pm Post subject: |
|
|
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 |
|
 |
Tyrsius
Joined: 09 Jul 2009 Posts: 140
|
Posted: Sat Mar 06, 2010 3:26 am Post subject: |
|
|
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 |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|