yehia Posted February 16, 2009 Share Posted February 16, 2009 hi after some searches i found this script for arranging the icons on the desktop Const $WM_COMMAND = 0x0111 _SortIconsOnTheDesktop() Func _SortIconsOnTheDesktop($sort_by = 1) ; 1 = Name, 2 = Size, 3 = Type, 4 = Modified (works for WinXP only) Local $hDesk, $sorting If @OSVersion = "WIN_XP" Then Local $iByName = 30210 Local $iBySize = 30211 Local $iByType = 30212 Local $iByModified = 30213 ElseIf @OSVersion = "WIN_VISTA" Then MsgBox(0, "Not supported", "This system is not yet supported by this program.") Return SetError(1, 0, -1) Else MsgBox(0, "Not supported", "This system is not supported by this program.") Return SetError(1, 0, -1) EndIf Select Case $sort_by = 1 $sorting = $iByName Case $sort_by = 2 $sorting = $iBySize Case $sort_by = 3 $sorting = $iByType Case $sort_by = 4 $sorting = $iByModified Case Else MsgBox(0, "Wrong Value", "Wrong option.") Return SetError(1, 0, -2) EndSelect $hDesk = WinGetHandle('[CLASS:Progman]') DllCall('user32.dll', 'int', 'SendMessage', 'hwnd', $hDesk, 'uint', $WM_COMMAND, 'wparam', $sorting, 'lparam', 0) EndFunc ;==>_SortIconsOnTheDesktop but im looking for "show in groups" and "View" too so is there anyway to get this popup menu IDs as in the above script? or do anyone already have em? ;;"Arrange Icons By" popup menu IDs for WinXP: $iByName = 30210 $iBySize = 30211 $iByType = 30212 $iByModified = 30213 thanks guys My Scripts:IE New UDFsElastic images moving under mouse (with a happy valentine's example)_FileRemoveLine Link to comment Share on other sites More sharing options...
Authenticity Posted February 16, 2009 Share Posted February 16, 2009 Auto arrange = 0x7051 Align to grid = 0x7054 Shot desktop icons = 0x7402 To check for other possibilities (actually it's not an ID rather a message value, wparam in this case) you can use Spy++ that comes with Microsoft's full Visual Studio, and capture WM_COMMAND messages that are posted to the desired window. If you don't have Spy++ there are a few other tools that can do almost the same. Link to comment Share on other sites More sharing options...
yehia Posted February 16, 2009 Author Share Posted February 16, 2009 thanks for your help all i got was mouse movement and buttons up and down msgs do u have any idea about the name of the WM_COMMAND? and thanks for the help My Scripts:IE New UDFsElastic images moving under mouse (with a happy valentine's example)_FileRemoveLine Link to comment Share on other sites More sharing options...
Authenticity Posted February 16, 2009 Share Posted February 16, 2009 Which tool are you using? If Microsoft's Spy++ you can just start a new capture message session an use the Finder tool to specify the specific window you're wishing to capture it's messages and check the second tab window in the same dialog for the messages to capture. Link to comment Share on other sites More sharing options...
yehia Posted February 16, 2009 Author Share Posted February 16, 2009 yes im using Spy ++ open the msg tracking and only got those 2 msgs i told u about strange i will test more later thanks a lot for your help My Scripts:IE New UDFsElastic images moving under mouse (with a happy valentine's example)_FileRemoveLine Link to comment Share on other sites More sharing options...
yehia Posted February 17, 2009 Author Share Posted February 17, 2009 btw that didnt do the trick i tried those : Auto arrange = 0x7051 Align to grid = 0x7054 Shot desktop icons = 0x7402 they all worked but i still cant get them my self my spy ++ does shows alot of WM_commands but ... can u tell me whats the WM_COMMAND for it? thanks My Scripts:IE New UDFsElastic images moving under mouse (with a happy valentine's example)_FileRemoveLine Link to comment Share on other sites More sharing options...
Authenticity Posted February 17, 2009 Share Posted February 17, 2009 It's 0x0111 but it wouldn't matter because it supposed to be in the list on the second tab.... maybe your spy is old or doesn't support this option. Try WinSpector in case Spy++ doesn't give you this option. Link to comment Share on other sites More sharing options...
yehia Posted February 17, 2009 Author Share Posted February 17, 2009 (edited) well my Spy ++ is toooooo old i had it with VB 1998 V6 i will try to get another tool thanks alot Edited February 17, 2009 by yehia My Scripts:IE New UDFsElastic images moving under mouse (with a happy valentine's example)_FileRemoveLine Link to comment Share on other sites More sharing options...
yehia Posted February 17, 2009 Author Share Posted February 17, 2009 thanks alot Authenticity solved My Scripts:IE New UDFsElastic images moving under mouse (with a happy valentine's example)_FileRemoveLine Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now