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
  • December 11, 2016, 07:59:28 AM
  • 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: IDEA: Autofocus utility  (Read 6719 times)

ababo

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 9
    • View Profile
    • Donate to Member
IDEA: Autofocus utility
« on: November 19, 2007, 09:22:18 AM »
The other day I was playing the excellent Dwarf Fortress in a window on one monitor, whilst browsing the internet on another. I found myself constantly having to switch back and forth between windows as the focus was switched whenever I used the browser window.

What I'd love to have is something where you could designate a particular window as the primary one, so that if I were to click on another window (say a link in my browser), it would automatically shift focus back to the primary window, saving me from having to play tennis with my mouse or pressing alt-tab all the time. I hope this is something that is doable!  :)

P.S. I also posted about this earlier in the General Software Discussion forum here.

belkira

  • Member
  • Joined in 2006
  • **
  • Posts: 52
    • View Profile
    • Donate to Member
Re: IDEA: Autofocus utility
« Reply #1 on: November 19, 2007, 11:48:23 AM »
How long of a delay before it gives focus back? If you make it so it always has focus you will not be able to type anything in other windows.

A different solution for you might just be to download Tweak-UI and turn on X-Mouse, then where ever your mouse is is the area with focus.

ababo

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 9
    • View Profile
    • Donate to Member
Re: IDEA: Autofocus utility
« Reply #2 on: November 19, 2007, 12:05:46 PM »
Well I guess what I'm after is a way to stop me from having to use the mouse so much. Say in one window all I use is the mouse to access commands, and in the other I use mainly the keyboard. I'd like the keyboard window to be the one that stays focused, so that I can type things in without worrying about having to click on it or alt-tab to it. X-mouse wouldn't be ideal as I'd still have to move the mouse back and forth between windows.

Maybe the focus time before switching back to the primary window could be something that can be set by the user, but I'm after something that will switch back quickly. Switching back as soon as I've performed a mouse click would be very handy.

belkira

  • Member
  • Joined in 2006
  • **
  • Posts: 52
    • View Profile
    • Donate to Member
Re: IDEA: Autofocus utility
« Reply #3 on: November 19, 2007, 02:30:57 PM »
Give this a try and let me know if it does what you want. For the name of the program to keep in focus, it is case sensitive, but can be anywhere in the title. i.e. Untitled - Notepad, Notepad would work just fine for the name.

;
; AutoHotkey Version: 1.x
; Language:       English
; Platform:       Win9x/NT
; Author:         A.N.Other <myemail@nowhere.com>
;
; Script Function:
; Template script (you can customize this template by editing "ShellNew\Template.ahk" in your Windows folder)
;

#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
#SingleInstance, force
#Persistent
#WinActivateForce
SetTitleMatchMode, 2
Inputbox, name, Program to focus, Type the name of the program to keep in focus:, , 250, 150
if name = ; If nothing is entered for the app name exit script
{
exitapp
}
Inputbox, time, How long to wait, How long should I wait before reactivating? (milliseconds):, , 250, 150
If time =
{
time := 1000
}
SetTimer, WatchWindow, %time%
return

WatchWindow:
IfWinActive, %name%
{
return
}
Else
{
WinActivate, %name%
}
Return

ababo

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 9
    • View Profile
    • Donate to Member
Re: IDEA: Autofocus utility
« Reply #4 on: November 19, 2007, 03:00:27 PM »
Thanks very much. That does exactly what I was looking for. :) I see it was also a pretty simple script. I'll be sure to give it a try myself next time I have an idea.

Now I can play games and browse with maximum efficiency. ;) Thanks again.

belkira

  • Member
  • Joined in 2006
  • **
  • Posts: 52
    • View Profile
    • Donate to Member
Re: IDEA: Autofocus utility
« Reply #5 on: November 19, 2007, 03:04:22 PM »
NP, glad it works for you

bft_chromeguy

  • Participant
  • Joined in 2008
  • *
  • Posts: 15
    • View Profile
    • Bugfree Technologies
    • Donate to Member
Re: IDEA: Autofocus utility
« Reply #6 on: October 11, 2008, 11:19:44 AM »
This is an AWESOME program, great for gaming AND chatting at the same time!
However, can I please Request:
* choose my program from a dropdown list of currently running programs (AltTabFingertips does a great dropdown!)
* autofocusback after a user-defined interval of non-activity (see this would be great for chatting/gaming)

I love your program and with these features it could become great
http://www.bugfreetech.com - come visit my site