Feb 15, 2010

A4Tech X710F 3XFire To 2XFire (X7 Triple click to double click)

I work(.Net) with an A4Tech X7 mouse (X710F). It is useful for programming because it has programmable side buttons. I use theese for copy and paste. (much more faster than Ctrl+C - Ctrl+V)
It has a nice 3Xfire button which is a fun but it is good-for nothing. It should useful if it would be a double click button. Because double click on a word == select word. Unfortunately it is not reprogrammable from built in driver software. I scanned google, forums and everywhere without any luck to find something to change this. Finally I found a very useful program:
http://www.autohotkey.com/
I read a lot from it's help and checked forums but I can't found solution to reduce number of click, so I tried to research my own algorythm :). After a lot of buggy version i found the solution which works always for me.
(the only little problem with it is in total commander left click on a file. It has to be changed to windows method in TC settings)
Here is the final version of AHK script (after a lot of hours spent to solve this little trick :) ):
LButton::
   if (First = 0)
   {
      Clicks := 0
      First := 1
   }
   If (A_ThisHotkey = A_PriorHotkey)
   {
      If (A_TimeSincePriorHotkey <= 157 && A_TimeSincePriorHotkey > 122)
      {
         If (Clicks = 0)
         {
             Clicks := 1
         }
         else
         {
             Clicks := 0
             Return
         }
      }
      else
      {
         Clicks := 0
      }
   }
   else
   {
      Clicks := 0      
   }
   Click Down
   KeyWait, LButton
   Click Up
Return

It is a small script but it was not as easy as it looks like. I tried with tilde, timers, in every combination, but this works :). I have a double click button :).
(maybe I am stupid because I am happy with this).
While finding this solution i added some other useful programming speed-up trick to AHK script. 
Just an idea: left Click + Left mouse move: Cut selected text. 
I hope You found this useful.


P.S. I found that there are some new a4Tech Product on market which seems to be better for programming than this one: A4-Tech K5-52D 16in1 I think it is programmable for double click function, and it has built in mouse "gestures" function.

Introduction

Hi.

I'm Imre Telek and this is my first English Blog. My mother language is hungarian and I am not the best in english so sorry for the mistakes :).
This is a technical blog. I will write PC related posts mostly.
I am a computer programmer (ASP.Net, C#, ASP, little C++, assembly, etc.). I like science, programming, digital cameras, etc.

I hope you will enjoy my Blog.