SHARE
TWEET

Loop Append File Example AHK

Lateralus138 Dec 31st, 2019 (edited) 438 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; Example
  2. loop,300
  3.     FileAppend, % "var cat" A_Index " = false`n", my_cat_file.txt
  4.  
  5. ; longer, more human readable way:
  6.  
  7. myFile := "my_cat_file.txt"
  8. loop,300
  9. {
  10.     thisString := "var cat" . A_Index . " = false`n"
  11.     FileAppend, %thisString%, %myFile%
  12. }
  13. thisString:=myFile:=""
  14.  
  15. ; To create variables dynamically in loop
  16.  
  17. loop,300
  18.     cat%A_Index% := 0 ; 0 = False
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top