 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
ezuk
Joined: 04 Jun 2005 Posts: 146
|
Posted: Wed Nov 19, 2008 8:20 am Post subject: FastEight - single-stroke app switcher/launcher |
|
|
Yesterday, keyboardfreak made a comment which got me thinking.
He said that most of us use only a limited set of applications in our computing experience, and that most task switchers are overhead. You only need a complicated switcher if you use 10-20 apps and need to filter the list by keystrokes, etc.
keyboardfreak's solution was to dedicate his numpad to switching and launching common applications.
Personally, I need my numpad, and it's also a bit far away for me. So I came up with a somewhat different idea:
Each of the "buttons" in the image above corresponds to a single key on the keyboard. The top four buttons are asdf, and the bottom four are zxcv. Each button is linked with a specific application (Firefox, Word, etc). If this app is running, the button switches to it. If it is not running, the button runs it.
I activate the script using two quick taps of the shift key (I use CtrlMorse for this -- the two taps actually send ctrl+shift+f2, which activates this script).
So - to run MS Word, it's shift-shift-z. And for Firefox, it's shift-shift-d. And the keys never change, so with time they can be memorized and you don't need to look for the button in the image.
It's a fast, easy way to switch between your common apps. Thanks to keyboardfreak for the inspiration.
The icons used are Carbon Gloss by ~skm-industries.
| Code: |
; (c) ezuk 2008
App1Name = Help & Manual
App1Icon = carbon_dw.png
App1Path = c:\Program Files\HelpandManual4\HelpMan.exe
App2Name = Google Chrome
App2Icon = carbon_cm.png
App2Path = C:\Users\ezuk\AppData\Local\Google\Chrome\Application\chrome.exe
App3Name = Mozilla Firefox
App3Icon = carbon_ff.png
App3Path = c:\Program Files\Mozilla Firefox\firefox.exe
App4Name = Total Commander
App4Icon = carbon_fl.png
App4Path = c:\Program Files\totalcmd\TOTALCMD.EXE
App5Name = Microsoft Word
App5Icon = carbon_doc.png
App5Path = c:\Program Files\Microsoft Office\Office12\WINWORD.EXE
App6Name = Email
App6Icon = carbon_eml.png
App6Path = C:\Users\ezuk\AppData\Local\Google\Chrome\Application\chrome.exe http://www.gmail.com
App7Name = PSPad
App7Icon = carbon_txt.png
App7Path = c:\Program Files\pspad\PSPad.exe
App8Name = Help
App8Icon = carbon_dl.png
App8Path =
SetTitleMatchMode,2
If (App1Name <>"") {
Gui, Add, Picture,x0 gLaunchOrSwitch1, icons\%App1Icon%
} Else{
Gui, Add, Picture,x0, icons\blank.png
}
If (App2Name <>"") {
Gui, Add, Picture,ys, icons\%App2Icon%
} Else{
Gui, Add, Picture,ys, icons\blank.png
}
If (App3Name <>"") {
Gui, Add, Picture,ys, icons\%App3Icon%
} Else{
Gui, Add, Picture,ys, icons\blank.png
}
If (App4Name <>"") {
Gui, Add, Picture,ys, icons\%App4Icon%
} Else{
Gui, Add, Picture,ys, icons\blank.png
}
If (App5Name <>"") {
Gui, Add, Picture,x0 section, icons\%App5Icon%
} Else{
Gui, Add, Picture,x0 section, icons\blank.png
}
If (App6Name <>"") {
Gui, Add, Picture,ys, icons\%App6Icon%
} Else{
Gui, Add, Picture,ys, icons\blank.png
}
If (App7Name <>"") {
Gui, Add, Picture,ys, icons\%App7Icon%
} Else{
Gui, Add, Picture,ys, icons\blank.png
}
If (App8Name <>"") {
Gui, Add, Picture,ys, icons\%App8Icon%
} Else{
Gui, Add, Picture,ys, icons\blank.png
}
;CustomColor = FF00FF
Gui +LastFound +AlwaysOnTop -Caption +ToolWindow
Gui, Color, 000000
;WinSet, TransColor, %CustomColor%
Gui,show,center
WinGet, fasteight, PID, A
GroupAdd,FastEight, ahk_pid %fasteight%
^+F2::Gui,show
#IfWinActive, ahk_group FastEight
a::LaunchOrSwitch(1)
s::LaunchOrSwitch(2)
d::LaunchOrSwitch(3)
f::LaunchOrSwitch(4)
z::LaunchOrSwitch(5)
x::LaunchOrSwitch(6)
c::LaunchOrSwitch(7)
v::LaunchOrSwitch(8)
esc::Gui,hide
#IfWinActive
return
LaunchOrSwitch(AppNumber)
{
AppName := App%AppNumber%Name
AppPath := App%AppNumber%Path
IfWinExist,%AppName%
{
WinActivate
} Else {
Run,%AppPath%
}
Gui,hide
return
}
; These labels are only needed so that a user could click the icon to run a program.
LaunchOrSwitch1:
LaunchOrSwitch(1)
return
LaunchOrSwitch2:
LaunchOrSwitch(2)
return
LaunchOrSwitch3:
LaunchOrSwitch(4)
return
LaunchOrSwitch5:
LaunchOrSwitch(5)
return
LaunchOrSwitch6:
LaunchOrSwitch(6)
return
LaunchOrSwitch7:
LaunchOrSwitch(7)
return
LaunchOrSwitch8:
LaunchOrSwitch(8)
return
GuiClose:
ExitApp
|
|
|
| Back to top |
|
 |
keyboardfreak
Joined: 09 Oct 2004 Posts: 216 Location: Budapest, Hungary
|
Posted: Wed Nov 19, 2008 11:48 am Post subject: Re: FastEight - single-stroke app switcher/launcher |
|
|
| ezuk wrote: | | Personally, I need my numpad, and it's also a bit far away for me. |
You can still use the numpad for entering numbers, since there is NumLock. It's very addicitve to be able to switch to any application with a single keypress. It's extremely convenient in the long run.
Regarding your solution:
Haven't you tried eliminating SHIFT altogether?
Instead of pressing shift-shift-z how about pressing z twice quickly? It's not common to type zz, so it can be used as a double-press hotkey. Likewise xx, yy, ww, zz, etc.
The fewer keys one has to press for frequent operations the better. |
|
| Back to top |
|
 |
JoeSchmoe as guest Guest
|
|
| Back to top |
|
 |
ezuk
Joined: 04 Jun 2005 Posts: 146
|
Posted: Wed Nov 19, 2008 3:02 pm Post subject: Re: FastEight - single-stroke app switcher/launcher |
|
|
| keyboardfreak wrote: | | ezuk wrote: | | Personally, I need my numpad, and it's also a bit far away for me. |
Instead of pressing shift-shift-z how about pressing z twice quickly? It's not common to type zz, so it can be used as a double-press hotkey. Likewise xx, yy, ww, zz, etc.
|
I like the way you think!
I recall there used to be a script for working with double-strokes of normal keys (as opposed to my Morse script, which works with modifier double-strokes). Do you know the script?
I'll dig around the forums, try to find it myself. |
|
| Back to top |
|
 |
ezuk
Joined: 04 Jun 2005 Posts: 146
|
Posted: Wed Nov 19, 2008 3:03 pm Post subject: Re: fkee3 |
|
|
And reach all the way to the F keys?
Or am I missing something? |
|
| Back to top |
|
 |
keyboardfreak
Joined: 09 Oct 2004 Posts: 216 Location: Budapest, Hungary
|
Posted: Wed Nov 19, 2008 3:10 pm Post subject: Re: FastEight - single-stroke app switcher/launcher |
|
|
| ezuk wrote: | | I recall there used to be a script for working with double-strokes of normal keys (as opposed to my Morse script, which works with modifier double-strokes). Do you know the script? |
Nope, but I have one more thing to add:
Even common double letter combinations can be used if an additional check is added which ensures no other letter was typed before the double-press.
For example, ss is used in the word assassination, but there is no word which begins with ss, so if you check that within a short time (say, 0.5 seconds) no other letter was typed before the ss then it can safely be interpreted as a hotkey. |
|
| Back to top |
|
 |
ezuk
Joined: 04 Jun 2005 Posts: 146
|
Posted: Wed Nov 19, 2008 3:14 pm Post subject: Re: FastEight - single-stroke app switcher/launcher |
|
|
| keyboardfreak wrote: | | ezuk wrote: | | I recall there used to be a script for working with double-strokes of normal keys (as opposed to my Morse script, which works with modifier double-strokes). Do you know the script? |
Nope, but I have one more thing to add:
Even common double letter combinations can be used if an additional check is added which ensures no other letter was typed before the double-press.
For example, ss is used in the word assassination, but there is no word which begins with ss, so if you check that within a short time (say, 0.5 seconds) no other letter was typed before the ss then it can safely be interpreted as a hotkey. |
Yes... I see what you're saying. But making something like that is a bit above my AHK abilities, I'm afraid. |
|
| Back to top |
|
 |
Chicken Pie 4 Tea
Joined: 18 Aug 2009 Posts: 375 Location: holland
|
Posted: Fri Sep 24, 2010 1:27 pm Post subject: |
|
|
Thanks, and I love the way it DOESNT use the numpad cos a lot of us laptop users don't have a numpad, OK! _________________ "Choose your parents wisely" |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|