|
jgpaiva
|
 |
« on: March 16, 2006, 03:10:15 PM » |
|
Since farr still doesn't have internal commands, i made this small script for myself, and decided to post it here. Using ctrl+space to bring up farr can be a problem, for example, the selection in emacs won't work, since it's bound to that same key, and also, you can't select various items in explorer, by pressing ctrl+space. I configure it like this: Add it to farr's directory of scripts. Then, when i want to use ctrl+space, i press ctrl+space to bring up farr, and i type exit[enter], to execute this script. The script closes farr, and keeps itself in the tray. It creates a hotkey, so that when i press [windows key]+F, it runs farr, and exits. It's just an easy way of being able to use ctrl+space, and still be able to call farr up real fast again, since farr is all about speed and productivity  (.ahk file attached, .rar contains .ahk and .exe)
|
exit.ahk (0.51 KB - downloaded 298 times.)
exit.rar (177.24 KB - downloaded 307 times.)
|
|
|
Logged
|
|
|
|
|
kfitting
|
 |
« Reply #1 on: March 16, 2006, 04:26:17 PM » |
|
This does not make your script null and void, but what about alt-space and pause/break? I have never used ctrl-space... also, I know mouser has a hotkey control in CHS, he could probably add it to FARR if you wanted more configurability.
But, at the end of the day, if your script does what you want, use it!
Kevin
|
|
|
|
|
Logged
|
|
|
|
|
jgpaiva
|
 |
« Reply #2 on: March 16, 2006, 05:36:26 PM » |
|
 kfitting that's not the issue. I don't like to use pause (it's too far  ), and alt+space has a strange focus behaviour. I do like to use ctrl+space, but sometimes, i just want to disable it, that's what this script is for  I just execute "exit", and when i want to use farr again, i press ctrl+f 
|
|
|
|
|
Logged
|
|
|
|
|
|
lanux128
|
 |
« Reply #3 on: April 24, 2007, 12:15:35 AM » |
|
jgpaiva, thanks for pointing out this thread for the request i made here. btw, for portability reasons, i've made some changes and i hope you don't mind.  and i've also made another script that brings Farr to the front when using the mouse (i use this as a link in Launchbar Commander).. ; Original Script by jgpaiva from DonationCoder ; To close Farr, call this script inside Farr ; Useful when updating Farr, Win+F to open Farr ; Source: hxxp://www.donationcoder.com/forum/index.php?topic=2812.0 ; #singleinstance,force #persistent ;Set path here Farr_exe=%ProgramFiles%\FindAndRunRobot\FindAndRunRobot.exe
hotkey,#f,findandrun Process, exist,findandrunrobot.exe if errorlevel <> 0 Process,close,findandrunrobot.exe return
findandrun: Run,%Farr_exe% -tray ExitApp ; This script is to bring up Farr window via mouse ; Useful when in 'click' mode.. ;-) ; Source: hxxp://www.donationcoder.com/forum/index.php?topic=2812.0
#SingleInstance, force #NoTrayIcon ;Set path here Farr_exe=%ProgramFiles%\FindAndRunRobot\FindAndRunRobot.exe
Process, Exist,FindAndRunRobot.exe If ErrorLevel <> 0 Send, {Pause} ;'Pause' key is the default Else { Run,%Farr_exe% -tray Sleep, 1000 Send, {Pause} } Return
|
|
|
|
|
Logged
|
|
|
|
|
tomos
|
 |
« Reply #4 on: April 24, 2007, 05:45:07 AM » |
|
 just in case you didn't notice there Lanux, you're up at 999 posts - if you havent posted since, theres a thread somewhere for the 1,000th post insnt there?
|
|
|
|
|
Logged
|
|
|
|
|
tomos
|
 |
« Reply #5 on: April 24, 2007, 05:48:29 AM » |
|
but what i really wanted to say was to ask - how you use the second script - i mean what do you do with mouse !? ah, i see theres a link in there, I'll check that out EDIT: link is for here 
|
|
|
|
|
Logged
|
|
|
|
|
lanux128
|
 |
« Reply #6 on: April 24, 2007, 09:34:14 PM » |
|
thanks tomos, i've already updated here.. as for the 2nd script, if you have AHK, copy & save the script then drag-n-drop the script onto LC (see pic) or drop on desktop to create a shortcut.. or you can compile into a EXE then use as a program..  
|
|
|
|
|
Logged
|
|
|
|
|
lanux128
|
 |
« Reply #7 on: August 15, 2008, 01:03:47 AM » |
|
reviving an old thread. recently i had to experiment with some of the Farr's commands which required me to exit and restart Farr. after doing this for a while, i just hit my head and modified the Farr-exit script above to restart Farr instead. hope someone finds this helpful. [ copy or print] ; Original Script by jgpaiva from DonationCoder ; Restarts Farr with a delay of 15 seconds ; #Persistent #SingleInstance force #NoEnv #NoTrayIcon Farr_exe=%ProgramFiles%\FindAndRunRobot\FindAndRunRobot.exe Process, Exist, FindAndRunRobot.exe If ErrorLevel <> 0 { Process, Close, FindAndRunRobot.exe ToolTip, Farr is being closed and will be restarted in 15 seconds. Sleep, 15000 ;modify the delay here 1000 = 1 sec. Run,%Farr_exe% -tray } ToolTip ;remove ToolTip ExitApp Return
|
|
|
|
Logged
|
|
|
|
|
CleverCat
|
 |
« Reply #8 on: October 05, 2008, 09:08:34 AM » |
|
Can this be used after FARR has already crashed?
|
|
|
|
« Last Edit: October 05, 2008, 09:22:11 AM by CleverCat »
|
Logged
|
If you need help - JUST ASK!
|
|
|
|
jgpaiva
|
 |
« Reply #9 on: October 05, 2008, 10:55:52 AM » |
|
CleverCat: you mean use this so that farr will come back when it crashes?
Currently, Exit.ahk only launches farr and then goes away until you start it again, so the answer would be no..
|
|
|
|
|
Logged
|
|
|
|
|
CleverCat
|
 |
« Reply #10 on: October 06, 2008, 08:20:27 AM » |
|
Okay... 
|
|
|
|
|
Logged
|
If you need help - JUST ASK!
|
|
|
|
lanux128
|
 |
« Reply #11 on: October 07, 2008, 12:00:35 AM » |
|
Can this be used after FARR has already crashed? you can modify my script so that it launches Farr whenever Farr's process is not existent.
|
|
|
|
|
Logged
|
|
|
|
|
CleverCat
|
 |
« Reply #12 on: October 07, 2008, 01:57:40 AM » |
|
|
|
|
|
|
Logged
|
If you need help - JUST ASK!
|
|
|
|
lanux128
|
 |
« Reply #13 on: October 08, 2008, 04:25:17 AM » |
|
this is a quickly-done script so please let me know if anything goes astray.  usage: not much to do but if you've installed Farr in a custom location then edit the script accordingly. use Win+q to exit the script [ copy or print] ; Original Script by jgpaiva from DonationCoder ; Keep Farr running ; If nonexistent, starts Farr after a delay of 10 seconds ; Source: http://www.donationcoder.com/forum/index.php?topic=2812.msg132848#msg132848 ; #Persistent #SingleInstance force #NoEnv ;#NoTrayIcon ;change the path if necessary Farr_exe=%ProgramFiles%\FindAndRunRobot\FindAndRunRobot.exe SetTimer, WatchFarr, 1500 ;increase or decrease timer accordingly Return WatchFarr: Process, Exist, FindAndRunRobot.exe If ErrorLevel <> 0 Return Else { ToolTip, Farr is not detected and will be started in 10 seconds. Sleep, 10000 ;modify the delay here 1000 = 1 sec. Run,%Farr_exe% -tray } ToolTip ;remove ToolTip Return ;Win+q exits... #q::ExitApp
|
|
|
|
Logged
|
|
|
|
|
CleverCat
|
 |
« Reply #14 on: October 08, 2008, 07:15:21 AM » |
|
 Brilliant, thanks lanux - works well! 
|
|
|
|
|
Logged
|
If you need help - JUST ASK!
|
|
|
|
lanux128
|
 |
« Reply #15 on: October 08, 2008, 09:07:08 AM » |
|
@CleverCat: you're welcome. glad to be of help. 
|
|
|
|
|
Logged
|
|
|
|
|
CleverCat
|
 |
« Reply #16 on: October 09, 2008, 02:46:41 AM » |
|
|
|
|
|
|
Logged
|
If you need help - JUST ASK!
|
|
|
|
ewemoa
|
 |
« Reply #17 on: November 08, 2008, 02:08:14 AM » |
|
Inspired by the work in this thread [1], I put together an AHK script to start or stop FARR depending on whether FARR is not or is already running [2] -- it asks for confirmation via dialog boxen to defend against accidental invocation. Perhaps someone might find it useful at some point. ToggleFARRMayBe() { FarrExe = FindAndRunRobot.exe ; XXX: change appropriately - would be nice to read in path values from elsewhere...perhaps some day FarrFullPath = L:\Plus\FindAndRunRobot\%FarrExe% Process, Exist, %FarrExe% if (ErrorLevel <> 0) ; yes FARR { ; Yes/No + Question (4 + 32) MsgBox,36,,FARR seems to be running -- leave alone? IfMsgBox No Process, Close, %FarrExe% } else ; no FARR { ; Yes/No + Question (4 + 32) MsgBox,36,,FARR doesn't seem to be running -- start? IfMsgBox Yes Run, %FarrFullPath% } Return }
For invocation, I have something like the following: [1] Thanks to lanux128 for pointing this thread out  [2] Actually, it lives in the AHK script I use for custom hotkeys.
|
|
|
|
|
Logged
|
|
|
|
|