Created
September 27, 2018 08:49
-
-
Save splintor/83799f0ad991b1f108ccdbc78acef6f0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Version: 3 | |
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
#Warn ; Enable warnings to assist with detecting common errors. | |
password = ***** | |
#v:: | |
^+z:: | |
Run "C:\Program Files (x86)\Cisco\Cisco AnyConnect Secure Mobility Client\vpnui.exe" | |
WinWait Cisco AnyConnect Secure Mobility Client | |
ControlGetText, button , Button1 | |
IfEqual button, Connect | |
{ | |
ControlClick Button1 | |
expected_title = Cisco AnyConnect | BEACON-TLV | |
WinWait %expected_title% | |
ControlSetText Edit3, %password% | |
ControlSetText Edit2, %password% | |
ControlClick Button1 | |
expected_text = Your device meets all requirements and has been granted full BMC Network access | |
WinWait Cisco, %expected_text% | |
WinClose Cisco, %expected_text% | |
} | |
Exit | |
#w:: | |
^+r:: | |
Run "C:\Users\sflint\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\cr.py.lnk", , Min | |
Exit | |
^+x:: | |
SendInput http://goto/emgit/commits/%Clipboard% | |
Exit | |
^+d:: | |
SendInput [ | |
SendInput ^v | |
SendInput {Backspace 28} | |
SendInput ^+{Left} | |
SendInput ^c | |
SendInput ^{Left 11} | |
SendInput ^v | |
SendInput |^{End}] | |
Exit | |
; http://vl-tlv-scm-03:7990/projects/cm/repos/aft/commits/fa20896de788bdb6e86c5f2ac9e5fb8390c54172 | |
^+#d:: | |
SendInput [ | |
SendInput ^v | |
SendInput {Backspace 28} | |
SendInput |http://vl-tlv-scm-03:7990/projects/EM/repos/ecstop/commits/ | |
SendInput ^v | |
SendInput ] | |
Exit | |
^+b:: | |
SendInput [ | |
SendInput ^v | |
SendInput {Backspace 28} | |
SendInput |http://vl-tlv-scm-03:7990/projects/CM/repos/aft/commits/ | |
SendInput ^v | |
SendInput ] | |
Exit | |
SendMode Input ; Recommended for new scripts due to its superior speed and reliability. | |
; Make sure we are in English keyboard | |
SendMessage, 0x50, 0, 0x0409,, A | |
we_opened_properties = false | |
SetTitleMatchMode 2 | |
IfWinActive IBM Rational Synergy | |
{ | |
IfWinNotActive Properties for Task | |
{ | |
WinActivate IBM Rational Synergy | |
SendInput !v ; View menu | |
SendInput r ; Properties | |
we_opened_properties = true | |
WinWaitActive Properties for Task,,3 | |
} | |
} | |
SetTitleMatchMode 1 | |
IfWinActive Properties for Task | |
{ | |
WinGetTitle title, A | |
IfEqual we_opened_properties, true | |
{ | |
WinClose | |
} | |
title := SubStr(title, StrLen("Properties for " + 1)) | |
StringReplace title, title, % "em9: ", % "" | |
StringReplace title, title, % "ccm9: ", % "" | |
StringReplace title, title, % "ai8: ", % "" | |
StringGetPos pos, title, % " - ", r2 | |
title := SubStr(title, 1, pos) | |
StringGetPos, pos, title, % ":" | |
task := SubStr(title, 1, pos) | |
StringReplace task, task, % "Task ", % "" | |
;body := % "Hi%0APlease review my task " . task . "%0AThanks,%0AShmulik" | |
;Run mailto:?subject=%title%&body=%body% | |
StringReplace titleForURL, title, % """", % "%22", All | |
StringReplace titleForURL, titleForURL, % ".", % "%2E", All | |
Run mailto:?subject=%titleForURL% | |
WinWaitActive %title% | |
; Make sure we are in English keyboard | |
SendMessage 0x50, 0, 0x0409,, A | |
; Go to Subject field | |
SendInput !u | |
; Go to Body | |
SendInput {Tab} | |
; Write body first line | |
SendInput Hi ,{Enter}Can you please review my task | |
; Emphasis tab number | |
SendInput ^b | |
SendInput {space}%task% | |
SendInput ^b | |
SendInput ?{Enter}{Enter}Thanks,{Enter}Shmulik | |
; Go back to after the "hi" in the first line | |
SendInput ^{Home}^{Right} | |
; Go back to Subject field | |
SendInput !u | |
; Go to recipient field | |
SendInput +{Tab 2} | |
} | |
else | |
{ | |
Msgbox Synergy main window or Task window must be active for %A_ScriptName% to work. | |
} | |
Exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment