aboutsummaryrefslogtreecommitdiff
path: root/tt.jump.ahk
blob: 31fe3f751988039e1d283d89e44a4d45d296d1e2 (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
41
42
43
44
45
46
47
48
49
50
;; -> 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}
Input, k, C L1
if (JumpPaths[k] != "")
{
	if (InStr(FileExist(JumpPaths[k]), "D"))
		Run, % "explorer /n, """ JumpPaths[k] """"
	else
		Run, % """" JumpPaths[k] """"
}
ToolTip
return

; Open in current (or new) Explorer window

!#s::
ToolTip, ...
SendInput, {Blind}{LWin Up}
Input, k, L1  
if (JumpPaths[k] != "")
	if ((e := Explorer()) != -1) ; (see tt.programs.explorer.ahk)
		e.Navigate(JumpPaths[k])
	else
		Run, % "explorer """ JumpPaths[k] """"
ToolTip
return

;; -> library

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