Jump to content

Desktop Icon Config Saver


Melba23
 Share

Recommended Posts

  • 1 month later...
  • Replies 47
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

I took a look at you code few weeks ago and found your are redisplaying icons twice :)

maybe using something like this will help

_GUICtrlListView_beginUpdate($hExplorer_List)

display icons only once

_GUICtrlListView_endUpdate($hExplorer_List)

in this way you are not fighting windoze desktop refresh .

:(

Edited by JoeCool
Link to comment
Share on other sites

  • 2 weeks later...

I took a look at you code few weeks ago and found your are redisplaying icons twice :(

Thanks for the hint :), seems to work fine for me too...

Version 2.4

  • Replaced dual refresh with _GUICtrlListView_BeginUpdate($hExplorer_List) & _GUICtrlListView_EndUpdate($hExplorer_List)

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_icon=Desktop.ico
#AutoIt3Wrapper_outfile=ICU.exe
#AutoIt3Wrapper_Compression=4
#AutoIt3Wrapper_UseUpx=n
#AutoIt3Wrapper_UseX64=y
#AutoIt3Wrapper_Res_Description=Icon Configuration Utility
#AutoIt3Wrapper_Res_Fileversion=2.4.0.0
#AutoIt3Wrapper_Res_LegalCopyright=Melba23 2009-2010, KaFu 2010
://////=__=
#AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6
#AutoIt3Wrapper_Run_Obfuscator=y
#Obfuscator_Parameters=/sf /sv /om /cs=0 /cn=0
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
;
; ##### Icon Configuration Utility #####
;
; Script Version: 2.4
; As at 30 Mar 10
;
; Changelog
; 2.4
;       100330: JoeCool: Avoid setting desktop twice, added _GUICtrlListView_BeginUpdate($hExplorer_List) & _GUICtrlListView_EndUpdate($hExplorer_List)
;               http://www.autoitscript.com/forum/index.php?showtopic=108245&view=findpost&p=784489
;
#region ;----- Includes -----

#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <ComboConstants.au3>
#include <GuiListView.au3>
#include <Date.au3>
#include <File.au3>

#endregion ;----- Includes -----
#region ;----- Declarations -----

If Not @Compiled Then MsgBox(64, "ICU Info", "ICU needs to be compiled for full functionality")
If @OSArch = "X64" And @AutoItX64 = 0 Then
    MsgBox(16, "ICU Error", "This version of ICU is 32-bit compiled" & @CRLF & _
            "and will not run correctly with a 64-bit OS" & @CRLF & @CRLF & _
            "Please recompile as a 64-bit executable")
    Exit
EndIf

Global $sConfig_Name, $sConfig_Path, $hList_Start, $aScreen_Res
Global $hScreen = WinGetHandle("Program Manager")

; Match only exact window titles
Global $iOldOpt = Opt("WinTitleMatchMode", 3)

; Set Desktop path
Global $sDesktop_Path = @DesktopDir

; See if app is in Program Files
If @ScriptDir = @ProgramFilesDir Then
    ; If app in Program Files need to save config files elsewhere
    If Not FileExists(@AppDataDir & "\ICF") Then DirCreate(@AppDataDir & "\ICF")
    $sConfig_Path = @AppDataDir & "\ICF"
Else
    ; Can use working directory
    $sConfig_Path = @ScriptDir
EndIf

; Get list of existing config files
Global $aConfig_List = _FileListToArray($sConfig_Path, "*.icf", 1)

#endregion ;----- Declarations -----

#region ;----- Create GUI -----

Global $sGUITitle = "Icon Configuration Utility - 64bit version"
If @AutoItX64 = 0 Then $sGUITitle = "Icon Configuration Utility - 32bit version"

Global $hMain_GUI = GUICreate($sGUITitle, 370, 247)
GUISetBkColor(0xFFFFFF)

Global $hSave_Button = GUICtrlCreateButton("Save", 10, 175, 80, 25)
Global $hRestore_Button = GUICtrlCreateButton("Restore", 100, 175, 80, 25)
Global $hDelete_Button = GUICtrlCreateButton("Delete", 190, 175, 80, 25)
Global $hAbout_Button = GUICtrlCreateButton("About", 280, 175, 80, 25)

GUICtrlCreateLabel("List of icon configuration files (*.icf)", 10, 8, 200, 20)

Global $hState_Label = GUICtrlCreateLabel("Ready", 280, 7, 80, 16, $SS_CENTER + $SS_CENTERIMAGE)
GUICtrlSetBkColor(-1, 0xCCFFCC)

GUICtrlCreateLabel("Command line restore via", 10, 210, 120, 13)
GUICtrlSetFont(-1, 7, 400, 0, "Lucida Console")
GUICtrlCreateLabel("icu.exe restore #", 10, 225, 120, 13)
GUICtrlSetFont(-1, 7, 400, 0, "Lucida Console")

GUICtrlCreateLabel("Move unknown icons", 152, 214, 110, 13)
Global $cID_Combo_Unknown_Icon = GUICtrlCreateCombo("to position 0,0", 260, 210, 100, 20, BitOR($CBS_DROPDOWNLIST, $CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "off-screen|ask per icon")

Global $hFile_List = GUICtrlCreateListView("#|Name|Date|Resolution", 10, 30, 350, 135, $LVS_SINGLESEL, $LVS_EX_FULLROWSELECT)
; Set up alt line colouring
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_LV_ALTERNATE)
; Set col width
_GUICtrlListView_SetColumnWidth(-1, 0, 20)
_GUICtrlListView_SetColumnWidth(-1, 1, 117)
_GUICtrlListView_SetColumnWidth(-1, 2, 145)
_GUICtrlListView_SetColumnWidth(-1, 3, $LVSCW_AUTOSIZE_USEHEADER)

If IsArray($aConfig_List) Then
    _Fill_ListView()
Else
    GUICtrlCreateListViewItem("|No Files Found", $hFile_List)
    GUICtrlSetState($hRestore_Button, $GUI_DISABLE)
EndIf

#region ; ----- Command line -----


If $CmdLine[0] = 2 And StringLower($CmdLine[1]) = "restore" Then
    If Not IsArray($aConfig_List) Then Exit
    For $i = 1 To $aConfig_List[0]
        If Number(StringLeft($aConfig_List[$i], 3)) = Number($CmdLine[2]) Then
            $sConfig_Name = $sConfig_Path & "\" & $aConfig_List[$i]
            If FileExists($sConfig_Name) Then _Set_Locations_Desktop()
            Exit
        EndIf
    Next
    MsgBox(64 + 262144, "ICU", "ICU could not find called config # " & $CmdLine[2])
    Exit
EndIf

#endregion ; ----- Command line -----

GUISetState()

#endregion ;----- Create GUI -----
#region ;----- Main loop -----

While 1

    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            Opt("WinTitleMatchMode", $iOldOpt)
            Exit
        Case $hSave_Button
            _Save_Config()
        Case $hRestore_Button
            _Restore_Config()
        Case $hDelete_Button
            Global $iIndex = _GUICtrlListView_GetSelectedIndices($hFile_List, True)
            If $iIndex[0] = 1 Then
                If MsgBox(4 + 16, $sGUITitle, "Are you sure you want to delete """ & _GUICtrlListView_GetItemText($hFile_List, $iIndex[1], 1) & """") = 6 Then _Delete_Config()
            EndIf
        Case $hAbout_Button
            _On_Info()
    EndSwitch

WEnd

#endregion ;----- Main loop -----
; Functions
#region ;----- Save -----

Func _Save_Config()

    Local $sConfig_Type = InputBox($sGUITitle, "Enter a name for the new icon configuration file:", Default, Default, 300, 130)
    If @error Then Return
    $sConfig_Type = StringRegExpReplace($sConfig_Type, '[\Q\/:?*"<>|\E]', '') ; force valid filename

    GUICtrlSetData($hState_Label, "Working")
    GUICtrlSetBkColor($hState_Label, 0xCC0000)

    ; Get new config filename
    If IsArray($aConfig_List) Then
        Local $iNew_Index = 0
        For $i = 0 To UBound($aConfig_List) - 1
            If Number(StringLeft($aConfig_List[$i], 3)) >= $iNew_Index Then $iNew_Index = Number(StringLeft($aConfig_List[$i], 3)) + 1
        Next
        $sConfig_Name = $sConfig_Path & "\" & StringFormat("%03i", $iNew_Index) & "_" & $sConfig_Type & ".icf"
    Else
        $sConfig_Name = $sConfig_Path & "\001_" & $sConfig_Type & ".icf"
    EndIf

    ; Write config file data
    $aScreen_Res = WinGetPos($hScreen)
    IniWrite($sConfig_Name, "Data", "Type", $sConfig_Type)
    IniWrite($sConfig_Name, "Data", "Date", _NowCalc())
    IniWrite($sConfig_Name, "Data", "Resolution", $aScreen_Res[2] & "x" & $aScreen_Res[3])
    IniWrite($sConfig_Name, "Data", "Unknown_Icon_Handling", GUICtrlRead($cID_Combo_Unknown_Icon))

    ; Save Desktop locations
    _Save_Locations_Desktop()

    ; Refill list
    _Fill_ListView()

    ; Reset GUI
    GUICtrlSetData($hState_Label, "Ready")
    GUICtrlSetBkColor($hState_Label, 0xCCFFCC)
    GUICtrlSetState($hRestore_Button, $GUI_ENABLE)

EndFunc   ;==>_Save_Config

; ------------

Func _Save_Locations_Desktop()

    Local $hExplorer_List = ControlGetHandle("Program Manager", "", "SysListView321")

    ; Loop through folder contents
    For $i = 0 To _GUICtrlListView_GetItemCount($hExplorer_List) - 1
        ; Get name
        Local $sKey_Name = _GUICtrlListView_GetItemText($hExplorer_List, $i)
        ; Get position
        Local $aPos = _GUICtrlListView_GetItemPosition($hExplorer_List, $i)
        Local $sValue_Pos = $aPos[0] & ":" & $aPos[1]
        ; Write to config file
        IniWrite($sConfig_Name, "Desktop", _URIEncode($sKey_Name), $sValue_Pos)
    Next

EndFunc   ;==>_Save_Locations_Desktop

#endregion ;----- Save -----
#region ;----- Restore -----

Func _Restore_Config()

    GUICtrlSetData($hState_Label, "Working")
    GUICtrlSetBkColor($hState_Label, 0xCC0000)

    ; Get config file name
    Local $iIndex = GUICtrlRead($hFile_List) - $hList_Start
    If $iIndex > 0 Then
        $sConfig_Name = $sConfig_Path & "\" & $aConfig_List[$iIndex]
        ; Restore Desktop
        _Set_Locations_Desktop()
    Else
        MsgBox(0, "Error", "No Configuration File Selected")
    EndIf

    ; Reset GUI
    GUICtrlSetData($hState_Label, "Ready")
    GUICtrlSetBkColor($hState_Label, 0xCCFFCC)

EndFunc   ;==>_Restore_Config

; --------

Func _Set_Locations_Desktop()

    Local $hExplorer_List = ControlGetHandle("Program Manager", "", "SysListView321")

    GUICtrlSetData($cID_Combo_Unknown_Icon, IniRead($sConfig_Name, "Data", "Unknown_Icon_Handling", "to position 0,0"))

    ; Now replace icons back in stored positions
    Local $j = 0, $sAskAnswer
    _GUICtrlListView_BeginUpdate($hExplorer_List)
    For $i = 0 To _GUICtrlListView_GetItemCount($hExplorer_List) - 1
        ; Get name & position
        Local $sIcon_Name = _GUICtrlListView_GetItemText($hExplorer_List, $i)
        Local $sPos_Saved = IniRead($sConfig_Name, "Desktop", _URIEncode($sIcon_Name), "")
        If $sPos_Saved <> "" Then
            Local $aPos = StringSplit($sPos_Saved, ":")
            _GUICtrlListView_SetItemPosition($hExplorer_List, $i, $aPos[1], $aPos[2])
        Else
            Switch GUICtrlRead($cID_Combo_Unknown_Icon)
                Case "off-screen"
                    _GUICtrlListView_SetItemPosition($hExplorer_List, $i, 9999, 9999)
                Case "ask per icon"
                    If $j = 0 Then $sAskAnswer = InputBox($sGUITitle, "Enter a position x,y", Default, Default, 300, 130)
                    If @error Or Not StringInStr($sAskAnswer, ",") Then
                        _GUICtrlListView_SetItemPosition($hExplorer_List, $i, 0, 0)
                    Else
                        Local $aAskAnswer = StringSplit($sAskAnswer, ",")
                        If $aAskAnswer[0] = 2 Then
                            _GUICtrlListView_SetItemPosition($hExplorer_List, $i, Number($aAskAnswer[1]), Number($aAskAnswer[2]))
                        Else
                            _GUICtrlListView_SetItemPosition($hExplorer_List, $i, 0, 0)
                        EndIf
                    EndIf
                Case Else
                    _GUICtrlListView_SetItemPosition($hExplorer_List, $i, 0, 0)
            EndSwitch
        EndIf
    Next
    _GUICtrlListView_EndUpdate($hExplorer_List)
EndFunc   ;==>_Set_Locations_Desktop

#endregion ;----- Restore -----
#region ;----- Delete -----

Func _Delete_Config()

    GUICtrlSetData($hState_Label, "Deleting")
    GUICtrlSetBkColor($hState_Label, 0xCC0000)

    ; Get config file name
    Local $iIndex = GUICtrlRead($hFile_List) - $hList_Start
    If $iIndex > 0 Then
        $sConfig_Name = $sConfig_Path & "\" & $aConfig_List[$iIndex]
        ; Delete config file
        FileRecycle($sConfig_Name)
    EndIf

    ; Refill list
    _Fill_ListView()

    ; Reset GUI
    GUICtrlSetData($hState_Label, "Ready")
    GUICtrlSetBkColor($hState_Label, 0xCCFFCC)

EndFunc   ;==>_Delete_Config

#endregion ;----- Delete -----
#region ;----- Misc -----

Func _Fill_ListView()
    _GUICtrlListView_DeleteAllItems($hFile_List)
    ; Get list of files
    $aConfig_List = _FileListToArray($sConfig_Path, "*.icf", 1)
    ; Fill Listview
    If Not IsArray($aConfig_List) Then
        GUICtrlCreateListViewItem("|No Files Found", $hFile_List)
        GUICtrlSetState($hRestore_Button, $GUI_DISABLE)
        Return
    EndIf

    $hList_Start = GUICtrlCreateDummy() ; Start of list handles
    ; If > 9 files reduce final col size to leave place for v-scroll so no h-scroll

    If $aConfig_List[0] > 9 Then _GUICtrlListView_SetColumnWidth($hFile_List, 2, 95)
    ; Get data from files
    For $i = 1 To $aConfig_List[0]
        Local $sType = IniRead($sConfig_Path & "\" & $aConfig_List[$i], "Data", "Type", "Unknown")
        Local $sDate = IniRead($sConfig_Path & "\" & $aConfig_List[$i], "Data", "Date", "Unknown")
        Local $sRes = IniRead($sConfig_Path & "\" & $aConfig_List[$i], "Data", "Resolution", "Unknown")
        GUICtrlCreateListViewItem(Number(StringLeft($aConfig_List[$i], 3)) & "|" & $sType & "|" & $sDate & "|" & $sRes, $hFile_List)
        GUICtrlSetBkColor(-1, 0xCCFFCC)
    Next

EndFunc   ;==>_Fill_ListView

#endregion ;----- Misc -----
#region ;----- Info Functions -----

Func _On_Info()

    ;Show info messagebox
    MsgBox(4160, "About", "Icon Configuration Utility v2.2" & @CRLF & @CRLF & "Melba23 2009-2010, KaFu 2010")

EndFunc   ;==>_On_Info

#endregion ;----- Info Functions -----


; #FUNCTION# ====================================================================================================================
; Name...........: _URIEncode
; Description ...: Encodes a string to be used in an URI
; Syntax.........: _URIEncode($sData)
; Parameters ....: $sData    - String to encode
; Return values .: Encoded String
; Author ........: Prog@ndy
; Modified.......:
; Remarks .......: This function uses UTF-8 encoding for special chars
; Related .......: _URIDecode
; Link ..........;
; Example .......;
; ===============================================================================================================================
Func _URIEncode($sData)
    ; Prog@ndy
    Local $aData = StringSplit(BinaryToString(StringToBinary($sData, 4), 1), "")
    Local $nChar
    $sData = ""
    For $i = 1 To $aData[0]
;~         ConsoleWrite($aData[$i] & @CRLF)
        $nChar = Asc($aData[$i])
        Switch $nChar
            Case 45, 46, 48 - 57, 65 To 90, 95, 97 To 122, 126
                $sData &= $aData[$i]
            Case 32
                $sData &= "+"
            Case Else
                $sData &= "%" & Hex($nChar, 2)
        EndSwitch
    Next
    Return $sData
EndFunc   ;==>_URIEncode

Func _URIDecode($sData)
    ; Prog@ndy
    Local $aData = StringSplit(StringReplace($sData, "+", " ", 0, 1), "%")
    $sData = ""
    For $i = 2 To $aData[0]
        $aData[1] &= Chr(Dec(StringLeft($aData[$i], 2))) & StringTrimLeft($aData[$i], 2)
    Next
    Return BinaryToString(StringToBinary($aData[1], 1), 4)
EndFunc   ;==>_URIDecode
Link to comment
Share on other sites

  • 1 month later...

Thanks. I haven't tested it out yet but this is excatly what I was looking for. My Work places a bunch of icons on my desktop and in the process they always seem to re-arrange them. They also put Ready-Only and System Attribs on them which have to be removed before an autoIt3 script can remove them, at least from my testing.

I'll report back once I test this one and see if it can handle icons that don't want me be removed/moved (i have admin rights).

www.abox.orgAvery HowellVisit My AutoIt Websitehttp://www.abox.org
Link to comment
Share on other sites

  • 4 weeks later...

Changelog v2.4 > v2.8

  • Added a 32/64bit wrapper, so that now it's a single exe for both OS architectures
  • Added Desktop ContextMenu Integration for Win7

Posted Image

Source and Executable are available on my website at

http://www.funk.eu

Best Regards

Link to comment
Share on other sites

  • 1 month later...

What if I have two items (shortcut and file/folder) with the same name?

Hmmm, guess that will mess the saved config, at least for this pair of icons :P. Taken to the ToDo-List. Thinking about it, Windows even allows two files with the same name on the desktop... if one is located in the @DesktopDir and the other in the @DesktopCommonDir... additionally noted for the next release :blink:. Thanks for pointing this out ;). Edited by KaFu
Link to comment
Share on other sites

  • 4 weeks later...

This is what my .icf file is looking like:

[Data]
Type=asdf
Date=2010/08/23 18:57:16
Resolution=1680x1050
Unknown_Icon_Handling=to position 0,0
And that's with the program compiled.. Any ideas why? I'm guessing it's 'cause I'm not getting the right desktop handle..

Win7 64bit latest autoit

My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]
Link to comment
Share on other sites

  • 4 months later...

Updated to v3.1. Fixed the annoying (and self introduced) UAC bug.

Additionally dealt with both of these issues:

What if I have two items (shortcut and file/folder) with the same name?

Hmmm, guess that will mess the saved config, at least for this pair of icons :shifty:. Taken to the ToDo-List. Thinking about it, Windows even allows two files with the same name on the desktop... if one is located in the @DesktopDir and the other in the @DesktopCommonDir... additionally noted for the next release :x. Thanks for pointing this out :P.

Link to comment
Share on other sites

I don't use UAC but thanks for the heads up on #AutoIt3Wrapper_Res_requestedExecutionLevel=asInvoker

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

I don't use UAC but thanks for the heads up on #AutoIt3Wrapper_Res_requestedExecutionLevel=asInvoker

First thing I turn off after a fresh install :shifty:, that's why I took me nearly 1 1/2 years to realize that all my programs pop-up an UAC request :x, hell, why are all the people to lazy for a proper feedback :P?

Link to comment
Share on other sites

@KaFu - Thanks for sharing!

Love to be able to do those sub-menus on the (Desktop, etc) context menus on Win XP ... I note that you say, only available in Win 7.

Note - It took me a little while to work out where the update was at ... a bit confusing until I finally realized that you were not the original poster.

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Link to comment
Share on other sites

Sorry :P, already discussed it with Melba23. Will open a new thread on the next release :shifty:.

Source and Executable are available on my website at

http://www.funk.eu

Love to be able to do those sub-menus on the (Desktop, etc) context menus on Win XP ... I note that you say, only available in Win 7.

Those are realized using "Static Cascading Menus", sadly only available on Win7. Another drawback of those is, that the actual commands are stored in the "HKEY_LOCAL_MACHINE" hive, which requires Admin access rights to write too :x, thus dynamic creation is only possible if ICU is run in elevated mode. Never realized that because I turned UAC off.

There's are other mechanism to create such menus, the IContextMenu Interface (something for AutoItObject I guess), but that's way over my head :nuke:.

Link to comment
Share on other sites

Sorry :x, already discussed it with Melba23. Will open a new thread on the next release :P.

Source and Executable are available on my website at

http://www.funk.eu

No worries, I just thought you'd like to know, and that sounds like a good solution.

Those are realized using "Static Cascading Menus", sadly only available on Win7. Another drawback of those is, that the actual commands are stored in the "HKEY_LOCAL_MACHINE" hive, which requires Admin access rights to write too Posted Image, thus dynamic creation is only possible if ICU is run in elevated mode. Never realized that because I turned UAC off.

Which is a shame, as I'm still on XP most of the time.

There's are other mechanism to create such menus, the IContextMenu Interface (something for AutoItObject I guess), but that's way over my head :shifty:.

And mine no doubt.

Some others here have them working with their programs (Valik's Supper Hidden program comes to mind), but I don't think they've used AutoIt code to implement them.

In the past, I've been referred to 3rd party DLL's and such, but they've been less than rewarding, and I'd rather implement it natively with a Windows DLL, etc.

My Context Options program for files & folders could really benefit from this ... be less clunky than it is (v3.6 has many more features than the last version I uploaded here to my Toolbox ... one of many program updates I have sitting there waiting for me to upload ... after I re-organize a few things first).

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Link to comment
Share on other sites

  • 1 month later...

KaFu and I found we were working on very similar ideas to restore the Desktop icons to their normal place if they became "rearranged"

It's have been done before: Desktop Icons Restorator :)

 

Spoiler

Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1

AutoIt_Rus_Community.png AutoIt Russian Community

My Work...

Spoiler

AutoIt_Icon_small.pngProjects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize Program

AutoIt_Icon_small.pngUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF
 
AutoIt_Icon_small.pngExamples: 
ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo

Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating AutoIt_Rating.gif)

* === My topics === *

==================================================
My_Userbar.gif
==================================================

 

 

 

AutoIt is simple, subtle, elegant. © AutoIt Team

Link to comment
Share on other sites

  • 2 months later...

An addition to the 'Save' command line that can give us the possibility to automate backup will be appreciated.

Something like this : icu.exe save 'autobackup'

Like this, we can automate a backup on the session opening.

Another great addition can be to choose how many autobackup to keep. :huh2:

Anyway, wonderful work and thank you very much.

Best Regards.Thierry

Link to comment
Share on other sites

  • 1 month later...

It's have been done before: Desktop Icons Restorator :)

Hello,

beeing new here and trying to use "Desktop Icons Restorator" today I found this thread. I'm looking for a solution for the fault, that the value for the Auto-Saving time value does ignore more than the 1. figure. So the max time is 9 sec against the proposed value of 24h.

Is there a newer version than 1.02 (2007) available?

Or is the program described in this thread a better solution. If yes, where can I download it?

Thanks i.a. for an answer

Best regards

Link to comment
Share on other sites

  • 3 weeks later...

Hello M23 & KaFu !

I really enjoy the nice little tool you created but I have a question:

Actually I'm looking for a quite similar Tool to create "Snap-Shots" of opened Folders.

WHY?

Very often I need to open several sub-folders (with different Soft- / Firmware-Releases) to have

direct access to different Scrips and tools with my mouse.

As I have to open approx. 10 windows incl. moving and resizing on the screen, this procedure

needs a lot of time each time ... :-/

I can't create some kind of Batch-File which run's always the same files because

this change depending on the Status of the device I'm actually working on ...

I'm looking since day's for some kind of Tool where I can create the "Desktop Screen with the needed Folders"

and then I like to store this in a snapshot.

Really cool will be if I can store several different kind of Snapshots to recall different Folders which I need.

Am I totally wrong here or is this something which could be feasible??

What is your opinion?

Looking forward to your reply.

Regards, Kevvv

Link to comment
Share on other sites

  • 3 months later...

This is what my .icf file is looking like:

[Data]
Type=asdf
Date=2010/08/23 18:57:16
Resolution=1680x1050
Unknown_Icon_Handling=to position 0,0
And that's with the program compiled.. Any ideas why? I'm guessing it's 'cause I'm not getting the right desktop handle..

Win7 64bit latest autoit

Same problem encountered by Achilles here. I am using the last version (not compiled by myself, just downloaded the executable file) on WinXP 32bit. Hints and suggestions are appreciated: it is a great tool, very useful, and it's quite a pity not being able to take advantage of it!

Link to comment
Share on other sites

  • 10 years later...

KaFu

Hello

I use your script

1) I save profile on desktop - i run your script, click button Save, input 1, click Save

2) I have file 001_1.icf - original

3) I delete unused icon from file 001_1.icf

4) I have file 001_1.icf - minimal

5) I xaos move icon on my desktop

6) I click Restore on your program - icon DO not Restore correctly

Please, help me

Maybe, problem, i have name icon as Russian letters?

Thank You!

Before (before restore) - step 1)

Before.jpg

Xaos - step 5)

Xaos.jpg

 

After- step 6)

After.jpg

001_1.icf_original.rar

001_1.icf_minimal.rar

 

Edited by SharkyEXE
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...