Ask AI Commands * Unicode

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > AI - Artificial Intelligence Commands > AIC. - Artificial Intelligence Command > Ask AI Commands > Unicode Return >

Ask AI Commands * Unicode

AIC.Ask Comp Unicode

Previous Top Next


MiniRobotLanguage (MRL)

 

AIC.Ask Comp Unicode

Ask or instruct the AI and receive answer as Unicode, using the "Completion endpoint".

 

 

Intention

 

This command is the same like the AIC.Ask Completion command.

The only difference is that the original Unicode result is stored in the clipboard and you can paste it wherever you need it,

for example in Social Networks.

 

 

 

Syntax

 

 

AIC.Ask Comp Unicode|P1[|P2]

 

 

Parameter Explanation

 

P1 - Prompt to send to the Chat-Endpoint.

P2 - (optional) Variable for the result. If omitted the result is placed on TOS.

 

Important: The Unicode result is in the System-Clipboard.

 

 

 

 

Example

 

 

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

' AIC.-Sample

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

'

'SPR Script-file: Twitter-Bar V.2

'Purpose: 

'Creation date: 11-08-2023

'===========================================================

'#EXE:?path\

'#SPI:ForceWrite

'#ICS:20

'

' COMMANDS:

' RUN FIREFOX and open Site www.fa2.de

' P1 - Site that should be opened

' %Firefox www.fa2.de

' Open a new TAB-Page

' P1 - Site to be opened

' P2 - optional - Number of site if multiple with same Text

' %New_TAB 

'

' Locate the Firefox Mainwindow

' %Locate_TW

'

' Trage Link in Firefox ein

' P1 - Link to open

' %Firefox_Set_Site $$LNK

'

' Close Firefox

' %Firefox_Close

 

AIC.Set Key|file

SDO.Set Key|file

DLT.Set Key|File

 

'===========================================================

' Main Script

'===========================================================

' This is the site we are going to open

VAR.$$LNK=https://twitter.com/

VAR.$$PAR=-new-window

 

' This will locate FF and run it

' If the window is too large (1840,1644) change size in Library

VAR.$$PAX="$$LNK" $$PAR 

%Firefox $$PAX

WII.10

:Start

' Sample Click

%Locate_TW

 

' Start the Button-Bar

PIL.$$REA|01

 

' Make the PlugIn visible

PIS.$$REA|hide

 

' Will set the number of visible Buttons to 4

PIS.$$PIN|SetButtonNumber|17

 

 

' Set Distance between buttons (vertical in Points)

PIS.$$REA|sbvd|4

 

' Set Distance vertical in Points, not needed here

PIS.$$REA|sbvd|4

 

' Plugin is horizontal 

PIS.$$REA|sv

 

' Make the PlugIn visible

PIS.$$REA|show

 

' attach the Plugin to the window

PIS.$$REA|attach|$$HWN|2|X

 

' Set text on Button 1 to 13

PIS.$$REA|sBt|1|Dictate

PIS.$$REA|sBt|2|Rework

PIS.$$REA|sBt|3|P. Comm.

PIS.$$REA|sBt|4|N. Comm.

PIS.$$REA|sBt|5|Fun.Comm.

PIS.$$REA|sBt|6|To Rhyme

PIS.$$REA|sBt|7|To Eng.

PIS.$$REA|sBt|8|To Ger.

PIS.$$REA|sBt|9|To Spa.

PIS.$$REA|sBt|10|Undo Txt.

PIS.$$REA|sBt|11|Pic S/R

PIS.$$REA|sBt|12|Pic S/R

PIS.$$REA|sBt|13|What is Pic.

PIS.$$REA|sBt|14|Command

PIS.$$REA|sBt|15|Dump ASC

PIS.$$REA|sBt|16|Test

PIS.$$REA|sBt|17|Ende

 

DOL.1

  PIW.$$REA|$$MES

  STR.Split String|$$MES|!|$$BNU|$$BME

  JIV.$$BME=normal!|endloop

  VBT.$$BME

  SCS.$$BME

  CAS.P!

    GTO.weiter

  CAS.R!

    GTO.weiter

  CAE.

    GTO.endloop

  ESL.

 

  JIZ.$$JMP|endloop

  :weiter  

  ' Button-Number

  VBT.$$BNU

  VBT.$$BME  

  

  $$GOT=DoB$$BNU

  SCN.$$BNU

  CAN.1,2,3,4,5,6,10,11,12,13,14,15,16

    GSB.$$GOT   

  CAN.7    

    GSB.DoB7|EN

  CAN.8

    GSB.DoB7|DE

  CAN.9

    GSB.DoB7|SP

  CAE.

    GTO.enz

  ESL.

  

  :endloop

  NEW.t

    BRK.

  EIF.

OOP.

:enz

END.

'-----------------------------------------------------------

'

'-----------------------------------------------------------

:Completion_Unicode

AIC.Set Model Completion|1

AIC.Ask Comp Unicode|$$PRO|$$RES

RET.

'-----------------------------------------------------------

'

'-----------------------------------------------------------

:Completion

AIC.Set Model Completion|1

AIC.Ask Completion|$$PRO|$$RES

RET.

'-----------------------------------------------------------

'

'-----------------------------------------------------------

:Chat

AIC.SetModel Chat|1

AIC.Ask Chat|$$PRO|$$RES

RET.

'-----------------------------------------------------------

'

'-----------------------------------------------------------

:Chat_Unicode

AIC.SetModel Chat|1

AIC.Ask Chat Unicode|$$PRO|$$RES

RET.

'-----------------------------------------------------------

' Buttons

'-----------------------------------------------------------

:DoB1

AIC.Dictate Letter|$$MYT

DBP.$$MYT

CLP.t|$$MYT

MSB.550|2

:overB1

RET.

'-----------------------------------------------------------

'-----------------------------------------------------------

:DoB2

CLP.r|$$MYT|1

$$KEP=$$MYT

GSB.Pro_02

$$PRO+ Text: $$MYT

GSB.Chat_Unicode

DBP.$$RES

'CLP.t|$$RES|1

MSB.660|2

MSB.660|2

RET.

'-----------------------------------------------------------

'-----------------------------------------------------------

:DoB3

CLP.r|$$MYT

$$KEP=$$MYT

GSB.Pro_01|positive Comment

$$PRO+ Text: $$MYT

AIC.Set Model Completion|1

AIC.Ask Completion|$$PRO|$$RES

GTO.ClipBeep

RET.

'-----------------------------------------------------------

'-----------------------------------------------------------

:DoB4

CLP.r|$$MYT

$$KEP=$$MYT

GSB.Pro_01|negative Comment

$$PRO+ Text: $$MYT

AIC.Set Model Completion|0

AIC.Ask Completion|$$PRO|$$RES

GTO.ClipBeep

RET.

'-----------------------------------------------------------

'-----------------------------------------------------------

:DoB5

CLP.r|$$MYT

$$KEP=$$MYT

GSB.Pro_03|very funny Comment

$$PRO+ Text: $$MYT

AIC.Set Model Chat|gpt-4-1106-preview

AIC.Ask Chat|$$PRO|$$RES

GTO.ClipBeep

RET.

'-----------------------------------------------------------

'-----------------------------------------------------------

:DoB6

CLP.r|$$MYT

$$KEP=$$MYT

GSB.Pro_04

$$PRO+ Text: $$MYT

MSB.660|2

AIC.Set Model Chat|1

AIC.Ask Chat|$$PRO|$$RES

DBP.$$RES 

GTO.ClipBeep

MSB.860|1

RET.

'-----------------------------------------------------------

' To Eng.

'-----------------------------------------------------------

:DoB7

CLP.r|$$MYT

$$INS=§§_01

DLT.Translate Text|$$MYT|$$RES||$$INS

DBP.$$RES

:ClipBeep

CLP.t|$$RES

$$KEP=$$MYT

MSB.660|2

MSB.660|2

MSB.860|1

RET.

'-----------------------------------------------------------

' To Germ.

'-----------------------------------------------------------

:DoB8

 

RET.

'-----------------------------------------------------------

' Undo

'-----------------------------------------------------------

:DoB10

'PRT. Was here with: $$BME

CLP.r|$$MYT

DBP.$$KEP

CLP.t|$$KEP

$$KEP=$$MYT

MSB.660|2

MSB.660|2

RET.

'-----------------------------------------------------------

'

'-----------------------------------------------------------

:DoB11

IVS.$$BME=P!

  ANA.From Clipboard|$$KEA  

  SBT.Saved to A

  PIS.$$REA|sBt|11|A OK!  

ELS.

  ANA.To Clipboard|$$KEA

  SBT.Restored from A

EIF.

MSB.560|2

MSB.860|2

 

RET.

'-----------------------------------------------------------

'

'-----------------------------------------------------------

:DoB12

IVS.$$BME=P!

  SBT.Saved to A

  ANA.From Clipboard|$$KEB   

  PIS.$$REA|sBt|11|B OK!

ELS.

  ANA.To Clipboard|$$KEB  

  SBT.Restored from B

EIF.

MSB.560|2

MSB.860|2

RET.

'-----------------------------------------------------------

'

'-----------------------------------------------------------

:DoB13

$$KEC=3

$$FIL=?path\Temp.jpg

ANA.From Clipboard|$$KEC

ANA.Save|$$KEC|$$FIL

$$PRO=Tell me what you see.

AIC.Ask Vision|$$FIL|$$PRO|$$RES

GSB.ToClip 

RET.

'-----------------------------------------------------------

'

'-----------------------------------------------------------

:DoB14

CLP.r|$$MYT

$$KEP=$$MYT

GSB.Pro_05|$$MYT

MBX.$$PRO

AIC.Set Model Chat|1

AIC.Ask Chat|$$PRO|$$RES

DBP.$$RES

GTO.ToClip

RET.

'-----------------------------------------------------------

'-----------------------------------------------------------

:DoB15

CLP.r|$$MYT|1

PRT.$$MYT|h

RET.

'-----------------------------------------------------------

'-----------------------------------------------------------

:DoB16

CLP.r|$$MYT|1

VAR.$$RES=$$MYT

CLP.t|$$RES|1

MSB.660|2

MSB.660|2

RET.

'-----------------------------------------------------------

'

'-----------------------------------------------------------

:ToClip

CLP.t|$$KEP

CLP.$$RES

MSB.660|2

MSB.660|2

DBP.$$RES

RET.

 

'-----------------------------------------------------------

:Pro_01

$$INS=§§_01

$$PRO=Act as a Twitter-Influencer.

$$PRO+ Make a $$INS comment from the text below.

$$PRO+ Add surprising Arguments to proof our standpoint.

$$PRO+ Make the result funny and highly intelligent.

$$PRO+ Then add  Linefeed and then

$$PRO+ Add space-sparated Hashtags to the end of the text.

$$PRO+ Return only the refined Twitter-Text in the same language as the Text below is.

RET.

'-----------------------------------------------------------

:Pro_02

$$PRO=Correct and refine the text below and add emojis for Twitter.

$$PRO+ then add double Linefeeds in Format $crlf for best readability.

$$PRO+ Finally add a Linefeed and then Add Hashtags and lots of Emojis for Twitter to the end of the text.

$$PRO+ Return only the refined Twitter-Post.

'$$PRO+ followed by a Linefeed and then the Space-Separted Hashtags $crlf$

RET.

'-----------------------------------------------------------

:Pro_03

$$INS=§§_01

$$PRO=Act as a Twitter-Influencer. Read the text below and then

$$PRO+ Make a $$INS comment about the text.

$$PRO+ Analyze the Text then created a funny Joke or comment on that topic.

$$PRO+ Let it be a Joke or something suprising funny and highly intelligent.

$$PRO+ Then add  Linefeed and then

$$PRO+ Add space-sparated Hashtags to the end of the text.

$$PRO+ Return only the refined Twitter-Text in the same language as the Text below is.

RET.

'-----------------------------------------------------------

:Pro_04

$$PRO=Refine the text in  way that its funny and rhymes like Goethe, Schiller.

$$PRO+ keeping its sense.

$$PRO+ Return only the refined Twitter-Text in German plus.

$$PRO+ Add at the end  Linefeed aand then Space-Separted Hashtags $crlf$

RET.

'-----------------------------------------------------------

:Pro_05

$$PRO=§§_01

$$PRO+ Return only the refined Twitter-Text in German plus.

$$PRO+ Add at the end  Linefeed aand then Space-Separted Hashtags $crlf$

RET.

'-----------------------------------------------------------

:Pro_06

$$PRO=Mach mir ein Rezept mit edlem Gemüse, Pfeffer, etwas Käse, Butter. Achte auf Gesundheit und Nährstoffe.

$$PRO+ Dann agiere wie zwei Experten. Experte A ist Goethe, der dieses Rezept in einen Goethe-mäßigen Reim umwandelt. Experte B ist ein Deutschexperte, der diesen Goethe-Reim nochmal von den Wörtern her so korrigiert, dass es sich perfekt reimt. Den Reim, der dann herauskommt, gibt nochmal Goethe zur Korrektur und macht etliche Emojis rein und formatiere es schön mit Zeilenumbrüchen für Twitter.

RET.

 

'===========================================================

' Twitter specific-Sub-Programmes

'===========================================================

 

'-----------------------------------------------------------

:NotAus

' Not AUS

IEK.LSHIFT

  MBX.Ending

  END.

EIF.

RET.

'-----------------------------------------------------------

:NextPage

%Locate_TW

MLI.t|100,1000

SDA.{PGDN}

PAU.1

RET.

 

'-----------------------------------------------------------

'

'-----------------------------------------------------------

 

 

 

