Jump to content

Implementing Windows Explorer right pane


LarsJ
 Share

Recommended Posts

Thank guys;

All you help me a lot!

@LarsJ

Wow, amazing tiny code to implement the explorer window i like it a lot. I try even implement with your code but i have const errors when copiling. When @Bluesmaster help me with WinXp Version of the explorer the errors wont show up. So i stay with it. I think somewhere im my code are conflicting with something.  

Ive made a gif to show a little bit of my application and the error that are showing.

Thanks!

error_pic.gif

Link to comment
Share on other sites

@errors

I do not remember those errors in the last version of autoit. I think they included "some" of the constants wich are now double declared. (obviously but just to justify LarsJs code)

 

@filters

ICommDlgBrowser has a filter functionality. Maybe one could use that.

http://msdn.microsoft.com/en-us/library/windows/desktop/bb776141(v=vs.85).aspx

 

@future

maybe  we can also try to generate a leftPaneUDF (treeview) and a previewPaneUDF in the future and offer more parameters to the leftPane ( renavigation, navigation in place ...)

 

regards Blues

Edited by Bluesmaster

My UDF: [topic='156155']_shellExecuteHidden[/topic]

Link to comment
Share on other sites

Bluesmaster, Note that IShellBrowser in post #14 acts like a callback interface for IShellView (or Windows Explorer) and can only be used as such. The methods doesn't contain any code. You have to write the code yourself.

Just add some more code to the custom methods in the bottom of your code, and it'll work.

And very important: To use inline browsing you must implement IServiceProvider (only a few lines of code).

In the Vista/7/8 version most of this code is implemented in IExplorerBrowser. This makes this version much easier to use than the XP version.

ldub, If a file filter can be created like Bluesmaster have proposed, it'll be very easy to add to the XP version, where ICommDlgBrowser already is implemented. If it can be done I'll add an example in the weekend. I don't know if it's possible to add a filter to the Vista/7/8 version. As long as you only browse through ordinary file system folders, it probably doesn't mean anything which version is used.

Phillipe, Just check all my code and comment out the includes, you have already included yourself. E.g. for the $VK-constants comment out WinAPIvkeysConstants.au3 in the top of WindowsExplorer.au3.

Future. I agree. This should be implemented. It would also be nice to be able to interact with the context menu. Then it would be possible to implement Cut, Copy, Paste buttons simply by executing the corresponding menu item. Because the context menu is already implented here, this should not be too hard.

Link to comment
Share on other sites

Bluesmaster, I have done some tests with inline browsing for the XP-version on Windows 7. This is simply not working. This means that the info in top of post #24 is wrong. I apologize.

When you run the XP-version on Windows 7, you are not receiving the proper internal messages, when you double click a folder.

A work around that might be possible, is to use the double click event for a folder item (instead of internal Explorer messages) to implement inline browsing. If this can be done I'll add an example.

Link to comment
Share on other sites

well ok not a big deal. What do I have to do to renavigate programmaticly then? As far as I remember you simply create a new right pane in your toolbar or am I wrong?

Is it possible to renavigate an existing one?

regards

Blues

Edited by Bluesmaster

My UDF: [topic='156155']_shellExecuteHidden[/topic]

Link to comment
Share on other sites

Yes, just create a new right pane to navigate. Navigation in an existing right pane seems only to be possible with IExplorerBrowser.

Probably next weekend I'll update the zip in first post. The old code uses APIConstants.au3, which gives errors on 3.3.10. Some issues should be fixed. A check if you are running a 32 bit script on a 64 bit windows. If possible I'll add an option to filter files.

And if I can get it to work, I'll add an example with a SysListView32 based Explorer for Vista, 7, 8.

Link to comment
Share on other sites

I am running 32 bit script on a 64 bit windows.

 

And if I can get it to work, I'll add an example with a SysListView32 based Explorer for Vista, 7, 8. 

 

this would be great. Tell me if I can help you (testing etc).

Blues

Edited by Bluesmaster

My UDF: [topic='156155']_shellExecuteHidden[/topic]

Link to comment
Share on other sites

Of course you can run a 32 bit script on a 64 bit Windows. But if this particular script is Windows Explorer, you should run it as a 64 bit program. I'm pretty sure that the real Windows Explorer (the Explorer that belongs to the OS) is running as a 64 bit program.

