Advertisement
rossy__

Killa's Rep Tracker

Nov 16th, 2017
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;Prerequisites:
  2. ;A file named reps.txt that contains a number in the same directory as this file
  3.  
  4. FileRead, Reps, reps.txt                ;Reads in the reps.txt file for the number of reps
  5.                                         ;and stores it in Reps variable
  6.  
  7. FileDelete, temp.txt                    ;Deletes the temp.txt file if it exists
  8.  
  9. NumpadAdd::                             ;Hotkey function for numpad +
  10.     Reps += 5                           ;Adds 5 to the Reps variable
  11.     FileAppend, %Reps%, temp.txt        ;Creates temp.txt and writes the number of reps to the file
  12.     FileCopy, temp.txt, reps.txt, 1     ;Copies temp.txt over reps.txt and overwrites
  13.     FileDelete, temp.txt                ;Deletes temp.txt file
  14. Return                                  ;Ends hotkey function for numpad +
  15.  
  16. NumpadSub::                             ;Hotkey function for numpad -
  17.     Reps -= 5                           ;Subtracts 5 from the Reps variable
  18.     FileAppend, %Reps%, temp.txt        ;Creates temp.txt and writes the number of reps to the file
  19.     FileCopy, temp.txt, reps.txt, 1     ;Copies temp.txt over reps.txt and overwrites
  20.     FileDelete, temp.txt                ;Deletes temp.txt file
  21. Return                                  ;Ends hotkey function for numpad -
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement