additional TerinalVim apps

additional TerinalVim apps

; Tips {{{
; #: win
; !: alt
; ^: ctrl
; +: shift
; &: and
; <: only left, >: only right
; *: wildecard
; ~: pass through
; }}}

; Auto execute section is the region before any return/hotkey {{{
; Windows size
TMargin := 5
BMargin := 5
LMargin := 5
RMargin := 5 ; sidebar = 150px
MinSize := 0.7

; For Terminal/Vim
GroupAdd Terminal, ahk_class PuTTY
GroupAdd Terminal, ahk_class mintty ; cygwin
GroupAdd Terminal, ahk_class TMobaXtermForm
GroupAdd Terminal, ahk_class TFormDetachedTab
GroupAdd Terminal, ahk_class ConsoleWindowClass
GroupAdd Terminal, ahk_exe powershell.exe
GroupAdd Terminal, ahk_exe vim.exe
GroupAdd TerminalVim, ahk_group Terminal
GroupAdd TerminalVim, ahk_class Vim
GroupAdd TerminalVim, ahk_class mintty
GroupAdd TerminalVim, ahk_class CASCADIA_HOSTING_WINDOW_CLASS
GroupAdd TerminalVim, ahk_exe WindowsTerminal.exe

; For browsers
GroupAdd, Browser, ahk_exe chrome.exe
GroupAdd, Browser, ahk_exe firefox.exe
GroupAdd, Browser, ahk_exe ApplicationFrameHost.exe ; Edge

; Mouse Gestures
GroupAdd, MouseGesture, ahk_group Broser
GroupAdd, MouseGesture, ahk_exe explorer.exe

; External files (Only 1 file, at last of Auto execute section"
#Include %A_LineFile%\..\submodules\vim_ahk\vim.ahk

Return
; }}}

; External files w/o Auto execute section
#Include %A_LineFile%\..\AutoCorrect.ahk

;; Basic Settings, HotKeys, Functions {{{
; Settings

#UseHook On ; Make it a bit slow, but can avoid infinitude loop
            ; Same as "$" for each hotkey
#InstallKeybdHook ; For checking key history
                  ; Use ~500kB memory?

#HotkeyInterval 1000 ; Hotkey inteval (default 2000 milliseconds).
#MaxHotkeysPerInterval 100 ; Max hotkeys perinterval (default 50).

; For HHKB
;vkFFsc079::RCtrl
;vkFFsc07b::LCtrl
; }}}

; Terminal/Vim {{{
; ESC + IME
#IfWInActive, ahk_group TerminalVim
Esc:: ; Just send Esc at converting.
  if(VIM_IME_GET(A)){
    if(VIM_IME_GetConverting(A)){
      Send, {Esc}
    }else{
      VIM_IME_SET()
    }
  }else{
    Send, {Esc}
  }
Return

^[:: ; Go to Normal mode (for vim) with IME off even at converting.
  if(VIM_IME_GetConverting(A)){
    Send, {Esc}
    Sleep 1 ; wait 1 ms (Need to stop converting)
  }
  if(VIM_IME_GET(A)){
    VIM_IME_SET()
    Send, {Esc}
  }else{
    Send, {Esc}
  }
Return

^m::Send, ^m ; Use Ctrl-m as is

; Paste
#IfWInActive, ahk_group Terminal
!v::
  ;StringSplit, strout, clipboard, `n
  ;If(strout0>1 or InStr(clipboard, "sudo")>0){
  ;  MsgBox, 308, Clipboard, %clipboard%`n`n Do you want to paste?
  ;  IfMsgBox, No
  ;  {
  ;    Return
  ;  }
  ;}
  ;SendInput %clipboard%
  ;Return
  Sleep,200
  MouseClick, Right, 50, 50, 1
Return

#IfWInActive, ahk_class Vim
!v::Send, {Alt}ep

; Other than Terminal/Vim
#IfWInNotActive, ahk_group TerminalVim
^[::Send, {Esc}             ; Always C-[ to ESC, like vim
^d::Send, {Del}             ; Always Delete with C-d
; }}} Terminal/Vim

; Power Point {{{
#IfWInActive, ahk_class PP12FrameClass
; Subscript/Superscript
^=::Send, ^tb{Enter}
^+=::Send, ^tp{Enter}
; For JP keyboards
;^-::Send, ^tb{Enter}
;^+-::Send, ^tp{Enter}

; Fonts
^!+s::Send, ^tfsymbol{Enter}
^!+a::Send, ^tfarial{Enter}
^!+h::Send, ^tfhelvetica{Enter}
; }}} Power Point

; Word {{{
#IfWInActive, ahk_class OpusApp
^=::Send, ^tb{Enter}
^+=::Send, ^tp{Enter}
; for JP keyboards
;^-::Send, ^tb{Enter}
;^+-::Send, ^tp{Enter}
; }}} Word

; Explorer {{{
#IfWInActive, ahk_class CabinetWClass
; Next/Previous page
^i::Send, !{Right}
^o::Send, !{Left}
; }}} Explorer

; CLCL {{{
;#IfWInActive, ahk_class CLCLMain
#IfWInActive, CLCL ; both window/title do not working...
j::
  Send, {Down}
Return

K::Send, {Up}
; }}} Explorer

; Everthing {{{
#IfWinActive, ahk_class EVERYTHING
Return::
  Send, {Enter}
  Sleep, 200
  IfWinActive, ahk_class EVERYTHING
  {
    Send,{Enter}
    Sleep, 500
  }
  WinActivate, ahk_class EVERYTHING
  Sleep, 200
  Send, {Esc}
Return
; }}} Everything

; Firefox/Chrome/Edge {{{
#IfWinActive, ahk_group Browser
;^WheelDown::Send, {WheelDown}
;^WheelUp::Send, {WheelUp}
^WheelDown::Return
^WheelUp::Return
; }}} Firefox/Chrome

; Mouse Gestures {{{
#IfWinActive, ahk_group MouseGesture
;LButton & RButton::Send, ^{Tab}
;RButton & LButton::Send, ^+{Tab}

; }}} Firefox/Chrome

; Global Settings {{{
#if
; Basic Settings {{{

; Suspend
;Esc & Tab::
;  Suspend, Toggle
;  Return
; For Alt-Ctrl Swap (swapped by KeySwap)
; To assign ^Tab, need to add < or > to choose left or right
<^Tab::AltTab
;<+<^Tab::ShiftAltTab ; can not assigned...
;LCtrl & Tab::
;  if GetKeyState("Shift","P"){
;    Send, {ShiftAltTab}
;  }else{
;    Send, {AltTab}
;  }
;Return
;Alt & Tab::
;  if GetKeyState("Shift","P"){
;    Send, ^+{taB}
;  }else{
;    Send, ^{Tab}
;  }
;Return
!Tab::Send, ^{Tab}
!+Tab::Send, ^+{Tab}

;!m::Send, ^m
;^m::Send, !m
;>^m::Send, !m
;Ctrl & Left::Send, !{Left}
;Ctrl & Right::Send, !{Right}

; Virtual desktop
^!+h::Send, #^{Left}
^!+l::Send, #^{Right}

; Cortana
!^f::Send, #s

; CLCL
#c::Send, !c

; Other basic settings
!Space::Send, {vkF3sc029} ; IME by A-Space
^Space::Send, {vkF3sc029} ; IME by C-Space
;{vkF3sc029}               ; 変換
;{vk1Dsc07B}               ; 無変換
!^a::Send, !{Space}n       ; Minimize window
!4::Send, !{F4}           ; Close window
^4::Send, !{F4}           ; Close window
!d::Send, {Del}           ; Always Delete with A-d
;^o::Send,!{Left}          ; Go to previous page
;^i::Send,!{Right}         ; Go to nexe page
^Space::!`                ; IME

^h::Send, {BS}            ; Always BS with C-h
;^h::
;  While GetKeyState("h","p"){
;    Send {BS}
;    TrayTip,Start:,%n%,10,,
;    Sleep 50
;  }
;  return

;^j::Send,{Enter}      ; C-j to Enter

; For HHKB
; ESC to ` like normal keyboard (ESC is placed on the left of 1 in HHKB)
!1::!`                ; IME

; Disable alt to menu
~LAlt Up::
~LAlt::
return
; }}} Basic Settings

; Cursor, Mouse, Window move/size {{{
; Cursor {{{
!^h::Send, {Left}
!^j::Send, {Down}
!^k::Send, {Up}
!^l::Send, {Right}
; }}} Cursor

; Mouse {{{
; Mouse Move
^+h::MouseMove, -10, 0, 0, R
^+j::MouseMove, 0, 10, 0, R
^+k::MouseMove, 0, -10, 0, R
^+l::MouseMove, 10, 0, 0, R

; Click
^+n::MouseClick, Left
^+p::MouseClick, Right
; Right click on current window

; Mouse wheel
!^m::MouseClick, WheelDown, , , 2
!^,::MouseClick, WheelUp, , , 2
; }}} Mouse

; Window move {{{

; Move a little
^+y::
  WinGetPos, X, Y, , , A ;A for Active Window
  WinMove, A, ,X-20, Y,
Return

^+u::
  WinGetPos, X, Y, , , A
  WinMove, A, , X, Y+20
Return

^+i::
  WinGetPos, X, Y, , , A
  WinMove, A, , X, Y-20
Return

^+o::
  WinGetPos, X, Y, , , A
  WinMove, A, , X+20, Y
Return

; Move to a different screen
!^+y:: Send, #+{Left}
!^+u:: Send, #+{Down}
!^+i:: Send, #+{Up}
!^+o:: Send, #+{Right}

; }}} Window move

; Window size {{{

; Almost full
^!Enter::
!+Enter::
  ;WinGetPos, X, Y, W, H, Program Manager ; Full Desktop
  ;Msgbox, Pos At %X% %Y% %W% %H%
  SysGet, MWA, MonitorWorkArea ; w/o Taskbar
  ;Msgbox, %MWALeft% %MWATop% %MWARight% %MWABottom%
  WinMove, A, , MWALeft+LMargin, MWATop+TMargin
    , MWARight-MWALeft-LMargin-RMargin
    , MWABottom-MWATop-TMargin-BMargin
Return

; Minsize
^!+Enter::
  SysGet, MWA, MonitorWorkArea ; w/o Taskbar
  WinMove, A, , MWALeft+LMargin, MWATop+TMargin
    , (MWARight-MWALeft-LMargin-RMargin)*Minsize
    , (MWABottom-MWATop-TMargin-BMargin)*Minsize
Return

; Half size
!+h::
  SysGet, MWA, MonitorWorkArea ; w/o Taskbar
  WinMove, A, , MWALeft+LMargin, MWATop+TMargin
    , (MWARight-MWALeft-LMargin-RMargin)*0.5
    , MWABottom-MWATop-TMargin-BMargin
Return

!+j::
  SysGet, MWA, MonitorWorkArea ; w/o Taskbar
  WinMove, A, , MWALeft+LMargin
    , MWATop+(MWABottom-MWATop)*0.5
    , MWARight-MWALeft-LMargin-RMargin
    , (MWABottom-MWATop-TMargin-BMargin)*0.5
Return

!+k::
  SysGet, MWA, MonitorWorkArea ; w/o Taskbar
  WinMove, A, , MWALeft+LMargin, MWATop+TMargin
    , MWARight-MWALeft-LMargin-RMargin
    , (MWABottom-MWATop-TMargin-BMargin)*0.5
Return

!+l::
  SysGet, MWA, MonitorWorkArea ; w/o Taskbar
  WinMove, A, , MWALeft+(MWARight-MWALeft)*0.5
    , MWATop+TMargin
    , (MWARight-MWALeft-LMargin-RMargin)*0.5
    , MWABottom-MWATop-TMargin-BMargin
Return

; Resize
!+y::
  WinGetPos, X, Y, W, H, A
  WinMove, A, ,X, Y, W-20, H
Return

!+u::
  WinGetPos, X, Y, W, H, A
  WinMove, A, ,X, Y, W, H+20
Return

!+i::
  WinGetPos, X, Y, W, H, A
  WinMove, A, ,X, Y, W, H-20
Return

!+o::
  WinGetPos, X, Y, W, H, A
  WinMove, A, ,X, Y, W+20, H
Return

; }}} Window size
; }}} Cursor, Mouse, Window move
; }}} Global Settings

