
Workflow screenshot
Wait on user to login
How to return a value
Kill RPA process
var loop = true;
$.chorus.screens.pConnexion.events.UNLOAD.on(function(ev){
loop = false;
irpa_core.core.log('chorus.screens.pConnexion.events.UNLOAD.on', irpa_core.enums.logType.Info,'pExportSearchInvoices');
});
while(loop){
irpa_core.core.log('pConnexion looping ' + loop, irpa_core.enums.logType.Info,'looping');
await irpa_core.core.waitTime();
}
irpa_core.core.log('pConnexion loop end', irpa_core.enums.logType.Info,'afterLoop');
function formatEscapteCaracters(f) {
return f.toString().
replace(/^[^\/]+\/\*!?/, '').
replace(/\*\/[^\/]+$/, '');
}
irpa_core.core.log('custom script Kill RPA Process', irpa_core.enums.logType.Info, 'KillRpaProcess');
try {
var VBScode = formatEscapteCaracters(function () {/*!
'Sub KillRpaProcess()
For Each Process In GetObject("winmgmts:").ExecQuery("Select Name from Win32_Process Where Name = 'SAPIntelligentRPAStudioAgent.exe'")
Process.Terminate
Next
For Each Process In GetObject("winmgmts:").ExecQuery("Select Name from Win32_Process Where Name = 'CtxtRun.exe'")
Process.Terminate
Next
'End Sub
*/});
var path = '';
if(await irpa_core.fs.exist('C:\\Users')){
irpa_core.core.log('C:\\Users', irpa_core.enums.logType.Info, 'Custom script');
path = 'C:\\Users\\' + irpa_core.options.userName + '\\Downloads';
}
await irpa_core.fs.file.write(path + '\\killRPA.vbs', VBScode);
irpa_core.core.log('custom script Kill RPA Process End', irpa_core.enums.logType.Info, 'KillRpaProcess');
irpa_core.core.shellexec(path + '\\killRPA.vbs');
} catch (error) {
irpa_core.core.log('KillRpaProcess Exception occured:' + error, irpa_core.enums.logType.Error, 'KillRpaProcess');
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
9 | |
7 | |
7 | |
5 | |
5 | |
5 | |
5 | |
5 | |
5 | |
4 |