Advertisement
Lateralus138

Loop Append File Example AHK

Dec 31st, 2019
562
0
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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement