LMS. - LM Studio Interface

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > AI - Artificial Intelligence Commands > LMS. - LM-Studio Commands >

LMS. - LM Studio Interface

LMS.SetClipboard - Control Clipboard Output

Previous Top Next


MiniRobotLanguage (MRL)

 

LMS.SetClipboard Command

Control Automatic Clipboard Copying

 

Intention

 

This command acts as a global toggle to automatically copy the final, cleaned response from LMS.ask or LMS.askex to the system clipboard.

 

When enabled (set to 1), every AI query will place its result on the clipboard, *in addition* to storing it in any specified variable.
When disabled (set to 0 or omitted), this automatic copy does not happen.

 

This overrides the default behavior where LMS.ask or LMS.askex would only copy to the clipboard if the return variable parameter was left blank.

 

The reason for this is: The Clipboard can contain  Emojis and Unicode-special characters.

 

Syntax

 

LMS.Set Clipboard|[P1]

 

Parameter Explanation

 

P1 - (Optional) The state. Use 1, or any non-zero value to enable auto-copy. Use 0, FALSE, or omitting the parameter to disable it.

 

Example

 

'**********************************************

' LMS.setclipboard - Sample

'**********************************************

'

' Enable global auto-copy

LMS.setclipboard|1

'

' Both the variable $$ANSWER and the clipboard will get the result

LMS.ask|"What is 1+1?"|$$ANSWER

MBX.Info|Result is in $$ANSWER and also on your clipboard. Paste it now!

'

' Disable global auto-copy (by omitting parameter)

LMS.setclipboard

'

' Now, only the variable $$ANSWER2 gets the result.

LMS.ask|"What is 2+2?"|$$ANSWER2

MBX.Info|Result is only in $$ANSWER2. Clipboard was not used.

ENR.

 

Remarks

 

This setting is persistent. It will remain active (either on or off) for your entire session until you change it again. The default state on startup is disabled (0).

 

See also:

 

    LMS.ask

    LMS.AskEx - Extended AI Query