aboutsummaryrefslogtreecommitdiff
path: root/tt.jump.ahk
blob: 0a1fe3cee2e30861605ff3e9b99e12d7f2a38c70 (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
;; -> init

JumpPaths := { s: env("Sync")
             , w: env("Sync") "\Projekt\john.ankarstrom.se\htdocs"
             , g: env("Sync") "\Projekt\git"
             , e: env("Personal")
             , d: env("Personal") "\Downloads"
             , m: env("Personal") "\MP3"
             , p: env("Personal") "\My 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
}