![]() |
| |||||||
Automation Anywhere Post messages and questions related to Automation Software here. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| |||
|
Is there a way to read an entire text file into a variable or the clipboard? I basically have quite a few lines of description in a text file, and I want to just read it into a variable so I can put it in a text box on a website. Alan |
| |||
|
Hello Alan, Definitely yes, you can read lines in a text file to Automation Anywhere variable. Please follow below mentioned steps to understand how to read values from a text file. 1. Let’s say you want to create a variable by the name of 'TextFileData' of 'Value' type. What you can do is: 1. Go to Tools->Variable Manager->Add new variable and select 'Value' from the drop down list. 2. Name the variable as 'TextFileData''(without quotes) 3. Select the option 'Read from Text File' and specify the file path of the text file from where you want to read the variable values and click on 'Open file'.( Please note we are referring to a text file which ends with a '.txt' extension . 4. Supposing the data in the text file appear like this ‘TextFileData= ABCDEFG..…..'(without quotes) 5. Click on 'Save' followed by ‘Ok’ in the 'Variable Manager'. Moreover, please refer to our online task to read variable values from a text file. http://www.tethyssolutions.com/T12.htm Alternatively, you can also copy entire contents of file using keyboard shortcut 'Ctrl+a' followed by 'Ctrl+c'. The entire contents of a file are copied to system variable, Clipboard. Using 'Assign from Clipboard' command assign the current value of clipboard to some variable (created through Tools->Variable Manager) of value type say $TextFileData$. The text format of your task will look something like this: 1) Keystrokes: [CTRL DOWN]a[CTRL UP] in "Window Title of File" 2) Delay: (250 ms) 3) Keystrokes: [CTRL DOWN]c[CTRL UP] in "Window Title of File" 4) Delay: (250 ms) 5) Assign value of Clipboard to variable "$TextFileData$ Hope that helps. |
![]() |
| Thread Tools | |
| Display Modes | |
| |