aboutsummaryrefslogtreecommitdiff
path: root/tt.jump.ahk
blob: aa5232fb5d1522a6190d26b73902a5b2da5d2b53 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
;; -> init

JumpPaths := { s: env("Sync")
	, w: env("Sync") "\Projekt\john.ankarstrom.se\htdocs"
	, g: env("Sync") "\Projekt\git"
	, u: env("UserProfile")
	, e: env("UserProfile") "\Documents"
	, d: env("UserProfile") "\Downloads"
	, m: env("UserProfile") "\Music"
	, p: env("UserProfile") "\Pictures" }

;; -> body

; Open in new Explorer window

#s::
ToolTip, ...
SendInput, {Blind}{LWin Up}{RWin Up}
Input, k, C L1
if (JumpPaths[k] != "")
{
	if (InStr(FileExist(JumpPaths[k]), "D"))
		Run, % "explorer /n, """ JumpPaths[k] """"
	else
		Run, % """" JumpPaths[k] """"
}
ToolTip
if (GetKeyState("LWin", "P"))
	SendInput, {Blind}{LWin Down}
if (GetKeyState("RWin", "P"))
	SendInput, {Blind}{RWin Down}
return

;; -> library

env(name)
{
	EnvGet, r, %name%
	return r
}