topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Sunday December 15, 2024, 7:03 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: programing mouse buttons for FARR  (Read 27707 times)

DocSavage

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 62
  • Legend in my own mind
    • View Profile
    • Read more about this member.
    • Donate to Member
programing mouse buttons for FARR
« on: February 25, 2008, 09:06 PM »
I am trying to program a mouse center center button (wheel) to open FARR. Can you tell me the instruction? pointing to .exe starts a new instance. in the keystroke mode, it only accepts modifier (alt, cntrl, etc) & a standard key.
From believing in Santa to not believing in Santa, from being Santa to looking like Santa, I will never be younger than I am today!

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
Re: programing mouse buttons for FARR
« Reply #1 on: February 25, 2008, 09:28 PM »
assuming you had installed Farr in "C:\Program Files\DonationCoder\Farr", the following should be ok. also check this thread for more examples.

MButton::Run, C:\Program Files\DonationCoder\Farr\FindAndRunRobot.exe


mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: programing mouse buttons for FARR
« Reply #2 on: February 25, 2008, 10:31 PM »
lanux, i think he means a mouse wheel to bring up FARR from tray, rather than run it when its not running.  i.e. just trigger the FARR hotkey.

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
Re: programing mouse buttons for FARR
« Reply #3 on: February 25, 2008, 10:56 PM »
re-reading the 1st post that seems the case. anyway, here's the modified version.

; This script is to bring up Farr window via mouse
; Source: hxxp://www.donationcoder.com/forum/index.php?topic=2812.msg58794#msg58794

#SingleInstance, force
#NoTrayIcon
;Set path here
Farr_exe=%ProgramFiles%\DonationCoder\Farr\FindAndRunRobot.exe

MButton::
Process, Exist,FindAndRunRobot.exe
If ErrorLevel <> 0
  Send, {Pause}     ;'Pause' key is the default
Else
  {
  Run,%Farr_exe% -tray
  Sleep, 1000
  Send, {Pause}
  }
Return

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: programing mouse buttons for FARR
« Reply #4 on: February 25, 2008, 11:07 PM »
nice  8)

i'll add this to my list of permanently useful FARR stuff.

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
Re: programing mouse buttons for FARR
« Reply #5 on: February 25, 2008, 11:26 PM »
nice  8)

i'll add this to my list of permanently useful FARR stuff.
thanks, mouser! 8) but i just noticed that this script takes over the middle mouse-button. so a better alternative would be to use an additional key/button to trigger. so, change MButton:: to either one of the below.

• ~MButton & RButton::      ;Hold the middle button then right-click
• !MButton::                     ;Hold the Alt key while middle-clicking

DocSavage

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 62
  • Legend in my own mind
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: programing mouse buttons for FARR
« Reply #6 on: February 27, 2008, 04:59 PM »
You are correct that I want to press the middle button (wheel) down to bring up FARR from the tray instance.
Thanks for the responses guys, but I'm not a programer. Can you tell me where to paste this script? Looks like it should go somewhere in the mouse instruction. Or in Win32? Does it go somewhere in the FARR code? If so, how do I get it in there?
Forgive me my lack of knowledge.
From believing in Santa to not believing in Santa, from being Santa to looking like Santa, I will never be younger than I am today!

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
Re: programing mouse buttons for FARR
« Reply #7 on: February 27, 2008, 07:42 PM »
the long version is you have to download & install AutoHotKey then copy the above code and save it as <whatevername>.ahk and execute this ahk file. the shorter version is to download the attached file and start using the middle-mouse button to call up Farr. ;)

P.S. Use Win+x to exit the script.

DocSavage

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 62
  • Legend in my own mind
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: programing mouse buttons for FARR
« Reply #8 on: February 27, 2008, 10:33 PM »
I just did & it works perfectly!
From believing in Santa to not believing in Santa, from being Santa to looking like Santa, I will never be younger than I am today!

Armando

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,727
    • View Profile
    • Donate to Member
Re: programing mouse buttons for FARR
« Reply #9 on: March 22, 2008, 04:53 PM »
Lanux : I want to do the same thing but map it to ctrl+pause (or ctrl+break). I'm writing send, ^{pause} but it doesn't work.  :huh:

yksyks

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 476
    • View Profile
    • Donate to Member
Re: programing mouse buttons for FARR
« Reply #10 on: March 22, 2008, 05:04 PM »
You can use HotkeyP to redefine the middle-click to Break key. Just tried it, it works, but IMHO using mouse is against FARR idea, isn't it?

Armando

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,727
    • View Profile
    • Donate to Member
Re: programing mouse buttons for FARR
« Reply #11 on: March 22, 2008, 05:14 PM »
(yksyks : actually, I'm not really using my mouse, but Lanux's script gave me another idea... )

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
Re: programing mouse buttons for FARR
« Reply #12 on: March 22, 2008, 10:04 PM »
Lanux : I want to do the same thing but map it to ctrl+pause (or ctrl+break). I'm writing send, ^{pause} but it doesn't work.

Armando, do you want to send ctrl+pause upon middle-clicking? if that is so, try {CtrlBreak} instead. :)

Armando

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,727
    • View Profile
    • Donate to Member
Re: programing mouse buttons for FARR
« Reply #13 on: March 23, 2008, 12:32 AM »
Thanks!  :)

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
Re: programing mouse buttons for FARR
« Reply #14 on: March 23, 2008, 03:56 AM »
(yksyks : actually, I'm not really using my mouse, but Lanux's script gave me another idea... )

you're welcome and btw, what is this idea you mentioned earlier? just curious. ;)

Armando

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,727
    • View Profile
    • Donate to Member
Re: programing mouse buttons for FARR
« Reply #15 on: March 24, 2008, 01:23 AM »
Oh... nothing special Lanux, really.  :-[ ... Don't force me to say it... OK, I give up : it just gave me the (very simplistic) idea to remap my farr hotkey to the "menu" key I never use. On my laptop the "break" key is not exactly convenient to hit, and I tend to use ctr+space or alt+space  for other purposes (like selecting item in my SQLNotes Grids...)  :-[

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
Re: programing mouse buttons for FARR
« Reply #16 on: March 24, 2008, 01:31 AM »
sorry mate, i "forced" a confession out of you.. i feel really, really bad.. :D

Armando

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,727
    • View Profile
    • Donate to Member
Re: programing mouse buttons for FARR
« Reply #17 on: March 24, 2008, 01:35 AM »