; Tips {{{
; #: win
; !: alt
; ^: ctrl
; +: shift
; &: and
; <: only left, >: only right
; *: wildecard
; ~: pass through
; }}}

; Auto execute section is the region before any return/hotkey {{{
; Windows size
TMargin := 5
BMargin := 5
LMargin := 5
RMargin := 5 ; sidebar = 150px
MinSize := 0.7

; For Terminal/Vim
GroupAdd Terminal, ahk_class PuTTY
GroupAdd Terminal, ahk_class mintty ; cygwin
GroupAdd Terminal, ahk_class TMobaXtermForm
GroupAdd Terminal, ahk_class TFormDetachedTab
GroupAdd Terminal, ahk_class ConsoleWindowClass
GroupAdd Terminal, ahk_exe powershell.exe
GroupAdd Terminal, ahk_exe vim.exe
GroupAdd TerminalVim, ahk_group Terminal
GroupAdd TerminalVim, ahk_class Vim

; For browsers
GroupAdd, Browser, ahk_exe chrome.exe
GroupAdd, Browser, ahk_exe firefox.exe
GroupAdd, Browser, ahk_exe ApplicationFrameHost.exe ; Edge

; Mouse Gestures
GroupAdd, MouseGesture, ahk_group Broser
GroupAdd, MouseGesture, ahk_exe explorer.exe

; External files (Only 1 file, at last of Auto execute section"
#Include %A_LineFile%\..\submodules\vim_ahk\vim.ahk

Return
; }}}

; External files w/o Auto execute section
#Include %A_LineFile%\..\AutoCorrect.ahk

;; Basic Settings, HotKeys, Functions {{{
; Settings

#UseHook On ; Make it a bit slow, but can avoid infinitude loop
            ; Same as "$" for each hotkey
#InstallKeybdHook ; For checking key history
                  ; Use ~500kB memory?

#HotkeyInterval 1000 ; Hotkey inteval (default 2000 milliseconds).
#MaxHotkeysPerInterval 100 ; Max hotkeys perinterval (default 50).

; For HHKB
;vkFFsc079::RCtrl
;vkFFsc07b::LCtrl
; }}}

; Terminal/Vim {{{
; ESC + IME
#IfWInActive, ahk_group TerminalVim
Esc:: ; Just send Esc at converting.
  if(VIM_IME_GET(A)){
    if(VIM_IME_GetConverting(A)){
      Send, {Esc}
    }else{
      VIM_IME_SET()
    }
  }else{
    Send, {Esc}
  }
Return

^[:: ; Go to Normal mode (for vim) with IME off even at converting.
  if(VIM_IME_GetConverting(A)){
    Send, {Esc}
    Sleep 1 ; wait 1 ms (Need to stop converting)
  }
  if(VIM_IME_GET(A)){
    VIM_IME_SET()
    Send, {Esc}
  }else{
    Send, {Esc}
  }
Return

^m::Send, ^m ; Use Ctrl-m as is

; Paste
#IfWInActive, ahk_group Terminal
!v::
  ;StringSplit, strout, clipboard, `n
  ;If(strout0>1 or InStr(clipboard, "sudo")>0){
  ;  MsgBox, 308, Clipboard, %clipboard%`n`n Do you want to paste?
  ;  IfMsgBox, No
  ;  {
  ;    Return
  ;  }
  ;}
  ;SendInput %clipboard%
  ;Return
  Sleep,200
  MouseClick, Right, 50, 50, 1
Return

#IfWInActive, ahk_class Vim
!v::Send, {Alt}ep

; Other than Terminal/Vim
#IfWInNotActive, ahk_group TerminalVim
^[::Send, {Esc}             ; Always C-[ to ESC, like vim
^d::Send, {Del}             ; Always Delete with C-d
; }}} Terminal/Vim

; Power Point {{{
#IfWInActive, ahk_class PP12FrameClass
; Subscript/Superscript
^=::Send, ^tb{Enter}
^+=::Send, ^tp{Enter}
; For JP keyboards
;^-::Send, ^tb{Enter}
;^+-::Send, ^tp{Enter}

; Fonts
^!+s::Send, ^tfsymbol{Enter}
^!+a::Send, ^tfarial{Enter}
^!+h::Send, ^tfhelvetica{Enter}
; }}} Power Point

; Word {{{
#IfWInActive, ahk_class OpusApp
^=::Send, ^tb{Enter}
^+=::Send, ^tp{Enter}
; for JP keyboards
;^-::Send, ^tb{Enter}
;^+-::Send, ^tp{Enter}
; }}} Word

; Explorer {{{
#IfWInActive, ahk_class CabinetWClass
; Next/Previous page
^i::Send, !{Right}
^o::Send, !{Left}
; }}} Explorer

; CLCL {{{
;#IfWInActive, ahk_class CLCLMain
#IfWInActive, CLCL ; both window/title do not working...
j::
  Send, {Down}
Return

K::Send, {Up}
; }}} Explorer

; Everthing {{{
#IfWinActive, ahk_class EVERYTHING
Return::
  Send, {Enter}
  Sleep, 200
  IfWinActive, ahk_class EVERYTHING
  {
    Send,{Enter}
    Sleep, 500
  }
  WinActivate, ahk_class EVERYTHING
  Sleep, 200
  Send, {Esc}
Return
; }}} Everything

; Firefox/Chrome/Edge {{{
#IfWinActive, ahk_group Browser
;^WheelDown::Send, {WheelDown}
;^WheelUp::Send, {WheelUp}
^WheelDown::Return
^WheelUp::Return
; }}} Firefox/Chrome

; Mouse Gestures {{{
#IfWinActive, ahk_group MouseGesture
;LButton & RButton::Send, ^{Tab}
;RButton & LButton::Send, ^+{Tab}

; }}} Firefox/Chrome

; Global Settings {{{
#if
; Basic Settings {{{

; Suspend
;Esc & Tab::
;  Suspend, Toggle
;  Return
; For Alt-Ctrl Swap (swapped by KeySwap)
; To assign ^Tab, need to add < or > to choose left or right
<^Tab::AltTab
;<+<^Tab::ShiftAltTab ; can not assigned...
;LCtrl & Tab::
;  if GetKeyState("Shift","P"){
;    Send, {ShiftAltTab}
;  }else{
;    Send, {AltTab}
;  }
;Return
;Alt & Tab::
;  if GetKeyState("Shift","P"){
;    Send, ^+{taB}
;  }else{
;    Send, ^{Tab}
;  }
;Return
!Tab::Send, ^{Tab}
!+Tab::Send, ^+{Tab}

;!m::Send, ^m
;^m::Send, !m
;>^m::Send, !m
;Ctrl & Left::Send, !{Left}
;Ctrl & Right::Send, !{Right}

; Virtual desktop
^!+h::Send, #^{Left}
^!+l::Send, #^{Right}

; Cortana
!^f::Send, #s

; CLCL
#c::Send, !c

; Other basic settings
!Space::Send, {vkF3sc029} ; IME by A-Space
^Space::Send, {vkF3sc029} ; IME by C-Space
;{vkF3sc029}               ; 変換
;{vk1Dsc07B}               ; 無変換
!^a::Send, !{Space}n       ; Minimize window
!4::Send, !{F4}           ; Close window
^4::Send, !{F4}           ; Close window
!d::Send, {Del}           ; Always Delete with A-d
;^o::Send,!{Left}          ; Go to previous page
;^i::Send,!{Right}         ; Go to nexe page
^Space::!`                ; IME

^h::Send, {BS}            ; Always BS with C-h
;^h::
;  While GetKeyState("h","p"){
;    Send {BS}
;    TrayTip,Start:,%n%,10,,
;    Sleep 50
;  }
;  return

;^j::Send,{Enter}      ; C-j to Enter

; For HHKB
; ESC to ` like normal keyboard (ESC is placed on the left of 1 in HHKB)
!1::!`                ; IME

; Disable alt to menu
~LAlt Up::
~LAlt::
return
; }}} Basic Settings

; Cursor, Mouse, Window move/size {{{
; Cursor {{{
!^h::Send, {Left}
!^j::Send, {Down}
!^k::Send, {Up}
!^l::Send, {Right}
; }}} Cursor

; Mouse {{{
; Mouse Move
^+h::MouseMove, -10, 0, 0, R
^+j::MouseMove, 0, 10, 0, R
^+k::MouseMove, 0, -10, 0, R
^+l::MouseMove, 10, 0, 0, R

; Click
^+n::MouseClick, Left
^+p::MouseClick, Right
; Right click on current window

; Mouse wheel
!^m::MouseClick, WheelDown, , , 2
!^,::MouseClick, WheelUp, , , 2
; }}} Mouse

; Window move {{{

; Move a little
^+y::
  WinGetPos, X, Y, , , A ;A for Active Window
  WinMove, A, ,X-20, Y,
Return

^+u::
  WinGetPos, X, Y, , , A
  WinMove, A, , X, Y+20
Return

^+i::
  WinGetPos, X, Y, , , A
  WinMove, A, , X, Y-20
Return

^+o::
  WinGetPos, X, Y, , , A
  WinMove, A, , X+20, Y
Return

; Move to a different screen
!^+y:: Send, #+{Left}
!^+u:: Send, #+{Down}
!^+i:: Send, #+{Up}
!^+o:: Send, #+{Right}

; }}} Window move

; Window size {{{

; Almost full
^!Enter::
!+Enter::
  ;WinGetPos, X, Y, W, H, Program Manager ; Full Desktop
  ;Msgbox, Pos At %X% %Y% %W% %H%
  SysGet, MWA, MonitorWorkArea ; w/o Taskbar
  ;Msgbox, %MWALeft% %MWATop% %MWARight% %MWABottom%
  WinMove, A, , MWALeft+LMargin, MWATop+TMargin
    , MWARight-MWALeft-LMargin-RMargin
    , MWABottom-MWATop-TMargin-BMargin
Return

; Minsize
^!+Enter::
  SysGet, MWA, MonitorWorkArea ; w/o Taskbar
  WinMove, A, , MWALeft+LMargin, MWATop+TMargin
    , (MWARight-MWALeft-LMargin-RMargin)*Minsize
    , (MWABottom-MWATop-TMargin-BMargin)*Minsize
Return

; Half size
!+h::
  SysGet, MWA, MonitorWorkArea ; w/o Taskbar
  WinMove, A, , MWALeft+LMargin, MWATop+TMargin
    , (MWARight-MWALeft-LMargin-RMargin)*0.5
    , MWABottom-MWATop-TMargin-BMargin
Return

!+j::
  SysGet, MWA, MonitorWorkArea ; w/o Taskbar
  WinMove, A, , MWALeft+LMargin
    , MWATop+(MWABottom-MWATop)*0.5
    , MWARight-MWALeft-LMargin-RMargin
    , (MWABottom-MWATop-TMargin-BMargin)*0.5
Return

!+k::
  SysGet, MWA, MonitorWorkArea ; w/o Taskbar
  WinMove, A, , MWALeft+LMargin, MWATop+TMargin
    , MWARight-MWALeft-LMargin-RMargin
    , (MWABottom-MWATop-TMargin-BMargin)*0.5
Return

!+l::
  SysGet, MWA, MonitorWorkArea ; w/o Taskbar
  WinMove, A, , MWALeft+(MWARight-MWALeft)*0.5
    , MWATop+TMargin
    , (MWARight-MWALeft-LMargin-RMargin)*0.5
    , MWABottom-MWATop-TMargin-BMargin
Return

; Resize
!+y::
  WinGetPos, X, Y, W, H, A
  WinMove, A, ,X, Y, W-20, H
Return

!+u::
  WinGetPos, X, Y, W, H, A
  WinMove, A, ,X, Y, W, H+20
Return

!+i::
  WinGetPos, X, Y, W, H, A
  WinMove, A, ,X, Y, W, H-20
Return

!+o::
  WinGetPos, X, Y, W, H, A
  WinMove, A, ,X, Y, W+20, H
Return

; }}} Window size
; }}} Cursor, Mouse, Window move
; }}} Global Settings


