 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
IconBoy
Joined: 24 Feb 2006 Posts: 106
|
Posted: Wed Feb 25, 2009 8:47 pm Post subject: Double-click desktop to hide icons |
|
|
I was trying Stardocks Fences program and if you double click on the desktop, the icons hide/unhide.
Instead of installing a program for this (and other features), is there an AHK script that will accomplish this for me please?
Thanks very much. |
|
| Back to top |
|
 |
SKAN
Joined: 26 Dec 2005 Posts: 8688
|
Posted: Wed Feb 25, 2009 10:31 pm Post subject: |
|
|
| Code: | ^#d::PostMessage,0x111,28755,,,ahk_class Progman
~LButton::
If ( A_PriorHotKey = A_ThisHotKey && A_TimeSincePriorHotkey < 400 ) {
WinGetClass, Class, A
If Class in Progman,WorkerW
SetTimer, ToggleDesktopIcons, -50
}
Return
ToggleDesktopIcons:
WinActivate, ahk_class Progman
ControlGet, Selected, List, Selected, SysListView321, ahk_class Progman
IfEqual,Selected,,PostMessage,0x111,28755,,,ahk_class Progman
Return |
Tested ony in XP. If Double-Click-On-Desktop does not work for you, you may use the Hotkey Ctrl+Win+d
You need to Double-Click on the empty area of the desktop, which is the intended feature. _________________ URLGet - Internet Explorer based Downloader |
|
| Back to top |
|
 |
firace
Joined: 08 Feb 2009 Posts: 28
|
Posted: Wed Feb 25, 2009 11:13 pm Post subject: |
|
|
I have taken SKAN's script above and replaced "toggledesktopicons"
with a variant that should do the job with less delay:
| Code: |
~LButton::
If ( A_PriorHotKey = A_ThisHotKey && A_TimeSincePriorHotkey < 400 ) {
WinGetClass, Class, A
If Class in Progman,WorkerW
SetTimer, ToggleDesktopIcons, -50
}
Return
ToggleDesktopIcons:
var := (flag=0)? "Show" : "Hide"
flag := !flag
Run, ping,, min
WinExist("ahk_class Progman")
Control,%var%,, SysListView321
Return |
|
|
| Back to top |
|
 |
Z_Gecko Guest
|
Posted: Wed Feb 25, 2009 11:43 pm Post subject: |
|
|
| what is supposed to do? |
|
| Back to top |
|
 |
SKAN
Joined: 26 Dec 2005 Posts: 8688
|
Posted: Thu Feb 26, 2009 12:07 am Post subject: |
|
|
| Used as Sleep in Batch files |
|
| Back to top |
|
 |
Drugwash
Joined: 07 Sep 2008 Posts: 921 Location: Ploiesti, RO
|
Posted: Thu Feb 26, 2009 7:32 pm Post subject: |
|
|
SKAN's script won't work in Win98SE. lazygeek's does, but only for hiding icons; they won't get restored until right-click > Refresh on desktop.
And as we know, the tilde (~) is ignored on 9x systems but looks like neither simple LButton/MButton are not read for me.
No big deal, just sayin'. _________________ AHK tools by Drugwash |
|
| Back to top |
|
 |
qweru
Joined: 21 Mar 2009 Posts: 1
|
Posted: Sat Mar 21, 2009 1:26 pm Post subject: |
|
|
| lazygeek's script is fast but unfortunately it hides the icons even when i open folders on desktop or double click on icons can you fix it somehow? thanks |
|
| Back to top |
|
 |
Coeluh Guest
|
Posted: Fri Jul 03, 2009 8:55 am Post subject: |
|
|
| qweru wrote: | | lazygeek's script is fast but unfortunately it hides the icons even when i open folders on desktop or double click on icons can you fix it somehow? thanks |
|
|
| Back to top |
|
 |
legionliu
Joined: 10 Dec 2009 Posts: 1
|
Posted: Thu Dec 10, 2009 1:50 am Post subject: |
|
|
| qweru wrote: | | lazygeek's script is fast but unfortunately it hides the icons even when i open folders on desktop or double click on icons can you fix it somehow? thanks |
yes i have the same problem. icons was hided when double click on icons and icons can not be displayed when double click the area icons should be placed (in the case of icons have already been hided). |
|
| Back to top |
|
 |
SDRapha Guest
|
Posted: Mon Jan 03, 2011 3:08 am Post subject: |
|
|
I've had some different problems from you guys, like needing to click six times or more to show/hide the icons.
I've made a few changes in the above code, now it's working fine to me in Win7.
| Code: |
~LButton::
If ( A_PriorHotKey = A_ThisHotKey && A_TimeSincePriorHotkey < 400 ) {
WinGetClass, Class, A
If Class in Progman,WorkerW
var := (flag=0) ? "Show" : "Hide"
flag := !flag
Control,%var%,, SysListView321, ahk_class Progman
Control,%var%,, SysListView321, ahk_class WorkerW
}
Return
|
And about the double clicking the icon and everythings get hidden, it's a nice feature for me, maybe you can substitute the double click with a middle button click if you don't want to this happen. |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|