Is there a Windows command-line command (to call with Run), a DllCall or COM object that would allow me to display the properties window of a given folder?
I've found this but the info there looks outdated:
http://www.autohotkey.com/board/topic/3 ... ments-ect/
Thanks,
Jean
How to display a folder's properties window?
How to display a folder's properties window?
Author of freeware Quick Access Popup, the powerful Windows folders, apps and documents launcher!
Now working on Quick Clipboard Editor
The Automator's Courses on AutoHotkey
Now working on Quick Clipboard Editor
The Automator's Courses on AutoHotkey
Re: How to display a folder's properties window?
Code: Select all
Run properties %A_ScriptDir%
Sleep 10000
Re: How to display a folder's properties window?
Great. I was to follow up with what I've found here (http://blogs.msdn.com/b/oldnewthing/arc ... 55658.aspx) but the "properties" command is exactly when I need.
I guess I'll have to add a WinWaitClose command to wait for the user to close the Properties window. I'll be back with something working.
Thanks Lexikos.
I guess I'll have to add a WinWaitClose command to wait for the user to close the Properties window. I'll be back with something working.
Thanks Lexikos.
Author of freeware Quick Access Popup, the powerful Windows folders, apps and documents launcher!
Now working on Quick Clipboard Editor
The Automator's Courses on AutoHotkey
Now working on Quick Clipboard Editor
The Automator's Courses on AutoHotkey
Re: How to display a folder's properties window?
Oops! I tough this would do the job:
But it seems the Properties command could not set the PID. Doc says:
Code: Select all
Run, Properties %A_ScriptDir%, , , PID
Sleep, 1000
WinWaitClose, ahk_pid %PID%
Any idea on how to work around this?The variable will be made blank if the PID could not be determined, which usually happens if a system verb, document, or shortcut is launched rather than a direct executable file.
Last edited by JnLlnd on 15 Sep 2014, 21:44, edited 1 time in total.
Author of freeware Quick Access Popup, the powerful Windows folders, apps and documents launcher!
Now working on Quick Clipboard Editor
The Automator's Courses on AutoHotkey
Now working on Quick Clipboard Editor
The Automator's Courses on AutoHotkey
Re: How to display a folder's properties window?
Re-Oops! I posted the wrong code version in the comment above. RunWait shoud be Run. I'll edit it.
Author of freeware Quick Access Popup, the powerful Windows folders, apps and documents launcher!
Now working on Quick Clipboard Editor
The Automator's Courses on AutoHotkey
Now working on Quick Clipboard Editor
The Automator's Courses on AutoHotkey
Re: How to display a folder's properties window?
Found two solutions:
From the Rundoc:
Or simply prompt the user to continue after he closes the Properties window (not elegant, but could work depending on the context):
From the Rundoc:
Note: The properties window will automatically close when the script terminates. To prevent this, use WinWait to wait for the window to appear, then use WinWaitClose to wait for the user to close it.
Code: Select all
Run, Properties %A_ScriptDir%
SplitPath, A_ScriptDir, MyDir ; Don't use "Properties" to work in other Windows locales. Only use the last folders's name.
WinWait, %MyDir%
WinWaitClose
Code: Select all
Run, Properties %A_ScriptDir%
MsgBox, Click OK to continue
Author of freeware Quick Access Popup, the powerful Windows folders, apps and documents launcher!
Now working on Quick Clipboard Editor
The Automator's Courses on AutoHotkey
Now working on Quick Clipboard Editor
The Automator's Courses on AutoHotkey
Re: How to display a folder's properties window?
Hummm... In the first script above, it seems that WinWaitClose does not detect when the Properties window is closed. The script keeps running until I kill the process.
Author of freeware Quick Access Popup, the powerful Windows folders, apps and documents launcher!
Now working on Quick Clipboard Editor
The Automator's Courses on AutoHotkey
Now working on Quick Clipboard Editor
The Automator's Courses on AutoHotkey
Re: How to display a folder's properties window?
Do you have something else open with %MyDir% in the title; for instance, the script editor?
You can add ahk_class #32770 to reduce the ambiguity.
You can add ahk_class #32770 to reduce the ambiguity.
Re: How to display a folder's properties window?
Ah! The issue was with the first WinWait command. The window name was not recognized because of the SetTitleMatchMode mode. Now this works:
Issue closed Thanks lexikos.
Code: Select all
SetTitleMatchMode, 2
Run, Properties %A_AppDataCommon%
SplitPath, A_AppDataCommon, MyDir ; Don't use "Properties" to work in other Windows locales. Only use the last folders's name.
WinWait, %MyDir%
WinWaitClose
Author of freeware Quick Access Popup, the powerful Windows folders, apps and documents launcher!
Now working on Quick Clipboard Editor
The Automator's Courses on AutoHotkey
Now working on Quick Clipboard Editor
The Automator's Courses on AutoHotkey
Who is online
Users browsing this forum: Araphen, Descolada, Oblomov228 and 173 guests