|
<< Click to Display Table of Contents >> Navigation: 3. Script Language > Internet and Network > HTP. - Command > !HTP-General - General HTTP operations and utilities > !Utility - Helper functions for HTTP operations (string conversion, proxy toggling) > HTP. - HTTP Operations |
SPR Script Language
HTP.SetClipOutput (SCO)
Enables or disables automatic copying of decoded text results to the clipboard.
Intention
The HTP.SetClipOutput command provides a convenient way to automatically copy the results of HTTP requests to the system clipboard. When enabled, any command that produces a final, decoded text result (like HTP.ReqShort) will have its output placed on the clipboard. This is extremely useful during development and testing, or for scripts that need to pass data to other applications via copy-paste.
It’s your robot’s copy-paste shortcut—HTP.SetClipOutput|1 tells it to remember the answer from its next web query.
Syntax
HTP.SetClipOutput[|$$STA]
Parameter Explanation
P1 - $$STA - (Variable, numeric, Optional)
The state to set.
1 - Enable clipboard output.
0 - Disable clipboard output.
If the parameter is omitted, the state is set to 0 (disabled).
Examples
'***********************************
' HTP.SetClipOutput - Sample 1: Enable and use clipboard
'***********************************
VAR.$$URL=https://httpbin.org/get
' Enable clipboard output
HTP.SetClipOutput|1
HTP.ReqShort|GET|$$URL|||$$RES
' The content of $$RES has now been copied to the clipboard
MBX.Check Clipboard|The response from httpbin.org should now be in your clipboard.
END.
'***********************************
' HTP.SetClipOutput - Sample 2: Disable clipboard
'***********************************
' Disable clipboard output (or call with no parameter)
HTP.SetClipOutput|0
HTP.ReqShort|GET|https://httpbin.org/get|||$$RES
MBX.Clipboard Not Used|The response is in $$RES, but your clipboard was not modified.
END.
Remarks
- The alias HTP.SCO can be used for brevity.
- This setting only affects commands that return a final, decoded text result, such as HTP.ReqShort and high-level AIU functions. It does not apply to commands that return raw binary data like HTP.Request.
- The setting is persistent for the current script session until it is changed again.
See also: