TABLE OF CONTENTS
- Activity program name
- Description
- Property
- How to use
1. Activity program name
RCA.Activities.Core.ReadTextFile
2. Description
Until Studio Version 2.0.2.0
Quick Access: "Toolbox" > "Core" > "Read Text File"
From Studio Version 2.0.3.0
Quick Access: "Toolbox" > "Core" > "File" > "Read Text File"
This activity reads all characters from the specified file and stores them in a String-type variable.
Note:
- Tested on akaBot Studio versions: 2.0.5.1, 2.1.0.0, 2.1.1.1
- Wording and UI elements may vary depending on the version.
3. Property
Property item | Property name | Input field | Description |
---|---|---|---|
Misc | Public | Check box | The variables and arguments within the activity are written to the log file and pushed to the Center. (For details, refer to "About the 'Public' Property.") |
Display Name | Any String | Reflected in design panel's activity | |
File | Encoding | Enter value (String type) | Specify the text file's character encoding (Optional) |
File Name | Enter value (String type) | Sprcify the file name of read tex file. | |
Output | Text | Enter value (String type) | Store the read value in the specified variable. |
4. How to use
In this workflow, we will demonstrate the process of reading a text file named "ReadTextFiledemo.txt" located on the computer and displaying its contents in a message box.
The contents of the text file are as follows:
First, drag and drop the **"Read Text File"activity from "Core" > "File" into the Designer panel.
Next, set the text file to be read in the Properties panel. Enter the following path in the File Name field.
Next, create a String-type variable named "text" to store the read text. You can create the variable using Ctrl + K or other methods. (*For details on creating variables, refer to "Creating Variables")
After creating the variable, set it in the "Output" > "Text" property.
Next, drag and drop the "Message Box" activity into the Designer panel.
After placing the activity, set the variable "text" in the "Input" > "Text"
Now, let's run the workflow to verify its functionality. Click "Home > Start" or press F5 to execute the workflow.
You should see a message box displaying:
"If this message is displayed, it has been processed successfully."
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article