Link to comment
Share on other sites

Link to comment
Share on other sites

- inline browsing (by double click)  > check

- syslistview  > check

- file filter > check

- renavigation (by recreation)  > check

I would say: well done :)

 

I will have a deeper look next days.

Btw one question is keeping me busy:

How do you estimate the risk of breaking code in future releases of windows?

 

Blues

My UDF: [topic='156155']_shellExecuteHidden[/topic]

Link to comment
Share on other sites

For this kind of scripts I estimate the risk of breaking code in future releases of Windows to be low. I don't think MicroSoft will remove any interfaces. As long as the interfaces exists, you can always implement code as in the SysLv32 example. The Vista,7,8 example is based on a single interface, IExplorerBrowser. If the interface exists, the example will work.

The first post is reorganized a little bit.

Link to comment
Share on other sites

IColumnManager > can this be implemented with justifiable effort?

The background is an approach to get more paperless and thus making the explorer far less "steril" by increasing 

its ability to enrich files with metadata (comments, ratings, priorities, file attachement...based on ads - alternative datastreams)

respectivly visualize them or use them for ordering and grouping files by new colums in the details view

Edited by Bluesmaster

My UDF: [topic='156155']_shellExecuteHidden[/topic]

Link to comment
Share on other sites

Link to comment
Share on other sites

  • 1 month later...

Second update. See first post.

The implementations are based on Shell interfaces. This means that most functionality of Windows Explorer is working automatically without any additional code. But you still have to integrate that functionality into your script. Especially you have to take care of keystrokes in combination with various controls and windows. E.g. the rename edit box, the context menu and dialog boxes. This integration is mostly implemented in the second update.

Link to comment
Share on other sites

  • 2 weeks later...

Third update. See first post.

The third update is mostly about the context menu. It's divided into two parts. The first part is about manipulating the context menu. The example shows how to delete, disable and add custom menu items. The second part shows how to execute context menu commands in code. The example implements Cut, Copy and Paste buttons.

Link to comment
Share on other sites

Link to comment
Share on other sites

  • 3 weeks later...

Hi,

 

unfortunately I cannot answer all questions. Viewtype is easy:

DllStructSetData( $tFOLDERSETTINGS, "ViewMode", 1  )  ; 1 = medium  2 = small   | 3 = list  | 4  =  details  | 5 =  thumbnail| 6 =  large | 7 = filmstrip
[...]

 

I just fiddled about a bit with viewtype and found the following additional flags info important (I needed Windows 7 "Large Icons"-view myself), I am using WIn7-Classic theme on 64bit machine and used the "Vista, 7, 8.au3" code to find following settings

; 1 = medium, 2 = small, 3 = list, 4 = details, 5 = medium-icon, 6 = medium-icons+details, 
; 7 = filmstrip (for Win7 classic theme equals "medium-icon " again), 8 = content, 9 = large-icons
$v_mode = 9
DllStructSetData( $tFOLDERSETTINGS, "ViewMode", $v_mode  )
; or for initializing:
ExplorerWindowCreate( 0, 0, 0, 0, $hGui, $dir, $dir, $FWF_NOSUBFOLDERS, '', 1, $v_mode  )

Thanks for writing all of this brilliant code to begin with LarsJ - I don't blame you if you can't be bothered to update with this extra flag (9) in documentation! Also, my distinction between medium and large icons may well be a Win7 thing only, I no longer remember clearly how WinXP did these things in detail.

Link to comment
Share on other sites

Sunaj, The zip in first post contains code which is more or less common to all three versions. The starting point for these versions was the XP version, because the implementation under XP is much more difficult, than the implementation under Vista and later. All functionality that works under XP, also works under Vista+. Certainly not the opposite way around. That's the reason why there isn't much Vista+ specific functionality in the Vista+ version.

In first post I have called the last update for the final release. This means that I'll probably not add more code, which is common to all three versions. But that does not mean, I do not want to add more code to the Vista+ implementation. And I'll probably do this at some point. It would be nice to be able to handle all the different view modes. It would also be nice to be able to add more columns to the listview. If you right click the header it's easy to add more columns. But it only works in current folder. If you browse to a new folder, the columns are not filled out.

Regards Lars.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...