'===========================================================

' Sub-Programmes

'===========================================================

'

: %Locate_TW 0

GSB.Loc_TW

END%

 

:Loc_TW

NEW.$$HWN

  STW.ct|MozillaWindowClass|Mozilla Firefox

  GSB.Resize_FF

  HTV.$$HWN  

ELS.

  STW.h|$$HWN

  GSB.Resize_FF

EIF.

RET.

'-----------------------------------------------------------

:Resize_FF

'SWP.0,0|1840,1944|T

SWP.0,0|1368,1829|T

RET.

'-----------------------------------------------------------

'

'-----------------------------------------------------------

' Kann ohne Parameter aufgerufen werden,

' oder mit einem Parameter mit dem Link für die neue Site

'

: %New_TAB 0

#IF PARAMS=1

SAV.Save|$$LNA

VAR.$$LNA=§§§01

GSB.New_TAB

PAU.1

%Firefox_Set_Site $$LNA

SAV.Restore

#EIF

#IF PARAMS=0

GSB.New_TAB

#EIF

END%

'-----------------------------------------------------------

:New_TAB

GSB.Loc_TW 

AGR.43!WII.MLI.|Einen neuen Tab öffnen (Strg+T)||1|3|60

RET.

'-----------------------------------------------------------

'

'-----------------------------------------------------------

'

: %Firefox_Set_Site 1

SAV.Save|$$TXT

GSB.Set_Site|§§§01

SAV.Restore

END%

:Set_Site

VAR.$$TXT=§§_01

GSB.Loc_TW

AGR.43!WII.MLI.|Startseite||1|3|60

NAV.Rr|R|42

MLI.

KBC.Paste Over|$$TXT

SKP.{Enter}

RET. 

'-----------------------------------------------------------

'

'-----------------------------------------------------------

'

' P1 - Text that is on the TAB we want

' P2 - optional the number of the TAB if it has the same Text like on other TABs

'  normally Nr. is 1

' The minimum Number of Parameters is 1 thats why we have a "1" here after The Macroname

'

: %Locate_TAB 1

SAV.Save|$$NUM|$$TXT

VAR.$$TXT=§§§01

#IF PARAMS=1

VAR.$$NUM=1

GSB.Loc_TAB

#EIF

#IF PARAMS=2

VAR.$$NUM=§§§02

GSB.Loc_TAB|§§§01

#EIF

SAV.Restore

END%

'-----------------------------------------------------------

:Loc_TAB

GSB.Loc_TW

AGR.42!WII.MOS.|$$TXT||$$NUM|3|60

GSB.Loc_TW

RET.

'-----------------------------------------------------------

'

'-----------------------------------------------------------

'

: %Firefox 1

GSB.Lab_Run_Firefox|§§§01

END%

'-----------------------------------------------------------

:Lab_Run_Firefox

SAV.Save|$$PAT|$$NAM|$$RES|$$EXE|$$LNK

'-----------------------------------------------------------

IAI.Mozilla Firefox

  VAR.$$LNK=§§_01

  GSB.Lab_FF_starten

ELS.

  MBX.Firefox ist nicht installiert.

  END.

EIF.

RET.

 

:Lab_FF_starten

STW.ctwXo|MozillaWindowClass|Mozilla Firefox|1|Run_it

 

RET.

'-----------------------------------------------------------

:Run_it

VAR.$$NAM=$tos$

GII.$$NAM|$$RES|u

BLB.$$RES|$$RES

BLB.$$RES|$$RES

  ' $$PAT enthält Programmpfad ohne "\"

VAR.$$PAT=$$RES

VBT.$$PAT|"

VAR.$$EXE=$$PAT\Firefox.exe

IEF.$$EXE

  EXE.$$EXE|$$LNK

ELS.

  MBX.Kann FF nicht starten.

  END.    

EIF.

SAV.Restore

RET.

'-----------------------------------------------------------

'

'-----------------------------------------------------------

: %Firefox_Close 0

GSB.Lab_Close_FF

END%

 

:Lab_Close_FF

GSB.Loc_TW

CLW.$$HWN

STW.ct|MozillaDialogClass|schließen?&OR:close

' AGR. uses a waiting time of 60 seconds, you can change it below. 

AGR.43!WII.MOS.|Tabs schließen&OR:close||1|3|60

MLI.

RET.

'-----------------------------------------------------------

'

'-----------------------------------------------------------

 

 

 

 

 

 

 

Remarks

 

-

 

 

Limitations:

 

-

 

 

See also:

 

    1.6.1. Program Flow Control

    ! Smart Package Robot 's Parallel Robot Operations

    1.5. Features and Hints