Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. IniRead, TF1, config.ini, EasyText, TF1, t/y
  2. IniRead, TF2, config.ini, EasyText, TF2, tReason?
  3. IniRead, TF3, config.ini, EasyText, TF3, t/cancel
  4. IniRead, TF4, config.ini, EasyText, TF4, t/medkit
  5. IniRead, TF5, config.ini, EasyText, TF5, t/squad
  6. IniRead, TF6, config.ini, EasyText, TF6, t/squad 1
  7. IniRead, TF7, config.ini, EasyText, TF7, t/squad 2
  8. IniRead, TF8, config.ini, EasyText, TF8, t/ratio
  9. IniRead, TF9, config.ini, EasyText, TF9, t/accuracy
  10. IniRead, TF10, config.ini, EasyText, TF10, tHello!
  11.  
  12. Menu, Tray, NoStandard
  13. Menu, Tray, Add, Change Text, MakeGui
  14. Menu, Tray, Add
  15. Menu, Tray, Add, Exit, Exit
  16.  
  17. TimerOff := 1
  18. Return
  19.  
  20. F11::
  21. MakeGui:
  22. Loop, 10
  23. {
  24.     b_index := a_index - 1
  25.     Gui, Add, Text, x64 y10 w50 h20, Team
  26.     Gui, Add, Text, % "x12 y" . b_index * 30 + 40 . " w50 h20", Text%a_index%
  27.     Gui, Add, Checkbox, % "x72 y" . b_index * 30 + 40 . " w20 h20 vTFC" . a_index
  28.     If (SubStr(TF%a_index%,1,1) = "y")
  29.         GuiControl,, TFC%a_index%, 1
  30.     Gui, Add, Edit, % "x92 y" . b_index * 30 + 40 . " w370 h20 vTF" . a_index, % SubStr(TF%a_index%,2)
  31. }
  32. Gui, Add, Button, gUpdateText, Update Text
  33. Gui, Show, x292 y165 h379 w479, EasyText
  34. Return
  35.  
  36. F1::
  37. F2::
  38. F3::
  39. F4::
  40. F5::
  41. F6::
  42. F7::
  43. F8::
  44. F9::
  45. F10::
  46. PrepareText := T%A_ThisLabel%
  47. If (PrepareText != "" && TimerOff)
  48. {
  49.     IfWinActive, ahk_class Ace of Spades
  50.     {
  51.         ReplaceChars := "!#+^"
  52.         Loop, Parse, ReplaceChars
  53.             StringReplace, PrepareText, PrepareText, %A_LoopField%, {%A_LoopField%}
  54.         SendInput, %PrepareText%{ENTER}
  55.         TimerOff := 0
  56.         SetTimer, FixTimer, -5000
  57.     }
  58. }
  59. Return
  60.  
  61. FixTimer:
  62. TimerOff := 1
  63. Return
  64.  
  65. GuiClose:
  66. UpdateText:
  67. Gui, Submit, NoHide
  68. Gui, Destroy
  69. Loop, 10
  70. {
  71.     TFC%a_index% := TFC%a_index% ? "y" : "t"
  72.     IniWrite, % TFC%a_index% . TF%a_index%, config.ini, EasyText, TF%a_index%
  73.     TF%a_index% := TFC%a_index% . TF%a_index%
  74. }
  75. Return
  76.  
  77. Exit:
  78. ExitApp