Guest User

Untitled

a guest
Nov 18th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.62 KB | None | 0 0
  1. #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
  2. ; #Warn ; Enable warnings to assist with detecting common errors.
  3. SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
  4. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
  5. #SingleInstance, Force
  6.  
  7. FileRead, FirstName, FirstName.ini
  8. FileRead, LastName, LastName.ini
  9. FileRead, TeacherName, TeacherName.ini
  10. FileRead, Period, Period.ini
  11. FileRead, Class, Class.ini
  12.  
  13. InputBox, FirstName , MLA Formatter,Type Your First Name:,,,,,,,,%FirstName%
  14. if ErrorLevel
  15. ExitApp,
  16. else
  17. FileDelete, FirstName.ini
  18. FileAppend,%FirstName%, FirstName.ini
  19. InputBox, LastName , MLA Formatter, Type Your Last Name,,,,,,,,%LastName%
  20. if ErrorLevel
  21. ExitApp,
  22. else
  23. FileDelete, LastName.ini
  24. FileAppend,%LastName%, Lastname.ini
  25. InputBox,TeacherName,MLA Formatter,Type Your Teachers Last Name:,,,,,,,,%TeacherName%
  26. If ErrorLevel
  27. ExitApp,
  28. else
  29. FileDelete, TeacherName.ini
  30. FileAppend,%TeacherName%, TeacherName.ini
  31. InputBox, Class, MLA Formatter,Type your class:,,,,,,,,%Class%
  32. If ErrorLevel
  33. Exitapp,
  34. Else
  35. FileDelete, Class.ini
  36. FileAppend, %Class%,Class.ini
  37. InputBox, Period , MLA Formatter,Type The Period Number as a Number,,,,,,,,%Period%
  38. if ErrorLevel
  39. Exitapp,
  40. else
  41. FileDelete, Period.ini
  42. FileAppend, %Period%,Period.ini
  43. MsgBox, 3, MLA Formatter, Is ALL work saved in ALL open instances of Microsoft Word?,
  44. IfMsgBox Yes
  45. GoTo, MLA
  46. IfMSGBox No
  47. MsgBox,1 ,MLA Formatter,Save ALL your work, then press OK.
  48. If ErrorLevel
  49. ExitApp
  50. Else
  51. GoTo, MLA
  52. return
  53.  
  54.  
  55.  
  56.  
  57. MLA:
  58. FormatTime, CurrentTime , YYYYMMDD, MMMM d, yyyy
  59. run, WINWORD.exe
  60. WinWait, Word,,,,,
  61. WinMaximize, Word,,,
  62. sleep, 2000
  63. send, {Enter}
  64. sleep, 2000
  65. send, {alt}
  66. sleep 1000
  67. send, H
  68. send, FF
  69. send, Times New Roman
  70. send, {enter}
  71. sleep 200
  72. send, {alt}
  73. send, H
  74. send, FS
  75. send, 12
  76. send, {enter}
  77. sleep 200
  78. send, {alt}
  79. send, H
  80. send, K
  81. send, {down}{down}{down}
  82. send, {enter}
  83. send, {esc}{esc}
  84. send, %FirstName%{space}%LastName%
  85. send, {enter}
  86. send, %TeacherName%
  87. send, {enter}
  88. send, %Class%{Space}P%Period%
  89. send, {enter}
  90. send, %CurrentTime%
  91. send, {enter}
  92. send, {alt} ;Page Break
  93. send, N
  94. send, B
  95. send, {enter}
  96. sleep 2000
  97. MouseMove, 670, 550,, ;Header
  98. Click, 2
  99. send, {alt}
  100. send, H
  101. send, FF
  102. send, Times New Roman
  103. send, {enter}
  104. sleep 1000
  105. send, {alt}
  106. send, JH
  107. sleep 100
  108. send, NU
  109. sleep 100
  110. send, T
  111. sleep 100
  112. send, {down}
  113. sleep 100
  114. send, {down}
  115. sleep 100
  116. send, {enter}
  117. send, {alt} ;different first page
  118. send, JH
  119. send, A
  120. send, %LastName% - {space}
  121. sleep, 500
  122. send, {esc}{esc}
  123. send, {backspace}{backspace}
  124. send, {down}
  125. send, {backspace}{backspace}
  126. sleep 1500
  127. MsgBox, , MLA Format, Done! `n`n`nNote: The page # and last name on the pages after the 1st are there just not currently shown because you only have 1 page in your document., 30
  128. return
  129.  
  130.  
  131. #t::
  132. GoTo, MLA
  133. return
Add Comment
Please, Sign In to add comment