-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path06 - [PT] Jump to Terminal.ahk
55 lines (43 loc) · 1.65 KB
/
06 - [PT] Jump to Terminal.ahk
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
51
52
53
54
55
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
!LButton:: ;opens the terminal when connecting via console cable
CoordMode, Mouse, Screen ;sets the getpos to use absolute pos
MouseGetPos, absXpos, absYpos, id
WinGetTitle, title, ahk_id %id%
If (InStr(title, "Cisco Packet Tracer"))
{
SetDefaultMouseSpeed, 0 ; makes mouse travel instantly
Send {LButton}
Sleep 200
MouseMove, 429, 130 0
Send {LButton} ;opens terminal
Sleep 200 ;waits for next thing to complete
MouseMove, 774, 275
Send {LButton} ;opens console
}
Return
NumpadEnter::
CoordMode, Mouse, Screen
MouseGetPos, absXpos, absYpos
MsgBox X=%absXpos% Y=%absYpos%
Return
; --------------------------------------------------------------------
; -------------------------Script Controls----------------------------
; --------------------------------------------------------------------
^!Numpad0:: ;reloads script, displays tooltip
;TrayTip ,-Reloading-, %A_ScriptName%, 2, 16
;sleep 2000
;HideTrayTip ()
Reload
Return
!NumpadSub:: ;kills script, displays tooltip
;TrayTip , Attempting to -KILL-, %A_ScriptName%, 3 , 16
;sleep (2500)
;HideTrayTip ()
ExitApp
Return
^Numpad0::num=0 ;reset Extension to beginning of script
; --------------------------------------------------------------------
; --------------------------------------------------------------------