Changes how bulk transferring is handled

;
;Program Name by Noahc3
;Additional Credits
;Built with Autohotkey 1.1.22.09
;Program Version
;
;Source Code available at [Link]
;

val1 = 0
val2 = 0
val3 = 0
val4 = 0
val5 = 0
val6 = 0
val7 = 0
val8 = 0
val9 = 0
val10 = 0
val11 = 0
val12 = 0
val13 = 0
val17 = 0
val31 = 0

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

#Include %A_ScriptDir%\libs\csv_lib.ahk
#Include %A_ScriptDir%\libs\tf.ahk
#Include %A_ScriptDir%\libs\zip.ahk

Gui, Main:default

CSV_Load("output.csv", "teamList", ",")

ifnotexist, %A_ScriptDir%\res
{
	FileCreateDir, %A_ScriptDir%\res
	FileCreateDir, %A_ScriptDir%\res\pokemon
	DownloadFile("https://s3.amazonaws.com/noahc3-go/pkmn.zip", A_ScriptDir . "\res\pkmn.zip", false, true)

	Unz(A_ScriptDir . "\res\pkmn.zip", A_ScriptDir . "\res\pokemon")
}
teamLength:=TF_CountLines("output.csv")
tempVar1 = 2
amountList =
resGet = 1
foundTrainer = 0
trLineCheck = 1
trainerLine = 0

while foundTrainer = 0
{
	trVar1 := CSV_ReadCell("teamList", trLineCheck, 1)
	if trVar1 = trainer
	{
		trainerLine = trLineCheck
		amountList = %amountList%Trainer|
		foundTrainer = 1
	}
	else
	{
		trLineCheck += 1
	}
}

