Advertisement
Guest User

Untitled

a guest
Jan 17th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.92 KB | None | 0 0
  1. new Thread((ThreadStart)delegate
  2. {
  3. if (myEncoding.GetBytes(result).Length > 150)
  4. {
  5. int loop = myEncoding.GetBytes(result).Length / 150;
  6. int idx = 0;
  7. for (int i = 0; i <= loop; i++)
  8. {
  9. if (i == 0)
  10. {
  11. macro.setMacroBody(wherechat + " " + myEncoding.GetString(buf, 0, getWordByByte(result, 0)));
  12. Console.WriteLine(wherechat + " " + myEncoding.GetString(buf, 0, getWordByByte(result, 0)));
  13. idx = getWordByByte(result, 0);
  14. } else
  15. {
  16. macro.setMacroBody(wherechat + " " + myEncoding.GetString(buf, idx, getWordByByte(result, idx)));
  17. Console.WriteLine(wherechat + " " + myEncoding.GetString(buf, idx, getWordByByte(result, idx)));
  18. idx = idx + getWordByByte(result, idx);
  19. }
  20. macro.SendKey(key);
  21. Thread.Sleep(100);
  22. macro.setMacroBody();
  23. //break;
  24. }
  25. }
  26. else
  27. {
  28. macro.setMacroBody(wherechat + " " + result);
  29. macro.SendKey(key);
  30. Thread.Sleep(100);
  31. macro.setMacroBody();
  32. }
  33. }).Start();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement