Page 2 of 2

Re: Autofocus file from Browser

Posted: 10 Sep 2010 10:07
by admin
TheQwerty wrote:
admin wrote:In that case XY has no chance since this API is hard-coded to work with Explorer only.
So since we know it opens XY that means I'm obviously wrong... :oops: maybe I'll search some more.

EDIT: Looking through it again and I'm fairly certain I'm in the right section of their code.
// The SHOpenFolderAndSelectItems API is exposed by shell32 version 6
// and does not exist in Win2K. We attempt to retrieve this function export
// from shell32 and if it does not exist, we just invoke ShellExecute to
// open the folder thus losing the functionality to select the item in
// the process.
So perhaps it is failing back to ShellExecute and as it says not selecting the item?
I also think you were right and I was wrong. Apparently the SHOpenFolderAndSelectItems API does honour the registry settings about the default FM but then does something that only Explorer understands, and it does not do it through the command line. There is little hope that this will work with another file manager than Explorer, or does it?

Re: Autofocus file from Browser

Posted: 11 Sep 2010 04:05
by TheQwerty
admin wrote:I also think you were right and I was wrong. Apparently the SHOpenFolderAndSelectItems API does honour the registry settings about the default FM but then does something that only Explorer understands, and it does not do it through the command line.
I'd bet you could eventually get XY to handle this but you'd have to add a COM/OLE interface that would allow the shell and other apps to interact with XY. No easy task, and probably not worth the effort to eliminate a selection here.

Though I am speaking over my level of competence in Windows programming, so like earlier I could very well be wrong.