Advertisement
euphonics

Untitled

Apr 8th, 2022
1,031
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Function consolidateThat()
  2.     ' x is the selection
  3.     ' dim x as string
  4.     oldClipboard = Clipboard
  5.     Wait 0.1
  6.     SendKeys "^c", 1
  7.     Wait 0.2
  8.     Let x = Clipboard
  9.     Let y = Chr$(10) ' new line
  10.     Let z = Chr$(13) ' carriage return line feed
  11.     wait 0.1
  12.     Let x = Replace(x, y, " ")
  13.     wait 0.1
  14.     Let x = Replace(x, z, " ")
  15.     wait 0.1
  16.     Let x = Replace(x, Space(4), " ")
  17.     wait 0.1
  18.     Let x = Replace(x, Space(3), " ")
  19.     wait 0.1
  20.     Let x = Replace(x, Space(2), " ")
  21.     wait 0.1
  22.     Clipboard x
  23.     wait 0.1
  24.     SendKeys "^v", 1
  25.     Wait 0.1
  26.     Clipboard oldclipboard
  27. End Function
Advertisement
RAW Paste Data Copied
Advertisement