I wanted an application launcher that could work with any picture so I made this one. Middle mouse button launches the gui. Tooltips show what will be launched if you left click there. 8-ball will hide gui. Enjoy!
Screenshot:
Save this graphic to wherever you put the script:
http://www.autohotkey.net/~netfun81/pool%20balls.png
Code:
#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%
Gui +ToolWindow -Caption +AlwaysOnTop
Gui, Color, EEAA99
Gui +LastFound
WinSet, TransColor, EEAA99
pic:="pool balls.png"
Gui Add, Picture, x5 y5, %pic%
Gui, show, hide w333 h160
return
loop:
MouseGetPos, x, y
getKeyState, state, LButton
if state = D
gosub launch
else
gosub tooltip
return
tooltip:
if (x > 140 and x < 190) and (y > 90 and y < 140)
ToolTip, Explorer
if (x > 100 and x < 150) and (y > 70 and y < 120)
tooltip, firefox
if (x > 180 and x < 230) and (y > 70 and y < 120)
tooltip, IE
if (x > 70 and x < 120) and (y > 50 and y < 80)
tooltip, chrome
if (x > 140 and x < 190) and (y > 50 and y < 80)
tooltip, hide gui
if (x > 210 and x < 260) and (y > 50 and y < 80)
tooltip, ccleaner
if (x > 40 and x < 90) and (y > 20 and y < 50)
tooltip, taskmgr
if (x > 110 and x < 150) and (y > 20 and y < 50)
tooltip, control panel
if (x > 170 and x < 220) and (y > 20 and y < 50)
tooltip, logoff
if (x > 240 and x < 290) and (y > 20 and y < 50)
tooltip, shutdown
if (x > 10 and x < 60) and (y > 0 and y < 30)
tooltip, SL
if (x > 80 and x < 130) and (y > 0 and y < 30)
tooltip, Spider
if (x > 150 and x < 200) and (y > 0 and y < 30)
tooltip, blank
if (x > 220 and x < 270) and (y > 0 and y < 30)
tooltip, blank
if (x > 290 and x < 340) and (y > 0 and y < 30)
tooltip, blank
return
launch:
if (x > 140 and x < 190) and (y > 90 and y < 140)
{
run, explorer.exe c:\program files
gui, hide
setTimer, loop, off
tooltip
}
if (x > 100 and x < 150) and (y > 70 and y < 120)
{
run, c:\program files\mozilla Firefox\firefox.exe
gui, hide
setTimer, loop, off
tooltip
}
if (x > 180 and x < 230) and (y > 70 and y < 120)
{
Run, c:\program files\internet explorer\iexplore.exe
gui, hide
setTimer, loop, off
tooltip
}
if (x > 70 and x < 120) and (y > 50 and y < 80)
{
Run, C:\Users\kc\AppData\Local\Google\Chrome\Application\chrome.exe
gui, hide
setTimer, loop, off
tooltip
}
if (x > 140 and x < 190) and (y > 50 and y < 80)
{
gui, hide
setTimer, loop, off
tooltip
}
if (x > 210 and x < 260) and (y > 50 and y < 80)
{
Run, C:\program files\ccleaner\ccleaner.exe
gui, hide
setTimer, loop, off
tooltip
}
if (x > 40 and x < 90) and (y > 20 and y < 50)
{
Run, taskmgr.exe
gui, hide
setTimer, loop, off
tooltip
}
if (x > 110 and x < 150) and (y > 20 and y < 50)
{
Run, Control.exe
gui, hide
setTimer, loop, off
tooltip
}
if (x > 170 and x < 220) and (y > 20 and y < 50)
{
Shutdown, 0
gui, hide
setTimer, loop, off
tooltip
}
if (x > 240 and x < 290) and (y > 20 and y < 50)
{
shutdown, 1
gui, hide
setTimer, loop, off
tooltip
}
if (x > 10 and x < 60) and (y > 0 and y < 30)
{
Run, C:\Program Files\Imprudence\imprudence.exe, --settings settings_imprudence.xml
gui, hide
setTimer, loop, off
tooltip
}
if (x > 80 and x < 130) and (y > 0 and y < 30)
{
Run, c:\Program Files\Microsoft Games\SpiderSolitaire\SpiderSolitaire.exe
gui, hide
setTimer, loop, off
tooltip
}
if (x > 150 and x < 200) and (y > 0 and y < 30)
{
gui, hide
setTimer, loop, off
tooltip
}
if (x > 220 and x < 270) and (y > 0 and y < 30)
{
gui, hide
setTimer, loop, off
tooltip
}
if (x > 290 and x < 340) and (y > 0 and y < 30)
{
gui, hide
setTimer, loop, off
tooltip
}
return
mbutton::
setTimer, loop, 10
gui, show
return
mbutton & rbutton::
WinGet, id, list,,, Program Manager
Loop, %id%
{
StringTrimRight, this_id, id%a_index%, 0
WinGetTitle, title, ahk_id %this_id%
WinGetClass, class, ahk_id %this_id%
WinHide, ahk_id %this_id%
HWins = %HWins%||%this_id%
}
run, notepad.exe c:\program files\autohotkey\scripts\script.txt
Return
Lshift & mbutton::
Loop, Parse, HWins, ||
WinShow, ahk_id %A_LoopField%
Return
Lctrl & rbutton::Alttab
return