Created
July 22, 2018 12:41
-
-
Save IAmJSD/5b54e10bc1a1d4daca126d7fdb2b2d8a to your computer and use it in GitHub Desktop.
Saves a file in PyCharm and commits/pushes to Git
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
^]:: | |
WinGetActiveTitle, WindowName | |
If InStr(WindowName, "PyCharm") { | |
Send, ^s | |
RegExMatch(WindowName, "[A-Z]:\\(([a-zA-Z0-9\.]){1,}(\\){0,}){1,}", FoundRegex) | |
if FoundRegex { | |
FormatTime, PCTimeFormatted | |
ToRun := "git.exe commit -a -m " . """" . "Save and commit from Jake's AHK script [PC time/date " . PCTimeFormatted . "]" . """" | |
RunWait, %ToRun%, %FoundRegex%, Hide | |
Run, git push, %FoundRegex%, Hide | |
} else { | |
MsgBox, Could not find the folder. | |
} | |
} else { | |
MsgBox, This script requires PyCharm to work. | |
} | |
Return | |
; Saves/commits/pushes work to Git. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment