PBXB64 Clipboard & Shell
Clipboard & Shell Standard
Vollständige Clipboard- und Shell-Integration with Clipboard GetText/SetText/Clear/IsFormatAvailable, SHELL, ENVIRON, and COMMAND. Echte Win32-Clipboard-API (OpenClipboard, SetClipboardData, GetClipboardData) with atomare Round-Trip-Tests.
Clipboard-Operationen
Clipboard-Round-Trip
FUNCTION PBMAIN() AS LONG
LOCAL text AS STRING
LOCAL result AS LONG
' Set text to clipboard
Clipboard SetText "Hello from PBXB64"
' Get text back
Clipboard GetText text
PRINT "Clipboard: "; text
' Check format
IF Clipboard IsFormatAvailable(%CF_TEXT) THEN
PRINT "Text format available"
END IF
' Clear clipboard
Clipboard Clear
FUNCTION = 0
END FUNCTIONClipboard SetText places text on the clipboard. Clipboard GetText retrieves it. Clipboard Clear empties the clipboard. All tests run atomically in a single process (test_clipboard_combined.pb) to avoid inter-test race conditions.
SHELL, ENVIRON, COMMAND
Shell und Umgebung
FUNCTION PBMAIN() AS LONG
LOCAL path AS STRING
LOCAL cmd AS STRING
' Read environment variable
path = ENVIRON$("PATH")
PRINT "PATH length: "; LEN(path)
' Get command line
cmd = COMMAND$
PRINT "Command: "; cmd
' Launch program
SHELL "notepad"
FUNCTION = 0
END FUNCTIONENVIRON$ reads environment variables via GetEnvironmentVariable. COMMAND$ returns the command line via GetCommandLine. SHELL launches programs via CreateProcess. Alle echten Win32-API-Aufrufe.