oMBRa Posted August 31, 2008 Share Posted August 31, 2008 How to hide only 1 desktop icon? Link to comment Share on other sites More sharing options...
Zedna Posted August 31, 2008 Share Posted August 31, 2008 Look herehttp://www.autoitscript.com/forum/index.ph...st&p=572565 Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
oMBRa Posted August 31, 2008 Author Share Posted August 31, 2008 What exactly should I look? Link to comment Share on other sites More sharing options...
rasim Posted August 31, 2008 Share Posted August 31, 2008 (edited) oMBraWhy not just move icon from desktop folder to a temp folder, then if need move back? Edited August 31, 2008 by rasim Link to comment Share on other sites More sharing options...
oMBRa Posted August 31, 2008 Author Share Posted August 31, 2008 Just want hide it... though I did this: #include <GuiListView.au3> $HwNd = ControlGetHandle("Program Manager", "FolderView", "[ClassNN:SysListView321]") $iNdex = _GUICtrlListView_FindInText($HwNd, "MyIcon") ;_GUICtrlListView_ClickItem($HwNd, $iNdex, "Left", False, 2, 1) $ID = _GUICtrlListView_MapIndexToID($HwNd, $iNdex) ControlHide("Program Manager", "FolderView", $ID) Sleep(3000) ControlShow("Program Manager", "FolderView", $ID) I get the Index, the ID, but I cant come out Hiding the icon... what's wrong? Link to comment Share on other sites More sharing options...
Zedna Posted August 31, 2008 Share Posted August 31, 2008 I think listview item can't be hidden. You must delete/recreate it. Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
oMBRa Posted August 31, 2008 Author Share Posted August 31, 2008 so how to hide desktop icon ( without moving it in another folder ) Link to comment Share on other sites More sharing options...
Zedna Posted August 31, 2008 Share Posted August 31, 2008 so how to hide desktop icon ( without moving it in another folder )_GUICtrlListView_DeleteItem() Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
oMBRa Posted August 31, 2008 Author Share Posted August 31, 2008 lol then how I show again the icon? Link to comment Share on other sites More sharing options...
Bowmore Posted August 31, 2008 Share Posted August 31, 2008 (edited) lol then how I show again the icon?This will work provided you don't have the show hidden files option enabled in Explorer for the Desktop folder. Hide FileSetAttrib ( @DesktopDir & "\Your desktop Shortcut.lnk ", "+H" )oÝ÷ Ù(hÁ«¢+Ù¥±MÑÑÑÉ¥ ÍѽÁ¥ÈµÀìÅÕ½ÐìÀäÈíe½ÕÈÍѽÀM¡½ÉÑÕй±¹¬ÅÕ½Ðì°ÅÕ½Ðìµ ÅÕ½Ðì Edit:Added missing & Edited August 31, 2008 by Bowmore "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."- Rick Cook Link to comment Share on other sites More sharing options...
oMBRa Posted August 31, 2008 Author Share Posted August 31, 2008 U missed "&" between @DesktopDir and "\Your desktop Shortcut.lnk "... Though how to change temporaney the option "show hidden files "... editing the registry? Link to comment Share on other sites More sharing options...
Zedna Posted August 31, 2008 Share Posted August 31, 2008 lol then how I show again the icon?_GUICtrlListView_InsertItem() Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
oMBRa Posted August 31, 2008 Author Share Posted August 31, 2008 (edited) I found another way ( I dunno how it is possibile )... if I do: $HwNd = ControlGetHandle("Program Manager", "FolderView", "[ClassNN:SysListView321]") $iNdex = _GUICtrlListView_FindInText($HwNd, "MyIcon") _GUICtrlListView_DeleteItem($HwNd, $iNdex) then My icon will be deleted... but then if I do $HwNd = ControlGetHandle("Program Manager", "FolderView", "[ClassNN:SysListView321]") $iNdex = _GUICtrlListView_FindInText($HwNd, "MyIcon") it will reappear!! Edited August 31, 2008 by oMBra Link to comment Share on other sites More sharing options...
oMBRa Posted September 1, 2008 Author Share Posted September 1, 2008 that way dsnt work so good, I have to run again the script... so Zedna can u post a example of how to use _GUICtrlListView_DeleteItem() to hide an icon on the dekstop and to show it again with _GUICtrlListView_InsertItem() ? Link to comment Share on other sites More sharing options...
Zedna Posted September 1, 2008 Share Posted September 1, 2008 (edited) that way dsnt work so good, I have to run again the script... so Zedna can u post a example of how to use _GUICtrlListView_DeleteItem() to hide an icon on the dekstop and to show it again with _GUICtrlListView_InsertItem() ? Your previous code: $HwNd = ControlGetHandle("Program Manager", "FolderView", "[ClassNN:SysListView321]") $iNdex = _GUICtrlListView_FindInText($HwNd, "MyIcon") _GUICtrlListView_DeleteItem($HwNd, $iNdex) is right. And about _GUICtrlListView_InsertItem() - just look into AutoIt helpfile how to call this function. I can't help you more. Edited September 1, 2008 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
oMBRa Posted September 1, 2008 Author Share Posted September 1, 2008 Then I did _GUICtrlListView_InsertItem($HwNd, "MyIcon", -1, -1)... But it displays a strange icon and if a double click on it opens a folder called "desktop" that countains all my desktop's icons... but I dunno hot to show MyIcon again... any suggest? Link to comment Share on other sites More sharing options...
Zedna Posted September 1, 2008 Share Posted September 1, 2008 (edited) I think you must: on hide: - remember position of your icon on desktop - delete shortcut in desktop directory - refresh desktop on show: - create shortcut in desktop directory - refresh desktop - recover icon position on desktop Edited September 1, 2008 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search 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