Advertisement
Guest User

Untitled

a guest
Dec 3rd, 2020
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SetWorkingDir %A_ScriptDir%
  2.  
  3. FileRead, slopeStr, % A_ScriptDir "\d3.txt"
  4.  
  5. slopeLines := StrSplit(slopeStr, "`r`n")
  6.  
  7. count := 0
  8.  
  9. xPos := 0
  10. for yPos, Line in slopeLines {
  11.     if SubStr(Line, xPos + 1, 1) = "#"
  12.         count += 1
  13.     xPos := Mod(xPos + 3, StrLen(Line))
  14. }
  15.  
  16. Clipboard := count
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement