Function SetWarningsOn enables or disables Exceptions searching. If these function is enabled, then after each event or function Interpreter will be search an error window, and if this window is found then to it sends event, that emulates click on ‘OK’ botton.
Interpreter finds 2 kinds of error symptoms
1) Window that caption contains string ‘Access violation’
or
2) Window, that contains error icon.
and In Vindows Vista it look so
Syntax
SetWarningsOn( WarningsON:String )
Parameters
WarningsON:String
If WarningsON is 1 or ‘ON’ then function enables exceptions searching, otherwise if WarningsON is 0 or ‘OFF’ then function disables exceptions searching.
Example
For this example you must download error sample application, that raises an exception.
SetWarningsOn('ON');
Execute('c:\ErrorSample.exe');
Wait(1000);
ClickButton('Run divide error');
//error, cathed
SetWarningsOn('OFF');
ClickButton('Run divide error');
//error, not cathed
Download example SetWarningsOn
Leave a Reply