<< Click to Display Table of Contents >> Navigation: 3. Script Language > AI - Artificial Intelligence Commands > AIC. - Artificial Intelligence Command > ! Open AI - Whisper > AIC.-Recording > AIC. - Recording Commands |
MiniRobotLanguage (MRL)
AIC.Create Rec Button
Creates a Record Button with dynamic text.
Intention
The AIC.Create Rec Button command creates a button that can be used to start or stop a recording.
The button's text and behavior can be customized using the P1 and P2 parameters.
The concept of the "Record" button is to have a background-running button whose status—whether it's pressed or not—can be accessed from your Script.
You can initiate the recording through a separate command, and then clicking this button will terminate the recording by internally altering the recording state.
Essentially, you can start recording an MP3 file with one command and stop it by simply clicking the button.
You can customize the button's behavior using the available parameters. For instance, you can set the button to disappear immediately upon clicking.
Alternatively, you can keep the button visible at all times, allowing you to start and stop various tasks, such as recording, with a simple click.
Generally the Record-Button has 2 States, "START" and "STOP"-State.
While Recording the State of the Record-Button is "1" and the Button shows "STOP".
If you press the Button, the State switches from "1" to "0" and from "0" to "1".
' You can get the current Status of the Record-Button
AIC.Get Rec State|$$STA
' You can change the state of the Recording
AIC.Set Rec State|$$STA
' Close the Recording Button with
AIC.End Rec Button
If you do not want to press the button and instead react "on Mouseover" you can use:
' Get 0/1 if Mouse is over the Record-Button
AIC.Get MouseOver State|$$STA
There are some more Commands that are used with this "Record-Button".
' Change Text on the Button
AIC.Set RecordButton Text|$$TXT
Here you can see the
AIC.Create Rec Button|1|0|0 AIC.Create Rec Button|0|0
AIC.crb|1|0|1 AIC.crb|0|0|1
Syntax
AIC.Create Rec Button[|P1][|P2][|P3]
AIC.Crb[|P1][|P2][|P3]
Parameter Explanation
•P1: Determines the initial text on the button. If set to 0, the text will be "STOP". If set to 1, the text will be "START".
•P2: Determines the button's behavior when clicked. If set to 1, the button will end its function when clicked. If set to 0, the button will toggle its text between "START" and "STOP" when clicked. In that case
•P3: 0 - Only a STOP / START - Button
1 - Has 2 Buttons
Example
'***********************************
' AIC.-Sample
'***********************************
' We create a Recording Button, to be able to stop the recording
AIC.Create Rec Button|1|0
' This Loop is endless unless you move the Mouse over the Record Button
DOL.1
' Get Mouseover State
AIC.gms|$$RET
PRT.$$RET
OOP.($$RET=1)
' Close the Recording Button with
AIC.End Rec Button
ENR.
Remarks
-
Limitations:
-
See also:
•