tempVar1 = 2
while not tempVar1 = teamLength
{
	tempVar12 := round(((CSV_ReadCell("teamList", tempVar1, 10) + CSV_ReadCell("teamList", tempVar1, 11) + CSV_ReadCell("teamList", tempVar1, 12)) / 45) * 100, 2)

	tempVar2 := CSV_ReadCell("teamList", tempVar1, 2)

	tempVar4 := CSV_ReadCell("teamList", tempVar1, 3)

	amountList = %amountList%%tempVar2%`,   CP: %tempVar4%`,   IV: %tempVar12%`%|

	tempVar1 += 1
}

Gui, Add, DropDownList, x12 y29 w220 h240 AltSubmit gPokeList vPokeList Choose1 HwndPokelisthwnd, %amountList%
Gui, Add, Picture, x32 y69 w100 h100 +Border vPokemonIcon, %A_ScriptDir%\res\pokemon\1.png
Gui, Add, Text, x32 y179 w100 h20 +Center +Border vIDText, ID
Gui, Add, Text, x162 y69 w100 h20 vHPText, HP/HPMAX
Gui, Add, Progress, x162 y89 w180 h10 +Border vHealthBar, 100
Gui, Add, Text, x285 y69 w70 h20 vCP, CP:
Gui, Add, Text, x32 y219 w100 h20 +Center vWeight, Weight (KG):
Gui, Add, Text, x32 y249 w100 h20 +Center vHeight, Height (M):
Gui, Add, Button, x585 y279 w100 h30 gClose, Close
Gui, Add, Button, x465 y279 w100 h30 gTransfer, Transfer
Gui, Add, Button, x345 y279 w100 h30 gBulkTransfer, Bulk Transfer
Gui, Add, Text, x162 y124 w70 h20 vIV, IV's:
Gui, Add, Text, x162 y144 w150 h20 vAIV, Attack:
Gui, Add, Text, x162 y164 w150 h20 vDIV, Defense:
Gui, Add, Text, x162 y184 w150 h20 vHIV, HP:
Gui, Add, Text, x162 y204 w150 h20 vPIV, Perfection:
Gui, Add, Text, x162 y224 w150 h20 vPokeCoins, PokeCoins:
Gui, Add, Picture, x340 y127 w16 h16 , %A_ScriptDir%\res\img\pokeball.png
Gui, Add, Text, x360 y129 w230 h20 vPokeball, Pokeball Used: Standard
Gui, Add, Text, x360 y159 w230 h20 vFWeight, Full Weight (KG):
Gui, Add, Text, x360 y179 w230 h20 vFHeight, Full Height (M):
Gui, Add, Text, x360 y239 w230 h20 vCPMult, CP Multiplier:
Gui, Add, Text, x360 y219 w230 h20 vUUID, Pokemon UUID:
Gui, Add, Text, x360 y199 w230 h20 vIDBase, ID:
Gui, Add, Text, x360 y69 w170 h20 vMove1, Move 1:
Gui, Add, Text, x530 y69 w170 h20 vMove2, Move 2:
; Generated using SmartGUI Creator 4.0
Gui, Show, h321 w699, Pokemon GO! Team Manager

DefaultDDL()

Return

PokeList:
	Gui, Submit, Nohide

	if PokeList = 1
	{
		DefaultDDL()
	}
	else
	{
		val1 := CSV_ReadCell("teamList", PokeList, 2)
		val2 := CSV_ReadCell("teamList", PokeList, 3)
		val3 := CSV_ReadCell("teamList", PokeList, 4)
		val4 := CSV_ReadCell("teamList", PokeList, 5)
		val5 := CSV_ReadCell("teamList", PokeList, 6)
		val6 := CSV_ReadCell("teamList", PokeList, 7)
		val7 := CSV_ReadCell("teamList", PokeList, 8)
		val8 := CSV_ReadCell("teamList", PokeList, 9)
		val9 := CSV_ReadCell("teamList", PokeList, 10)
		val10 := CSV_ReadCell("teamList", PokeList, 11)
		val11 := CSV_ReadCell("teamList", PokeList, 12)
		val12 := CSV_ReadCell("teamList", PokeList, 13)
		val13 := CSV_ReadCell("teamList", PokeList, 14)
		val17 := CSV_ReadCell("teamList", PokeList, 15)
		val31 := round(((CSV_ReadCell("teamList", PokeList, 10) + CSV_ReadCell("teamList", PokeList, 11) + CSV_ReadCell("teamList", PokeList, 12)) / 45) * 100, 2)

		val14 := getIdenFromName(val1)

		val15 := Round(val7, 2)
		val16 := Round(val8, 2)

		if val13 = ITEM_POKE_BALL
		{
			val13 = Standard
		}
		else if val13 = ITEM_GREAT_BALL
		{
			val13 = Great
		}
		else if val13 = ITEM_ULTRA_BALL
		{
			val13 = Ultra
		}
		else
		{
			val13 = Promo/Unknown
		}

		GuiControl, Text, IDText, %val1%

		GuiControl, show, CP
		GuiControl, show, CPMult
		GuiControl, show, IDBase
		GuiControl, show, Transfer
		GuiControl, show, Bulk Transfer
		GuiControl, show, PIV
		GuiControl, hide, PokeCoins
		GuiControl, Text, IV, IVs:

		GuiControl, Text, CP, CP: %val2%
		GuiControl, Text, Height, Height (M): %val15%
		GuiControl, Text, Weight, Weight (KG): %val16%
		GuiControl, Text, FHeight, Full Height (M): %val7%
		GuiControl, Text, FWeight, Full Weight (KG): %val8%
		GuiControl, Text, AIV, Attack: %val9%
		GuiControl, Text, DIV, Defense: %val10%
		GuiControl, Text, HIV, HP: %val11%
		GuiControl, Text, PIV, Perfection: %val31%`%
		GuiControl, Text, Pokeball, Pokeball Caught In: %val13%
		GuiControl, Text, Move1, Move 1: %val5%
		GuiControl, Text, Move2, Move 2: %val6%
		GuiControl, Text, HPText, HP: %val3%`/%val4%
		GuiControl, Text, CPMult, CP Multiplier: %val12%
		GuiControl, Text, IDBase, ID: %val14%
		GuiControl, Text, UUID, Pokemon UUID %val17%
		GuiControl, , PokemonIcon, %A_ScriptDir%\res\pokemon\%val14%.png

		healthPercentage := ((val3 / val4)  * 100)

		GuiControl, , HealthBar, %healthPercentage%

		Gui, Submit, Nohide
	}

return

Transfer:

	FileDelete, %A_ScriptDir%\libs\py\pogoapi\doneRelease.txt
	run, %comspec% /k python "%A_ScriptDir%\libs\py\pogoapi\release.py" --uuid %val17%, %A_ScriptDir%\libs\py\pogoapi

	continue = 0

	While continue = 0
	{
		IfExist, %A_ScriptDir%\libs\py\pogoapi\doneRelease.txt
		{
			continue = 1
		}
	}

	FileDelete, %A_ScriptDir%\libs\py\pogoapi\doneRelease.txt

	oldPokeList = %PokeList%

	TF_RemoveLines("!output.csv", oldPokeList, oldPokeList)

	CSV_Load("output.csv", "teamList", ",")
	refreshCache()
	GuiControl, Choose, PokeList, |%oldPokeList%

	Gui, Submit, Nohide

	Msgbox, Transfer Finished!
return

BulkTransfer:
	Gui, Bulk:Add, ListBox, x20 y20 w240 h300 AltSubmit vTransferList 8, %amountList%
	Gui, Bulk:Add, Button, x90 y320 w100 h30 gInitBulk, Bulk Transfer
	Gui, Bulk:Show, h400 w280, Bulk Transfer

return

InitBulk:

	MsgBox, 68, Bulk Transfer, This might take some time, would you like to continue?
	IfMsgBox, No
	{
		return
	}

	Gui, Submit, Nohide

	Decrement = 0

	;debug MsgBox, %TransferList%

	transferListStorage := TransferList

	Loop, parse, TransferList, |
	{
		if A_LoopField = 1
		{
			Msgbox, You can't release your trainer! Skipping.
			GoTo skipLoop
		}

		Random, rngsus, 100, 1000

		rngsusPassIn := 750 + rngsus

		sleep, %rngsusPassIn%

		loopFieldStorage := A_LoopField

		uuidField := CSV_ReadCell("teamList", loopFieldStorage, 15)

		;debug MsgBox, %uuidField%

		FileAppend, %uuidField%`n, %A_ScriptDir%\libs\py\pogoapi\releaseUUIDs.txt

		Gui, Submit, Nohide

		skipLoop:

	}

	FileDelete, %A_ScriptDir%\libs\py\pogoapi\doneRelease.txt
	run, %comspec% /k python "%A_ScriptDir%\libs\py\pogoapi\bulkrelease.py", %A_ScriptDir%\libs\py\pogoapi

	continue = 0

	While continue = 0
	{
		IfExist, %A_ScriptDir%\libs\py\pogoapi\doneRelease.txt
		{
			continue = 1
		}
	}

	FileDelete, %A_ScriptDir%\libs\py\pogoapi\releaseUUIDs.txt

	Sort, transferListStorage, R N D|

	Loop, parse, transferListStorage, |
	{
		if A_LoopField = 1
		{
			GoTo skipLoop2
		}
		TF_RemoveLines("!output.csv", A_LoopField, A_LoopField)

		CSV_Load("output.csv", "teamList", ",")
		refreshCache()

		skipLoop2:

	}

	Gui, Bulk:Destroy

	GuiControl, Main:Choose, PokeList, |1

	DefaultDDL()

	FileDelete, %A_ScriptDir%\libs\py\pogoapi\

	MsgBox, Done!

return

Close:
	FileDelete, %A_ScriptDir%\libs\py\pogoapi\info.txt
	FileDelete, %A_ScriptDir%\libs\py\pogoapi\session.txt
	ExitApp
return

^[::
	reload
return

MainGuiClose:
	FileDelete, %A_ScriptDir%\libs\py\pogoapi\info.txt
	FileDelete, %A_ScriptDir%\libs\py\pogoapi\session.txt
	ExitApp
return

BulkGuiClose:
	Gui, Bulk:Destroy
return

DefaultDDL()
{
		val1 := CSV_ReadCell("teamList", 1, 2)
		val2 := CSV_ReadCell("teamList", 1, 3)
		val3 := CSV_ReadCell("teamList", 1, 4)
		val4 := CSV_ReadCell("teamList", 1, 5)
		val5 := CSV_ReadCell("teamList", 1, 6)
		val6 := CSV_ReadCell("teamList", 1, 7)
		val7 := CSV_ReadCell("teamList", 1, 8)
		val8 := CSV_ReadCell("teamList", 1, 9)
		val9 := CSV_ReadCell("teamList", 1, 10)
		val10 := CSV_ReadCell("teamList", 1, 11)
		val11 := CSV_ReadCell("teamList", 1, 12)
		val12 := CSV_ReadCell("teamList", 1, 13)
		val13 := CSV_ReadCell("teamList", 1, 14)
		val17 := CSV_ReadCell("teamList", 1, 15)
		val32 := CSV_ReadCell("teamList", 1, 16)
		val31 := CSV_ReadCell("teamList", 1, 17)

		val5 := round(val5, 2)

		GuiControl, Text, IDText, Level: %val6%
		GuiControl, Hide, CP
		GuiControl, Hide, CPMult
		GuiControl, Hide, IDBase
		GuiControl, Hide, Transfer
		GuiControl, Hide, Bulk Transfer
		GuiControl, Show, PokeCoins
		GuiControl, Text, IV, Stats:
		GuiControl, Text, Weight, Battles Attempted: %val1%
		GuiControl, Text, Height, Battles Won: %val2%
		GuiControl, Text, FHeight, Pokemon Captured: %val10%
		GuiControl, Text, FWeight, Pokemon Encountered: %val11%
		GuiControl, Text, AIV, Pokeballs Thrown: %val9%
		GuiControl, Text, DIV, Stops Visited: %val8%
		GuiControl, Text, HIV, Eggs Hatched: %val3%
		GuiControl, Text, Pokeball, Unique Pokedex Entries %val13%
		GuiControl, Text, Move1, KM Walked: %val5%
		GuiControl, Text, Move2, Prestige Dropped: %val12%
		GuiControl, Text, HPText, XP: %val4%`/%val7%
		GuiControl, Text, UUID, Previous Level XP: %val17%
		GuiControl, Text, PIV, Stardust: %val31%
		GuiControl, Text, PokeCoins, PokeCoins: %val32%
		GuiControl, , PokemonIcon, %A_ScriptDir%\res\img\trainer_1.png

		val21 := ((val4 / val7) * 100)

		GuiControl, , HealthBar, %val21%
}

^\::
	if Pokelist = 1
	{
		return
	}
	else
	{
		Goto, Transfer
	}
return

refreshCache()
{

	teamLength:=TF_CountLines("output.csv")
	tempVar1 = 2
	amountList =
	resGet = 1
	foundTrainer = 0
	trLineCheck = 1
	trainerLine = 0

	while foundTrainer = 0
	{
		trVar1 := CSV_ReadCell("teamList", trLineCheck, 1)
		if trVar1 = trainer
		{
			trainerLine = trLineCheck
			amountList = %amountList%Trainer|
			foundTrainer = 1
		}
		else
		{
			trLineCheck += 1
		}
	}

	tempVar1 = 2
	while not tempVar1 = teamLength
	{
		tempVar2 := CSV_ReadCell("teamList", tempVar1, 2)

		tempVar4 := CSV_ReadCell("teamList", tempVar1, 3)

		amountList = %amountList%%tempVar2%`, CP: %tempVar4%|

		tempVar1 += 1
	}
	GuiControl, Main: , PokeList, |
	GuiControl, Main: , PokeList, %amountList%
	GuiControl, Bulk: , TransferList, |
	GuiControl, Bulk: , TransferList, %amountList%

	DefaultDDL()
}

