Hi have a macro that I am trying to run many times, but unfortunately I quickly run into an error. It is a very simple macro that basically just copies something from one tab, then opens a new tab with what is copied as the URL, and then perform some actions.
I have another longer macro that is also causing the same issues so I’m not looking to read from a CSV instead. But how do I solve it?
I have seen other link that suggesting adding pause, which I have done.
I don’t want to ignore the error and continue the loop
How would I use OnError in this scenario?
I find it strange that both of my macros that use selectWindow have the same problem. Is there a bug?
Code of the simple macro is below. I haven’t included my complex macro as that is huge:
Error occurs on line 4:
[error]
Line 4: Could not establish connection. Receiving end does not exist.
[info]
Macro failed (Runtime 639.92s)
{
"Name": "check",
"CreationDate": "2022-10-22",
"Commands": [
{
"Command": "bringBrowserToForeground",
"Target": "",
"Value": "",
"Description": ""
},
{
"Command": "XType",
"Target": "${KEY_CMD+KEY_C}",
"Value": "",
"Description": ""
},
{
"Command": "pause",
"Target": "2000",
"Value": "",
"Description": ""
},
{
"Command": "selectWindow",
"Target": "tab=open",
"Value": "${!clipboard}",
"Description": ""
},
{
"Command": "pause",
"Target": "1000",
"Value": "",
"Description": ""
},
{
"Command": "sourceSearch",
"Target": "*\"pageType\":18*",
"Value": "publicprofile",
"Description": ""
},
{
"Command": "selectWindow",
"Target": "tab=close",
"Value": "",
"Description": ""
},
{
"Command": "XType",
"Target": "${KEY_LEFT}",
"Value": "",
"Description": ""
},
{
"Command": "if_v2",
"Target": "${publicprofile}==1",
"Value": "",
"Description": ""
},
{
"Command": "XType",
"Target": "Public",
"Value": "",
"Description": ""
},
{
"Command": "pause",
"Target": "1000",
"Value": "",
"Description": ""
},
{
"Command": "XType",
"Target": "${KEY_ENTER}",
"Value": "",
"Description": ""
},
{
"Command": "XType",
"Target": "${KEY_RIGHT}",
"Value": "",
"Description": ""
},
{
"Command": "else",
"Target": "",
"Value": "",
"Description": ""
},
{
"Command": "XType",
"Target": "Not",
"Value": "",
"Description": ""
},
{
"Command": "pause",
"Target": "1000",
"Value": "",
"Description": ""
},
{
"Command": "XType",
"Target": "${KEY_ENTER}",
"Value": "",
"Description": ""
},
{
"Command": "XType",
"Target": "${KEY_RIGHT}",
"Value": "",
"Description": ""
},
{
"Command": "end",
"Target": "",
"Value": "",
"Description": ""
}
]
}