E1M1 Posted January 11, 2010 Share Posted January 11, 2010 (edited) How to lock icons placement on desktop?I tried this http://www.activewin.com/tips/reg/desktop_3.shtml but it didn't work, I am wondering if there are any other methods to do it.I tried ;~ ControlEnable("Program Manager", "", "[CLASS:SysListView32; INSTANCE:1]") but it completely disables desktop I also thought about changing Style for SysListView32 in window Program Manager, but I can't find how to change style for non autoit window elements.Also i am not sure if that helps me but if it helps I would need someone's help on changing that style.Edit: I just tested commercial software and found that it don't change style. any ideas about how it could work?edit2: I saw it use HookManager.dll I am just wondering what is hook and how it works and can i write autoit script that installs kinda hook in that window. Edited January 11, 2010 by E1M1 edited Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 11, 2010 Moderators Share Posted January 11, 2010 E1M1,I have been looking for something like this for a long time, as I was so fed up with Vista messing up the arrangement of the icons on my desktop and in my folders. But I never found any way to fix them where I wanted them. In the end I wrote a small utility that saves the positions of the icons when they are at the positions I want and which then moves them back to these positions if Bill Gates has messed them about. If I remember correctly, it uses _GUICtrlListView_GetItemCount, _GUICtrlListView_GetItemText and _GUICtrlListView_GetItemPosition to save the icon positions once you have identified the Explorer ListView. It was not difficult to write. M23P.S. I will see if I can find the script for you later. Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
E1M1 Posted January 11, 2010 Author Share Posted January 11, 2010 Well It's pretty good solution, and it's easy if you knowwho and what u do but if that code includes commands that u never used before and u even don't know about the then it could take weeks. Can't you just monitor for mouse left down action and if mousedrag detected, press esc(it's good solution if u have set things open with single click). edited Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 11, 2010 Moderators Share Posted January 11, 2010 E1M1,Can't you just monitor for mouse left down action and if mousedrag detected, press escI think I may have misunderstood what you wanted. Are you just looking to prevent the icons being slightly moved when you click on them and move the mouse inadvertantly?If so, then try setting the <Align to Grid> option which will snap them back automatically if you move them slightly when clicking on them. You will find it (in Vista at least) by rightclicking on the DeskTop and looking under the <View> item. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
KaFu Posted January 11, 2010 Share Posted January 11, 2010 (edited) P.S. I will see if I can find the script for you later.I would be happy if you'll post your script . Used MrCreatoR's Desktop Icons Restorator before. But recently I've switched to x64 and had to learn that x86 compiled scripts can not access x64 system listviews . Tried to update the script, but it has been written in AU 3.2.4.9, and quiet a bunch has changed since then, so it looked more like a total re-write... and I've been too lazy to do that up to now Edited January 11, 2010 by KaFu OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 11, 2010 Moderators Share Posted January 11, 2010 (edited) KaFu,I thought someone might take me up on that offer - so I went searching.... You need a recursive file searcher to make it work, so I have also attached my version which is an #include in the utility. There is also the icon I produced (I was always poor at art, so do not laugh too much ).Warning: This works on Vista 32-bit, but apparently certain sections fail on any other OS. Caveat emptor!I think the operation is fairly obvious:Get your desktop/folders as you would wish and then press "Save". I have found it best to have all the folders closed before running. The "Desktop only" checkbox limits the save as it suggests. Pressing "Restore" resets all the values as saved. If icons are moved, you are told and are advised to check the folders "View" setting - it is usually there that Vista has changed something - before continuing. I have also found that it is s good idea to actually move at least one icon in a changed folder before letting the app replace the icons - it seems to get confused if the icons are autoarranged when it starts. It also lets you know if it finds an icon with no stored location - a hint that you need to save a new config file! "Delete" lets you get rid of previously saved configurations. I decided to offer the chance to save several versions as I know some people use different resolutions at times.The config files are saved in the same folder as the utility unless it is placed in the "Program Files" folder - in this case they are stored in @AppDataDir & "\ICF". But this is transparent to the user.As always, happy to receive comments and suggestions.M23Edit: Zip updated after KaFu's improvements. Edited January 11, 2010 by Melba23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
E1M1 Posted January 11, 2010 Author Share Posted January 11, 2010 thank you very much,it's good example. It also woked if I had multy explorer windows open and also worked when I deleted/added icons, so veery good work! edited Link to comment Share on other sites More sharing options...
KaFu Posted January 11, 2010 Share Posted January 11, 2010 As always, happy to receive comments and suggestions. Really nice , thanks a bunch! I started something similar in this thread, but why invent the wheel twice ? Compiling this with x64 version of AU does the job for me! Sliding through the code I saw this line twice: $sConfig_Name = @ScriptDir & "\" & $aConfig_List[$iIndex] which should not work If @ScriptDir = @ProgramFilesDir, better like this $sConfig_Name = $sConfig_Path & "\" & $aConfig_List[$iIndex] This Global $sDesktop_Path = "C:\Users\" & @UserName & "\Desktop" should better be this Global $sDesktop_Path = @DesktopDir I changed this Global $aIniSection_List = _RecFileListToArray($sDesktop_Path, "*", 2, 1) to this Global $aIniSection_List = _RecFileListToArray($sDesktop_Path, "*", 2, 1) $aIniSection_List_Common = _RecFileListToArray(@DesktopCommonDir, "*", 2, 1) if IsArray($aIniSection_List_Common) Then $aIniSection_List[0] += $aIniSection_List_Common[0] _ArrayDelete($aIniSection_List_Common,0) _ArrayConcatenate($aIniSection_List,$aIniSection_List_Common) $aIniSection_List_Common = 0 endif and will add a command-line switch to restore certain configs (I want to use it with ATI Hotkeys to switch between PC and TV desktop layout ). OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
KaFu Posted January 11, 2010 Share Posted January 11, 2010 (edited) Arrrrghhhh, the negative rep point came from me ... will rate two of your other postings positive to make this up, sorry! Edited January 11, 2010 by KaFu OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 11, 2010 Moderators Share Posted January 11, 2010 KaFu, Glad you liked it! Thanks for the improvements. I wrote it quite some time ago and have not really looked at it since - a second pair of eyes is always a good idea. I have updated the zip above if anyone else wants the amended version. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
E1M1 Posted January 11, 2010 Author Share Posted January 11, 2010 M23 as it's long code and working on it must have taken long time and effort + fact that i needed it alot... u earned +4 from me edited 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