;File Downloader by Bruttosozialprodukt
DownloadFile(UrlToFile, SaveFileAs, Overwrite := True, UseProgressBar := True) {
    ;Check if the file already exists and if we must not overwrite it
      If (!Overwrite && FileExist(SaveFileAs))
          Return
    ;Check if the user wants a progressbar
      If (UseProgressBar) {
          ;Initialize the WinHttpRequest Object
            WebRequest := ComObjCreate("WinHttp.WinHttpRequest.5.1")
          ;Download the headers
            WebRequest.Open("HEAD", UrlToFile)
            WebRequest.Send()
          ;Store the header which holds the file size in a variable:
            FinalSize := WebRequest.GetResponseHeader("Content-Length")
          ;Create the progressbar and the timer
            Progress, H80, , Downloading..., %UrlToFile%
            SetTimer, __UpdateProgressBar, 100
      }
    ;Download the file
      UrlDownloadToFile, %UrlToFile%, %SaveFileAs%
    ;Remove the timer and the progressbar because the download has finished
      If (UseProgressBar) {
          Progress, Off
          SetTimer, __UpdateProgressBar, Off
      }
    Return

    ;The label that updates the progressbar
      __UpdateProgressBar:
          ;Get the current filesize and tick
            CurrentSize := FileOpen(SaveFileAs, "r").Length ;FileGetSize wouldn't return reliable results
            CurrentSizeTick := A_TickCount
          ;Calculate the downloadspeed
            Speed := Round((CurrentSize/1024-LastSize/1024)/((CurrentSizeTick-LastSizeTick)/1000)) . " Kb/s"
          ;Save the current filesize and tick for the next time
            LastSizeTick := CurrentSizeTick
            LastSize := FileOpen(SaveFileAs, "r").Length
          ;Calculate percent done
            PercentDone := Round(CurrentSize/FinalSize*100)
          ;Update the ProgressBar
            Progress, %PercentDone%, %PercentDone%`% Done, Downloading...  (%Speed%), Downloading %SaveFileAs% (%PercentDone%`%)
      Return
}

;oh god dont look man, look for some reason it wouldnt work when i put it in a seperate library and i didnt feel like spending more time on why :P

getIdenFromName(id)
{
	if id = Bulbasaur
	{
	return 1
	}
	else if id = Ivysaur
	{
	return 2
	}
	else if id = Venusaur
	{
	return 3
	}
	else if id = Charmander
	{
	return 4
	}
	else if id = Charmeleon
	{
	return 5
	}
	else if id = Charizard
	{
	return 6
	}
	else if id = Squirtle
	{
	return 7
	}
	else if id = Wartortle
	{
	return 8
	}
	else if id = Blastoise
	{
	return 9
	}
	else if id = Caterpie
	{
	return 10
	}
	else if id = Metapod
	{
	return 11
	}
	else if id = Butterfree
	{
	return 12
	}
	else if id = Weedle
	{
	return "13"
	}
	else if id = Kakuna
	{
	return 14
	}
	else if id = Beedrill
	{
	return 15
	}
	else if id = Pidgey
	{
	return 16
	}
	else if id = Pidgeotto
	{
	return 17
	}
	else if id = Pidgeot
	{
	return 18
	}
	else if id = Rattata
	{
	return 19
	}
	else if id = Raticate
	{
	return 20
	}
	else if id = Spearow
	{
	return 21
	}
	else if id = Fearow
	{
	return 22
	}
	else if id = Ekans
	{
	return 23
	}
	else if id = Arbok
	{
	return 24
	}
	else if id = Pikachu
	{
	return 25
	}
	else if id = Riachu
	{
	return 26
	}
	else if id = Sandshrew
	{
	return 27
	}
	else if id = Sandslash
	{
	return 28
	}
	else if id = Nidoran_female
	{
	return 29
	}
	else if id = Nidorina
	{
	return 30
	}
	else if id = Nidoqueen
	{
	return 31
	}
	else if id = Nidoran_male
	{
	return 32
	}
	else if id = Nidorino
	{
	return 33
	}
	else if id = Nidoking
	{
	return 34
	}
	else if id = Clefairy
	{
	return 35
	}
	else if id = Clefable
	{
	return 36
	}
	else if id = Vulpix
	{
	return 37
	}
	else if id = Ninetales
	{
	return 38
	}
	else if id = Jigglypuff
	{
	return 39
	}
	else if id = Wifflytuff
	{
	return 40
	}
	else if id = Zubat
	{
	return 41
	}
	else if id = Golbat
	{
	return 42
	}
	else if id = Oddish
	{
	return 43
	}
	else if id = Gloom
	{
	return 44
	}
	else if id = Vileplume
	{
	return 45
	}
	else if id = Paras
	{
	return 46
	}
	else if id = Parasect
	{
	return 47
	}
	else if id = Venonat
	{
	return 48
	}
	else if id = Venomoth
	{
	return 49
	}
	else if id = Diglett
	{
	return 50
	}
	else if id = Dugtrio
	{
	return 51
	}
	else if id = Meowth
	{
	return 52
	}
	else if id = Persian
	{
	return 53
	}
	else if id = Psyduck
	{
	return 54
	}
	else if id = Golduck
	{
	return 55
	}
	else if id = Mankey
	{
	return 56
	}
	else if id = Primeape
	{
	return 57
	}
	else if id = Glowlithe
	{
	return 58
	}
	else if id = Arcanine
	{
	return 59
	}
	else if id = Poliwag
	{
	return 60
	}
	else if id = Poliwhirl
	{
	return 61
	}
	else if id = Poliwrath
	{
	return 62
	}
	else if id = Abra
	{
	return 63
	}
	else if id = Kadabra
	{
	return 64
	}
	else if id = Alakazam
	{
	return 65
	}
	else if id = Machop
	{
	return 66
	}
	else if id = Machoke
	{
	return 67
	}
	else if id = Machamp
	{
	return 68
	}
	else if id = Bellsprout
	{
	return 69
	}
	else if id = Weepinbell
	{
	return 70
	}
	else if id = Victreebel
	{
	return 71
	}
	else if id = Tentacool
	{
	return 72
	}
	else if id = Tentacruel
	{
	return 73
	}
	else if id = Geodude
	{
	return 74
	}
	else if id = Graveler
	{
	return 75
	}
	else if id = Golem
	{
	return 76
	}
	else if id = Ponyta
	{
	return 77
	}
	else if id = Rapidash
	{
	return 78
	}
	else if id = Slowpoke
	{
	return 79
	}
	else if id = Slowbro
	{
	return 80
	}
	else if id = Magnemite
	{
	return 81
	}
	else if id = Magneton
	{
	return 82
	}
	else if id = Farfetchd
	{
	return 83
	}
	else if id = Doduo
	{
	return 84
	}
	else if id = Dodrio
	{
	return 85
	}
	else if id = Seel
	{
	return 86
	}
	else if id = Dewgong
	{
	return 87
	}
	else if id = Grimer
	{
	return 88
	}
	else if id = Muk
	{
	return 89
	}
	else if id = Shellder
	{
	return 90
	}
	else if id = Cloyster
	{
	return 91
	}
	else if id = Gastly
	{
	return 92
	}
	else if id = Haunter
	{
	return 93
	}
	else if id = Gengar
	{
	return 94
	}
	else if id = Onic
	{
	return 95
	}
	else if id = Drowzee
	{
	return 96
	}
	else if id = Hypno
	{
	return 97
	}
	else if id = Krabby
	{
	return 98
	}
	else if id = Kingler
	{
	return 99
	}
	else if id = Voltorb
	{
	return 100
	}
	else if id = Electrode
	{
	return 101
	}
	else if id = Exeggcute
	{
	return 102
	}
	else if id = Exeggutor
	{
	return 103
	}
	else if id = Cubone
	{
	return 104
	}
	else if id = Marowak
	{
	return 105
	}
	else if id = Hitmonlee
	{
	return 106
	}
	else if id = Hitmonchan
	{
	return 107
	}
	else if id = Lickitung
	{
	return 108
	}
	else if id = Koffing
	{
	return 109
	}
	else if id = Weezing
	{
	return 110
	}
	else if id = Rhyhorn
	{
	return 111
	}
	else if id = Rhydon
	{
	return 112
	}
	else if id = Chansey
	{
	return 113
	}
	else if id = Tangela
	{
	return 114
	}
	else if id = Kangaskhan
	{
	return 115
	}
	else if id = Horsea
	{
	return 116
	}
	else if id = Seadra
	{
	return 117
	}
	else if id = Goldeen
	{
	return 118
	}
	else if id = Seaking
	{
	return 119
	}
	else if id = Staryu
	{
	return 120
	}
	else if id = Starmie
	{
	return 121
	}
	else if id = Mr Mime
	{
	return 122
	}
	else if id = Scyther
	{
	return 123
	}
	else if id = Jynx
	{
	return 124
	}
	else if id = Electabuzz
	{
	return 125
	}
	else if id = Magmar
	{
	return 126
	}
	else if id = Pinsir
	{
	return 127
	}
	else if id = Tauros
	{
	return 128
	}
	else if id = Magikarp
	{
	return 129
	}
	else if id = Gyrados
	{
	return 130
	}
	else if id = Lapras
	{
	return 131
	}
	else if id = Ditto
	{
	return 132
	}
	else if id = Eevee
	{
	return 133
	}
	else if id = Vaporeon
	{
	return 134
	}
	else if id = Jolteon
	{
	return 135
	}
	else if id = Flareon
	{
	return 136
	}
	else if id = Porygon
	{
	return 137
	}
	else if id = Omanyte
	{
	return 138
	}
	else if id = Omastar
	{
	return 139
	}
	else if id = Kabuto
	{
	return 140
	}
	else if id = Kabutops
	{
	return 141
	}
	else if id = Aerodactyl
	{
	return 142
	}
	else if id = Snorlax
	{
	return 143
	}
	else if id = Articuno
	{
	return 144
	}
	else if id = Zapdos
	{
	return 145
	}
	else if id = Moltres
	{
	return 146
	}
	else if id = Dratini
	{
	return 147
	}
	else if id = Dragonair
	{
	return 148
	}
	else if id = Dragonite
	{
	return 149
	}
	else if id = Mewtwo
	{
	return 150
	}
	else if id = Mew
	{
	return 151
	}
}
return

