Can we make the changes in Java Script file through UiPath? I want to change some text in JS file while running time.
Did you try
Read Text File - activity
Ouput.Replace(“old text”,“new text”)
Write Text File - activity
Read Text and Write Text activities supports only to Texts and docs file.
I want to do changes in .js file. can we do that?
Give a try.It should work.
Ok. I will try above activities for .js file. let me check.
Hi, Read text and Write text within text file is working. And if I use replace text in .js file then its not works. shows the File format .js not supported.
I am able to read data from excel and write it into .js file. but not replace in .js.
I thing we can replace text within doc file.
Don’t use Replace Text activity, it works only inside Word Application Scope.
you have to use String.Replace (of your script)
jsScript = jscript.Replace(“abc”,“xyz”)
Then do Write Text
document.getElementById(‘mapImageTextArea’).value = [365,225,430,225,430,270,375,270];
This is my JS code file contains some points. While running time I have to Change only some Points which are in array.
If I will do write activity Then it will change all. Have to change some part in JS.
Why not use inject Js activity and pass the array as parameter?
search the forum for samples.
Yes. First Time running I have used the Inject JS activity. but second time I want only point should be changed at running time.
Means, First time It will inject the initial Array.then second time It will take the some changed point from excel and replace it with existing.
So, I am stuck with how to replace only points second time with existing.
Why not pass the modified array every time?
arr(Array.IndexOf(arr, 225)) = 300
Hi, Is the Uipath communicate between Software and Devices? Means, In Non-IT field Can we use UiPath for software and Devices interaction?