AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

double click start button to launch windows explorer

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
jak



Joined: 28 Feb 2006
Posts: 116

PostPosted: Sun Aug 24, 2008 10:58 am    Post subject: double click start button to launch windows explorer Reply with quote

So I came up with the great idea of double clicking the start button in winxp to launch windows explorer (or anything else the user may want). Went to write a script - and realized I have no idea how to capture a double click of the start button! Razz
Can anyone help?
Back to top
View user's profile Send private message
poo_noo



Joined: 08 Dec 2006
Posts: 137
Location: Sydney Australia

PostPosted: Sun Aug 24, 2008 11:30 am    Post subject: Reply with quote

this sort of works ( but only on the 2nd double click so I have messed something up). It might get you started. It is based on [VxE]'s version of the Double-click Hotkey
Code:
~*LButton:: ; [VxE]'s version of the Double-click Hotkey
SetTimer, ResetLButton, % "-" DllCall("GetDoubleClickTime")
Hotkey, ~*LButton, DblLButton, on
return
DblLButton:
   {
   ;msgbox You double-clicked!
   ControlGetFocus, focused, ahk_class Shell_TrayWnd
   if focused=Button1 ; this is the control name for the start button ?
      {
      ;msgbox %focused%
      Run ::{20d04fe0-3aea-1069-a2d8-08002b30309d} ; my computer
      Run ::{450d8fba-ad25-11d0-98a8-0800361b1103} ; my documents
      }
   else
      {
      ;msgbox %focused%
      return
      }
   }
ResetLButton:
   Hotkey, ~*LButton, ~*LButton, on
return

_________________
Paul O
Back to top
View user's profile Send private message Visit poster's website
Serenity



Joined: 07 Nov 2004
Posts: 1276

PostPosted: Sun Aug 24, 2008 11:40 am    Post subject: Reply with quote

Code:
~lbutton::
mousegetpos,,, wid, control
wingetclass, wclass, ahk_id %wid%
if (A_PriorHotkey = "~LButton" && A_TimeSincePriorHotkey < 400) ; double click
{
   if (wclass = "Shell_TrayWnd" && control = "Button1") ; start         
      run, explorer /e`, %location%
}   
return

_________________
"Anything worth doing is worth doing slowly." - Mae West
Back to top
View user's profile Send private message Visit poster's website
jak



Joined: 28 Feb 2006
Posts: 116

PostPosted: Mon Aug 25, 2008 4:31 am    Post subject: Reply with quote

thanks! Awesome! Very Happy
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group