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 

Hover Mouse Over File's Icon Action Question
Goto page Previous  1, 2
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
System_7_Fan
Guest





PostPosted: Sat Nov 21, 2009 12:41 am    Post subject: Reply with quote

I am not an expert at it but this is the script I have so far as to demonstrate.
Code:
#NoEnv
#Persistent
#SingleInstance Force
SetTitleMatchMode 3
SetTitleMatchMode Fast

Loop,
{
  MouseGetPos,,,ID,NN
  WinGetClass,c,ahk_id %ID%
If (c="Progman" AND NN="SysListView321") OR (c="CabinetWClass" AND NN="SysListView321")
  Hotkey,*LButton,L1,On
Else If ! (c="Progman" AND NN="SysListView321") OR (c="Progman" AND NN="Edit1") OR (c="CabinetWClass" AND NN="SysListView321") OR (c="CabinetWClass" AND NN="Edit4")
  Hotkey,*LButton,L0,Off
} Return

L1:
  Hotkey,*LButton,Off
If (A_PriorHotKey=A_ThisHotKey AND A_TimeSincePriorHotkey<300)
  Click 2
Else
  Click
Return

L0:
  Hotkey,*LButton,On
Return

MButton::
  MouseGetPos,,,ID2,NN2
  WinGetClass,c2,ahk_id %ID2%
If (c2="Progman") OR (c2="CabinetWClass" AND NN2="SysListView321") {
  GetKeyState, SL, MButton, P
If SL=D
 {
   Send {LButton Down}
   KeyWait MButton, U T0.35
If ErrorLevel {
   KeyWait MButton, U
   Send {LButton Up}
  }
Else
  KeyWait MButton, D
  Send {LButton Up}
Return
 }
} Return

On running my script try the left click and drag, which is blocked. But you can still double click to open a file.
Now use MButton to drag a file by either click and release then drag OR clcik and drag then release.

The only thing I'm baffled is how to block a LButton slow double click on a file from prompting an edit on a file name.
Back to top
System_7_Fan
Guest





PostPosted: Sat Nov 21, 2009 12:44 am    Post subject: Reply with quote

BTW... i forgot to mention that in my script the LButton still has the ussual access to everything else other than icons. I'm still yet to also add the same for the MButton... althought this is not always needed.
Back to top
System_7_Fan
Guest





PostPosted: Sat Nov 21, 2009 1:03 am    Post subject: Reply with quote

I forgot to say remove "Edit1" and "Edit4' from my script... this is actually a script I wrote some time ago and these oppose what i am after.
Back to top
System_7_Fan
Guest





PostPosted: Sat Nov 21, 2009 1:34 am    Post subject: Reply with quote

This is one I made roughly but doesnt contain direct acces to everything as LButton should. If someone wants to add it to this go right ahead as I'd be more than happy.

Click LButton on file and hold to get a tooltip and the rest is fairly self explanatory.

In this script I resorted to scrictly using LButton (MButton is not used as previous)

Code:
#NoEnv
#Persistent
#SingleInstance force
coordmode, mouse, screen

M_PIXELS = 5  ;no of pixels to trigger mouse movement

mousegetpos, sx, sy
return



#IfWinActive, ahk_class Progman
LButton::
{
IfWinActive, ahk_class Progman
KeyWait LButton, U T0.3
If ErrorLevel
{
ToolTip, Have It!
Send {LButton Down}
SetTimer, KillToolTip, 1000
KeyWait LButton, U T0.5
If ErrorLevel
{
KeyWait LButton, U
Send {LButton Up}
Return
}
Else
KeyWait LButton, D
Send {LButton Up}
Return
}
Else
IfWinNotActive, ahk_class Progman
Return
}
Return
#IfWinActive

KillToolTip:
SetTimer, KillToolTip, Off
ToolTip
Return
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
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