ExplorerListGadgets and actioning items

Just starting out? Need help? Post your questions and find answers here.
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: ExplorerListGadgets and actioning items

Post by JHPJHP »

Hi BarryG,

I resolved this in an earlier script.
If you have access to my downloads you should be able to find the solution in Windows Services & Other Stuff.
If not, and no one has posted working code before I'm in a position to look for myself, I'll follow up after I locate it.
BarryG
Addict
Addict
Posts: 3292
Joined: Thu Apr 18, 2019 8:17 am

Re: ExplorerListGadgets and actioning items

Post by BarryG »

JHPJHP wrote: Sat Jun 26, 2021 1:08 amIf you have access to my downloads you should be able to find the solution in Windows Services & Other Stuff
Hi JHPJHP, I took a look there but couldn't see anything obvious (to me)? What would it be called?
RASHAD
PureBasic Expert
PureBasic Expert
Posts: 4636
Joined: Sun Apr 12, 2009 6:27 am

Re: ExplorerListGadgets and actioning items

Post by RASHAD »

Hi Barry
From your posted image it looks that there is something wrong with the imagelist
Try the next post and report
It may look that no icons but then we will be sure about the wrong imagelist

Code: Select all

OpenWindow(0, 0, 0, 500, 400, "Window", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
WebGadget(1, 0, 0, WindowWidth(0), WindowHeight(0), "D:\")


While WindowEvent():Wend

Repeat
  shellH = FindWindowEx_(GadgetID(1), 0, "Shell Embedding", 0)
  hShellViewWin = FindWindowEx_(shellH, 0, "SHELLDLL_DefView", 0);
Until hShellViewWin <> #Null And shellH <> #Null   
hDesktopListView = FindWindowEx_(hShellViewWin, 0, "SysListView32", 0);
;LoadFont(0,"Tahoma",16)
;SendMessage_(hDesktopListView,#WM_SETFONT,FontID(0),1)

hImg = ImageList_Create_(20, 20, #ILC_COLORDDB, 0, 0)
SendMessage_(hDesktopListView, #LVM_SETIMAGELIST, #LVSIL_SMALL,hImg)

SendMessage_(hDesktopListView, #LVM_SETVIEW, #LV_VIEW_DETAILS, 0)
              
Repeat
  Select WaitWindowEvent()
    Case #PB_Event_Gadget
      Select EventGadget()
        Case 1
          Select EventType()
         EndSelect
      EndSelect
    Case #PB_Event_CloseWindow
      End
  EndSelect
ForEver


Egypt my love
BarryG
Addict
Addict
Posts: 3292
Joined: Thu Apr 18, 2019 8:17 am

Re: ExplorerListGadgets and actioning items

Post by BarryG »

With your code, my D: drive looks like below. And then if I try it with my C: drive, it also doesn't have icons.

And there's no dates shown in the "Date" column, either.

Image
RASHAD
PureBasic Expert
PureBasic Expert
Posts: 4636
Joined: Sun Apr 12, 2009 6:27 am

Re: ExplorerListGadgets and actioning items

Post by RASHAD »

Hi BarryG
Too many things do not match with the normal settings
- Instead of Date Modified it's Date
- Tags Column added
I think it's another add on application like Icaros taking control over File Manager
Check your installed application

Maybe we can copy the imagelist when browsing c:\ then use it later with any other drive
But who can guarantee that C:\ imagelist is always OK
Egypt my love
BarryG
Addict
Addict
Posts: 3292
Joined: Thu Apr 18, 2019 8:17 am

Re: ExplorerListGadgets and actioning items

Post by BarryG »

I don't have any third-party file managers installed. It's one of those weird things where C: works and D: doesn't. Both are partitions from the same SSD on my PC. I can live without it for now and put it on the back-burner for later reassessment.
RASHAD
PureBasic Expert
PureBasic Expert
Posts: 4636
Joined: Sun Apr 12, 2009 6:27 am

Re: ExplorerListGadgets and actioning items

Post by RASHAD »

Use your default web browser to view c:\ and d:\ and report
I did that with Firefox and it's fine
Egypt my love
BarryG
Addict
Addict
Posts: 3292
Joined: Thu Apr 18, 2019 8:17 am

Re: ExplorerListGadgets and actioning items

Post by BarryG »

RASHAD wrote: Sat Jun 26, 2021 10:38 am Use your default web browser to view c:\ and d:\ and report
I did that with Firefox and it's fine
My default browser is Firefox and it shows C: and D: like below.

C -> https://i.imgur.com/gktSa1Q.png
D -> https://i.imgur.com/pSBYyQs.png

When I try with Internet Explorer, it opens the drives in Explorer instead like this:

C -> https://i.imgur.com/Ma1U89E.png
D -> https://i.imgur.com/msUOmuo.png

So, a slightly different view which is likely causing the problem. But no, I'm not changing those views to suit my PureBasic app. Hehe.
BarryG
Addict
Addict
Posts: 3292
Joined: Thu Apr 18, 2019 8:17 am

Re: ExplorerListGadgets and actioning items

Post by BarryG »

BarryG wrote: Sat Jun 26, 2021 10:22 amI can live without it for now and put it on the back-burner for later reassessment
Here I am back again; reassessing the code after 1.5 years, lol.

My requirements have changed now... all I want is to use the following code to show only the files with extensions that I give it. So, maybe only ".txt" files, or maybe both ".jpg" and ".png" files. But it seems I can't give a file filter to the WebGadget?

And yes, I must use a WebGadget for the reason given in my first post in this thread.

Code: Select all

If OpenWindow(0, 0, 0, 1024, 768, "Files", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
  WebGadget(0, 10, 10, 1000, 750, "file:///d:\") ; This is fine to show all files. :)
  ;WebGadget(0, 10, 10, 1000, 750, "file:///d:\*.txt") ; But this doesn't show TXT files. :(
  Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf
Post Reply