• Support
  • Articles
  • Resources
  • Products

Random/Aleatory Remote connection with a host list

Moderator: boris

3 postsPage 1 of 1

filegam
Newbie

Posts:
9
Joined: Thu Feb 07, 2013 4:53 pm
by filegam » Mon Oct 31, 2016 11:28 am
hello people, I have used logmett for several years, it's amazing and can be used in various fields, a very useful tool, I am very grateful for it exists,

I would like you guys to help to make a random connection, but I'm having trouble, someone would help, thank you...

Code: Select all

  1. ; Aleatory Connection
  2. ;Begin
  3. A0 = '192.168.1.1 /nossh '
  4. A1 = '192.168.1.2 /nossh '
  5. A2 = '192.168.1.6 /nossh '
  6. A3 = '192.168.1.8 /nossh '
  7. A4 = '192.168.1.11 /nossh '
  8. A5 = '192.168.1.13 /nossh '
  9. A6 = '192.168.1.17 /nossh '
  10. A7 = '192.168.1.21 /nossh '
  11. A8 = '192.168.1.24 /nossh '
  12. A9 = '192.168.1.29 /nossh '
  13. A10 = '192.168.1.48 /nossh '
  14. A11 = '192.168.1.53 /nossh '
  15. A12 = '192.168.1.56 /nossh '
  16. A13 = '192.168.1.62 /nossh '
  17. A14 = '192.168.1.66 /nossh '
  18. A15 = '192.168.1.68 /nossh '
  19. A16 = '192.168.1.71 /nossh '
  20. A17 = '192.168.1.73 /nossh '
  21. A18 = '192.168.1.77 /nossh '
  22. A19 = '192.168.1.80 /nossh '
  23. A20 = '192.168.1.84 /nossh '
  24. A21 = '192.168.1.86 /nossh '
  25. A22 = '192.168.1.93 /nossh '
  26. A23 = '192.168.1.99 /nossh '
  27.  
  28. random i 23
  29. int2str B i
  30. messagebox B 'B'
  31. strconcat msg 'A'
  32. strconcat msg B
  33.  
  34. messagebox msg 'Value msg' ; here show Ai ,
  35.  
  36. connect msg ; but don`t connect and close window
  37.  
  38. ; goto login
Trevor
Guru

Posts:
467
Joined: Wed Jul 26, 2006 8:47 am
by Trevor » Tue Nov 01, 2016 8:46 pm
There are a few reasons why your macro does not work. I'd use something like this instead:

Code: Select all

  1. strdim server 24
  2.  
  3. server[0] = '192.168.1.1 /nossh '
  4. server[1] = '192.168.1.2 /nossh '
  5. server[2] = '192.168.1.6 /nossh '
  6. server[3] = '192.168.1.8 /nossh '
  7. server[4] = '192.168.1.11 /nossh '
  8. server[5] = '192.168.1.13 /nossh '
  9. server[6] = '192.168.1.17 /nossh '
  10. server[7] = '192.168.1.21 /nossh '
  11. server[8] = '192.168.1.24 /nossh '
  12. server[9] = '192.168.1.29 /nossh '
  13. server[10] = '192.168.1.48 /nossh '
  14. server[11] = '192.168.1.53 /nossh '
  15. server[12] = '192.168.1.56 /nossh '
  16. server[13] = '192.168.1.62 /nossh '
  17. server[14] = '192.168.1.66 /nossh '
  18. server[15] = '192.168.1.68 /nossh '
  19. server[16] = '192.168.1.71 /nossh '
  20. server[17] = '192.168.1.73 /nossh '
  21. server[18] = '192.168.1.77 /nossh '
  22. server[19] = '192.168.1.80 /nossh '
  23. server[20] = '192.168.1.84 /nossh '
  24. server[21] = '192.168.1.86 /nossh '
  25. server[22] = '192.168.1.93 /nossh '
  26. server[23] = '192.168.1.99 /nossh '
  27.  
  28. random i 23
  29. messagebox server[i] "server"
  30. connect server[i]
filegam
Newbie

Posts:
9
Joined: Thu Feb 07, 2013 4:53 pm
by filegam » Thu Nov 03, 2016 4:39 pm
Trevor,

It works perfect !!!
Very good,

simple, very creative, very practical and very functional,


thank you so much
Best regards
Display posts from previous:
Sort by:

3 postsPage 1 of 1

Users browsing this forum: No registered users