| View previous topic :: View next topic |
| Author |
Message |
tfcahm
Joined: 20 May 2007 Posts: 48
|
Posted: Mon Jul 23, 2007 5:36 am Post subject: |
|
|
| Sean wrote: | One thing which might affect is: what version of IE installed?
IE7 is installed on my machine. | Right you are! I never upgraded to IE7. Just did so and the previous script using IPersistFolder3 and IShellFolder2 started working. For both interfaces MSDN refers only to the minimum version of Shell32.dll. I didn't think about IE. Thanks again for sharing your knowledge on this stuff. |
|
| Back to top |
|
 |
SKAN
Joined: 26 Dec 2005 Posts: 5893
|
Posted: Mon Nov 12, 2007 11:17 am Post subject: |
|
|
Dear Sean, Will ShellFolder() work with Progman ?  |
|
| Back to top |
|
 |
Sean
Joined: 12 Feb 2007 Posts: 1339
|
Posted: Mon Nov 12, 2007 1:34 pm Post subject: |
|
|
| Skan wrote: | Dear Sean, Will ShellFolder() work with Progman ?  |
No. Although there is a way to obtain IShellFolder of Desktop, I don't think Progman is the (direct) folder of the desktop. |
|
| Back to top |
|
 |
SKAN
Joined: 26 Dec 2005 Posts: 5893
|
Posted: Tue Nov 13, 2007 8:18 am Post subject: |
|
|
Thanks for the clarification Sean.
It failded when I set Progman in listview mode and tried it like ShellFolder( WinExist("A") )
 |
|
| Back to top |
|
 |
Sean
Joined: 12 Feb 2007 Posts: 1339
|
Posted: Tue Nov 13, 2007 10:33 am Post subject: |
|
|
| Skan wrote: | | It failded when I set Progman in listview mode and tried it like ShellFolder( WinExist("A") ) |
Strictly speaking, the failure of it is the consequence of the limitation of the ShellWindows object, which relies on the explorer shell. More generic methods were found out in the case of iexplore.exe, i.e. Internet Explorer_Server. However, I haven't found a similar method for explorer.exe, which is highly likely to be also applicable to FileDialog windows if found. |
|
| Back to top |
|
 |
Lexikos
Joined: 17 Oct 2006 Posts: 2558 Location: Australia, Qld
|
Posted: Wed Nov 28, 2007 4:00 am Post subject: |
|
|
I've noticed a "slight" error in ShellFolder:
| Code: | | VarSetCapacity(str,8,0) | 'str' is used as a STRRET structure, so should be 264 bytes. I know the script doesn't use the cStr field (which is what makes it that 256 bytes larger), but GetDisplayNameOf does write into it. In effect, it invalidates idx. (I was trying to check if idx matches the index returned by LVM_HITTEST; it does. )
Great script, btw.  |
|
| Back to top |
|
 |
Sean
Joined: 12 Feb 2007 Posts: 1339
|
Posted: Wed Nov 28, 2007 5:40 am Post subject: |
|
|
| lexikos wrote: | I've noticed a "slight" error in ShellFolder:
| Code: | | VarSetCapacity(str,8,0) | 'str' is used as a STRRET structure, so should be 264 bytes. |
Yes, STRRET has an union field, and one of them is of 260 bytes in length. And, I was aware that the returned one need not necessarily be the requested one, however, it always returned pOleStr in my system. Anyway, no reason to keep it 8 bytes (:actually I was trying to use this parameter as "int64P",str which crashed the script).
PS. The script has been updated. |
|
| Back to top |
|
 |
Sean
Joined: 12 Feb 2007 Posts: 1339
|
Posted: Wed Nov 28, 2007 2:33 pm Post subject: |
|
|
| lexikos wrote: | | (I was trying to check if idx matches the index returned by LVM_HITTEST; it does. |
Now I read your script, a great job.
I noticed you obtained idx using HitTest. But the FocusedItem in IFolderView means not the one under the mouse, but the one you highlighted/clicked on, and if not clicked on yet defaultly to 0, I think. Maybe it's the reason of the discrepancy, under the assumption the option that executing the item by double-clicking is checked. |
|
| Back to top |
|
 |
Lexikos
Joined: 17 Oct 2006 Posts: 2558 Location: Australia, Qld
|
Posted: Wed Nov 28, 2007 3:08 pm Post subject: |
|
|
| What discrepancy? In your script, idx contains FocusedItem. I edited that part out, so idx is just the result of LVM_HITTEST. I fixed 'str' before I even started adapting the script. (I wrote the hit-testing as a separate script first.) |
|
| Back to top |
|
 |
Sean
Joined: 12 Feb 2007 Posts: 1339
|
Posted: Wed Nov 28, 2007 3:11 pm Post subject: |
|
|
| lexikos wrote: | | What discrepancy? |
No discrepancy, then that's OK. I thought you meant the discrepancy between focused and mouse-on ones by invalidating idx. |
|
| Back to top |
|
 |
TRS80
Joined: 12 Dec 2007 Posts: 15
|
Posted: Sat Jan 19, 2008 6:31 pm Post subject: |
|
|
| I would like to set up a few more hotkeys in this script. For example, I tried to add a hotkey so that Windows Explorer would "jump" to my drivers folder on drive M. (M:\Drivers) How are additional drives and directories embedded in this program? Thanks! This is one cool program, Sean. Very cool. |
|
| Back to top |
|
 |
Lexikos
Joined: 17 Oct 2006 Posts: 2558 Location: Australia, Qld
|
Posted: Sun Jan 20, 2008 2:18 am Post subject: |
|
|
| Code: | | ShellNavigate("M:\Drivers") |  |
|
| Back to top |
|
 |
TRS80
Joined: 12 Dec 2007 Posts: 15
|
Posted: Sun Jan 20, 2008 4:07 am Post subject: |
|
|
Thank you lexikos! That does the job!!! This list is just great!!!
Here's another question. Is there a way when launching Windows Explorer with this program to have both panels in Explorer appear? (At the present, only the files in the selected folder are showing.) I would like to see the directory tree on the left and the contents of folders on the right. Thanks in advance for any help! |
|
| Back to top |
|
 |
Guest
|
Posted: Sun Jan 20, 2008 12:28 pm Post subject: |
|
|
| TRS80 wrote: | | I would like to see the directory tree on the left and the contents of folders on the right. |
You can toggle the TreeView of the explorer window using
| Code: | | SendMessage, 0x111, 41525,,, ahk_id %hwndExplorer% |
|
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 3626 Location: Belgrade
|
Posted: Sun Jan 20, 2008 2:25 pm Post subject: |
|
|
| Quote: | | Thank you lexikos! That does the job!!! |
I wouldn't answer to the people that can't even look at the script.... |
|
| Back to top |
|
 |
|