Jump to content

Recommended Posts

Posted (edited)

oMBra

Why not just move icon from desktop folder to a temp folder, then if need move back?

Edited by rasim
Posted

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?

Posted (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 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

Posted

U missed "&" between @DesktopDir and "\Your desktop Shortcut.lnk "... Though how to change temporaney the option "show hidden files "... editing the registry?

Posted (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 by oMBra
Posted

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() ?

Posted (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 by Zedna
Posted

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?

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
×
×
  • Create New...