DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: programing mouse buttons for FARR  (Read 31,156 times)

DocSavage

  • Legend in my own mind
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 62
programing mouse buttons for FARR
« on: February 26, 2008, 03:06 AM »
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
    • Coding Snacks
    • Volunteers/Staff
    • Gathering Badge
    • Participated in NANY Challenge Once
    • Linux User
Re: programing mouse buttons for FARR
« Reply #1 on: February 26, 2008, 03:28 AM »
assuming you had installed Farr in "C:\Program Files\DonationCoder\Farr", the following should be ok. also check this thread for more examples.

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

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,931
    • Gathering Badge
    • Plugin Coding Medal
    • Participated in NANY Challenge Seventeen Times
    • Cody Award
    • Coding Snacks
    • Volunteers/Staff
Re: programing mouse buttons for FARR
« Reply #2 on: February 26, 2008, 04:31 AM »
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
    • Coding Snacks
    • Volunteers/Staff
    • Gathering Badge
    • Participated in NANY Challenge Once
    • Linux User
Re: programing mouse buttons for FARR
« Reply #3 on: February 26, 2008, 04:56 AM »
re-reading the 1st post that seems the case. anyway, here's the modified version.

Code
; 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,931
    • Gathering Badge
    • Plugin Coding Medal
    • Participated in NANY Challenge Seventeen Times
    • Cody Award
    • Coding Snacks
    • Volunteers/Staff
Re: programing mouse buttons for FARR
« Reply #4 on: February 26, 2008, 05:07 AM »
nice  8)

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

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • Coding Snacks
    • Volunteers/Staff
    • Gathering Badge
    • Participated in NANY Challenge Once
    • Linux User
Re: programing mouse buttons for FARR
« Reply #5 on: February 26, 2008, 05:26 AM »
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

  • Legend in my own mind
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 62
Re: programing mouse buttons for FARR
« Reply #6 on: February 27, 2008, 10: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
    • Coding Snacks
    • Volunteers/Staff
    • Gathering Badge
    • Participated in NANY Challenge Once
    • Linux User
Re: programing mouse buttons for FARR
« Reply #7 on: February 28, 2008, 01:42 AM »
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

  • Legend in my own mind
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 62
Re: programing mouse buttons for FARR
« Reply #8 on: February 28, 2008, 04:33 AM »
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
    • Coding Snacks
Re: programing mouse buttons for FARR
« Reply #9 on: March 22, 2008, 09: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:
"I suppose it can be said that I'm an absent-minded driver. It's true that I've driven through a number of red lights on occasion, but on the other hand, I've stopped at a lot of green ones but never gotten credit for it."
Glenn Gould

yksyks

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 476
Re: programing mouse buttons for FARR
« Reply #10 on: March 22, 2008, 10: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
    • Coding Snacks
Re: programing mouse buttons for FARR
« Reply #11 on: March 22, 2008, 10:14 PM »
(yksyks : actually, I'm not really using my mouse, but Lanux's script gave me another idea... )
"I suppose it can be said that I'm an absent-minded driver. It's true that I've driven through a number of red lights on occasion, but on the other hand, I've stopped at a lot of green ones but never gotten credit for it."
Glenn Gould

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • Coding Snacks
    • Volunteers/Staff
    • Gathering Badge
    • Participated in NANY Challenge Once
    • Linux User
Re: programing mouse buttons for FARR
« Reply #12 on: March 23, 2008, 03:04 AM »
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
    • Coding Snacks
Re: programing mouse buttons for FARR
« Reply #13 on: March 23, 2008, 05:32 AM »
Thanks!  :)
"I suppose it can be said that I'm an absent-minded driver. It's true that I've driven through a number of red lights on occasion, but on the other hand, I've stopped at a lot of green ones but never gotten credit for it."
Glenn Gould

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • Coding Snacks
    • Volunteers/Staff
    • Gathering Badge
    • Participated in NANY Challenge Once
    • Linux User
Re: programing mouse buttons for FARR
« Reply #14 on: March 23, 2008, 08: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
    • Coding Snacks
Re: programing mouse buttons for FARR
« Reply #15 on: March 24, 2008, 06: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...)  :-[
"I suppose it can be said that I'm an absent-minded driver. It's true that I've driven through a number of red lights on occasion, but on the other hand, I've stopped at a lot of green ones but never gotten credit for it."
Glenn Gould

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • Coding Snacks
    • Volunteers/Staff
    • Gathering Badge
    • Participated in NANY Challenge Once
    • Linux User
Re: programing mouse buttons for FARR
« Reply #16 on: March 24, 2008, 06: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
    • Coding Snacks
Re: programing mouse buttons for FARR
« Reply #17 on: March 24, 2008, 06:35 AM »
"I suppose it can be said that I'm an absent-minded driver. It's true that I've driven through a number of red lights on occasion, but on the other hand, I've stopped at a lot of green ones but never gotten credit for it."
Glenn Gould

Original address: https://www.donationcoder.com/forum/index.php?topic=12468.0