;
;Program Name by Noahc3
;Additional Credits
;Built with Autohotkey 1.1.22.09
;Program Version
;
;Source Code available at [Link]
;

val1 = 0
val2 = 0
val3 = 0
val4 = 0
val5 = 0
val6 = 0
val7 = 0
val8 = 0
val9 = 0
val10 = 0
val11 = 0
val12 = 0
val13 = 0
val17 = 0
val31 = 0

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

#Include %A_ScriptDir%\libs\csv_lib.ahk
#Include %A_ScriptDir%\libs\tf.ahk
#Include %A_ScriptDir%\libs\zip.ahk

Gui, Main:default

CSV_Load("output.csv", "teamList", ",")

ifnotexist, %A_ScriptDir%\res
{
	FileCreateDir, %A_ScriptDir%\res
	FileCreateDir, %A_ScriptDir%\res\pokemon
	DownloadFile("https://s3.amazonaws.com/noahc3-go/pkmn.zip", A_ScriptDir . "\res\pkmn.zip", false, true)

	Unz(A_ScriptDir . "\res\pkmn.zip", A_ScriptDir . "\res\pokemon")
}
teamLength:=TF_CountLines("output.csv")
tempVar1 = 2
amountList =
resGet = 1
foundTrainer = 0
trLineCheck = 1
trainerLine = 0

while foundTrainer = 0
{
	trVar1 := CSV_ReadCell("teamList", trLineCheck, 1)
	if trVar1 = trainer
	{
		trainerLine = trLineCheck
		amountList = %amountList%Trainer|
		foundTrainer = 1
	}
	else
	{
		trLineCheck += 1
	}
}

tempVar1 = 2
while not tempVar1 = teamLength
{
	tempVar12 := round(((CSV_ReadCell("teamList", tempVar1, 10) + CSV_ReadCell("teamList", tempVar1, 11) + CSV_ReadCell("teamList", tempVar1, 12)) / 45) * 100, 2)

	tempVar2 := CSV_ReadCell("teamList", tempVar1, 2)

	tempVar4 := CSV_ReadCell("teamList", tempVar1, 3)

	amountList = %amountList%%tempVar2%`,   CP: %tempVar4%`,   IV: %tempVar12%`%|

	tempVar1 += 1
}

Gui, Add, DropDownList, x12 y29 w220 h240 AltSubmit gPokeList vPokeList Choose1 HwndPokelisthwnd, %amountList%
Gui, Add, Picture, x32 y69 w100 h100 +Border vPokemonIcon, %A_ScriptDir%\res\pokemon\1.png
Gui, Add, Text, x32 y179 w100 h20 +Center +Border vIDText, ID
Gui, Add, Text, x162 y69 w100 h20 vHPText, HP/HPMAX
Gui, Add, Progress, x162 y89 w180 h10 +Border vHealthBar, 100
Gui, Add, Text, x285 y69 w70 h20 vCP, CP:
Gui, Add, Text, x32 y219 w100 h20 +Center vWeight, Weight (KG):
Gui, Add, Text, x32 y249 w100 h20 +Center vHeight, Height (M):
Gui, Add, Button, x585 y279 w100 h30 gClose, Close
Gui, Add, Button, x465 y279 w100 h30 gTransfer, Transfer
Gui, Add, Button, x345 y279 w100 h30 gBulkTransfer, Bulk Transfer
Gui, Add, Text, x162 y124 w70 h20 vIV, IV's:
Gui, Add, Text, x162 y144 w150 h20 vAIV, Attack:
Gui, Add, Text, x162 y164 w150 h20 vDIV, Defense:
Gui, Add, Text, x162 y184 w150 h20 vHIV, HP:
Gui, Add, Text, x162 y204 w150 h20 vPIV, Perfection:
Gui, Add, Text, x162 y224 w150 h20 vPokeCoins, PokeCoins:
Gui, Add, Picture, x340 y127 w16 h16 , %A_ScriptDir%\res\img\pokeball.png
Gui, Add, Text, x360 y129 w230 h20 vPokeball, Pokeball Used: Standard
Gui, Add, Text, x360 y159 w230 h20 vFWeight, Full Weight (KG):
Gui, Add, Text, x360 y179 w230 h20 vFHeight, Full Height (M):
Gui, Add, Text, x360 y239 w230 h20 vCPMult, CP Multiplier:
Gui, Add, Text, x360 y219 w230 h20 vUUID, Pokemon UUID:
Gui, Add, Text, x360 y199 w230 h20 vIDBase, ID:
Gui, Add, Text, x360 y69 w170 h20 vMove1, Move 1:
Gui, Add, Text, x530 y69 w170 h20 vMove2, Move 2:
; Generated using SmartGUI Creator 4.0
Gui, Show, h321 w699, Pokemon GO! Team Manager

DefaultDDL()

Return

PokeList:
	Gui, Submit, Nohide

	if PokeList = 1
	{
		DefaultDDL()
	}
	else
	{
		val1 := CSV_ReadCell("teamList", PokeList, 2)
		val2 := CSV_ReadCell("teamList", PokeList, 3)
		val3 := CSV_ReadCell("teamList", PokeList, 4)
		val4 := CSV_ReadCell("teamList", PokeList, 5)
		val5 := CSV_ReadCell("teamList", PokeList, 6)
		val6 := CSV_ReadCell("teamList", PokeList, 7)
		val7 := CSV_ReadCell("teamList", PokeList, 8)
		val8 := CSV_ReadCell("teamList", PokeList, 9)
		val9 := CSV_ReadCell("teamList", PokeList, 10)
		val10 := CSV_ReadCell("teamList", PokeList, 11)
		val11 := CSV_ReadCell("teamList", PokeList, 12)
		val12 := CSV_ReadCell("teamList", PokeList, 13)
		val13 := CSV_ReadCell("teamList", PokeList, 14)
		val17 := CSV_ReadCell("teamList", PokeList, 15)
		val31 := round(((CSV_ReadCell("teamList", PokeList, 10) + CSV_ReadCell("teamList", PokeList, 11) + CSV_ReadCell("teamList", PokeList, 12)) / 45) * 100, 2)

		val14 := getIdenFromName(val1)

		val15 := Round(val7, 2)
		val16 := Round(val8, 2)

		if val13 = ITEM_POKE_BALL
		{
			val13 = Standard
		}
		else if val13 = ITEM_GREAT_BALL
		{
			val13 = Great
		}
		else if val13 = ITEM_ULTRA_BALL
		{
			val13 = Ultra
		}
		else
		{
			val13 = Promo/Unknown
		}

		GuiControl, Text, IDText, %val1%

		GuiControl, show, CP
		GuiControl, show, CPMult
		GuiControl, show, IDBase
		GuiControl, show, Transfer
		GuiControl, show, Bulk Transfer
		GuiControl, show, PIV
		GuiControl, hide, PokeCoins
		GuiControl, Text, IV, IVs:

		GuiControl, Text, CP, CP: %val2%
		GuiControl, Text, Height, Height (M): %val15%
		GuiControl, Text, Weight, Weight (KG): %val16%
		GuiControl, Text, FHeight, Full Height (M): %val7%
		GuiControl, Text, FWeight, Full Weight (KG): %val8%
		GuiControl, Text, AIV, Attack: %val9%
		GuiControl, Text, DIV, Defense: %val10%
		GuiControl, Text, HIV, HP: %val11%
		GuiControl, Text, PIV, Perfection: %val31%`%
		GuiControl, Text, Pokeball, Pokeball Caught In: %val13%
		GuiControl, Text, Move1, Move 1: %val5%
		GuiControl, Text, Move2, Move 2: %val6%
		GuiControl, Text, HPText, HP: %val3%`/%val4%
		GuiControl, Text, CPMult, CP Multiplier: %val12%
		GuiControl, Text, IDBase, ID: %val14%
		GuiControl, Text, UUID, Pokemon UUID %val17%
		GuiControl, , PokemonIcon, %A_ScriptDir%\res\pokemon\%val14%.png

		healthPercentage := ((val3 / val4)  * 100)

		GuiControl, , HealthBar, %healthPercentage%

		Gui, Submit, Nohide
	}

return

Transfer:

	FileDelete, %A_ScriptDir%\libs\py\pogoapi\doneRelease.txt
	run, python "%A_ScriptDir%\libs\py\pogoapi\release.py" --uuid %val17%, %A_ScriptDir%\libs\py\pogoapi

	continue = 0

	While continue = 0
	{
		IfExist, %A_ScriptDir%\libs\py\pogoapi\doneRelease.txt
		{
			continue = 1
		}
	}

	FileDelete, %A_ScriptDir%\libs\py\pogoapi\doneRelease.txt

	oldPokeList = %PokeList%

	TF_RemoveLines("!output.csv", oldPokeList, oldPokeList)

	CSV_Load("output.csv", "teamList", ",")
	refreshCache()
	GuiControl, Choose, PokeList, |%oldPokeList%

	Gui, Submit, Nohide

	Msgbox, Transfer Finished!
return

BulkTransfer:
	Gui, Bulk:Add, ListBox, x20 y20 w240 h300 AltSubmit vTransferList 8, %amountList%
	Gui, Bulk:Add, Button, x90 y320 w100 h30 gInitBulk, Bulk Transfer
	Gui, Bulk:Show, h400 w280, Bulk Transfer

return

InitBulk:

	MsgBox, 68, Bulk Transfer, This might take some time, would you like to continue?
	IfMsgBox, No
	{
		return
	}

	Gui, Submit, Nohide

	Decrement = 0

	;debug MsgBox, %TransferList%

	transferListStorage := TransferList

	Loop, parse, TransferList, |
	{
		if A_LoopField = 1
		{
			Msgbox, You can't release your trainer! Skipping.
			GoTo skipLoop
		}

		Random, rngsus, 100, 1000

		rngsusPassIn := 750 + rngsus

		sleep, %rngsusPassIn%

		loopFieldStorage := A_LoopField

		uuidField := CSV_ReadCell("teamList", loopFieldStorage, 15)

		;debug MsgBox, %uuidField%

		FileDelete, %A_ScriptDir%\libs\py\pogoapi\doneRelease.txt
		run, python "%A_ScriptDir%\libs\py\pogoapi\release.py" --uuid %uuidField%, %A_ScriptDir%\libs\py\pogoapi

		continue = 0

		While continue = 0
		{
			IfExist, %A_ScriptDir%\libs\py\pogoapi\doneRelease.txt
			{
				continue = 1
			}
		}

		FileDelete, %A_ScriptDir%\libs\py\pogoapi\doneRelease.txt

		Gui, Submit, Nohide

		skipLoop:

	}

	Sort, transferListStorage, R N D|

	Loop, parse, transferListStorage, |
	{
		if A_LoopField = 1
		{
			GoTo skipLoop2
		}
		TF_RemoveLines("!output.csv", A_LoopField, A_LoopField)

		CSV_Load("output.csv", "teamList", ",")
		refreshCache()

		skipLoop2:

	}

	Gui, Bulk:Destroy

	GuiControl, Main:Choose, PokeList, |1

	DefaultDDL()

	MsgBox, Done!

return

Close:
	FileDelete, %A_ScriptDir%\libs\py\pogoapi\info.txt
	FileDelete, %A_ScriptDir%\libs\py\pogoapi\session.txt
	ExitApp
return

^[::
	reload
return

MainGuiClose:
	FileDelete, %A_ScriptDir%\libs\py\pogoapi\info.txt
	FileDelete, %A_ScriptDir%\libs\py\pogoapi\session.txt
	ExitApp
return

BulkGuiClose:
	Gui, Bulk:Destroy
return

DefaultDDL()
{
		val1 := CSV_ReadCell("teamList", 1, 2)
		val2 := CSV_ReadCell("teamList", 1, 3)
		val3 := CSV_ReadCell("teamList", 1, 4)
		val4 := CSV_ReadCell("teamList", 1, 5)
		val5 := CSV_ReadCell("teamList", 1, 6)
		val6 := CSV_ReadCell("teamList", 1, 7)
		val7 := CSV_ReadCell("teamList", 1, 8)
		val8 := CSV_ReadCell("teamList", 1, 9)
		val9 := CSV_ReadCell("teamList", 1, 10)
		val10 := CSV_ReadCell("teamList", 1, 11)
		val11 := CSV_ReadCell("teamList", 1, 12)
		val12 := CSV_ReadCell("teamList", 1, 13)
		val13 := CSV_ReadCell("teamList", 1, 14)
		val17 := CSV_ReadCell("teamList", 1, 15)
		val32 := CSV_ReadCell("teamList", 1, 16)
		val31 := CSV_ReadCell("teamList", 1, 17)

		val5 := round(val5, 2)

		GuiControl, Text, IDText, Level: %val6%
		GuiControl, Hide, CP
		GuiControl, Hide, CPMult
		GuiControl, Hide, IDBase
		GuiControl, Hide, Transfer
		GuiControl, Hide, Bulk Transfer
		GuiControl, Show, PokeCoins
		GuiControl, Text, IV, Stats:
		GuiControl, Text, Weight, Battles Attempted: %val1%
		GuiControl, Text, Height, Battles Won: %val2%
		GuiControl, Text, FHeight, Pokemon Captured: %val10%
		GuiControl, Text, FWeight, Pokemon Encountered: %val11%
		GuiControl, Text, AIV, Pokeballs Thrown: %val9%
		GuiControl, Text, DIV, Stops Visited: %val8%
		GuiControl, Text, HIV, Eggs Hatched: %val3%
		GuiControl, Text, Pokeball, Unique Pokedex Entries %val13%
		GuiControl, Text, Move1, KM Walked: %val5%
		GuiControl, Text, Move2, Prestige Dropped: %val12%
		GuiControl, Text, HPText, XP: %val4%`/%val7%
		GuiControl, Text, UUID, Previous Level XP: %val17%
		GuiControl, Text, PIV, Stardust: %val31%
		GuiControl, Text, PokeCoins, PokeCoins: %val32%
		GuiControl, , PokemonIcon, %A_ScriptDir%\res\img\trainer_1.png

		val21 := ((val4 / val7) * 100)

		GuiControl, , HealthBar, %val21%
}

