Hi David,

Bruce is correct, this can only be done via a lot of Window and MSAA event 
monitoring.

I've done something a little similar in an app named Windows_Annoyances, where 
I look for the user to active a windows explorer window, and I then make the 
list of files get the focus.  You may be able to get some useful information 
out of this app so you'd know which window and which control would hold the 
file names.  I think the control type is likely to be a listview, so you could 
then extract the file name from the first column.

Bruce again has a point thought about the entire path for the file not being 
anywhere useful, so you'd have to then try to get the directory from the title 
of the explorer window.

Hth,

Chip





Chip Orange
Florida Public Service Commission
Computer Systems Analyst
850-413-6314



-----Original Message-----
From: Scripting 
[mailto:scripting-bounces+corange=psc.state.fl...@lists.window-eyes.com] On 
Behalf Of David via Scripting
Sent: Tuesday, March 29, 2016 12:30 PM
To: GWScripting
Subject: Getting the filename from Windows Explorer

Maybe a dumb question here, but is there a way in my app, to "See" which 
file has focus, when scrolling the folders under Windows Explorer? that 
is, you search your disk the normal way with your arrows, in Explorer. 
Coming to a file of interest, you hit a hotkey, and the app will 
retrieve the filename you are focusing, and proceed with its internal 
operation, with that filename in mind.

Don't know if there is any way to do this. Maybe through some kind of 
Com-object. Hoped that someone out there have been dealing with this 
kind of a scenario earlier.

Thanks all,

-- 
David

_______________________________________________
Any views or opinions presented in this email are solely those of the author 
and do not necessarily represent those of Ai Squared.

For membership options, visit 
http://lists.window-eyes.com/options.cgi/scripting-window-eyes.com/corange%40psc.state.fl.us.
For subscription options, visit 
http://lists.window-eyes.com/listinfo.cgi/scripting-window-eyes.com
List archives can be found at 
http://lists.window-eyes.com/private.cgi/scripting-window-eyes.com
_______________________________________________
Any views or opinions presented in this email are solely those of the author 
and do not necessarily represent those of Ai Squared.

For membership options, visit 
http://lists.window-eyes.com/options.cgi/scripting-window-eyes.com/archive%40mail-archive.com.
For subscription options, visit 
http://lists.window-eyes.com/listinfo.cgi/scripting-window-eyes.com
List archives can be found at 
http://lists.window-eyes.com/private.cgi/scripting-window-eyes.com

Reply via email to