Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Automating Windows Explorer


  • Please log in to reply
39 replies to this topic
MisterW
  • Members
  • 65 posts
  • Last active: Jun 18 2007 11:14 AM
  • Joined: 20 Jul 2005

Do you get blue screen flicker with this method? (I am guessing that the blue screen is the background colour of your desktop, with no wallpaper showing).


The icons flicker but no blue flash. Yes, blue is the desktop background.
Note: your method doesn't hide the icons just refreshes them. Is that the point?

Serenity
  • Members
  • 1271 posts
  • Last active:
  • Joined: 07 Nov 2004

your method doesn't hide the icons just refreshes them.


Ah, the script I posted only works with Active Desktop enabled. ;)
"Anything worth doing is worth doing slowly." - Mae West
Posted Image

MisterW
  • Members
  • 65 posts
  • Last active: Jun 18 2007 11:14 AM
  • Joined: 20 Jul 2005
If toggling visibility of the desktop icons is the goal then the blue flash doesn't bother me in the slightest. Other than that the post message code works perfectly on XP SP2. I stumbled upon this postmessage code by mistake - Has this functionality been requested somewhere?

wOxxOm
  • Members
  • 371 posts
  • Last active: Feb 20 2015 12:10 PM
  • Joined: 09 Feb 2006
To view all the messages of explorer you just may find winApi header reference files in Google as I did (now I have 182 files covering all the windows API plus 37 from WinDDK ;-).

It is as simple as this:
WinAPI: http://cvs.sourcefor...pi/include/ddk/
DDK: http://cvs.sourcefor...pi/include/ddk/

Still there was no solution for direct change of sort mode in explorer window
Now I have to emit kbd msgs.

P.S. There is a primary source for winAPI ;-) http://msdn.microsof...lvm_setview.asp

Tekl
  • Members
  • 814 posts
  • Last active: May 03 2009 03:28 PM
  • Joined: 24 Sep 2004
Hi,

does anyone tried to automate sorting in explorer with the Message LVM_SORTITEMS? Or is there still a hidden Message to sort the columns?
Tekl

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
I don't think it's possible to send LVM_SORTITEMS to an external application like Explorer, at least not without risking a crash to Explorer. This is because the script would have to know the address of a function inside Explorer's memory space, which might be difficult to discover (and even if you did find it, it might vary on different PCs and OS versions).

So instead, a ControlClick on one of the column headers might work. If not, your other idea of discovering some other message to send is probably best (by means such as Rajat's SendMessage Tutorial).

Tekl
  • Members
  • 814 posts
  • Last active: May 03 2009 03:28 PM
  • Joined: 24 Sep 2004
Hi,

ControlClick does only work for detail-view and not for the thumbnail-view for example. I tried to catch the sendmessage for sorting, but without any success.
Tekl

PhiLho
  • Moderators
  • 6850 posts
  • Last active: Jan 02 2012 10:09 PM
  • Joined: 27 Dec 2005
Then switch to detail view, do the sort, switch back to the other view.
Ugly, but might work.
What Chris means is that LVM_SORTITEMS requires a callback function to work, this function providing infos to compare two entries of the list view (can be based on hidden data, real integers instead of formatted ones (size in KB vs. MB...), etc. And there is no mean to provide such function with this message.
Posted Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")

Tekl
  • Members
  • 814 posts
  • Last active: May 03 2009 03:28 PM
  • Joined: 24 Sep 2004
Hi,

nice idea, but how to click on different headers, and how do I make it reliable, so that the user don't worry about the right order of the columns or even to enable columns or not?
Tekl

Elaphe
  • Members
  • 317 posts
  • Last active: Oct 03 2015 07:34 AM
  • Joined: 06 Dec 2012

PostMessage, 0x111, 41482,,, ahk_class CabinetWClass ; Menu Bar
PostMessage, 0x111, 41476,,, ahk_class CabinetWClass ; Standard Buttons

PostMessage, 0x111, 41477,,, ahk_class CabinetWClass ; Address Bar

 

These commands have make these things dissapear or appear in the wrong position in my Windows XP explorer. Any idea how to restore them?