Hi I have two desktop automation scripts to run through boring manual tasks. In an ideal world I can leave the first macro (NRF_PART) running without supervision, however I would like to be notified via email if the macro trips up and errors as some point through its process. I have mocked up a separate EmailTest script which opens outlook and sends an error notification to someone. The question is how do I combine these two scripts and only allow the EmailTest script to trigger if there is an error during the main NRF_Part script.
NRF_Part
{
"Name": "NRF_Part",
"CreationDate": "2024-8-21",
"Commands": [
{
"Command": "store",
"Target": "slow",
"Value": "!replayspeed",
"Description": ""
},
{
"Command": "XClickRelative",
"Target": "programclick.png",
"Value": "",
"Description": "clicks into 3dex"
},
{
"Command": "XType",
"Target": "${KEY_ALT+KEY_SHIFT+KEY_T}",
"Value": "",
"Description": "Activates Tree"
},
{
"Command": "XType",
"Target": "${KEY_SHIFT+KEY_DOWN}",
"Value": "",
"Description": "Shift+Down to Highlight both"
},
{
"Command": "XType",
"Target": "${KEY_ALT+KEY_SHIFT+KEY_O}",
"Value": "",
"Description": "Shortcut to open both parts in new tabs"
},
{
"Command": "pause",
"Target": "1500",
"Value": "",
"Description": "Pause 1.5secs"
},
{
"Command": "XClick",
"Target": "_nrfTab.png",
"Value": "",
"Description": ""
},
{
"Command": "XType",
"Target": "${KEY_ALT+KEY_SHIFT+KEY_T}",
"Value": "",
"Description": "Activates Tree"
},
{
"Command": "XType",
"Target": "${KEY_HOME}",
"Value": "",
"Description": "Selects top level"
},
{
"Command": "XClick",
"Target": "_MXPLUS_TURQ2.png",
"Value": "#doubleclick",
"Description": "Activates top level NRF "
},
{
"Command": "pause",
"Target": "2000",
"Value": "",
"Description": ""
},
{
"Command": "XType",
"Target": "${KEY_ALT+KEY_SHIFT+KEY_N}",
"Value": "",
"Description": "Runs NRF shortcut"
},
{
"Command": "pause",
"Target": "2000",
"Value": "",
"Description": ""
},
{
"Command": "XClickRelative",
"Target": "nextTabClick_dpi_96.png",
"Value": "",
"Description": ""
},
{
"Command": "XClick",
"Target": "Frozen_dpi_96.png",
"Value": "",
"Description": ""
},
{
"Command": "pause",
"Target": "2000",
"Value": "",
"Description": ""
},
{
"Command": "XClickRelative",
"Target": "StructureOk_dpi_96.png",
"Value": "",
"Description": ""
},
{
"Command": "pause",
"Target": "1500",
"Value": "",
"Description": ""
},
{
"Command": "XClickRelative",
"Target": "NRF_OK_dpi_96.png",
"Value": "",
"Description": ""
},
{
"Command": "pause",
"Target": "2500",
"Value": "",
"Description": ""
},
{
"Command": "XClick",
"Target": "activetab.png",
"Value": "#right",
"Description": ""
},
{
"Command": "XClick",
"Target": "closeTab.png",
"Value": "",
"Description": ""
},
{
"Command": "pause",
"Target": "2000",
"Value": "",
"Description": ""
},
{
"Command": "XClick",
"Target": "activetab.png",
"Value": "#right",
"Description": ""
},
{
"Command": "XClick",
"Target": "closeTab.png",
"Value": "",
"Description": ""
},
{
"Command": "pause",
"Target": "2000",
"Value": "",
"Description": ""
},
{
"Command": "XClick",
"Target": "activetab.png",
"Value": "#right",
"Description": ""
},
{
"Command": "XClick",
"Target": "closeTab.png",
"Value": "",
"Description": ""
},
{
"Command": "pause",
"Target": "2000",
"Value": "",
"Description": ""
},
{
"Command": "XClick",
"Target": "_mxplus_turq2_dpi_96.png",
"Value": "#ctrlclick",
"Description": ""
},
{
"Command": "XType",
"Target": "${KEY_ALT+KEY_SHIFT+KEY_R}",
"Value": "",
"Description": ""
},
{
"Command": "pause",
"Target": "2000",
"Value": "",
"Description": ""
},
{
"Command": "comment",
"Target": "Somewhere here we have gone wrong, we do not want to replace all instances, but rather replace the singular instance (new rev in work) and then replace the NRF with that (replace by existing)",
"Value": "",
"Description": ""
},
{
"Command": "XClickRelative",
"Target": "programclick.png",
"Value": "",
"Description": "clicks into 3dex"
},
{
"Command": "XMove",
"Target": "movemous_dpi_96.png",
"Value": "",
"Description": ""
},
{
"Command": "XClick",
"Target": "replaceOKbox_dpi_96.png",
"Value": "",
"Description": ""
},
{
"Command": "comment",
"Target": "Now need to add in an xclick here to click on the NRF part and replace that by the new in work part below it. ",
"Value": "",
"Description": ""
},
{
"Command": "pause",
"Target": "2000",
"Value": "",
"Description": ""
},
{
"Command": "comment",
"Target": "XType // ${KEY_ALT+KEY_SHIFT+KEY_T}",
"Value": "",
"Description": ""
},
{
"Command": "XClickRelative",
"Target": "programclick.png",
"Value": "",
"Description": ""
},
{
"Command": "XType",
"Target": "${KEY_ALT+KEY_SHIFT+KEY_T}",
"Value": "",
"Description": ""
},
{
"Command": "XClick",
"Target": "_mxplus_turq2_dpi_96.png",
"Value": "",
"Description": ""
},
{
"Command": "XType",
"Target": "${KEY_UP}",
"Value": "",
"Description": "KEY UP TO THE NEW PART IN ORDER TO REPLACE ALL INSTANCES BY EXISTING"
},
{
"Command": "comment",
"Target": "XType // ${KEY_DOWN}",
"Value": "",
"Description": "KEY UP TO THE NEW PART IN ORDER TO REPLACE ALL INSTANCES BY EXISTING"
},
{
"Command": "pause",
"Target": "1000",
"Value": "",
"Description": ""
},
{
"Command": "XType",
"Target": "${KEY_ALT+KEY_SHIFT+KEY_E}",
"Value": "",
"Description": ""
},
{
"Command": "XClickRelative",
"Target": "tickbox2_dpi_96.png",
"Value": "",
"Description": "REPLACE ALL INSTANCES (REPLACES THE INSTANCE IN AN ASSY/PROD)"
},
{
"Command": "XClick",
"Target": "replaceOKbox_dpi_96.png",
"Value": "",
"Description": ""
},
{
"Command": "pause",
"Target": "2000",
"Value": "",
"Description": ""
},
{
"Command": "comment",
"Target": "XType // ${KEY_ALT+KEY_SHIFT+KEY_T}",
"Value": "",
"Description": ""
},
{
"Command": "XType",
"Target": "${KEY_DOWN}",
"Value": "",
"Description": ""
},
{
"Command": "XType",
"Target": "${KEY_DOWN}",
"Value": "",
"Description": ""
},
{
"Command": "comment",
"Target": "XType // ${KEY_ALT+KEY_SHIFT+KEY_T}",
"Value": "",
"Description": ""
}
]
}
EmailTest
{
"Name": "EmailTest",
"CreationDate": "2024-8-21",
"Commands": [
{
"Command": "comment",
"Target": "To be put in an IfError loop in a pre-existing V6 macro.",
"Value": "",
"Description": ""
},
{
"Command": "XRun",
"Target": "\"OUTLOOK DESTINATION"",
"Value": "",
"Description": ""
},
{
"Command": "XClick",
"Target": "NewMail_dpi_96.png",
"Value": "",
"Description": ""
},
{
"Command": "XType",
"Target": "USEREMAIL@GMAIL.COM",
"Value": "",
"Description": ""
},
{
"Command": "XType",
"Target": "${KEY_TAB}",
"Value": "",
"Description": ""
},
{
"Command": "pause",
"Target": "1500",
"Value": "",
"Description": ""
},
{
"Command": "XType",
"Target": "${KEY_TAB}",
"Value": "",
"Description": ""
},
{
"Command": "XType",
"Target": "${KEY_TAB}",
"Value": "",
"Description": ""
},
{
"Command": "XType",
"Target": "ATTENTION- UI-Vision Macro Error",
"Value": "",
"Description": ""
},
{
"Command": "XType",
"Target": "${KEY_TAB}",
"Value": "",
"Description": ""
},
{
"Command": "XType",
"Target": "Hi,",
"Value": "",
"Description": ""
},
{
"Command": "XType",
"Target": "${KEY_ENTER}",
"Value": "",
"Description": ""
},
{
"Command": "XType",
"Target": "${KEY_ENTER}",
"Value": "",
"Description": ""
},
{
"Command": "XType",
"Target": "An error has occurred whilst running a UI-Vision macro.",
"Value": "",
"Description": ""
},
{
"Command": "XType",
"Target": "${KEY_ENTER}",
"Value": "",
"Description": ""
},
{
"Command": "XType",
"Target": "${KEY_ENTER}",
"Value": "",
"Description": ""
},
{
"Command": "XType",
"Target": "The macro has stopped, please check error logs within UI-Vision for more information.",
"Value": "",
"Description": ""
},
{
"Command": "XType",
"Target": "${KEY_ENTER}",
"Value": "",
"Description": ""
},
{
"Command": "XType",
"Target": "${KEY_ENTER}",
"Value": "",
"Description": ""
},
{
"Command": "XType",
"Target": "Thanks, ",
"Value": "",
"Description": ""
},
{
"Command": "XClick",
"Target": "EmailSend_dpi_96.png",
"Value": "",
"Description": ""
}
]
}
Any help would be massively appreciated.
Thanks!