Opening multiple URLs via Scripting

25 views
Skip to first unread message

Jerico Marzan

unread,
May 24, 2025, 2:41:59 PMMay 24
to AutoControl Community Forum
So I have a script that can produce this as a result

When I run a separate script and set the variable as the hard value, it successfully opens all the tabs and links

let newTabIds = await ACtl.openURL(new_s, {leftOf: '#currentTab'}) ;

But what I want is to be able for that new_s variable to be produced dynamically and open the urls in one go.

What do I have to change in this for it to work:

let original = await ACtl.getFile(filePath);
let new_s = original.replaceAll(",","', 'https://search.yahoo.com/search?fr=mcafee&type=E210US714G91895&p=") .replaceAll("[","['https://search.yahoo.com/search?fr=mcafee&type=E210US714G91895&p=") .replaceAll("]","']") .replaceAll(/\"/g,"");
let newTabIds = await ACtl.openURL(new_s, {leftOf: '#currentTab'}) ;
ACtl.saveFile(filePath,new_s);

It saves the value of new_s to a file in filePath so I know the values are absolutely identical. Works when I paste that as a hard value as new_s in a separate script but not in this formula that dynamically produces it. What am I doing wrong? Help appreciated, thanks!
Reply all
Reply to author
Forward
0 new messages