A script is trying to access SAP GUI

When the robot is running, SAP shows a pop "A script is trying to access SAP GUI"

This pop up is shown by SAP whenever an external script/program try to access the GUI element. In some cases, the message can also be – “A script is trying to attach to GUI

By Default SAP notify the user that some program is trying to access the SAP GUI application. This is to prevent any program to make any changes in the SAP without users consent

Resolution : 

These settings are configurable and can be disabled through SAP Accessibility and scripting settings.

  1. Launch to your SAP GUI application manually.
  2. Navigate to ‘Options’ as below or press “Alt F12” and click ‘Options.
  3. Select “Accessibility & Scripting”. 
  4. Expand ‘Accessibility & Scripting’ and select “Scripting”. 
  5. If the warning message is being thrown, the option “Notify when a script attaches to SAP GUI” would be checked. Un-check following options:
    1. Notify when a script attaches to SAP GUI
    2. Notify when a script opens a connection. Click “Apply” followed by “OK”.

Note:  The above screen may vary for different version of SAP.