^\::
	if Pokelist = 1
	{
		return
	}
	else
	{
		Goto, Transfer
	}
return

refreshCache()
{

	teamLength:=TF_CountLines("output.csv")
	tempVar1 = 2
	amountList =
	resGet = 1
	foundTrainer = 0
	trLineCheck = 1
	trainerLine = 0

	while foundTrainer = 0
	{
		trVar1 := CSV_ReadCell("teamList", trLineCheck, 1)
		if trVar1 = trainer
		{
			trainerLine = trLineCheck
			amountList = %amountList%Trainer|
			foundTrainer = 1
		}
		else
		{
			trLineCheck += 1
		}
	}

	tempVar1 = 2
	while not tempVar1 = teamLength
	{
		tempVar2 := CSV_ReadCell("teamList", tempVar1, 2)

		tempVar4 := CSV_ReadCell("teamList", tempVar1, 3)

		amountList = %amountList%%tempVar2%`, CP: %tempVar4%|

		tempVar1 += 1
	}
	GuiControl, Main: , PokeList, |
	GuiControl, Main: , PokeList, %amountList%
	GuiControl, Bulk: , TransferList, |
	GuiControl, Bulk: , TransferList, %amountList%

	DefaultDDL()
}

;File Downloader by Bruttosozialprodukt
DownloadFile(UrlToFile, SaveFileAs, Overwrite := True, UseProgressBar := True) {
    ;Check if the file already exists and if we must not overwrite it
      If (!Overwrite && FileExist(SaveFileAs))
          Return
    ;Check if the user wants a progressbar
      If (UseProgressBar) {
          ;Initialize the WinHttpRequest Object
            WebRequest := ComObjCreate("WinHttp.WinHttpRequest.5.1")
          ;Download the headers
            WebRequest.Open("HEAD", UrlToFile)
            WebRequest.Send()
          ;Store the header which holds the file size in a variable:
            FinalSize := WebRequest.GetResponseHeader("Content-Length")
          ;Create the progressbar and the timer
            Progress, H80, , Downloading..., %UrlToFile%
            SetTimer, __UpdateProgressBar, 100
      }
    ;Download the file
      UrlDownloadToFile, %UrlToFile%, %SaveFileAs%
    ;Remove the timer and the progressbar because the download has finished
      If (UseProgressBar) {
          Progress, Off
          SetTimer, __UpdateProgressBar, Off
      }
    Return

    ;The label that updates the progressbar
      __UpdateProgressBar:
          ;Get the current filesize and tick
            CurrentSize := FileOpen(SaveFileAs, "r").Length ;FileGetSize wouldn't return reliable results
            CurrentSizeTick := A_TickCount
          ;Calculate the downloadspeed
            Speed := Round((CurrentSize/1024-LastSize/1024)/((CurrentSizeTick-LastSizeTick)/1000)) . " Kb/s"
          ;Save the current filesize and tick for the next time
            LastSizeTick := CurrentSizeTick
            LastSize := FileOpen(SaveFileAs, "r").Length
          ;Calculate percent done
            PercentDone := Round(CurrentSize/FinalSize*100)
          ;Update the ProgressBar
            Progress, %PercentDone%, %PercentDone%`% Done, Downloading...  (%Speed%), Downloading %SaveFileAs% (%PercentDone%`%)
      Return
}

;oh god dont look man, look for some reason it wouldnt work when i put it in a seperate library and i didnt feel like spending more time on why :P

getIdenFromName(id)
{
	if id = Bulbasaur
	{
	return 1
	}
	else if id = Ivysaur
	{
	return 2
	}
	else if id = Venusaur
	{
	return 3
	}
	else if id = Charmander
	{
	return 4
	}
	else if id = Charmeleon
	{
	return 5
	}
	else if id = Charizard
	{
	return 6
	}
	else if id = Squirtle
	{
	return 7
	}
	else if id = Wartortle
	{
	return 8
	}
	else if id = Blastoise
	{
	return 9
	}
	else if id = Caterpie
	{
	return 10
	}
	else if id = Metapod
	{
	return 11
	}
	else if id = Butterfree
	{
	return 12
	}
	else if id = Weedle
	{
	return "13"
	}
	else if id = Kakuna
	{
	return 14
	}
	else if id = Beedrill
	{
	return 15
	}
	else if id = Pidgey
	{
	return 16
	}
	else if id = Pidgeotto
	{
	return 17
	}
	else if id = Pidgeot
	{
	return 18
	}
	else if id = Rattata
	{
	return 19
	}
	else if id = Raticate
	{
	return 20
	}
	else if id = Spearow
	{
	return 21
	}
	else if id = Fearow
	{
	return 22
	}
	else if id = Ekans
	{
	return 23
	}
	else if id = Arbok
	{
	return 24
	}
	else if id = Pikachu
	{
	return 25
	}
	else if id = Riachu
	{
	return 26
	}
	else if id = Sandshrew
	{
	return 27
	}
	else if id = Sandslash
	{
	return 28
	}
	else if id = Nidoran_female
	{
	return 29
	}
	else if id = Nidorina
	{
	return 30
	}
	else if id = Nidoqueen
	{
	return 31
	}
	else if id = Nidoran_male
	{
	return 32
	}
	else if id = Nidorino
	{
	return 33
	}
	else if id = Nidoking
	{
	return 34
	}
	else if id = Clefairy
	{
	return 35
	}
	else if id = Clefable
	{
	return 36
	}
	else if id = Vulpix
	{
	return 37
	}
	else if id = Ninetales
	{
	return 38
	}
	else if id = Jigglypuff
	{
	return 39
	}
	else if id = Wifflytuff
	{
	return 40
	}
	else if id = Zubat
	{
	return 41
	}
	else if id = Golbat
	{
	return 42
	}
	else if id = Oddish
	{
	return 43
	}
	else if id = Gloom
	{
	return 44
	}
	else if id = Vileplume
	{
	return 45
	}
	else if id = Paras
	{
	return 46
	}
	else if id = Parasect
	{
	return 47
	}
	else if id = Venonat
	{
	return 48
	}
	else if id = Venomoth
	{
	return 49
	}
	else if id = Diglett
	{
	return 50
	}
	else if id = Dugtrio
	{
	return 51
	}
	else if id = Meowth
	{
	return 52
	}
	else if id = Persian
	{
	return 53
	}
	else if id = Psyduck
	{
	return 54
	}
	else if id = Golduck
	{
	return 55
	}
	else if id = Mankey
	{
	return 56
	}
	else if id = Primeape
	{
	return 57
	}
	else if id = Glowlithe
	{
	return 58
	}
	else if id = Arcanine
	{
	return 59
	}
	else if id = Poliwag
	{
	return 60
	}
	else if id = Poliwhirl
	{
	return 61
	}
	else if id = Poliwrath
	{
	return 62
	}
	else if id = Abra
	{
	return 63
	}
	else if id = Kadabra
	{
	return 64
	}
	else if id = Alakazam
	{
	return 65
	}
	else if id = Machop
	{
	return 66
	}
	else if id = Machoke
	{
	return 67
	}
	else if id = Machamp
	{
	return 68
	}
	else if id = Bellsprout
	{
	return 69
	}
	else if id = Weepinbell
	{
	return 70
	}
	else if id = Victreebel
	{
	return 71
	}
	else if id = Tentacool
	{
	return 72
	}
	else if id = Tentacruel
	{
	return 73
	}
	else if id = Geodude
	{
	return 74
	}
	else if id = Graveler
	{
	return 75
	}
	else if id = Golem
	{
	return 76
	}
	else if id = Ponyta
	{
	return 77
	}
	else if id = Rapidash
	{
	return 78
	}
	else if id = Slowpoke
	{
	return 79
	}
	else if id = Slowbro
	{
	return 80
	}
	else if id = Magnemite
	{
	return 81
	}
	else if id = Magneton
	{
	return 82
	}
	else if id = Farfetchd
	{
	return 83
	}
	else if id = Doduo
	{
	return 84
	}
	else if id = Dodrio
	{
	return 85
	}
	else if id = Seel
	{
	return 86
	}
	else if id = Dewgong
	{
	return 87
	}
	else if id = Grimer
	{
	return 88
	}
	else if id = Muk
	{
	return 89
	}
	else if id = Shellder
	{
	return 90
	}
	else if id = Cloyster
	{
	return 91
	}
	else if id = Gastly
	{
	return 92
	}
	else if id = Haunter
	{
	return 93
	}
	else if id = Gengar
	{
	return 94
	}
	else if id = Onic
	{
	return 95
	}
	else if id = Drowzee
	{
	return 96
	}
	else if id = Hypno
	{
	return 97
	}
	else if id = Krabby
	{
	return 98
	}
	else if id = Kingler
	{
	return 99
	}
	else if id = Voltorb
	{
	return 100
	}
	else if id = Electrode
	{
	return 101
	}
	else if id = Exeggcute
	{
	return 102
	}
	else if id = Exeggutor
	{
	return 103
	}
	else if id = Cubone
	{
	return 104
	}
	else if id = Marowak
	{
	return 105
	}
	else if id = Hitmonlee
	{
	return 106
	}
	else if id = Hitmonchan
	{
	return 107
	}
	else if id = Lickitung
	{
	return 108
	}
	else if id = Koffing
	{
	return 109
	}
	else if id = Weezing
	{
	return 110
	}
	else if id = Rhyhorn
	{
	return 111
	}
	else if id = Rhydon
	{
	return 112
	}
	else if id = Chansey
	{
	return 113
	}
	else if id = Tangela
	{
	return 114
	}
	else if id = Kangaskhan
	{
	return 115
	}
	else if id = Horsea
	{
	return 116
	}
	else if id = Seadra
	{
	return 117
	}
	else if id = Goldeen
	{
	return 118
	}
	else if id = Seaking
	{
	return 119
	}
	else if id = Staryu
	{
	return 120
	}
	else if id = Starmie
	{
	return 121
	}
	else if id = Mr Mime
	{
	return 122
	}
	else if id = Scyther
	{
	return 123
	}
	else if id = Jynx
	{
	return 124
	}
	else if id = Electabuzz
	{
	return 125
	}
	else if id = Magmar
	{
	return 126
	}
	else if id = Pinsir
	{
	return 127
	}
	else if id = Tauros
	{
	return 128
	}
	else if id = Magikarp
	{
	return 129
	}
	else if id = Gyrados
	{
	return 130
	}
	else if id = Lapras
	{
	return 131
	}
	else if id = Ditto
	{
	return 132
	}
	else if id = Eevee
	{
	return 133
	}
	else if id = Vaporeon
	{
	return 134
	}
	else if id = Jolteon
	{
	return 135
	}
	else if id = Flareon
	{
	return 136
	}
	else if id = Porygon
	{
	return 137
	}
	else if id = Omanyte
	{
	return 138
	}
	else if id = Omastar
	{
	return 139
	}
	else if id = Kabuto
	{
	return 140
	}
	else if id = Kabutops
	{
	return 141
	}
	else if id = Aerodactyl
	{
	return 142
	}
	else if id = Snorlax
	{
	return 143
	}
	else if id = Articuno
	{
	return 144
	}
	else if id = Zapdos
	{
	return 145
	}
	else if id = Moltres
	{
	return 146
	}
	else if id = Dratini
	{
	return 147
	}
	else if id = Dragonair
	{
	return 148
	}
	else if id = Dragonite
	{
	return 149
	}
	else if id = Mewtwo
	{
	return 150
	}
	else if id = Mew
	{
	return 151
	}
}
return


add cmder launch shortcut

add cmder launch shortcut

;Replaces the default Win+E shortcut with XYplorer
#e::
run C:\Program Files (x86)\XYplorer\XYplorer.exe
return

;Ctrl + Alt + R -- reloads current script
^!r::Reload

;Alt + Win + E -- Opens this file
!#e::
EnvGet, HOME, HOMEPATH
run "gvim" "%HOME%\.dotfiles\autohotkey-scripts\my_keyboard_shortcuts.ahk"
Return

OpenWithVim() ;opens current file in vim if using XYPlorer, else opens vim
{
	EnvGet, DROPBOX, DB_HOME
	oldClipboard = %clipboard%
	IfWinActive, ahk_class ThunderRT6FormDC
	{
		SendInput ^p
		Sleep, 100
		Run, "runemacs" "%clipboard%"
		clipboard = %oldClipboard%
	}
	Else
	{
		Run, "runemacs", C:\users\nate
	}
}

Pause::
OpenWithVim()
Return

Insert::
OpenWithVim()
Return

#t::
Run, "C:\cmder\Cmder.exe"
Return

#^t::
Run, "cmd.exe"
Return

;Replaces the default Win+E shortcut with XYplorer
#e::
run C:\Program Files (x86)\XYplorer\XYplorer.exe
return

;Ctrl + Alt + R -- reloads current script
^!r::Reload

;Alt + Win + E -- Opens this file
!#e::
EnvGet, HOME, HOMEPATH
run "gvim" "%HOME%\.dotfiles\autohotkey-scripts\my_keyboard_shortcuts.ahk"
Return

OpenWithVim() ;opens current file in vim if using XYPlorer, else opens vim
{
	EnvGet, DROPBOX, DB_HOME
	oldClipboard = %clipboard%
	IfWinActive, ahk_class ThunderRT6FormDC
	{
		SendInput ^p
		Sleep, 100
		Run, "runemacs" "%clipboard%"
		clipboard = %oldClipboard%
	}
	Else
	{
		Run, "runemacs", C:\users\nate
	}
}

Pause::
OpenWithVim()
Return

Insert::
OpenWithVim()
Return

#t::
Run, "C:\Program Files\ConEmu\ConEmu64.exe"
Return

#^t::
Run, "cmd.exe"
Return