Advertisement
tabnation

arrays intro 1

Jun 14th, 2022
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. f1::
  2. Random, RanNum, 1, 4
  3. if RanNum = 1
  4. {
  5. msgbox, pizza
  6. }
  7. if RanNum = 2
  8. {
  9. msgbox, sub
  10. }
  11. if RanNum = 3
  12. {
  13. msgbox, hotdog
  14. }
  15. if RanNum = 4
  16. {
  17. msgbox, starve
  18. }
  19. Return
  20.  
  21. f2::
  22. ;wordlist:=[]
  23. ;Loop Read,MyWordList.txt ;add file path if somewhere else then script
  24. ; wordlist[A_Index]:=A_LoopReadLine
  25.  
  26. WordList := ["Pizza", "Sub", "Hotdog" , "starve"]
  27. Random, RanNum, 1, % WordList.Count()
  28. Msgbox, %RanNum%
  29. Send, % WordList[RanNum]
  30. Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement