Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

v1.0.37 released: Retrieve text from external ListViews


  • Please log in to reply
29 replies to this topic
Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
Here are the changes for v1.0.37:

Fixed inability of WinGetText and "WinGet ControlList" to output to Clipboard.
Fixed inability to retrieve Clipboard more than once in the same line.
Fixed LV_ModifyCol() to accept floating point column widths. [thanks Toralf]
Improved StatusBarWait to continue waiting even if the bar becomes temporarily unresponsive.
Improved "ControlGet, List" with the ability to get text and other info from ListViews such as Explorer.

The last feature above is fairly significant because a lot of people have asked for it over the past year. Please let me know if you have any problems with it.

Rajat
  • Members
  • 1904 posts
  • Last active: Jul 17 2015 07:45 AM
  • Joined: 28 Mar 2004

Improved "ControlGet, List" with the ability to get text and other info from ListViews such as Explorer.

thanx! one of these days i was going to ask for this too!! :)

but its not working for me... i opened an explorer window and pointed it to my C:\ (i've enabled full path in title bar) and ran this:

ControlGet, var, List,, SysListView321, C:\
msgbox %var%`n%errorlevel%

it just shows 1 in errorlevel! where's the problem?
though it works correctly on the SysListView32 of another ahk script's gui.

MIA

CleanNews.in : Bite sized latest news headlines from India with zero bloat


Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
That example works on my Explorer. Could it be that some other window matches C:\ too, and thus it's accessing the wrong window?

Also, if you're using a non-admin username, that might explain it.

If not, the fact that it's giving ErrorLevel 1 means that it could be one of about ten things (5 of which probably never happen in the real world).

toralf
  • Moderators
  • 4035 posts
  • Last active: Aug 20 2014 04:23 PM
  • Joined: 31 Jan 2005
I have non-admin user rights and this works with all explorer windows that have "C:\" in their title.
AHK 1.0.37 on WinXP Pro
F3::
  ControlGet, var, List,, SysListView321, C:\ 
  msgbox %var%`n%errorlevel% 
return

Ciao
toralf
 
I use the latest AHK version (1.1.15+)
Please ask questions in forum on ahkscript.org. Why?
For online reference please use these Docs.

jordis
  • Members
  • 81 posts
  • Last active: Aug 22 2014 01:56 PM
  • Joined: 30 Jul 2004
Example works wonderfully here with Win2k Spanish...

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004

I have non-admin user rights and this works with all explorer windows

Thanks for this report. Until now, I wasn't completely sure it would work without admin rights (because the program opens the target window's process).

Rajat
  • Members
  • 1904 posts
  • Last active: Jul 17 2015 07:45 AM
  • Joined: 28 Mar 2004
this is so frustrating! it works for everybody else but me!!

i tried to use the cmd on a folder whose title couldn't be matching with any other window but it still didn't work.

still to be sure i got the HWND of the window and ran this:
ControlGet, OutputVar, List,, SysListView321, ahk_id 0x70470

still the same result! :(

MIA

CleanNews.in : Bite sized latest news headlines from India with zero bloat


Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
Maybe you have something installed that customizes your Explorer. Or perhaps there is an explorer setting somewhere that prevents AutoHotkey from extracting the text.

If you can't get it to work (especially if the problem occurs on other systems), I could send you a debug version that will report via MsgBox a more precise reason for the failure.

Rajat
  • Members
  • 1904 posts
  • Last active: Jul 17 2015 07:45 AM
  • Joined: 28 Mar 2004
to test i ran on another xp installation on my machine with a minimum no. of installed apps... that doesn't work either!

please send me that debug version... do remember to rename the exe to something else to take care of gmail's stupid restriction.

MIA

CleanNews.in : Bite sized latest news headlines from India with zero bloat


corrupt
  • Members
  • 2558 posts
  • Last active: Nov 01 2014 03:23 PM
  • Joined: 29 Dec 2004
It doesn't seem to work for me either... WinXP Pro SP2

Rajat
  • Members
  • 1904 posts
  • Last active: Jul 17 2015 07:45 AM
  • Joined: 28 Mar 2004

It doesn't seem to work for me either... WinXP Pro SP2

armed with my error reports Chris must be fixing it... just to check if u've the same problem as i do, just change the view in explorer to show details of files (view menu) and chech again.

MIA

CleanNews.in : Bite sized latest news headlines from India with zero bloat


corrupt
  • Members
  • 2558 posts
  • Last active: Nov 01 2014 03:23 PM
  • Joined: 29 Dec 2004

armed with my error reports Chris must be fixing it... just to check if u've the same problem as i do, just change the view in explorer to show details of files (view menu) and chech again.

Switching the view to anything else (not specifically details) then reloading the script seems to work ok but if I close the window and browse to C:\ again it is not found again :shock: . Clicking back then forward can also cause the script to lose the ListView again. Leaving the view on details seems to be the only view that is found without changing views each time...

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
For v1.0.37.01: Fixed "ControlGet, List" for ListViews in List/Icon view. [thanks Rajat]

This issue had to do with assuming that all ListViews have a hidden header control from which the column count can be derived (there doesn't appear to be any other way to reliably determine a ListView's column count). But apparently, this is true only for ListViews that have more than one column or that are in report/details view.

Thanks for all the help fixing it.

Rajat
  • Members
  • 1904 posts
  • Last active: Jul 17 2015 07:45 AM
  • Joined: 28 Mar 2004
it now works great for me.... thanx a lot!!

MIA

CleanNews.in : Bite sized latest news headlines from India with zero bloat


corrupt
  • Members
  • 2558 posts
  • Last active: Nov 01 2014 03:23 PM
  • Joined: 29 Dec 2004
Works ok here too. Thanks Chris :)