AutoHotkey Community

It is currently May 26th, 2012, 9:09 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 12 posts ] 
Author Message
PostPosted: February 25th, 2009, 9:47 pm 
Offline

Joined: February 24th, 2006, 10:19 pm
Posts: 108
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 25th, 2009, 11:31 pm 
Offline
User avatar

Joined: December 26th, 2005, 4:40 pm
Posts: 8776
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
StartEx - Portable Shortcut Link


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 26th, 2009, 12:13 am 
Offline

Joined: February 8th, 2009, 5:52 pm
Posts: 47
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 26th, 2009, 12:43 am 
what is
Code:
Run, ping,, min
supposed to do?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 26th, 2009, 1:07 am 
Offline
User avatar

Joined: December 26th, 2005, 4:40 pm
Posts: 8776
Used as Sleep in Batch files


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 26th, 2009, 8:32 pm 
Offline
User avatar

Joined: September 8th, 2008, 12:26 am
Posts: 1048
Location: Ploieşti, RO
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 (AHK 1.0.48.05 and Win98SE)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 21st, 2009, 2:26 pm 
Offline

Joined: March 21st, 2009, 2:20 pm
Posts: 1
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 3rd, 2009, 9:55 am 
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


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: December 10th, 2009, 2:50 am 
Offline

Joined: December 10th, 2009, 2:36 am
Posts: 1
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).


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 3rd, 2011, 4:08 am 
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. :D

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.


Report this post
Top
  
Reply with quote  
PostPosted: April 7th, 2012, 11:16 am 
Offline

Joined: April 7th, 2012, 11:08 am
Posts: 2
Location: East Barnet (north London)
Hi there,

Thank you for the script which works to hide the icons, but unfortunately it does not hide the Fences...

Is this possible?


Report this post
Top
 Profile  
Reply with quote  
PostPosted: April 7th, 2012, 11:20 am 
Offline

Joined: April 7th, 2012, 11:08 am
Posts: 2
Location: East Barnet (north London)
I've just realised that I need to double-click a second time to hide the Fences.

Many thanks again for the help with the script. :D


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: BrandonHotkey, Exabot [Bot], krajan, patgenn123 and 59 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group