clipboardtextex.bmx 796 B

12345678910111213141516171819202122232425
  1. SuperStrict
  2. Framework Brl.Clipboard
  3. Import Brl.StandardIO
  4. ' create a clipboard manager to access the system wide clipboard
  5. Local clipboard:TClipboard = CreateClipboard()
  6. ' clipboard mode can be:
  7. ' LCB_CLIPBOARD = The primary (global) clipboard [default mode]
  8. ' LCB_PRIMARY = The (global) mouse selection clipboard.
  9. ' LCB_SECONDARY = The largely unused (global) secondary selection clipboard.
  10. Local clipboardMode:Int = LCB_CLIPBOARD
  11. ' variable to hold text length when fetching text with TextEx()
  12. Local textLength:Int
  13. ' try to set a new text
  14. If ClipboardSetTextEx(clipboard, "TEST", clipboardMode) Then
  15. Print ClipboardTextEx(clipboard, textLength, clipboardMode)
  16. Print "length of clipboard content: " + textLength
  17. EndIf
  18. 'output:
  19. 'TEST
  20. 'length of clipboard content: 4