Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • September 01, 2015, 07:19:22 PM
  • Proudly celebrating 10 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 16978 times)

DocSavage

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 62
  • Legend in my own mind
    • View Profile
    • Donate to Member
programing mouse buttons for FARR
« on: February 25, 2008, 09:06:42 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,218
    • View Profile
    • Coding Snacks by Lanux128
    • Donate to Member
Re: programing mouse buttons for FARR
« Reply #1 on: February 25, 2008, 09:28:46 PM »
assuming you had installed Farr in "C:\Program Files\DonationCoder\Farr", the following should be ok. also check this thread for more examples.

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

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 34,976
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Donate to Member
Re: programing mouse buttons for FARR
« Reply #2 on: February 25, 2008, 10:31:19 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,218
    • View Profile
    • Coding Snacks by Lanux128
    • Donate to Member
Re: programing mouse buttons for FARR
« Reply #3 on: February 25, 2008, 10:56:11 PM »
re-reading the 1st post that seems the case. anyway, here's the modified version.

Code: [Select]
; 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: 34,976
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Donate to Member
Re: programing mouse buttons for FARR
« Reply #4 on: February 25, 2008, 11:07:25 PM »
nice  8)

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

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,218
    • View Profile
    • Coding Snacks by Lanux128
    • Donate to Member
Re: programing mouse buttons for FARR
« Reply #5 on: February 25, 2008, 11:26:25 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
    • Donate to Member
Re: programing mouse buttons for FARR
« Reply #6 on: February 27, 2008, 04:59:49 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,218
    • View Profile
    • Coding Snacks by Lanux128
    • Donate to Member
Re: programing mouse buttons for FARR
« Reply #7 on: February 27, 2008, 07:42:34 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
    • Donate to Member
Re: programing mouse buttons for FARR
« Reply #8 on: February 27, 2008, 10:33:21 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,708
    • View Profile
    • Donate to Member
Re: programing mouse buttons for FARR
« Reply #9 on: March 22, 2008, 04:53:42 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:44 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,708
    • View Profile
    • Donate to Member
Re: programing mouse buttons for FARR
« Reply #11 on: March 22, 2008, 05:14:33 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,218
    • View Profile
    • Coding Snacks by Lanux128
    • Donate to Member
Re: programing mouse buttons for FARR
« Reply #12 on: March 22, 2008, 10:04:14 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,708
    • View Profile
    • Donate to Member
Re: programing mouse buttons for FARR
« Reply #13 on: March 23, 2008, 12:32:59 AM »
Thanks!  :)

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,218
    • View Profile
    • Coding Snacks by Lanux128
    • Donate to Member
Re: programing mouse buttons for FARR
« Reply #14 on: March 23, 2008, 03:56:16 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,708
    • View Profile
    • Donate to Member
Re: programing mouse buttons for FARR
« Reply #15 on: March 24, 2008, 01:23:04 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,218
    • View Profile
    • Coding Snacks by Lanux128
    • Donate to Member
Re: programing mouse buttons for FARR
« Reply #16 on: March 24, 2008, 01:31:09 AM »
sorry mate, i "forced" a confession out of you.. i feel really, really bad.. :D

Armando

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