Question
BPCE SA
FR
Last activity: 17 Feb 2021 10:12 EST
Read a text file line by line to perfom a web search on FireFox
Hi all,
I want to read a txt file (Notepad++) line by line and get the information of the line to perform a web search.
I used Streamreader but it is not successful, I don't have any results.
Do you have any idea how to do this?
Attached you will find the sample I made
Thanks
Astrid
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Pegasystems Inc.
US
Hi,
I use File.ReadAllLines for this purpose:
It reads all file content into string array first, thus, it is not a good way to work with a really big file.
BPCE SA
FR
Thanks for the quick reply
Where can I find File.ReadAllLines ? Is it in file Stream ?
Thanks
Astrid
-
Rajesh Redrowthu
Pegasystems Inc.
US
It is under Choose Toolbox Items -> Pega Robotics Static Members -> mscorlib -> File
http://help.openspan.com/80/Using_Studio/Adding_and_Removing_Toolbox_Items2.htm
BPCE SA
FR
Hi,
I tried this solution, but when I run the process nothing is appearing (message dialog or an error message)
Do you know where the issue can came from ?
Pegasystems Inc.
US
Hi,
Please show screenshot of your automation and Runtime log after unsuccessful attempt.
BPCE SA
FR
For now I just tried to read the lines of the file and put them on a message dialog
Thanks
Astrid
-
Jayaraman Balasubramanian
Pegasystems Inc.
US
I don't see any attempts to execute Automation1 in the log. Do you trigger it somehow (with winform button click or AllProjectsStarted event)? If not, please add something. "Execute" block is just entry point for an automation and it is not executed automatically at project startup.
BPCE SA
FR
It worked fine !!
Thank you for the help