get/set path of external Common Item Dialog possible?

Get help with using AutoHotkey and its commands and hotkeys
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

get/set path of external Common Item Dialog possible?

27 Feb 2017, 11:51

I'm working on various GUI functions. I can currently do this for old-style dialog boxes (Common File Dialog).

Is it possible to get/set the dir/name in an external Common Item Dialog?

Common Item Dialog (Windows)
https://msdn.microsoft.com/en-us/librar ... s.85).aspx
Starting with Windows Vista, the Common Item Dialog supersedes the older Common File Dialog when used to open or save a file.
==================================================

I've found some information that might be helpful:
c++ - Obtain the true name of the currently select file in the common file dialog? - Stack Overflow
http://stackoverflow.com/questions/1757 ... ile-dialog
Send WM_USER+7 to get the browser, and then get its active shell view's IShellView interface.

How to change a current directory from a CFileDialog-based class after the call to DoModal()?
https://social.msdn.microsoft.com/Forum ... =vcgeneral
Resizing subclassed CFileDialog and adding a 'Select All' button - CodeProject
https://www.codeproject.com/Articles/17 ... ng-a-Selec

Also some AutoHotkey links:
CommonItemDialog.ahk · GitHub
https://gist.github.com/BiggerDigger/69 ... 4d2263867e
SelectFolderEx() - new dialog on Win Vista+ - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?t=18939
member just me please - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=5&t=18764
How to change location of Open Save Dialog (COMDLG32) cwith DllCall? - Ask for Help - AutoHotkey Community
https://autohotkey.com/board/topic/9109 ... h-dllcall/

==================================================

Btw there is a quote in this link:
c++ - Obtain the true name of the currently select file in the common file dialog? - Stack Overflow
http://stackoverflow.com/questions/1757 ... ile-dialog
We used to rely upon the fact that the Windows 9x, 2000, and XP version of the common file dialog stored each item's PIDL in the LVITEM data (original credit to Paul DiLascia)

Now, Desktop uses a listview, so does that mean that you can get the full path for a listview item on Desktop directly without using the clipboard?

==================================================

I've tried interacting with an external Common Item Dialog via objects, and getting the PIDLs from an old-style dialog box (e.g. Notepad++) and Desktop, but without success.
Cheers.
Last edited by jeeswg on 15 Aug 2017, 13:42, edited 2 times in total.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
bigdeal
Posts: 66
Joined: 13 Feb 2017, 06:31

Re: get/set path of external Common Item Dialog possible?

27 Feb 2017, 13:50

this looks too advanced for moi, but i kinda want to help, so maybe you need some comobject reference list (maybe i dunno) : https://autohotkey.com/board/topic/5698 ... otkey-v11/
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: get/set path of external Common Item Dialog possible?

27 Feb 2017, 15:10

Thank you. Methods I've come across for latching onto existing objects so far (rather than creating new objects):
- For Explorer/Internet Explorer:
for oWin in ComObjCreate("Shell.Application").Windows
- AccessibleObjectFromWindow (Acc.ahk and Excel_Get use this).
- WM_HTML_GETOBJECT and ObjectFromLresult (WBGet uses this).

There seems to be an absolute mass of Explorer-related objects etc:
Shell Interfaces (Windows)
https://msdn.microsoft.com/en-us/librar ... s.85).aspx
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: get/set path of external Common Item Dialog possible?

22 May 2017, 20:33

See this:
get full paths of selected files on Desktop and Common File Dialogs - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=5&t=31135
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA

Return to “Ask for Help”

Who is online

Users browsing this forum: AHKStudent, AnhurChivas, Arekusei, Baconfry, Descolada, morreo, Samuel1996, siangxi, Tepl and 104 guests